diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-11-20 14:18:35 +1100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-11-22 13:13:15 +0800 |
commit | 15e4a88f297abc8f22a58bb87055d20eacb61db4 (patch) | |
tree | 32791b62b5009b596a19a050aca0d2f2ebd9fb44 | |
parent | d2668cb8a8b9f5ded7b36217408e688ebc49442a (diff) | |
download | petitboot-15e4a88f297abc8f22a58bb87055d20eacb61db4.zip petitboot-15e4a88f297abc8f22a58bb87055d20eacb61db4.tar.gz |
ui/ncurses: Add widgetset_set_window
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r-- | ui/ncurses/nc-widgets.c | 7 | ||||
-rw-r--r-- | ui/ncurses/nc-widgets.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/ncurses/nc-widgets.c b/ui/ncurses/nc-widgets.c index 688722c..8632aff 100644 --- a/ui/ncurses/nc-widgets.c +++ b/ui/ncurses/nc-widgets.c @@ -694,6 +694,13 @@ struct nc_widgetset *widgetset_create(void *ctx, WINDOW *main, WINDOW *sub) return set; } +void widgetset_set_windows(struct nc_widgetset *set, + WINDOW *main, WINDOW *sub) +{ + set->mainwin = main; + set->subwin = sub; +} + void widgetset_set_widget_focus(struct nc_widgetset *set, widget_focus_cb cb, void *arg) { diff --git a/ui/ncurses/nc-widgets.h b/ui/ncurses/nc-widgets.h index 18af6d8..47a57d9 100644 --- a/ui/ncurses/nc-widgets.h +++ b/ui/ncurses/nc-widgets.h @@ -67,6 +67,8 @@ typedef void (*widget_focus_cb)(struct nc_widget *widget, void *arg); struct nc_widgetset *widgetset_create(void *ctx, WINDOW *main, WINDOW *sub); void widgetset_set_widget_focus(struct nc_widgetset *set, widget_focus_cb cb, void *arg); +void widgetset_set_windows(struct nc_widgetset *widgetset, + WINDOW *main, WINDOW *sub); void widgetset_post(struct nc_widgetset *set); void widgetset_unpost(struct nc_widgetset *set); bool widgetset_process_key(struct nc_widgetset *set, int key); |