summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-01-18 09:54:49 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-01-18 13:04:47 -0600
commit5b25ff3281d072746b1414f4c9b8ab5a4b0fbd6a (patch)
treed5452718a6d06ec445a7bf91842624d75a98f134
parent50883f7a6f2feb93a5b1ad934aa211d2e65f64ee (diff)
ecore_wl2: Auto generate xdg v6 protocol
Mostly trivial, needed to update private header as we'd used a non-standard name for our generated copy.
-rw-r--r--.gitignore2
-rw-r--r--src/Makefile_Ecore_Wl2.am6
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h2
-rw-r--r--src/lib/ecore_wl2/zxdg-shell-client-protocol.h1744
-rw-r--r--src/lib/ecore_wl2/zxdg-shell-protocol.c162
5 files changed, 7 insertions, 1909 deletions
diff --git a/.gitignore b/.gitignore
index 91e6d8da..3bfc9f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,5 +83,7 @@ Session.vim
83/src/lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c 83/src/lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c
84/src/lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h 84/src/lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h
85/src/lib/ecore_wl2/xdg-shell-unstable-v5-protocol.c 85/src/lib/ecore_wl2/xdg-shell-unstable-v5-protocol.c
86/src/lib/ecore_wl2/xdg-shell-unstable-v6-client-protocol.h
87/src/lib/ecore_wl2/xdg-shell-unstable-v6-protocol.c
86/src/lib/ecore_wl2/session-recovery-client-protocol.h 88/src/lib/ecore_wl2/session-recovery-client-protocol.h
87/src/lib/ecore_wl2/session-recovery-protocol.c 89/src/lib/ecore_wl2/session-recovery-protocol.c
diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am
index 0e5d11a..1f1b17f 100644
--- a/src/Makefile_Ecore_Wl2.am
+++ b/src/Makefile_Ecore_Wl2.am
@@ -18,8 +18,8 @@ lib/ecore_wl2/www-protocol.h \
18lib/ecore_wl2/www-protocol.c \ 18lib/ecore_wl2/www-protocol.c \
19lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c \ 19lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c \
20lib/ecore_wl2/linux-dmabuf-unstable-v1-client-protocol.h \ 20lib/ecore_wl2/linux-dmabuf-unstable-v1-client-protocol.h \
21lib/ecore_wl2/zxdg-shell-client-protocol.h \ 21lib/ecore_wl2/xdg-shell-unstable-v6-client-protocol.h \
22lib/ecore_wl2/zxdg-shell-protocol.c \ 22lib/ecore_wl2/xdg-shell-unstable-v6-protocol.c \
23lib/ecore_wl2/ecore_wl2_seat.c \ 23lib/ecore_wl2/ecore_wl2_seat.c \
24lib/ecore_wl2/ecore_wl2_subsurf.c \ 24lib/ecore_wl2/ecore_wl2_subsurf.c \
25lib/ecore_wl2/ecore_wl2_dnd.c \ 25lib/ecore_wl2/ecore_wl2_dnd.c \
@@ -36,6 +36,8 @@ lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@
36lib_ecore_wl2_libecore_wl2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ 36lib_ecore_wl2_libecore_wl2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
37 37
38BUILT_SOURCES += \ 38BUILT_SOURCES += \
39 lib/ecore_wl2/xdg-shell-unstable-v6-client-protocol.h \
40 lib/ecore_wl2/xdg-shell-unstable-v6-protocol.c \
39 lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h \ 41 lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h \
40 lib/ecore_wl2/xdg-shell-unstable-v5-protocol.c \ 42 lib/ecore_wl2/xdg-shell-unstable-v5-protocol.c \
41 lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c \ 43 lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c \
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index c872aa2..57ecf1c 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -14,7 +14,7 @@
14 14
15# include "session-recovery-client-protocol.h" 15# include "session-recovery-client-protocol.h"
16 16
17# include "zxdg-shell-client-protocol.h" 17# include "xdg-shell-unstable-v6-client-protocol.h"
18 18
19extern int _ecore_wl2_log_dom; 19extern int _ecore_wl2_log_dom;
20extern Eina_Bool no_session_recovery; 20extern Eina_Bool no_session_recovery;
diff --git a/src/lib/ecore_wl2/zxdg-shell-client-protocol.h b/src/lib/ecore_wl2/zxdg-shell-client-protocol.h
deleted file mode 100644
index a105f82..0000000
--- a/src/lib/ecore_wl2/zxdg-shell-client-protocol.h
+++ /dev/null
@@ -1,1744 +0,0 @@
1/* Generated by wayland-scanner 1.12.0 */
2
3#ifndef XDG_SHELL_UNSTABLE_V6_CLIENT_PROTOCOL_H
4#define XDG_SHELL_UNSTABLE_V6_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_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol
16 * @section page_ifaces_xdg_shell_unstable_v6 Interfaces
17 * - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces
18 * - @subpage page_iface_zxdg_positioner_v6 - child surface positioner
19 * - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface
20 * - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface
21 * - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus
22 * @section page_copyright_xdg_shell_unstable_v6 Copyright
23 * <pre>
24 *
25 * Copyright © 2008-2013 Kristian Høgsberg
26 * Copyright © 2013 Rafael Antognolli
27 * Copyright © 2013 Jasper St. Pierre
28 * Copyright © 2010-2013 Intel Corporation
29 *
30 * Permission is hereby granted, free of charge, to any person obtaining a
31 * copy of this software and associated documentation files (the "Software"),
32 * to deal in the Software without restriction, including without limitation
33 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
34 * and/or sell copies of the Software, and to permit persons to whom the
35 * Software is furnished to do so, subject to the following conditions:
36 *
37 * The above copyright notice and this permission notice (including the next
38 * paragraph) shall be included in all copies or substantial portions of the
39 * Software.
40 *
41 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
44 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
47 * DEALINGS IN THE SOFTWARE.
48 * </pre>
49 */
50struct wl_output;
51struct wl_seat;
52struct wl_surface;
53struct zxdg_popup_v6;
54struct zxdg_positioner_v6;
55struct zxdg_shell_v6;
56struct zxdg_surface_v6;
57struct zxdg_toplevel_v6;
58
59/**
60 * @page page_iface_zxdg_shell_v6 zxdg_shell_v6
61 * @section page_iface_zxdg_shell_v6_desc Description
62 *
63 * xdg_shell allows clients to turn a wl_surface into a "real window"
64 * which can be dragged, resized, stacked, and moved around by the
65 * user. Everything about this interface is suited towards traditional
66 * desktop environments.
67 * @section page_iface_zxdg_shell_v6_api API
68 * See @ref iface_zxdg_shell_v6.
69 */
70/**
71 * @defgroup iface_zxdg_shell_v6 The zxdg_shell_v6 interface
72 *
73 * xdg_shell allows clients to turn a wl_surface into a "real window"
74 * which can be dragged, resized, stacked, and moved around by the
75 * user. Everything about this interface is suited towards traditional
76 * desktop environments.
77 */
78extern const struct wl_interface zxdg_shell_v6_interface;
79/**
80 * @page page_iface_zxdg_positioner_v6 zxdg_positioner_v6
81 * @section page_iface_zxdg_positioner_v6_desc Description
82 *
83 * The xdg_positioner provides a collection of rules for the placement of a
84 * child surface relative to a parent surface. Rules can be defined to ensure
85 * the child surface remains within the visible area's borders, and to
86 * specify how the child surface changes its position, such as sliding along
87 * an axis, or flipping around a rectangle.
88 *
89 * See the various requests for details about possible rules.
90 *
91 * At the time of the request, the compositor makes a copy of the rules
92 * specified by the xdg_positioner. Thus, after the request is complete the
93 * xdg_positioner object can be destroyed or reused; further changes to the
94 * object will have no effect on previous usages.
95 *
96 * For an xdg_positioner object to be considered complete, it must have a
97 * non-zero size set by set_size, and a non-zero anchor rectangle set by
98 * set_anchor_rect. Passing an incomplete xdg_positioner object when
99 * positioning a surface raises an error.
100 * @section page_iface_zxdg_positioner_v6_api API
101 * See @ref iface_zxdg_positioner_v6.
102 */
103/**
104 * @defgroup iface_zxdg_positioner_v6 The zxdg_positioner_v6 interface
105 *
106 * The xdg_positioner provides a collection of rules for the placement of a
107 * child surface relative to a parent surface. Rules can be defined to ensure
108 * the child surface remains within the visible area's borders, and to
109 * specify how the child surface changes its position, such as sliding along
110 * an axis, or flipping around a rectangle.
111 *
112 * See the various requests for details about possible rules.
113 *
114 * At the time of the request, the compositor makes a copy of the rules
115 * specified by the xdg_positioner. Thus, after the request is complete the
116 * xdg_positioner object can be destroyed or reused; further changes to the
117 * object will have no effect on previous usages.
118 *
119 * For an xdg_positioner object to be considered complete, it must have a
120 * non-zero size set by set_size, and a non-zero anchor rectangle set by
121 * set_anchor_rect. Passing an incomplete xdg_positioner object when
122 * positioning a surface raises an error.
123 */
124extern const struct wl_interface zxdg_positioner_v6_interface;
125/**
126 * @page page_iface_zxdg_surface_v6 zxdg_surface_v6
127 * @section page_iface_zxdg_surface_v6_desc Description
128 *
129 * An interface that may be implemented by a wl_surface, for
130 * implementations that provide a desktop-style user interface.
131 *
132 * It provides a base set of functionality required to construct user
133 * interface elements requiring management by the compositor, such as
134 * toplevel windows, menus, etc. The types of functionality are split into
135 * xdg_surface roles.
136 *
137 * Creating an xdg_surface does not set the role for a wl_surface. In order
138 * to map an xdg_surface, the client must create a role-specific object
139 * using, e.g., get_toplevel, get_popup. The wl_surface for any given
140 * xdg_surface can have at most one role, and may not be assigned any role
141 * not based on xdg_surface.
142 *
143 * A role must be assigned before any other requests are made to the
144 * xdg_surface object.
145 *
146 * The client must call wl_surface.commit on the corresponding wl_surface
147 * for the xdg_surface state to take effect.
148 *
149 * Creating an xdg_surface from a wl_surface which has a buffer attached or
150 * committed is a client error, and any attempts by a client to attach or
151 * manipulate a buffer prior to the first xdg_surface.configure call must
152 * also be treated as errors.
153 *
154 * For a surface to be mapped by the compositor, the following conditions
155 * must be met: (1) the client has assigned a xdg_surface based role to the
156 * surface, (2) the client has set and committed the xdg_surface state and
157 * the role dependent state to the surface and (3) the client has committed a
158 * buffer to the surface.
159 * @section page_iface_zxdg_surface_v6_api API
160 * See @ref iface_zxdg_surface_v6.
161 */
162/**
163 * @defgroup iface_zxdg_surface_v6 The zxdg_surface_v6 interface
164 *
165 * An interface that may be implemented by a wl_surface, for
166 * implementations that provide a desktop-style user interface.
167 *
168 * It provides a base set of functionality required to construct user
169 * interface elements requiring management by the compositor, such as
170 * toplevel windows, menus, etc. The types of functionality are split into
171 * xdg_surface roles.
172 *
173 * Creating an xdg_surface does not set the role for a wl_surface. In order
174 * to map an xdg_surface, the client must create a role-specific object
175 * using, e.g., get_toplevel, get_popup. The wl_surface for any given
176 * xdg_surface can have at most one role, and may not be assigned any role
177 * not based on xdg_surface.
178 *
179 * A role must be assigned before any other requests are made to the
180 * xdg_surface object.
181 *
182 * The client must call wl_surface.commit on the corresponding wl_surface
183 * for the xdg_surface state to take effect.
184 *
185 * Creating an xdg_surface from a wl_surface which has a buffer attached or
186 * committed is a client error, and any attempts by a client to attach or
187 * manipulate a buffer prior to the first xdg_surface.configure call must
188 * also be treated as errors.
189 *
190 * For a surface to be mapped by the compositor, the following conditions
191 * must be met: (1) the client has assigned a xdg_surface based role to the
192 * surface, (2) the client has set and committed the xdg_surface state and
193 * the role dependent state to the surface and (3) the client has committed a
194 * buffer to the surface.
195 */
196extern const struct wl_interface zxdg_surface_v6_interface;
197/**
198 * @page page_iface_zxdg_toplevel_v6 zxdg_toplevel_v6
199 * @section page_iface_zxdg_toplevel_v6_desc Description
200 *
201 * This interface defines an xdg_surface role which allows a surface to,
202 * among other things, set window-like properties such as maximize,
203 * fullscreen, and minimize, set application-specific metadata like title and
204 * id, and well as trigger user interactive operations such as interactive
205 * resize and move.
206 * @section page_iface_zxdg_toplevel_v6_api API
207 * See @ref iface_zxdg_toplevel_v6.
208 */
209/**
210 * @defgroup iface_zxdg_toplevel_v6 The zxdg_toplevel_v6 interface
211 *
212 * This interface defines an xdg_surface role which allows a surface to,
213 * among other things, set window-like properties such as maximize,
214 * fullscreen, and minimize, set application-specific metadata like title and
215 * id, and well as trigger user interactive operations such as interactive
216 * resize and move.
217 */
218extern const struct wl_interface zxdg_toplevel_v6_interface;
219/**
220 * @page page_iface_zxdg_popup_v6 zxdg_popup_v6
221 * @section page_iface_zxdg_popup_v6_desc Description
222 *
223 * A popup surface is a short-lived, temporary surface. It can be used to
224 * implement for example menus, popovers, tooltips and other similar user
225 * interface concepts.
226 *
227 * A popup can be made to take an explicit grab. See xdg_popup.grab for
228 * details.
229 *
230 * When the popup is dismissed, a popup_done event will be sent out, and at
231 * the same time the surface will be unmapped. See the xdg_popup.popup_done
232 * event for details.
233 *
234 * Explicitly destroying the xdg_popup object will also dismiss the popup and
235 * unmap the surface. Clients that want to dismiss the popup when another
236 * surface of their own is clicked should dismiss the popup using the destroy
237 * request.
238 *
239 * The parent surface must have either the xdg_toplevel or xdg_popup surface
240 * role.
241 *
242 * A newly created xdg_popup will be stacked on top of all previously created
243 * xdg_popup surfaces associated with the same xdg_toplevel.
244 *
245 * The parent of an xdg_popup must be mapped (see the xdg_surface
246 * description) before the xdg_popup itself.
247 *
248 * The x and y arguments passed when creating the popup object specify
249 * where the top left of the popup should be placed, relative to the
250 * local surface coordinates of the parent surface. See
251 * xdg_surface.get_popup.
252 *
253 * The client must call wl_surface.commit on the corresponding wl_surface
254 * for the xdg_popup state to take effect.
255 * @section page_iface_zxdg_popup_v6_api API
256 * See @ref iface_zxdg_popup_v6.
257 */
258/**
259 * @defgroup iface_zxdg_popup_v6 The zxdg_popup_v6 interface
260 *
261 * A popup surface is a short-lived, temporary surface. It can be used to
262 * implement for example menus, popovers, tooltips and other similar user
263 * interface concepts.
264 *
265 * A popup can be made to take an explicit grab. See xdg_popup.grab for
266 * details.
267 *
268 * When the popup is dismissed, a popup_done event will be sent out, and at
269 * the same time the surface will be unmapped. See the xdg_popup.popup_done
270 * event for details.
271 *
272 * Explicitly destroying the xdg_popup object will also dismiss the popup and
273 * unmap the surface. Clients that want to dismiss the popup when another
274 * surface of their own is clicked should dismiss the popup using the destroy
275 * request.
276 *
277 * The parent surface must have either the xdg_toplevel or xdg_popup surface
278 * role.
279 *
280 * A newly created xdg_popup will be stacked on top of all previously created
281 * xdg_popup surfaces associated with the same xdg_toplevel.
282 *
283 * The parent of an xdg_popup must be mapped (see the xdg_surface
284 * description) before the xdg_popup itself.
285 *
286 * The x and y arguments passed when creating the popup object specify
287 * where the top left of the popup should be placed, relative to the
288 * local surface coordinates of the parent surface. See
289 * xdg_surface.get_popup.
290 *
291 * The client must call wl_surface.commit on the corresponding wl_surface
292 * for the xdg_popup state to take effect.
293 */
294extern const struct wl_interface zxdg_popup_v6_interface;
295
296#ifndef ZXDG_SHELL_V6_ERROR_ENUM
297#define ZXDG_SHELL_V6_ERROR_ENUM
298enum zxdg_shell_v6_error {
299 /**
300 * given wl_surface has another role
301 */
302 ZXDG_SHELL_V6_ERROR_ROLE = 0,
303 /**
304 * xdg_shell was destroyed before children
305 */
306 ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES = 1,
307 /**
308 * the client tried to map or destroy a non-topmost popup
309 */
310 ZXDG_SHELL_V6_ERROR_NOT_THE_TOPMOST_POPUP = 2,
311 /**
312 * the client specified an invalid popup parent surface
313 */
314 ZXDG_SHELL_V6_ERROR_INVALID_POPUP_PARENT = 3,
315 /**
316 * the client provided an invalid surface state
317 */
318 ZXDG_SHELL_V6_ERROR_INVALID_SURFACE_STATE = 4,
319 /**
320 * the client provided an invalid positioner
321 */
322 ZXDG_SHELL_V6_ERROR_INVALID_POSITIONER = 5,
323};
324#endif /* ZXDG_SHELL_V6_ERROR_ENUM */
325
326/**
327 * @ingroup iface_zxdg_shell_v6
328 * @struct zxdg_shell_v6_listener
329 */
330struct zxdg_shell_v6_listener {
331 /**
332 * check if the client is alive
333 *
334 * The ping event asks the client if it's still alive. Pass the
335 * serial specified in the event back to the compositor by sending
336 * a "pong" request back with the specified serial. See
337 * xdg_shell.ping.
338 *
339 * Compositors can use this to determine if the client is still
340 * alive. It's unspecified what will happen if the client doesn't
341 * respond to the ping request, or in what timeframe. Clients
342 * should try to respond in a reasonable amount of time.
343 *
344 * A compositor is free to ping in any way it wants, but a client
345 * must always respond to any xdg_shell object it created.
346 * @param serial pass this to the pong request
347 */
348 void (*ping)(void *data,
349 struct zxdg_shell_v6 *zxdg_shell_v6,
350 uint32_t serial);
351};
352
353/**
354 * @ingroup zxdg_shell_v6_iface
355 */
356static inline int
357zxdg_shell_v6_add_listener(struct zxdg_shell_v6 *zxdg_shell_v6,
358 const struct zxdg_shell_v6_listener *listener, void *data)
359{
360 return wl_proxy_add_listener((struct wl_proxy *) zxdg_shell_v6,
361 (void (**)(void)) listener, data);
362}
363
364#define ZXDG_SHELL_V6_DESTROY 0
365#define ZXDG_SHELL_V6_CREATE_POSITIONER 1
366#define ZXDG_SHELL_V6_GET_XDG_SURFACE 2
367#define ZXDG_SHELL_V6_PONG 3
368
369/**
370 * @ingroup iface_zxdg_shell_v6
371 */
372#define ZXDG_SHELL_V6_PING_SINCE_VERSION 1
373
374/**
375 * @ingroup iface_zxdg_shell_v6
376 */
377#define ZXDG_SHELL_V6_DESTROY_SINCE_VERSION 1
378/**
379 * @ingroup iface_zxdg_shell_v6
380 */
381#define ZXDG_SHELL_V6_CREATE_POSITIONER_SINCE_VERSION 1
382/**
383 * @ingroup iface_zxdg_shell_v6
384 */
385#define ZXDG_SHELL_V6_GET_XDG_SURFACE_SINCE_VERSION 1
386/**
387 * @ingroup iface_zxdg_shell_v6
388 */
389#define ZXDG_SHELL_V6_PONG_SINCE_VERSION 1
390
391/** @ingroup iface_zxdg_shell_v6 */
392static inline void
393zxdg_shell_v6_set_user_data(struct zxdg_shell_v6 *zxdg_shell_v6, void *user_data)
394{
395 wl_proxy_set_user_data((struct wl_proxy *) zxdg_shell_v6, user_data);
396}
397
398/** @ingroup iface_zxdg_shell_v6 */
399static inline void *
400zxdg_shell_v6_get_user_data(struct zxdg_shell_v6 *zxdg_shell_v6)
401{
402 return wl_proxy_get_user_data((struct wl_proxy *) zxdg_shell_v6);
403}
404
405static inline uint32_t
406zxdg_shell_v6_get_version(struct zxdg_shell_v6 *zxdg_shell_v6)
407{
408 return wl_proxy_get_version((struct wl_proxy *) zxdg_shell_v6);
409}
410
411/**
412 * @ingroup iface_zxdg_shell_v6
413 *
414 * Destroy this xdg_shell object.
415 *
416 * Destroying a bound xdg_shell object while there are surfaces
417 * still alive created by this xdg_shell object instance is illegal
418 * and will result in a protocol error.
419 */
420static inline void
421zxdg_shell_v6_destroy(struct zxdg_shell_v6 *zxdg_shell_v6)
422{
423 wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6,
424 ZXDG_SHELL_V6_DESTROY);
425
426 wl_proxy_destroy((struct wl_proxy *) zxdg_shell_v6);
427}
428
429/**
430 * @ingroup iface_zxdg_shell_v6
431 *
432 * Create a positioner object. A positioner object is used to position
433 * surfaces relative to some parent surface. See the interface description
434 * and xdg_surface.get_popup for details.
435 */
436static inline struct zxdg_positioner_v6 *
437zxdg_shell_v6_create_positioner(struct zxdg_shell_v6 *zxdg_shell_v6)
438{
439 struct wl_proxy *id;
440
441 id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6,
442 ZXDG_SHELL_V6_CREATE_POSITIONER, &zxdg_positioner_v6_interface, NULL);
443
444 return (struct zxdg_positioner_v6 *) id;
445}
446
447/**
448 * @ingroup iface_zxdg_shell_v6
449 *
450 * This creates an xdg_surface for the given surface. While xdg_surface
451 * itself is not a role, the corresponding surface may only be assigned
452 * a role extending xdg_surface, such as xdg_toplevel or xdg_popup.
453 *
454 * This creates an xdg_surface for the given surface. An xdg_surface is
455 * used as basis to define a role to a given surface, such as xdg_toplevel
456 * or xdg_popup. It also manages functionality shared between xdg_surface
457 * based surface roles.
458 *
459 * See the documentation of xdg_surface for more details about what an
460 * xdg_surface is and how it is used.
461 */
462static inline struct zxdg_surface_v6 *
463zxdg_shell_v6_get_xdg_surface(struct zxdg_shell_v6 *zxdg_shell_v6, struct wl_surface *surface)
464{
465 struct wl_proxy *id;
466
467 id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6,
468 ZXDG_SHELL_V6_GET_XDG_SURFACE, &zxdg_surface_v6_interface, NULL, surface);
469
470 return (struct zxdg_surface_v6 *) id;
471}
472
473/**
474 * @ingroup iface_zxdg_shell_v6
475 *
476 * A client must respond to a ping event with a pong request or
477 * the client may be deemed unresponsive. See xdg_shell.ping.
478 */
479static inline void
480zxdg_shell_v6_pong(struct zxdg_shell_v6 *zxdg_shell_v6, uint32_t serial)
481{
482 wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6,
483 ZXDG_SHELL_V6_PONG, serial);
484}
485
486#ifndef ZXDG_POSITIONER_V6_ERROR_ENUM
487#define ZXDG_POSITIONER_V6_ERROR_ENUM
488enum zxdg_positioner_v6_error {
489 /**
490 * invalid input provided
491 */
492 ZXDG_POSITIONER_V6_ERROR_INVALID_INPUT = 0,
493};
494#endif /* ZXDG_POSITIONER_V6_ERROR_ENUM */
495
496#ifndef ZXDG_POSITIONER_V6_ANCHOR_ENUM
497#define ZXDG_POSITIONER_V6_ANCHOR_ENUM
498enum zxdg_positioner_v6_anchor {
499 /**
500 * the center of the anchor rectangle
501 */
502 ZXDG_POSITIONER_V6_ANCHOR_NONE = 0,
503 /**
504 * the top edge of the anchor rectangle
505 */
506 ZXDG_POSITIONER_V6_ANCHOR_TOP = 1,
507 /**
508 * the bottom edge of the anchor rectangle
509 */
510 ZXDG_POSITIONER_V6_ANCHOR_BOTTOM = 2,
511 /**
512 * the left edge of the anchor rectangle
513 */
514 ZXDG_POSITIONER_V6_ANCHOR_LEFT = 4,
515 /**
516 * the right edge of the anchor rectangle
517 */
518 ZXDG_POSITIONER_V6_ANCHOR_RIGHT = 8,
519};
520#endif /* ZXDG_POSITIONER_V6_ANCHOR_ENUM */
521
522#ifndef ZXDG_POSITIONER_V6_GRAVITY_ENUM
523#define ZXDG_POSITIONER_V6_GRAVITY_ENUM
524enum zxdg_positioner_v6_gravity {
525 /**
526 * center over the anchor edge
527 */
528 ZXDG_POSITIONER_V6_GRAVITY_NONE = 0,
529 /**
530 * position above the anchor edge
531 */
532 ZXDG_POSITIONER_V6_GRAVITY_TOP = 1,
533 /**
534 * position below the anchor edge
535 */
536 ZXDG_POSITIONER_V6_GRAVITY_BOTTOM = 2,
537 /**
538 * position to the left of the anchor edge
539 */
540 ZXDG_POSITIONER_V6_GRAVITY_LEFT = 4,
541 /**
542 * position to the right of the anchor edge
543 */
544 ZXDG_POSITIONER_V6_GRAVITY_RIGHT = 8,
545};
546#endif /* ZXDG_POSITIONER_V6_GRAVITY_ENUM */
547
548#ifndef ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM
549#define ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM
550/**
551 * @ingroup iface_zxdg_positioner_v6
552 * vertically resize the surface
553 *
554 * Resize the surface vertically so that it is completely unconstrained.
555 */
556enum zxdg_positioner_v6_constraint_adjustment {
557 ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE = 0,
558 ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1,
559 ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2,
560 ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X = 4,
561 ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8,
562 ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16,
563 ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32,
564};
565#endif /* ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM */
566
567#define ZXDG_POSITIONER_V6_DESTROY 0
568#define ZXDG_POSITIONER_V6_SET_SIZE 1
569#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT 2
570#define ZXDG_POSITIONER_V6_SET_ANCHOR 3
571#define ZXDG_POSITIONER_V6_SET_GRAVITY 4
572#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT 5
573#define ZXDG_POSITIONER_V6_SET_OFFSET 6
574
575
576/**
577 * @ingroup iface_zxdg_positioner_v6
578 */
579#define ZXDG_POSITIONER_V6_DESTROY_SINCE_VERSION 1
580/**
581 * @ingroup iface_zxdg_positioner_v6
582 */
583#define ZXDG_POSITIONER_V6_SET_SIZE_SINCE_VERSION 1
584/**
585 * @ingroup iface_zxdg_positioner_v6
586 */
587#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT_SINCE_VERSION 1
588/**
589 * @ingroup iface_zxdg_positioner_v6
590 */
591#define ZXDG_POSITIONER_V6_SET_ANCHOR_SINCE_VERSION 1
592/**
593 * @ingroup iface_zxdg_positioner_v6
594 */
595#define ZXDG_POSITIONER_V6_SET_GRAVITY_SINCE_VERSION 1
596/**
597 * @ingroup iface_zxdg_positioner_v6
598 */
599#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1
600/**
601 * @ingroup iface_zxdg_positioner_v6
602 */
603#define ZXDG_POSITIONER_V6_SET_OFFSET_SINCE_VERSION 1
604
605/** @ingroup iface_zxdg_positioner_v6 */
606static inline void
607zxdg_positioner_v6_set_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6, void *user_data)
608{
609 wl_proxy_set_user_data((struct wl_proxy *) zxdg_positioner_v6, user_data);
610}
611
612/** @ingroup iface_zxdg_positioner_v6 */
613static inline void *
614zxdg_positioner_v6_get_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6)
615{
616 return wl_proxy_get_user_data((struct wl_proxy *) zxdg_positioner_v6);
617}
618
619static inline uint32_t
620zxdg_positioner_v6_get_version(struct zxdg_positioner_v6 *zxdg_positioner_v6)
621{
622 return wl_proxy_get_version((struct wl_proxy *) zxdg_positioner_v6);
623}
624
625/**
626 * @ingroup iface_zxdg_positioner_v6
627 *
628 * Notify the compositor that the xdg_positioner will no longer be used.
629 */
630static inline void
631zxdg_positioner_v6_destroy(struct zxdg_positioner_v6 *zxdg_positioner_v6)
632{
633 wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6,
634 ZXDG_POSITIONER_V6_DESTROY);
635
636 wl_proxy_destroy((struct wl_proxy *) zxdg_positioner_v6);
637}
638
639/**
640 * @ingroup iface_zxdg_positioner_v6
641 *
642 * Set the size of the surface that is to be positioned with the positioner
643 * object. The size is in surface-local coordinates and corresponds to the
644 * window geometry. See xdg_surface.set_window_geometry.
645 *
646 * If a zero or negative size is set the invalid_input error is raised.
647 */
648static inline void
649zxdg_positioner_v6_set_size(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t width, int32_t height)
650{
651 wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6,
652 ZXDG_POSITIONER_V6_SET_SIZE, width, height);
653}
654
655/**
656 * @ingroup iface_zxdg_positioner_v6
657 *
658 * Specify the anchor rectangle within the parent surface that the child
659 * surface will be placed relative to. The rectangle is relative to the
660 * window geometry as defined by xdg_surface.set_window_geometry of the
661 * parent surface. The rectangle must be at least 1x1 large.
662 *
663 * When the xdg_positioner object is used to position a child surface, the
664 * anchor rectangle may not extend outside the window geometry of the
665 * positioned child's parent surface.
666 *
667 * If a zero or negative size is set the invalid_input error is raised.
668 */
669static inline void
670zxdg_positioner_v6_set_anchor_rect(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y, int32_t width, int32_t height)
671{
672 wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6,
673 ZXDG_POSITIONER_V6_SET_ANCHOR_RECT, x, y, width, height);
674}
675
676/**
677 * @ingroup iface_zxdg_positioner_v6
678 *
679 * Defines a set of edges for the anchor rectangle. These are used to
680 * derive an anchor point that the child surface will be positioned
681 * relative to. If two orthogonal edges are specified (e.g. 'top' and
682 * 'left'), then the anchor point will be the intersection of the edges
683 * (e.g. the top left position of the rectangle); otherwise, the derived
684 * anchor point will be centered on the specified edge, or in the center of
685 * the anchor rectangle if no edge is specified.
686 *
687 * If two parallel anchor edges are specified (e.g. 'left' and 'right'),
688 * the invalid_input error is raised.
689 */
690static inline void
691zxdg_positioner_v6_set_anchor(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t anchor)
692{
693 wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6,
694 ZXDG_POSITIONER_V6_SET_ANCHOR, anchor);
695}
696
697/**
698 * @ingroup iface_zxdg_positioner_v6
699 *
700 * Defines in what direction a surface should be positioned, relative to
701 * the anchor point of the parent surface. If two orthogonal gravities are
702 * specified (e.g. 'bottom' and 'right'), then the child surface will be
703 * placed in the specified direction; otherwise, the child surface will be
704 * centered over the anchor point on any axis that had no gravity
705 * specified.
706 *
707 * If two parallel gravities are specified (e.g. 'left' and 'right'), the
708 * invalid_input error is raised.
709 */
710static inline void
711zxdg_positioner_v6_set_gravity(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t gravity)
712{
713 wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6,
714 ZXDG_POSITIONER_V6_SET_GRAVITY, gravity);
715}
716
717/**
718 * @ingroup iface_zxdg_positioner_v6
719 *
720 * Specify how the window should be positioned if the originally intended
721 * position caused the surface to be constrained, meaning at least
722 * partially outside positioning boundaries set by the compositor. The
723 * adjustment is set by constructing a bitmask describing the adjustment to
724 * be made when the surface is constrained on that axis.
725 *
726 * If no bit for one axis is set, the compositor will assume that the child
727 * surface should not change its position on that axis when constrained.
728 *
729 * If more than one bit for one axis is set, the order of how adjustments
730 * are applied is specified in the corresponding adjustment descriptions.
731 *
732 * The default adjustment is none.
733 */
734static inline void
735zxdg_positioner_v6_set_constraint_adjustment(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t constraint_adjustment)
736{
737 wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6,
738 ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT, constraint_adjustment);
739}
740
741/**
742 * @ingroup iface_zxdg_positioner_v6
743 *
744 * Specify the surface position offset relative to the position of the
745 * anchor on the anchor rectangle and the anchor on the surface. For
746 * example if the anchor of the anchor rectangle is at (x, y), the surface
747 * has the gravity bottom|right, and the offset is (ox, oy), the calculated
748 * surface position will be (x + ox, y + oy). The offset position of the
749 * surface is the one used for constraint testing. See
750 * set_constraint_adjustment.
751 *
752 * An example use case is placing a popup menu on top of a user interface
753 * element, while aligning the user interface element of the parent surface
754 * with some user interface element placed somewhere in the popup surface.
755 */
756static inline void
757zxdg_positioner_v6_set_offset(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y)
758{
759 wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6,
760 ZXDG_POSITIONER_V6_SET_OFFSET, x, y);
761}
762
763#ifndef ZXDG_SURFACE_V6_ERROR_ENUM
764#define ZXDG_SURFACE_V6_ERROR_ENUM
765enum zxdg_surface_v6_error {
766 ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED = 1,
767 ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED = 2,
768 ZXDG_SURFACE_V6_ERROR_UNCONFIGURED_BUFFER = 3,
769};
770#endif /* ZXDG_SURFACE_V6_ERROR_ENUM */
771
772/**
773 * @ingroup iface_zxdg_surface_v6
774 * @struct zxdg_surface_v6_listener
775 */
776struct zxdg_surface_v6_listener {
777 /**
778 * suggest a surface change
779 *
780 * The configure event marks the end of a configure sequence. A
781 * configure sequence is a set of one or more events configuring
782 * the state of the xdg_surface, including the final
783 * xdg_surface.configure event.
784 *
785 * Where applicable, xdg_surface surface roles will during a
786 * configure sequence extend this event as a latched state sent as
787 * events before the xdg_surface.configure event. Such events
788 * should be considered to make up a set of atomically applied
789 * configuration states, where the xdg_surface.configure commits
790 * the accumulated state.
791 *
792 * Clients should arrange their surface for the new states, and
793 * then send an ack_configure request with the serial sent in this
794 * configure event at some point before committing the new surface.
795 *
796 * If the client receives multiple configure events before it can
797 * respond to one, it is free to discard all but the last event it
798 * received.
799 * @param serial serial of the configure event
800 */
801 void (*configure)(void *data,
802 struct zxdg_surface_v6 *zxdg_surface_v6,
803 uint32_t serial);
804};
805
806/**
807 * @ingroup zxdg_surface_v6_iface
808 */
809static inline int
810zxdg_surface_v6_add_listener(struct zxdg_surface_v6 *zxdg_surface_v6,
811 const struct zxdg_surface_v6_listener *listener, void *data)
812{
813 return wl_proxy_add_listener((struct wl_proxy *) zxdg_surface_v6,
814 (void (**)(void)) listener, data);
815}
816
817#define ZXDG_SURFACE_V6_DESTROY 0
818#define ZXDG_SURFACE_V6_GET_TOPLEVEL 1
819#define ZXDG_SURFACE_V6_GET_POPUP 2
820#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY 3
821#define ZXDG_SURFACE_V6_ACK_CONFIGURE 4
822
823/**
824 * @ingroup iface_zxdg_surface_v6
825 */
826#define ZXDG_SURFACE_V6_CONFIGURE_SINCE_VERSION 1
827
828/**
829 * @ingroup iface_zxdg_surface_v6
830 */
831#define ZXDG_SURFACE_V6_DESTROY_SINCE_VERSION 1
832/**
833 * @ingroup iface_zxdg_surface_v6
834 */
835#define ZXDG_SURFACE_V6_GET_TOPLEVEL_SINCE_VERSION 1
836/**
837 * @ingroup iface_zxdg_surface_v6
838 */
839#define ZXDG_SURFACE_V6_GET_POPUP_SINCE_VERSION 1
840/**
841 * @ingroup iface_zxdg_surface_v6
842 */
843#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY_SINCE_VERSION 1
844/**
845 * @ingroup iface_zxdg_surface_v6
846 */
847#define ZXDG_SURFACE_V6_ACK_CONFIGURE_SINCE_VERSION 1
848
849/** @ingroup iface_zxdg_surface_v6 */
850static inline void
851zxdg_surface_v6_set_user_data(struct zxdg_surface_v6 *zxdg_surface_v6, void *user_data)
852{
853 wl_proxy_set_user_data((struct wl_proxy *) zxdg_surface_v6, user_data);
854}
855
856/** @ingroup iface_zxdg_surface_v6 */
857static inline void *
858zxdg_surface_v6_get_user_data(struct zxdg_surface_v6 *zxdg_surface_v6)
859{
860 return wl_proxy_get_user_data((struct wl_proxy *) zxdg_surface_v6);
861}
862
863static inline uint32_t
864zxdg_surface_v6_get_version(struct zxdg_surface_v6 *zxdg_surface_v6)
865{
866 return wl_proxy_get_version((struct wl_proxy *) zxdg_surface_v6);
867}
868
869/**
870 * @ingroup iface_zxdg_surface_v6
871 *
872 * Destroy the xdg_surface object. An xdg_surface must only be destroyed
873 * after its role object has been destroyed.
874 */
875static inline void
876zxdg_surface_v6_destroy(struct zxdg_surface_v6 *zxdg_surface_v6)
877{
878 wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6,
879 ZXDG_SURFACE_V6_DESTROY);
880
881 wl_proxy_destroy((struct wl_proxy *) zxdg_surface_v6);
882}
883
884/**
885 * @ingroup iface_zxdg_surface_v6
886 *
887 * This creates an xdg_toplevel object for the given xdg_surface and gives
888 * the associated wl_surface the xdg_toplevel role.
889 *
890 * See the documentation of xdg_toplevel for more details about what an
891 * xdg_toplevel is and how it is used.
892 */
893static inline struct zxdg_toplevel_v6 *
894zxdg_surface_v6_get_toplevel(struct zxdg_surface_v6 *zxdg_surface_v6)
895{
896 struct wl_proxy *id;
897
898 id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6,
899 ZXDG_SURFACE_V6_GET_TOPLEVEL, &zxdg_toplevel_v6_interface, NULL);
900
901 return (struct zxdg_toplevel_v6 *) id;
902}
903
904/**
905 * @ingroup iface_zxdg_surface_v6
906 *
907 * This creates an xdg_popup object for the given xdg_surface and gives the
908 * associated wl_surface the xdg_popup role.
909 *
910 * See the documentation of xdg_popup for more details about what an
911 * xdg_popup is and how it is used.
912 */
913static inline struct zxdg_popup_v6 *
914zxdg_surface_v6_get_popup(struct zxdg_surface_v6 *zxdg_surface_v6, struct zxdg_surface_v6 *parent, struct zxdg_positioner_v6 *positioner)
915{
916 struct wl_proxy *id;
917
918 id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6,
919 ZXDG_SURFACE_V6_GET_POPUP, &zxdg_popup_v6_interface, NULL, parent, positioner);
920
921 return (struct zxdg_popup_v6 *) id;
922}
923
924/**
925 * @ingroup iface_zxdg_surface_v6
926 *
927 * The window geometry of a surface is its "visible bounds" from the
928 * user's perspective. Client-side decorations often have invisible
929 * portions like drop-shadows which should be ignored for the
930 * purposes of aligning, placing and constraining windows.
931 *
932 * The window geometry is double buffered, and will be applied at the
933 * time wl_surface.commit of the corresponding wl_surface is called.
934 *
935 * Once the window geometry of the surface is set, it is not possible to
936 * unset it, and it will remain the same until set_window_geometry is
937 * called again, even if a new subsurface or buffer is attached.
938 *
939 * If never set, the value is the full bounds of the surface,
940 * including any subsurfaces. This updates dynamically on every
941 * commit. This unset is meant for extremely simple clients.
942 *
943 * The arguments are given in the surface-local coordinate space of
944 * the wl_surface associated with this xdg_surface.
945 *
946 * The width and height must be greater than zero. Setting an invalid size
947 * will raise an error. When applied, the effective window geometry will be
948 * the set window geometry clamped to the bounding rectangle of the
949 * combined geometry of the surface of the xdg_surface and the associated
950 * subsurfaces.
951 */
952static inline void
953zxdg_surface_v6_set_window_geometry(struct zxdg_surface_v6 *zxdg_surface_v6, int32_t x, int32_t y, int32_t width, int32_t height)
954{
955 wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6,
956 ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY, x, y, width, height);
957}
958
959/**
960 * @ingroup iface_zxdg_surface_v6
961 *
962 * When a configure event is received, if a client commits the
963 * surface in response to the configure event, then the client
964 * must make an ack_configure request sometime before the commit
965 * request, passing along the serial of the configure event.
966 *
967 * For instance, for toplevel surfaces the compositor might use this
968 * information to move a surface to the top left only when the client has
969 * drawn itself for the maximized or fullscreen state.
970 *
971 * If the client receives multiple configure events before it
972 * can respond to one, it only has to ack the last configure event.
973 *
974 * A client is not required to commit immediately after sending
975 * an ack_configure request - it may even ack_configure several times
976 * before its next surface commit.
977 *
978 * A client may send multiple ack_configure requests before committing, but
979 * only the last request sent before a commit indicates which configure
980 * event the client really is responding to.
981 */
982static inline void
983zxdg_surface_v6_ack_configure(struct zxdg_surface_v6 *zxdg_surface_v6, uint32_t serial)
984{
985 wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6,
986 ZXDG_SURFACE_V6_ACK_CONFIGURE, serial);
987}
988
989#ifndef ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM
990#define ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM
991/**
992 * @ingroup iface_zxdg_toplevel_v6
993 * edge values for resizing
994 *
995 * These values are used to indicate which edge of a surface
996 * is being dragged in a resize operation.
997 */
998enum zxdg_toplevel_v6_resize_edge {
999 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_NONE = 0,
1000 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP = 1,
1001 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM = 2,
1002 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT = 4,
1003 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT = 5,
1004 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT = 6,
1005 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT = 8,
1006 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT = 9,
1007 ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT = 10,
1008};
1009#endif /* ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM */
1010
1011#ifndef ZXDG_TOPLEVEL_V6_STATE_ENUM
1012#define ZXDG_TOPLEVEL_V6_STATE_ENUM
1013/**
1014 * @ingroup iface_zxdg_toplevel_v6
1015 * the surface is now activated
1016 *
1017 * Client window decorations should be painted as if the window is
1018 * active. Do not assume this means that the window actually has
1019 * keyboard or pointer focus.
1020 */
1021enum zxdg_toplevel_v6_state {
1022 /**
1023 * the surface is maximized
1024 */
1025 ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED = 1,
1026 /**
1027 * the surface is fullscreen
1028 */
1029 ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN = 2,
1030 /**
1031 * the surface is being resized
1032 */
1033 ZXDG_TOPLEVEL_V6_STATE_RESIZING = 3,
1034 /**
1035 * the surface is now activated
1036 */
1037 ZXDG_TOPLEVEL_V6_STATE_ACTIVATED = 4,
1038};
1039#endif /* ZXDG_TOPLEVEL_V6_STATE_ENUM */
1040
1041/**
1042 * @ingroup iface_zxdg_toplevel_v6
1043 * @struct zxdg_toplevel_v6_listener
1044 */
1045struct zxdg_toplevel_v6_listener {
1046 /**
1047 * suggest a surface change
1048 *
1049 * This configure event asks the client to resize its toplevel
1050 * surface or to change its state. The configured state should not
1051 * be applied immediately. See xdg_surface.configure for details.
1052 *
1053 * The width and height arguments specify a hint to the window
1054 * about how its surface should be resized in window geometry
1055 * coordinates. See set_window_geometry.
1056 *
1057 * If the width or height arguments are zero, it means the client
1058 * should decide its own window dimension. This may happen when the
1059 * compositor needs to configure the state of the surface but
1060 * doesn't have any information about any previous or expected
1061 * dimension.
1062 *
1063 * The states listed in the event specify how the width/height
1064 * arguments should be interpreted, and possibly how it should be
1065 * drawn.
1066 *
1067 * Clients must send an ack_configure in response to this event.
1068 * See xdg_surface.configure and xdg_surface.ack_configure for
1069 * details.
1070 */
1071 void (*configure)(void *data,
1072 struct zxdg_toplevel_v6 *zxdg_toplevel_v6,
1073 int32_t width,
1074 int32_t height,
1075 struct wl_array *states);
1076 /**
1077 * surface wants to be closed
1078 *
1079 * The close event is sent by the compositor when the user wants
1080 * the surface to be closed. This should be equivalent to the user
1081 * clicking the close button in client-side decorations, if your
1082 * application has any.
1083 *
1084 * This is only a request that the user intends to close the
1085 * window. The client may choose to ignore this request, or show a
1086 * dialog to ask the user to save their data, etc.
1087 */
1088 void (*close)(void *data,
1089 struct zxdg_toplevel_v6 *zxdg_toplevel_v6);
1090};
1091
1092/**
1093 * @ingroup zxdg_toplevel_v6_iface
1094 */
1095static inline int
1096zxdg_toplevel_v6_add_listener(struct zxdg_toplevel_v6 *zxdg_toplevel_v6,
1097 const struct zxdg_toplevel_v6_listener *listener, void *data)
1098{
1099 return wl_proxy_add_listener((struct wl_proxy *) zxdg_toplevel_v6,
1100 (void (**)(void)) listener, data);
1101}
1102
1103#define ZXDG_TOPLEVEL_V6_DESTROY 0
1104#define ZXDG_TOPLEVEL_V6_SET_PARENT 1
1105#define ZXDG_TOPLEVEL_V6_SET_TITLE 2
1106#define ZXDG_TOPLEVEL_V6_SET_APP_ID 3
1107#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU 4
1108#define ZXDG_TOPLEVEL_V6_MOVE 5
1109#define ZXDG_TOPLEVEL_V6_RESIZE 6
1110#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE 7
1111#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE 8
1112#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED 9
1113#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED 10
1114#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN 11
1115#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN 12
1116#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED 13
1117
1118/**
1119 * @ingroup iface_zxdg_toplevel_v6
1120 */
1121#define ZXDG_TOPLEVEL_V6_CONFIGURE_SINCE_VERSION 1
1122/**
1123 * @ingroup iface_zxdg_toplevel_v6
1124 */
1125#define ZXDG_TOPLEVEL_V6_CLOSE_SINCE_VERSION 1
1126
1127/**
1128 * @ingroup iface_zxdg_toplevel_v6
1129 */
1130#define ZXDG_TOPLEVEL_V6_DESTROY_SINCE_VERSION 1
1131/**
1132 * @ingroup iface_zxdg_toplevel_v6
1133 */
1134#define ZXDG_TOPLEVEL_V6_SET_PARENT_SINCE_VERSION 1
1135/**
1136 * @ingroup iface_zxdg_toplevel_v6
1137 */
1138#define ZXDG_TOPLEVEL_V6_SET_TITLE_SINCE_VERSION 1
1139/**
1140 * @ingroup iface_zxdg_toplevel_v6
1141 */
1142#define ZXDG_TOPLEVEL_V6_SET_APP_ID_SINCE_VERSION 1
1143/**
1144 * @ingroup iface_zxdg_toplevel_v6
1145 */
1146#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU_SINCE_VERSION 1
1147/**
1148 * @ingroup iface_zxdg_toplevel_v6
1149 */
1150#define ZXDG_TOPLEVEL_V6_MOVE_SINCE_VERSION 1
1151/**
1152 * @ingroup iface_zxdg_toplevel_v6
1153 */
1154#define ZXDG_TOPLEVEL_V6_RESIZE_SINCE_VERSION 1
1155/**
1156 * @ingroup iface_zxdg_toplevel_v6
1157 */
1158#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE_SINCE_VERSION 1
1159/**
1160 * @ingroup iface_zxdg_toplevel_v6
1161 */
1162#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE_SINCE_VERSION 1
1163/**
1164 * @ingroup iface_zxdg_toplevel_v6
1165 */
1166#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED_SINCE_VERSION 1
1167/**
1168 * @ingroup iface_zxdg_toplevel_v6
1169 */
1170#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED_SINCE_VERSION 1
1171/**
1172 * @ingroup iface_zxdg_toplevel_v6
1173 */
1174#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN_SINCE_VERSION 1
1175/**
1176 * @ingroup iface_zxdg_toplevel_v6
1177 */
1178#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN_SINCE_VERSION 1
1179/**
1180 * @ingroup iface_zxdg_toplevel_v6
1181 */
1182#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED_SINCE_VERSION 1
1183
1184/** @ingroup iface_zxdg_toplevel_v6 */
1185static inline void
1186zxdg_toplevel_v6_set_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, void *user_data)
1187{
1188 wl_proxy_set_user_data((struct wl_proxy *) zxdg_toplevel_v6, user_data);
1189}
1190
1191/** @ingroup iface_zxdg_toplevel_v6 */
1192static inline void *
1193zxdg_toplevel_v6_get_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6)
1194{
1195 return wl_proxy_get_user_data((struct wl_proxy *) zxdg_toplevel_v6);
1196}
1197
1198static inline uint32_t
1199zxdg_toplevel_v6_get_version(struct zxdg_toplevel_v6 *zxdg_toplevel_v6)
1200{
1201 return wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_v6);
1202}
1203
1204/**
1205 * @ingroup iface_zxdg_toplevel_v6
1206 *
1207 * Unmap and destroy the window. The window will be effectively
1208 * hidden from the user's point of view, and all state like
1209 * maximization, fullscreen, and so on, will be lost.
1210 */
1211static inline void
1212zxdg_toplevel_v6_destroy(struct zxdg_toplevel_v6 *zxdg_toplevel_v6)
1213{
1214 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1215 ZXDG_TOPLEVEL_V6_DESTROY);
1216
1217 wl_proxy_destroy((struct wl_proxy *) zxdg_toplevel_v6);
1218}
1219
1220/**
1221 * @ingroup iface_zxdg_toplevel_v6
1222 *
1223 * Set the "parent" of this surface. This window should be stacked
1224 * above a parent. The parent surface must be mapped as long as this
1225 * surface is mapped.
1226 *
1227 * Parent windows should be set on dialogs, toolboxes, or other
1228 * "auxiliary" surfaces, so that the parent is raised when the dialog
1229 * is raised.
1230 */
1231static inline void
1232zxdg_toplevel_v6_set_parent(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct zxdg_toplevel_v6 *parent)
1233{
1234 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1235 ZXDG_TOPLEVEL_V6_SET_PARENT, parent);
1236}
1237
1238/**
1239 * @ingroup iface_zxdg_toplevel_v6
1240 *
1241 * Set a short title for the surface.
1242 *
1243 * This string may be used to identify the surface in a task bar,
1244 * window list, or other user interface elements provided by the
1245 * compositor.
1246 *
1247 * The string must be encoded in UTF-8.
1248 */
1249static inline void
1250zxdg_toplevel_v6_set_title(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *title)
1251{
1252 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1253 ZXDG_TOPLEVEL_V6_SET_TITLE, title);
1254}
1255
1256/**
1257 * @ingroup iface_zxdg_toplevel_v6
1258 *
1259 * Set an application identifier for the surface.
1260 *
1261 * The app ID identifies the general class of applications to which
1262 * the surface belongs. The compositor can use this to group multiple
1263 * surfaces together, or to determine how to launch a new application.
1264 *
1265 * For D-Bus activatable applications, the app ID is used as the D-Bus
1266 * service name.
1267 *
1268 * The compositor shell will try to group application surfaces together
1269 * by their app ID. As a best practice, it is suggested to select app
1270 * ID's that match the basename of the application's .desktop file.
1271 * For example, "org.freedesktop.FooViewer" where the .desktop file is
1272 * "org.freedesktop.FooViewer.desktop".
1273 *
1274 * See the desktop-entry specification [0] for more details on
1275 * application identifiers and how they relate to well-known D-Bus
1276 * names and .desktop files.
1277 *
1278 * [0] http://standards.freedesktop.org/desktop-entry-spec/
1279 */
1280static inline void
1281zxdg_toplevel_v6_set_app_id(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *app_id)
1282{
1283 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1284 ZXDG_TOPLEVEL_V6_SET_APP_ID, app_id);
1285}
1286
1287/**
1288 * @ingroup iface_zxdg_toplevel_v6
1289 *
1290 * Clients implementing client-side decorations might want to show
1291 * a context menu when right-clicking on the decorations, giving the
1292 * user a menu that they can use to maximize or minimize the window.
1293 *
1294 * This request asks the compositor to pop up such a window menu at
1295 * the given position, relative to the local surface coordinates of
1296 * the parent surface. There are no guarantees as to what menu items
1297 * the window menu contains.
1298 *
1299 * This request must be used in response to some sort of user action
1300 * like a button press, key press, or touch down event.
1301 */
1302static inline void
1303zxdg_toplevel_v6_show_window_menu(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y)
1304{
1305 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1306 ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU, seat, serial, x, y);
1307}
1308
1309/**
1310 * @ingroup iface_zxdg_toplevel_v6
1311 *
1312 * Start an interactive, user-driven move of the surface.
1313 *
1314 * This request must be used in response to some sort of user action
1315 * like a button press, key press, or touch down event. The passed
1316 * serial is used to determine the type of interactive move (touch,
1317 * pointer, etc).
1318 *
1319 * The server may ignore move requests depending on the state of
1320 * the surface (e.g. fullscreen or maximized), or if the passed serial
1321 * is no longer valid.
1322 *
1323 * If triggered, the surface will lose the focus of the device
1324 * (wl_pointer, wl_touch, etc) used for the move. It is up to the
1325 * compositor to visually indicate that the move is taking place, such as
1326 * updating a pointer cursor, during the move. There is no guarantee
1327 * that the device focus will return when the move is completed.
1328 */
1329static inline void
1330zxdg_toplevel_v6_move(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial)
1331{
1332 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1333 ZXDG_TOPLEVEL_V6_MOVE, seat, serial);
1334}
1335
1336/**
1337 * @ingroup iface_zxdg_toplevel_v6
1338 *
1339 * Start a user-driven, interactive resize of the surface.
1340 *
1341 * This request must be used in response to some sort of user action
1342 * like a button press, key press, or touch down event. The passed
1343 * serial is used to determine the type of interactive resize (touch,
1344 * pointer, etc).
1345 *
1346 * The server may ignore resize requests depending on the state of
1347 * the surface (e.g. fullscreen or maximized).
1348 *
1349 * If triggered, the client will receive configure events with the
1350 * "resize" state enum value and the expected sizes. See the "resize"
1351 * enum value for more details about what is required. The client
1352 * must also acknowledge configure events using "ack_configure". After
1353 * the resize is completed, the client will receive another "configure"
1354 * event without the resize state.
1355 *
1356 * If triggered, the surface also will lose the focus of the device
1357 * (wl_pointer, wl_touch, etc) used for the resize. It is up to the
1358 * compositor to visually indicate that the resize is taking place,
1359 * such as updating a pointer cursor, during the resize. There is no
1360 * guarantee that the device focus will return when the resize is
1361 * completed.
1362 *
1363 * The edges parameter specifies how the surface should be resized,
1364 * and is one of the values of the resize_edge enum. The compositor
1365 * may use this information to update the surface position for
1366 * example when dragging the top left corner. The compositor may also
1367 * use this information to adapt its behavior, e.g. choose an
1368 * appropriate cursor image.
1369 */
1370static inline void
1371zxdg_toplevel_v6_resize(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, uint32_t edges)
1372{
1373 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1374 ZXDG_TOPLEVEL_V6_RESIZE, seat, serial, edges);
1375}
1376
1377/**
1378 * @ingroup iface_zxdg_toplevel_v6
1379 *
1380 * Set a maximum size for the window.
1381 *
1382 * The client can specify a maximum size so that the compositor does
1383 * not try to configure the window beyond this size.
1384 *
1385 * The width and height arguments are in window geometry coordinates.
1386 * See xdg_surface.set_window_geometry.
1387 *
1388 * Values set in this way are double-buffered. They will get applied
1389 * on the next commit.
1390 *
1391 * The compositor can use this information to allow or disallow
1392 * different states like maximize or fullscreen and draw accurate
1393 * animations.
1394 *
1395 * Similarly, a tiling window manager may use this information to
1396 * place and resize client windows in a more effective way.
1397 *
1398 * The client should not rely on the compositor to obey the maximum
1399 * size. The compositor may decide to ignore the values set by the
1400 * client and request a larger size.
1401 *
1402 * If never set, or a value of zero in the request, means that the
1403 * client has no expected maximum size in the given dimension.
1404 * As a result, a client wishing to reset the maximum size
1405 * to an unspecified state can use zero for width and height in the
1406 * request.
1407 *
1408 * Requesting a maximum size to be smaller than the minimum size of
1409 * a surface is illegal and will result in a protocol error.
1410 *
1411 * The width and height must be greater than or equal to zero. Using
1412 * strictly negative values for width and height will result in a
1413 * protocol error.
1414 */
1415static inline void
1416zxdg_toplevel_v6_set_max_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height)
1417{
1418 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1419 ZXDG_TOPLEVEL_V6_SET_MAX_SIZE, width, height);
1420}
1421
1422/**
1423 * @ingroup iface_zxdg_toplevel_v6
1424 *
1425 * Set a minimum size for the window.
1426 *
1427 * The client can specify a minimum size so that the compositor does
1428 * not try to configure the window below this size.
1429 *
1430 * The width and height arguments are in window geometry coordinates.
1431 * See xdg_surface.set_window_geometry.
1432 *
1433 * Values set in this way are double-buffered. They will get applied
1434 * on the next commit.
1435 *
1436 * The compositor can use this information to allow or disallow
1437 * different states like maximize or fullscreen and draw accurate
1438 * animations.
1439 *
1440 * Similarly, a tiling window manager may use this information to
1441 * place and resize client windows in a more effective way.
1442 *
1443 * The client should not rely on the compositor to obey the minimum
1444 * size. The compositor may decide to ignore the values set by the
1445 * client and request a smaller size.
1446 *
1447 * If never set, or a value of zero in the request, means that the
1448 * client has no expected minimum size in the given dimension.
1449 * As a result, a client wishing to reset the minimum size
1450 * to an unspecified state can use zero for width and height in the
1451 * request.
1452 *
1453 * Requesting a minimum size to be larger than the maximum size of
1454 * a surface is illegal and will result in a protocol error.
1455 *
1456 * The width and height must be greater than or equal to zero. Using
1457 * strictly negative values for width and height will result in a
1458 * protocol error.
1459 */
1460static inline void
1461zxdg_toplevel_v6_set_min_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height)
1462{
1463 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1464 ZXDG_TOPLEVEL_V6_SET_MIN_SIZE, width, height);
1465}
1466
1467/**
1468 * @ingroup iface_zxdg_toplevel_v6
1469 *
1470 * Maximize the surface.
1471 *
1472 * After requesting that the surface should be maximized, the compositor
1473 * will respond by emitting a configure event with the "maximized" state
1474 * and the required window geometry. The client should then update its
1475 * content, drawing it in a maximized state, i.e. without shadow or other
1476 * decoration outside of the window geometry. The client must also
1477 * acknowledge the configure when committing the new content (see
1478 * ack_configure).
1479 *
1480 * It is up to the compositor to decide how and where to maximize the
1481 * surface, for example which output and what region of the screen should
1482 * be used.
1483 *
1484 * If the surface was already maximized, the compositor will still emit
1485 * a configure event with the "maximized" state.
1486 */
1487static inline void
1488zxdg_toplevel_v6_set_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6)
1489{
1490 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1491 ZXDG_TOPLEVEL_V6_SET_MAXIMIZED);
1492}
1493
1494/**
1495 * @ingroup iface_zxdg_toplevel_v6
1496 *
1497 * Unmaximize the surface.
1498 *
1499 * After requesting that the surface should be unmaximized, the compositor
1500 * will respond by emitting a configure event without the "maximized"
1501 * state. If available, the compositor will include the window geometry
1502 * dimensions the window had prior to being maximized in the configure
1503 * request. The client must then update its content, drawing it in a
1504 * regular state, i.e. potentially with shadow, etc. The client must also
1505 * acknowledge the configure when committing the new content (see
1506 * ack_configure).
1507 *
1508 * It is up to the compositor to position the surface after it was
1509 * unmaximized; usually the position the surface had before maximizing, if
1510 * applicable.
1511 *
1512 * If the surface was already not maximized, the compositor will still
1513 * emit a configure event without the "maximized" state.
1514 */
1515static inline void
1516zxdg_toplevel_v6_unset_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6)
1517{
1518 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1519 ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED);
1520}
1521
1522/**
1523 * @ingroup iface_zxdg_toplevel_v6
1524 *
1525 * Make the surface fullscreen.
1526 *
1527 * You can specify an output that you would prefer to be fullscreen.
1528 * If this value is NULL, it's up to the compositor to choose which
1529 * display will be used to map this surface.
1530 *
1531 * If the surface doesn't cover the whole output, the compositor will
1532 * position the surface in the center of the output and compensate with
1533 * black borders filling the rest of the output.
1534 */
1535static inline void
1536zxdg_toplevel_v6_set_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_output *output)
1537{
1538 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1539 ZXDG_TOPLEVEL_V6_SET_FULLSCREEN, output);
1540}
1541
1542/**
1543 * @ingroup iface_zxdg_toplevel_v6
1544 */
1545static inline void
1546zxdg_toplevel_v6_unset_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6)
1547{
1548 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1549 ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN);
1550}
1551
1552/**
1553 * @ingroup iface_zxdg_toplevel_v6
1554 *
1555 * Request that the compositor minimize your surface. There is no
1556 * way to know if the surface is currently minimized, nor is there
1557 * any way to unset minimization on this surface.
1558 *
1559 * If you are looking to throttle redrawing when minimized, please
1560 * instead use the wl_surface.frame event for this, as this will
1561 * also work with live previews on windows in Alt-Tab, Expose or
1562 * similar compositor features.
1563 */
1564static inline void
1565zxdg_toplevel_v6_set_minimized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6)
1566{
1567 wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6,
1568 ZXDG_TOPLEVEL_V6_SET_MINIMIZED);
1569}
1570
1571#ifndef ZXDG_POPUP_V6_ERROR_ENUM
1572#define ZXDG_POPUP_V6_ERROR_ENUM
1573enum zxdg_popup_v6_error {
1574 /**
1575 * tried to grab after being mapped
1576 */
1577 ZXDG_POPUP_V6_ERROR_INVALID_GRAB = 0,
1578};
1579#endif /* ZXDG_POPUP_V6_ERROR_ENUM */
1580
1581/**
1582 * @ingroup iface_zxdg_popup_v6
1583 * @struct zxdg_popup_v6_listener
1584 */
1585struct zxdg_popup_v6_listener {
1586 /**
1587 * configure the popup surface
1588 *
1589 * This event asks the popup surface to configure itself given
1590 * the configuration. The configured state should not be applied
1591 * immediately. See xdg_surface.configure for details.
1592 *
1593 * The x and y arguments represent the position the popup was
1594 * placed at given the xdg_positioner rule, relative to the upper
1595 * left corner of the window geometry of the parent surface.
1596 * @param x x position relative to parent surface window geometry
1597 * @param y y position relative to parent surface window geometry
1598 * @param width window geometry width
1599 * @param height window geometry height
1600 */
1601 void (*configure)(void *data,
1602 struct zxdg_popup_v6 *zxdg_popup_v6,
1603 int32_t x,
1604 int32_t y,
1605 int32_t width,
1606 int32_t height);
1607 /**
1608 * popup interaction is done
1609 *
1610 * The popup_done event is sent out when a popup is dismissed by
1611 * the compositor. The client should destroy the xdg_popup object
1612 * at this point.
1613 */
1614 void (*popup_done)(void *data,
1615 struct zxdg_popup_v6 *zxdg_popup_v6);
1616};
1617
1618/**
1619 * @ingroup zxdg_popup_v6_iface
1620 */
1621static inline int
1622zxdg_popup_v6_add_listener(struct zxdg_popup_v6 *zxdg_popup_v6,
1623 const struct zxdg_popup_v6_listener *listener, void *data)
1624{
1625 return wl_proxy_add_listener((struct wl_proxy *) zxdg_popup_v6,
1626 (void (**)(void)) listener, data);
1627}
1628
1629#define ZXDG_POPUP_V6_DESTROY 0
1630#define ZXDG_POPUP_V6_GRAB 1
1631
1632/**
1633 * @ingroup iface_zxdg_popup_v6
1634 */
1635#define ZXDG_POPUP_V6_CONFIGURE_SINCE_VERSION 1
1636/**
1637 * @ingroup iface_zxdg_popup_v6
1638 */
1639#define ZXDG_POPUP_V6_POPUP_DONE_SINCE_VERSION 1
1640
1641/**
1642 * @ingroup iface_zxdg_popup_v6
1643 */
1644#define ZXDG_POPUP_V6_DESTROY_SINCE_VERSION 1
1645/**
1646 * @ingroup iface_zxdg_popup_v6
1647 */
1648#define ZXDG_POPUP_V6_GRAB_SINCE_VERSION 1
1649
1650/** @ingroup iface_zxdg_popup_v6 */
1651static inline void
1652zxdg_popup_v6_set_user_data(struct zxdg_popup_v6 *zxdg_popup_v6, void *user_data)
1653{
1654 wl_proxy_set_user_data((struct wl_proxy *) zxdg_popup_v6, user_data);
1655}
1656
1657/** @ingroup iface_zxdg_popup_v6 */
1658static inline void *
1659zxdg_popup_v6_get_user_data(struct zxdg_popup_v6 *zxdg_popup_v6)
1660{
1661 return wl_proxy_get_user_data((struct wl_proxy *) zxdg_popup_v6);
1662}
1663
1664static inline uint32_t
1665zxdg_popup_v6_get_version(struct zxdg_popup_v6 *zxdg_popup_v6)
1666{
1667 return wl_proxy_get_version((struct wl_proxy *) zxdg_popup_v6);
1668}
1669
1670/**
1671 * @ingroup iface_zxdg_popup_v6
1672 *
1673 * This destroys the popup. Explicitly destroying the xdg_popup
1674 * object will also dismiss the popup, and unmap the surface.
1675 *
1676 * If this xdg_popup is not the "topmost" popup, a protocol error
1677 * will be sent.
1678 */
1679static inline void
1680zxdg_popup_v6_destroy(struct zxdg_popup_v6 *zxdg_popup_v6)
1681{
1682 wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6,
1683 ZXDG_POPUP_V6_DESTROY);
1684
1685 wl_proxy_destroy((struct wl_proxy *) zxdg_popup_v6);
1686}
1687
1688/**
1689 * @ingroup iface_zxdg_popup_v6
1690 *
1691 * This request makes the created popup take an explicit grab. An explicit
1692 * grab will be dismissed when the user dismisses the popup, or when the
1693 * client destroys the xdg_popup. This can be done by the user clicking
1694 * outside the surface, using the keyboard, or even locking the screen
1695 * through closing the lid or a timeout.
1696 *
1697 * If the compositor denies the grab, the popup will be immediately
1698 * dismissed.
1699 *
1700 * This request must be used in response to some sort of user action like a
1701 * button press, key press, or touch down event. The serial number of the
1702 * event should be passed as 'serial'.
1703 *
1704 * The parent of a grabbing popup must either be an xdg_toplevel surface or
1705 * another xdg_popup with an explicit grab. If the parent is another
1706 * xdg_popup it means that the popups are nested, with this popup now being
1707 * the topmost popup.
1708 *
1709 * Nested popups must be destroyed in the reverse order they were created
1710 * in, e.g. the only popup you are allowed to destroy at all times is the
1711 * topmost one.
1712 *
1713 * When compositors choose to dismiss a popup, they may dismiss every
1714 * nested grabbing popup as well. When a compositor dismisses popups, it
1715 * will follow the same dismissing order as required from the client.
1716 *
1717 * The parent of a grabbing popup must either be another xdg_popup with an
1718 * active explicit grab, or an xdg_popup or xdg_toplevel, if there are no
1719 * explicit grabs already taken.
1720 *
1721 * If the topmost grabbing popup is destroyed, the grab will be returned to
1722 * the parent of the popup, if that parent previously had an explicit grab.
1723 *
1724 * If the parent is a grabbing popup which has already been dismissed, this
1725 * popup will be immediately dismissed. If the parent is a popup that did
1726 * not take an explicit grab, an error will be raised.
1727 *
1728 * During a popup grab, the client owning the grab will receive pointer
1729 * and touch events for all their surfaces as normal (similar to an
1730 * "owner-events" grab in X11 parlance), while the top most grabbing popup
1731 * will always have keyboard focus.
1732 */
1733static inline void
1734zxdg_popup_v6_grab(struct zxdg_popup_v6 *zxdg_popup_v6, struct wl_seat *seat, uint32_t serial)
1735{
1736 wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6,
1737 ZXDG_POPUP_V6_GRAB, seat, serial);
1738}
1739
1740#ifdef __cplusplus
1741}
1742#endif
1743
1744#endif
diff --git a/src/lib/ecore_wl2/zxdg-shell-protocol.c b/src/lib/ecore_wl2/zxdg-shell-protocol.c
deleted file mode 100644
index f579993..0000000
--- a/src/lib/ecore_wl2/zxdg-shell-protocol.c
+++ /dev/null
@@ -1,162 +0,0 @@
1/* Generated by wayland-scanner 1.12.0 */
2
3/*
4 * Copyright © 2008-2013 Kristian Høgsberg
5 * Copyright © 2013 Rafael Antognolli
6 * Copyright © 2013 Jasper St. Pierre
7 * Copyright © 2010-2013 Intel Corporation
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice (including the next
17 * paragraph) shall be included in all copies or substantial portions of the
18 * Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26 * DEALINGS IN THE SOFTWARE.
27 */
28
29#include <stdlib.h>
30#include <stdint.h>
31#include "wayland-util.h"
32
33extern const struct wl_interface wl_output_interface;
34extern const struct wl_interface wl_seat_interface;
35extern const struct wl_interface wl_surface_interface;
36extern const struct wl_interface zxdg_popup_v6_interface;
37extern const struct wl_interface zxdg_positioner_v6_interface;
38extern const struct wl_interface zxdg_surface_v6_interface;
39extern const struct wl_interface zxdg_toplevel_v6_interface;
40
41static const struct wl_interface *types[] = {
42 NULL,
43 NULL,
44 NULL,
45 NULL,
46 &zxdg_positioner_v6_interface,
47 &zxdg_surface_v6_interface,
48 &wl_surface_interface,
49 &zxdg_toplevel_v6_interface,
50 &zxdg_popup_v6_interface,
51 &zxdg_surface_v6_interface,
52 &zxdg_positioner_v6_interface,
53 &zxdg_toplevel_v6_interface,
54 &wl_seat_interface,
55 NULL,
56 NULL,
57 NULL,
58 &wl_seat_interface,
59 NULL,
60 &wl_seat_interface,
61 NULL,
62 NULL,
63 &wl_output_interface,
64 &wl_seat_interface,
65 NULL,
66};
67
68static const struct wl_message zxdg_shell_v6_requests[] = {
69 { "destroy", "", types + 0 },
70 { "create_positioner", "n", types + 4 },
71 { "get_xdg_surface", "no", types + 5 },
72 { "pong", "u", types + 0 },
73};
74
75static const struct wl_message zxdg_shell_v6_events[] = {
76 { "ping", "u", types + 0 },
77};
78
79WL_EXPORT const struct wl_interface zxdg_shell_v6_interface = {
80 "zxdg_shell_v6", 1,
81 4, zxdg_shell_v6_requests,
82 1, zxdg_shell_v6_events,
83};
84
85static const struct wl_message zxdg_positioner_v6_requests[] = {
86 { "destroy", "", types + 0 },
87 { "set_size", "ii", types + 0 },
88 { "set_anchor_rect", "iiii", types + 0 },
89 { "set_anchor", "u", types + 0 },
90 { "set_gravity", "u", types + 0 },
91 { "set_constraint_adjustment", "u", types + 0 },
92 { "set_offset", "ii", types + 0 },
93};
94
95WL_EXPORT const struct wl_interface zxdg_positioner_v6_interface = {
96 "zxdg_positioner_v6", 1,
97 7, zxdg_positioner_v6_requests,
98 0, NULL,
99};
100
101static const struct wl_message zxdg_surface_v6_requests[] = {
102 { "destroy", "", types + 0 },
103 { "get_toplevel", "n", types + 7 },
104 { "get_popup", "noo", types + 8 },
105 { "set_window_geometry", "iiii", types + 0 },
106 { "ack_configure", "u", types + 0 },
107};
108
109static const struct wl_message zxdg_surface_v6_events[] = {
110 { "configure", "u", types + 0 },
111};
112
113WL_EXPORT const struct wl_interface zxdg_surface_v6_interface = {
114 "zxdg_surface_v6", 1,
115 5, zxdg_surface_v6_requests,
116 1, zxdg_surface_v6_events,
117};
118
119static const struct wl_message zxdg_toplevel_v6_requests[] = {
120 { "destroy", "", types + 0 },
121 { "set_parent", "?o", types + 11 },
122 { "set_title", "s", types + 0 },
123 { "set_app_id", "s", types + 0 },
124 { "show_window_menu", "ouii", types + 12 },
125 { "move", "ou", types + 16 },
126 { "resize", "ouu", types + 18 },
127 { "set_max_size", "ii", types + 0 },
128 { "set_min_size", "ii", types + 0 },
129 { "set_maximized", "", types + 0 },
130 { "unset_maximized", "", types + 0 },
131 { "set_fullscreen", "?o", types + 21 },
132 { "unset_fullscreen", "", types + 0 },
133 { "set_minimized", "", types + 0 },
134};
135
136static const struct wl_message zxdg_toplevel_v6_events[] = {
137 { "configure", "iia", types + 0 },
138 { "close", "", types + 0 },
139};
140
141WL_EXPORT const struct wl_interface zxdg_toplevel_v6_interface = {
142 "zxdg_toplevel_v6", 1,
143 14, zxdg_toplevel_v6_requests,
144 2, zxdg_toplevel_v6_events,
145};
146
147static const struct wl_message zxdg_popup_v6_requests[] = {
148 { "destroy", "", types + 0 },
149 { "grab", "ou", types + 22 },
150};
151
152static const struct wl_message zxdg_popup_v6_events[] = {
153 { "configure", "iiii", types + 0 },
154 { "popup_done", "", types + 0 },
155};
156
157WL_EXPORT const struct wl_interface zxdg_popup_v6_interface = {
158 "zxdg_popup_v6", 1,
159 2, zxdg_popup_v6_requests,
160 2, zxdg_popup_v6_events,
161};
162