Events that come from tools on tablet devices. More...
Data Structures | |
struct | libinput_event_tablet_tool |
Tablet tool event representing an axis update, button press, or tool update. More... | |
Functions | |
struct libinput_event * | libinput_event_tablet_tool_get_base_event (struct libinput_event_tablet_tool *event) |
int | libinput_event_tablet_tool_x_has_changed (struct libinput_event_tablet_tool *event) |
Check if the x axis was updated in this event. More... | |
int | libinput_event_tablet_tool_y_has_changed (struct libinput_event_tablet_tool *event) |
Check if the y axis was updated in this event. More... | |
int | libinput_event_tablet_tool_pressure_has_changed (struct libinput_event_tablet_tool *event) |
Check if the pressure axis was updated in this event. More... | |
int | libinput_event_tablet_tool_distance_has_changed (struct libinput_event_tablet_tool *event) |
Check if the distance axis was updated in this event. More... | |
int | libinput_event_tablet_tool_tilt_x_has_changed (struct libinput_event_tablet_tool *event) |
Check if the tilt x axis was updated in this event. More... | |
int | libinput_event_tablet_tool_tilt_y_has_changed (struct libinput_event_tablet_tool *event) |
Check if the tilt y axis was updated in this event. More... | |
int | libinput_event_tablet_tool_rotation_has_changed (struct libinput_event_tablet_tool *event) |
Check if the z-rotation axis was updated in this event. More... | |
int | libinput_event_tablet_tool_slider_has_changed (struct libinput_event_tablet_tool *event) |
Check if the slider axis was updated in this event. More... | |
int | libinput_event_tablet_tool_wheel_has_changed (struct libinput_event_tablet_tool *event) |
Check if the wheel axis was updated in this event. More... | |
double | libinput_event_tablet_tool_get_x (struct libinput_event_tablet_tool *event) |
Returns the X coordinate of the tablet tool, in mm from the top left corner of the tablet in its current logical orientation. More... | |
double | libinput_event_tablet_tool_get_y (struct libinput_event_tablet_tool *event) |
Returns the Y coordinate of the tablet tool, in mm from the top left corner of the tablet in its current logical orientation. More... | |
double | libinput_event_tablet_tool_get_dx (struct libinput_event_tablet_tool *event) |
Return the delta between the last event and the current event. More... | |
double | libinput_event_tablet_tool_get_dy (struct libinput_event_tablet_tool *event) |
Return the delta between the last event and the current event. More... | |
double | libinput_event_tablet_tool_get_pressure (struct libinput_event_tablet_tool *event) |
Returns the current pressure being applied on the tool in use, normalized to the range [0, 1]. More... | |
double | libinput_event_tablet_tool_get_distance (struct libinput_event_tablet_tool *event) |
Returns the current distance from the tablet's sensor, normalized to the range [0, 1]. More... | |
double | libinput_event_tablet_tool_get_tilt_x (struct libinput_event_tablet_tool *event) |
Returns the current tilt along the X axis of the tablet's current logical orientation, normalized to the range [-1, 1]. More... | |
double | libinput_event_tablet_tool_get_tilt_y (struct libinput_event_tablet_tool *event) |
Returns the current tilt along the Y axis of the tablet's current logical orientation, normalized to the range [-1, 1]. More... | |
double | libinput_event_tablet_tool_get_rotation (struct libinput_event_tablet_tool *event) |
Returns the current z rotation of the tool in degrees, clockwise from the tool's logical neutral position. More... | |
double | libinput_event_tablet_tool_get_slider_position (struct libinput_event_tablet_tool *event) |
Returns the current position of the slider on the tool, normalized to the range [-1, 1]. More... | |
double | libinput_event_tablet_tool_get_wheel_delta (struct libinput_event_tablet_tool *event) |
Return the delta for the wheel in degrees. More... | |
int | libinput_event_tablet_tool_get_wheel_delta_discrete (struct libinput_event_tablet_tool *event) |
Return the delta for the wheel in discrete steps (e.g. More... | |
double | libinput_event_tablet_tool_get_x_transformed (struct libinput_event_tablet_tool *event, uint32_t width) |
Return the current absolute x coordinate of the tablet tool event, transformed to screen coordinates. More... | |
double | libinput_event_tablet_tool_get_y_transformed (struct libinput_event_tablet_tool *event, uint32_t height) |
Return the current absolute y coordinate of the tablet tool event, transformed to screen coordinates. More... | |
struct libinput_tablet_tool * | libinput_event_tablet_tool_get_tool (struct libinput_event_tablet_tool *event) |
Returns the tool that was in use during this event. More... | |
enum libinput_tablet_tool_proximity_state | libinput_event_tablet_tool_get_proximity_state (struct libinput_event_tablet_tool *event) |
Returns the new proximity state of a tool from a proximity event. More... | |
enum libinput_tablet_tool_tip_state | libinput_event_tablet_tool_get_tip_state (struct libinput_event_tablet_tool *event) |
Returns the new tip state of a tool from a tip event. More... | |
uint32_t | libinput_event_tablet_tool_get_button (struct libinput_event_tablet_tool *event) |
Return the button that triggered this event. More... | |
enum libinput_button_state | libinput_event_tablet_tool_get_button_state (struct libinput_event_tablet_tool *event) |
Return the button state of the event. More... | |
uint32_t | libinput_event_tablet_tool_get_seat_button_count (struct libinput_event_tablet_tool *event) |
For the button of a LIBINPUT_EVENT_TABLET_TOOL_BUTTON event, return the total number of buttons pressed on all devices on the associated seat after the the event was triggered. More... | |
uint32_t | libinput_event_tablet_tool_get_time (struct libinput_event_tablet_tool *event) |
uint64_t | libinput_event_tablet_tool_get_time_usec (struct libinput_event_tablet_tool *event) |
enum libinput_tablet_tool_type | libinput_tablet_tool_get_type (struct libinput_tablet_tool *tool) |
Return the type of tool type for a tool object, see Vendor-specific tablet tool types for details. More... | |
uint64_t | libinput_tablet_tool_get_tool_id (struct libinput_tablet_tool *tool) |
Return the tool ID for a tool object. More... | |
struct libinput_tablet_tool * | libinput_tablet_tool_ref (struct libinput_tablet_tool *tool) |
Increment the reference count of the tool by one. More... | |
struct libinput_tablet_tool * | libinput_tablet_tool_unref (struct libinput_tablet_tool *tool) |
Decrement the reference count of the tool by one. More... | |
int | libinput_tablet_tool_has_pressure (struct libinput_tablet_tool *tool) |
Return whether the tablet tool supports pressure. More... | |
int | libinput_tablet_tool_has_distance (struct libinput_tablet_tool *tool) |
Return whether the tablet tool supports distance. More... | |
int | libinput_tablet_tool_has_tilt (struct libinput_tablet_tool *tool) |
Return whether the tablet tool supports tilt. More... | |
int | libinput_tablet_tool_has_rotation (struct libinput_tablet_tool *tool) |
Return whether the tablet tool supports z-rotation. More... | |
int | libinput_tablet_tool_has_slider (struct libinput_tablet_tool *tool) |
Return whether the tablet tool has a slider axis. More... | |
int | libinput_tablet_tool_has_wheel (struct libinput_tablet_tool *tool) |
Return whether the tablet tool has a relative wheel. More... | |
int | libinput_tablet_tool_has_button (struct libinput_tablet_tool *tool, uint32_t code) |
Check if a tablet tool has a button with the passed-in code (see linux/input.h). More... | |
int | libinput_tablet_tool_is_unique (struct libinput_tablet_tool *tool) |
Return nonzero if the physical tool can be uniquely identified by libinput, or nonzero otherwise. More... | |
uint64_t | libinput_tablet_tool_get_serial (struct libinput_tablet_tool *tool) |
Return the serial number of a tool. More... | |
void * | libinput_tablet_tool_get_user_data (struct libinput_tablet_tool *tool) |
Return the user data associated with a tool object. More... | |
void | libinput_tablet_tool_set_user_data (struct libinput_tablet_tool *tool, void *user_data) |
Set the user data associated with a tool object, if any. More... | |
Detailed Description
Events that come from tools on tablet devices.
Function Documentation
int libinput_event_tablet_tool_distance_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the distance axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0. For tablet tool events of type LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function always returns 1.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
struct libinput_event* libinput_event_tablet_tool_get_base_event | ( | struct libinput_event_tablet_tool * | event | ) |
- Returns
- The generic libinput_event of this event
uint32_t libinput_event_tablet_tool_get_button | ( | struct libinput_event_tablet_tool * | event | ) |
Return the button that triggered this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_BUTTON, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- the button triggering this event
enum libinput_button_state libinput_event_tablet_tool_get_button_state | ( | struct libinput_event_tablet_tool * | event | ) |
Return the button state of the event.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- the button state triggering this event
double libinput_event_tablet_tool_get_distance | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the current distance from the tablet's sensor, normalized to the range [0, 1].
If this axis does not exist on the current tool, this function returns 0.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
double libinput_event_tablet_tool_get_dx | ( | struct libinput_event_tablet_tool * | event | ) |
Return the delta between the last event and the current event.
If the tool employs pointer acceleration, the delta returned by this function is the accelerated delta.
This value is in screen coordinate space, the delta is to be interpreted like the return value of libinput_event_pointer_get_dx(). See Relative motion for tablet tools for more details.
- Parameters
-
event The libinput tablet event
- Returns
- The relative x movement since the last event
double libinput_event_tablet_tool_get_dy | ( | struct libinput_event_tablet_tool * | event | ) |
Return the delta between the last event and the current event.
If the tool employs pointer acceleration, the delta returned by this function is the accelerated delta.
This value is in screen coordinate space, the delta is to be interpreted like the return value of libinput_event_pointer_get_dx(). See Relative motion for tablet tools for more details.
- Parameters
-
event The libinput tablet event
- Returns
- The relative y movement since the last event
double libinput_event_tablet_tool_get_pressure | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the current pressure being applied on the tool in use, normalized to the range [0, 1].
If this axis does not exist on the current tool, this function returns 0.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
enum libinput_tablet_tool_proximity_state libinput_event_tablet_tool_get_proximity_state | ( | struct libinput_event_tablet_tool * | event | ) |
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 event of type LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY.
See Handling of proximity events for recommendations on proximity handling.
- Parameters
-
event The libinput tablet tool event
- Returns
- The new proximity state of the tool from the event.
double libinput_event_tablet_tool_get_rotation | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the current z rotation of the tool in degrees, clockwise from the tool's logical neutral position.
For tools of type LIBINPUT_TABLET_TOOL_TYPE_MOUSE and LIBINPUT_TABLET_TOOL_TYPE_LENS the logical neutral position is pointing to the current logical north of the tablet. For tools of type LIBINPUT_TABLET_TOOL_TYPE_BRUSH, the logical neutral position is with the buttons pointing up.
If this axis does not exist on the current tool, this function returns 0.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
uint32_t libinput_event_tablet_tool_get_seat_button_count | ( | struct libinput_event_tablet_tool * | event | ) |
For the button of a LIBINPUT_EVENT_TABLET_TOOL_BUTTON event, return the total number of buttons pressed on all devices on the associated seat after the the event was triggered.
"
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_BUTTON. For other events, this function returns 0.
- Parameters
-
event The libinput tablet tool event
- Returns
- the seat wide pressed button count for the key of this event
double libinput_event_tablet_tool_get_slider_position | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the current position of the slider on the tool, normalized to the range [-1, 1].
The logical zero is the neutral position of the slider, or the logical center of the axis. This axis is available on e.g. the Wacom Airbrush.
If this axis does not exist on the current tool, this function returns 0.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
double libinput_event_tablet_tool_get_tilt_x | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the current tilt along the X axis of the tablet's current logical orientation, normalized to the range [-1, 1].
If this axis does not exist on the current tool, this function returns 0.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
double libinput_event_tablet_tool_get_tilt_y | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the current tilt along the Y axis of the tablet's current logical orientation, normalized to the range [-1, 1].
If this axis does not exist on the current tool, this function returns 0.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
uint32_t libinput_event_tablet_tool_get_time | ( | struct libinput_event_tablet_tool * | event | ) |
- Parameters
-
event The libinput tablet tool event
- Returns
- The event time for this event
uint64_t libinput_event_tablet_tool_get_time_usec | ( | struct libinput_event_tablet_tool * | event | ) |
- Parameters
-
event The libinput tablet tool event
- Returns
- The event time for this event in microseconds
enum libinput_tablet_tool_tip_state libinput_event_tablet_tool_get_tip_state | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the new tip state of a tool from a tip event.
Used to check whether or not a tool came in contact with the tablet surface or left contact with the tablet surface during an event of type LIBINPUT_EVENT_TABLET_TOOL_TIP.
- Parameters
-
event The libinput tablet tool event
- Returns
- The new tip state of the tool from the event.
struct libinput_tablet_tool* libinput_event_tablet_tool_get_tool | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the tool that was in use during this event.
If the caller holds at least one reference (see libinput_tablet_tool_ref()), this struct is used whenever the tools enters proximity. Otherwise, if no references remain when the tool leaves proximity, the tool may be destroyed.
- Note
- Physical tool tracking requires hardware support. If unavailable, libinput creates one tool per type per tablet. See Tracking unique tools for more details.
- Parameters
-
event The libinput tablet tool event
- Returns
- The new tool triggering this event
double libinput_event_tablet_tool_get_wheel_delta | ( | struct libinput_event_tablet_tool * | event | ) |
Return the delta for the wheel in degrees.
- Parameters
-
event The libinput tablet tool event
- Returns
- The delta of the wheel, in degrees, compared to the last event
int libinput_event_tablet_tool_get_wheel_delta_discrete | ( | struct libinput_event_tablet_tool * | event | ) |
Return the delta for the wheel in discrete steps (e.g.
wheel clicks).
- Parameters
-
event The libinput tablet tool event
- Returns
- The delta of the wheel, in discrete steps, compared to the last event
double libinput_event_tablet_tool_get_x | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the X coordinate of the tablet tool, in mm from the top left corner of the tablet in its current logical orientation.
Use libinput_event_tablet_tool_get_x_transformed() for transforming the axis value into a different coordinate space.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
double libinput_event_tablet_tool_get_x_transformed | ( | struct libinput_event_tablet_tool * | event, |
uint32_t | width | ||
) |
Return the current absolute x coordinate of the tablet tool event, transformed to screen coordinates.
- Note
- This function may be called for a specific axis even if libinput_event_tablet_tool_*_has_changed() returns 0 for that axis. libinput always includes all device axes in the event.
- Parameters
-
event The libinput tablet tool event width The current output screen width
- Returns
- the current absolute x coordinate transformed to a screen coordinate
double libinput_event_tablet_tool_get_y | ( | struct libinput_event_tablet_tool * | event | ) |
Returns the Y coordinate of the tablet tool, in mm from the top left corner of the tablet in its current logical orientation.
Use libinput_event_tablet_tool_get_y_transformed() for transforming the axis value into a different coordinate space.
- Parameters
-
event The libinput tablet tool event
- Returns
- The current value of the the axis
double libinput_event_tablet_tool_get_y_transformed | ( | struct libinput_event_tablet_tool * | event, |
uint32_t | height | ||
) |
Return the current absolute y coordinate of the tablet tool event, transformed to screen coordinates.
- Note
- This function may be called for a specific axis even if libinput_event_tablet_tool_*_has_changed() returns 0 for that axis. libinput always includes all device axes in the event.
- Parameters
-
event The libinput tablet tool event height The current output screen height
- Returns
- the current absolute y coordinate transformed to a screen coordinate
int libinput_event_tablet_tool_pressure_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the pressure axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
int libinput_event_tablet_tool_rotation_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the z-rotation axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
int libinput_event_tablet_tool_slider_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the slider axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
int libinput_event_tablet_tool_tilt_x_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the tilt x axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
int libinput_event_tablet_tool_tilt_y_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the tilt y axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
int libinput_event_tablet_tool_wheel_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the wheel axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
int libinput_event_tablet_tool_x_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the x axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
int libinput_event_tablet_tool_y_has_changed | ( | struct libinput_event_tablet_tool * | event | ) |
Check if the y axis was updated in this event.
For events that are not of type LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_AXIS, LIBINPUT_EVENT_TABLET_TOOL_TIP, or LIBINPUT_EVENT_TABLET_TOOL_PROXIMITY, or LIBINPUT_EVENT_TABLET_TOOL_BUTTON.
- Parameters
-
event The libinput tablet tool event
- Returns
- 1 if the axis was updated or 0 otherwise
uint64_t libinput_tablet_tool_get_serial | ( | struct libinput_tablet_tool * | tool | ) |
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.
- Parameters
-
tool The libinput tool
- Returns
- The tool serial number
- See also
- libinput_tablet_tool_is_unique
uint64_t libinput_tablet_tool_get_tool_id | ( | struct libinput_tablet_tool * | tool | ) |
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 libinput_tablet_tool_get_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.
- Parameters
-
tool The libinput tool
- Returns
- The tool ID for this tool object or 0 if none is provided
- See also
- libinput_tablet_tool_get_type
enum libinput_tablet_tool_type libinput_tablet_tool_get_type | ( | struct libinput_tablet_tool * | tool | ) |
Return the type of tool type for a tool object, see Vendor-specific tablet tool types for details.
- Parameters
-
tool The libinput tool
- Returns
- The tool type for this tool object
- See also
- libinput_tablet_tool_get_tool_id
void* libinput_tablet_tool_get_user_data | ( | struct libinput_tablet_tool * | tool | ) |
Return the user data associated with a tool object.
libinput does not manage, look at, or modify this data. The caller must ensure the data is valid.
- Parameters
-
tool The libinput tool
- Returns
- The user data associated with the tool object
int libinput_tablet_tool_has_button | ( | struct libinput_tablet_tool * | tool, |
uint32_t | code | ||
) |
Check if a tablet tool has a button with the passed-in code (see linux/input.h).
- Parameters
-
tool A tablet tool code button code to check for
- Returns
- 1 if the tool supports this button code, 0 if it does not
int libinput_tablet_tool_has_distance | ( | struct libinput_tablet_tool * | tool | ) |
Return whether the tablet tool supports distance.
- Parameters
-
tool The tool to check the axis capabilities of
- Returns
- Nonzero if the axis is available, zero otherwise.
int libinput_tablet_tool_has_pressure | ( | struct libinput_tablet_tool * | tool | ) |
Return whether the tablet tool supports pressure.
- Parameters
-
tool The tool to check the axis capabilities of
- Returns
- Nonzero if the axis is available, zero otherwise.
int libinput_tablet_tool_has_rotation | ( | struct libinput_tablet_tool * | tool | ) |
Return whether the tablet tool supports z-rotation.
- Parameters
-
tool The tool to check the axis capabilities of
- Returns
- Nonzero if the axis is available, zero otherwise.
int libinput_tablet_tool_has_slider | ( | struct libinput_tablet_tool * | tool | ) |
Return whether the tablet tool has a slider axis.
- Parameters
-
tool The tool to check the axis capabilities of
- Returns
- Nonzero if the axis is available, zero otherwise.
int libinput_tablet_tool_has_tilt | ( | struct libinput_tablet_tool * | tool | ) |
Return whether the tablet tool supports tilt.
- Parameters
-
tool The tool to check the axis capabilities of
- Returns
- Nonzero if the axis is available, zero otherwise.
int libinput_tablet_tool_has_wheel | ( | struct libinput_tablet_tool * | tool | ) |
Return whether the tablet tool has a relative wheel.
- Parameters
-
tool The tool to check the axis capabilities of
- Returns
- Nonzero if the axis is available, zero otherwise.
int libinput_tablet_tool_is_unique | ( | struct libinput_tablet_tool * | tool | ) |
Return nonzero if the physical tool can be uniquely identified by libinput, or nonzero 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.
- Parameters
-
tool A tablet tool
- Returns
- 1 if the tool can be uniquely identified, 0 otherwise.
- See also
- libinput_tablet_tool_get_serial
struct libinput_tablet_tool* libinput_tablet_tool_ref | ( | struct libinput_tablet_tool * | tool | ) |
Increment the reference count of the tool by one.
A tool is destroyed whenever the reference count reaches 0. See libinput_tablet_tool_unref().
- Parameters
-
tool The tool to increment the ref count of
- Returns
- The passed tool
- See also
- libinput_tablet_tool_unref
void libinput_tablet_tool_set_user_data | ( | struct libinput_tablet_tool * | tool, |
void * | user_data | ||
) |
Set the user data associated with a tool object, if any.
- Parameters
-
tool The libinput tool user_data The user data to associate with the tool object
struct libinput_tablet_tool* libinput_tablet_tool_unref | ( | struct libinput_tablet_tool * | tool | ) |
Decrement the reference count of the tool by one.
When the reference count of tool reaches 0, the memory allocated for tool will be freed.
- Parameters
-
tool The tool to decrement the ref count of
- Returns
- NULL if the tool was destroyed otherwise the passed tool
- See also
- libinput_tablet_tool_ref