Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / gtk / wayland / idle-inhibit-unstable-v1-client-protocol.h
blob3ae2303b3cb3152adc43dc161b1158c5fe0f2e8f
1 /* Generated by wayland-scanner 1.16.0 */
3 #ifndef IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
6 #include <stdint.h>
7 #include <stddef.h>
8 #include "wayland-client.h"
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
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
18 * display idles
19 * - @subpage page_iface_zwp_idle_inhibitor_v1 - context object for inhibiting
20 * idle behavior
21 * @section page_copyright_idle_inhibit_unstable_v1 Copyright
22 * <pre>
24 * Copyright © 2015 Samsung Electronics Co., Ltd
26 * Permission is hereby granted, free of charge, to any person obtaining a
27 * copy of this software and associated documentation files (the "Software"),
28 * to deal in the Software without restriction, including without limitation
29 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
30 * and/or sell copies of the Software, and to permit persons to whom the
31 * Software is furnished to do so, subject to the following conditions:
33 * The above copyright notice and this permission notice (including the next
34 * paragraph) shall be included in all copies or substantial portions of the
35 * Software.
37 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
40 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
43 * DEALINGS IN THE SOFTWARE.
44 * </pre>
46 struct wl_surface;
47 struct zwp_idle_inhibit_manager_v1;
48 struct zwp_idle_inhibitor_v1;
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
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.
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.
69 /**
70 * @defgroup iface_zwp_idle_inhibit_manager_v1 The zwp_idle_inhibit_manager_v1
71 * interface
73 * This interface permits inhibiting the idle behavior such as screen
74 * blanking, locking, and screensaving. The client binds the idle manager
75 * globally, then creates idle-inhibitor objects for each surface.
77 * Warning! The protocol described in this file is experimental and
78 * backward incompatible changes may be made. Backward compatible changes
79 * may be added together with the corresponding interface version bump.
80 * Backward incompatible changes are done by bumping the version number in
81 * the protocol and interface names and resetting the interface version.
82 * Once the protocol is to be declared stable, the 'z' prefix and the
83 * version number in the protocol and interface names are removed and the
84 * interface version number is reset.
86 extern const struct wl_interface zwp_idle_inhibit_manager_v1_interface;
87 /**
88 * @page page_iface_zwp_idle_inhibitor_v1 zwp_idle_inhibitor_v1
89 * @section page_iface_zwp_idle_inhibitor_v1_desc Description
91 * An idle inhibitor prevents the output that the associated surface is
92 * visible on from being set to a state where it is not visually usable due
93 * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
94 * save, etc.) Any screensaver processes are also blocked from displaying.
96 * If the surface is destroyed, unmapped, becomes occluded, loses
97 * visibility, or otherwise becomes not visually relevant for the user, the
98 * idle inhibitor will not be honored by the compositor; if the surface
99 * subsequently regains visibility the inhibitor takes effect once again.
100 * Likewise, the inhibitor isn't honored if the system was already idled at
101 * the time the inhibitor was established, although if the system later
102 * de-idles and re-idles the inhibitor will take effect.
103 * @section page_iface_zwp_idle_inhibitor_v1_api API
104 * See @ref iface_zwp_idle_inhibitor_v1.
107 * @defgroup iface_zwp_idle_inhibitor_v1 The zwp_idle_inhibitor_v1 interface
109 * An idle inhibitor prevents the output that the associated surface is
110 * visible on from being set to a state where it is not visually usable due
111 * to lack of user interaction (e.g. blanked, dimmed, locked, set to power
112 * save, etc.) Any screensaver processes are also blocked from displaying.
114 * If the surface is destroyed, unmapped, becomes occluded, loses
115 * visibility, or otherwise becomes not visually relevant for the user, the
116 * idle inhibitor will not be honored by the compositor; if the surface
117 * subsequently regains visibility the inhibitor takes effect once again.
118 * Likewise, the inhibitor isn't honored if the system was already idled at
119 * the time the inhibitor was established, although if the system later
120 * de-idles and re-idles the inhibitor will take effect.
122 extern const struct wl_interface zwp_idle_inhibitor_v1_interface;
124 #define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY 0
125 #define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR 1
128 * @ingroup iface_zwp_idle_inhibit_manager_v1
130 #define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY_SINCE_VERSION 1
132 * @ingroup iface_zwp_idle_inhibit_manager_v1
134 #define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR_SINCE_VERSION 1
136 /** @ingroup iface_zwp_idle_inhibit_manager_v1 */
137 static inline void zwp_idle_inhibit_manager_v1_set_user_data(
138 struct zwp_idle_inhibit_manager_v1* zwp_idle_inhibit_manager_v1,
139 void* user_data) {
140 wl_proxy_set_user_data((struct wl_proxy*)zwp_idle_inhibit_manager_v1,
141 user_data);
144 /** @ingroup iface_zwp_idle_inhibit_manager_v1 */
145 static inline void* zwp_idle_inhibit_manager_v1_get_user_data(
146 struct zwp_idle_inhibit_manager_v1* zwp_idle_inhibit_manager_v1) {
147 return wl_proxy_get_user_data((struct wl_proxy*)zwp_idle_inhibit_manager_v1);
150 static inline uint32_t zwp_idle_inhibit_manager_v1_get_version(
151 struct zwp_idle_inhibit_manager_v1* zwp_idle_inhibit_manager_v1) {
152 return wl_proxy_get_version((struct wl_proxy*)zwp_idle_inhibit_manager_v1);
156 * @ingroup iface_zwp_idle_inhibit_manager_v1
158 * Destroy the inhibit manager.
160 static inline void zwp_idle_inhibit_manager_v1_destroy(
161 struct zwp_idle_inhibit_manager_v1* zwp_idle_inhibit_manager_v1) {
162 wl_proxy_marshal((struct wl_proxy*)zwp_idle_inhibit_manager_v1,
163 ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY);
165 wl_proxy_destroy((struct wl_proxy*)zwp_idle_inhibit_manager_v1);
169 * @ingroup iface_zwp_idle_inhibit_manager_v1
171 * Create a new inhibitor object associated with the given surface.
173 static inline struct zwp_idle_inhibitor_v1*
174 zwp_idle_inhibit_manager_v1_create_inhibitor(
175 struct zwp_idle_inhibit_manager_v1* zwp_idle_inhibit_manager_v1,
176 struct wl_surface* surface) {
177 struct wl_proxy* id;
179 id = wl_proxy_marshal_constructor(
180 (struct wl_proxy*)zwp_idle_inhibit_manager_v1,
181 ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR,
182 &zwp_idle_inhibitor_v1_interface, NULL, surface);
184 return (struct zwp_idle_inhibitor_v1*)id;
187 #define ZWP_IDLE_INHIBITOR_V1_DESTROY 0
190 * @ingroup iface_zwp_idle_inhibitor_v1
192 #define ZWP_IDLE_INHIBITOR_V1_DESTROY_SINCE_VERSION 1
194 /** @ingroup iface_zwp_idle_inhibitor_v1 */
195 static inline void zwp_idle_inhibitor_v1_set_user_data(
196 struct zwp_idle_inhibitor_v1* zwp_idle_inhibitor_v1, void* user_data) {
197 wl_proxy_set_user_data((struct wl_proxy*)zwp_idle_inhibitor_v1, user_data);
200 /** @ingroup iface_zwp_idle_inhibitor_v1 */
201 static inline void* zwp_idle_inhibitor_v1_get_user_data(
202 struct zwp_idle_inhibitor_v1* zwp_idle_inhibitor_v1) {
203 return wl_proxy_get_user_data((struct wl_proxy*)zwp_idle_inhibitor_v1);
206 static inline uint32_t zwp_idle_inhibitor_v1_get_version(
207 struct zwp_idle_inhibitor_v1* zwp_idle_inhibitor_v1) {
208 return wl_proxy_get_version((struct wl_proxy*)zwp_idle_inhibitor_v1);
212 * @ingroup iface_zwp_idle_inhibitor_v1
214 * Remove the inhibitor effect from the associated wl_surface.
216 static inline void zwp_idle_inhibitor_v1_destroy(
217 struct zwp_idle_inhibitor_v1* zwp_idle_inhibitor_v1) {
218 wl_proxy_marshal((struct wl_proxy*)zwp_idle_inhibitor_v1,
219 ZWP_IDLE_INHIBITOR_V1_DESTROY);
221 wl_proxy_destroy((struct wl_proxy*)zwp_idle_inhibitor_v1);
224 #ifdef __cplusplus
226 #endif
228 #endif