From ba14e196f67b1cc0d8c583b8a3c52669ac6d099e Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 25 Oct 2019 19:26:20 +0200 Subject: Implement wlr-output-power-management-v1 Co-authored-by: Simon Ser --- include/wlr/types/wlr_output_power_management_v1.h | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 include/wlr/types/wlr_output_power_management_v1.h (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_output_power_management_v1.h b/include/wlr/types/wlr_output_power_management_v1.h new file mode 100644 index 00000000..2ceb8600 --- /dev/null +++ b/include/wlr/types/wlr_output_power_management_v1.h @@ -0,0 +1,41 @@ +#ifndef WLR_TYPES_WLR_OUTPUT_POWER_MANAGEMENT_V1_H +#define WLR_TYPES_WLR_OUTPUT_POWER_MANAGEMENT_V1_H + +#include +#include "wlr-output-power-management-unstable-v1-protocol.h" + +struct wlr_output_power_manager_v1 { + struct wl_global *global; + struct wl_list output_powers; // wlr_output_power_v1::link + + struct wl_listener display_destroy; + + struct { + struct wl_signal set_mode; // wlr_output_power_v1_set_mode_event + struct wl_signal destroy; + } events; + + void *data; +}; + +struct wlr_output_power_v1 { + struct wl_resource *resource; + struct wlr_output *output; + struct wlr_output_power_manager_v1 *manager; + struct wl_list link; + + struct wl_listener output_destroy_listener; + struct wl_listener output_enable_listener; + + void *data; +}; + +struct wlr_output_power_v1_set_mode_event { + struct wlr_output *output; + enum zwlr_output_power_v1_mode mode; +}; + +struct wlr_output_power_manager_v1 *wlr_output_power_manager_v1_create( + struct wl_display *display); + +#endif -- cgit v1.2.3