pub struct TabletTool { /* private fields */ }
Expand description
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 Device
s, see
Tracking unique tools.
Implementations§
Source§impl TabletTool
impl TabletTool
Sourcepub fn serial(&self) -> u64
pub fn serial(&self) -> u64
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.
Sourcepub fn tool_id(&self) -> u64
pub fn tool_id(&self) -> u64
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.
Sourcepub fn tool_type(&self) -> Option<TabletToolType>
pub fn tool_type(&self) -> Option<TabletToolType>
Return the tool type for a tool object, see Vendor-specific tablet tool types for details.
A return value of None
means the tool type is not known.
Check if a tablet tool has a button with the passed-in code (see linux/input.h).
Sourcepub fn has_distance(&self) -> bool
pub fn has_distance(&self) -> bool
Return whether the tablet tool supports distance.
Sourcepub fn has_pressure(&self) -> bool
pub fn has_pressure(&self) -> bool
Return whether the tablet tool supports pressure.
Sourcepub fn has_rotation(&self) -> bool
pub fn has_rotation(&self) -> bool
Return whether the tablet tool supports z-rotation.v
Sourcepub fn has_slider(&self) -> bool
pub fn has_slider(&self) -> bool
Return whether the tablet tool has a slider axis.
Sourcepub fn is_unique(&self) -> bool
pub fn is_unique(&self) -> bool
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.
Sourcepub fn tablet_tool_has_size(&self) -> bool
pub fn tablet_tool_has_size(&self) -> bool
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.