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/debug.c | |
| 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/debug.c')
| -rw-r--r-- | src/ui/debug.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ui/debug.c b/src/ui/debug.c new file mode 100644 index 0000000..d4f2e94 --- /dev/null +++ b/src/ui/debug.c @@ -0,0 +1,26 @@ +#ifndef NDEBUG + +#include <assert.h> + +#include "ui.internal.h" + +struct ui_window_base *ui__check_cast_to_base(void *obj) +{ + return obj; /* this cast always succeeds */ +} + +struct ui_window_dock *ui__check_cast_to_dock(void *obj) +{ + struct ui_window_base *base = obj; + assert(base->type == UI__WINDOW_TYPE_DOCK); + return obj; +} + +struct ui_window_root *ui__check_cast_to_root(void *obj) +{ + struct ui_window_base *base = obj; + assert(base->type == UI__WINDOW_TYPE_ROOT); + return obj; +} + +#endif |
