diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-11 14:41:18 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-11 14:41:18 -0500 |
commit | 1efd5f819f9986bf27e390f4988359388606cea0 (patch) | |
tree | bb417f4442a37e7d2baea13cc6e674a70978acf7 /include | |
parent | Initialize outputs from backend and add to tree (diff) | |
download | sway-1efd5f819f9986bf27e390f4988359388606cea0.tar.gz sway-1efd5f819f9986bf27e390f4988359388606cea0.tar.zst sway-1efd5f819f9986bf27e390f4988359388606cea0.zip |
Wire up output frame loop
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/container.h | 6 | ||||
-rw-r--r-- | include/sway/output.h | 13 | ||||
-rw-r--r-- | include/sway/server.h | 1 |
3 files changed, 16 insertions, 4 deletions
diff --git a/include/sway/container.h b/include/sway/container.h index f6aae7d1..09e29291 100644 --- a/include/sway/container.h +++ b/include/sway/container.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <wlc/wlc.h> | 4 | #include <wlc/wlc.h> |
5 | #include <wlr/types/wlr_output.h> | 5 | #include <wlr/types/wlr_output.h> |
6 | #include <stdint.h> | 6 | #include <stdint.h> |
7 | |||
8 | #include "list.h" | 7 | #include "list.h" |
9 | 8 | ||
10 | typedef struct sway_container swayc_t; | 9 | typedef struct sway_container swayc_t; |
@@ -76,7 +75,7 @@ struct sway_container { | |||
76 | wlc_handle handle; | 75 | wlc_handle handle; |
77 | 76 | ||
78 | union { | 77 | union { |
79 | struct wlr_output *output; | 78 | struct sway_output *output; |
80 | } _handle; | 79 | } _handle; |
81 | 80 | ||
82 | /** | 81 | /** |
@@ -186,10 +185,11 @@ enum visibility_mask { | |||
186 | VISIBLE = true | 185 | VISIBLE = true |
187 | } visible; | 186 | } visible; |
188 | 187 | ||
188 | struct sway_output; | ||
189 | /** | 189 | /** |
190 | * Allocates a new output container. | 190 | * Allocates a new output container. |
191 | */ | 191 | */ |
192 | swayc_t *new_output(struct wlr_output *wlr_output); | 192 | swayc_t *new_output(struct sway_output *sway_output); |
193 | /** | 193 | /** |
194 | * Allocates a new workspace container. | 194 | * Allocates a new workspace container. |
195 | */ | 195 | */ |
diff --git a/include/sway/output.h b/include/sway/output.h index e1bdd3f0..2a222238 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -1,9 +1,20 @@ | |||
1 | #ifndef _SWAY_OUTPUT_H | 1 | #ifndef _SWAY_OUTPUT_H |
2 | #define _SWAY_OUTPUT_H | 2 | #define _SWAY_OUTPUT_H |
3 | 3 | #include <time.h> | |
4 | #include <wayland-server.h> | ||
5 | #include <wlr/types/wlr_output.h> | ||
4 | #include "container.h" | 6 | #include "container.h" |
5 | #include "focus.h" | 7 | #include "focus.h" |
6 | 8 | ||
9 | struct sway_server; | ||
10 | |||
11 | struct sway_output { | ||
12 | struct wlr_output *wlr_output; | ||
13 | struct wl_listener frame; | ||
14 | struct sway_server *server; | ||
15 | struct timespec last_frame; | ||
16 | }; | ||
17 | |||
7 | // Position is absolute coordinates on the edge where the adjacent output | 18 | // Position is absolute coordinates on the edge where the adjacent output |
8 | // should be searched for. | 19 | // should be searched for. |
9 | swayc_t *output_by_name(const char* name, const struct wlc_point *abs_pos); | 20 | swayc_t *output_by_name(const char* name, const struct wlc_point *abs_pos); |
diff --git a/include/sway/server.h b/include/sway/server.h index f3e86bcb..043c1a33 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -33,5 +33,6 @@ void server_fini(struct sway_server *server); | |||
33 | void server_run(struct sway_server *server); | 33 | void server_run(struct sway_server *server); |
34 | 34 | ||
35 | void output_add_notify(struct wl_listener *listener, void *data); | 35 | void output_add_notify(struct wl_listener *listener, void *data); |
36 | void output_remove_notify(struct wl_listener *listener, void *data); | ||
36 | 37 | ||
37 | #endif | 38 | #endif |