[go: up one dir, main page]

reis::eis

Struct Seat

source
pub struct Seat(/* private fields */);

Implementations§

source§

impl Seat

source

pub fn version(&self) -> u32

source§

impl Seat

source

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.

source

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.

source

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.

source

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.

source

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§

source§

impl Clone for Seat

source§

fn clone(&self) -> Seat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Seat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Seat

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Seat

source§

fn eq(&self, other: &Seat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Seat

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.