KiCad PCB EDA Suite
Loading...
Searching...
No Matches
The zwp_pointer_constraints_v1 interface

The global interface exposing pointer constraining functionality. More...

Macros

#define ZWP_POINTER_CONSTRAINTS_V1_DESTROY_SINCE_VERSION   1
 
#define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER_SINCE_VERSION   1
 
#define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER_SINCE_VERSION   1
 

Enumerations

enum  zwp_pointer_constraints_v1_error { ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED = 1 }
 wp_pointer_constraints error values More...
 
enum  zwp_pointer_constraints_v1_lifetime { ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT = 1 , ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT = 2 }
 constraint lifetime More...
 

Functions

static void zwp_pointer_constraints_v1_set_user_data (struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, void *user_data)
 
static void * zwp_pointer_constraints_v1_get_user_data (struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
 
static void zwp_pointer_constraints_v1_destroy (struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
 Used by the client to notify the server that it will no longer use this pointer constraints object.
 
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)
 The lock_pointer request lets the client request to disable movements of the virtual pointer (i.e.
 
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)
 The confine_pointer request lets the client request to confine the pointer cursor to a given region.
 

Detailed Description

The global interface exposing pointer constraining functionality.

It exposes two requests: lock_pointer for locking the pointer to its position, and confine_pointer for locking the pointer to a region.

The lock_pointer and confine_pointer requests create the objects wp_locked_pointer and wp_confined_pointer respectively, and the client can use these objects to interact with the lock.

For any surface, only one lock or confinement may be active across all wl_pointer objects of the same seat. If a lock or confinement is requested when another lock or confinement is active or requested on the same surface and with any of the wl_pointer objects of the same seat, an 'already_constrained' error will be raised.

Macro Definition Documentation

◆ ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER_SINCE_VERSION

#define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER_SINCE_VERSION   1

Definition at line 291 of file wayland-pointer-constraints-unstable-v1.h.

◆ ZWP_POINTER_CONSTRAINTS_V1_DESTROY_SINCE_VERSION

#define ZWP_POINTER_CONSTRAINTS_V1_DESTROY_SINCE_VERSION   1

Definition at line 283 of file wayland-pointer-constraints-unstable-v1.h.

◆ ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER_SINCE_VERSION

#define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER_SINCE_VERSION   1

Definition at line 287 of file wayland-pointer-constraints-unstable-v1.h.

Enumeration Type Documentation

◆ zwp_pointer_constraints_v1_error

wp_pointer_constraints error values

These errors can be emitted in response to wp_pointer_constraints requests.

Enumerator
ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED 

pointer constraint already requested on that surface

Definition at line 235 of file wayland-pointer-constraints-unstable-v1.h.

◆ zwp_pointer_constraints_v1_lifetime

constraint lifetime

These values represent different lifetime semantics. They are passed as arguments to the factory requests to specify how the constraint lifetimes should be managed.

Enumerator
ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT 

the pointer constraint is defunct once deactivated

A oneshot pointer constraint will never reactivate once it has been deactivated. See the corresponding deactivation event (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for details.

ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT 

the pointer constraint may reactivate

A persistent pointer constraint may again reactivate once it has been deactivated. See the corresponding deactivation event (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined) for details.

Definition at line 253 of file wayland-pointer-constraints-unstable-v1.h.

Function Documentation

◆ zwp_pointer_constraints_v1_confine_pointer()

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 
)
inlinestatic

The confine_pointer request lets the client request to confine the pointer cursor to a given region.

This request may not take effect immediately; in the future, when the compositor deems implementation- specific constraints are satisfied, the pointer confinement will be activated and the compositor sends a confined event.

The intersection of the region passed with this request and the input region of the surface is used to determine where the pointer must be in order for the confinement to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the confinement to activate. If the region is null the surface input region is used.

The request will create a new object wp_confined_pointer which is used to interact with the confinement as well as receive updates about its state. See the the description of wp_confined_pointer for further information.

Definition at line 397 of file wayland-pointer-constraints-unstable-v1.h.

References zwp_confined_pointer_v1_interface, and ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER.

◆ zwp_pointer_constraints_v1_destroy()

static void zwp_pointer_constraints_v1_destroy ( struct zwp_pointer_constraints_v1 *  zwp_pointer_constraints_v1)
inlinestatic

Used by the client to notify the server that it will no longer use this pointer constraints object.

Definition at line 320 of file wayland-pointer-constraints-unstable-v1.h.

References ZWP_POINTER_CONSTRAINTS_V1_DESTROY.

◆ zwp_pointer_constraints_v1_get_user_data()

static void * zwp_pointer_constraints_v1_get_user_data ( struct zwp_pointer_constraints_v1 *  zwp_pointer_constraints_v1)
inlinestatic

Definition at line 302 of file wayland-pointer-constraints-unstable-v1.h.

◆ zwp_pointer_constraints_v1_lock_pointer()

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 
)
inlinestatic

The lock_pointer request lets the client request to disable movements of the virtual pointer (i.e.

the cursor), effectively locking the pointer to a position. This request may not take effect immediately; in the future, when the compositor deems implementation-specific constraints are satisfied, the pointer lock will be activated and the compositor sends a locked event.

The protocol provides no guarantee that the constraints are ever satisfied, and does not require the compositor to send an error if the constraints cannot ever be satisfied. It is thus possible to request a lock that will never activate.

There may not be another pointer constraint of any kind requested or active on the surface for any of the wl_pointer objects of the seat of the passed pointer when requesting a lock. If there is, an error will be raised. See general pointer lock documentation for more details.

The intersection of the region passed with this request and the input region of the surface is used to determine where the pointer must be in order for the lock to activate. It is up to the compositor whether to warp the pointer or require some kind of user interaction for the lock to activate. If the region is null the surface input region is used.

A surface may receive pointer focus without the lock being activated.

The request creates a new object wp_locked_pointer which is used to interact with the lock as well as receive updates about its state. See the the description of wp_locked_pointer for further information.

Note that while a pointer is locked, the wl_pointer objects of the corresponding seat will not emit any wl_pointer.motion events, but relative motion events will still be emitted via wp_relative_pointer objects of the same seat. wl_pointer.axis and wl_pointer.button events are unaffected.

Definition at line 365 of file wayland-pointer-constraints-unstable-v1.h.

References zwp_locked_pointer_v1_interface, and ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER.

◆ zwp_pointer_constraints_v1_set_user_data()

static void zwp_pointer_constraints_v1_set_user_data ( struct zwp_pointer_constraints_v1 *  zwp_pointer_constraints_v1,
void *  user_data 
)
inlinestatic

Definition at line 295 of file wayland-pointer-constraints-unstable-v1.h.