include/tree.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 TAILQ_HEAD (all_cons_head, Con)
void tree_init (xcb_get_geometry_reply_t *geometry)
 Initializes the tree by creating the root node, adding all RandR outputs to the tree (that means randr_init() has to be called before) and assigning a workspace to each RandR output.
Contree_open_con (Con *con, i3Window *window)
 Opens an empty container in the current container.
void tree_split (Con *con, orientation_t orientation)
 Splits (horizontally or vertically) the given container by creating a new container which contains the old one and the future ones.
void level_up ()
 Moves focus one level up.
void level_down ()
 Moves focus one level down.
void tree_render ()
 Renders the tree, that is rendering all outputs using render_con() and pushing the changes to X11 using x_push_changes().
void tree_close_con (kill_window_t kill_window)
 Closes the current container using tree_close().
void tree_next (char way, orientation_t orientation)
 Changes focus in the given way (next/previous) and given orientation (horizontal/vertical).
bool tree_close (Con *con, kill_window_t kill_window, bool dont_kill_parent)
 Closes the given container including all children.
bool tree_restore (const char *path, xcb_get_geometry_reply_t *geometry)
 Loads tree from ~/.i3/_restart.json (used for in-place restarts).
void tree_flatten (Con *child)
 tree_flatten() removes pairs of redundant split containers, e.g.

Variables

Concroot
Confocused
struct all_cons_head all_cons

Function Documentation

void level_down (  ) 

Moves focus one level down.

Definition at line 329 of file tree.c.

References con_focus(), TAILQ_END, and TAILQ_FIRST.

Referenced by yyparse().

Here is the call graph for this function:

void level_up (  ) 

Moves focus one level up.

Definition at line 308 of file tree.c.

References con_focus(), Con::fullscreen_mode, LOG, Con::parent, and Con::type.

Referenced by yyparse().

Here is the call graph for this function:

TAILQ_HEAD ( all_cons_head  ,
Con   
)
bool tree_close ( Con con,
kill_window_t  kill_window,
bool  dont_kill_parent 
)
void tree_close_con ( kill_window_t  kill_window  ) 

Closes the current container using tree_close().

Definition at line 249 of file tree.c.

References LOG, tree_close(), and Con::type.

Referenced by yyparse().

Here is the call graph for this function:

void tree_flatten ( Con child  ) 

tree_flatten() removes pairs of redundant split containers, e.g.

: [workspace, horizontal] [v-split] [child3] [h-split] [child1] [child2] In this example, the v-split and h-split container are redundant. Such a situation can be created by moving containers in a direction which is not the orientation of their parent container. i3 needs to create a new split container then and if you move containers this way multiple times, redundant chains of split-containers can be the result.

Definition at line 455 of file tree.c.

References con_detach(), DLOG, DONT_KILL_WINDOW, Con::name, NO_ORIENTATION, Con::orientation, Con::parent, Con::percent, TAILQ_EMPTY, TAILQ_FIRST, TAILQ_INSERT_BEFORE, TAILQ_INSERT_HEAD, TAILQ_INSERT_TAIL, TAILQ_NEXT, TAILQ_REMOVE, tree_close(), tree_flatten(), Con::type, and Con::window.

Referenced by con_set_layout(), tree_flatten(), and tree_move().

Here is the call graph for this function:

void tree_init ( xcb_get_geometry_reply_t *  geometry  ) 

Initializes the tree by creating the root node, adding all RandR outputs to the tree (that means randr_init() has to be called before) and assigning a workspace to each RandR output.

Definition at line 53 of file tree.c.

References con_new(), FREE, Con::name, Con::rect, Con::type, and Rect::x.

Referenced by main().

Here is the call graph for this function:

void tree_next ( char  way,
orientation_t  orientation 
)

Changes focus in the given way (next/previous) and given orientation (horizontal/vertical).

Definition at line 438 of file tree.c.

References _tree_next().

Referenced by route_click(), and yyparse().

Here is the call graph for this function:

Con* tree_open_con ( Con con,
i3Window window 
)

Opens an empty container in the current container.

Definition at line 70 of file tree.c.

References con_descend_tiling_focused(), con_fix_percent(), con_new(), DLOG, Con::parent, and Con::type.

Referenced by manage_window(), and yyparse().

Here is the call graph for this function:

void tree_render (  ) 
bool tree_restore ( const char *  path,
xcb_get_geometry_reply_t *  geometry 
)

Loads tree from ~/.i3/_restart.json (used for in-place restarts).

Definition at line 16 of file tree.c.

References con_new(), LOG, path_exists(), Con::rect, resolve_tilde(), TAILQ_FIRST, tree_append_json(), and Rect::x.

Referenced by main().

Here is the call graph for this function:

void tree_split ( Con con,
orientation_t  orientation 
)

Splits (horizontally or vertically) the given container by creating a new container which contains the old one and the future ones.

Definition at line 269 of file tree.c.

References con_attach(), con_new(), con_num_children(), DLOG, Con::orientation, Con::parent, Con::percent, TAILQ_REPLACE, and Con::type.

Referenced by yyparse().

Here is the call graph for this function:


Variable Documentation

struct all_cons_head all_cons

Definition at line 10 of file tree.c.

Referenced by con_by_frame_id(), con_by_window_id(), con_new(), restore_geometry(), tree_close(), and yyparse().

Definition at line 8 of file tree.c.


Generated on 6 Aug 2011 for i3 by  doxygen 1.6.1