smithay_client_toolkit::seat

Trait SeatHandler

Source
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,
    );
}

Required Methods§

Source

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

Source

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,

Source

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.

Source

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.

Source

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§