Struct input::event::tablet_tool::TabletToolProximityEvent [−][src]
pub struct TabletToolProximityEvent { /* fields omitted */ }
Expand description
Signals that a tool has come in or out of proximity of a device with the
DeviceCapability::TabletTool
capability.
Proximity events contain each of the current values for each axis, and these
values may be extracted from them in the same way they are with
TabletToolAxisEvent
events.
Some tools may always be in proximity. For these tools, proximity events with
ProximityState::In
are sent only once after DeviceAddedEvent
, and proximity
events with ProximityState::Out
are sent only once before DeviceRemovedEvent
.
If the tool that comes into proximity supports x/y coordinates, libinput guarantees that both x and y are set in the proximity event.
When a tool goes out of proximity, the value of every axis should be assumed to have an undefined state and any buttons that are currently held down on the stylus are marked as released. Button release events for each button that was held down on the stylus are sent before the proximity out event.
Implementations
Returns the new proximity state of a tool from a proximity event.
Used to check whether or not a tool came in or out of proximity during an
TabletToolProximityEvent
.
See Handling of proximity events for recommendations on proximity handling.
Trait Implementations
Receive a raw pointer representing this type.
Auto Trait Implementations
impl !RefUnwindSafe for TabletToolProximityEvent
impl !Send for TabletToolProximityEvent
impl !Sync for TabletToolProximityEvent
impl Unpin for TabletToolProximityEvent
impl !UnwindSafe for TabletToolProximityEvent
Blanket Implementations
Mutably borrows from an owned value. Read more
Check if the distance axis was updated in this event. Read more
Returns the current distance from the tablet’s sensor, normalized to the range [0, 1]. Read more
Check if the pressure axis was updated in this event. For TabletToolButtonEvent
s this function always returns false
.
Returns the current pressure being applied on the tool in use, normalized to the range [0, 1]. Read more
Check if the z-rotation axis was updated in this event. Read more
Returns the current z rotation of the tool in degrees, clockwise from the tool’s logical neutral position. Read more
Check if the slider axis was updated in this event. Read more
Returns the current position of the slider on the tool, normalized to the range [-1, 1]. Read more
Check if the tilt x axis was updated in this event. Read more
Check if the tilt y axis was updated in this event. Read more
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
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
Check if the size major axis was updated in this event. Read more
Check if the size minor axis was updated in this event. Read more
Returns the current size in mm along the major axis of the touching ellipse. This axis is not necessarily aligned with either x or y, the rotation must be taken into account. Read more
Returns the current size in mm along the minor axis of the touching ellipse. This axis is not necessarily aligned with either x or y, the rotation must be taken into account. Read more
Check if the wheel axis was updated in this event. Read more
Return the delta for the wheel in degrees.
Return the delta for the wheel in discrete steps (e.g. wheel clicks).
Check if the x axis was updated in this event. Read more
Check if the y axis was updated in this event. Read more
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
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
Return the current absolute x coordinate of the tablet tool event, transformed to screen coordinates. Read more
Return the current absolute y coordinate of the tablet tool event, transformed to screen coordinates. Read more
Returns the tool that was in use during this event. Read more
Convert into a general TabletToolEvent
again