]> Dogcows Code - chaz/openbox/blobdiff - openbox/menu.h
add stacking_below which moves a window to immediately below another window. use...
[chaz/openbox] / openbox / menu.h
index 3b7c1c3840477ff0757b19fc30d914ad7e720a41..de0929e5eb48f05623724e72a1996d86c7d8be78 100644 (file)
@@ -9,10 +9,12 @@
 #include <glib.h>
 
 struct _ObClient;
+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);
@@ -53,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 */
@@ -103,7 +108,7 @@ struct _ObMenuEntry
     char *label;
     ObMenu *parent;
 
-    Action *action;    
+    ObAction *action;    
     
     ObMenuEntryRenderType render_type;
     gboolean hilite;
@@ -125,6 +130,7 @@ struct _ObMenuEntry
 } MenuEntry;
 
 typedef struct PluginMenuCreateData{
+    struct _ObParseInst *parse_inst;
     xmlDocPtr doc;
     xmlNodePtr node;
     ObMenu *parent;
@@ -134,17 +140,21 @@ typedef struct PluginMenuCreateData{
 void menu_startup();
 void menu_shutdown();
 
+void menu_parse();
+
 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);
 
@@ -155,7 +165,7 @@ void menu_hide(ObMenu *self);
 
 void menu_clear(ObMenu *self);
 
-ObMenuEntry *menu_entry_new_full(char *label, Action *action,
+ObMenuEntry *menu_entry_new_full(char *label, ObAction *action,
                                ObMenuEntryRenderType render_type,
                                gpointer submenu);
 
@@ -190,7 +200,8 @@ void menu_render(ObMenu *self);
 void menu_render_full(ObMenu *self);
 
 /*so plugins can call it? */
-void parse_menu_full(xmlDocPtr doc, xmlNodePtr node, void *data, gboolean new);
+void parse_menu_full(struct _ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
+                     void *data, gboolean new);
 void menu_control_mouseover(ObMenuEntry *entry, gboolean enter);
 void menu_control_keyboard_nav(unsigned int key);
 #endif
This page took 0.022341 seconds and 4 git commands to generate.