5 #include "render/render.h"
9 extern GHashTable *menu_map;
21 gpointer render_data; /* where the engine can store anything it likes */
25 /* waste o' pointers */
26 void (*show)( /* some bummu */);
27 void (*hide)( /* some bummu */);
28 void (*update)( /* some bummu */);
29 void (*mouseover)( /* some bummu */);
30 void (*selected)( /* some bummu */);
33 typedef struct MenuRenderData {
37 int title_min_w, title_h;
43 typedef enum MenuEntryRenderType {
44 MenuEntryRenderType_None = 0,
45 MenuEntryRenderType_Submenu = 1 << 0,
46 MenuEntryRenderType_Boolean = 1 << 1,
47 MenuEntryRenderType_Separator = 1 << 2,
49 MenuEntryRenderType_Other = 1 << 7
50 } MenuEntryRenderType;
58 MenuEntryRenderType render_type;
60 gboolean boolean_value;
61 gpointer render_data; /* where the engine can store anything it likes */
66 typedef struct MenuEntryRenderData {
70 } MenuEntryRenderData;
75 Menu *menu_new(char *label, char *name, Menu *parent);
76 void menu_free(char *name);
78 void menu_show(char *name, int x, int y, Client *client);
80 MenuEntry *menu_entry_new_full(char *label, Action *action,
81 MenuEntryRenderType render_type,
84 #define menu_entry_new(label, action) \
85 menu_entry_new_full(label, action, MenuEntryRenderType_None, NULL)
87 void menu_entry_free(MenuEntry *entry);
89 void menu_entry_set_submenu(MenuEntry *entry, Menu *submenu);
91 void menu_add_entry(Menu *menu, MenuEntry *entry);