Reduce touch events to a single event type
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 19 Dec 2013 07:16:19 +0000 (17:16 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 22 Jan 2014 00:51:45 +0000 (10:51 +1000)
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>
src/libinput.c
src/libinput.h

index 3eff6c8593b4693820d754a3248eddd86c205a20..58bceefd5a589bdb17b95267d605ab3670c2157d 100644 (file)
@@ -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,
index e60435080fa978bbd3c124e1ab32accad82f6e80..d6abaa1cc01cdf3a84e3fa023d916326d68c84e9 100644 (file)
@@ -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