SDL  2.0
pointer-constraints-unstable-v1-client-protocol.h
Go to the documentation of this file.
1 /* Generated by wayland-scanner 1.15.0 */
2 
3 #ifndef POINTER_CONSTRAINTS_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define POINTER_CONSTRAINTS_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_pointer_constraints_unstable_v1 The pointer_constraints_unstable_v1 protocol
16  * protocol for constraining pointer motions
17  *
18  * @section page_desc_pointer_constraints_unstable_v1 Description
19  *
20  * This protocol specifies a set of interfaces used for adding constraints to
21  * the motion of a pointer. Possible constraints include confining pointer
22  * motions to a given region, or locking it to its current position.
23  *
24  * In order to constrain the pointer, a client must first bind the global
25  * interface "wp_pointer_constraints" which, if a compositor supports pointer
26  * constraints, is exposed by the registry. Using the bound global object, the
27  * client uses the request that corresponds to the type of constraint it wants
28  * to make. See wp_pointer_constraints for more details.
29  *
30  * Warning! The protocol described in this file is experimental and backward
31  * incompatible changes may be made. Backward compatible changes may be added
32  * together with the corresponding interface version bump. Backward
33  * incompatible changes are done by bumping the version number in the protocol
34  * and interface names and resetting the interface version. Once the protocol
35  * is to be declared stable, the 'z' prefix and the version number in the
36  * protocol and interface names are removed and the interface version number is
37  * reset.
38  *
39  * @section page_ifaces_pointer_constraints_unstable_v1 Interfaces
40  * - @subpage page_iface_zwp_pointer_constraints_v1 - constrain the movement of a pointer
41  * - @subpage page_iface_zwp_locked_pointer_v1 - receive relative pointer motion events
42  * - @subpage page_iface_zwp_confined_pointer_v1 - confined pointer object
43  * @section page_copyright_pointer_constraints_unstable_v1 Copyright
44  * <pre>
45  *
46  * Copyright © 2014 Jonas Ådahl
47  * Copyright © 2015 Red Hat Inc.
48  *
49  * Permission is hereby granted, free of charge, to any person obtaining a
50  * copy of this software and associated documentation files (the "Software"),
51  * to deal in the Software without restriction, including without limitation
52  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
53  * and/or sell copies of the Software, and to permit persons to whom the
54  * Software is furnished to do so, subject to the following conditions:
55  *
56  * The above copyright notice and this permission notice (including the next
57  * paragraph) shall be included in all copies or substantial portions of the
58  * Software.
59  *
60  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
63  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
65  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
66  * DEALINGS IN THE SOFTWARE.
67  * </pre>
68  */
69 struct wl_pointer;
70 struct wl_region;
71 struct wl_surface;
72 struct zwp_confined_pointer_v1;
73 struct zwp_locked_pointer_v1;
74 struct zwp_pointer_constraints_v1;
75 
76 /**
77  * @page page_iface_zwp_pointer_constraints_v1 zwp_pointer_constraints_v1
78  * @section page_iface_zwp_pointer_constraints_v1_desc Description
79  *
80  * The global interface exposing pointer constraining functionality. It
81  * exposes two requests: lock_pointer for locking the pointer to its
82  * position, and confine_pointer for locking the pointer to a region.
83  *
84  * The lock_pointer and confine_pointer requests create the objects
85  * wp_locked_pointer and wp_confined_pointer respectively, and the client can
86  * use these objects to interact with the lock.
87  *
88  * For any surface, only one lock or confinement may be active across all
89  * wl_pointer objects of the same seat. If a lock or confinement is requested
90  * when another lock or confinement is active or requested on the same surface
91  * and with any of the wl_pointer objects of the same seat, an
92  * 'already_constrained' error will be raised.
93  * @section page_iface_zwp_pointer_constraints_v1_api API
94  * See @ref iface_zwp_pointer_constraints_v1.
95  */
96 /**
97  * @defgroup iface_zwp_pointer_constraints_v1 The zwp_pointer_constraints_v1 interface
98  *
99  * The global interface exposing pointer constraining functionality. It
100  * exposes two requests: lock_pointer for locking the pointer to its
101  * position, and confine_pointer for locking the pointer to a region.
102  *
103  * The lock_pointer and confine_pointer requests create the objects
104  * wp_locked_pointer and wp_confined_pointer respectively, and the client can
105  * use these objects to interact with the lock.
106  *
107  * For any surface, only one lock or confinement may be active across all
108  * wl_pointer objects of the same seat. If a lock or confinement is requested
109  * when another lock or confinement is active or requested on the same surface
110  * and with any of the wl_pointer objects of the same seat, an
111  * 'already_constrained' error will be raised.
112  */
113 extern const struct wl_interface zwp_pointer_constraints_v1_interface;
114 /**
115  * @page page_iface_zwp_locked_pointer_v1 zwp_locked_pointer_v1
116  * @section page_iface_zwp_locked_pointer_v1_desc Description
117  *
118  * The wp_locked_pointer interface represents a locked pointer state.
119  *
120  * While the lock of this object is active, the wl_pointer objects of the
121  * associated seat will not emit any wl_pointer.motion events.
122  *
123  * This object will send the event 'locked' when the lock is activated.
124  * Whenever the lock is activated, it is guaranteed that the locked surface
125  * will already have received pointer focus and that the pointer will be
126  * within the region passed to the request creating this object.
127  *
128  * To unlock the pointer, send the destroy request. This will also destroy
129  * the wp_locked_pointer object.
130  *
131  * If the compositor decides to unlock the pointer the unlocked event is
132  * sent. See wp_locked_pointer.unlock for details.
133  *
134  * When unlocking, the compositor may warp the cursor position to the set
135  * cursor position hint. If it does, it will not result in any relative
136  * motion events emitted via wp_relative_pointer.
137  *
138  * If the surface the lock was requested on is destroyed and the lock is not
139  * yet activated, the wp_locked_pointer object is now defunct and must be
140  * destroyed.
141  * @section page_iface_zwp_locked_pointer_v1_api API
142  * See @ref iface_zwp_locked_pointer_v1.
143  */
144 /**
145  * @defgroup iface_zwp_locked_pointer_v1 The zwp_locked_pointer_v1 interface
146  *
147  * The wp_locked_pointer interface represents a locked pointer state.
148  *
149  * While the lock of this object is active, the wl_pointer objects of the
150  * associated seat will not emit any wl_pointer.motion events.
151  *
152  * This object will send the event 'locked' when the lock is activated.
153  * Whenever the lock is activated, it is guaranteed that the locked surface
154  * will already have received pointer focus and that the pointer will be
155  * within the region passed to the request creating this object.
156  *
157  * To unlock the pointer, send the destroy request. This will also destroy
158  * the wp_locked_pointer object.
159  *
160  * If the compositor decides to unlock the pointer the unlocked event is
161  * sent. See wp_locked_pointer.unlock for details.
162  *
163  * When unlocking, the compositor may warp the cursor position to the set
164  * cursor position hint. If it does, it will not result in any relative
165  * motion events emitted via wp_relative_pointer.
166  *
167  * If the surface the lock was requested on is destroyed and the lock is not
168  * yet activated, the wp_locked_pointer object is now defunct and must be
169  * destroyed.
170  */
171 extern const struct wl_interface zwp_locked_pointer_v1_interface;
172 /**
173  * @page page_iface_zwp_confined_pointer_v1 zwp_confined_pointer_v1
174  * @section page_iface_zwp_confined_pointer_v1_desc Description
175  *
176  * The wp_confined_pointer interface represents a confined pointer state.
177  *
178  * This object will send the event 'confined' when the confinement is
179  * activated. Whenever the confinement is activated, it is guaranteed that
180  * the surface the pointer is confined to will already have received pointer
181  * focus and that the pointer will be within the region passed to the request
182  * creating this object. It is up to the compositor to decide whether this
183  * requires some user interaction and if the pointer will warp to within the
184  * passed region if outside.
185  *
186  * To unconfine the pointer, send the destroy request. This will also destroy
187  * the wp_confined_pointer object.
188  *
189  * If the compositor decides to unconfine the pointer the unconfined event is
190  * sent. The wp_confined_pointer object is at this point defunct and should
191  * be destroyed.
192  * @section page_iface_zwp_confined_pointer_v1_api API
193  * See @ref iface_zwp_confined_pointer_v1.
194  */
195 /**
196  * @defgroup iface_zwp_confined_pointer_v1 The zwp_confined_pointer_v1 interface
197  *
198  * The wp_confined_pointer interface represents a confined pointer state.
199  *
200  * This object will send the event 'confined' when the confinement is
201  * activated. Whenever the confinement is activated, it is guaranteed that
202  * the surface the pointer is confined to will already have received pointer
203  * focus and that the pointer will be within the region passed to the request
204  * creating this object. It is up to the compositor to decide whether this
205  * requires some user interaction and if the pointer will warp to within the
206  * passed region if outside.
207  *
208  * To unconfine the pointer, send the destroy request. This will also destroy
209  * the wp_confined_pointer object.
210  *
211  * If the compositor decides to unconfine the pointer the unconfined event is
212  * sent. The wp_confined_pointer object is at this point defunct and should
213  * be destroyed.
214  */
215 extern const struct wl_interface zwp_confined_pointer_v1_interface;
216 
217 #ifndef ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
218 #define ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
219 /**
220  * @ingroup iface_zwp_pointer_constraints_v1
221  * wp_pointer_constraints error values
222  *
223  * These errors can be emitted in response to wp_pointer_constraints
224  * requests.
225  */
227  /**
228  * pointer constraint already requested on that surface
229  */
231 };
232 #endif /* ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM */
233 
234 #ifndef ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
235 #define ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
236 /**
237  * @ingroup iface_zwp_pointer_constraints_v1
238  * the pointer constraint may reactivate
239  *
240  * A persistent pointer constraint may again reactivate once it has
241  * been deactivated. See the corresponding deactivation event
242  * (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for
243  * details.
244  */
248 };
249 #endif /* ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM */
250 
251 #define ZWP_POINTER_CONSTRAINTS_V1_DESTROY 0
252 #define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER 1
253 #define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER 2
254 
255 
256 /**
257  * @ingroup iface_zwp_pointer_constraints_v1
258  */
259 #define ZWP_POINTER_CONSTRAINTS_V1_DESTROY_SINCE_VERSION 1
260 /**
261  * @ingroup iface_zwp_pointer_constraints_v1
262  */
263 #define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER_SINCE_VERSION 1
264 /**
265  * @ingroup iface_zwp_pointer_constraints_v1
266  */
267 #define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER_SINCE_VERSION 1
268 
269 /** @ingroup iface_zwp_pointer_constraints_v1 */
270 static inline void
271 zwp_pointer_constraints_v1_set_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, void *user_data)
272 {
273  wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_constraints_v1, user_data);
274 }
275 
276 /** @ingroup iface_zwp_pointer_constraints_v1 */
277 static inline void *
278 zwp_pointer_constraints_v1_get_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
279 {
280  return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_constraints_v1);
281 }
282 
283 static inline uint32_t
284 zwp_pointer_constraints_v1_get_version(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
285 {
286  return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_constraints_v1);
287 }
288 
289 /**
290  * @ingroup iface_zwp_pointer_constraints_v1
291  *
292  * Used by the client to notify the server that it will no longer use this
293  * pointer constraints object.
294  */
295 static inline void
296 zwp_pointer_constraints_v1_destroy(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
297 {
298  wl_proxy_marshal((struct wl_proxy *) zwp_pointer_constraints_v1,
300 
301  wl_proxy_destroy((struct wl_proxy *) zwp_pointer_constraints_v1);
302 }
303 
304 /**
305  * @ingroup iface_zwp_pointer_constraints_v1
306  *
307  * The lock_pointer request lets the client request to disable movements of
308  * the virtual pointer (i.e. the cursor), effectively locking the pointer
309  * to a position. This request may not take effect immediately; in the
310  * future, when the compositor deems implementation-specific constraints
311  * are satisfied, the pointer lock will be activated and the compositor
312  * sends a locked event.
313  *
314  * The protocol provides no guarantee that the constraints are ever
315  * satisfied, and does not require the compositor to send an error if the
316  * constraints cannot ever be satisfied. It is thus possible to request a
317  * lock that will never activate.
318  *
319  * There may not be another pointer constraint of any kind requested or
320  * active on the surface for any of the wl_pointer objects of the seat of
321  * the passed pointer when requesting a lock. If there is, an error will be
322  * raised. See general pointer lock documentation for more details.
323  *
324  * The intersection of the region passed with this request and the input
325  * region of the surface is used to determine where the pointer must be
326  * in order for the lock to activate. It is up to the compositor whether to
327  * warp the pointer or require some kind of user interaction for the lock
328  * to activate. If the region is null the surface input region is used.
329  *
330  * A surface may receive pointer focus without the lock being activated.
331  *
332  * The request creates a new object wp_locked_pointer which is used to
333  * interact with the lock as well as receive updates about its state. See
334  * the the description of wp_locked_pointer for further information.
335  *
336  * Note that while a pointer is locked, the wl_pointer objects of the
337  * corresponding seat will not emit any wl_pointer.motion events, but
338  * relative motion events will still be emitted via wp_relative_pointer
339  * objects of the same seat. wl_pointer.axis and wl_pointer.button events
340  * are unaffected.
341  */
342 static inline struct zwp_locked_pointer_v1 *
343 zwp_pointer_constraints_v1_lock_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
344 {
345  struct wl_proxy *id;
346 
347  id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_constraints_v1,
348  ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER, &zwp_locked_pointer_v1_interface, NULL, surface, pointer, region, lifetime);
349 
350  return (struct zwp_locked_pointer_v1 *) id;
351 }
352 
353 /**
354  * @ingroup iface_zwp_pointer_constraints_v1
355  *
356  * The confine_pointer request lets the client request to confine the
357  * pointer cursor to a given region. This request may not take effect
358  * immediately; in the future, when the compositor deems implementation-
359  * specific constraints are satisfied, the pointer confinement will be
360  * activated and the compositor sends a confined event.
361  *
362  * The intersection of the region passed with this request and the input
363  * region of the surface is used to determine where the pointer must be
364  * in order for the confinement to activate. It is up to the compositor
365  * whether to warp the pointer or require some kind of user interaction for
366  * the confinement to activate. If the region is null the surface input
367  * region is used.
368  *
369  * The request will create a new object wp_confined_pointer which is used
370  * to interact with the confinement as well as receive updates about its
371  * state. See the the description of wp_confined_pointer for further
372  * information.
373  */
374 static inline struct zwp_confined_pointer_v1 *
375 zwp_pointer_constraints_v1_confine_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
376 {
377  struct wl_proxy *id;
378 
379  id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_constraints_v1,
381 
382  return (struct zwp_confined_pointer_v1 *) id;
383 }
384 
385 /**
386  * @ingroup iface_zwp_locked_pointer_v1
387  * @struct zwp_locked_pointer_v1_listener
388  */
390  /**
391  * lock activation event
392  *
393  * Notification that the pointer lock of the seat's pointer is
394  * activated.
395  */
396  void (*locked)(void *data,
397  struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1);
398  /**
399  * lock deactivation event
400  *
401  * Notification that the pointer lock of the seat's pointer is no
402  * longer active. If this is a oneshot pointer lock (see
403  * wp_pointer_constraints.lifetime) this object is now defunct and
404  * should be destroyed. If this is a persistent pointer lock (see
405  * wp_pointer_constraints.lifetime) this pointer lock may again
406  * reactivate in the future.
407  */
408  void (*unlocked)(void *data,
409  struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1);
410 };
411 
412 /**
413  * @ingroup iface_zwp_locked_pointer_v1
414  */
415 static inline int
416 zwp_locked_pointer_v1_add_listener(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1,
417  const struct zwp_locked_pointer_v1_listener *listener, void *data)
418 {
419  return wl_proxy_add_listener((struct wl_proxy *) zwp_locked_pointer_v1,
420  (void (**)(void)) listener, data);
421 }
422 
423 #define ZWP_LOCKED_POINTER_V1_DESTROY 0
424 #define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT 1
425 #define ZWP_LOCKED_POINTER_V1_SET_REGION 2
426 
427 /**
428  * @ingroup iface_zwp_locked_pointer_v1
429  */
430 #define ZWP_LOCKED_POINTER_V1_LOCKED_SINCE_VERSION 1
431 /**
432  * @ingroup iface_zwp_locked_pointer_v1
433  */
434 #define ZWP_LOCKED_POINTER_V1_UNLOCKED_SINCE_VERSION 1
435 
436 /**
437  * @ingroup iface_zwp_locked_pointer_v1
438  */
439 #define ZWP_LOCKED_POINTER_V1_DESTROY_SINCE_VERSION 1
440 /**
441  * @ingroup iface_zwp_locked_pointer_v1
442  */
443 #define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT_SINCE_VERSION 1
444 /**
445  * @ingroup iface_zwp_locked_pointer_v1
446  */
447 #define ZWP_LOCKED_POINTER_V1_SET_REGION_SINCE_VERSION 1
448 
449 /** @ingroup iface_zwp_locked_pointer_v1 */
450 static inline void
451 zwp_locked_pointer_v1_set_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, void *user_data)
452 {
453  wl_proxy_set_user_data((struct wl_proxy *) zwp_locked_pointer_v1, user_data);
454 }
455 
456 /** @ingroup iface_zwp_locked_pointer_v1 */
457 static inline void *
458 zwp_locked_pointer_v1_get_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
459 {
460  return wl_proxy_get_user_data((struct wl_proxy *) zwp_locked_pointer_v1);
461 }
462 
463 static inline uint32_t
464 zwp_locked_pointer_v1_get_version(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
465 {
466  return wl_proxy_get_version((struct wl_proxy *) zwp_locked_pointer_v1);
467 }
468 
469 /**
470  * @ingroup iface_zwp_locked_pointer_v1
471  *
472  * Destroy the locked pointer object. If applicable, the compositor will
473  * unlock the pointer.
474  */
475 static inline void
476 zwp_locked_pointer_v1_destroy(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
477 {
478  wl_proxy_marshal((struct wl_proxy *) zwp_locked_pointer_v1,
480 
481  wl_proxy_destroy((struct wl_proxy *) zwp_locked_pointer_v1);
482 }
483 
484 /**
485  * @ingroup iface_zwp_locked_pointer_v1
486  *
487  * Set the cursor position hint relative to the top left corner of the
488  * surface.
489  *
490  * If the client is drawing its own cursor, it should update the position
491  * hint to the position of its own cursor. A compositor may use this
492  * information to warp the pointer upon unlock in order to avoid pointer
493  * jumps.
494  *
495  * The cursor position hint is double buffered. The new hint will only take
496  * effect when the associated surface gets it pending state applied. See
497  * wl_surface.commit for details.
498  */
499 static inline void
500 zwp_locked_pointer_v1_set_cursor_position_hint(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, wl_fixed_t surface_x, wl_fixed_t surface_y)
501 {
502  wl_proxy_marshal((struct wl_proxy *) zwp_locked_pointer_v1,
503  ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT, surface_x, surface_y);
504 }
505 
506 /**
507  * @ingroup iface_zwp_locked_pointer_v1
508  *
509  * Set a new region used to lock the pointer.
510  *
511  * The new lock region is double-buffered. The new lock region will
512  * only take effect when the associated surface gets its pending state
513  * applied. See wl_surface.commit for details.
514  *
515  * For details about the lock region, see wp_locked_pointer.
516  */
517 static inline void
518 zwp_locked_pointer_v1_set_region(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, struct wl_region *region)
519 {
520  wl_proxy_marshal((struct wl_proxy *) zwp_locked_pointer_v1,
522 }
523 
524 /**
525  * @ingroup iface_zwp_confined_pointer_v1
526  * @struct zwp_confined_pointer_v1_listener
527  */
529  /**
530  * pointer confined
531  *
532  * Notification that the pointer confinement of the seat's
533  * pointer is activated.
534  */
535  void (*confined)(void *data,
536  struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1);
537  /**
538  * pointer unconfined
539  *
540  * Notification that the pointer confinement of the seat's
541  * pointer is no longer active. If this is a oneshot pointer
542  * confinement (see wp_pointer_constraints.lifetime) this object is
543  * now defunct and should be destroyed. If this is a persistent
544  * pointer confinement (see wp_pointer_constraints.lifetime) this
545  * pointer confinement may again reactivate in the future.
546  */
547  void (*unconfined)(void *data,
548  struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1);
549 };
550 
551 /**
552  * @ingroup iface_zwp_confined_pointer_v1
553  */
554 static inline int
555 zwp_confined_pointer_v1_add_listener(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1,
556  const struct zwp_confined_pointer_v1_listener *listener, void *data)
557 {
558  return wl_proxy_add_listener((struct wl_proxy *) zwp_confined_pointer_v1,
559  (void (**)(void)) listener, data);
560 }
561 
562 #define ZWP_CONFINED_POINTER_V1_DESTROY 0
563 #define ZWP_CONFINED_POINTER_V1_SET_REGION 1
564 
565 /**
566  * @ingroup iface_zwp_confined_pointer_v1
567  */
568 #define ZWP_CONFINED_POINTER_V1_CONFINED_SINCE_VERSION 1
569 /**
570  * @ingroup iface_zwp_confined_pointer_v1
571  */
572 #define ZWP_CONFINED_POINTER_V1_UNCONFINED_SINCE_VERSION 1
573 
574 /**
575  * @ingroup iface_zwp_confined_pointer_v1
576  */
577 #define ZWP_CONFINED_POINTER_V1_DESTROY_SINCE_VERSION 1
578 /**
579  * @ingroup iface_zwp_confined_pointer_v1
580  */
581 #define ZWP_CONFINED_POINTER_V1_SET_REGION_SINCE_VERSION 1
582 
583 /** @ingroup iface_zwp_confined_pointer_v1 */
584 static inline void
585 zwp_confined_pointer_v1_set_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, void *user_data)
586 {
587  wl_proxy_set_user_data((struct wl_proxy *) zwp_confined_pointer_v1, user_data);
588 }
589 
590 /** @ingroup iface_zwp_confined_pointer_v1 */
591 static inline void *
592 zwp_confined_pointer_v1_get_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
593 {
594  return wl_proxy_get_user_data((struct wl_proxy *) zwp_confined_pointer_v1);
595 }
596 
597 static inline uint32_t
598 zwp_confined_pointer_v1_get_version(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
599 {
600  return wl_proxy_get_version((struct wl_proxy *) zwp_confined_pointer_v1);
601 }
602 
603 /**
604  * @ingroup iface_zwp_confined_pointer_v1
605  *
606  * Destroy the confined pointer object. If applicable, the compositor will
607  * unconfine the pointer.
608  */
609 static inline void
610 zwp_confined_pointer_v1_destroy(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
611 {
612  wl_proxy_marshal((struct wl_proxy *) zwp_confined_pointer_v1,
614 
615  wl_proxy_destroy((struct wl_proxy *) zwp_confined_pointer_v1);
616 }
617 
618 /**
619  * @ingroup iface_zwp_confined_pointer_v1
620  *
621  * Set a new region used to confine the pointer.
622  *
623  * The new confine region is double-buffered. The new confine region will
624  * only take effect when the associated surface gets its pending state
625  * applied. See wl_surface.commit for details.
626  *
627  * If the confinement is active when the new confinement region is applied
628  * and the pointer ends up outside of newly applied region, the pointer may
629  * warped to a position within the new confinement region. If warped, a
630  * wl_pointer.motion event will be emitted, but no
631  * wp_relative_pointer.relative_motion event.
632  *
633  * The compositor may also, instead of using the new region, unconfine the
634  * pointer.
635  *
636  * For details about the confine region, see wp_confined_pointer.
637  */
638 static inline void
639 zwp_confined_pointer_v1_set_region(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, struct wl_region *region)
640 {
641  wl_proxy_marshal((struct wl_proxy *) zwp_confined_pointer_v1,
643 }
644 
645 #ifdef __cplusplus
646 }
647 #endif
648 
649 #endif
GLuint id
static void zwp_confined_pointer_v1_set_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, void *user_data)
static void zwp_locked_pointer_v1_set_cursor_position_hint(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, wl_fixed_t surface_x, wl_fixed_t surface_y)
const struct wl_interface zwp_confined_pointer_v1_interface
EGLSurface surface
Definition: eglext.h:248
static void * zwp_confined_pointer_v1_get_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
static void zwp_confined_pointer_v1_destroy(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
static void zwp_confined_pointer_v1_set_region(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, struct wl_region *region)
#define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT
void(* unlocked)(void *data, struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
const struct wl_interface zwp_pointer_constraints_v1_interface
static void zwp_locked_pointer_v1_set_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, void *user_data)
static uint32_t zwp_confined_pointer_v1_get_version(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
static void zwp_pointer_constraints_v1_destroy(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
static struct zwp_locked_pointer_v1 * zwp_pointer_constraints_v1_lock_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
static uint32_t zwp_pointer_constraints_v1_get_version(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
const struct wl_interface zwp_locked_pointer_v1_interface
static void zwp_locked_pointer_v1_set_region(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, struct wl_region *region)
static struct zwp_confined_pointer_v1 * zwp_pointer_constraints_v1_confine_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
GLsizei const void * pointer
static void * zwp_pointer_constraints_v1_get_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
#define NULL
Definition: begin_code.h:164
static int zwp_locked_pointer_v1_add_listener(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, const struct zwp_locked_pointer_v1_listener *listener, void *data)
static void zwp_pointer_constraints_v1_set_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, void *user_data)
unsigned int uint32_t
static uint32_t zwp_locked_pointer_v1_get_version(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
static void zwp_locked_pointer_v1_destroy(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
void(* locked)(void *data, struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
static void * zwp_locked_pointer_v1_get_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
static int zwp_confined_pointer_v1_add_listener(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, const struct zwp_confined_pointer_v1_listener *listener, void *data)