Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / widget / gtk / wayland / xdg-dbus-annotation-v1-client-protocol.h
blobfe5567cf8e01f6c83c42736cdf9db1b8c5e34671
1 /* Generated by wayland-scanner 1.19.0 */
3 #ifndef XDG_DBUS_ANNOTATION_V1_CLIENT_PROTOCOL_H
4 #define XDG_DBUS_ANNOTATION_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_xdg_dbus_annotation_v1 The xdg_dbus_annotation_v1 protocol
16 * Wayland protocol for associating DBus objects with toplevels
18 * @section page_desc_xdg_dbus_annotation_v1 Description
20 * This description provides a high-level overview of the interplay between
21 * the interfaces defined in this protocol. For details, see the protocol
22 * specification.
24 * The dbus_annotation_manager allows a client to request the creation of an
25 * annotation object associated with an wl_surface or itself. The annotation
26 * object allows a client to notify the compositor of a DBus object associated
27 * with itself.
29 * Clients should request the creation of an dbus_annotation object when they
30 * create a DBus object associated with an wl_surface or themselves, and should
31 * release the object when they destroy a DBus object associated with their
32 * wl_surface or themselves.
34 * Clients should only own at most one dbus_annotation object with a given name
35 * for each of their wl_surface objects or themselves. A protocol error will be
36 * raised if a client requests more than one dbus_annotation object for an
37 * wl_surface or themselves with a given name.
39 * @section page_ifaces_xdg_dbus_annotation_v1 Interfaces
40 * - @subpage page_iface_xdg_dbus_annotation_manager_v1 - controller object for
41 * registering dbus objects associated with wl_surfaces or clients
42 * - @subpage page_iface_xdg_dbus_annotation_v1 - controller object for
43 * associating dbus objects with an wl_surface
44 * @section page_copyright_xdg_dbus_annotation_v1 Copyright
45 * <pre>
47 * Copyright © 2017 David Edmundson
48 * Copyrihgt © 2023 Janet Blackquill
50 * Permission is hereby granted, free of charge, to any person obtaining a
51 * copy of this software and associated documentation files (the "Software"),
52 * to deal in the Software without restriction, including without limitation
53 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
54 * and/or sell copies of the Software, and to permit persons to whom the
55 * Software is furnished to do so, subject to the following conditions:
57 * The above copyright notice and this permission notice (including the next
58 * paragraph) shall be included in all copies or substantial portions of the
59 * Software.
61 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
64 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
66 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
67 * DEALINGS IN THE SOFTWARE.
68 * </pre>
70 struct wl_surface;
71 struct xdg_dbus_annotation_manager_v1;
72 struct xdg_dbus_annotation_v1;
74 #ifndef XDG_DBUS_ANNOTATION_MANAGER_V1_INTERFACE
75 # define XDG_DBUS_ANNOTATION_MANAGER_V1_INTERFACE
76 /**
77 * @page page_iface_xdg_dbus_annotation_manager_v1
78 * xdg_dbus_annotation_manager_v1
79 * @section page_iface_xdg_dbus_annotation_manager_v1_desc Description
81 * An object that provides access to the creation of dbus_annotation objects.
82 * @section page_iface_xdg_dbus_annotation_manager_v1_api API
83 * See @ref iface_xdg_dbus_annotation_manager_v1.
85 /**
86 * @defgroup iface_xdg_dbus_annotation_manager_v1 The
87 * xdg_dbus_annotation_manager_v1 interface
89 * An object that provides access to the creation of dbus_annotation objects.
91 extern const struct wl_interface xdg_dbus_annotation_manager_v1_interface;
92 #endif
93 #ifndef XDG_DBUS_ANNOTATION_V1_INTERFACE
94 # define XDG_DBUS_ANNOTATION_V1_INTERFACE
95 /**
96 * @page page_iface_xdg_dbus_annotation_v1 xdg_dbus_annotation_v1
97 * @section page_iface_xdg_dbus_annotation_v1_desc Description
99 * An object that provides access to clients to notify the compositor of
100 * associated DBus objects for an wl_surface.
102 * If not applicable, clients should remove this object.
103 * @section page_iface_xdg_dbus_annotation_v1_api API
104 * See @ref iface_xdg_dbus_annotation_v1.
107 * @defgroup iface_xdg_dbus_annotation_v1 The xdg_dbus_annotation_v1 interface
109 * An object that provides access to clients to notify the compositor of
110 * associated DBus objects for an wl_surface.
112 * If not applicable, clients should remove this object.
114 extern const struct wl_interface xdg_dbus_annotation_v1_interface;
115 #endif
117 #ifndef XDG_DBUS_ANNOTATION_MANAGER_V1_ERROR_ENUM
118 # define XDG_DBUS_ANNOTATION_MANAGER_V1_ERROR_ENUM
119 enum xdg_dbus_annotation_manager_v1_error {
121 * given wl_surface or client already has a dbus_annotation with the same
122 * interface
124 XDG_DBUS_ANNOTATION_MANAGER_V1_ERROR_ALREADY_ANNOTATED = 0,
126 * given wl_surface is invalid
128 XDG_DBUS_ANNOTATION_MANAGER_V1_ERROR_BAD_TARGET = 1,
130 #endif /* XDG_DBUS_ANNOTATION_MANAGER_V1_ERROR_ENUM */
132 #define XDG_DBUS_ANNOTATION_MANAGER_V1_DESTROY 0
133 #define XDG_DBUS_ANNOTATION_MANAGER_V1_CREATE_CLIENT 1
134 #define XDG_DBUS_ANNOTATION_MANAGER_V1_CREATE_SURFACE 2
137 * @ingroup iface_xdg_dbus_annotation_manager_v1
139 #define XDG_DBUS_ANNOTATION_MANAGER_V1_DESTROY_SINCE_VERSION 1
141 * @ingroup iface_xdg_dbus_annotation_manager_v1
143 #define XDG_DBUS_ANNOTATION_MANAGER_V1_CREATE_CLIENT_SINCE_VERSION 1
145 * @ingroup iface_xdg_dbus_annotation_manager_v1
147 #define XDG_DBUS_ANNOTATION_MANAGER_V1_CREATE_SURFACE_SINCE_VERSION 1
149 /** @ingroup iface_xdg_dbus_annotation_manager_v1 */
150 static inline void xdg_dbus_annotation_manager_v1_set_user_data(
151 struct xdg_dbus_annotation_manager_v1* xdg_dbus_annotation_manager_v1,
152 void* user_data) {
153 wl_proxy_set_user_data((struct wl_proxy*)xdg_dbus_annotation_manager_v1,
154 user_data);
157 /** @ingroup iface_xdg_dbus_annotation_manager_v1 */
158 static inline void* xdg_dbus_annotation_manager_v1_get_user_data(
159 struct xdg_dbus_annotation_manager_v1* xdg_dbus_annotation_manager_v1) {
160 return wl_proxy_get_user_data(
161 (struct wl_proxy*)xdg_dbus_annotation_manager_v1);
164 static inline uint32_t xdg_dbus_annotation_manager_v1_get_version(
165 struct xdg_dbus_annotation_manager_v1* xdg_dbus_annotation_manager_v1) {
166 return wl_proxy_get_version((struct wl_proxy*)xdg_dbus_annotation_manager_v1);
170 * @ingroup iface_xdg_dbus_annotation_manager_v1
172 * Destroy the xdg_dbus_annotation_manager object. xdg_dbus_annotation objects
173 * created from this object remain valid and should be destroyed separately.
175 static inline void xdg_dbus_annotation_manager_v1_destroy(
176 struct xdg_dbus_annotation_manager_v1* xdg_dbus_annotation_manager_v1) {
177 wl_proxy_marshal((struct wl_proxy*)xdg_dbus_annotation_manager_v1,
178 XDG_DBUS_ANNOTATION_MANAGER_V1_DESTROY);
180 wl_proxy_destroy((struct wl_proxy*)xdg_dbus_annotation_manager_v1);
184 * @ingroup iface_xdg_dbus_annotation_manager_v1
186 * The interface other DBus clients can expect the object specified by the
187 * annotation to implement.
189 static inline struct xdg_dbus_annotation_v1*
190 xdg_dbus_annotation_manager_v1_create_client(
191 struct xdg_dbus_annotation_manager_v1* xdg_dbus_annotation_manager_v1,
192 const char* interface) {
193 struct wl_proxy* id;
195 id = wl_proxy_marshal_constructor(
196 (struct wl_proxy*)xdg_dbus_annotation_manager_v1,
197 XDG_DBUS_ANNOTATION_MANAGER_V1_CREATE_CLIENT,
198 &xdg_dbus_annotation_v1_interface, interface, NULL);
200 return (struct xdg_dbus_annotation_v1*)id;
204 * @ingroup iface_xdg_dbus_annotation_manager_v1
206 * The surface to associate the annotation with
208 static inline struct xdg_dbus_annotation_v1*
209 xdg_dbus_annotation_manager_v1_create_surface(
210 struct xdg_dbus_annotation_manager_v1* xdg_dbus_annotation_manager_v1,
211 const char* interface, struct wl_surface* toplevel) {
212 struct wl_proxy* id;
214 id = wl_proxy_marshal_constructor(
215 (struct wl_proxy*)xdg_dbus_annotation_manager_v1,
216 XDG_DBUS_ANNOTATION_MANAGER_V1_CREATE_SURFACE,
217 &xdg_dbus_annotation_v1_interface, interface, NULL, toplevel);
219 return (struct xdg_dbus_annotation_v1*)id;
222 #define XDG_DBUS_ANNOTATION_V1_DESTROY 0
223 #define XDG_DBUS_ANNOTATION_V1_SET_ADDRESS 1
226 * @ingroup iface_xdg_dbus_annotation_v1
228 #define XDG_DBUS_ANNOTATION_V1_DESTROY_SINCE_VERSION 1
230 * @ingroup iface_xdg_dbus_annotation_v1
232 #define XDG_DBUS_ANNOTATION_V1_SET_ADDRESS_SINCE_VERSION 1
234 /** @ingroup iface_xdg_dbus_annotation_v1 */
235 static inline void xdg_dbus_annotation_v1_set_user_data(
236 struct xdg_dbus_annotation_v1* xdg_dbus_annotation_v1, void* user_data) {
237 wl_proxy_set_user_data((struct wl_proxy*)xdg_dbus_annotation_v1, user_data);
240 /** @ingroup iface_xdg_dbus_annotation_v1 */
241 static inline void* xdg_dbus_annotation_v1_get_user_data(
242 struct xdg_dbus_annotation_v1* xdg_dbus_annotation_v1) {
243 return wl_proxy_get_user_data((struct wl_proxy*)xdg_dbus_annotation_v1);
246 static inline uint32_t xdg_dbus_annotation_v1_get_version(
247 struct xdg_dbus_annotation_v1* xdg_dbus_annotation_v1) {
248 return wl_proxy_get_version((struct wl_proxy*)xdg_dbus_annotation_v1);
252 * @ingroup iface_xdg_dbus_annotation_v1
254 static inline void xdg_dbus_annotation_v1_destroy(
255 struct xdg_dbus_annotation_v1* xdg_dbus_annotation_v1) {
256 wl_proxy_marshal((struct wl_proxy*)xdg_dbus_annotation_v1,
257 XDG_DBUS_ANNOTATION_V1_DESTROY);
259 wl_proxy_destroy((struct wl_proxy*)xdg_dbus_annotation_v1);
263 * @ingroup iface_xdg_dbus_annotation_v1
265 * Set or update the service name and object path corresponding to the
266 * DBus object. The DBus object should be registered on the session bus
267 * before sending this request.
269 * Strings should be formatted in Latin-1 matching the relevant DBus
270 * specifications.
272 static inline void xdg_dbus_annotation_v1_set_address(
273 struct xdg_dbus_annotation_v1* xdg_dbus_annotation_v1,
274 const char* service_name, const char* object_path) {
275 wl_proxy_marshal((struct wl_proxy*)xdg_dbus_annotation_v1,
276 XDG_DBUS_ANNOTATION_V1_SET_ADDRESS, service_name,
277 object_path);
280 #ifdef __cplusplus
282 #endif
284 #endif