libinput
0.14.1
A wrapper library for input devices
|
Events from absolute touch devices. More...
Data Structures | |
struct | libinput_event_touch |
Touch event representing a touch down, move or up, as well as a touch cancel and touch frame events. More... | |
Functions | |
uint32_t | libinput_event_touch_get_time (struct libinput_event_touch *event) |
int32_t | libinput_event_touch_get_slot (struct libinput_event_touch *event) |
Get the slot of this touch event. More... | |
int32_t | libinput_event_touch_get_seat_slot (struct libinput_event_touch *event) |
Get the seat slot of the touch event. More... | |
double | libinput_event_touch_get_x (struct libinput_event_touch *event) |
Return the current absolute x coordinate of the touch event, in mm from the top left corner of the device. More... | |
double | libinput_event_touch_get_y (struct libinput_event_touch *event) |
Return the current absolute y coordinate of the touch event, in mm from the top left corner of the device. More... | |
double | libinput_event_touch_get_x_transformed (struct libinput_event_touch *event, uint32_t width) |
Return the current absolute x coordinate of the touch event, transformed to screen coordinates. More... | |
double | libinput_event_touch_get_y_transformed (struct libinput_event_touch *event, uint32_t height) |
Return the current absolute y coordinate of the touch event, transformed to screen coordinates. More... | |
struct libinput_event * | libinput_event_touch_get_base_event (struct libinput_event_touch *event) |
Events from absolute touch devices.
struct libinput_event* libinput_event_touch_get_base_event | ( | struct libinput_event_touch * | event | ) |
int32_t libinput_event_touch_get_seat_slot | ( | struct libinput_event_touch * | event | ) |
Get the seat slot of the touch event.
A seat slot is a non-negative seat wide unique identifier of an active touch point.
Events from single touch devices will be represented as one individual touch point per device.
For events not of type LIBINPUT_EVENT_TOUCH_DOWN, LIBINPUT_EVENT_TOUCH_UP, LIBINPUT_EVENT_TOUCH_MOTION or LIBINPUT_EVENT_TOUCH_CANCEL, this function returns 0.
int32_t libinput_event_touch_get_slot | ( | struct libinput_event_touch * | event | ) |
Get the slot of this touch event.
See the kernel's multitouch protocol B documentation for more information.
If the touch event has no assigned slot, for example if it is from a single touch device, this function returns -1.
For events not of type LIBINPUT_EVENT_TOUCH_DOWN, LIBINPUT_EVENT_TOUCH_UP, LIBINPUT_EVENT_TOUCH_MOTION or LIBINPUT_EVENT_TOUCH_CANCEL, this function returns 0.
uint32_t libinput_event_touch_get_time | ( | struct libinput_event_touch * | event | ) |
double libinput_event_touch_get_x | ( | struct libinput_event_touch * | event | ) |
Return the current absolute x coordinate of the touch event, in mm from the top left corner of the device.
To get the corresponding output screen coordinate, use libinput_event_touch_get_x_transformed().
For events not of type LIBINPUT_EVENT_TOUCH_DOWN, LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
event | The libinput touch event |
double libinput_event_touch_get_x_transformed | ( | struct libinput_event_touch * | event, |
uint32_t | width | ||
) |
Return the current absolute x coordinate of the touch event, transformed to screen coordinates.
For events not of type LIBINPUT_EVENT_TOUCH_DOWN, LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
event | The libinput touch event |
width | The current output screen width |
double libinput_event_touch_get_y | ( | struct libinput_event_touch * | event | ) |
Return the current absolute y coordinate of the touch event, in mm from the top left corner of the device.
To get the corresponding output screen coordinate, use libinput_event_touch_get_y_transformed().
For events not of type LIBINPUT_EVENT_TOUCH_DOWN, LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
event | The libinput touch event |
double libinput_event_touch_get_y_transformed | ( | struct libinput_event_touch * | event, |
uint32_t | height | ||
) |
Return the current absolute y coordinate of the touch event, transformed to screen coordinates.
For events not of type LIBINPUT_EVENT_TOUCH_DOWN, LIBINPUT_EVENT_TOUCH_MOTION, this function returns 0.
event | The libinput touch event |
height | The current output screen height |