5 #include "parser/parse.h"
7 typedef struct _ObAction ObAction
;
9 /* These have to all have a Client* at the top even if they don't use it, so
10 that I can set it blindly later on. So every function will have a Client*
11 available (possibly NULL though) if it wants it.
19 struct InteractiveAction
{
25 struct InterDirectionalAction
{
26 struct InteractiveAction inter
;
27 ObDirection direction
;
30 struct DirectionalAction
{
32 ObDirection direction
;
46 gboolean here
; /* bring it to the current desktop */
49 struct MoveResizeRelative
{
54 struct SendToDesktop
{
60 struct SendToDesktopDirection
{
61 struct InteractiveAction inter
;
75 int layer
; /* < 0 = below, 0 = normal, > 0 = above */
78 struct DesktopDirection
{
79 struct InteractiveAction inter
;
89 guint32 corner
; /* prop_atoms.net_wm_moveresize_* */
100 struct CycleWindows
{
101 struct InteractiveAction inter
;
107 struct AnyAction any
;
108 struct InteractiveAction inter
;
109 struct InterDirectionalAction interdiraction
;
110 struct DirectionalAction diraction
;
111 struct Execute execute
;
112 struct ClientAction client
;
113 struct Activate activate
;
114 struct MoveResizeRelative relative
;
115 struct SendToDesktop sendto
;
116 struct SendToDesktopDirection sendtodir
;
117 struct Desktop desktop
;
118 struct DesktopDirection desktopdir
;
119 struct MoveResize moveresize
;
120 struct ShowMenu showmenu
;
121 struct CycleWindows cycle
;
126 /* The func member acts like an enum to tell which one of the structs in
127 the data union are valid.
129 void (*func
)(union ActionData
*data
);
130 union ActionData data
;
133 ObAction
*action_new(void (*func
)(union ActionData
*data
));
135 /* Creates a new Action from the name of the action
136 A few action types need data set after making this call still. Check if
137 the returned action's "func" is one of these.
138 action_execute - the path needs to be set
139 action_restart - the path can optionally be set
140 action_desktop - the destination desktop needs to be set
141 action_move_relative_horz - the delta
142 action_move_relative_vert - the delta
143 action_resize_relative_horz - the delta
144 action_resize_relative_vert - the delta
147 ObAction
*action_from_string(char *name
);
148 ObAction
*action_parse(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
);
149 void action_free(ObAction
*a
);
152 void action_execute(union ActionData
*data
);
154 void action_activate(union ActionData
*data
);
156 void action_focus(union ActionData
*data
);
158 void action_unfocus(union ActionData
*data
);
160 void action_iconify(union ActionData
*data
);
162 void action_raiselower(union ActionData
*data
);
164 void action_raise(union ActionData
*data
);
166 void action_lower(union ActionData
*data
);
168 void action_close(union ActionData
*data
);
170 void action_kill(union ActionData
*data
);
172 void action_shade(union ActionData
*data
);
174 void action_shadelower(union ActionData
*data
);
176 void action_unshaderaise(union ActionData
*data
);
178 void action_unshade(union ActionData
*data
);
180 void action_toggle_shade(union ActionData
*data
);
182 void action_toggle_omnipresent(union ActionData
*data
);
183 /* MoveResizeRelative */
184 void action_move_relative_horz(union ActionData
*data
);
185 /* MoveResizeRelative */
186 void action_move_relative_vert(union ActionData
*data
);
187 /* MoveResizeRelative */
188 void action_resize_relative_horz(union ActionData
*data
);
189 /* MoveResizeRelative */
190 void action_resize_relative_vert(union ActionData
*data
);
192 void action_maximize_full(union ActionData
*data
);
194 void action_unmaximize_full(union ActionData
*data
);
196 void action_toggle_maximize_full(union ActionData
*data
);
198 void action_maximize_horz(union ActionData
*data
);
200 void action_unmaximize_horz(union ActionData
*data
);
202 void action_toggle_maximize_horz(union ActionData
*data
);
204 void action_maximize_vert(union ActionData
*data
);
206 void action_unmaximize_vert(union ActionData
*data
);
208 void action_toggle_maximize_vert(union ActionData
*data
);
210 void action_send_to_desktop(union ActionData
*data
);
211 /* SendToDesktopDirection */
212 void action_send_to_desktop_dir(union ActionData
*data
);
214 void action_desktop(union ActionData
*data
);
215 /* DesktopDirection */
216 void action_desktop_dir(union ActionData
*data
);
218 void action_desktop_last(union ActionData
*data
);
220 void action_toggle_decorations(union ActionData
*data
);
222 void action_moveresize(union ActionData
*data
);
224 void action_restart(union ActionData
*data
);
226 void action_exit(union ActionData
*data
);
228 void action_showmenu(union ActionData
*data
);
230 void action_cycle_windows(union ActionData
*data
);
231 /* InterDirectionalAction */
232 void action_directional_focus(union ActionData
*data
);
233 /* DirectionalAction */
234 void action_movetoedge(union ActionData
*data
);
235 /* DirectionalAction */
236 void action_growtoedge(union ActionData
*data
);
238 void action_send_to_layer(union ActionData
*data
);
240 void action_toggle_layer(union ActionData
*data
);
242 void action_toggle_show_desktop(union ActionData
*data
);
244 void action_show_desktop(union ActionData
*data
);
246 void action_unshow_desktop(union ActionData
*data
);