pub struct PointerState {
pub time: u64,
pub x: f32,
pub y: f32,
pub buttons: PointerButtons,
pub contact_geometry: ContactGeometry,
pub orientation: PointerOrientation,
pub pressure: f32,
pub tangential_pressure: f32,
}Expand description
A single pointer state.
Fields§
§time: u64u64 nanoseconds real time.
The base time is not important, except by convention, and should generally be the same at least for states originating from the same device.
x: f32x position.
Coordinate space is by convention.
y: f32y position.
Coordinate space is by convention.
Pressed buttons.
contact_geometry: ContactGeometryContact geometry.
orientation: PointerOrientationOrientation.
pressure: f32Normalized pressure in range 0..1.
Where pressure is not reported by the platform, it is always 0.5 when activated and 0.0 when not.
tangential_pressure: f32Normalized ‘tangential pressure’ in range -1..1.
This is an arbitrary parameter and, despite its name, it may not originate from a pressure sensitive control. This is often controlled by something like a wheel on the barrel of an ‘airbrush’ style pen.
Trait Implementations§
Source§impl Clone for PointerState
impl Clone for PointerState
Source§fn clone(&self) -> PointerState
fn clone(&self) -> PointerState
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 PointerState
impl Debug for PointerState
Source§impl Default for PointerState
impl Default for PointerState
Source§impl PartialEq for PointerState
impl PartialEq for PointerState
impl StructuralPartialEq for PointerState
Auto Trait Implementations§
impl Freeze for PointerState
impl RefUnwindSafe for PointerState
impl Send for PointerState
impl Sync for PointerState
impl Unpin for PointerState
impl UnwindSafe for PointerState
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