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
,
44 /* propagate the event to a different menu */
48 typedef struct MenuReturn
51 struct MenuRoot
*target_menu
;
54 unsigned do_unpost_submenu
: 1;
55 unsigned is_first_item_selected
: 1;
56 unsigned is_key_press
: 1;
57 unsigned is_menu_posted
: 1;
61 typedef struct MenuPosHints
63 /* suggested x/y position */
66 /* additional offset to x */
68 /* width of the parent menu or item */
70 /* to take menu width into account (0, -1 or -0.5) */
72 /* additional offset factor to x */
73 float context_x_factor
;
74 /* same with height */
78 /* False if referring to absolute screen position */
80 /* True if referring to a part of a menu */
81 Bool is_menu_relative
;
82 Bool has_screen_origin
;
85 typedef struct MenuOptions
87 struct MenuPosHints pos_hints
;
88 /* A position on the Xinerama screen on which the menu should be
92 unsigned do_not_warp
: 1;
93 unsigned do_warp_on_select
: 1;
94 unsigned do_warp_title
: 1;
95 unsigned do_select_in_place
: 1;
96 unsigned do_tear_off_immediately
: 1;
97 unsigned has_poshints
: 1;
98 unsigned is_fixed
: 1;
102 typedef struct MenuParameters
104 struct MenuRoot
*menu
;
105 struct MenuRoot
*parent_menu
;
106 struct MenuItem
*parent_item
;
107 const exec_context_t
**pexc
;
108 struct FvwmWindow
*tear_off_root_menu_window
;
110 XEvent
*event_propagate_to_submenu
;
111 struct MenuOptions
*pops
;
112 /* A position on the Xinerama screen on which the menu should be
118 unsigned has_default_action
: 1;
119 unsigned is_already_mapped
: 1;
120 unsigned is_first_root_menu
: 1;
121 unsigned is_invoked_by_key_press
: 1;
122 unsigned is_sticky
: 1;
123 unsigned is_submenu
: 1;
124 unsigned is_triggered_by_keypress
: 1;
128 typedef struct MenuRepaintTransparentParameters
131 struct FvwmWindow
*fw
;
132 } MenuRepaintTransparentParameters
;
134 #endif /* MENU_PARAMETERS_H */