wayland_server_seat_t - Man Page

group of input devices

Synopsis

#include <wayland-server-protocol.hpp>

Inherits wayland::server::resource_t.

Public Member Functions

std::function< void(pointer_t)> & on_get_pointer ()
return pointer object
std::function< void(keyboard_t)> & on_get_keyboard ()
return keyboard object
std::function< void(touch_t)> & on_get_touch ()
return touch object
std::function< void()> & on_release ()
release the seat object
void capabilities (seat_capability const &capabilities, bool post=true)
seat capabilities changed
void name (std::string const &name, bool post=true)
unique identifier for this seat
bool can_name () const
Check whether the name function is available with the currently bound version of the protocol.
void post_missing_capability (std::string const &msg)
Post error: get_pointer, get_keyboard or get_touch called on seat without the matching capability.
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 capabilities_since_version = 1
Minimum protocol version required for the capabilities function.
static constexpr std::uint32_t name_since_version = 2
Minimum protocol version required for the name function.

Detailed Description

group of input devices

A seat is a group of keyboards, pointer and touch devices. This object is published as a global during start up, or when such a device is hot plugged. A seat typically has a pointer and maintains a keyboard focus and a pointer focus.

Definition at line 2609 of file wayland-server-protocol.hpp.

Member Function Documentation

bool seat_t::can_name () const

Check whether the name function is available with the currently bound version of the protocol.

Definition at line 2601 of file wayland-server-protocol.cpp.

void seat_t::capabilities (seat_capability const & capabilities, bool post = true)

seat capabilities changed

Parameters

capabilities capabilities of the seat

This is emitted whenever a seat gains or loses the pointer, keyboard or touch capabilities. The argument is a capability enum containing the complete set of capabilities this seat has.

When the pointer capability is added, a client may create a wl_pointer object using the wl_seat.get_pointer request. This object will receive pointer events until the capability is removed in the future.

When the pointer capability is removed, a client should destroy the wl_pointer objects associated with the seat where the capability was removed, using the wl_pointer.release request. No further pointer events will be received on these objects.

In some compositors, if a seat regains the pointer capability and a client has a previously obtained wl_pointer object of version 4 or less, that object may start sending pointer events again. This behavior is considered a misinterpretation of the intended behavior and must not be relied upon by the client. wl_pointer objects of version 5 or later must not send events if created before the most recent event notifying the client of an added pointer capability.

The above behavior also applies to wl_keyboard and wl_touch with the keyboard and touch capabilities, respectively.

Definition at line 2591 of file wayland-server-protocol.cpp.

std::string wayland::server::resource_t::get_class () [inherited]

Retrieve the interface name (class) of a resource object.

Returns

Interface name of the resource object.

client_t wayland::server::resource_t::get_client () const [inherited]

Get the associated client

Returns

the client that owns the resource.

uint32_t wayland::server::resource_t::get_id () const [inherited]

Get the internal ID of the resource

Returns

the internal ID of the resource

unsigned int wayland::server::resource_t::get_version () const [inherited]

Get interface version

Returns

Interface version this resource has been constructed with.

void seat_t::name (std::string const & name, bool post = true)

unique identifier for this seat

Parameters

name seat identifier

In a multi-seat configuration the seat name can be used by clients to help identify which physical devices the seat represents.

The seat name is a UTF-8 string with no convention defined for its contents. Each name is unique among all wl_seat globals. The name is only guaranteed to be unique for the current compositor instance.

The same seat names are used for all clients. Thus, the name can be shared across processes to refer to a specific wl_seat global.

The name event is sent after binding to the seat global. This event is only sent once per seat object, and the name does not change over the lifetime of the wl_seat global.

Compositors may re-use the same seat name if the wl_seat global is destroyed and re-created later.

Definition at line 2596 of file wayland-server-protocol.cpp.

std::function< void(keyboard_t)> & seat_t::on_get_keyboard ()

return keyboard object

Parameters

id seat keyboard

The ID provided will be initialized to the wl_keyboard interface for this seat.

This request only takes effect if the seat has the keyboard capability, or has had the keyboard capability in the past. It is a protocol violation to issue this request on a seat that has never had the keyboard capability. The missing_capability error will be sent in this case.

Definition at line 2573 of file wayland-server-protocol.cpp.

std::function< void(pointer_t)> & seat_t::on_get_pointer ()

return pointer object

Parameters

id seat pointer

The ID provided will be initialized to the wl_pointer interface for this seat.

This request only takes effect if the seat has the pointer capability, or has had the pointer capability in the past. It is a protocol violation to issue this request on a seat that has never had the pointer capability. The missing_capability error will be sent in this case.

Definition at line 2567 of file wayland-server-protocol.cpp.

std::function< void(touch_t)> & seat_t::on_get_touch ()

return touch object

Parameters

id seat touch interface

The ID provided will be initialized to the wl_touch interface for this seat.

This request only takes effect if the seat has the touch capability, or has had the touch capability in the past. It is a protocol violation to issue this request on a seat that has never had the touch capability. The missing_capability error will be sent in this case.

Definition at line 2579 of file wayland-server-protocol.cpp.

std::function< void()> & seat_t::on_release ()

release the seat object Using this request a client can tell the server that it is not going to use the seat object anymore.

Definition at line 2585 of file wayland-server-protocol.cpp.

void seat_t::post_missing_capability (std::string const & msg)

Post error: get_pointer, get_keyboard or get_touch called on seat without the matching capability.

Definition at line 2606 of file wayland-server-protocol.cpp.

void wayland::server::resource_t::post_no_memory () const [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.

bool wayland::server::resource_t::proxy_has_object () const [inherited]

Check whether this wrapper actually wraps an object.

Returns

true if there is an underlying object, false if this wrapper is empty

Member Data Documentation

std::uint32_t wayland::server::seat_t::capabilities_since_version = 1 [static], [constexpr]

Minimum protocol version required for the capabilities function.

Definition at line 2724 of file wayland-server-protocol.hpp.

std::uint32_t wayland::server::seat_t::name_since_version = 2 [static], [constexpr]

Minimum protocol version required for the name function.

Definition at line 2751 of file wayland-server-protocol.hpp.

Author

Generated automatically by Doxygen for Wayland++ from the source code.

Info

Sat Jul 20 2024 00:00:00 Version 1.0.0 Wayland++