pub struct PointerData { /* private fields */ }prelude only.Implementations§
Source§impl PointerData
impl PointerData
Sourcepub fn new(data: impl HasPointerData + 'static) -> PointerData
pub fn new(data: impl HasPointerData + 'static) -> PointerData
Create a new PointerData
Source§impl PointerData
impl PointerData
Sourcepub fn pointer_id(&self) -> i32
pub fn pointer_id(&self) -> i32
Gets the unique identifier of the pointer causing the event.
Sourcepub fn width(&self) -> f64
pub fn width(&self) -> f64
Gets the width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer.
Sourcepub fn height(&self) -> f64
pub fn height(&self) -> f64
Gets the height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer.
Sourcepub fn pressure(&self) -> f32
pub fn pressure(&self) -> f32
Gets the normalized pressure of the pointer input in the range of 0 to 1,
Sourcepub fn tangential_pressure(&self) -> f32
pub fn tangential_pressure(&self) -> f32
Gets the normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress) in the range -1 to 1,
Sourcepub fn tilt_x(&self) -> i32
pub fn tilt_x(&self) -> i32
Gets the plane angle (in degrees, in the range of -90 to 90) between the Y-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the Y axis.
Sourcepub fn tilt_y(&self) -> i32
pub fn tilt_y(&self) -> i32
Gets the plane angle (in degrees, in the range of -90 to 90) between the X-Z plane and the plane containing both the transducer (e.g. pen stylus) axis and the X axis.
Sourcepub fn twist(&self) -> i32
pub fn twist(&self) -> i32
Gets the clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359.The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, with a value in the range 0 to 359.
Sourcepub fn pointer_type(&self) -> String
pub fn pointer_type(&self) -> String
Gets the device type that caused the event (mouse, pen, touch, etc.).
Sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Gets if the pointer represents the primary pointer of this pointer type.
Trait Implementations§
Source§impl Debug for PointerData
impl Debug for PointerData
Source§impl From<&PlatformEventData> for PointerData
impl From<&PlatformEventData> for PointerData
Source§fn from(val: &PlatformEventData) -> PointerData
fn from(val: &PlatformEventData) -> PointerData
Source§impl<E> From<E> for PointerDatawhere
E: HasPointerData + 'static,
impl<E> From<E> for PointerDatawhere
E: HasPointerData + 'static,
Source§fn from(e: E) -> PointerData
fn from(e: E) -> PointerData
Source§impl InteractionElementOffset for PointerData
impl InteractionElementOffset for PointerData
Source§fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
fn element_coordinates(&self) -> Point2D<f64, ElementSpace>
Source§fn coordinates(&self) -> Coordinates
fn coordinates(&self) -> Coordinates
Source§impl InteractionLocation for PointerData
impl InteractionLocation for PointerData
Source§fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
fn client_coordinates(&self) -> Point2D<f64, ClientSpace>
Source§fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
fn screen_coordinates(&self) -> Point2D<f64, ScreenSpace>
Source§impl ModifiersInteraction for PointerData
impl ModifiersInteraction for PointerData
Source§impl PartialEq for PointerData
impl PartialEq for PointerData
Source§impl PointerInteraction for PointerData
impl PointerInteraction for PointerData
Auto Trait Implementations§
impl Freeze for PointerData
impl !RefUnwindSafe for PointerData
impl !Send for PointerData
impl !Sync for PointerData
impl Unpin for PointerData
impl !UnwindSafe for PointerData
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> 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>
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.Source§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.Source§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.Source§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.Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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