5 #include "render/render.h"
19 gpointer render_data; /* where the engine can store anything it likes */
23 /* waste o' pointers */
24 void (*show)( /* some bummu */);
25 void (*hide)( /* some bummu */);
26 void (*update)( /* some bummu */);
27 void (*mouseover)( /* some bummu */);
28 void (*selected)( /* some bummu */);
31 typedef struct MenuRenderData {
35 int title_min_w, title_h;
41 typedef enum MenuEntryRenderType {
42 MenuEntryRenderType_None = 0,
43 MenuEntryRenderType_Submenu = 1 << 0,
44 MenuEntryRenderType_Boolean = 1 << 1,
45 MenuEntryRenderType_Separator = 1 << 2,
47 MenuEntryRenderType_Other = 1 << 7
48 } MenuEntryRenderType;
56 MenuEntryRenderType render_type;
58 gboolean boolean_value;
59 gpointer render_data; /* where the engine can store anything it likes */
64 typedef struct MenuEntryRenderData {
68 } MenuEntryRenderData;
73 Menu *menu_new(char *label, char *name, Menu *parent);
74 void menu_free(char *name);
76 void menu_show(char *name, int x, int y, Client *client);
78 MenuEntry *menu_entry_new_full(char *label, Action *action,
79 MenuEntryRenderType render_type,
82 #define menu_entry_new(label, action) \
83 menu_entry_new_full(label, action, MenuEntryRenderType_None, NULL)
85 void menu_entry_free(MenuEntry *entry);
87 void menu_entry_set_submenu(MenuEntry *entry, Menu *submenu);
89 void menu_add_entry(Menu *menu, MenuEntry *entry);