aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_idle_notify_v1.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_idle_notify_v1.h b/include/wlr/types/wlr_idle_notify_v1.h
new file mode 100644
index 00000000..7bc11cb7
--- /dev/null
+++ b/include/wlr/types/wlr_idle_notify_v1.h
@@ -0,0 +1,44 @@
+/*
+ * This an unstable interface of wlroots. No guarantees are made regarding the
+ * future consistency of this API.
+ */
+#ifndef WLR_USE_UNSTABLE
+#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
+#endif
+
+#ifndef WLR_TYPES_WLR_IDLE_NOTIFY_H
+#define WLR_TYPES_WLR_IDLE_NOTIFY_H
+
+#include <wayland-server-core.h>
+
+struct wlr_seat;
+
+/**
+ * An idle notifier, implementing the ext-idle-notify-v1 protocol.
+ */
+struct wlr_idle_notifier_v1;
+
+/**
+ * Create the ext_idle_notifier_v1 global.
+ */
+struct wlr_idle_notifier_v1 *wlr_idle_notifier_v1_create(struct wl_display *display);
+
+/**
+ * Inhibit idle.
+ *
+ * Compositors should call this function when the idle state is disabled, e.g.
+ * because a visible client is using the idle-inhibit protocol.
+ */
+void wlr_idle_notifier_v1_set_inhibited(struct wlr_idle_notifier_v1 *notifier,
+ bool inhibited);
+
+/**
+ * Notify for user activity on a seat.
+ *
+ * Compositors should call this function whenever an input event is triggered
+ * on a seat.
+ */
+void wlr_idle_notifier_v1_notify_activity(struct wlr_idle_notifier_v1 *notifier,
+ struct wlr_seat *seat);
+
+#endif