1 /* Generated by wayland-scanner 1.22.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
11 extern "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 */
44 struct wl_surface;
45 struct zwp_idle_inhibit_manager_v1;
46 struct zwp_idle_inhibitor_v1;
47
48 #ifndef ZWP_IDLE_INHIBIT_MANAGER_V1_INTERFACE
49 #define ZWP_IDLE_INHIBIT_MANAGER_V1_INTERFACE
50 /**
51 * @page page_iface_zwp_idle_inhibit_manager_v1 zwp_idle_inhibit_manager_v1
52 * @section page_iface_zwp_idle_inhibit_manager_v1_desc Description
53 *
54 * This interface permits inhibiting the idle behavior such as screen
55 * blanking, locking, and screensaving. The client binds the idle manager
56 * globally, then creates idle-inhibitor objects for each surface.
57 *
58 * Warning! The protocol described in this file is experimental and
59 * backward incompatible changes may be made. Backward compatible changes
60 * may be added together with the corresponding interface version bump.
61 * Backward incompatible changes are done by bumping the version number in
62 * the protocol and interface names and resetting the interface version.
63 * Once the protocol is to be declared stable, the 'z' prefix and the
64 * version number in the protocol and interface names are removed and the
65 * interface version number is reset.
66 * @section page_iface_zwp_idle_inhibit_manager_v1_api API
67 * See @ref iface_zwp_idle_inhibit_manager_v1.
68 */
69 /**
70 * @defgroup iface_zwp_idle_inhibit_manager_v1 The zwp_idle_inhibit_manager_v1 interface
71 *
72 * This interface permits inhibiting the idle behavior such as screen
73 * blanking, locking, and screensaving. The client binds the idle manager
74 * globally, then creates idle-inhibitor objects for each surface.
75 *
76 * Warning! The protocol described in this file is experimental and
77 * backward incompatible changes may be made. Backward compatible changes
78 * may be added together with the corresponding interface version bump.
79 * Backward incompatible changes are done by bumping the version number in
80 * the protocol and interface names and resetting the interface version.
81 * Once the protocol is to be declared stable, the 'z' prefix and the
82 * version number in the protocol and interface names are removed and the
83 * interface version number is reset.
84 */
85 extern const struct wl_interface zwp_idle_inhibit_manager_v1_interface;
86 #endif
87 #ifndef ZWP_IDLE_INHIBITOR_V1_INTERFACE
88 #define ZWP_IDLE_INHIBITOR_V1_INTERFACE
89 /**
90 * @page page_iface_zwp_idle_inhibitor_v1 zwp_idle_inhibitor_v1
91 * @section page_iface_zwp_idle_inhibitor_v1_desc Description
92 *
93 * An idle inhibitor prevents the output that the associated surface is
94 * visible on from being set to a state where it is not visually usable due
95 * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
96 * save, etc.) Any screensaver processes are also blocked from displaying.
97 *
98 * If the surface is destroyed, unmapped, becomes occluded, loses
99 * visibility, or otherwise becomes not visually relevant for the user, the
100 * idle inhibitor will not be honored by the compositor; if the surface
101 * subsequently regains visibility the inhibitor takes effect once again.
102 * Likewise, the inhibitor isn't honored if the system was already idled at
103 * the time the inhibitor was established, although if the system later
104 * de-idles and re-idles the inhibitor will take effect.
105 * @section page_iface_zwp_idle_inhibitor_v1_api API
106 * See @ref iface_zwp_idle_inhibitor_v1.
107 */
108 /**
109 * @defgroup iface_zwp_idle_inhibitor_v1 The zwp_idle_inhibitor_v1 interface
110 *
111 * An idle inhibitor prevents the output that the associated surface is
112 * visible on from being set to a state where it is not visually usable due
113 * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
114 * save, etc.) Any screensaver processes are also blocked from displaying.
115 *
116 * If the surface is destroyed, unmapped, becomes occluded, loses
117 * visibility, or otherwise becomes not visually relevant for the user, the
118 * idle inhibitor will not be honored by the compositor; if the surface
119 * subsequently regains visibility the inhibitor takes effect once again.
120 * Likewise, the inhibitor isn't honored if the system was already idled at
121 * the time the inhibitor was established, although if the system later
122 * de-idles and re-idles the inhibitor will take effect.
123 */
124 extern const struct wl_interface zwp_idle_inhibitor_v1_interface;
125 #endif
126
127 #define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY 0
128 #define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR 1
129
130
131 /**
132 * @ingroup iface_zwp_idle_inhibit_manager_v1
133 */
134 #define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY_SINCE_VERSION 1
135 /**
136 * @ingroup iface_zwp_idle_inhibit_manager_v1
137 */
138 #define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR_SINCE_VERSION 1
139
140 /** @ingroup iface_zwp_idle_inhibit_manager_v1 */
141 static inline void
zwp_idle_inhibit_manager_v1_set_user_data(struct zwp_idle_inhibit_manager_v1 * zwp_idle_inhibit_manager_v1,void * user_data)142 zwp_idle_inhibit_manager_v1_set_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, void *user_data)
143 {
144 wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1, user_data);
145 }
146
147 /** @ingroup iface_zwp_idle_inhibit_manager_v1 */
148 static inline void *
zwp_idle_inhibit_manager_v1_get_user_data(struct zwp_idle_inhibit_manager_v1 * zwp_idle_inhibit_manager_v1)149 zwp_idle_inhibit_manager_v1_get_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
150 {
151 return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
152 }
153
154 static inline uint32_t
zwp_idle_inhibit_manager_v1_get_version(struct zwp_idle_inhibit_manager_v1 * zwp_idle_inhibit_manager_v1)155 zwp_idle_inhibit_manager_v1_get_version(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
156 {
157 return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
158 }
159
160 /**
161 * @ingroup iface_zwp_idle_inhibit_manager_v1
162 *
163 * Destroy the inhibit manager.
164 */
165 static inline void
zwp_idle_inhibit_manager_v1_destroy(struct zwp_idle_inhibit_manager_v1 * zwp_idle_inhibit_manager_v1)166 zwp_idle_inhibit_manager_v1_destroy(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
167 {
168 wl_proxy_marshal_flags((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
169 ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1), WL_MARSHAL_FLAG_DESTROY);
170 }
171
172 /**
173 * @ingroup iface_zwp_idle_inhibit_manager_v1
174 *
175 * Create a new inhibitor object associated with the given surface.
176 */
177 static inline struct zwp_idle_inhibitor_v1 *
zwp_idle_inhibit_manager_v1_create_inhibitor(struct zwp_idle_inhibit_manager_v1 * zwp_idle_inhibit_manager_v1,struct wl_surface * surface)178 zwp_idle_inhibit_manager_v1_create_inhibitor(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, struct wl_surface *surface)
179 {
180 struct wl_proxy *id;
181
182 id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
183 ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR, &zwp_idle_inhibitor_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1), 0, NULL, surface);
184
185 return (struct zwp_idle_inhibitor_v1 *) id;
186 }
187
188 #define ZWP_IDLE_INHIBITOR_V1_DESTROY 0
189
190
191 /**
192 * @ingroup iface_zwp_idle_inhibitor_v1
193 */
194 #define ZWP_IDLE_INHIBITOR_V1_DESTROY_SINCE_VERSION 1
195
196 /** @ingroup iface_zwp_idle_inhibitor_v1 */
197 static inline void
zwp_idle_inhibitor_v1_set_user_data(struct zwp_idle_inhibitor_v1 * zwp_idle_inhibitor_v1,void * user_data)198 zwp_idle_inhibitor_v1_set_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1, void *user_data)
199 {
200 wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1, user_data);
201 }
202
203 /** @ingroup iface_zwp_idle_inhibitor_v1 */
204 static inline void *
zwp_idle_inhibitor_v1_get_user_data(struct zwp_idle_inhibitor_v1 * zwp_idle_inhibitor_v1)205 zwp_idle_inhibitor_v1_get_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
206 {
207 return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1);
208 }
209
210 static inline uint32_t
zwp_idle_inhibitor_v1_get_version(struct zwp_idle_inhibitor_v1 * zwp_idle_inhibitor_v1)211 zwp_idle_inhibitor_v1_get_version(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
212 {
213 return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibitor_v1);
214 }
215
216 /**
217 * @ingroup iface_zwp_idle_inhibitor_v1
218 *
219 * Remove the inhibitor effect from the associated wl_surface.
220 */
221 static inline void
zwp_idle_inhibitor_v1_destroy(struct zwp_idle_inhibitor_v1 * zwp_idle_inhibitor_v1)222 zwp_idle_inhibitor_v1_destroy(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
223 {
224 wl_proxy_marshal_flags((struct wl_proxy *) zwp_idle_inhibitor_v1,
225 ZWP_IDLE_INHIBITOR_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibitor_v1), WL_MARSHAL_FLAG_DESTROY);
226 }
227
228 #ifdef __cplusplus
229 }
230 #endif
231
232 #endif
233