smithay::backend::input

Enum InputEvent

Source
pub enum InputEvent<B: InputBackend> {
Show 17 variants DeviceAdded { device: B::Device, }, DeviceRemoved { device: B::Device, }, Keyboard { event: B::KeyboardKeyEvent, }, PointerMotion { event: B::PointerMotionEvent, }, PointerMotionAbsolute { event: B::PointerMotionAbsoluteEvent, }, PointerButton { event: B::PointerButtonEvent, }, PointerAxis { event: B::PointerAxisEvent, }, TouchDown { event: B::TouchDownEvent, }, TouchMotion { event: B::TouchMotionEvent, }, TouchUp { event: B::TouchUpEvent, }, TouchCancel { event: B::TouchCancelEvent, }, TouchFrame { event: B::TouchFrameEvent, }, TabletToolAxis { event: B::TabletToolAxisEvent, }, TabletToolProximity { event: B::TabletToolProximityEvent, }, TabletToolTip { event: B::TabletToolTipEvent, }, TabletToolButton { event: B::TabletToolButtonEvent, }, Special(B::SpecialEvent),
}
Expand description

Different events that can be generated by an input backend

Variants§

§

DeviceAdded

An input device was connected

Fields

§device: B::Device

The added device

§

DeviceRemoved

An input device was disconnected

Fields

§device: B::Device

The removed device

§

Keyboard

A keyboard event occurred

Fields

§event: B::KeyboardKeyEvent

The keyboard event

§

PointerMotion

A relative pointer motion occurred

Fields

§event: B::PointerMotionEvent

The pointer motion event

§

PointerMotionAbsolute

An absolute pointer motion occurs

Fields

§event: B::PointerMotionAbsoluteEvent

The absolute pointer motion event

§

PointerButton

A pointer button was pressed or released

Fields

§event: B::PointerButtonEvent

The pointer button event

§

PointerAxis

A pointer action occurred while scrolling on an axis

Fields

§event: B::PointerAxisEvent

The pointer axis event

§

TouchDown

A new touchpoint appeared

Fields

§event: B::TouchDownEvent

The touch down event

§

TouchMotion

A touchpoint moved

Fields

§event: B::TouchMotionEvent

The touch motion event

§

TouchUp

A touchpoint was removed

Fields

§event: B::TouchUpEvent

The touch up event

§

TouchCancel

A touch sequence was cancelled

Fields

§event: B::TouchCancelEvent

The touch cancel event

§

TouchFrame

A touch frame was emitted

A set of two events received on the same seat between two frames should be interpreted as an atomic event.

Fields

§event: B::TouchFrameEvent

The touch frame event

§

TabletToolAxis

A tablet tool axis was emitted

Fields

§event: B::TabletToolAxisEvent

The tablet tool axis event

§

TabletToolProximity

A tablet tool proximity was emitted

Fields

§event: B::TabletToolProximityEvent

The tablet tool proximity event

§

TabletToolTip

A tablet tool tip event was emitted

Fields

§event: B::TabletToolTipEvent

The tablet tool axis event

§

TabletToolButton

A tablet tool button was pressed or released

Fields

§event: B::TabletToolButtonEvent

The pointer button event

§

Special(B::SpecialEvent)

Special event specific of this backend

Trait Implementations§

Auto Trait Implementations§

§

impl<B> Freeze for InputEvent<B>

§

impl<B> RefUnwindSafe for InputEvent<B>

§

impl<B> Send for InputEvent<B>

§

impl<B> Sync for InputEvent<B>

§

impl<B> Unpin for InputEvent<B>

§

impl<B> UnwindSafe for InputEvent<B>

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> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,