aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-12-12 20:02:01 +0100
committeremersion <contact@emersion.fr>2017-12-12 20:02:01 +0100
commitc7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4 (patch)
tree8118cd69c22ec2545572a8e443080907f087d401 /include
parentf3d880b0ec9eae246ef0d70dd67bed6d7488ab33 (diff)
downloadsway-c7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4.tar.xz
Listen to output layout change
Diffstat (limited to 'include')
-rw-r--r--include/sway/container.h4
-rw-r--r--include/sway/layout.h8
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 {
B_NORMAL, /**< Normal border with title bar */
};
+struct sway_root;
struct sway_output;
struct sway_view;
-struct wlr_output_layout;
/**
* Stores information about a container.
@@ -69,7 +69,7 @@ struct wlr_output_layout;
struct sway_container {
union {
// TODO: Encapsulate state for other node types as well like C_CONTAINER
- struct wlr_output_layout *output_layout; // C_ROOT
+ struct sway_root *sway_root; // C_ROOT
struct sway_output *sway_output; // C_OUTPUT
struct sway_view *sway_view; // C_VIEW
};
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 @@
#ifndef _SWAY_LAYOUT_H
#define _SWAY_LAYOUT_H
+#include <wlr/types/wlr_output_layout.h>
+
struct sway_container;
+struct sway_root {
+ struct wlr_output_layout *output_layout;
+
+ struct wl_listener output_layout_change;
+};
+
void init_layout(void);
void add_child(struct sway_container *parent, struct sway_container *child);
struct sway_container *remove_child(struct sway_container *child);