3 #ifndef MENU_PARAMETERS_H
4 #define MENU_PARAMETERS_H
6 /* ---------------------------- included header files ---------------------- */
8 /* Do not #include any files - the file including this file has to take care of
11 /* ---------------------------- forward declarations ----------------------- */
14 struct MenuParameters
;
19 /* ---------------------------- type definitions --------------------------- */
21 /* Return values for UpdateMenu, do_menu, menuShortcuts. This is a lame
22 * hack, in that "_BUTTON" is added to mean a button-release caused the
23 * return-- the macros below help deal with the ugliness. */
36 MENU_NEWITEM_MOVEMENU
,
41 MENU_SUBMENU_TORN_OFF
,
42 MENU_KILL_TEAR_OFF_MENU
,
43 /* propagate the event to a different menu */
47 typedef struct MenuReturn
50 struct MenuRoot
*target_menu
;
53 unsigned do_unpost_submenu
: 1;
54 unsigned is_first_item_selected
: 1;
55 unsigned is_key_press
: 1;
56 unsigned is_menu_posted
: 1;
60 typedef struct MenuPosHints
62 /* suggested x/y position */
65 /* additional offset to x */
67 /* width of the parent menu or item */
69 /* to take menu width into account (0, -1 or -0.5) */
71 /* additional offset factor to x */
72 float context_x_factor
;
73 /* same with height */
77 /* False if referring to absolute screen position */
79 /* True if referring to a part of a menu */
80 Bool is_menu_relative
;
81 Bool has_screen_origin
;
84 typedef struct MenuOptions
86 struct MenuPosHints pos_hints
;
87 /* A position on the Xinerama screen on which the menu should be
91 unsigned do_not_warp
: 1;
92 unsigned do_warp_on_select
: 1;
93 unsigned do_warp_title
: 1;
94 unsigned do_select_in_place
: 1;
95 unsigned do_tear_off_immediately
: 1;
96 unsigned has_poshints
: 1;
97 unsigned is_fixed
: 1;
101 typedef struct MenuParameters
103 struct MenuRoot
*menu
;
104 struct MenuRoot
*parent_menu
;
105 struct MenuItem
*parent_item
;
106 const exec_context_t
**pexc
;
107 struct FvwmWindow
*tear_off_root_menu_window
;
109 XEvent
*event_propagate_to_submenu
;
110 struct MenuOptions
*pops
;
111 /* A position on the Xinerama screen on which the menu should be
117 unsigned has_default_action
: 1;
118 unsigned is_already_mapped
: 1;
119 unsigned is_first_root_menu
: 1;
120 unsigned is_invoked_by_key_press
: 1;
121 unsigned is_sticky
: 1;
122 unsigned is_submenu
: 1;
123 unsigned is_triggered_by_keypress
: 1;
127 typedef struct MenuRepaintTransparentParameters
130 struct FvwmWindow
*fw
;
131 } MenuRepaintTransparentParameters
;
133 #endif /* MENU_PARAMETERS_H */