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§
Sourcetype KeyboardKeyEvent: KeyboardKeyEvent<Self>
type KeyboardKeyEvent: KeyboardKeyEvent<Self>
Type representing keyboard events
Sourcetype PointerAxisEvent: PointerAxisEvent<Self>
type PointerAxisEvent: PointerAxisEvent<Self>
Type representing axis events on pointer devices
Sourcetype PointerButtonEvent: PointerButtonEvent<Self>
type PointerButtonEvent: PointerButtonEvent<Self>
Type representing button events on pointer devices
Sourcetype PointerMotionEvent: PointerMotionEvent<Self>
type PointerMotionEvent: PointerMotionEvent<Self>
Type representing motion events of pointer devices
Sourcetype PointerMotionAbsoluteEvent: PointerMotionAbsoluteEvent<Self>
type PointerMotionAbsoluteEvent: PointerMotionAbsoluteEvent<Self>
Type representing motion events of pointer devices
Sourcetype GestureSwipeBeginEvent: GestureSwipeBeginEvent<Self>
type GestureSwipeBeginEvent: GestureSwipeBeginEvent<Self>
Type representing swipe begin events of pointer devices
Sourcetype GestureSwipeUpdateEvent: GestureSwipeUpdateEvent<Self>
type GestureSwipeUpdateEvent: GestureSwipeUpdateEvent<Self>
Type representing swipe update events of pointer devices
Sourcetype GestureSwipeEndEvent: GestureSwipeEndEvent<Self>
type GestureSwipeEndEvent: GestureSwipeEndEvent<Self>
Type representing swipe end events of pointer devices
Sourcetype GesturePinchBeginEvent: GesturePinchBeginEvent<Self>
type GesturePinchBeginEvent: GesturePinchBeginEvent<Self>
Type representing pinch begin events of pointer devices
Sourcetype GesturePinchUpdateEvent: GesturePinchUpdateEvent<Self>
type GesturePinchUpdateEvent: GesturePinchUpdateEvent<Self>
Type representing pinch update events of pointer devices
Sourcetype GesturePinchEndEvent: GesturePinchEndEvent<Self>
type GesturePinchEndEvent: GesturePinchEndEvent<Self>
Type representing pinch end events of pointer devices
Sourcetype GestureHoldBeginEvent: GestureHoldBeginEvent<Self>
type GestureHoldBeginEvent: GestureHoldBeginEvent<Self>
Type representing hold begin events of pointer devices
Sourcetype GestureHoldEndEvent: GestureHoldEndEvent<Self>
type GestureHoldEndEvent: GestureHoldEndEvent<Self>
Type representing hold end events of pointer devices
Sourcetype TouchDownEvent: TouchDownEvent<Self>
type TouchDownEvent: TouchDownEvent<Self>
Type representing touch events starting
Sourcetype TouchUpEvent: TouchUpEvent<Self>
type TouchUpEvent: TouchUpEvent<Self>
Type representing touch events ending
Sourcetype TouchMotionEvent: TouchMotionEvent<Self>
type TouchMotionEvent: TouchMotionEvent<Self>
Type representing touch events from moving
Sourcetype TouchCancelEvent: TouchCancelEvent<Self>
type TouchCancelEvent: TouchCancelEvent<Self>
Type representing canceling of touch events
Sourcetype TouchFrameEvent: TouchFrameEvent<Self>
type TouchFrameEvent: TouchFrameEvent<Self>
Type representing touch frame events
Sourcetype TabletToolAxisEvent: TabletToolAxisEvent<Self>
type TabletToolAxisEvent: TabletToolAxisEvent<Self>
Type representing axis events on tablet devices
Sourcetype TabletToolProximityEvent: TabletToolProximityEvent<Self>
type TabletToolProximityEvent: TabletToolProximityEvent<Self>
Type representing proximity events on tablet devices
Sourcetype TabletToolTipEvent: TabletToolTipEvent<Self>
type TabletToolTipEvent: TabletToolTipEvent<Self>
Type representing tip events on tablet devices
Sourcetype TabletToolButtonEvent: TabletToolButtonEvent<Self>
type TabletToolButtonEvent: TabletToolButtonEvent<Self>
Type representing button events on tablet tool devices
Sourcetype SwitchToggleEvent: SwitchToggleEvent<Self>
type SwitchToggleEvent: SwitchToggleEvent<Self>
Type representing switch toggle events
Sourcetype SpecialEvent
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.
impl InputBackend for LibinputInputBackend
backend_libinput
only.type Device = Device
type KeyboardKeyEvent = KeyboardKeyEvent
type PointerAxisEvent = PointerScrollAxis
type PointerButtonEvent = PointerButtonEvent
type PointerMotionEvent = PointerMotionEvent
type PointerMotionAbsoluteEvent = PointerMotionAbsoluteEvent
type GestureSwipeBeginEvent = GestureSwipeBeginEvent
type GestureSwipeUpdateEvent = GestureSwipeUpdateEvent
type GestureSwipeEndEvent = GestureSwipeEndEvent
type GesturePinchBeginEvent = GesturePinchBeginEvent
type GesturePinchUpdateEvent = GesturePinchUpdateEvent
type GesturePinchEndEvent = GesturePinchEndEvent
type GestureHoldBeginEvent = GestureHoldBeginEvent
type GestureHoldEndEvent = GestureHoldEndEvent
type TouchDownEvent = TouchDownEvent
type TouchUpEvent = TouchUpEvent
type TouchMotionEvent = TouchMotionEvent
type TouchCancelEvent = TouchCancelEvent
type TouchFrameEvent = TouchFrameEvent
type TabletToolAxisEvent = TabletToolAxisEvent
type TabletToolProximityEvent = TabletToolProximityEvent
type TabletToolTipEvent = TabletToolTipEvent
type TabletToolButtonEvent = TabletToolButtonEvent
type SwitchToggleEvent = SwitchToggleEvent
type SpecialEvent = UnusedEvent
Source§impl InputBackend for WinitInput
Available on crate feature backend_winit
only.
impl InputBackend for WinitInput
backend_winit
only.type Device = WinitVirtualDevice
type KeyboardKeyEvent = WinitKeyboardInputEvent
type PointerAxisEvent = WinitMouseWheelEvent
type PointerButtonEvent = WinitMouseInputEvent
type PointerMotionEvent = UnusedEvent
type PointerMotionAbsoluteEvent = WinitMouseMovedEvent
type GestureSwipeBeginEvent = UnusedEvent
type GestureSwipeUpdateEvent = UnusedEvent
type GestureSwipeEndEvent = UnusedEvent
type GesturePinchBeginEvent = UnusedEvent
type GesturePinchUpdateEvent = UnusedEvent
type GesturePinchEndEvent = UnusedEvent
type GestureHoldBeginEvent = UnusedEvent
type GestureHoldEndEvent = UnusedEvent
type TouchDownEvent = WinitTouchStartedEvent
type TouchUpEvent = WinitTouchEndedEvent
type TouchMotionEvent = WinitTouchMovedEvent
type TouchCancelEvent = WinitTouchCancelledEvent
type TouchFrameEvent = UnusedEvent
type TabletToolAxisEvent = UnusedEvent
type TabletToolProximityEvent = UnusedEvent
type TabletToolTipEvent = UnusedEvent
type TabletToolButtonEvent = UnusedEvent
type SwitchToggleEvent = UnusedEvent
type SpecialEvent = UnusedEvent
Source§impl InputBackend for X11Input
Available on crate feature backend_x11
only.
impl InputBackend for X11Input
backend_x11
only.