diff options
author | emersion <contact@emersion.fr> | 2017-12-12 20:02:01 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-12-12 20:02:01 +0100 |
commit | c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4 (patch) | |
tree | 8118cd69c22ec2545572a8e443080907f087d401 /include | |
parent | Add scale and transform events to sway_output (diff) | |
download | sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.tar.gz sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.tar.zst sway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.zip |
Listen to output layout change
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/container.h | 4 | ||||
-rw-r--r-- | include/sway/layout.h | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/include/sway/container.h b/include/sway/container.h index e3f84fc6..b15e0428 100644 --- a/include/sway/container.h +++ b/include/sway/container.h | |||
@@ -57,9 +57,9 @@ enum swayc_border_types { | |||
57 | B_NORMAL, /**< Normal border with title bar */ | 57 | B_NORMAL, /**< Normal border with title bar */ |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct sway_root; | ||
60 | struct sway_output; | 61 | struct sway_output; |
61 | struct sway_view; | 62 | struct sway_view; |
62 | struct wlr_output_layout; | ||
63 | 63 | ||
64 | /** | 64 | /** |
65 | * Stores information about a container. | 65 | * Stores information about a container. |
@@ -69,7 +69,7 @@ struct wlr_output_layout; | |||
69 | struct sway_container { | 69 | struct sway_container { |
70 | union { | 70 | union { |
71 | // TODO: Encapsulate state for other node types as well like C_CONTAINER | 71 | // TODO: Encapsulate state for other node types as well like C_CONTAINER |
72 | struct wlr_output_layout *output_layout; // C_ROOT | 72 | struct sway_root *sway_root; // C_ROOT |
73 | struct sway_output *sway_output; // C_OUTPUT | 73 | struct sway_output *sway_output; // C_OUTPUT |
74 | struct sway_view *sway_view; // C_VIEW | 74 | struct sway_view *sway_view; // C_VIEW |
75 | }; | 75 | }; |
diff --git a/include/sway/layout.h b/include/sway/layout.h index f3b62b05..bfd96a02 100644 --- a/include/sway/layout.h +++ b/include/sway/layout.h | |||
@@ -1,8 +1,16 @@ | |||
1 | #ifndef _SWAY_LAYOUT_H | 1 | #ifndef _SWAY_LAYOUT_H |
2 | #define _SWAY_LAYOUT_H | 2 | #define _SWAY_LAYOUT_H |
3 | 3 | ||
4 | #include <wlr/types/wlr_output_layout.h> | ||
5 | |||
4 | struct sway_container; | 6 | struct sway_container; |
5 | 7 | ||
8 | struct sway_root { | ||
9 | struct wlr_output_layout *output_layout; | ||
10 | |||
11 | struct wl_listener output_layout_change; | ||
12 | }; | ||
13 | |||
6 | void init_layout(void); | 14 | void init_layout(void); |
7 | void add_child(struct sway_container *parent, struct sway_container *child); | 15 | void add_child(struct sway_container *parent, struct sway_container *child); |
8 | struct sway_container *remove_child(struct sway_container *child); | 16 | struct sway_container *remove_child(struct sway_container *child); |