2018-02-07 11:10:49 +01:00
|
|
|
#ifndef WLR_TYPES_WLR_IDLE_INHIBIT_V1_H
|
|
|
|
#define WLR_TYPES_WLR_IDLE_INHIBIT_V1_H
|
|
|
|
|
|
|
|
#include <wayland-server.h>
|
|
|
|
|
2018-02-23 13:18:05 +01:00
|
|
|
/* 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).
|
|
|
|
*/
|
|
|
|
|
2018-02-20 13:41:10 +01:00
|
|
|
struct wlr_idle_inhibit_manager_v1 {
|
2018-07-08 20:21:31 +02:00
|
|
|
struct wl_list resources; // wl_resource_get_link
|
2018-02-20 13:41:10 +01:00
|
|
|
struct wl_list inhibitors; // wlr_idle_inhibit_inhibitor_v1::link
|
2018-02-07 11:10:49 +01:00
|
|
|
struct wl_global *global;
|
|
|
|
|
|
|
|
struct wl_listener display_destroy;
|
2018-02-20 13:41:10 +01:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal new_inhibitor;
|
|
|
|
} events;
|
2018-06-28 06:34:16 +02:00
|
|
|
|
|
|
|
void *data;
|
2018-02-07 11:10:49 +01:00
|
|
|
};
|
|
|
|
|
2018-02-21 16:17:59 +01:00
|
|
|
struct wlr_idle_inhibitor_v1 {
|
2018-02-07 11:10:49 +01:00
|
|
|
struct wlr_surface *surface;
|
|
|
|
struct wl_resource *resource;
|
|
|
|
struct wl_listener surface_destroy;
|
|
|
|
|
2018-02-20 13:41:10 +01:00
|
|
|
struct wl_list link; // wlr_idle_inhibit_manager_v1::inhibitors;
|
2018-02-07 11:10:49 +01:00
|
|
|
|
2018-02-20 13:41:10 +01:00
|
|
|
struct {
|
|
|
|
struct wl_signal destroy;
|
|
|
|
} events;
|
2018-06-28 06:34:16 +02:00
|
|
|
|
|
|
|
void *data;
|
2018-02-07 11:10:49 +01:00
|
|
|
};
|
|
|
|
|
2018-02-20 13:41:10 +01:00
|
|
|
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);
|
2018-02-07 11:10:49 +01:00
|
|
|
|
|
|
|
#endif
|