layer_shell.h (1109B)
1 /* Copyright (c), Niclas Meyer <niclas@countingsort.com> 2 * 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 5 * You can obtain one at https://mozilla.org/MPL/2.0/. 6 */ 7 8 #ifndef KIWMI_DESKTOP_LAYER_SHELL_H 9 #define KIWMI_DESKTOP_LAYER_SHELL_H 10 11 #include <stdbool.h> 12 13 #include <wayland-server.h> 14 #include <wlr/types/wlr_surface.h> 15 #include <wlr/util/box.h> 16 17 #include "desktop/output.h" 18 19 struct kiwmi_layer { 20 struct wl_list link; 21 struct wlr_layer_surface_v1 *layer_surface; 22 uint32_t layer; 23 24 struct kiwmi_output *output; 25 26 struct wl_listener destroy; 27 struct wl_listener commit; 28 struct wl_listener map; 29 struct wl_listener unmap; 30 31 struct wlr_box geom; 32 }; 33 34 void arrange_layers(struct kiwmi_output *output); 35 36 struct kiwmi_layer *layer_at( 37 struct wl_list *layers, 38 struct wlr_surface **surface, 39 double ox, 40 double oy, 41 double *sx, 42 double *sy); 43 void layer_shell_new_surface_notify(struct wl_listener *listener, void *data); 44 45 #endif /* KIWMI_DESKTOP_LAYER_SHELL_H */