5 #include "render/render.h"
9 extern GHashTable *menu_map;
24 /* waste o' pointers */
25 void (*show)( /* some bummu */);
26 void (*hide)( /* some bummu */);
27 void (*update)( /* some bummu */);
28 void (*mouseover)( /* some bummu */);
29 void (*selected)( /* some bummu */);
36 int title_min_w, title_h;
44 typedef enum MenuEntryRenderType {
45 MenuEntryRenderType_None = 0,
46 MenuEntryRenderType_Submenu = 1 << 0,
47 MenuEntryRenderType_Boolean = 1 << 1,
48 MenuEntryRenderType_Separator = 1 << 2,
50 MenuEntryRenderType_Other = 1 << 7
51 } MenuEntryRenderType;
59 MenuEntryRenderType render_type;
62 gboolean boolean_value;
69 Appearance *a_disabled;
78 Menu *menu_new(char *label, char *name, Menu *parent);
79 void menu_free(char *name);
81 void menu_show(char *name, int x, int y, Client *client);
83 MenuEntry *menu_entry_new_full(char *label, Action *action,
84 MenuEntryRenderType render_type,
87 #define menu_entry_new(label, action) \
88 menu_entry_new_full(label, action, MenuEntryRenderType_None, NULL)
90 void menu_entry_free(MenuEntry *entry);
92 void menu_entry_set_submenu(MenuEntry *entry, Menu *submenu);
94 void menu_add_entry(Menu *menu, MenuEntry *entry);
96 MenuEntry *menu_find_entry(Menu *menu, Window win);
98 void menu_entry_render(MenuEntry *self);