diff --git a/clutter/clutter-gesture-action-private.h b/clutter/clutter-gesture-action-private.h index 040fcc75b..cb6440bd5 100644 --- a/clutter/clutter-gesture-action-private.h +++ b/clutter/clutter-gesture-action-private.h @@ -28,20 +28,18 @@ G_BEGIN_DECLS /*< private > * ClutterGestureTriggerEdge: - * @CLUTTER_GESTURE_TRIGGER_NONE: Tell #ClutterGestureAction that + * @CLUTTER_GESTURE_TRIGGER_EDGE_NONE: Tell #ClutterGestureAction that * the gesture must begin immediately and there's no drag limit that * will cause its cancellation; - * @CLUTTER_GESTURE_TRIGGER_AFTER: Tell #ClutterGestureAction that + * @CLUTTER_GESTURE_TRIGGER_EDGE_AFTER: Tell #ClutterGestureAction that * it needs to wait until the drag threshold has been exceeded before * considering that the gesture has begun; - * @CLUTTER_GESTURE_TRIGGER_BEFORE: Tell #ClutterGestureAction that + * @CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE: Tell #ClutterGestureAction that * the gesture must begin immediately and that it must be cancelled * once the drag exceed the configured threshold. * - * Enum passed to the _clutter_gesture_action_set_threshold_trigger_edge() + * Enum passed to the clutter_gesture_action_set_threshold_trigger_edge() * function. - * - * Since: 1.14 */ typedef enum { @@ -50,9 +48,11 @@ typedef enum CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE } ClutterGestureTriggerEdge; - -void _clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action, - ClutterGestureTriggerEdge edge); +G_GNUC_INTERNAL +void clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action, + ClutterGestureTriggerEdge edge); +G_GNUC_INTERNAL +ClutterGestureTriggerEdge clutter_gesture_action_get_threshold_trigger_egde (ClutterGestureAction *action); G_END_DECLS diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c index 09324f48d..46dab46e4 100644 --- a/clutter/clutter-gesture-action.c +++ b/clutter/clutter-gesture-action.c @@ -554,7 +554,7 @@ default_event_handler (ClutterGestureAction *action, /*< private > - * _clutter_gesture_action_set_threshold_trigger_edge: + * clutter_gesture_action_set_threshold_trigger_edge: * @action: a #ClutterGestureAction * @edge: the %ClutterGestureTriggerEdge * @@ -562,14 +562,28 @@ default_event_handler (ClutterGestureAction *action, * * This function can be called by #ClutterGestureAction subclasses that needs * to change the %CLUTTER_GESTURE_TRIGGER_EDGE_AFTER default. - * - * Since: 1.14 */ void -_clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action, - ClutterGestureTriggerEdge edge) +clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action, + ClutterGestureTriggerEdge edge) { - action->priv->edge = edge; + if (action->priv->edge != edge) + action->priv->edge = edge; +} + +/*< private > + * clutter_gesture_action_get_threshold_trigger_egde: + * @action: a #ClutterGestureAction + * + * Retrieves the edge trigger of the gesture @action, as set using + * clutter_gesture_action_set_threshold_trigger_edge(). + * + * Return value: the edge trigger + */ +ClutterGestureTriggerEdge +clutter_gesture_action_get_threshold_trigger_egde (ClutterGestureAction *action) +{ + return action->priv->edge; } static void diff --git a/clutter/clutter-tap-action.c b/clutter/clutter-tap-action.c index caa00a1d1..d67698096 100644 --- a/clutter/clutter-tap-action.c +++ b/clutter/clutter-tap-action.c @@ -122,8 +122,8 @@ clutter_tap_action_class_init (ClutterTapActionClass *klass) static void clutter_tap_action_init (ClutterTapAction *self) { - _clutter_gesture_action_set_threshold_trigger_edge (CLUTTER_GESTURE_ACTION (self), - CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE); + clutter_gesture_action_set_threshold_trigger_edge (CLUTTER_GESTURE_ACTION (self), + CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE); } /**