ei_seat

Seat Object

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.

Note that for a client to receive objects of this type, it must announce support for this interface in ei_handshake.interface_version.

Requests

ei_seat.release

Since Version1 Request Opcode0

ei_seat.release()

Notification that the client is no longer interested in this seat. The EIS implementation will release any resources related to this seat and send the ei_seat.destroyed event once complete.

Note that releasing a seat does not guarantee another seat becomes available. In other words, in most single-seat cases, releasing the seat means 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

Bind to the bitmask of capabilities given. The bitmask is zero or more of the masks representing an interface as provided in the ei_seat.capability event. See the ei_seat.capability event documentation for examples.

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
Destructor

Immediately after sending this request, the object is considered destroyed by the EIS implementation. It must no longer be used by the client.

This seat has been removed and a client should release all associated resources.

This ei_seat object will be destroyed by the EIS implementation immmediately 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

A notification that this seat supports devices with the given interface. The interface is mapped to a bitmask by the EIS implementation. A client may then binary OR these bitmasks in ei_seat.bind. In response, the EIS implementation may then create device based on those bound capabilities.

For example, an EIS implementation may map “ei_pointer” to 0x1, “ei_keyboard” to 0x4 and “ei_touchscreen” to 0x8. A client may then ei_seat.bind(0xc) to bind to keyboard and touchscreen but not pointer. Note that as shown in this example the set of masks may be sparse. The value of the mask is contant for the lifetime of the seat but may differ between seats.

Note that seat capabilities only represent a mask of possible capabilities on devices in this seat. A capability that is not available on the seat cannot ever be available on any device in this seat. For example, a seat that only has the pointer and keyboard capabilities can never have a device with the touchscreen capability. It is up to the EIS implementation to decide how many (if any) devices with any given capability exist in this seat.

Only interfaces that the client announced during ei_handshake.interface_version can be a seat capability.

This event is sent multiple times - once per supported interface. The set of capabilities is constant for the lifetime of the seat.

It is a protocol violation to send this event after the ei_seat.done event.

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

Notification that a new device has been added.

This event is only sent if the client announced support for the “ei_device” interface in ei_handshake.interface_version. The interface version is equal or less to the client-supported version in ei_handshake.interface_version for the “ei_device” interface.