1/* Generated by wayland-scanner 1.16.0 */
2
3#ifndef IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
4#define IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
5
6#include <stdint.h>
7#include <stddef.h>
8#include "wayland-client.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/**
15 * @page page_idle_inhibit_unstable_v1 The idle_inhibit_unstable_v1 protocol
16 * @section page_ifaces_idle_inhibit_unstable_v1 Interfaces
17 * - @subpage page_iface_zwp_idle_inhibit_manager_v1 - control behavior when display idles
18 * - @subpage page_iface_zwp_idle_inhibitor_v1 - context object for inhibiting idle behavior
19 * @section page_copyright_idle_inhibit_unstable_v1 Copyright
20 * <pre>
21 *
22 * Copyright © 2015 Samsung Electronics Co., Ltd
23 *
24 * Permission is hereby granted, free of charge, to any person obtaining a
25 * copy of this software and associated documentation files (the "Software"),
26 * to deal in the Software without restriction, including without limitation
27 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
28 * and/or sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following conditions:
30 *
31 * The above copyright notice and this permission notice (including the next
32 * paragraph) shall be included in all copies or substantial portions of the
33 * Software.
34 *
35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
38 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
41 * DEALINGS IN THE SOFTWARE.
42 * </pre>
43 */
44struct wl_surface;
45struct zwp_idle_inhibit_manager_v1;
46struct zwp_idle_inhibitor_v1;
47
48/**
49 * @page page_iface_zwp_idle_inhibit_manager_v1 zwp_idle_inhibit_manager_v1
50 * @section page_iface_zwp_idle_inhibit_manager_v1_desc Description
51 *
52 * This interface permits inhibiting the idle behavior such as screen
53 * blanking, locking, and screensaving. The client binds the idle manager
54 * globally, then creates idle-inhibitor objects for each surface.
55 *
56 * Warning! The protocol described in this file is experimental and
57 * backward incompatible changes may be made. Backward compatible changes
58 * may be added together with the corresponding interface version bump.
59 * Backward incompatible changes are done by bumping the version number in
60 * the protocol and interface names and resetting the interface version.
61 * Once the protocol is to be declared stable, the 'z' prefix and the
62 * version number in the protocol and interface names are removed and the
63 * interface version number is reset.
64 * @section page_iface_zwp_idle_inhibit_manager_v1_api API
65 * See @ref iface_zwp_idle_inhibit_manager_v1.
66 */
67/**
68 * @defgroup iface_zwp_idle_inhibit_manager_v1 The zwp_idle_inhibit_manager_v1 interface
69 *
70 * This interface permits inhibiting the idle behavior such as screen
71 * blanking, locking, and screensaving. The client binds the idle manager
72 * globally, then creates idle-inhibitor objects for each surface.
73 *
74 * Warning! The protocol described in this file is experimental and
75 * backward incompatible changes may be made. Backward compatible changes
76 * may be added together with the corresponding interface version bump.
77 * Backward incompatible changes are done by bumping the version number in
78 * the protocol and interface names and resetting the interface version.
79 * Once the protocol is to be declared stable, the 'z' prefix and the
80 * version number in the protocol and interface names are removed and the
81 * interface version number is reset.
82 */
83extern const struct wl_interface zwp_idle_inhibit_manager_v1_interface;
84/**
85 * @page page_iface_zwp_idle_inhibitor_v1 zwp_idle_inhibitor_v1
86 * @section page_iface_zwp_idle_inhibitor_v1_desc Description
87 *
88 * An idle inhibitor prevents the output that the associated surface is
89 * visible on from being set to a state where it is not visually usable due
90 * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
91 * save, etc.) Any screensaver processes are also blocked from displaying.
92 *
93 * If the surface is destroyed, unmapped, becomes occluded, loses
94 * visibility, or otherwise becomes not visually relevant for the user, the
95 * idle inhibitor will not be honored by the compositor; if the surface
96 * subsequently regains visibility the inhibitor takes effect once again.
97 * Likewise, the inhibitor isn't honored if the system was already idled at
98 * the time the inhibitor was established, although if the system later
99 * de-idles and re-idles the inhibitor will take effect.
100 * @section page_iface_zwp_idle_inhibitor_v1_api API
101 * See @ref iface_zwp_idle_inhibitor_v1.
102 */
103/**
104 * @defgroup iface_zwp_idle_inhibitor_v1 The zwp_idle_inhibitor_v1 interface
105 *
106 * An idle inhibitor prevents the output that the associated surface is
107 * visible on from being set to a state where it is not visually usable due
108 * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
109 * save, etc.) Any screensaver processes are also blocked from displaying.
110 *
111 * If the surface is destroyed, unmapped, becomes occluded, loses
112 * visibility, or otherwise becomes not visually relevant for the user, the
113 * idle inhibitor will not be honored by the compositor; if the surface
114 * subsequently regains visibility the inhibitor takes effect once again.
115 * Likewise, the inhibitor isn't honored if the system was already idled at
116 * the time the inhibitor was established, although if the system later
117 * de-idles and re-idles the inhibitor will take effect.
118 */
119extern const struct wl_interface zwp_idle_inhibitor_v1_interface;
120
121#define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY 0
122#define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR 1
123
124
125/**
126 * @ingroup iface_zwp_idle_inhibit_manager_v1
127 */
128#define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY_SINCE_VERSION 1
129/**
130 * @ingroup iface_zwp_idle_inhibit_manager_v1
131 */
132#define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR_SINCE_VERSION 1
133
134/** @ingroup iface_zwp_idle_inhibit_manager_v1 */
135static inline void
136zwp_idle_inhibit_manager_v1_set_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, void *user_data)
137{
138 wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1, user_data);
139}
140
141/** @ingroup iface_zwp_idle_inhibit_manager_v1 */
142static inline void *
143zwp_idle_inhibit_manager_v1_get_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
144{
145 return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
146}
147
148static inline uint32_t
149zwp_idle_inhibit_manager_v1_get_version(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
150{
151 return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
152}
153
154/**
155 * @ingroup iface_zwp_idle_inhibit_manager_v1
156 *
157 * Destroy the inhibit manager.
158 */
159static inline void
160zwp_idle_inhibit_manager_v1_destroy(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
161{
162 wl_proxy_marshal((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
163 ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY);
164
165 wl_proxy_destroy((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
166}
167
168/**
169 * @ingroup iface_zwp_idle_inhibit_manager_v1
170 *
171 * Create a new inhibitor object associated with the given surface.
172 */
173static inline struct zwp_idle_inhibitor_v1 *
174zwp_idle_inhibit_manager_v1_create_inhibitor(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, struct wl_surface *surface)
175{
176 struct wl_proxy *id;
177
178 id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
179 ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR, &zwp_idle_inhibitor_v1_interface, NULL, surface);
180
181 return (struct zwp_idle_inhibitor_v1 *) id;
182}
183
184#define ZWP_IDLE_INHIBITOR_V1_DESTROY 0
185
186
187/**
188 * @ingroup iface_zwp_idle_inhibitor_v1
189 */
190#define ZWP_IDLE_INHIBITOR_V1_DESTROY_SINCE_VERSION 1
191
192/** @ingroup iface_zwp_idle_inhibitor_v1 */
193static inline void
194zwp_idle_inhibitor_v1_set_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1, void *user_data)
195{
196 wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1, user_data);
197}
198
199/** @ingroup iface_zwp_idle_inhibitor_v1 */
200static inline void *
201zwp_idle_inhibitor_v1_get_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
202{
203 return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1);
204}
205
206static inline uint32_t
207zwp_idle_inhibitor_v1_get_version(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
208{
209 return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibitor_v1);
210}
211
212/**
213 * @ingroup iface_zwp_idle_inhibitor_v1
214 *
215 * Remove the inhibitor effect from the associated wl_surface.
216 */
217static inline void
218zwp_idle_inhibitor_v1_destroy(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
219{
220 wl_proxy_marshal((struct wl_proxy *) zwp_idle_inhibitor_v1,
221 ZWP_IDLE_INHIBITOR_V1_DESTROY);
222
223 wl_proxy_destroy((struct wl_proxy *) zwp_idle_inhibitor_v1);
224}
225
226#ifdef __cplusplus
227}
228#endif
229
230#endif
231