Trait KeyboardTarget

Source
pub trait KeyboardTarget<D>:
    IsAlive
    + PartialEq
    + Clone
    + Debug
    + Send
where D: SeatHandler,
{ // Required methods fn enter( &self, seat: &Seat<D>, data: &mut D, keys: Vec<KeysymHandle<'_>>, serial: Serial, ); fn leave(&self, seat: &Seat<D>, data: &mut D, serial: Serial); fn key( &self, seat: &Seat<D>, data: &mut D, key: KeysymHandle<'_>, state: KeyState, serial: Serial, time: u32, ); fn modifiers( &self, seat: &Seat<D>, data: &mut D, modifiers: ModifiersState, serial: Serial, ); // Provided method fn replace( &self, replaced: <D as SeatHandler>::KeyboardFocus, seat: &Seat<D>, data: &mut D, keys: Vec<KeysymHandle<'_>>, modifiers: ModifiersState, serial: Serial, ) { ... } }
Expand description

Trait representing object that can receive keyboard interactions

Required Methods§

Source

fn enter( &self, seat: &Seat<D>, data: &mut D, keys: Vec<KeysymHandle<'_>>, serial: Serial, )

Keyboard focus of a given seat was assigned to this handler

Source

fn leave(&self, seat: &Seat<D>, data: &mut D, serial: Serial)

The keyboard focus of a given seat left this handler

Source

fn key( &self, seat: &Seat<D>, data: &mut D, key: KeysymHandle<'_>, state: KeyState, serial: Serial, time: u32, )

A key was pressed on a keyboard from a given seat

Source

fn modifiers( &self, seat: &Seat<D>, data: &mut D, modifiers: ModifiersState, serial: Serial, )

Hold modifiers were changed on a keyboard from a given seat

Provided Methods§

Source

fn replace( &self, replaced: <D as SeatHandler>::KeyboardFocus, seat: &Seat<D>, data: &mut D, keys: Vec<KeysymHandle<'_>>, modifiers: ModifiersState, serial: Serial, )

Keyboard focus of a given seat moved from another handler to this handler

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.

Implementations on Foreign Types§

Source§

impl<D: SeatHandler + 'static> KeyboardTarget<D> for WlSurface

Available on crate feature wayland_frontend only.
Source§

fn enter( &self, seat: &Seat<D>, state: &mut D, keys: Vec<KeysymHandle<'_>>, serial: Serial, )

Source§

fn leave(&self, seat: &Seat<D>, state: &mut D, serial: Serial)

Source§

fn key( &self, seat: &Seat<D>, _data: &mut D, key: KeysymHandle<'_>, state: KeyState, serial: Serial, time: u32, )

Source§

fn modifiers( &self, seat: &Seat<D>, _data: &mut D, modifiers: ModifiersState, serial: Serial, )

Implementors§

Source§

impl<D: SeatHandler + 'static> KeyboardTarget<D> for X11Surface

Available on crate feature xwayland only.