From 9d3ff8760367833173ef1a784870be19196dac74 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Fri, 17 Nov 2023 03:29:48 -0600 Subject: the root window is now no longer a dock status bar and stuff TODO: check ncurses calls that can failgit add --all! --- src/ui/debug.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/ui/debug.c (limited to 'src/ui/debug.c') 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 + +#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 -- cgit v1.2.3-70-g09d2