diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-30 00:02:29 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-30 00:04:04 -0400 |
commit | f26ecd9f58bb672fe107660ce9b37f4bf0777a8c (patch) | |
tree | 997658454de40db3f8b76b68d658efaf2b686188 /include/sway/tree/layout.h | |
parent | Early return from render functions if necessary (diff) | |
parent | Merge pull request #1654 from acrisci/refactor-2-electric-boogaloo (diff) | |
download | sway-f26ecd9f58bb672fe107660ce9b37f4bf0777a8c.tar.gz sway-f26ecd9f58bb672fe107660ce9b37f4bf0777a8c.tar.zst sway-f26ecd9f58bb672fe107660ce9b37f4bf0777a8c.zip |
Merge remote-tracking branch 'origin/wlroots' into swaybar-layers
Diffstat (limited to 'include/sway/tree/layout.h')
-rw-r--r-- | include/sway/tree/layout.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h new file mode 100644 index 00000000..ad52bdb0 --- /dev/null +++ b/include/sway/tree/layout.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef _SWAY_LAYOUT_H | ||
2 | #define _SWAY_LAYOUT_H | ||
3 | |||
4 | #include <wlr/types/wlr_output_layout.h> | ||
5 | #include "sway/tree/container.h" | ||
6 | |||
7 | enum movement_direction { | ||
8 | MOVE_LEFT, | ||
9 | MOVE_RIGHT, | ||
10 | MOVE_UP, | ||
11 | MOVE_DOWN, | ||
12 | MOVE_PARENT, | ||
13 | MOVE_CHILD, | ||
14 | MOVE_NEXT, | ||
15 | MOVE_PREV, | ||
16 | MOVE_FIRST | ||
17 | }; | ||
18 | |||
19 | struct sway_container; | ||
20 | |||
21 | struct sway_root { | ||
22 | struct wlr_output_layout *output_layout; | ||
23 | |||
24 | struct wl_listener output_layout_change; | ||
25 | |||
26 | struct wl_list unmanaged_views; // sway_view::unmanaged_view_link | ||
27 | |||
28 | struct { | ||
29 | struct wl_signal new_container; | ||
30 | } events; | ||
31 | }; | ||
32 | |||
33 | void layout_init(void); | ||
34 | |||
35 | void container_add_child(struct sway_container *parent, struct sway_container *child); | ||
36 | |||
37 | struct sway_container *container_add_sibling(struct sway_container *parent, | ||
38 | struct sway_container *child); | ||
39 | |||
40 | struct sway_container *container_remove_child(struct sway_container *child); | ||
41 | |||
42 | enum sway_container_layout container_get_default_layout(struct sway_container *output); | ||
43 | |||
44 | void container_sort_workspaces(struct sway_container *output); | ||
45 | |||
46 | void arrange_windows(struct sway_container *container, | ||
47 | double width, double height); | ||
48 | |||
49 | struct sway_container *container_get_in_direction(struct sway_container | ||
50 | *container, struct sway_seat *seat, enum movement_direction dir); | ||
51 | |||
52 | #endif | ||