Struct input::event::tablet_tool::TabletTool
[−]
[src]
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]
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.
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.
fn tool_type(&self) -> TabletToolType
Return the tool type for a tool object, see Vendor-specific tablet tool types for details.
Check if a tablet tool has a button with the passed-in code (see linux/input.h).
fn has_distance(&self) -> bool
Return whether the tablet tool supports distance.
fn has_pressure(&self) -> bool
Return whether the tablet tool supports pressure.
fn has_rotation(&self) -> bool
Return whether the tablet tool supports z-rotation.v
fn has_slider(&self) -> bool
Return whether the tablet tool has a slider axis.
fn has_tilt(&self) -> bool
Return whether the tablet tool supports tilt.
fn has_wheel(&self) -> bool
Return whether the tablet tool has a relative wheel.
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.
Trait Implementations
impl Eq for TabletTool[src]
impl Debug for TabletTool[src]
impl FromRaw<libinput_tablet_tool> for TabletTool[src]
unsafe fn from_raw(ffi: *mut libinput_tablet_tool) -> Self
Create a new instance of this type from a raw pointer. Read more
impl AsRaw<libinput_tablet_tool> for TabletTool[src]
fn as_raw(&self) -> *const libinput_tablet_tool
Receive a raw pointer representing this type.
impl Userdata for TabletTool[src]
unsafe fn userdata_raw<T: 'static>(&self) -> *mut T
unsafe fn set_userdata_raw<T: 'static>(&self, ptr: *mut T)
unsafe fn userdata<T: 'static>(&self) -> Option<&T>
Receive a reference to the attached userdata, if one exists. Read more
unsafe fn userdata_mut<T: 'static>(&mut self) -> Option<&mut T>
Receive a mutable reference to the attached userdata, if one exists. Read more
unsafe fn set_userdata<T: 'static, U: 'static>(&mut self,
new: Option<T>)
-> Option<U>
new: Option<T>)
-> Option<U>
Set userdata and receive the currently set userdata Read more
impl Clone for TabletTool[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Drop for TabletTool[src]
impl PartialEq for TabletTool[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) -> bool1.0.0
This method tests for !=.
impl Hash for TabletTool[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.