debian
docs
i3-config-wizard
i3-input
i3-msg
i3-nagbar
include
i3
all.h
assignments.h
atoms.xmacro
click.h
cmdparse.h
con.h
config.h
data.h
debug.h
ewmh.h
floating.h
handlers.h
i3.h
ipc.h
load_layout.h
log.h
manage.h
match.h
move.h
output.h
queue.h
randr.h
render.h
resize.h
sighandler.h
tree.h
util.h
window.h
workspace.h
x.h
xcb.h
xcb_compat.h
xcursor.h
xinerama.h
man
render-tree
src
testcases
tests
yajl-fallback
.gitignore
CMDMODE
DEPENDS
GOALS
LICENSE
Makefile
PACKAGE-MAINTAINER
RELEASE-NOTES-4.0
TODO
common.mk
dump-asy.pl
gtk-tree-watch.pl
i3-migrate-config-to-v4.pl
i3-wsbar
i3.config
i3.config.keycodes
i3.desktop
i3.welcome
logo.svg
pseudo-doc.doxygen
98 lines
2.4 KiB
C
98 lines
2.4 KiB
C
/*
|
|
* vim:ts=4:sw=4:expandtab
|
|
*/
|
|
|
|
#ifndef _TREE_H
|
|
#define _TREE_H
|
|
|
|
extern Con *croot;
|
|
/* TODO: i am not sure yet how much access to the focused container should
|
|
* be permitted to source files */
|
|
extern Con *focused;
|
|
TAILQ_HEAD(all_cons_head, Con);
|
|
extern struct all_cons_head all_cons;
|
|
|
|
/**
|
|
* 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.
|
|
*
|
|
*/
|
|
void tree_init(xcb_get_geometry_reply_t *geometry);
|
|
|
|
/**
|
|
* Opens an empty container in the current container
|
|
*
|
|
*/
|
|
Con *tree_open_con(Con *con, i3Window *window);
|
|
|
|
/**
|
|
* Splits (horizontally or vertically) the given container by creating a new
|
|
* container which contains the old one and the future ones.
|
|
*
|
|
*/
|
|
void tree_split(Con *con, orientation_t orientation);
|
|
|
|
/**
|
|
* Moves focus one level up.
|
|
*
|
|
*/
|
|
void level_up();
|
|
|
|
/**
|
|
* Moves focus one level down.
|
|
*
|
|
*/
|
|
void level_down();
|
|
|
|
/**
|
|
* Renders the tree, that is rendering all outputs using render_con() and
|
|
* pushing the changes to X11 using x_push_changes().
|
|
*
|
|
*/
|
|
void tree_render();
|
|
|
|
/**
|
|
* Closes the current container using tree_close().
|
|
*
|
|
*/
|
|
void tree_close_con(kill_window_t kill_window);
|
|
|
|
/**
|
|
* Changes focus in the given way (next/previous) and given orientation
|
|
* (horizontal/vertical).
|
|
*
|
|
*/
|
|
void tree_next(char way, orientation_t orientation);
|
|
|
|
/**
|
|
* Closes the given container including all children.
|
|
* Returns true if the container was killed or false if just WM_DELETE was sent
|
|
* and the window is expected to kill itself.
|
|
*
|
|
*/
|
|
bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent);
|
|
|
|
/**
|
|
* Loads tree from ~/.i3/_restart.json (used for in-place restarts).
|
|
*
|
|
*/
|
|
bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry);
|
|
|
|
/**
|
|
* 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.
|
|
*
|
|
*/
|
|
void tree_flatten(Con *child);
|
|
|
|
#endif
|