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.
18 struct DirectionalAction{
20 ObDirection direction;
32 struct MoveResizeRelative {
37 struct SendToDesktop {
43 struct SendToDesktopDirection {
59 int layer; /* < 0 = below, 0 = normal, > 0 = above */
62 struct DesktopDirection {
75 guint32 corner; /* prop_atoms.net_wm_moveresize_* */
96 struct DirectionalAction diraction;
97 struct Execute execute;
98 struct ClientAction client;
99 struct MoveResizeRelative relative;
100 struct SendToDesktop sendto;
101 struct SendToDesktopDirection sendtodir;
102 struct Desktop desktop;
103 struct DesktopDirection desktopdir;
104 struct MoveResize moveresize;
105 struct ShowMenu showmenu;
106 struct CycleWindows cycle;
111 /* The func member acts like an enum to tell which one of the structs in
112 the data union are valid.
114 void (*func)(union ActionData *data);
115 union ActionData data;
118 ObAction *action_new(void (*func)(union ActionData *data));
120 /* Creates a new Action from the name of the action
121 A few action types need data set after making this call still. Check if
122 the returned action's "func" is one of these.
123 action_execute - the path needs to be set
124 action_restart - the path can optionally be set
125 action_desktop - the destination desktop needs to be set
126 action_move_relative_horz - the delta
127 action_move_relative_vert - the delta
128 action_resize_relative_horz - the delta
129 action_resize_relative_vert - the delta
132 ObAction *action_from_string(char *name);
133 ObAction *action_parse(xmlDocPtr doc, xmlNodePtr node);
134 void action_free(ObAction *a);
137 void action_execute(union ActionData *data);
139 void action_focus(union ActionData *data);
141 void action_unfocus(union ActionData *data);
143 void action_iconify(union ActionData *data);
145 void action_raise(union ActionData *data);
147 void action_lower(union ActionData *data);
149 void action_close(union ActionData *data);
151 void action_kill(union ActionData *data);
153 void action_shade(union ActionData *data);
155 void action_shadelower(union ActionData *data);
157 void action_unshaderaise(union ActionData *data);
159 void action_unshade(union ActionData *data);
161 void action_toggle_shade(union ActionData *data);
163 void action_toggle_omnipresent(union ActionData *data);
164 /* MoveResizeRelative */
165 void action_move_relative_horz(union ActionData *data);
166 /* MoveResizeRelative */
167 void action_move_relative_vert(union ActionData *data);
168 /* MoveResizeRelative */
169 void action_resize_relative_horz(union ActionData *data);
170 /* MoveResizeRelative */
171 void action_resize_relative_vert(union ActionData *data);
173 void action_maximize_full(union ActionData *data);
175 void action_unmaximize_full(union ActionData *data);
177 void action_toggle_maximize_full(union ActionData *data);
179 void action_maximize_horz(union ActionData *data);
181 void action_unmaximize_horz(union ActionData *data);
183 void action_toggle_maximize_horz(union ActionData *data);
185 void action_maximize_vert(union ActionData *data);
187 void action_unmaximize_vert(union ActionData *data);
189 void action_toggle_maximize_vert(union ActionData *data);
191 void action_send_to_desktop(union ActionData *data);
192 /* SendToDesktopDirection */
193 void action_send_to_desktop_dir(union ActionData *data);
195 void action_desktop(union ActionData *data);
196 /* DesktopDirection */
197 void action_desktop_dir(union ActionData *data);
199 void action_toggle_decorations(union ActionData *data);
201 void action_moveresize(union ActionData *data);
203 void action_restart(union ActionData *data);
205 void action_exit(union ActionData *data);
207 void action_showmenu(union ActionData *data);
209 void action_cycle_windows(union ActionData *data);
210 /* DirectionalAction */
211 void action_directional_focus(union ActionData *data);
212 /* DirectionalAction */
213 void action_movetoedge(union ActionData *data);
214 /* DirectionalAction */
215 void action_growtoedge(union ActionData *data);
217 void action_send_to_layer(union ActionData *data);
219 void action_toggle_layer(union ActionData *data);
221 void action_toggle_show_desktop(union ActionData *data);
223 void action_show_desktop(union ActionData *data);
225 void action_unshow_desktop(union ActionData *data);