From e074c936bb99ccfce311445f4dbf42ba964b44a4 Mon Sep 17 00:00:00 2001 From: Julian Hurst Date: Wed, 12 Mar 2025 22:36:13 +0100 Subject: Implement global state and clear scheduling --- tui/widget/text/text.ha | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tui/widget/text/text.ha') 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, -- cgit v1.2.3