-
-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);
-typedef void(*menu_controller_mouseover)(ObMenuEntry *self, gboolean enter);
-typedef void(*menu_controller_selected)(ObMenuEntry *entry,
- unsigned int button,
- unsigned int x, unsigned int y);
-typedef void(*menu_controller_hide)(ObMenu *self);
-
-
-extern GHashTable *menu_hash;
-extern GList *menu_visible;
+typedef struct _ObNormalMenuEntry ObNormalMenuEntry;
+typedef struct _ObSubmenuMenuEntry ObSubmenuMenuEntry;
+typedef struct _ObSeparatorMenuEntry ObSeparatorMenuEntry;
+
+typedef void (*ObMenuShowFunc)(struct _ObMenuFrame *frame, gpointer data);
+typedef void (*ObMenuHideFunc)(struct _ObMenuFrame *frame, gpointer data);
+typedef gboolean (*ObMenuUpdateFunc)(struct _ObMenuFrame *frame,
+ gpointer data);
+typedef void (*ObMenuExecuteFunc)(struct _ObMenuEntry *entry,
+ struct _ObMenuFrame *frame,
+ struct _ObClient *client,
+ guint state, gpointer data);
+typedef void (*ObMenuDestroyFunc)(struct _ObMenu *menu, gpointer data);
+/*! @param x is the mouse x coordinate. on return it should be the x coordinate
+ for the menu
+ @param y is the mouse y coordinate. on return it should be the y coordinate
+ for the menu
+*/
+typedef void (*ObMenuPlaceFunc)(struct _ObMenuFrame *frame, gint *x, gint *y,
+ gboolean mouse, gpointer data);