Events that come from tablet devices.
More...
Events that come from tablet devices.
Checks if an axis was updated in this event or return 0 otherwise.
For tablet events that are not of type LIBINPUT_EVENT_TABLET_AXIS, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_AXIS.
- Parameters
-
event | The libinput tablet event |
axis | The axis to check for updates |
- Returns
- 1 if the axis was updated or 0 otherwise
Return the axis value of a given axis for a tablet.
The interpretation of the value is as follows:
For tablet events that are not of type LIBINPUT_EVENT_TABLET_AXIS or LIBINPUT_EVENT_TABLET_AXIS_RELATIVE, this function returns 0.
- Parameters
-
event | The libinput tablet event |
axis | The axis to retrieve the value of |
- Returns
- The current value of the the axis
Return the button that triggered this event.
For tablet events that are not of type LIBINPUT_EVENT_TABLET_BUTTON, this function returns 0.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_BUTTON.
- Parameters
-
event | The libinput tablet event |
- Returns
- the button triggering this 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_BUTTON.
- Parameters
-
event | The libinput tablet event |
- Returns
- the button state triggering this event
For the button of a LIBINPUT_EVENT_TABLET_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_BUTTON. For other events, this function returns 0.
- Returns
- the seat wide pressed button count for the key of this event
- Parameters
-
event | The libinput tablet event |
- Returns
- The event time for this event
Return the new tool in use for this event.
For tablet events that are not of type LIBINPUT_EVENT_TABLET_TOOL_UPDATE, this function returns NULL. By default, the lifetime of each tool is bound to the lifetime of the event, so the tool will be destroyed when the event is destroyed. However, the lifetime of the tool may be extended by using libinput_tool_ref() to increment the reference count of the tool. Whenever libinput detects that the tool is in proximity of any tablet that's connected, it will return the same libinput_tool object.
- Note
- It is an application bug to call this function for events other than LIBINPUT_EVENT_TABLET_TOOL_UPDATE.
-
On tablets where the serial number of tools is not reported, each tool cannot be guaranteed to be unique.
- Parameters
-
event | The libinput tablet event |
- Returns
- The new tool triggering this event
Return the current absolute x coordinate of the tablet event, transformed to screen coordinates.
- Parameters
-
event | The libinput tablet event |
width | The current output screen width |
- Returns
- the current absolute x coordinate transformed to a screen coordinate
Return the current absolute y coordinate of the tablet event, transformed to screen coordinates.
- Parameters
-
event | The libinput tablet event |
height | The current output screen height |
- Returns
- the current absolute y coordinate transformed to a screen coordinate
uint32_t libinput_tool_get_serial |
( |
struct libinput_tool * |
tool | ) |
|
Return the serial number of a tool.
- Note
- Not all tablets report a serial number along with the type of tool being used. If the hardware does not provide a unique serial number, the serial number is always 0.
- Parameters
-
- Returns
- The new tool serial triggering this event
Return the type of tool type for a tool object.
- Parameters
-
- Returns
- The tool type for this tool object
void libinput_tool_ref |
( |
struct libinput_tool * |
tool | ) |
|
Increment the ref count of tool by one.
- Parameters
-
tool | The tool to increment the ref count of |
void libinput_tool_unref |
( |
struct libinput_tool * |
tool | ) |
|
Decrement the ref count of tool by one.
When the ref count of tool reaches 0, the memory allocated for tool will be freed.
- Parameters
-
tool | The tool to decrement the ref count of |