From: Peter Hutterer Date: Thu, 19 Dec 2013 07:16:19 +0000 (+1000) Subject: Reduce touch events to a single event type X-Git-Tag: 0.1.0~65 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39469df2fb68f68b390b1c1ce8db72e061bc86b4;p=platform%2Fupstream%2Flibinput.git 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 --- diff --git a/src/libinput.c b/src/libinput.c index 3eff6c85..58bceefd 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -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, diff --git a/src/libinput.h b/src/libinput.h index e6043508..d6abaa1c 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -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