diff options
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 @@ #include <wlc/wlc.h> #include <wlr/types/wlr_output.h> #include <stdint.h> - #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 <time.h> +#include <wayland-server.h> +#include <wlr/types/wlr_output.h> #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 |