1 /* Generated by wayland-scanner 1.22.0 */
2
3 #ifndef EXTENDED_DRAG_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define EXTENDED_DRAG_UNSTABLE_V1_CLIENT_PROTOCOL_H
5
6 #include <stdint.h>
7 #include <stddef.h>
8 #include "wayland-client.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 /**
15 * @page page_extended_drag_unstable_v1 The extended_drag_unstable_v1 protocol
16 * @section page_ifaces_extended_drag_unstable_v1 Interfaces
17 * - @subpage page_iface_zcr_extended_drag_v1 - extends DnD protocol with some advanced features
18 * - @subpage page_iface_zcr_extended_drag_source_v1 - extensions for the standard drag data source
19 * - @subpage page_iface_zcr_extended_drag_offer_v1 - extensions for the standard drag data offer.
20 * @section page_copyright_extended_drag_unstable_v1 Copyright
21 * <pre>
22 *
23 * Copyright 2020 The Chromium Authors
24 *
25 * Permission is hereby granted, free of charge, to any person obtaining a
26 * copy of this software and associated documentation files (the "Software"),
27 * to deal in the Software without restriction, including without limitation
28 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
29 * and/or sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following conditions:
31 *
32 * The above copyright notice and this permission notice (including the next
33 * paragraph) shall be included in all copies or substantial portions of the
34 * Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
39 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
42 * DEALINGS IN THE SOFTWARE.
43 * </pre>
44 */
45 struct wl_data_offer;
46 struct wl_data_source;
47 struct wl_surface;
48 struct zcr_extended_drag_offer_v1;
49 struct zcr_extended_drag_source_v1;
50 struct zcr_extended_drag_v1;
51
52 #ifndef ZCR_EXTENDED_DRAG_V1_INTERFACE
53 #define ZCR_EXTENDED_DRAG_V1_INTERFACE
54 /**
55 * @page page_iface_zcr_extended_drag_v1 zcr_extended_drag_v1
56 * @section page_iface_zcr_extended_drag_v1_desc Description
57 *
58 * The zcr_extended_drag_v1 interface extends the Wayland drag-and-drop with
59 * features unsurpported by the core protocol. Such as, making toplevel shell
60 * surfaces "draggable", as well as making them "snappable" into and out of
61 * other surfaces as they are dragged around.
62 *
63 * A common use case for this is a Chromium-like tab/window dragging UX,
64 * where the user is able to drag a tab (or any other kind of UI piece) out
65 * of its original window, into a new surface anchored to the pointer cursor,
66 * similar to a regular drag icon but with enhanced and more configurable
67 * capabilities.
68 *
69 * Warning! The protocol described in this file is experimental and
70 * backward incompatible changes may be made. Backward compatible changes
71 * may be added together with the corresponding uinterface version bump.
72 * Backward incompatible changes are done by bumping the version number in
73 * the protocol and uinterface names and resetting the interface version.
74 * Once the protocol is to be declared stable, the 'z' prefix and the
75 * version number in the protocol and interface names are removed and the
76 * interface version number is reset.
77 * @section page_iface_zcr_extended_drag_v1_api API
78 * See @ref iface_zcr_extended_drag_v1.
79 */
80 /**
81 * @defgroup iface_zcr_extended_drag_v1 The zcr_extended_drag_v1 interface
82 *
83 * The zcr_extended_drag_v1 interface extends the Wayland drag-and-drop with
84 * features unsurpported by the core protocol. Such as, making toplevel shell
85 * surfaces "draggable", as well as making them "snappable" into and out of
86 * other surfaces as they are dragged around.
87 *
88 * A common use case for this is a Chromium-like tab/window dragging UX,
89 * where the user is able to drag a tab (or any other kind of UI piece) out
90 * of its original window, into a new surface anchored to the pointer cursor,
91 * similar to a regular drag icon but with enhanced and more configurable
92 * capabilities.
93 *
94 * Warning! The protocol described in this file is experimental and
95 * backward incompatible changes may be made. Backward compatible changes
96 * may be added together with the corresponding uinterface version bump.
97 * Backward incompatible changes are done by bumping the version number in
98 * the protocol and uinterface names and resetting the interface version.
99 * Once the protocol is to be declared stable, the 'z' prefix and the
100 * version number in the protocol and interface names are removed and the
101 * interface version number is reset.
102 */
103 extern const struct wl_interface zcr_extended_drag_v1_interface;
104 #endif
105 #ifndef ZCR_EXTENDED_DRAG_SOURCE_V1_INTERFACE
106 #define ZCR_EXTENDED_DRAG_SOURCE_V1_INTERFACE
107 /**
108 * @page page_iface_zcr_extended_drag_source_v1 zcr_extended_drag_source_v1
109 * @section page_iface_zcr_extended_drag_source_v1_desc Description
110 *
111 * The zcr_extended_drag_source_v1 interface extends the wl_data_source with
112 * features unsurpported by the standard drag-and-drop protocol.
113 * @section page_iface_zcr_extended_drag_source_v1_api API
114 * See @ref iface_zcr_extended_drag_source_v1.
115 */
116 /**
117 * @defgroup iface_zcr_extended_drag_source_v1 The zcr_extended_drag_source_v1 interface
118 *
119 * The zcr_extended_drag_source_v1 interface extends the wl_data_source with
120 * features unsurpported by the standard drag-and-drop protocol.
121 */
122 extern const struct wl_interface zcr_extended_drag_source_v1_interface;
123 #endif
124 #ifndef ZCR_EXTENDED_DRAG_OFFER_V1_INTERFACE
125 #define ZCR_EXTENDED_DRAG_OFFER_V1_INTERFACE
126 /**
127 * @page page_iface_zcr_extended_drag_offer_v1 zcr_extended_drag_offer_v1
128 * @section page_iface_zcr_extended_drag_offer_v1_desc Description
129 *
130 * The zcr_extended_drag_offer_v1 interface extends the wl_data_offer with
131 * features unsurpported by the standard drag-and-drop protocol.
132 * @section page_iface_zcr_extended_drag_offer_v1_api API
133 * See @ref iface_zcr_extended_drag_offer_v1.
134 */
135 /**
136 * @defgroup iface_zcr_extended_drag_offer_v1 The zcr_extended_drag_offer_v1 interface
137 *
138 * The zcr_extended_drag_offer_v1 interface extends the wl_data_offer with
139 * features unsurpported by the standard drag-and-drop protocol.
140 */
141 extern const struct wl_interface zcr_extended_drag_offer_v1_interface;
142 #endif
143
144 #ifndef ZCR_EXTENDED_DRAG_V1_OPTIONS_ENUM
145 #define ZCR_EXTENDED_DRAG_V1_OPTIONS_ENUM
146 /**
147 * @ingroup iface_zcr_extended_drag_v1
148 * extended drag configuration flags.
149 *
150 * Bitmask flags that can be used to configure how the drag session will
151 * operate. By default no additional option is set.
152 *
153 * Source client might set allow_swallow option to tell the compositor that
154 * the dragged UI item can be snapped out and into other surfaces
155 * (swallowed/unswallowed), eg: Chromium's tab dragging UX.
156 *
157 * allow_drop_no_target controls how source and destination clients are
158 * notified when the drop happens, if it is set the DnD operation is
159 * considered successfully finished regardless the drop location (eg:
160 * outside any shell surface or there is no target that can accept it).
161 *
162 * lock_cursor might be used to keep the cursor shape locked during the
163 * extended drag session, regardless current the mime types, dnd action
164 * negotiation status.
165 */
166 enum zcr_extended_drag_v1_options {
167 ZCR_EXTENDED_DRAG_V1_OPTIONS_DEFAULT = 0,
168 ZCR_EXTENDED_DRAG_V1_OPTIONS_ALLOW_SWALLOW = 1,
169 ZCR_EXTENDED_DRAG_V1_OPTIONS_ALLOW_DROP_NO_TARGET = 2,
170 ZCR_EXTENDED_DRAG_V1_OPTIONS_LOCK_CURSOR = 4,
171 };
172 #endif /* ZCR_EXTENDED_DRAG_V1_OPTIONS_ENUM */
173
174 #define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_SOURCE 0
175 #define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_OFFER 1
176
177
178 /**
179 * @ingroup iface_zcr_extended_drag_v1
180 */
181 #define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_SOURCE_SINCE_VERSION 1
182 /**
183 * @ingroup iface_zcr_extended_drag_v1
184 */
185 #define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_OFFER_SINCE_VERSION 1
186
187 /** @ingroup iface_zcr_extended_drag_v1 */
188 static inline void
zcr_extended_drag_v1_set_user_data(struct zcr_extended_drag_v1 * zcr_extended_drag_v1,void * user_data)189 zcr_extended_drag_v1_set_user_data(struct zcr_extended_drag_v1 *zcr_extended_drag_v1, void *user_data)
190 {
191 wl_proxy_set_user_data((struct wl_proxy *) zcr_extended_drag_v1, user_data);
192 }
193
194 /** @ingroup iface_zcr_extended_drag_v1 */
195 static inline void *
zcr_extended_drag_v1_get_user_data(struct zcr_extended_drag_v1 * zcr_extended_drag_v1)196 zcr_extended_drag_v1_get_user_data(struct zcr_extended_drag_v1 *zcr_extended_drag_v1)
197 {
198 return wl_proxy_get_user_data((struct wl_proxy *) zcr_extended_drag_v1);
199 }
200
201 static inline uint32_t
zcr_extended_drag_v1_get_version(struct zcr_extended_drag_v1 * zcr_extended_drag_v1)202 zcr_extended_drag_v1_get_version(struct zcr_extended_drag_v1 *zcr_extended_drag_v1)
203 {
204 return wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_v1);
205 }
206
207 /** @ingroup iface_zcr_extended_drag_v1 */
208 static inline void
zcr_extended_drag_v1_destroy(struct zcr_extended_drag_v1 * zcr_extended_drag_v1)209 zcr_extended_drag_v1_destroy(struct zcr_extended_drag_v1 *zcr_extended_drag_v1)
210 {
211 wl_proxy_destroy((struct wl_proxy *) zcr_extended_drag_v1);
212 }
213
214 /**
215 * @ingroup iface_zcr_extended_drag_v1
216 *
217 * Create an extended drag source object. See zcr_extended_drag_source_v1
218 * interface for details.
219 */
220 static inline struct zcr_extended_drag_source_v1 *
zcr_extended_drag_v1_get_extended_drag_source(struct zcr_extended_drag_v1 * zcr_extended_drag_v1,struct wl_data_source * data_source,uint32_t options)221 zcr_extended_drag_v1_get_extended_drag_source(struct zcr_extended_drag_v1 *zcr_extended_drag_v1, struct wl_data_source *data_source, uint32_t options)
222 {
223 struct wl_proxy *id;
224
225 id = wl_proxy_marshal_flags((struct wl_proxy *) zcr_extended_drag_v1,
226 ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_SOURCE, &zcr_extended_drag_source_v1_interface, wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_v1), 0, NULL, data_source, options);
227
228 return (struct zcr_extended_drag_source_v1 *) id;
229 }
230
231 /**
232 * @ingroup iface_zcr_extended_drag_v1
233 *
234 * Create an extended drag offer object. See zcr_extended_drag_offer_v1
235 * interface for details.
236 */
237 static inline struct zcr_extended_drag_offer_v1 *
zcr_extended_drag_v1_get_extended_drag_offer(struct zcr_extended_drag_v1 * zcr_extended_drag_v1,struct wl_data_offer * data_offer)238 zcr_extended_drag_v1_get_extended_drag_offer(struct zcr_extended_drag_v1 *zcr_extended_drag_v1, struct wl_data_offer *data_offer)
239 {
240 struct wl_proxy *id;
241
242 id = wl_proxy_marshal_flags((struct wl_proxy *) zcr_extended_drag_v1,
243 ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_OFFER, &zcr_extended_drag_offer_v1_interface, wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_v1), 0, NULL, data_offer);
244
245 return (struct zcr_extended_drag_offer_v1 *) id;
246 }
247
248 /**
249 * @ingroup iface_zcr_extended_drag_source_v1
250 * @struct zcr_extended_drag_source_v1_listener
251 */
252 struct zcr_extended_drag_source_v1_listener {
253 /**
254 * the receiving client requested to swallow the drag.
255 *
256 * The receiving client has requested to swallow the dragged
257 * surface. Which, in a drag operation involving 2 or more clients,
258 * can be used to negotiate when the dragged surface is
259 * incorporated (aka: merged) into its UI. See
260 * zcr_extended_drag_offer_v1::swallow request for more details.
261 * @param mime_type mime type to be swallowed by the client
262 */
263 void (*swallow)(void *data,
264 struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1,
265 const char *mime_type);
266 /**
267 * the receiving client requested to unswallow the drag.
268 *
269 * The receiving client has requested to unswallow the dragged
270 * surface. Which, in a drag operation involving more than a single
271 * client, can be used to negotiate when the dragged surface is
272 * snapped out of the receiving client's UI.
273 *
274 * X and Y offsets are expressed in surface-local coordinates, with
275 * no scale applied, and describe how the surface must be
276 * positioned relative to the cursor location, similar to drag icon
277 * offsets in standard DND operations. Note that these coordinates
278 * are local to the unswallowed surface, created and owned by the
279 * source client, so it can be used rightaway to call drag(surface,
280 * x_offset, y_offset) in response to receiving client's request.
281 * @param mime_type mime type accepted by the client
282 * @param x_offset dragged surface x offset
283 * @param y_offset dragged surface y offset
284 */
285 void (*unswallow)(void *data,
286 struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1,
287 const char *mime_type,
288 int32_t x_offset,
289 int32_t y_offset);
290 };
291
292 /**
293 * @ingroup iface_zcr_extended_drag_source_v1
294 */
295 static inline int
zcr_extended_drag_source_v1_add_listener(struct zcr_extended_drag_source_v1 * zcr_extended_drag_source_v1,const struct zcr_extended_drag_source_v1_listener * listener,void * data)296 zcr_extended_drag_source_v1_add_listener(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1,
297 const struct zcr_extended_drag_source_v1_listener *listener, void *data)
298 {
299 return wl_proxy_add_listener((struct wl_proxy *) zcr_extended_drag_source_v1,
300 (void (**)(void)) listener, data);
301 }
302
303 #define ZCR_EXTENDED_DRAG_SOURCE_V1_DESTROY 0
304 #define ZCR_EXTENDED_DRAG_SOURCE_V1_DRAG 1
305
306 /**
307 * @ingroup iface_zcr_extended_drag_source_v1
308 */
309 #define ZCR_EXTENDED_DRAG_SOURCE_V1_SWALLOW_SINCE_VERSION 1
310 /**
311 * @ingroup iface_zcr_extended_drag_source_v1
312 */
313 #define ZCR_EXTENDED_DRAG_SOURCE_V1_UNSWALLOW_SINCE_VERSION 1
314
315 /**
316 * @ingroup iface_zcr_extended_drag_source_v1
317 */
318 #define ZCR_EXTENDED_DRAG_SOURCE_V1_DESTROY_SINCE_VERSION 1
319 /**
320 * @ingroup iface_zcr_extended_drag_source_v1
321 */
322 #define ZCR_EXTENDED_DRAG_SOURCE_V1_DRAG_SINCE_VERSION 1
323
324 /** @ingroup iface_zcr_extended_drag_source_v1 */
325 static inline void
zcr_extended_drag_source_v1_set_user_data(struct zcr_extended_drag_source_v1 * zcr_extended_drag_source_v1,void * user_data)326 zcr_extended_drag_source_v1_set_user_data(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1, void *user_data)
327 {
328 wl_proxy_set_user_data((struct wl_proxy *) zcr_extended_drag_source_v1, user_data);
329 }
330
331 /** @ingroup iface_zcr_extended_drag_source_v1 */
332 static inline void *
zcr_extended_drag_source_v1_get_user_data(struct zcr_extended_drag_source_v1 * zcr_extended_drag_source_v1)333 zcr_extended_drag_source_v1_get_user_data(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1)
334 {
335 return wl_proxy_get_user_data((struct wl_proxy *) zcr_extended_drag_source_v1);
336 }
337
338 static inline uint32_t
zcr_extended_drag_source_v1_get_version(struct zcr_extended_drag_source_v1 * zcr_extended_drag_source_v1)339 zcr_extended_drag_source_v1_get_version(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1)
340 {
341 return wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_source_v1);
342 }
343
344 /**
345 * @ingroup iface_zcr_extended_drag_source_v1
346 */
347 static inline void
zcr_extended_drag_source_v1_destroy(struct zcr_extended_drag_source_v1 * zcr_extended_drag_source_v1)348 zcr_extended_drag_source_v1_destroy(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1)
349 {
350 wl_proxy_marshal_flags((struct wl_proxy *) zcr_extended_drag_source_v1,
351 ZCR_EXTENDED_DRAG_SOURCE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_source_v1), WL_MARSHAL_FLAG_DESTROY);
352 }
353
354 /**
355 * @ingroup iface_zcr_extended_drag_source_v1
356 *
357 * Update the dragged surface. If null is passed, the dragged surface gets
358 * unset, making it to not being moved anymore under the pointer cursor.
359 * Otherwise, it will be set as the dragged surface, making it to be visually
360 * anchored to the pointer cursor. surface is expected to have a toplevel
361 * shell surface role assigned, which allows it to be dropped smoothly into
362 * an arbitrary location of the shell, so turning it instantly into a
363 * regular toplevel window, which not possible with the standard DND
364 * protocol.
365 *
366 * x and y offsets are described in surface-local coordinates, with no
367 * scale applied, that determine how the surface must be positioned
368 * relative to the cursor location, similar to drag icon offsets in
369 * standard DND operations.
370 */
371 static inline void
zcr_extended_drag_source_v1_drag(struct zcr_extended_drag_source_v1 * zcr_extended_drag_source_v1,struct wl_surface * surface,int32_t x_offset,int32_t y_offset)372 zcr_extended_drag_source_v1_drag(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1, struct wl_surface *surface, int32_t x_offset, int32_t y_offset)
373 {
374 wl_proxy_marshal_flags((struct wl_proxy *) zcr_extended_drag_source_v1,
375 ZCR_EXTENDED_DRAG_SOURCE_V1_DRAG, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_source_v1), 0, surface, x_offset, y_offset);
376 }
377
378 #define ZCR_EXTENDED_DRAG_OFFER_V1_DESTROY 0
379 #define ZCR_EXTENDED_DRAG_OFFER_V1_SWALLOW 1
380 #define ZCR_EXTENDED_DRAG_OFFER_V1_UNSWALLOW 2
381
382
383 /**
384 * @ingroup iface_zcr_extended_drag_offer_v1
385 */
386 #define ZCR_EXTENDED_DRAG_OFFER_V1_DESTROY_SINCE_VERSION 1
387 /**
388 * @ingroup iface_zcr_extended_drag_offer_v1
389 */
390 #define ZCR_EXTENDED_DRAG_OFFER_V1_SWALLOW_SINCE_VERSION 1
391 /**
392 * @ingroup iface_zcr_extended_drag_offer_v1
393 */
394 #define ZCR_EXTENDED_DRAG_OFFER_V1_UNSWALLOW_SINCE_VERSION 1
395
396 /** @ingroup iface_zcr_extended_drag_offer_v1 */
397 static inline void
zcr_extended_drag_offer_v1_set_user_data(struct zcr_extended_drag_offer_v1 * zcr_extended_drag_offer_v1,void * user_data)398 zcr_extended_drag_offer_v1_set_user_data(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1, void *user_data)
399 {
400 wl_proxy_set_user_data((struct wl_proxy *) zcr_extended_drag_offer_v1, user_data);
401 }
402
403 /** @ingroup iface_zcr_extended_drag_offer_v1 */
404 static inline void *
zcr_extended_drag_offer_v1_get_user_data(struct zcr_extended_drag_offer_v1 * zcr_extended_drag_offer_v1)405 zcr_extended_drag_offer_v1_get_user_data(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1)
406 {
407 return wl_proxy_get_user_data((struct wl_proxy *) zcr_extended_drag_offer_v1);
408 }
409
410 static inline uint32_t
zcr_extended_drag_offer_v1_get_version(struct zcr_extended_drag_offer_v1 * zcr_extended_drag_offer_v1)411 zcr_extended_drag_offer_v1_get_version(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1)
412 {
413 return wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_offer_v1);
414 }
415
416 /**
417 * @ingroup iface_zcr_extended_drag_offer_v1
418 */
419 static inline void
zcr_extended_drag_offer_v1_destroy(struct zcr_extended_drag_offer_v1 * zcr_extended_drag_offer_v1)420 zcr_extended_drag_offer_v1_destroy(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1)
421 {
422 wl_proxy_marshal_flags((struct wl_proxy *) zcr_extended_drag_offer_v1,
423 ZCR_EXTENDED_DRAG_OFFER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_offer_v1), WL_MARSHAL_FLAG_DESTROY);
424 }
425
426 /**
427 * @ingroup iface_zcr_extended_drag_offer_v1
428 *
429 * Requests the drag source to swallow the dragged surface. This means the
430 * receiving client accepts and will incorporate the dragged surface into
431 * its UI. For example, a browser tab is dragged and snapped to an icon\
432 * grid.
433 */
434 static inline void
zcr_extended_drag_offer_v1_swallow(struct zcr_extended_drag_offer_v1 * zcr_extended_drag_offer_v1,uint32_t serial,const char * mime_type)435 zcr_extended_drag_offer_v1_swallow(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1, uint32_t serial, const char *mime_type)
436 {
437 wl_proxy_marshal_flags((struct wl_proxy *) zcr_extended_drag_offer_v1,
438 ZCR_EXTENDED_DRAG_OFFER_V1_SWALLOW, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_offer_v1), 0, serial, mime_type);
439 }
440
441 /**
442 * @ingroup iface_zcr_extended_drag_offer_v1
443 *
444 * Requests the drag source to unswallow the dragged surface. Which means
445 * that the receiving client wants to undo a previously swallowed dragged
446 * surface, i.e: detach it from its UI.
447 *
448 * X and Y offsets are expressed in surface-local coordinates, with no
449 * scale applied and describe how the surface must be positioned relative
450 * to the cursor location, similar to drag icon offsets in standard DND
451 * operations. Note that these coordinates are local to the currently
452 * focused surface, owned by the receiving client, which may differ from
453 * corresponding offsets at source side (which owns the unswallowed
454 * surface), for instance, when the receiving surface is on a wl_output
455 * with different scale value. Compositor handles such conversion before
456 * delivering the zcr_extended_drag_source_v1::swallow event counterpart
457 * to the source client.
458 */
459 static inline void
zcr_extended_drag_offer_v1_unswallow(struct zcr_extended_drag_offer_v1 * zcr_extended_drag_offer_v1,uint32_t serial,const char * mime_type,int32_t x_offset,int32_t y_offset)460 zcr_extended_drag_offer_v1_unswallow(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1, uint32_t serial, const char *mime_type, int32_t x_offset, int32_t y_offset)
461 {
462 wl_proxy_marshal_flags((struct wl_proxy *) zcr_extended_drag_offer_v1,
463 ZCR_EXTENDED_DRAG_OFFER_V1_UNSWALLOW, NULL, wl_proxy_get_version((struct wl_proxy *) zcr_extended_drag_offer_v1), 0, serial, mime_type, x_offset, y_offset);
464 }
465
466 #ifdef __cplusplus
467 }
468 #endif
469
470 #endif
471