diff options
Diffstat (limited to 'include/sway/output.h')
-rw-r--r-- | include/sway/output.h | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index b6cda83c..80dcd37b 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <wayland-server.h> | 5 | #include <wayland-server.h> |
6 | #include <wlr/types/wlr_box.h> | 6 | #include <wlr/types/wlr_box.h> |
7 | #include <wlr/types/wlr_output.h> | 7 | #include <wlr/types/wlr_output.h> |
8 | #include "config.h" | ||
8 | #include "sway/tree/view.h" | 9 | #include "sway/tree/view.h" |
9 | 10 | ||
10 | struct sway_server; | 11 | struct sway_server; |
@@ -38,15 +39,9 @@ struct sway_output { | |||
38 | } events; | 39 | } events; |
39 | }; | 40 | }; |
40 | 41 | ||
41 | /** | 42 | typedef void (*sway_surface_iterator_func_t)(struct sway_output *output, |
42 | * Contains a surface's root geometry information. For instance, when rendering | 43 | struct wlr_surface *surface, struct wlr_box *box, float rotation, |
43 | * a popup, this will contain the parent view's position and size. | 44 | void *user_data); |
44 | */ | ||
45 | struct root_geometry { | ||
46 | double x, y; | ||
47 | int width, height; | ||
48 | float rotation; | ||
49 | }; | ||
50 | 45 | ||
51 | void output_damage_whole(struct sway_output *output); | 46 | void output_damage_whole(struct sway_output *output); |
52 | 47 | ||
@@ -65,36 +60,37 @@ struct sway_container *output_by_name(const char *name); | |||
65 | 60 | ||
66 | void output_enable(struct sway_output *output); | 61 | void output_enable(struct sway_output *output); |
67 | 62 | ||
68 | bool output_has_opaque_lockscreen(struct sway_output *output, | 63 | bool output_has_opaque_overlay_layer_surface(struct sway_output *output); |
69 | struct sway_seat *seat); | ||
70 | 64 | ||
71 | struct sway_container *output_get_active_workspace(struct sway_output *output); | 65 | struct sway_container *output_get_active_workspace(struct sway_output *output); |
72 | 66 | ||
73 | void output_render(struct sway_output *output, struct timespec *when, | 67 | void output_render(struct sway_output *output, struct timespec *when, |
74 | pixman_region32_t *damage); | 68 | pixman_region32_t *damage); |
75 | 69 | ||
76 | bool output_get_surface_box(struct root_geometry *geo, | 70 | void output_surface_for_each_surface(struct sway_output *output, |
77 | struct sway_output *output, struct wlr_surface *surface, int sx, int sy, | 71 | struct wlr_surface *surface, double ox, double oy, |
78 | struct wlr_box *surface_box); | 72 | sway_surface_iterator_func_t iterator, void *user_data); |
79 | 73 | ||
80 | void output_surface_for_each_surface(struct wlr_surface *surface, | 74 | void output_view_for_each_surface(struct sway_output *output, |
81 | double ox, double oy, struct root_geometry *geo, | 75 | struct sway_view *view, sway_surface_iterator_func_t iterator, |
82 | wlr_surface_iterator_func_t iterator, void *user_data); | 76 | void *user_data); |
83 | 77 | ||
84 | void output_view_for_each_surface(struct sway_view *view, | 78 | void output_view_for_each_popup(struct sway_output *output, |
85 | struct sway_output *output, struct root_geometry *geo, | 79 | struct sway_view *view, sway_surface_iterator_func_t iterator, |
86 | wlr_surface_iterator_func_t iterator, void *user_data); | 80 | void *user_data); |
87 | 81 | ||
88 | void output_layer_for_each_surface(struct wl_list *layer_surfaces, | 82 | void output_layer_for_each_surface(struct sway_output *output, |
89 | struct root_geometry *geo, wlr_surface_iterator_func_t iterator, | 83 | struct wl_list *layer_surfaces, sway_surface_iterator_func_t iterator, |
90 | void *user_data); | 84 | void *user_data); |
91 | 85 | ||
92 | void output_unmanaged_for_each_surface(struct wl_list *unmanaged, | 86 | #ifdef HAVE_XWAYLAND |
93 | struct sway_output *output, struct root_geometry *geo, | 87 | void output_unmanaged_for_each_surface(struct sway_output *output, |
94 | wlr_surface_iterator_func_t iterator, void *user_data); | 88 | struct wl_list *unmanaged, sway_surface_iterator_func_t iterator, |
89 | void *user_data); | ||
90 | #endif | ||
95 | 91 | ||
96 | void output_drag_icons_for_each_surface(struct wl_list *drag_icons, | 92 | void output_drag_icons_for_each_surface(struct sway_output *output, |
97 | struct sway_output *output, struct root_geometry *geo, | 93 | struct wl_list *drag_icons, sway_surface_iterator_func_t iterator, |
98 | wlr_surface_iterator_func_t iterator, void *user_data); | 94 | void *user_data); |
99 | 95 | ||
100 | #endif | 96 | #endif |