summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2017-12-12 20:02:01 +0100
committerLibravatar emersion <contact@emersion.fr>2017-12-12 20:02:01 +0100
commitc7abb77f2217cc4d5642ef1650f7fc75e1c1a9a4 (patch)
tree8118cd69c22ec2545572a8e443080907f087d401 /include
parentAdd scale and transform events to sway_output (diff)
downloadsway-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.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 {
57 B_NORMAL, /**< Normal border with title bar */ 57 B_NORMAL, /**< Normal border with title bar */
58}; 58};
59 59
60struct sway_root;
60struct sway_output; 61struct sway_output;
61struct sway_view; 62struct sway_view;
62struct 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;
69struct sway_container { 69struct 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
4struct sway_container; 6struct sway_container;
5 7
8struct sway_root {
9 struct wlr_output_layout *output_layout;
10
11 struct wl_listener output_layout_change;
12};
13
6void init_layout(void); 14void init_layout(void);
7void add_child(struct sway_container *parent, struct sway_container *child); 15void add_child(struct sway_container *parent, struct sway_container *child);
8struct sway_container *remove_child(struct sway_container *child); 16struct sway_container *remove_child(struct sway_container *child);