pub enum WheelDeltaMode {
Pixel,
Line,
Page,
}Expand description
How a platform expressed its wheel delta. The discriminants match the
DOM’s WheelEvent.deltaMode, so a web shell can convert with
WheelDeltaMode::from_dom.
Variants§
Pixel
Pixels — a precision device (trackpad, smooth wheel) or a browser that reports even a classic wheel this way (~100 px per notch).
Line
Lines. One line is one notch: this is what a classic wheel step
means, and what winit’s LineDelta already carries.
Page
Pages.
Implementations§
Source§impl WheelDeltaMode
impl WheelDeltaMode
Sourcepub fn from_dom(delta_mode: u32) -> WheelDeltaMode
pub fn from_dom(delta_mode: u32) -> WheelDeltaMode
DOM WheelEvent.deltaMode → this enum. Unknown values are treated
as pixels, which is what every browser in practice reports.
Trait Implementations§
Source§impl Clone for WheelDeltaMode
impl Clone for WheelDeltaMode
impl Copy for WheelDeltaMode
Source§impl Debug for WheelDeltaMode
impl Debug for WheelDeltaMode
impl Eq for WheelDeltaMode
Source§impl PartialEq for WheelDeltaMode
impl PartialEq for WheelDeltaMode
impl StructuralPartialEq for WheelDeltaMode
Auto Trait Implementations§
impl Freeze for WheelDeltaMode
impl RefUnwindSafe for WheelDeltaMode
impl Send for WheelDeltaMode
impl Sync for WheelDeltaMode
impl Unpin for WheelDeltaMode
impl UnsafeUnpin for WheelDeltaMode
impl UnwindSafe for WheelDeltaMode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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