aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2019-10-25 19:26:20 +0200
committerDrew DeVault <sir@cmpwn.com>2020-02-20 16:23:45 +0100
commitba14e196f67b1cc0d8c583b8a3c52669ac6d099e (patch)
tree20028dce7fa79b65845f26f8cae109ac6e41dec7 /include
parentdfc5a4028868749eab7c25a6378197c368be15ea (diff)
Implement wlr-output-power-management-v1
Co-authored-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_output_power_management_v1.h41
1 files changed, 41 insertions, 0 deletions
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 <wayland-server-core.h>
+#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