summaryrefslogtreecommitdiff
path: root/openbox/menu.h
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-04-16 05:36:51 +0000
committerDana Jansens <danakj@orodu.net>2003-04-16 05:36:51 +0000
commit79a352a40bd16924b1ca3df49f6c82d77e956a0e (patch)
treed4c00749892eac1f11f495a4a9ba3ddc53d901f3 /openbox/menu.h
parent59c3cce4f49f04ed2c2937e7de24255dd53df487 (diff)
raise menus above clients.
hilight menu entries as the cursor passes over them.
Diffstat (limited to 'openbox/menu.h')
-rw-r--r--openbox/menu.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/openbox/menu.h b/openbox/menu.h
index 23b6b9c5..2371dee0 100644
--- a/openbox/menu.h
+++ b/openbox/menu.h
@@ -18,7 +18,6 @@ typedef struct Menu {
/* ? */
gboolean shown;
gboolean invalid;
- gpointer render_data; /* where the engine can store anything it likes */
struct Menu *parent;
@@ -28,17 +27,19 @@ typedef struct Menu {
void (*update)( /* some bummu */);
void (*mouseover)( /* some bummu */);
void (*selected)( /* some bummu */);
-} Menu;
-typedef struct MenuRenderData {
+
+ /* render stuff */
Window frame;
Window title;
Appearance *a_title;
int title_min_w, title_h;
Window items;
Appearance *a_items;
+ int bullet_w;
int item_h;
-} MenuRenderData;
+ int width;
+} Menu;
typedef enum MenuEntryRenderType {
MenuEntryRenderType_None = 0,
@@ -56,18 +57,20 @@ typedef struct {
Action *action;
MenuEntryRenderType render_type;
+ gboolean hilite;
gboolean enabled;
gboolean boolean_value;
- gpointer render_data; /* where the engine can store anything it likes */
Menu *submenu;
-} MenuEntry;
-typedef struct MenuEntryRenderData {
+ /* render stuff */
Window item;
Appearance *a_item;
+ Appearance *a_disabled;
+ Appearance *a_hilite;
+ int y;
int min_w;
-} MenuEntryRenderData;
+} MenuEntry;
void menu_startup();
void menu_shutdown();
@@ -89,4 +92,9 @@ void menu_entry_free(MenuEntry *entry);
void menu_entry_set_submenu(MenuEntry *entry, Menu *submenu);
void menu_add_entry(Menu *menu, MenuEntry *entry);
+
+MenuEntry *menu_find_entry(Menu *menu, Window win);
+
+void menu_entry_render(MenuEntry *self);
+
#endif