pub enum InputDeviceDescriptor {
Keyboard(KeyboardDeviceDescriptor),
LightSensor(LightSensorDeviceDescriptor),
ConsumerControls(ConsumerControlsDeviceDescriptor),
Mouse(MouseDeviceDescriptor),
TouchScreen(TouchScreenDeviceDescriptor),
Touchpad(TouchpadDeviceDescriptor),
}Expand description
An [InputDescriptor] describes the ranges of values a particular input device can generate.
For example, a [InputDescriptor::Keyboard] contains the keys available on the keyboard,
and a [InputDescriptor::Touch] contains the maximum number of touch contacts and the
range of x- and y-values each contact can take on.
The descriptor is sent alongside InputDeviceEvents so clients can, for example, convert a
touch coordinate to a display coordinate. The descriptor is not expected to change for the
lifetime of a device binding.
Variants§
Keyboard(KeyboardDeviceDescriptor)
LightSensor(LightSensorDeviceDescriptor)
ConsumerControls(ConsumerControlsDeviceDescriptor)
Mouse(MouseDeviceDescriptor)
TouchScreen(TouchScreenDeviceDescriptor)
Touchpad(TouchpadDeviceDescriptor)
Trait Implementations§
Source§impl Clone for InputDeviceDescriptor
impl Clone for InputDeviceDescriptor
Source§fn clone(&self) -> InputDeviceDescriptor
fn clone(&self) -> InputDeviceDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputDeviceDescriptor
impl Debug for InputDeviceDescriptor
Source§impl From<KeyboardDeviceDescriptor> for InputDeviceDescriptor
impl From<KeyboardDeviceDescriptor> for InputDeviceDescriptor
Source§fn from(b: KeyboardDeviceDescriptor) -> Self
fn from(b: KeyboardDeviceDescriptor) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InputDeviceDescriptor
impl PartialEq for InputDeviceDescriptor
impl StructuralPartialEq for InputDeviceDescriptor
Auto Trait Implementations§
impl Freeze for InputDeviceDescriptor
impl RefUnwindSafe for InputDeviceDescriptor
impl Send for InputDeviceDescriptor
impl Sync for InputDeviceDescriptor
impl Unpin for InputDeviceDescriptor
impl UnwindSafe for InputDeviceDescriptor
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
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