wl_seat¤
wayland.wl_seat ¤
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.
Methods:
-
get_pointer
–Return pointer object
-
get_keyboard
–Return keyboard object
-
get_touch
–Return touch object
-
release
–Release the seat object
-
on_capabilities
–Seat capabilities changed.
-
on_name
–Unique identifier for this seat.
capability ¤
error ¤
wl_seat
error values
These errors can be emitted in response to wl_seat requests.
-
missing_capability
–`get_pointer`, `get_keyboard` or `get_touch` called on seat without the matching capability
events
capabilities ¤
capabilities(capabilities: capability) -> None
Seat capabilities changed
This is sent on binding to the seat global or 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.
Parameters:
-
capabilities
¤capability
) –Capabilities of the seat
name ¤
Unique identifier for this seat
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, and should be sent before announcing capabilities. This event 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.
Parameters:
get_pointer ¤
get_pointer() -> wl_pointer
Return pointer object
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.
Returns:
-
wl_pointer
(wl_pointer
) –The created object
get_keyboard ¤
get_keyboard() -> wl_keyboard
Return keyboard object
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.
Returns:
-
wl_keyboard
(wl_keyboard
) –The created object
get_touch ¤
get_touch() -> wl_touch
Return touch object
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.
Returns:
-
wl_touch
(wl_touch
) –The created object
release ¤
release() -> None
Release the seat object
Using this request a client can tell the server that it is not going to use the seat object anymore.
on_capabilities ¤
on_capabilities(capabilities: capability) -> None
Seat capabilities changed.
Override to handle wayland.wl_seat.events.capabilities
.
on_name ¤
on_name(name: str) -> None
Unique identifier for this seat.
Override to handle wayland.wl_seat.events.name
.