aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-02-24 10:15:18 -0500
committerGitHub <noreply@github.com>2018-02-24 10:15:18 -0500
commitb7b86a959188d5b2e47a2a4182c6041b022d68c2 (patch)
treebc1c72a6d2c026ec741809f5e7f1a9fb2229c28d /include/wlr
parent94d53d53f9a13e76bf35e072de2947be3c2f7125 (diff)
parent67285c1d5758526688f0023e27c4a6b24730a2fa (diff)
Merge pull request #641 from Ongy/idle-inhibit
Add idle-inhibit implementation
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_idle_inhibit_v1.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_idle_inhibit_v1.h b/include/wlr/types/wlr_idle_inhibit_v1.h
new file mode 100644
index 00000000..a777ff43
--- /dev/null
+++ b/include/wlr/types/wlr_idle_inhibit_v1.h
@@ -0,0 +1,45 @@
+#ifndef WLR_TYPES_WLR_IDLE_INHIBIT_V1_H
+#define WLR_TYPES_WLR_IDLE_INHIBIT_V1_H
+
+#include <wayland-server.h>
+
+/* This interface permits clients to inhibit the idle behavior such as
+ * screenblanking, locking, and screensaving.
+ *
+ * This allows clients to ensure they stay visible instead of being hidden by
+ * power-saving.
+ *
+ * Inhibitors are created for surfaces. They should only be in effect, while
+ * this surface is visible.
+ * The effect could also be limited to outputs it is displayed on (e.g.
+ * dimm/dpms off outputs, except the one a video is displayed on).
+ */
+
+struct wlr_idle_inhibit_manager_v1 {
+ struct wl_list wl_resources; // wl_resource_get_link
+ struct wl_list inhibitors; // wlr_idle_inhibit_inhibitor_v1::link
+ struct wl_global *global;
+
+ struct wl_listener display_destroy;
+
+ struct {
+ struct wl_signal new_inhibitor;
+ } events;
+};
+
+struct wlr_idle_inhibitor_v1 {
+ struct wlr_surface *surface;
+ struct wl_resource *resource;
+ struct wl_listener surface_destroy;
+
+ struct wl_list link; // wlr_idle_inhibit_manager_v1::inhibitors;
+
+ struct {
+ struct wl_signal destroy;
+ } events;
+};
+
+struct wlr_idle_inhibit_manager_v1 *wlr_idle_inhibit_v1_create(struct wl_display *display);
+void wlr_idle_inhibit_v1_destroy(struct wlr_idle_inhibit_manager_v1 *idle_inhibit);
+
+#endif