6 #include "render/render.h"
14 typedef struct _ObMenu ObMenu;
15 typedef struct _ObMenuEntry ObMenuEntry;
16 typedef struct _ObNormalMenuEntry ObNormalMenuEntry;
17 typedef struct _ObSubmenuMenuEntry ObSubmenuMenuEntry;
18 typedef struct _ObSeparatorMenuEntry ObSeparatorMenuEntry;
20 extern GList *menu_visible;
26 /* Name of the menu. Used in the showmenu action. */
31 /* ObMenuEntry list */
40 OB_MENU_ENTRY_TYPE_NORMAL,
41 OB_MENU_ENTRY_TYPE_SUBMENU,
42 OB_MENU_ENTRY_TYPE_SEPARATOR
45 struct _ObNormalMenuEntry {
48 /* List of ObActions */
52 struct _ObSubmenuMenuEntry {
56 struct _ObSeparatorMenuEntry {
57 gchar foo; /* placeholder */
69 ObNormalMenuEntry normal;
70 ObSubmenuMenuEntry submenu;
71 ObSeparatorMenuEntry separator;
80 gboolean menu_new(gchar *name, gchar *title, gpointer data);
82 void menu_show(gchar *name, gint x, gint y, struct _ObClient *client);
84 /* functions for building menus */
85 void menu_clear_entries(gchar *name);
86 void menu_add_normal(gchar *name, gchar *label, GSList *actions);
87 void menu_add_submenu(gchar *name, gchar *submenu);
88 void menu_add_separator(gchar *name);