X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.h;h=6cb76a5e67dcceda758287e8dd6e6b8c501254e8;hb=d085756572ae13035f69ab6fd3f7c9556d155e9c;hp=081b3528db0f65f78a30cf78d50d3a9e3e43afed;hpb=a8a4a2cca30602b66b7a7f68bb9f3fffd34e92c9;p=chaz%2Fopenbox diff --git a/openbox/menu.h b/openbox/menu.h index 081b3528..6cb76a5e 100644 --- a/openbox/menu.h +++ b/openbox/menu.h @@ -7,17 +7,19 @@ #include -extern GHashTable *menu_map; - struct Menu; struct MenuEntry; typedef void(*menu_controller_show)(struct Menu *self, int x, int y, Client *); typedef void(*menu_controller_update)(struct Menu *self); -typedef void(*menu_controller_mouseover)(struct MenuEntry *self, +typedef void(*menu_controller_mouseover)(struct MenuEntry *self, gboolean enter); +extern GHashTable *menu_hash; + typedef struct Menu { + ObWindow obwin; + char *label; char *name; @@ -44,10 +46,10 @@ typedef struct Menu { Client *client; Window frame; Window title; - Appearance *a_title; + RrAppearance *a_title; int title_min_w, title_h; Window items; - Appearance *a_items; + RrAppearance *a_items; int bullet_w; int item_h; Point location; @@ -67,7 +69,7 @@ typedef enum MenuEntryRenderType { MenuEntryRenderType_Other = 1 << 7 } MenuEntryRenderType; -typedef struct { +typedef struct MenuEntry { char *label; Menu *parent; @@ -82,9 +84,9 @@ typedef struct { /* render stuff */ Window item; - Appearance *a_item; - Appearance *a_disabled; - Appearance *a_hilite; + RrAppearance *a_item; + RrAppearance *a_disabled; + RrAppearance *a_hilite; int y; int min_w; } MenuEntry; @@ -104,6 +106,8 @@ void menu_show_full(Menu *menu, int x, int y, Client *client); void menu_hide(Menu *self); +void menu_clear(Menu *self); + MenuEntry *menu_entry_new_full(char *label, Action *action, MenuEntryRenderType render_type, gpointer submenu); @@ -133,6 +137,7 @@ void menu_entry_render(MenuEntry *self); void menu_entry_fire(MenuEntry *self); void menu_render(Menu *self); +void menu_render_full(Menu *self); void menu_control_mouseover(MenuEntry *entry, gboolean enter); #endif