Enum android_activity::input::Source
source · #[repr(u32)]pub enum Source {
Show 16 variants
BluetoothStylus,
Dpad,
Gamepad,
Hdmi,
Joystick,
Keyboard,
Mouse,
MouseRelative,
RotaryEncoder,
Sensor,
Stylus,
Touchpad,
Touchscreen,
TouchNavigation,
Trackball,
Unknown,
}
Expand description
An enum representing the source of an MotionEvent
or KeyEvent
Variants§
BluetoothStylus
Dpad
Gamepad
Either a gamepad or a joystick
Hdmi
Joystick
Either a gamepad or a joystick
Keyboard
Pretty much any device with buttons. Query the keyboard type to determine if it has alphabetic keys and can be used for text entry.
Mouse
A pointing device, such as a mouse or trackpad
MouseRelative
A pointing device, such as a mouse or trackpad whose relative motions should be treated as navigation events
RotaryEncoder
An input device akin to a scroll wheel
Sensor
Stylus
Touchpad
Touchscreen
Trackball
Unknown
Trait Implementations§
source§impl PartialEq<Source> for Source
impl PartialEq<Source> for Source
source§impl TryFrom<u32> for Source
impl TryFrom<u32> for Source
§type Error = TryFromPrimitiveError<Source>
type Error = TryFromPrimitiveError<Source>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for Source
impl TryFromPrimitive for Source
impl Copy for Source
impl Eq for Source
impl StructuralEq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more