Trait SeatHandler

pub trait SeatHandler: Sized {
    // Required methods
    fn seat_state(&mut self) -> &mut SeatState;
    fn new_seat(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        seat: WlSeat,
    );
    fn new_capability(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        seat: WlSeat,
        capability: Capability,
    );
    fn remove_capability(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        seat: WlSeat,
        capability: Capability,
    );
    fn remove_seat(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        seat: WlSeat,
    );
}
Available on crate feature wayland and Linux only.

Required Methods§

fn seat_state(&mut self) -> &mut SeatState

fn new_seat(&mut self, conn: &Connection, qh: &QueueHandle<Self>, seat: WlSeat)

A new seat has been created.

This function only indicates that a seat has been created, you will need to wait for new_capability to be called before creating any keyboards,

fn new_capability( &mut self, conn: &Connection, qh: &QueueHandle<Self>, seat: WlSeat, capability: Capability, )

A new capability is available on the seat.

This allows you to create the corresponding object related to the capability.

fn remove_capability( &mut self, conn: &Connection, qh: &QueueHandle<Self>, seat: WlSeat, capability: Capability, )

A capability has been removed from the seat.

If an object has been created from the capability, it should be destroyed.

fn remove_seat( &mut self, conn: &Connection, qh: &QueueHandle<Self>, seat: WlSeat, )

A seat has been removed.

The seat is destroyed and all capability objects created from it are invalid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§