refactor: move command and EventHandler out of the tui module
This commit is contained in:
parent
f41fb97d02
commit
16c5471126
45 changed files with 132 additions and 81 deletions
|
@ -1,6 +1,7 @@
|
|||
const std = @import("std");
|
||||
const tp = @import("thespian");
|
||||
|
||||
const EventHandler = @import("EventHandler");
|
||||
const Plane = @import("renderer").Plane;
|
||||
const key = @import("renderer").input.key;
|
||||
const event_type = @import("renderer").input.event_type;
|
||||
|
@ -22,7 +23,7 @@ pub fn Options(context: type) type {
|
|||
on_render: *const fn (ctx: *context, button: *State(Context), theme: *const Widget.Theme) bool = on_render_default,
|
||||
on_layout: *const fn (ctx: *context, button: *State(Context)) Widget.Layout = on_layout_default,
|
||||
on_receive: *const fn (ctx: *context, button: *State(Context), from: tp.pid_ref, m: tp.message) error{Exit}!bool = on_receive_default,
|
||||
on_event: ?Widget.EventHandler = null,
|
||||
on_event: ?EventHandler = null,
|
||||
|
||||
pub const Context = context;
|
||||
pub fn do_nothing(_: *context, _: *State(Context)) void {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue