ei_seat
Set Of Input Devices That Logically Belong Together
An ei_seat
represents a set of input devices that logically belong together. In most
cases only one seat is present and all input devices on that seat share the same
pointer and keyboard focus.
A seat has potential capabilities, a client is expected to bind to those capabilities. The EIS implementation then creates logical input devices based on the capabilities the client is interested in.
Immediately after creation of the ei_seat
object, the EIS implementation sends a burst
of events with information about this seat. This burst of events is terminated by the
ei_seat.done
event.
Requests
ei_seat.release
Since Version1 Request Opcode0
ei_seat.release()
Informs the EIS implementation that the client is no longer interested
in this seat. The EIS implementation should release any resources
associated with this seat and send the ei_seat.destroyed
event once
finished.
Note that releasing a seat does not guarantee that another seat becomes available. In other words, in most single-seat cases, releasing the seat means that the connection becomes effectively inert.
ei_seat.bind
Since Version1 Request Opcode1
ei_seat.bind(capabilities)
Argument | Type | Summary |
---|---|---|
capabilities | uint64 |
bitmask of the capabilities |
Binds to the given bitmask of capabilities. Each one of the bit values
in the given bitmask must originate from one of the ei_seat.capability
events. See its documentation for more examples.
The EIS implementation should return compatible devices with
ei_seat.device
events.
Binding masks that are not supported in the ei_device
’s interface
version is a client bug and may result in disconnection.
A client may send this request multiple times to adjust the capabilities
it is interested in. If previously-bound capabilities are dropped by the
client, the EIS implementation may ei_device.remove
devices that have
these capabilities.
Events
ei_seat.destroyed
Since Version1 Event Opcode0
ei_seat.destroyed(serial)
Argument | Type | Summary |
---|---|---|
serial | uint32 |
this event’s serial number |
Immediately after sending this request, the object is considered destroyed by the EIS implementation. It must no longer be used by the client.
Informs the client that this seat has been removed, and that it should release all associated resources.
This ei_seat
object will be destroyed by the EIS implementation immediately after
after this event is sent and as such the client must not attempt to use
it after that point.
ei_seat.name
Since Version1 Event Opcode1
ei_seat.name(name)
Argument | Type | Summary |
---|---|---|
name | string |
the seat name |
The name of this seat, if any. This event is optional and sent once immediately after object creation.
It is a protocol violation to send this event after the ei_seat.done
event.
ei_seat.capability
Since Version1 Event Opcode2
ei_seat.capability(mask, interface)
Argument | Type | Summary |
---|---|---|
mask | uint64 |
the mask representing this capability |
interface | string |
the interface name for this capability |
Informs the client that this seat supports devices with the given
interface. The interface must be mapped to a bitmask by the EIS
implementation. The client may apply the binary OR operation onto these
bitmasks in ei_seat.bind
. In response, the EIS implementation may then
create devices based on those bound capabilities.
For example, an EIS implementation may advertise support for
ei_pointer
devices at bitmask 0x1
, ei_keyboard
devices at 0x4
and ei_touchscreen
devices at 0x8
. A client may then execute the
request ``ei_seat.bind(0xC)
to bind to keyboard and touchscreen devices
but not pointing devices.
The EIS implementation must not advertise capabilities for interfaces
that have not been negotiated in the ei_handshake
object.
The EIS implementation may decide which capabilities a given seat has.
After ei_seat.done
, the capabilities are constant for the lifetime of
the seat but may differ between seats. The masks may be sparse bitwise.
This event is sent multiple time for each supported interface, finishing
with ei_seat.done
.
ei_seat.done
Since Version1 Event Opcode3
ei_seat.done()
Notification that the initial burst of events is complete and the client can set up this seat now.
It is a protocol violation to send this event more than once.
ei_seat.device
Since Version1 Event Opcode4
ei_seat.device(device, version)
Argument | Type | Summary |
---|---|---|
device | new_id |
the new device |
version | uint32 |
the interface version |
Informs the client that a new device has been added to the seat.
The EIS implementation must never announce devices that have not been bound to with ei_seat.bind
.
This event is only sent if the client announced support for the
ei_device
interface in ei_handshake.interface_version
. The interface
version is less than or equal to the client-supported version in
ei_handshake.interface_version
for the ei_device
interface.