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 */);
37 int title_min_w, title_h;
45 typedef enum MenuEntryRenderType {
46 MenuEntryRenderType_None = 0,
47 MenuEntryRenderType_Submenu = 1 << 0,
48 MenuEntryRenderType_Boolean = 1 << 1,
49 MenuEntryRenderType_Separator = 1 << 2,
51 MenuEntryRenderType_Other = 1 << 7
52 } MenuEntryRenderType;
60 MenuEntryRenderType render_type;
63 gboolean boolean_value;
70 Appearance *a_disabled;
79 Menu *menu_new(char *label, char *name, Menu *parent);
80 void menu_free(char *name);
82 void menu_show(char *name, int x, int y, Client *client);
83 void menu_hide(Menu *self);
85 MenuEntry *menu_entry_new_full(char *label, Action *action,
86 MenuEntryRenderType render_type,
89 #define menu_entry_new(label, action) \
90 menu_entry_new_full(label, action, MenuEntryRenderType_None, NULL)
92 void menu_entry_free(MenuEntry *entry);
94 void menu_entry_set_submenu(MenuEntry *entry, Menu *submenu);
96 void menu_add_entry(Menu *menu, MenuEntry *entry);
98 MenuEntry *menu_find_entry(Menu *menu, Window win);
100 void menu_entry_render(MenuEntry *self);
102 void menu_entry_fire(MenuEntry *self);