[][src]Struct input::event::tablet_tool::TabletTool

pub struct TabletTool { /* fields omitted */ }

An object representing a tool being used by a device with the DeviceCapability::TabletTool capability.

Tablet events generated by such a device are bound to a specific tool rather than coming from the device directly. Depending on the hardware it is possible to track the same physical tool across multiple Devices, see Tracking unique tools.

Methods

impl TabletTool[src]

pub fn serial(&self) -> u64[src]

Return the serial number of a tool.

If the tool does not report a serial number, this function returns zero. See Tracking unique tools for details.

pub fn tool_id(&self) -> u64[src]

Return the tool ID for a tool object.

If nonzero, this number identifies the specific type of the tool with more precision than the type returned in tool_type, see Vendor-specific tablet tool types. Not all tablets support a tool ID.

Tablets known to support tool IDs include the Wacom Intuos 3, 4, 5, Wacom Cintiq and Wacom Intuos Pro series.

pub fn tool_type(&self) -> TabletToolType[src]

Return the tool type for a tool object, see Vendor-specific tablet tool types for details.

pub fn has_button(&self, button: u32) -> bool[src]

Check if a tablet tool has a button with the passed-in code (see linux/input.h).

pub fn has_distance(&self) -> bool[src]

Return whether the tablet tool supports distance.

pub fn has_pressure(&self) -> bool[src]

Return whether the tablet tool supports pressure.

pub fn has_rotation(&self) -> bool[src]

Return whether the tablet tool supports z-rotation.v

pub fn has_slider(&self) -> bool[src]

Return whether the tablet tool has a slider axis.

pub fn has_tilt(&self) -> bool[src]

Return whether the tablet tool supports tilt.

pub fn has_wheel(&self) -> bool[src]

Return whether the tablet tool has a relative wheel.

pub fn is_unique(&self) -> bool[src]

Returns true if the physical tool can be uniquely identified by libinput, or false otherwise.

If a tool can be uniquely identified, keeping a reference to the tool allows tracking the tool across proximity out sequences and across compatible tablets. See Tracking unique tools for more details.

pub fn tablet_tool_has_size(&self) -> bool[src]

Returns whether the tablet tool has a ellipsis major and minor.

Where the underlying hardware only supports one of either major or minor, libinput emulated the other axis as a cicular contact, i.e. major == minor for all values of major.

Trait Implementations

impl AsRaw<libinput_tablet_tool> for TabletTool[src]

impl Clone for TabletTool[src]

impl Context for TabletTool[src]

impl Debug for TabletTool[src]

impl Drop for TabletTool[src]

impl Eq for TabletTool[src]

impl FromRaw<libinput_tablet_tool> for TabletTool[src]

impl Hash for TabletTool[src]

impl PartialEq<TabletTool> for TabletTool[src]

impl StructuralEq for TabletTool[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.