[mutter/wip/tablet-protocol-v2: 90/149] clutter: Add pad event types
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol-v2: 90/149] clutter: Add pad event types
- Date: Wed, 20 Jul 2016 17:41:04 +0000 (UTC)
commit 379c6fb81aa7d062ffe52f5b40781522333039bf
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue May 10 16:59:34 2016 +0200
clutter: Add pad event types
And their management along the pipeline.
clutter/clutter/clutter-enums.h | 4 ++++
clutter/clutter/clutter-event.c | 38 ++++++++++++++++++++++++++++++++++++++
clutter/clutter/clutter-main.c | 4 ++++
3 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter/clutter-enums.h b/clutter/clutter/clutter-enums.h
index 3a261f7..6f779c5 100644
--- a/clutter/clutter/clutter-enums.h
+++ b/clutter/clutter/clutter-enums.h
@@ -794,6 +794,10 @@ typedef enum { /*< prefix=CLUTTER >*/
CLUTTER_TOUCHPAD_SWIPE,
CLUTTER_PROXIMITY_IN,
CLUTTER_PROXIMITY_OUT,
+ CLUTTER_PAD_BUTTON_PRESS,
+ CLUTTER_PAD_BUTTON_RELEASE,
+ CLUTTER_PAD_STRIP,
+ CLUTTER_PAD_RING,
CLUTTER_EVENT_LAST /* helper */
} ClutterEventType;
diff --git a/clutter/clutter/clutter-event.c b/clutter/clutter/clutter-event.c
index c489ab4..3ba8467 100644
--- a/clutter/clutter/clutter-event.c
+++ b/clutter/clutter/clutter-event.c
@@ -413,6 +413,10 @@ clutter_event_get_position (const ClutterEvent *event,
case CLUTTER_EVENT_LAST:
case CLUTTER_PROXIMITY_IN:
case CLUTTER_PROXIMITY_OUT:
+ case CLUTTER_PAD_BUTTON_PRESS:
+ case CLUTTER_PAD_BUTTON_RELEASE:
+ case CLUTTER_PAD_STRIP:
+ case CLUTTER_PAD_RING:
clutter_point_init (position, 0.f, 0.f);
break;
@@ -483,6 +487,10 @@ clutter_event_set_coords (ClutterEvent *event,
case CLUTTER_EVENT_LAST:
case CLUTTER_PROXIMITY_IN:
case CLUTTER_PROXIMITY_OUT:
+ case CLUTTER_PAD_BUTTON_PRESS:
+ case CLUTTER_PAD_BUTTON_RELEASE:
+ case CLUTTER_PAD_STRIP:
+ case CLUTTER_PAD_RING:
break;
case CLUTTER_ENTER:
@@ -1133,6 +1141,19 @@ clutter_event_set_device (ClutterEvent *event,
case CLUTTER_PROXIMITY_OUT:
event->proximity.device = device;
break;
+
+ case CLUTTER_PAD_BUTTON_PRESS:
+ case CLUTTER_PAD_BUTTON_RELEASE:
+ event->pad_button.device = device;
+ break;
+
+ case CLUTTER_PAD_STRIP:
+ event->pad_strip.device = device;
+ break;
+
+ case CLUTTER_PAD_RING:
+ event->pad_ring.device = device;
+ break;
}
}
@@ -1217,6 +1238,19 @@ clutter_event_get_device (const ClutterEvent *event)
case CLUTTER_PROXIMITY_OUT:
device = event->proximity.device;
break;
+
+ case CLUTTER_PAD_BUTTON_PRESS:
+ case CLUTTER_PAD_BUTTON_RELEASE:
+ device = event->pad_button.device;
+ break;
+
+ case CLUTTER_PAD_STRIP:
+ device = event->pad_strip.device;
+ break;
+
+ case CLUTTER_PAD_RING:
+ device = event->pad_ring.device;
+ break;
}
return device;
@@ -1708,6 +1742,10 @@ clutter_event_get_axes (const ClutterEvent *event,
case CLUTTER_TOUCHPAD_PINCH:
case CLUTTER_TOUCHPAD_SWIPE:
+ case CLUTTER_PAD_BUTTON_PRESS:
+ case CLUTTER_PAD_BUTTON_RELEASE:
+ case CLUTTER_PAD_STRIP:
+ case CLUTTER_PAD_RING:
break;
}
diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c
index a4f4c1f..ba94843 100644
--- a/clutter/clutter/clutter-main.c
+++ b/clutter/clutter/clutter-main.c
@@ -2163,6 +2163,10 @@ _clutter_process_event_details (ClutterActor *stage,
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
+ case CLUTTER_PAD_BUTTON_PRESS:
+ case CLUTTER_PAD_BUTTON_RELEASE:
+ case CLUTTER_PAD_STRIP:
+ case CLUTTER_PAD_RING:
{
ClutterActor *actor = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]