aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/ui.internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui.internal.h')
-rw-r--r--src/ui/ui.internal.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ui/ui.internal.h b/src/ui/ui.internal.h
index 863d9b2..0ad03f1 100644
--- a/src/ui/ui.internal.h
+++ b/src/ui/ui.internal.h
@@ -22,7 +22,8 @@
O(BASE), \
O(LEAF), \
O(DOCK), \
- O(ROOT)
+ O(ROOT), \
+ O(MENU)
enum {
#define WT_DEF(_t) UI__WINDOW_TYPE_ ## _t
@@ -48,6 +49,7 @@ struct ui_window_base *ui__check_cast_to_base(void *, const char *, const char *
struct ui_window_leaf *ui__check_cast_to_leaf(void *, const char *, const char *, int);
struct ui_window_dock *ui__check_cast_to_dock(void *, const char *, const char *, int);
struct ui_window_root *ui__check_cast_to_root(void *, const char *, const char *, int);
+struct ui_window_menu *ui__check_cast_to_menu(void *, const char *, const char *, int);
#define NCCI(_call) ui__debug_nc_check_int(_call, #_call, __FILE__, __func__, __LINE__)
#define NCCP(_call) ui__debug_nc_check_ptr(_call, #_call, __FILE__, __func__, __LINE__)
@@ -108,6 +110,7 @@ struct ui_window_root {
size_t menu_prefix_len;
struct uimenu_item_header *menu_selected;
+ int menu_selected_x;
unsigned menu_scroll;
bool undersize_scr; /* true if the screen was found to be undersize (set in layout proc) */
@@ -119,6 +122,12 @@ struct ui_window_root {
struct uimenu_item_menu *menu_root;
};
+struct ui_window_menu {
+ struct ui_window_leaf super;
+
+ struct uimenu_item_header *first_item;
+};
+
/* internal utils */
/* in-place constructors */
@@ -126,6 +135,7 @@ void ui__init_window_base(struct ui_window_base *);
void ui__init_window_leaf(struct ui_window_leaf *);
void ui__init_window_dock(struct ui_window_dock *);
void ui__init_window_root(struct ui_window_root *, WINDOW *);
+void ui__init_window_menu(struct ui_window_menu *);
struct ui_window_base *ui__find_focused(void);