2 * vim:ts=4:sw=4:expandtab
9 /* TODO: i am not sure yet how much access to the focused container should
10 * be permitted to source files */
12 TAILQ_HEAD(all_cons_head, Con);
13 extern struct all_cons_head all_cons;
16 * Initializes the tree by creating the root node, adding all RandR outputs
17 * to the tree (that means randr_init() has to be called before) and
18 * assigning a workspace to each RandR output.
21 void tree_init(xcb_get_geometry_reply_t *geometry);
24 * Opens an empty container in the current container
27 Con *tree_open_con(Con *con, i3Window *window);
30 * Splits (horizontally or vertically) the given container by creating a new
31 * container which contains the old one and the future ones.
34 void tree_split(Con *con, orientation_t orientation);
37 * Moves focus one level up.
43 * Moves focus one level down.
49 * Renders the tree, that is rendering all outputs using render_con() and
50 * pushing the changes to X11 using x_push_changes().
56 * Closes the current container using tree_close().
59 void tree_close_con(kill_window_t kill_window);
62 * Changes focus in the given way (next/previous) and given orientation
63 * (horizontal/vertical).
66 void tree_next(char way, orientation_t orientation);
69 * Closes the given container including all children.
70 * Returns true if the container was killed or false if just WM_DELETE was sent
71 * and the window is expected to kill itself.
73 * The dont_kill_parent flag is specified when the function calls itself
74 * recursively while deleting a containers children.
76 * The force_set_focus flag is specified in the case of killing a floating
77 * window: tree_close() will be invoked for the CT_FLOATINGCON (the parent
78 * container) and focus should be set there.
81 bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool force_set_focus);
84 * Loads tree from ~/.i3/_restart.json (used for in-place restarts).
87 bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry);
90 * tree_flatten() removes pairs of redundant split containers, e.g.:
91 * [workspace, horizontal]
95 * In this example, the v-split and h-split container are redundant.
96 * Such a situation can be created by moving containers in a direction which is
97 * not the orientation of their parent container. i3 needs to create a new
98 * split container then and if you move containers this way multiple times,
99 * redundant chains of split-containers can be the result.
102 void tree_flatten(Con *child);