3 #ifndef MENU_BINDINGS_H
4 #define MENU_BINDINGS_H
6 /* ---------------------------- included header files ---------------------- */
8 /* Do not #include any files - the file including this file has to take care of
11 /* ---------------------------- global definitions ------------------------- */
13 /* ---------------------------- global macros ------------------------------ */
15 /* ---------------------------- forward declarations ----------------------- */
18 struct MenuParameters
;
22 /* ---------------------------- type definitions --------------------------- */
26 unsigned int keystate
;
46 } menu_shortcut_action
;
48 /* ---------------------------- exported variables (globals) --------------- */
50 /* Do not use global variable. Full stop. */
52 /* ---------------------------- interface functions ------------------------ */
54 /* Before this function is called, all menu bindings created through
55 * menu_binding() are permanent i.e. they can not be deleted (although
56 * overridden). After calling it, new bindings are stored in the regular list
57 * and can be deleted by the user as usual.
59 * To be called by SetRCDefaults *only*. */
60 void menu_bindings_startup_complete(void);
62 /* Parse a menu binding and store it.
64 * To be called from bindings.c *only*. */
66 Display
*dpy
, binding_t type
, int button
, KeySym keysym
,
67 int context
, int modifier
, char *action
, char *menu_style
);
69 /* Checks if the given mouse or keyboard event in the given context
70 * corresponds to a menu binding. If so, the binding is returned. Otherwise
73 * To be called from menus.c *only*.
75 Binding
*menu_binding_is_mouse(XEvent
* event
, int context
);
76 Binding
*menu_binding_is_key(XEvent
* event
, int context
);
78 /* Menu keyboard processing
80 * Function called instead of Keyboard_Shortcuts()
81 * when a KeyPress event is received. If the key is alphanumeric,
82 * then the menu is scanned for a matching hot key. Otherwise if
83 * it was the escape key then the menu processing is aborted.
84 * If none of these conditions are true, then the default processing
86 * TKP - uses XLookupString so that keypad numbers work with windowlist
89 struct MenuRoot
*mr
, struct MenuParameters
*pmp
,
90 struct MenuReturn
*pmret
, XEvent
*event
, struct MenuItem
**pmi_current
,
91 double_keypress
*pdkp
, int *ret_menu_x
, int *ret_menu_y
);
93 #endif /* MENU_BINDINGS_H */