Trait InputBackend

Source
pub trait InputBackend: Sized {
Show 25 associated items type Device: Device; type KeyboardKeyEvent: KeyboardKeyEvent<Self>; type PointerAxisEvent: PointerAxisEvent<Self>; type PointerButtonEvent: PointerButtonEvent<Self>; type PointerMotionEvent: PointerMotionEvent<Self>; type PointerMotionAbsoluteEvent: PointerMotionAbsoluteEvent<Self>; type GestureSwipeBeginEvent: GestureSwipeBeginEvent<Self>; type GestureSwipeUpdateEvent: GestureSwipeUpdateEvent<Self>; type GestureSwipeEndEvent: GestureSwipeEndEvent<Self>; type GesturePinchBeginEvent: GesturePinchBeginEvent<Self>; type GesturePinchUpdateEvent: GesturePinchUpdateEvent<Self>; type GesturePinchEndEvent: GesturePinchEndEvent<Self>; type GestureHoldBeginEvent: GestureHoldBeginEvent<Self>; type GestureHoldEndEvent: GestureHoldEndEvent<Self>; type TouchDownEvent: TouchDownEvent<Self>; type TouchUpEvent: TouchUpEvent<Self>; type TouchMotionEvent: TouchMotionEvent<Self>; type TouchCancelEvent: TouchCancelEvent<Self>; type TouchFrameEvent: TouchFrameEvent<Self>; type TabletToolAxisEvent: TabletToolAxisEvent<Self>; type TabletToolProximityEvent: TabletToolProximityEvent<Self>; type TabletToolTipEvent: TabletToolTipEvent<Self>; type TabletToolButtonEvent: TabletToolButtonEvent<Self>; type SwitchToggleEvent: SwitchToggleEvent<Self>; type SpecialEvent;
}
Expand description

Trait that describes objects providing a source of input events. All input backends need to implement this and provide the same base guarantees about the precision of given events.

Required Associated Types§

Source

type Device: Device

Type representing input devices

Source

type KeyboardKeyEvent: KeyboardKeyEvent<Self>

Type representing keyboard events

Source

type PointerAxisEvent: PointerAxisEvent<Self>

Type representing axis events on pointer devices

Source

type PointerButtonEvent: PointerButtonEvent<Self>

Type representing button events on pointer devices

Source

type PointerMotionEvent: PointerMotionEvent<Self>

Type representing motion events of pointer devices

Source

type PointerMotionAbsoluteEvent: PointerMotionAbsoluteEvent<Self>

Type representing motion events of pointer devices

Source

type GestureSwipeBeginEvent: GestureSwipeBeginEvent<Self>

Type representing swipe begin events of pointer devices

Source

type GestureSwipeUpdateEvent: GestureSwipeUpdateEvent<Self>

Type representing swipe update events of pointer devices

Source

type GestureSwipeEndEvent: GestureSwipeEndEvent<Self>

Type representing swipe end events of pointer devices

Source

type GesturePinchBeginEvent: GesturePinchBeginEvent<Self>

Type representing pinch begin events of pointer devices

Source

type GesturePinchUpdateEvent: GesturePinchUpdateEvent<Self>

Type representing pinch update events of pointer devices

Source

type GesturePinchEndEvent: GesturePinchEndEvent<Self>

Type representing pinch end events of pointer devices

Source

type GestureHoldBeginEvent: GestureHoldBeginEvent<Self>

Type representing hold begin events of pointer devices

Source

type GestureHoldEndEvent: GestureHoldEndEvent<Self>

Type representing hold end events of pointer devices

Source

type TouchDownEvent: TouchDownEvent<Self>

Type representing touch events starting

Source

type TouchUpEvent: TouchUpEvent<Self>

Type representing touch events ending

Source

type TouchMotionEvent: TouchMotionEvent<Self>

Type representing touch events from moving

Source

type TouchCancelEvent: TouchCancelEvent<Self>

Type representing canceling of touch events

Source

type TouchFrameEvent: TouchFrameEvent<Self>

Type representing touch frame events

Source

type TabletToolAxisEvent: TabletToolAxisEvent<Self>

Type representing axis events on tablet devices

Source

type TabletToolProximityEvent: TabletToolProximityEvent<Self>

Type representing proximity events on tablet devices

Source

type TabletToolTipEvent: TabletToolTipEvent<Self>

Type representing tip events on tablet devices

Source

type TabletToolButtonEvent: TabletToolButtonEvent<Self>

Type representing button events on tablet tool devices

Source

type SwitchToggleEvent: SwitchToggleEvent<Self>

Type representing switch toggle events

Source

type SpecialEvent

Special events that are custom to this backend

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§

Source§

impl InputBackend for LibinputInputBackend

Available on crate feature backend_libinput only.
Source§

impl InputBackend for WinitInput

Available on crate feature backend_winit only.
Source§

impl InputBackend for X11Input

Available on crate feature backend_x11 only.