X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.h;h=de0929e5eb48f05623724e72a1996d86c7d8be78;hb=507e7ac875d40913933f4e32192cdd62b60a0c8a;hp=1adac022e10e12d2e97992cd6eafc8a81fe2ebd1;hpb=1045079482453424f8320de99639390e3020eb72;p=chaz%2Fopenbox diff --git a/openbox/menu.h b/openbox/menu.h index 1adac022..de0929e5 100644 --- a/openbox/menu.h +++ b/openbox/menu.h @@ -14,6 +14,7 @@ struct _ObParseInst; typedef struct _ObMenu ObMenu; typedef struct _ObMenuEntry ObMenuEntry; +typedef void(*menu_controller_destroy)(ObMenu *self); typedef void(*menu_controller_show)(ObMenu *self, int x, int y, struct _ObClient *); typedef void(*menu_controller_update)(ObMenu *self); @@ -54,6 +55,9 @@ struct _ObMenu ObMenu *open_submenu; GList *over; + /* destructor */ + menu_controller_destroy destroy; + /* behaviour callbacks TODO: Document and split code that HAS to be in the overridden callback */ /* place a menu on screen */ @@ -142,13 +146,15 @@ void menu_noop(); #define menu_new(l, n, p) \ menu_new_full(l, n, p, menu_show_full, menu_render, menu_entry_fire, \ - menu_hide, menu_control_mouseover) + menu_hide, menu_control_mouseover, NULL) ObMenu *menu_new_full(char *label, char *name, ObMenu *parent, - menu_controller_show show, menu_controller_update update, + menu_controller_show show, + menu_controller_update update, menu_controller_selected selected, menu_controller_hide hide, - menu_controller_mouseover mouseover); + menu_controller_mouseover mouseover, + menu_controller_destroy destroy); void menu_free(char *name);