#[non_exhaustive]pub enum Event {
Destroyed {
serial: u32,
},
Name {
name: String,
},
Capability {
mask: u64,
interface: String,
},
Done,
Device {
device: Device,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Destroyed
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.
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.
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.
Fields
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.
Device
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.