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
TouchNavigation
Trackball
Unknown
Trait Implementations
sourceimpl 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.
sourcefn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for Source
impl TryFromPrimitive for Source
type Primitive = u32
const NAME: &'static str = _
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more