clutter: Add pad event types
And their management along the pipeline.
This commit is contained in:
parent
d76aa89be9
commit
cc09ca8892
@ -794,6 +794,10 @@ typedef enum { /*< prefix=CLUTTER >*/
|
|||||||
CLUTTER_TOUCHPAD_SWIPE,
|
CLUTTER_TOUCHPAD_SWIPE,
|
||||||
CLUTTER_PROXIMITY_IN,
|
CLUTTER_PROXIMITY_IN,
|
||||||
CLUTTER_PROXIMITY_OUT,
|
CLUTTER_PROXIMITY_OUT,
|
||||||
|
CLUTTER_PAD_BUTTON_PRESS,
|
||||||
|
CLUTTER_PAD_BUTTON_RELEASE,
|
||||||
|
CLUTTER_PAD_STRIP,
|
||||||
|
CLUTTER_PAD_RING,
|
||||||
|
|
||||||
CLUTTER_EVENT_LAST /* helper */
|
CLUTTER_EVENT_LAST /* helper */
|
||||||
} ClutterEventType;
|
} ClutterEventType;
|
||||||
|
@ -413,6 +413,10 @@ clutter_event_get_position (const ClutterEvent *event,
|
|||||||
case CLUTTER_EVENT_LAST:
|
case CLUTTER_EVENT_LAST:
|
||||||
case CLUTTER_PROXIMITY_IN:
|
case CLUTTER_PROXIMITY_IN:
|
||||||
case CLUTTER_PROXIMITY_OUT:
|
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);
|
clutter_point_init (position, 0.f, 0.f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -483,6 +487,10 @@ clutter_event_set_coords (ClutterEvent *event,
|
|||||||
case CLUTTER_EVENT_LAST:
|
case CLUTTER_EVENT_LAST:
|
||||||
case CLUTTER_PROXIMITY_IN:
|
case CLUTTER_PROXIMITY_IN:
|
||||||
case CLUTTER_PROXIMITY_OUT:
|
case CLUTTER_PROXIMITY_OUT:
|
||||||
|
case CLUTTER_PAD_BUTTON_PRESS:
|
||||||
|
case CLUTTER_PAD_BUTTON_RELEASE:
|
||||||
|
case CLUTTER_PAD_STRIP:
|
||||||
|
case CLUTTER_PAD_RING:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLUTTER_ENTER:
|
case CLUTTER_ENTER:
|
||||||
@ -1133,6 +1141,19 @@ clutter_event_set_device (ClutterEvent *event,
|
|||||||
case CLUTTER_PROXIMITY_OUT:
|
case CLUTTER_PROXIMITY_OUT:
|
||||||
event->proximity.device = device;
|
event->proximity.device = device;
|
||||||
break;
|
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:
|
case CLUTTER_PROXIMITY_OUT:
|
||||||
device = event->proximity.device;
|
device = event->proximity.device;
|
||||||
break;
|
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;
|
return device;
|
||||||
@ -1708,6 +1742,10 @@ clutter_event_get_axes (const ClutterEvent *event,
|
|||||||
|
|
||||||
case CLUTTER_TOUCHPAD_PINCH:
|
case CLUTTER_TOUCHPAD_PINCH:
|
||||||
case CLUTTER_TOUCHPAD_SWIPE:
|
case CLUTTER_TOUCHPAD_SWIPE:
|
||||||
|
case CLUTTER_PAD_BUTTON_PRESS:
|
||||||
|
case CLUTTER_PAD_BUTTON_RELEASE:
|
||||||
|
case CLUTTER_PAD_STRIP:
|
||||||
|
case CLUTTER_PAD_RING:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2163,6 +2163,10 @@ _clutter_process_event_details (ClutterActor *stage,
|
|||||||
|
|
||||||
case CLUTTER_KEY_PRESS:
|
case CLUTTER_KEY_PRESS:
|
||||||
case CLUTTER_KEY_RELEASE:
|
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;
|
ClutterActor *actor = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user