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 InputDeviceEvent
s 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 copy 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)