23 #include <libmb/mbconfig.h>
29 #include <sys/types.h>
35 #include <X11/Xutil.h>
36 #include <X11/Xatom.h>
38 #include <X11/Xresource.h>
39 #include <X11/extensions/shape.h>
40 #include <X11/Xatom.h>
41 #include <X11/keysymdef.h>
42 #include <X11/keysym.h>
45 #include <libmb/xsettings-client.h>
46 #include <libmb/mbpixbuf.h>
47 #include <libmb/mbexp.h>
87 MBMENU_NO_SORT = (1<<1),
88 MBMENU_PREPEND = (1<<2)
98 #define MBMENU_FG_COL (1<<1)
99 #define MBMENU_BG_COL (1<<2)
100 #define MBMENU_HL_COL (1<<3)
101 #define MBMENU_BD_COL (1<<4)
102 #define MBMENU_FONT (1<<5)
103 #define MBMENU_BD_SZ (1<<6)
104 #define MBMENU_ICON_SZ (1<<7)
105 #define MBMENU_ICON_FN (1<<8)
106 #define MBMENU_ICON_FOLDER_FN (1<<9)
107 #define MBMENU_TRANS (1<<10)
108 #define MBMENU_BG_FN (1<<11)
109 #define MBMENU_BEVEL (1<<12)
111 typedef struct _menu_options
114 char *foreground_col_spec;
115 char *background_col_spec;
116 char *highlight_col_spec;
117 char *border_col_spec;
120 char *default_icon_filename;
121 char *default_folder_icon_filename;
122 char *bg_img_filename;
123 int transparency_level;
146 struct _menuitem *items;
147 struct _menuitem *active_item;
148 struct _menuitem *too_big_start_item;
149 struct _menuitem *too_big_end_item;
150 struct _menuitem *parent_item;
175 typedef struct _menuitem
180 void (* cb)(
struct _menuitem *item );
188 struct _menuitem *next_item;
201 typedef struct _mbmemu
233 Bool have_highlight_col;
238 int inner_border_width;
239 XColor border_cols[3];
249 Pixmap arrow_icon, arrow_mask;
250 Pixmap bg_pixmap, bg_pixmap_mask;
252 struct _menu *rootmenu;
253 Bool xmenu_is_active;
254 struct _menu *active[10];
259 struct _menu *keyboard_focus_menu;
261 XSettingsClient *xsettings_client;
465 mb_menu_add_item_to_menu(
MBMenu *mbmenu,