]> git.sur5r.net Git - i3/i3/blob - include/commands.h
7b2fb88b68dbda292a2372c1b1078371a09fc55d
[i3/i3] / include / commands.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * commands.c: all command functions (see commands_parser.c)
8  *
9  */
10 #ifndef _COMMANDS_H
11 #define _COMMANDS_H
12
13 /*
14  * Helper data structure for an operation window (window on which the operation
15  * will be performed). Used to build the TAILQ owindows.
16  *
17  */
18 typedef struct owindow {
19     Con *con;
20     TAILQ_ENTRY(owindow) owindows;
21 } owindow;
22
23 typedef TAILQ_HEAD(owindows_head, owindow) owindows_head;
24
25 /**
26  * Initializes the specified 'Match' data structure and the initial state of
27  * commands.c for matching target windows of a command.
28  *
29  */
30 char *cmd_criteria_init(Match *current_match);
31
32 /**
33  * A match specification just finished (the closing square bracket was found),
34  * so we filter the list of owindows.
35  *
36  */
37 char *cmd_criteria_match_windows(Match *current_match);
38
39 /**
40  * Interprets a ctype=cvalue pair and adds it to the current match
41  * specification.
42  *
43  */
44 char *cmd_criteria_add(Match *current_match, char *ctype, char *cvalue);
45
46 /**
47  * Implementation of 'move [window|container] [to] workspace
48  * next|prev|next_on_output|prev_on_output'.
49  *
50  */
51 char *cmd_move_con_to_workspace(Match *current_match, char *which);
52
53 /**
54  * Implementation of 'move [window|container] [to] workspace <name>'.
55  *
56  */
57 char *cmd_move_con_to_workspace_name(Match *current_match, char *name);
58
59 /**
60  * Implementation of 'resize grow|shrink <direction> [<px> px] [or <ppt> ppt]'.
61  *
62  */
63 char *cmd_resize(Match *current_match, char *way, char *direction, char *resize_px, char *resize_ppt);
64
65 /**
66  * Implementation of 'border normal|none|1pixel|toggle'.
67  *
68  */
69 char *cmd_border(Match *current_match, char *border_style_str);
70
71 /**
72  * Implementation of 'nop <comment>'.
73  *
74  */
75 char *cmd_nop(Match *current_match, char *comment);
76
77 /**
78  * Implementation of 'append_layout <path>'.
79  *
80  */
81 char *cmd_append_layout(Match *current_match, char *path);
82
83 /**
84  * Implementation of 'workspace next|prev|next_on_output|prev_on_output'.
85  *
86  */
87 char *cmd_workspace(Match *current_match, char *which);
88
89 /**
90  * Implementation of 'workspace back_and_forth'.
91  *
92  */
93 char *cmd_workspace_back_and_forth(Match *current_match);
94
95 /**
96  * Implementation of 'workspace <name>'
97  *
98  */
99 char *cmd_workspace_name(Match *current_match, char *name);
100
101 /**
102  * Implementation of 'mark <mark>'
103  *
104  */
105 char *cmd_mark(Match *current_match, char *mark);
106
107 /**
108  * Implementation of 'mode <string>'.
109  *
110  */
111 char *cmd_mode(Match *current_match, char *mode);
112
113 /**
114  * Implementation of 'move [window|container] [to] output <str>'.
115  *
116  */
117 char *cmd_move_con_to_output(Match *current_match, char *name);
118
119 /**
120  * Implementation of 'floating enable|disable|toggle'
121  *
122  */
123 char *cmd_floating(Match *current_match, char *floating_mode);
124
125 /**
126  * Implementation of 'move workspace to [output] <str>'.
127  *
128  */
129 char *cmd_move_workspace_to_output(Match *current_match, char *name);
130
131 /**
132  * Implementation of 'split v|h|vertical|horizontal'.
133  *
134  */
135 char *cmd_split(Match *current_match, char *direction);
136
137 /**
138  * Implementaiton of 'kill [window|client]'.
139  *
140  */
141 char *cmd_kill(Match *current_match, char *kill_mode);
142
143 /**
144  * Implementation of 'exec [--no-startup-id] <command>'.
145  *
146  */
147 char *cmd_exec(Match *current_match, char *nosn, char *command);
148
149 /**
150  * Implementation of 'focus left|right|up|down'.
151  *
152  */
153 char *cmd_focus_direction(Match *current_match, char *direction);
154
155 /**
156  * Implementation of 'focus tiling|floating|mode_toggle'.
157  *
158  */
159 char *cmd_focus_window_mode(Match *current_match, char *window_mode);
160
161 /**
162  * Implementation of 'focus parent|child'.
163  *
164  */
165 char *cmd_focus_level(Match *current_match, char *level);
166
167 /**
168  * Implementation of 'focus'.
169  *
170  */
171 char *cmd_focus(Match *current_match);
172
173 /**
174  * Implementation of 'fullscreen [global]'.
175  *
176  */
177 char *cmd_fullscreen(Match *current_match, char *fullscreen_mode);
178
179 /**
180  * Implementation of 'move <direction> [<pixels> [px]]'.
181  *
182  */
183 char *cmd_move_direction(Match *current_match, char *direction, char *px);
184
185 /**
186  * Implementation of 'layout default|stacked|stacking|tabbed'.
187  *
188  */
189 char *cmd_layout(Match *current_match, char *layout);
190
191 /**
192  * Implementaiton of 'exit'.
193  *
194  */
195 char *cmd_exit(Match *current_match);
196
197 /**
198  * Implementaiton of 'reload'.
199  *
200  */
201 char *cmd_reload(Match *current_match);
202
203 /**
204  * Implementaiton of 'restart'.
205  *
206  */
207 char *cmd_restart(Match *current_match);
208
209 /**
210  * Implementaiton of 'open'.
211  *
212  */
213 char *cmd_open(Match *current_match);
214
215 /**
216  * Implementation of 'focus output <output>'.
217  *
218  */
219 char *cmd_focus_output(Match *current_match, char *name);
220
221 /**
222  * Implementation of 'move scratchpad'.
223  *
224  */
225 char *cmd_move_scratchpad(Match *current_match);
226
227 /**
228  * Implementation of 'scratchpad show'.
229  *
230  */
231 char *cmd_scratchpad_show(Match *current_match);
232
233 #endif