i3
con.h
Go to the documentation of this file.
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
6  *
7  * con.c: Functions which deal with containers directly (creating containers,
8  * searching containers, getting specific properties from containers,
9  * …).
10  *
11  */
12 #ifndef I3_CON_H
13 #define I3_CON_H
14 
20 Con *con_new_skeleton(Con *parent, i3Window *window);
21 
22 
23 /* A wrapper for con_new_skeleton, to retain the old con_new behaviour
24  *
25  */
26 Con *con_new(Con *parent, i3Window *window);
27 
33 void con_focus(Con *con);
34 
39 bool con_is_leaf(Con *con);
40 
41 /*
42  * Returns true if a container should be considered split.
43  *
44  */
45 bool con_is_split(Con *con);
46 
51 bool con_has_children(Con *con);
52 
58 bool con_accepts_window(Con *con);
59 
65 Con *con_get_output(Con *con);
66 
72 
79 
84 Con *con_get_fullscreen_con(Con *con, int fullscreen_mode);
85 
90 bool con_is_internal(Con *con);
91 
96 bool con_is_floating(Con *con);
97 
104 
109 bool con_inside_focused(Con *con);
110 
116 Con *con_by_window_id(xcb_window_t window);
117 
123 Con *con_by_frame_id(xcb_window_t frame);
124 
130 Con *con_for_window(Con *con, i3Window *window, Match **store_match);
131 
136 int con_num_children(Con *con);
137 
148 void con_attach(Con *con, Con *parent, bool ignore_focus);
149 
154 void con_detach(Con *con);
155 
162 void con_fix_percent(Con *con);
163 
169 void con_toggle_fullscreen(Con *con, int fullscreen_mode);
170 
188 void con_move_to_workspace(Con *con, Con *workspace, bool fix_coordinates, bool dont_warp);
189 
196 int con_orientation(Con *con);
197 
204 Con *con_next_focused(Con *con);
205 
211 Con *con_get_next(Con *con, char way, orientation_t orientation);
212 
220 
230 
231 /*
232  * Returns the leftmost, rightmost, etc. container in sub-tree. For example, if
233  * direction is D_LEFT, then we return the rightmost container and if direction
234  * is D_RIGHT, we return the leftmost container. This is because if we are
235  * moving D_LEFT, and thus want the rightmost container.
236  */
237 Con *con_descend_direction(Con *con, direction_t direction);
238 
246 
252 
263 int con_border_style(Con *con);
264 
270 void con_set_border_style(Con *con, int border_style, int border_width);
271 
278 void con_set_layout(Con *con, layout_t layout);
279 
287 void con_toggle_layout(Con *con, const char *toggle_mode);
288 
295 
318 
323 bool con_has_urgent_child(Con *con);
324 
331 
336 void con_set_urgency(Con *con, bool urgent);
337 
342 char *con_get_tree_representation(Con *con);
343 
344 #endif