diff options
Diffstat (limited to 'libtui/widget/widget.ha')
| -rw-r--r-- | libtui/widget/widget.ha | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libtui/widget/widget.ha b/libtui/widget/widget.ha index 6875692..307378d 100644 --- a/libtui/widget/widget.ha +++ b/libtui/widget/widget.ha @@ -13,6 +13,8 @@ export type print = fn(w: *widget) (void | error); // A function that frees the resources associated to the widget. export type finish = fn(w: *widget) void; +export type setsize = fn(w: *widget, sz: tty::ttysize) void; + // An input listener on a widget. The returning value is intended to be used as // a signal that will be returned by [[notify]] in order to trigger certain more // global ui events (terminate the program, change widget focus, etc.). To @@ -53,6 +55,7 @@ export type listener = *fn(w: *widget, r: libtui::key) bool; export type widget = struct { print: nullable *print, finish: nullable *finish, + setsize: nullable *setsize, listeners: []listener, ui: libtui::ttyui, }; |
