aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-16 07:33:23 -0500
committerLibravatar Tony Crisci <tony@dubstepdish.com>2017-12-16 07:33:23 -0500
commit9fa70ce426a78921fa61f25f8b30a73a2a7d9ad7 (patch)
tree823cce0da3f7e0dc21c26bef7e639e8370e29b3d /include
parentkeyboard cleanup (diff)
parentMerge pull request #1503 from emersion/output-config (diff)
downloadsway-9fa70ce426a78921fa61f25f8b30a73a2a7d9ad7.tar.gz
sway-9fa70ce426a78921fa61f25f8b30a73a2a7d9ad7.tar.zst
sway-9fa70ce426a78921fa61f25f8b30a73a2a7d9ad7.zip
Merge branch 'wlroots' into feature/input
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h6
-rw-r--r--include/sway/container.h5
-rw-r--r--include/sway/layout.h8
-rw-r--r--include/sway/output.h2
4 files changed, 16 insertions, 5 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 9bfda259..777fb5a8 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -102,8 +102,11 @@ struct output_config {
102 char *name; 102 char *name;
103 int enabled; 103 int enabled;
104 int width, height; 104 int width, height;
105 float refresh_rate;
105 int x, y; 106 int x, y;
106 int scale; 107 int scale;
108 int32_t transform;
109
107 char *background; 110 char *background;
108 char *background_option; 111 char *background_option;
109}; 112};
@@ -391,9 +394,8 @@ struct seat_attachment_config *seat_config_get_attachment(
391 struct seat_config *seat_config, char *identifier); 394 struct seat_config *seat_config, char *identifier);
392 395
393int output_name_cmp(const void *item, const void *data); 396int output_name_cmp(const void *item, const void *data);
397struct output_config *new_output_config();
394void merge_output_config(struct output_config *dst, struct output_config *src); 398void merge_output_config(struct output_config *dst, struct output_config *src);
395/** Sets up a WLC output handle based on a given output_config.
396 */
397void apply_output_config(struct output_config *oc, swayc_t *output); 399void apply_output_config(struct output_config *oc, swayc_t *output);
398void free_output_config(struct output_config *oc); 400void free_output_config(struct output_config *oc);
399 401
diff --git a/include/sway/container.h b/include/sway/container.h
index f13745ee..9a5e312b 100644
--- a/include/sway/container.h
+++ b/include/sway/container.h
@@ -58,9 +58,9 @@ enum swayc_border_types {
58 B_NORMAL, /**< Normal border with title bar */ 58 B_NORMAL, /**< Normal border with title bar */
59}; 59};
60 60
61struct sway_root;
61struct sway_output; 62struct sway_output;
62struct sway_view; 63struct sway_view;
63struct wlr_output_layout;
64 64
65/** 65/**
66 * Stores information about a container. 66 * Stores information about a container.
@@ -70,7 +70,7 @@ struct wlr_output_layout;
70struct sway_container { 70struct sway_container {
71 union { 71 union {
72 // TODO: Encapsulate state for other node types as well like C_CONTAINER 72 // TODO: Encapsulate state for other node types as well like C_CONTAINER
73 struct wlr_output_layout *output_layout; // C_ROOT 73 struct sway_root *sway_root; // C_ROOT
74 struct sway_output *sway_output; // C_OUTPUT 74 struct sway_output *sway_output; // C_OUTPUT
75 struct sway_view *sway_view; // C_VIEW 75 struct sway_view *sway_view; // C_VIEW
76 }; 76 };
@@ -137,6 +137,7 @@ swayc_t *new_output(struct sway_output *sway_output);
137swayc_t *new_workspace(swayc_t *output, const char *name); 137swayc_t *new_workspace(swayc_t *output, const char *name);
138swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view); 138swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
139 139
140swayc_t *destroy_output(swayc_t *output);
140swayc_t *destroy_view(swayc_t *view); 141swayc_t *destroy_view(swayc_t *view);
141 142
142swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); 143swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type);
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);
diff --git a/include/sway/output.h b/include/sway/output.h
index 895cb07d..7ca02d7b 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -12,8 +12,8 @@ struct sway_output {
12 struct sway_container *swayc; 12 struct sway_container *swayc;
13 struct sway_server *server; 13 struct sway_server *server;
14 struct timespec last_frame; 14 struct timespec last_frame;
15
15 struct wl_listener frame; 16 struct wl_listener frame;
16 struct wl_listener resolution;
17}; 17};
18 18
19#endif 19#endif