Struct input::event::tablet_tool::TabletToolProximityEvent
[−]
[src]
pub struct TabletToolProximityEvent { /* fields omitted */ }
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.
Methods
impl TabletToolProximityEvent
[src]
fn proximity_state(&self) -> ProximityState
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
impl Eq for TabletToolProximityEvent
[src]
impl Debug for TabletToolProximityEvent
[src]
impl FromRaw<libinput_event_tablet_tool> for TabletToolProximityEvent
[src]
unsafe fn from_raw(ffi: *mut libinput_event_tablet_tool) -> Self
Create a new instance of this type from a raw pointer. Read more
impl AsRaw<libinput_event_tablet_tool> for TabletToolProximityEvent
[src]
fn as_raw(&self) -> *const libinput_event_tablet_tool
Receive a raw pointer representing this type.
impl PartialEq for TabletToolProximityEvent
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Hash for TabletToolProximityEvent
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl EventTrait for TabletToolProximityEvent
[src]
fn into_event(self) -> Event where
Self: Sized,
Self: Sized,
Convert into a general Event
again
fn context(&self) -> Libinput
Get the libinput context from the event.
fn device(&self) -> Device
Return the device associated with this event. Read more