aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-12-13 20:36:06 -0500
committerGitHub <noreply@github.com>2017-12-13 20:36:06 -0500
commit1aab9ae3e74d15e2c346acbab2ef2def59db72eb (patch)
tree6a3479fef295dc673c6bcdaac822f44523f94d8e /include/sway
parentab36a5a4d73ddb026c9b1d416c1e7388d63958ea (diff)
parentcba592b3d2c516cab9f4e8325037dfdf6e30cb9a (diff)
Merge pull request #1503 from emersion/output-config
Add output config
Diffstat (limited to 'include/sway')
-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 7de85ab7..139d7800 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -80,8 +80,11 @@ struct output_config {
char *name;
int enabled;
int width, height;
+ float refresh_rate;
int x, y;
int scale;
+ int32_t transform;
+
char *background;
char *background_option;
};
@@ -360,9 +363,8 @@ void apply_input_config(struct input_config *ic, struct libinput_device *dev);
void free_input_config(struct input_config *ic);
int output_name_cmp(const void *item, const void *data);
+struct output_config *new_output_config();
void merge_output_config(struct output_config *dst, struct output_config *src);
-/** Sets up a WLC output handle based on a given output_config.
- */
void apply_output_config(struct output_config *oc, swayc_t *output);
void free_output_config(struct output_config *oc);
diff --git a/include/sway/container.h b/include/sway/container.h
index 08a98ed9..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
};
@@ -132,6 +132,7 @@ swayc_t *new_output(struct sway_output *sway_output);
swayc_t *new_workspace(swayc_t *output, const char *name);
swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
+swayc_t *destroy_output(swayc_t *output);
swayc_t *destroy_view(swayc_t *view);
swayc_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 @@
#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);
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 {
struct sway_container *swayc;
struct sway_server *server;
struct timespec last_frame;
+
struct wl_listener frame;
- struct wl_listener resolution;
};
#endif