diff options
| author | Julian Hurst <ark@mansus.space> | 2025-03-12 22:36:13 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2025-03-12 22:36:13 +0100 |
| commit | e074c936bb99ccfce311445f4dbf42ba964b44a4 (patch) | |
| tree | a2ca68130a4a6a532df3f7362d3cad0574d50259 /tui/widget/text | |
| parent | 6bab265109546396730d84a4189610eca094c62a (diff) | |
| download | hare-tui-e074c936bb99ccfce311445f4dbf42ba964b44a4.tar.gz | |
Implement global state and clear scheduling
Diffstat (limited to 'tui/widget/text')
| -rw-r--r-- | tui/widget/text/text.ha | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tui/widget/text/text.ha b/tui/widget/text/text.ha index ecb5c2c..d849661 100644 --- a/tui/widget/text/text.ha +++ b/tui/widget/text/text.ha @@ -1,5 +1,6 @@ use io; use unix::tty; +use tui; use tui::widget; use strings; @@ -8,10 +9,10 @@ export type text = struct { txt: str, }; -export fn newtext(out: io::file, txt: str, pos: widget::coords, style: (*widget::style | void)) text = { +export fn newtext(state: *tui::tui, txt: str, pos: widget::coords, style: (*widget::style | void)) text = { return text { widget = widget::widget { - out = out, + state = state, print = &printtext, resize = &resizetext, pos = pos, |
