diff options
| author | 2023-11-17 03:29:48 -0600 | |
|---|---|---|
| committer | 2023-11-17 03:29:48 -0600 | |
| commit | 9d3ff8760367833173ef1a784870be19196dac74 (patch) | |
| tree | 86bf972d3fb9e1f9f4a2a14b7ccf2f8e5a209d36 /src/ui/ui.internal.h | |
| parent | initial commit (diff) | |
the root window is now no longer a dock
status bar and stuff
TODO: check ncurses calls that can failgit add --all!
Diffstat (limited to 'src/ui/ui.internal.h')
| -rw-r--r-- | src/ui/ui.internal.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/ui/ui.internal.h b/src/ui/ui.internal.h index 7c53bd4..6107c94 100644 --- a/src/ui/ui.internal.h +++ b/src/ui/ui.internal.h @@ -19,6 +19,16 @@ #define UI__WINDOW_DOCK_MAX UI__WINDOW_DOCK_CENTER+1 +#ifdef NDEBUG +#define ui__cast(_t, _v) ((struct ui_window_ ## _t *)(_v)) +#else +#define ui__cast(_t, _v) (ui__check_cast_to_ ## _t(_v)) + +struct ui_window_base *ui__check_cast_to_base(void *); +struct ui_window_dock *ui__check_cast_to_dock(void *); +struct ui_window_root *ui__check_cast_to_root(void *); +#endif + /* concrete type definitions */ /* called to refresh the window (should refresh children as well) */ @@ -46,8 +56,9 @@ struct ui_window_dock { }; struct ui_window_root { - struct ui_window_dock super; + struct ui_window_base super; + struct ui_window_base *content; struct ui_window_base *floating; }; @@ -56,7 +67,7 @@ struct ui_window_root { /* in-place constructors */ void ui__init_window_base(struct ui_window_base *); void ui__init_window_dock(struct ui_window_dock *); -void ui__init_window_root(struct ui_window_root *); +void ui__init_window_root(struct ui_window_root *, WINDOW *); struct ui_window_base *ui__find_focused(void); @@ -78,4 +89,10 @@ void ui__dock_default_layout_proc(struct ui_window_base *base); void ui__root_draw_proc(struct ui_window_base *); void ui__root_layout_proc(struct ui_window_base *); +/* root_window_utilities */ + +void ui__root_set_content(struct ui_window_root *, struct ui_window_base *); + +extern const char *ui__status_text; + #endif /* include guard */ |
