Struct input::event::tablet_tool::TabletToolButtonEvent
source · pub struct TabletToolButtonEvent { /* private fields */ }
Expand description
Signals that a tool has changed a logical button state on a device with the
DeviceCapability::TabletTool
capability.
Button state changes occur on their own and do not include axis state changes. If
button and axis state changes occur within the same logical hardware event, the
order of the TabletToolButtonEvent
and TabletToolAxisEvent
is device-specific.
This event is not to be confused with the button events emitted by the tablet
pad. See TabletPadButtonEvent
.
Implementations
sourceimpl TabletToolButtonEvent
impl TabletToolButtonEvent
Return the button that triggered this event.
For the button of a TabletToolButtonEvent
, return the total number of buttons
pressed on all devices on the associated seat after the the event was triggered.
Return the button state of the event.
Trait Implementations
sourceimpl AsRaw<libinput_event_tablet_tool> for TabletToolButtonEvent
impl AsRaw<libinput_event_tablet_tool> for TabletToolButtonEvent
sourcefn as_raw(&self) -> *const libinput_event_tablet_tool
fn as_raw(&self) -> *const libinput_event_tablet_tool
Receive a raw pointer representing this type.
sourceimpl Context for TabletToolButtonEvent
impl Context for TabletToolButtonEvent
sourceimpl Debug for TabletToolButtonEvent
impl Debug for TabletToolButtonEvent
sourceimpl Drop for TabletToolButtonEvent
impl Drop for TabletToolButtonEvent
sourceimpl EventTrait for TabletToolButtonEvent
impl EventTrait for TabletToolButtonEvent
sourceimpl Hash for TabletToolButtonEvent
impl Hash for TabletToolButtonEvent
sourceimpl PartialEq<TabletToolButtonEvent> for TabletToolButtonEvent
impl PartialEq<TabletToolButtonEvent> for TabletToolButtonEvent
impl Eq for TabletToolButtonEvent
impl StructuralEq for TabletToolButtonEvent
Auto Trait Implementations
impl !RefUnwindSafe for TabletToolButtonEvent
impl !Send for TabletToolButtonEvent
impl !Sync for TabletToolButtonEvent
impl Unpin for TabletToolButtonEvent
impl !UnwindSafe for TabletToolButtonEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> TabletToolEventTrait for Twhere
T: AsRaw<libinput_event_tablet_tool> + Context,
impl<T> TabletToolEventTrait for Twhere
T: AsRaw<libinput_event_tablet_tool> + Context,
sourcefn distance_has_changed(&self) -> bool
fn distance_has_changed(&self) -> bool
Check if the distance axis was updated in this event. Read more
sourcefn distance(&self) -> f64
fn distance(&self) -> f64
Returns the current distance from the tablet’s sensor, normalized to the range
[0, 1]. Read more
sourcefn pressure_has_changed(&self) -> bool
fn pressure_has_changed(&self) -> bool
Check if the pressure axis was updated in this event. For
TabletToolButtonEvent
s this function always returns false
.sourcefn pressure(&self) -> f64
fn pressure(&self) -> f64
Returns the current pressure being applied on the tool in use, normalized to the
range [0, 1]. Read more
sourcefn rotation_has_changed(&self) -> bool
fn rotation_has_changed(&self) -> bool
Check if the z-rotation axis was updated in this event. Read more
sourcefn rotation(&self) -> f64
fn rotation(&self) -> f64
Returns the current z rotation of the tool in degrees, clockwise from the tool’s
logical neutral position. Read more
sourcefn slider_has_changed(&self) -> bool
fn slider_has_changed(&self) -> bool
Check if the slider axis was updated in this event. Read more
sourcefn slider_position(&self) -> f64
fn slider_position(&self) -> f64
Returns the current position of the slider on the tool, normalized to the range
[-1, 1]. Read more
sourcefn tilt_x_has_changed(&self) -> bool
fn tilt_x_has_changed(&self) -> bool
Check if the tilt x axis was updated in this event. Read more
sourcefn tilt_y_has_changed(&self) -> bool
fn tilt_y_has_changed(&self) -> bool
Check if the tilt y axis was updated in this event. Read more
sourcefn tilt_x(&self) -> f64
fn tilt_x(&self) -> f64
Returns the current tilt along the X axis of the tablet’s current logical
orientation, in degrees off the tablet’s z axis. Read more
sourcefn tilt_y(&self) -> f64
fn tilt_y(&self) -> f64
Returns the current tilt along the Y axis of the tablet’s current logical
orientation, in degrees off the tablet’s z axis. Read more
sourcefn wheel_has_changed(&self) -> bool
fn wheel_has_changed(&self) -> bool
Check if the wheel axis was updated in this event. Read more
sourcefn wheel_delta(&self) -> f64
fn wheel_delta(&self) -> f64
Return the delta for the wheel in degrees.
sourcefn wheel_delta_discrete(&self) -> f64
fn wheel_delta_discrete(&self) -> f64
Return the delta for the wheel in discrete steps (e.g. wheel clicks).
sourcefn x_has_changed(&self) -> bool
fn x_has_changed(&self) -> bool
Check if the x axis was updated in this event. Read more
sourcefn y_has_changed(&self) -> bool
fn y_has_changed(&self) -> bool
Check if the y axis was updated in this event. Read more
sourcefn x(&self) -> f64
fn x(&self) -> f64
Returns the X coordinate of the tablet tool, in mm from the top left corner of
the tablet in its current logical orientation. Read more
sourcefn y(&self) -> f64
fn y(&self) -> f64
Returns the Y coordinate of the tablet tool, in mm from the top left corner of
the tablet in its current logical orientation. Read more
sourcefn x_transformed(&self, width: u32) -> f64
fn x_transformed(&self, width: u32) -> f64
Return the current absolute x coordinate of the tablet tool event, transformed
to screen coordinates. Read more
sourcefn y_transformed(&self, height: u32) -> f64
fn y_transformed(&self, height: u32) -> f64
Return the current absolute y coordinate of the tablet tool event, transformed
to screen coordinates. Read more
sourcefn tool(&self) -> TabletTool
fn tool(&self) -> TabletTool
Returns the tool that was in use during this event. Read more
sourcefn into_tablet_tool_event(self) -> TabletToolEventwhere
Self: Sized,
fn into_tablet_tool_event(self) -> TabletToolEventwhere
Self: Sized,
Convert into a general
TabletToolEvent
again