#[repr(C)]pub struct PenState {
pub position: LogicalPosition,
pub pressure: f32,
pub tilt: PenTilt,
pub in_contact: bool,
pub is_eraser: bool,
pub barrel_button_pressed: bool,
pub device_id: u64,
}Expand description
State of pen/stylus input
Fields§
§position: LogicalPositionCurrent pen position
pressure: f32Current pressure (0.0 to 1.0)
tilt: PenTiltCurrent tilt angles (x_tilt, y_tilt) in degrees
in_contact: boolWhether pen is in contact with surface
is_eraser: boolWhether pen is inverted (eraser mode)
Whether barrel button is pressed
device_id: u64Unique identifier for this pen device
Trait Implementations§
impl Copy for PenState
impl StructuralPartialEq for PenState
Auto Trait Implementations§
impl Freeze for PenState
impl RefUnwindSafe for PenState
impl Send for PenState
impl Sync for PenState
impl Unpin for PenState
impl UnwindSafe for PenState
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§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