20 /* waste o' pointers */
21 void (*show)( /* some bummu */);
22 void (*hide)( /* some bummu */);
23 void (*update)( /* some bummu */);
24 void (*mouseover)( /* some bummu */);
25 void (*selected)( /* some bummu */);
28 typedef enum MenuEntryRenderType {
29 MenuEntryRenderType_None = 0,
30 MenuEntryRenderType_Submenu = 1 << 0,
31 MenuEntryRenderType_Boolean = 1 << 1,
32 MenuEntryRenderType_Separator = 1 << 2,
34 MenuEntryRenderType_Other = 1 << 7
35 } MenuEntryRenderType;
44 MenuEntryRenderType render_type;
46 gboolean boolean_value;
47 gpointer render_data; /* where the engine can store anything it likes */
52 Menu *menu_new(const char *label, const char *name, Menu *parent);
53 void menu_free(const char *name);
55 MenuEntry *menu_entry_new_full(const char *label, Action *action,
56 const MenuEntryRenderType render_type,
57 gpointer render_data, gpointer submenu);
59 #define menu_entry_new(label, action) \
60 menu_entry_new(label, action, MenuEntryRenderType_None, NULL, NULL)
62 void menu_entry_free(const MenuEntry *entry);
64 void menu_entry_set_submenu(MenuEntry *entry, Menu *submenu);
66 void menu_add_entry(Menu *menu, MenuEntry *entry);