#[non_exhaustive]#[repr(u32)]pub enum AxisSource {
Wheel = 0,
Finger = 1,
Continuous = 2,
WheelTilt = 3,
}
Expand description
axis source types
Describes the source types for axis events. This indicates to the client how an axis event was physically generated; a client may adjust the user interface accordingly. For example, scroll events from a “finger” source may be in a smooth coordinate space with kinetic scrolling whereas a “wheel” source may be in discrete steps of a number of lines.
The “continuous” axis source is a device generating events in a continuous coordinate space, but using something other than a finger. One example for this source is button-based scrolling where the vertical motion of a device is converted to scroll events while a button is held down.
The “wheel tilt” axis source indicates that the actual device is a wheel but the scroll event is not caused by a rotation but a (usually sideways) tilt of the wheel.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Wheel = 0
a physical wheel rotation
Finger = 1
finger on a touch surface
Continuous = 2
continuous coordinate space
WheelTilt = 3
a physical wheel tilt
Trait Implementations§
source§impl Clone for AxisSource
impl Clone for AxisSource
source§fn clone(&self) -> AxisSource
fn clone(&self) -> AxisSource
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AxisSource
impl Debug for AxisSource
source§impl From<AxisSource> for u32
impl From<AxisSource> for u32
source§fn from(val: AxisSource) -> u32
fn from(val: AxisSource) -> u32
source§impl Hash for AxisSource
impl Hash for AxisSource
source§impl Ord for AxisSource
impl Ord for AxisSource
source§fn cmp(&self, other: &AxisSource) -> Ordering
fn cmp(&self, other: &AxisSource) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for AxisSource
impl PartialEq for AxisSource
source§impl PartialOrd for AxisSource
impl PartialOrd for AxisSource
source§impl TryFrom<u32> for AxisSource
impl TryFrom<u32> for AxisSource
impl Copy for AxisSource
impl Eq for AxisSource
impl StructuralPartialEq for AxisSource
Auto Trait Implementations§
impl Freeze for AxisSource
impl RefUnwindSafe for AxisSource
impl Send for AxisSource
impl Sync for AxisSource
impl Unpin for AxisSource
impl UnwindSafe for AxisSource
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
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)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.