From 0c8a64942e087038806b353949c900e03fd764a8 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 28 Mar 2018 15:47:22 -0400 Subject: Add initial layer shell skeleton --- include/sway/layers.h | 24 ++++++++++++++++++++++++ include/sway/output.h | 4 ++++ include/sway/server.h | 5 +++++ 3 files changed, 33 insertions(+) create mode 100644 include/sway/layers.h (limited to 'include') diff --git a/include/sway/layers.h b/include/sway/layers.h new file mode 100644 index 00000000..73fb7cb8 --- /dev/null +++ b/include/sway/layers.h @@ -0,0 +1,24 @@ +#ifndef _SWAY_LAYERS_H +#define _SWAY_LAYERS_H +#include +#include +#include +#include + +struct sway_layer_surface { + struct wlr_layer_surface *layer_surface; + struct wl_list link; + + struct wl_listener destroy; + struct wl_listener map; + struct wl_listener unmap; + struct wl_listener surface_commit; + struct wl_listener output_destroy; + struct wl_listener output_mode; + struct wl_listener output_transform; + + bool configured; + struct wlr_box geo; +}; + +#endif diff --git a/include/sway/output.h b/include/sway/output.h index 95d64705..769d44d0 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -2,6 +2,7 @@ #define _SWAY_OUTPUT_H #include #include +#include #include struct sway_server; @@ -13,6 +14,9 @@ struct sway_output { struct sway_server *server; struct timespec last_frame; + struct wl_list layers[4]; // sway_layer_surface::link + struct wlr_box usable_area; + struct wl_listener frame; struct wl_listener output_destroy; }; diff --git a/include/sway/server.h b/include/sway/server.h index eb7fa2ff..25eb64fe 100644 --- a/include/sway/server.h +++ b/include/sway/server.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include // TODO WLR: make Xwayland optional @@ -27,6 +28,9 @@ struct sway_server { struct wl_listener new_output; struct wl_listener output_frame; + struct wlr_layer_shell *layer_shell; + struct wl_listener layer_shell_surface; + struct wlr_xdg_shell_v6 *xdg_shell_v6; struct wl_listener xdg_shell_v6_surface; @@ -46,6 +50,7 @@ void server_run(struct sway_server *server); void handle_new_output(struct wl_listener *listener, void *data); +void handle_layer_shell_surface(struct wl_listener *listener, void *data); void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); void handle_xwayland_surface(struct wl_listener *listener, void *data); void handle_wl_shell_surface(struct wl_listener *listener, void *data); -- cgit v1.2.3