#[repr(C)]pub struct WacomPadState {
pub express_keys: u32,
pub touch_ring: f32,
pub touch_ring_active: bool,
pub device_id: u64,
}Expand description
State of a Wacom-style tablet pad — the tablet body’s own hardware
controls, distinct from the pen (PenState already covers eraser /
barrel button / barrel roll / tilt / pressure). Populated by the platform
backend (dll/src/desktop/extra/wacom_pad/: Wintab on Windows,
libwacom+libinput on Linux, the driver’s NSEvent tablet events on macOS).
Fields§
§express_keys: u32ExpressKey bitset — bit n set ⇔ hardware button n is held (up to
32). Read via WacomPadState::express_key.
touch_ring: f32Touch-ring / touch-strip absolute position, 0.0–1.0. Only
meaningful while WacomPadState::touch_ring_active is true.
touch_ring_active: boolWhether a finger is currently on the touch-ring / touch-strip.
device_id: u64Tablet device id (to distinguish pads on multi-tablet setups).
Implementations§
Source§impl WacomPadState
impl WacomPadState
Sourcepub fn express_key(&self, index: u32) -> bool
pub fn express_key(&self, index: u32) -> bool
Whether ExpressKey index (0-based, < 32) is currently held.
Trait Implementations§
Source§impl Clone for WacomPadState
impl Clone for WacomPadState
Source§fn clone(&self) -> WacomPadState
fn clone(&self) -> WacomPadState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WacomPadState
impl Debug for WacomPadState
Source§impl Default for WacomPadState
impl Default for WacomPadState
Source§impl PartialEq for WacomPadState
impl PartialEq for WacomPadState
Source§fn eq(&self, other: &WacomPadState) -> bool
fn eq(&self, other: &WacomPadState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for WacomPadState
impl StructuralPartialEq for WacomPadState
Auto Trait Implementations§
impl Freeze for WacomPadState
impl RefUnwindSafe for WacomPadState
impl Send for WacomPadState
impl Sync for WacomPadState
impl Unpin for WacomPadState
impl UnsafeUnpin for WacomPadState
impl UnwindSafe for WacomPadState
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