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