---
name: "wayland_server_seat_t"
section: "3"
platform: "linux"
package: "waylandpp-dev"
version: "1.0.0-6+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/wayland_server_seat_t"
---

# wayland\_server\_seat\_t(3)

group of input devices

## NAME

wayland::server::seat\_t - 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 **2608** 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

### constexpr std::uint32\_t wayland::server::seat\_t::capabilities\_since\_version = 1` [static]`, ` [constexpr]`

Minimum protocol version required for the **capabilities** function.

Definition at line **2723** of file **wayland-server-protocol.hpp**.

### constexpr std::uint32\_t wayland::server::seat\_t::name\_since\_version = 2` [static]`, ` [constexpr]`

Minimum protocol version required for the **name** function.

Definition at line **2750** of file **wayland-server-protocol.hpp**.

## Author

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