diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-17 19:03:52 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-27 18:50:09 -0400 |
commit | 3ba57fccd1f0c66b9cbf3d70e73776b11c405ee8 (patch) | |
tree | 0c5425a344082361e2d1d968df125ad4cf77a1cf /include | |
parent | f29d8b55aec7c19fd12b81b39e6806d6b996fadc (diff) |
Wire up layer surface resources to stubs
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_layer_shell.h | 50 | ||||
-rw-r--r-- | include/wlr/types/wlr_xdg_shell.h | 2 |
2 files changed, 51 insertions, 1 deletions
diff --git a/include/wlr/types/wlr_layer_shell.h b/include/wlr/types/wlr_layer_shell.h index fbea1334..33bda351 100644 --- a/include/wlr/types/wlr_layer_shell.h +++ b/include/wlr/types/wlr_layer_shell.h @@ -1,5 +1,11 @@ #ifndef WLR_TYPES_WLR_LAYER_SHELL_H #define WLR_TYPES_WLR_LAYER_SHELL_H +#include <stdbool.h> +#include <stdint.h> +#include <wayland-server.h> +#include <wlr/types/wlr_box.h> +#include <wlr/types/wlr_surface.h> +#include "wlr-layer-shell-unstable-v1-protocol.h" struct wlr_layer_shell { struct wl_global *wl_global; @@ -23,6 +29,50 @@ struct wlr_layer_client { struct wl_list link; // wlr_layer_shell::clients }; +struct wlr_layer_surface_state { + uint32_t anchor; + uint32_t exclusive_zone; + struct { + uint32_t top, right, bottom, left; + } margin; +}; + +struct wlr_layer_surface_configure { + struct wl_list link; // wlr_layer_surface::configure_list + uint32_t serial; + struct wlr_layer_surface_state *state; +}; + +struct wlr_layer_surface { + struct wlr_surface *surface; + struct wlr_layer_client *client; + struct wl_resource *resource; + struct wl_list link; // wlr_layer_client:surfaces + + const char *namespace; + enum zwlr_layer_shell_v1_layer layer; + + bool added, configured, mapped; + uint32_t configure_serial; + struct wl_event_source *configure_idle; + uint32_t configure_next_serial; + struct wl_list configure_list; + + struct wlr_layer_surface_state next; // client protocol requests + struct wlr_layer_surface_state pending; // our configure requests + struct wlr_layer_surface_state current; + + struct wl_listener surface_destroy_listener; + + struct { + struct wl_signal destroy; + struct wl_signal map; + struct wl_signal unmap; + } events; + + void *data; +}; + struct wlr_layer_shell *wlr_layer_shell_create(struct wl_display *display); void wlr_layer_shell_destroy(struct wlr_layer_shell *layer_shell); diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index a5cd3d54..18596462 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -79,7 +79,7 @@ struct wlr_xdg_toplevel { bool added; struct wlr_xdg_toplevel_state next; // client protocol requests - struct wlr_xdg_toplevel_state pending; // user configure requests + struct wlr_xdg_toplevel_state pending; // our configure requests struct wlr_xdg_toplevel_state current; char *title; |