output.h (1256B)
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_OUTPUT_H 9 #define KIWMI_DESKTOP_OUTPUT_H 10 11 #include <wayland-server.h> 12 #include <wlr/util/box.h> 13 14 struct kiwmi_output { 15 struct wl_list link; 16 struct kiwmi_desktop *desktop; 17 struct wlr_output *wlr_output; 18 struct wl_listener frame; 19 struct wl_listener commit; 20 struct wl_listener destroy; 21 struct wl_listener mode; 22 23 struct wl_list layers[4]; // struct kiwmi_layer_surface::link 24 struct wlr_box usable_area; 25 26 int damaged; 27 28 struct { 29 struct wl_signal render; 30 struct wl_signal destroy; 31 struct wl_signal resize; 32 struct wl_signal usable_area_change; 33 } events; 34 }; 35 36 struct kiwmi_render_data { 37 struct wlr_output *output; 38 double output_lx; 39 double output_ly; 40 struct wlr_renderer *renderer; 41 struct timespec *when; 42 void *data; 43 }; 44 45 void new_output_notify(struct wl_listener *listener, void *data); 46 47 void output_damage(struct kiwmi_output *output); 48 49 #endif /* KIWMI_DESKTOP_OUTPUT_H */