aboutsummaryrefslogtreecommitdiffstats
path: root/include/layout.h
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-26 13:35:22 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-26 13:35:22 -0700
commit357af228d693e64b4ac62ef472b3df65fd25348c (patch)
treeb4323f68acf9f37fe5c659172060471e03a07e92 /include/layout.h
parentMerge pull request #136 from taiyu-len/master (diff)
downloadsway-357af228d693e64b4ac62ef472b3df65fd25348c.tar.gz
sway-357af228d693e64b4ac62ef472b3df65fd25348c.tar.zst
sway-357af228d693e64b4ac62ef472b3df65fd25348c.zip
some function documentation, fixed gaps on config reload
Diffstat (limited to 'include/layout.h')
-rw-r--r--include/layout.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/layout.h b/include/layout.h
index 8cc26ba8..2d2a1113 100644
--- a/include/layout.h
+++ b/include/layout.h
@@ -11,14 +11,33 @@ extern swayc_t root_container;
11extern int min_sane_w; 11extern int min_sane_w;
12extern int min_sane_h; 12extern int min_sane_h;
13 13
14// Set initial values for root_container
14void init_layout(void); 15void init_layout(void);
15 16
17// Returns the index of child for its parent
18int index_child(const swayc_t *child);
19
20// Adds child to parent, if parent has no focus, it is set to child
21// parent must be of type C_WORKSPACE or C_CONTAINER
16void add_child(swayc_t *parent, swayc_t *child); 22void add_child(swayc_t *parent, swayc_t *child);
23
24// Adds child as floating window to ws, if there is no focus it is set to child.
25// ws must be of type C_WORKSPACE
17void add_floating(swayc_t *ws, swayc_t *child); 26void add_floating(swayc_t *ws, swayc_t *child);
18// Returns parent container which needs to be rearranged. 27
28// insert child after sibling in parents children.
19swayc_t *add_sibling(swayc_t *sibling, swayc_t *child); 29swayc_t *add_sibling(swayc_t *sibling, swayc_t *child);
30
31// Replace child with new_child in parents children
32// new_child will inherit childs geometry, childs geometry will be reset
33// if parents focus is on child, it will be changed to new_child
20swayc_t *replace_child(swayc_t *child, swayc_t *new_child); 34swayc_t *replace_child(swayc_t *child, swayc_t *new_child);
35
36// Remove child from its parent, if focus is on child, focus will be changed to
37// a sibling, or to a floating window, or NULL
21swayc_t *remove_child(swayc_t *child); 38swayc_t *remove_child(swayc_t *child);
39
40// 2 containers are swapped, they inherit eachothers geometry and focus
22void swap_container(swayc_t *a, swayc_t *b); 41void swap_container(swayc_t *a, swayc_t *b);
23 42
24void move_container(swayc_t* container,swayc_t* root,enum movement_direction direction); 43void move_container(swayc_t* container,swayc_t* root,enum movement_direction direction);