From 1efd5f819f9986bf27e390f4988359388606cea0 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 11 Nov 2017 14:41:18 -0500 Subject: Wire up output frame loop --- include/sway/container.h | 6 +++--- include/sway/output.h | 13 ++++++++++++- include/sway/server.h | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) (limited to 'include') 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 @@ #include #include #include - #include "list.h" typedef struct sway_container swayc_t; @@ -76,7 +75,7 @@ struct sway_container { wlc_handle handle; union { - struct wlr_output *output; + struct sway_output *output; } _handle; /** @@ -186,10 +185,11 @@ enum visibility_mask { VISIBLE = true } visible; +struct sway_output; /** * Allocates a new output container. */ -swayc_t *new_output(struct wlr_output *wlr_output); +swayc_t *new_output(struct sway_output *sway_output); /** * Allocates a new workspace container. */ 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 @@ #ifndef _SWAY_OUTPUT_H #define _SWAY_OUTPUT_H - +#include +#include +#include #include "container.h" #include "focus.h" +struct sway_server; + +struct sway_output { + struct wlr_output *wlr_output; + struct wl_listener frame; + struct sway_server *server; + struct timespec last_frame; +}; + // Position is absolute coordinates on the edge where the adjacent output // should be searched for. 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); void server_run(struct sway_server *server); void output_add_notify(struct wl_listener *listener, void *data); +void output_remove_notify(struct wl_listener *listener, void *data); #endif -- cgit v1.2.3