.TH "wayland::server::zwp_pointer_constraints_v1_t" 3 "Wed May 3 2023" "Version 1.0.0" "Wayland++" \" -*- nroff -*- .ad l .nh .SH NAME wayland::server::zwp_pointer_constraints_v1_t \- constrain the movement of a pointer .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits wayland::server::resource_t\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "std::function< void()> & \fBon_destroy\fP ()" .br .RI "destroy the pointer constraints manager object " .ti -1c .RI "std::function< void(\fBzwp_locked_pointer_v1_t\fP, \fBsurface_t\fP, \fBpointer_t\fP, \fBregion_t\fP, zwp_pointer_constraints_v1_lifetime)> & \fBon_lock_pointer\fP ()" .br .RI "lock pointer to a position " .ti -1c .RI "std::function< void(\fBzwp_confined_pointer_v1_t\fP, \fBsurface_t\fP, \fBpointer_t\fP, \fBregion_t\fP, zwp_pointer_constraints_v1_lifetime)> & \fBon_confine_pointer\fP ()" .br .RI "confine pointer to a region " .ti -1c .RI "void \fBpost_already_constrained\fP (std::string const &msg)" .br .RI "Post error: pointer constraint already requested on that surface\&. " .ti -1c .RI "bool \fBproxy_has_object\fP () const" .br .RI "Check whether this wrapper actually wraps an object\&. " .ti -1c .RI "void \fBpost_no_memory\fP () const" .br .ti -1c .RI "uint32_t \fBget_id\fP () const" .br .ti -1c .RI "client_t \fBget_client\fP () const" .br .ti -1c .RI "unsigned int \fBget_version\fP () const" .br .ti -1c .RI "std::string \fBget_class\fP ()" .br .in -1c .SH "Detailed Description" .PP constrain the movement of a pointer 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\&. .PP 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\&. .PP 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\&. .PP Definition at line \fB2710\fP of file \fBwayland\-server\-protocol\-unstable\&.hpp\fP\&. .SH "Member Function Documentation" .PP .SS "std::string wayland::server::resource_t::get_class ()\fC [inherited]\fP" Retrieve the interface name (class) of a resource object\&. .PP \fBReturns\fP .RS 4 Interface name of the resource object\&. .RE .PP .SS "client_t wayland::server::resource_t::get_client () const\fC [inherited]\fP" Get the associated client .PP \fBReturns\fP .RS 4 the client that owns the resource\&. .RE .PP .SS "uint32_t wayland::server::resource_t::get_id () const\fC [inherited]\fP" Get the internal ID of the resource .PP \fBReturns\fP .RS 4 the internal ID of the resource .RE .PP .SS "unsigned int wayland::server::resource_t::get_version () const\fC [inherited]\fP" Get interface version .PP \fBReturns\fP .RS 4 Interface version this resource has been constructed with\&. .RE .PP .SS "std::function< void(\fBzwp_confined_pointer_v1_t\fP, \fBsurface_t\fP, \fBpointer_t\fP, \fBregion_t\fP, zwp_pointer_constraints_v1_lifetime)> & zwp_pointer_constraints_v1_t::on_confine_pointer ()" .PP confine pointer to a region .PP \fBParameters\fP .RS 4 \fIid\fP .br \fIsurface\fP surface to lock pointer to .br \fIpointer\fP the pointer that should be confined .br \fIregion\fP region of surface .br \fIlifetime\fP confinement lifetime .RE .PP 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\&. .PP 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\&. .PP 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\&. .PP Definition at line \fB5382\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void()> & zwp_pointer_constraints_v1_t::on_destroy ()" .PP destroy the pointer constraints manager object Used by the client to notify the server that it will no longer use this pointer constraints object\&. .PP Definition at line \fB5370\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "std::function< void(\fBzwp_locked_pointer_v1_t\fP, \fBsurface_t\fP, \fBpointer_t\fP, \fBregion_t\fP, zwp_pointer_constraints_v1_lifetime)> & zwp_pointer_constraints_v1_t::on_lock_pointer ()" .PP lock pointer to a position .PP \fBParameters\fP .RS 4 \fIid\fP .br \fIsurface\fP surface to lock pointer to .br \fIpointer\fP the pointer that should be locked .br \fIregion\fP region of surface .br \fIlifetime\fP lock lifetime .RE .PP 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\&. .PP 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\&. .PP 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\&. .PP 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\&. .PP A surface may receive pointer focus without the lock being activated\&. .PP 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\&. .PP 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\&. .PP Definition at line \fB5376\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void zwp_pointer_constraints_v1_t::post_already_constrained (std::string const & msg)" .PP Post error: pointer constraint already requested on that surface\&. .PP Definition at line \fB5388\fP of file \fBwayland\-server\-protocol\-unstable\&.cpp\fP\&. .SS "void wayland::server::resource_t::post_no_memory () const\fC [inherited]\fP" Post 'not enough memory' error to the client .PP If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance\&. .SS "bool wayland::server::resource_t::proxy_has_object () const\fC [inherited]\fP" .PP Check whether this wrapper actually wraps an object\&. .PP \fBReturns\fP .RS 4 true if there is an underlying object, false if this wrapper is empty .RE .PP .SH "Author" .PP Generated automatically by Doxygen for Wayland++ from the source code\&.