diff options
Diffstat (limited to 'include/menu.h')
-rw-r--r-- | include/menu.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/menu.h b/include/menu.h index 22bfc2301f..6e7b555263 100644 --- a/include/menu.h +++ b/include/menu.h @@ -28,6 +28,11 @@ struct menu; +typedef enum { + MENU_ENTRY_NORMAL = 0, + MENU_ENTRY_BOX, +} menu_entry_type; + struct menu_entry { int num; char *display; @@ -35,6 +40,12 @@ struct menu_entry { void (*free)(struct menu_entry *me); int non_re_ent; + /* MENU_ENTRY_BOX */ + int box_state; + void (*box_action)(struct menu *m, struct menu_entry *me); + + menu_entry_type type; + struct list_head list; }; @@ -42,6 +53,9 @@ struct menu { char *name; char *display; + int auto_select; + char *auto_display; + struct list_head list; struct list_head entries; @@ -66,7 +80,8 @@ static inline struct menu* menu_alloc(void) return m; } struct menu_entry *menu_add_submenu(struct menu *parent, char *submenu, char *display); -struct menu_entry *menu_add_command_entry(struct menu *m, char *display, char *command); +struct menu_entry *menu_add_command_entry(struct menu *m, char *display, + char *command, menu_entry_type type); void menu_free(struct menu *m); int menu_add(struct menu* m); void menu_remove(struct menu *m); @@ -74,6 +89,7 @@ struct menu* menu_get_by_name(char *name); int menu_show(struct menu *m); int menu_set_selected_entry(struct menu *m, struct menu_entry* me); int menu_set_selected(struct menu *m, int num); +int menu_set_auto_select(struct menu *m, int delay); struct menu* menu_get_menus(void); /* |