Wayland++ 1.0.0
C++ Bindings for Wayland
|
confined pointer object More...
#include <wayland-server-protocol-unstable.hpp>
Public Member Functions | |
std::function< void()> & | on_destroy () |
destroy the confined pointer object | |
std::function< void(region_t)> & | on_set_region () |
set a new confine region | |
void | confined (bool post=true) |
pointer confined | |
void | unconfined (bool post=true) |
pointer unconfined | |
bool | proxy_has_object () const |
Check whether this wrapper actually wraps an object. | |
void | post_no_memory () const |
uint32_t | get_id () const |
client_t | get_client () const |
unsigned int | get_version () const |
std::string | get_class () |
Static Public Attributes | |
static constexpr std::uint32_t | confined_since_version = 1 |
Minimum protocol version required for the confined function. | |
static constexpr std::uint32_t | unconfined_since_version = 1 |
Minimum protocol version required for the unconfined function. | |
confined pointer object
The wp_confined_pointer interface represents a confined pointer state.
This object will send the event 'confined' when the confinement is activated. Whenever the confinement is activated, it is guaranteed that the surface the pointer is confined to will already have received pointer focus and that the pointer will be within the region passed to the request creating this object. It is up to the compositor to decide whether this requires some user interaction and if the pointer will warp to within the passed region if outside.
To unconfine the pointer, send the destroy request. This will also destroy the wp_confined_pointer object.
If the compositor decides to unconfine the pointer the unconfined event is sent. The wp_confined_pointer object is at this point defunct and should be destroyed.
Definition at line 3002 of file wayland-server-protocol-unstable.hpp.
void zwp_confined_pointer_v1_t::confined | ( | bool | post = true | ) |
pointer confined
Notification that the pointer confinement of the seat's pointer is activated.
Definition at line 5509 of file wayland-server-protocol-unstable.cpp.
|
inherited |
Retrieve the interface name (class) of a resource object.
|
inherited |
Get the associated client
|
inherited |
Get the internal ID of the resource
|
inherited |
Get interface version
std::function< void()> & zwp_confined_pointer_v1_t::on_destroy | ( | ) |
destroy the confined pointer object
Destroy the confined pointer object. If applicable, the compositor will unconfine the pointer.
Definition at line 5497 of file wayland-server-protocol-unstable.cpp.
std::function< void(region_t)> & zwp_confined_pointer_v1_t::on_set_region | ( | ) |
set a new confine region
region | region of surface |
Set a new region used to confine the pointer.
The new confine region is double-buffered. The new confine region will only take effect when the associated surface gets its pending state applied. See wl_surface.commit for details.
If the confinement is active when the new confinement region is applied and the pointer ends up outside of newly applied region, the pointer may warped to a position within the new confinement region. If warped, a wl_pointer.motion event will be emitted, but no wp_relative_pointer.relative_motion event.
The compositor may also, instead of using the new region, unconfine the pointer.
For details about the confine region, see wp_confined_pointer.
Definition at line 5503 of file wayland-server-protocol-unstable.cpp.
|
inherited |
Post "not enough memory" error to the client
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.
|
inherited |
Check whether this wrapper actually wraps an object.
void zwp_confined_pointer_v1_t::unconfined | ( | bool | post = true | ) |
pointer unconfined
Notification that the pointer confinement of the seat's pointer is no longer active. If this is a oneshot pointer confinement (see wp_pointer_constraints.lifetime) this object is now defunct and should be destroyed. If this is a persistent pointer confinement (see wp_pointer_constraints.lifetime) this pointer confinement may again reactivate in the future.
Definition at line 5514 of file wayland-server-protocol-unstable.cpp.
|
staticconstexpr |
Minimum protocol version required for the confined function.
Definition at line 3070 of file wayland-server-protocol-unstable.hpp.
|
staticconstexpr |
Minimum protocol version required for the unconfined function.
Definition at line 3086 of file wayland-server-protocol-unstable.hpp.