#[repr(u32)]pub enum Source {
Show 15 variants
Unknown = 0,
Keyboard = 257,
Dpad = 513,
Gamepad = 1_025,
Touchscreen = 4_098,
Mouse = 8_194,
Stylus = 16_386,
BluetoothStylus = 49_154,
Trackball = 65_540,
MouseRelative = 131_076,
Touchpad = 1_048_584,
TouchNavigation = 2_097_152,
Joystick = 16_777_232,
RotaryEncoder = 4_194_304,
Any = 4_294_967_040,
}
Expand description
An enum representing the source of an InputEvent
.
See the NDK docs
Variants§
Unknown = 0
Keyboard = 257
Dpad = 513
Gamepad = 1_025
Touchscreen = 4_098
Mouse = 8_194
Stylus = 16_386
BluetoothStylus = 49_154
Trackball = 65_540
MouseRelative = 131_076
Touchpad = 1_048_584
Joystick = 16_777_232
RotaryEncoder = 4_194_304
Any = 4_294_967_040
Trait Implementations§
impl Copy for Source
impl Eq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more