mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-09 22:40:15 +01:00
Reduce touch events to a single event type
No real effect since we're hiding the actual touch events through the touch type. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
040c25a4f4
commit
39469df2fb
2 changed files with 24 additions and 24 deletions
|
|
@ -76,7 +76,7 @@ struct libinput_event_pointer {
|
|||
li_fixed_t value;
|
||||
};
|
||||
|
||||
struct libinput_event_touch_touch {
|
||||
struct libinput_event_touch {
|
||||
struct libinput_event base;
|
||||
uint32_t time;
|
||||
uint32_t slot;
|
||||
|
|
@ -192,36 +192,36 @@ libinput_event_pointer_get_axis_value(
|
|||
}
|
||||
|
||||
LIBINPUT_EXPORT uint32_t
|
||||
libinput_event_touch_touch_get_time(
|
||||
struct libinput_event_touch_touch *event)
|
||||
libinput_event_touch_get_time(
|
||||
struct libinput_event_touch *event)
|
||||
{
|
||||
return event->time;
|
||||
}
|
||||
|
||||
LIBINPUT_EXPORT uint32_t
|
||||
libinput_event_touch_touch_get_slot(
|
||||
struct libinput_event_touch_touch *event)
|
||||
libinput_event_touch_get_slot(
|
||||
struct libinput_event_touch *event)
|
||||
{
|
||||
return event->slot;
|
||||
}
|
||||
|
||||
LIBINPUT_EXPORT li_fixed_t
|
||||
libinput_event_touch_touch_get_x(
|
||||
struct libinput_event_touch_touch *event)
|
||||
libinput_event_touch_get_x(
|
||||
struct libinput_event_touch *event)
|
||||
{
|
||||
return event->x;
|
||||
}
|
||||
|
||||
LIBINPUT_EXPORT li_fixed_t
|
||||
libinput_event_touch_touch_get_y(
|
||||
struct libinput_event_touch_touch *event)
|
||||
libinput_event_touch_get_y(
|
||||
struct libinput_event_touch *event)
|
||||
{
|
||||
return event->y;
|
||||
}
|
||||
|
||||
LIBINPUT_EXPORT enum libinput_touch_type
|
||||
libinput_event_touch_touch_get_touch_type(
|
||||
struct libinput_event_touch_touch *event)
|
||||
libinput_event_touch_get_touch_type(
|
||||
struct libinput_event_touch *event)
|
||||
{
|
||||
return event->touch_type;
|
||||
}
|
||||
|
|
@ -711,13 +711,13 @@ touch_notify_touch(struct libinput_device *device,
|
|||
li_fixed_t y,
|
||||
enum libinput_touch_type touch_type)
|
||||
{
|
||||
struct libinput_event_touch_touch *touch_event;
|
||||
struct libinput_event_touch *touch_event;
|
||||
|
||||
touch_event = malloc(sizeof *touch_event);
|
||||
if (!touch_event)
|
||||
return;
|
||||
|
||||
*touch_event = (struct libinput_event_touch_touch) {
|
||||
*touch_event = (struct libinput_event_touch) {
|
||||
.time = time,
|
||||
.slot = slot,
|
||||
.x = x,
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ struct libinput_event;
|
|||
struct libinput_event_device_notify;
|
||||
struct libinput_event_keyboard;
|
||||
struct libinput_event_pointer;
|
||||
struct libinput_event_touch_touch;
|
||||
struct libinput_event_touch;
|
||||
|
||||
/**
|
||||
* @defgroup fixed_point Fixed point utilities
|
||||
|
|
@ -310,24 +310,24 @@ libinput_event_pointer_get_axis_value(
|
|||
*/
|
||||
|
||||
uint32_t
|
||||
libinput_event_touch_touch_get_time(
|
||||
struct libinput_event_touch_touch *event);
|
||||
libinput_event_touch_get_time(
|
||||
struct libinput_event_touch *event);
|
||||
|
||||
uint32_t
|
||||
libinput_event_touch_touch_get_slot(
|
||||
struct libinput_event_touch_touch *event);
|
||||
libinput_event_touch_get_slot(
|
||||
struct libinput_event_touch *event);
|
||||
|
||||
li_fixed_t
|
||||
libinput_event_touch_touch_get_x(
|
||||
struct libinput_event_touch_touch *event);
|
||||
libinput_event_touch_get_x(
|
||||
struct libinput_event_touch *event);
|
||||
|
||||
li_fixed_t
|
||||
libinput_event_touch_touch_get_y(
|
||||
struct libinput_event_touch_touch *event);
|
||||
libinput_event_touch_get_y(
|
||||
struct libinput_event_touch *event);
|
||||
|
||||
enum libinput_touch_type
|
||||
libinput_event_touch_touch_get_touch_type(
|
||||
struct libinput_event_touch_touch *event);
|
||||
libinput_event_touch_get_touch_type(
|
||||
struct libinput_event_touch *event);
|
||||
|
||||
/**
|
||||
* @defgroup base Initialization and manipulation of libinput contexts
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue