]> git.sur5r.net Git - i3/i3/blob - include/commands.h
Make comment style more consistent
[i3/i3] / include / commands.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * commands.c: all command functions (see commands_parser.c)
8  *
9  */
10 #pragma once
11
12 #include <config.h>
13
14 #include "commands_parser.h"
15
16 /** The beginning of the prototype for every cmd_ function. */
17 #define I3_CMD Match *current_match, struct CommandResultIR *cmd_output
18
19 /**
20  * Initializes the specified 'Match' data structure and the initial state of
21  * commands.c for matching target windows of a command.
22  *
23  */
24 void cmd_criteria_init(I3_CMD);
25
26 /**
27  * A match specification just finished (the closing square bracket was found),
28  * so we filter the list of owindows.
29  *
30  */
31 void cmd_criteria_match_windows(I3_CMD);
32
33 /**
34  * Interprets a ctype=cvalue pair and adds it to the current match
35  * specification.
36  *
37  */
38 void cmd_criteria_add(I3_CMD, const char *ctype, const char *cvalue);
39
40 /**
41  * Implementation of 'move [window|container] [to] workspace
42  * next|prev|next_on_output|prev_on_output'.
43  *
44  */
45 void cmd_move_con_to_workspace(I3_CMD, const char *which);
46
47 /**
48  * Implementation of 'move [window|container] [to] workspace back_and_forth'.
49  *
50  */
51 void cmd_move_con_to_workspace_back_and_forth(I3_CMD);
52
53 /**
54  * Implementation of 'move [--no-auto-back-and-forth] [window|container] [to] workspace <name>'.
55  *
56  */
57 void cmd_move_con_to_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
58
59 /**
60  * Implementation of 'move [--no-auto-back-and-forth] [window|container] [to] workspace number <number>'.
61  *
62  */
63 void cmd_move_con_to_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
64
65 /**
66  * Implementation of 'resize set <width> [px | ppt] <height> [px | ppt]'.
67  *
68  */
69 void cmd_resize_set(I3_CMD, long cwidth, const char *mode_width, long cheight, const char *mode_height);
70
71 /**
72  * Implementation of 'resize grow|shrink <direction> [<px> px] [or <ppt> ppt]'.
73  *
74  */
75 void cmd_resize(I3_CMD, const char *way, const char *direction, long resize_px, long resize_ppt);
76
77 /**
78  * Implementation of 'border normal|pixel [<n>]', 'border none|1pixel|toggle'.
79  *
80  */
81 void cmd_border(I3_CMD, const char *border_style_str, long border_width);
82
83 /**
84  * Implementation of 'nop <comment>'.
85  *
86  */
87 void cmd_nop(I3_CMD, const char *comment);
88
89 /**
90  * Implementation of 'append_layout <path>'.
91  *
92  */
93 void cmd_append_layout(I3_CMD, const char *path);
94
95 /**
96  * Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
97  *
98  */
99 void cmd_workspace(I3_CMD, const char *which);
100
101 /**
102  * Implementation of 'workspace [--no-auto-back-and-forth] number <number>'
103  *
104  */
105 void cmd_workspace_number(I3_CMD, const char *which, const char *no_auto_back_and_forth);
106
107 /**
108  * Implementation of 'workspace back_and_forth'.
109  *
110  */
111 void cmd_workspace_back_and_forth(I3_CMD);
112
113 /**
114  * Implementation of 'workspace [--no-auto-back-and-forth] <name>'
115  *
116  */
117 void cmd_workspace_name(I3_CMD, const char *name, const char *no_auto_back_and_forth);
118
119 /**
120  * Implementation of 'mark [--add|--replace] [--toggle] <mark>'
121  *
122  */
123 void cmd_mark(I3_CMD, const char *mark, const char *mode, const char *toggle);
124
125 /**
126  * Implementation of 'unmark [mark]'
127  *
128  */
129 void cmd_unmark(I3_CMD, const char *mark);
130
131 /**
132  * Implementation of 'mode <string>'.
133  *
134  */
135 void cmd_mode(I3_CMD, const char *mode);
136
137 /**
138  * Implementation of 'move [window|container] [to] output <str>'.
139  *
140  */
141 void cmd_move_con_to_output(I3_CMD, const char *name);
142
143 /**
144  * Implementation of 'move [window|container] [to] mark <str>'.
145  *
146  */
147 void cmd_move_con_to_mark(I3_CMD, const char *mark);
148
149 /**
150  * Implementation of 'floating enable|disable|toggle'
151  *
152  */
153 void cmd_floating(I3_CMD, const char *floating_mode);
154
155 /**
156  * Implementation of 'move workspace to [output] <str>'.
157  *
158  */
159 void cmd_move_workspace_to_output(I3_CMD, const char *name);
160
161 /**
162  * Implementation of 'split v|h|t|vertical|horizontal|toggle'.
163  *
164  */
165 void cmd_split(I3_CMD, const char *direction);
166
167 /**
168  * Implementation of 'kill [window|client]'.
169  *
170  */
171 void cmd_kill(I3_CMD, const char *kill_mode_str);
172
173 /**
174  * Implementation of 'exec [--no-startup-id] <command>'.
175  *
176  */
177 void cmd_exec(I3_CMD, const char *nosn, const char *command);
178
179 /**
180  * Implementation of 'focus left|right|up|down'.
181  *
182  */
183 void cmd_focus_direction(I3_CMD, const char *direction);
184
185 /**
186  * Implementation of 'focus tiling|floating|mode_toggle'.
187  *
188  */
189 void cmd_focus_window_mode(I3_CMD, const char *window_mode);
190
191 /**
192  * Implementation of 'focus parent|child'.
193  *
194  */
195 void cmd_focus_level(I3_CMD, const char *level);
196
197 /**
198  * Implementation of 'focus'.
199  *
200  */
201 void cmd_focus(I3_CMD);
202
203 /**
204  * Implementation of 'fullscreen [enable|disable|toggle] [global]'.
205  *
206  */
207 void cmd_fullscreen(I3_CMD, const char *action, const char *fullscreen_mode);
208
209 /**
210  * Implementation of 'sticky enable|disable|toggle'.
211  *
212  */
213 void cmd_sticky(I3_CMD, const char *action);
214
215 /**
216  * Implementation of 'move <direction> [<pixels> [px]]'.
217  *
218  */
219 void cmd_move_direction(I3_CMD, const char *direction_str, long move_px);
220
221 /**
222  * Implementation of 'layout default|stacked|stacking|tabbed|splitv|splith'.
223  *
224  */
225 void cmd_layout(I3_CMD, const char *layout_str);
226
227 /**
228  * Implementation of 'layout toggle [all|split]'.
229  *
230  */
231 void cmd_layout_toggle(I3_CMD, const char *toggle_mode);
232
233 /**
234  * Implementation of 'exit'.
235  *
236  */
237 void cmd_exit(I3_CMD);
238
239 /**
240  * Implementation of 'reload'.
241  *
242  */
243 void cmd_reload(I3_CMD);
244
245 /**
246  * Implementation of 'restart'.
247  *
248  */
249 void cmd_restart(I3_CMD);
250
251 /**
252  * Implementation of 'open'.
253  *
254  */
255 void cmd_open(I3_CMD);
256
257 /**
258  * Implementation of 'focus output <output>'.
259  *
260  */
261 void cmd_focus_output(I3_CMD, const char *name);
262
263 /**
264  * Implementation of 'move [window|container] [to] [absolute] position <px> [px] <px> [px]
265  *
266  */
267 void cmd_move_window_to_position(I3_CMD, long x, long y);
268
269 /**
270  * Implementation of 'move [window|container] [to] [absolute] position center
271  *
272  */
273 void cmd_move_window_to_center(I3_CMD, const char *method);
274
275 /**
276  * Implementation of 'move [window|container] [to] position mouse'
277  *
278  */
279 void cmd_move_window_to_mouse(I3_CMD);
280
281 /**
282  * Implementation of 'move scratchpad'.
283  *
284  */
285 void cmd_move_scratchpad(I3_CMD);
286
287 /**
288  * Implementation of 'scratchpad show'.
289  *
290  */
291 void cmd_scratchpad_show(I3_CMD);
292
293 /**
294  * Implementation of 'swap [container] [with] id|con_id|mark <arg>'.
295  *
296  */
297 void cmd_swap(I3_CMD, const char *mode, const char *arg);
298
299 /**
300  * Implementation of 'title_format <format>'
301  *
302  */
303 void cmd_title_format(I3_CMD, const char *format);
304
305 /**
306  * Implementation of 'rename workspace <name> to <name>'
307  *
308  */
309 void cmd_rename_workspace(I3_CMD, const char *old_name, const char *new_name);
310
311 /**
312  * Implementation of 'bar (hidden_state hide|show|toggle)|(mode dock|hide|invisible|toggle) [<bar_id>]'
313  *
314  */
315 void cmd_bar(I3_CMD, const char *bar_type, const char *bar_value, const char *bar_id);
316
317 /**
318  * Implementation of 'shmlog <size>|toggle|on|off'
319  *
320  */
321 void cmd_shmlog(I3_CMD, const char *argument);
322
323 /**
324  * Implementation of 'debuglog toggle|on|off'
325  *
326  */
327 void cmd_debuglog(I3_CMD, const char *argument);