pub struct Seat(/* private fields */);Implementations§
source§impl Seat
impl Seat
sourcepub fn destroyed(&self, serial: u32)
pub fn destroyed(&self, serial: u32)
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.
sourcepub fn name(&self, name: &str)
pub fn name(&self, name: &str)
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.
sourcepub fn capability(&self, mask: u64, interface: &str)
pub fn capability(&self, mask: u64, interface: &str)
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.
sourcepub fn done(&self)
pub fn done(&self)
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.
sourcepub fn device(&self, version: u32) -> Device
pub fn device(&self, version: u32) -> 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.
Trait Implementations§
impl Eq for Seat
impl StructuralPartialEq for Seat
Auto Trait Implementations§
impl Freeze for Seat
impl RefUnwindSafe for Seat
impl Send for Seat
impl Sync for Seat
impl Unpin for Seat
impl UnwindSafe for Seat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)