diff options
Diffstat (limited to 'include/sway/layout.h')
-rw-r--r-- | include/sway/layout.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/sway/layout.h b/include/sway/layout.h new file mode 100644 index 00000000..e82c4442 --- /dev/null +++ b/include/sway/layout.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef _SWAY_LAYOUT_H | ||
2 | #define _SWAY_LAYOUT_H | ||
3 | |||
4 | #include <wlr/types/wlr_output_layout.h> | ||
5 | #include "sway/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 init_layout(void); | ||
34 | void add_child(struct sway_container *parent, struct sway_container *child); | ||
35 | swayc_t *add_sibling(swayc_t *parent, swayc_t *child); | ||
36 | struct sway_container *remove_child(struct sway_container *child); | ||
37 | enum swayc_layouts default_layout(struct sway_container *output); | ||
38 | void sort_workspaces(struct sway_container *output); | ||
39 | void arrange_windows(struct sway_container *container, double width, double height); | ||
40 | swayc_t *get_swayc_in_direction(swayc_t *container, | ||
41 | struct sway_seat *seat, enum movement_direction dir); | ||
42 | |||
43 | #endif | ||