diff options
Diffstat (limited to 'include/sway/layers.h')
-rw-r--r-- | include/sway/layers.h | 52 |
1 files changed, 19 insertions, 33 deletions
diff --git a/include/sway/layers.h b/include/sway/layers.h index 82ac5368..fd6384e0 100644 --- a/include/sway/layers.h +++ b/include/sway/layers.h | |||
@@ -1,58 +1,44 @@ | |||
1 | #ifndef _SWAY_LAYERS_H | 1 | #ifndef _SWAY_LAYERS_H |
2 | #define _SWAY_LAYERS_H | 2 | #define _SWAY_LAYERS_H |
3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
4 | #include <wlr/types/wlr_surface.h> | 4 | #include <wlr/types/wlr_compositor.h> |
5 | #include <wlr/types/wlr_layer_shell_v1.h> | 5 | #include <wlr/types/wlr_layer_shell_v1.h> |
6 | 6 | #include "sway/tree/view.h" | |
7 | enum layer_parent { | ||
8 | LAYER_PARENT_LAYER, | ||
9 | LAYER_PARENT_POPUP, | ||
10 | }; | ||
11 | 7 | ||
12 | struct sway_layer_surface { | 8 | struct sway_layer_surface { |
13 | struct wlr_layer_surface_v1 *layer_surface; | ||
14 | struct wl_list link; | ||
15 | |||
16 | struct wl_listener destroy; | ||
17 | struct wl_listener map; | 9 | struct wl_listener map; |
18 | struct wl_listener unmap; | 10 | struct wl_listener unmap; |
19 | struct wl_listener surface_commit; | 11 | struct wl_listener surface_commit; |
20 | struct wl_listener output_destroy; | 12 | struct wl_listener output_destroy; |
13 | struct wl_listener node_destroy; | ||
21 | struct wl_listener new_popup; | 14 | struct wl_listener new_popup; |
22 | struct wl_listener new_subsurface; | ||
23 | 15 | ||
24 | struct wlr_box geo; | 16 | bool mapped; |
25 | enum zwlr_layer_shell_v1_layer layer; | 17 | |
18 | struct wlr_scene_tree *popups; | ||
19 | struct sway_popup_desc desc; | ||
20 | |||
21 | struct sway_output *output; | ||
22 | struct wlr_scene_layer_surface_v1 *scene; | ||
23 | struct wlr_scene_tree *tree; | ||
24 | struct wlr_layer_surface_v1 *layer_surface; | ||
26 | }; | 25 | }; |
27 | 26 | ||
28 | struct sway_layer_popup { | 27 | struct sway_layer_popup { |
29 | struct wlr_xdg_popup *wlr_popup; | 28 | struct wlr_xdg_popup *wlr_popup; |
30 | enum layer_parent parent_type; | 29 | struct wlr_scene_tree *scene; |
31 | union { | 30 | struct sway_layer_surface *toplevel; |
32 | struct sway_layer_surface *parent_layer; | ||
33 | struct sway_layer_popup *parent_popup; | ||
34 | }; | ||
35 | struct wl_listener map; | ||
36 | struct wl_listener unmap; | ||
37 | struct wl_listener destroy; | ||
38 | struct wl_listener commit; | ||
39 | struct wl_listener new_popup; | ||
40 | }; | ||
41 | 31 | ||
42 | struct sway_layer_subsurface { | ||
43 | struct wlr_subsurface *wlr_subsurface; | ||
44 | struct sway_layer_surface *layer_surface; | ||
45 | |||
46 | struct wl_listener map; | ||
47 | struct wl_listener unmap; | ||
48 | struct wl_listener destroy; | 32 | struct wl_listener destroy; |
33 | struct wl_listener new_popup; | ||
49 | struct wl_listener commit; | 34 | struct wl_listener commit; |
50 | }; | 35 | }; |
51 | 36 | ||
52 | struct sway_output; | 37 | struct sway_output; |
53 | void arrange_layers(struct sway_output *output); | ||
54 | 38 | ||
55 | struct sway_layer_surface *layer_from_wlr_layer_surface_v1( | 39 | struct wlr_layer_surface_v1 *toplevel_layer_surface_from_surface( |
56 | struct wlr_layer_surface_v1 *layer_surface); | 40 | struct wlr_surface *surface); |
41 | |||
42 | void arrange_layers(struct sway_output *output); | ||
57 | 43 | ||
58 | #endif | 44 | #endif |