gesture: Clean up trigger edge accessors
Use G_GNUC_INTERNAL instead of the leading underscore, as we may make the accessor functions public at some point. Also, clean up the documentation. https://bugzilla.gnome.org/show_bug.cgi?id=710227
This commit is contained in:
parent
97724939c8
commit
154ca6ef99
@ -28,20 +28,18 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
/*< private >
|
/*< private >
|
||||||
* ClutterGestureTriggerEdge:
|
* 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
|
* the gesture must begin immediately and there's no drag limit that
|
||||||
* will cause its cancellation;
|
* 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
|
* it needs to wait until the drag threshold has been exceeded before
|
||||||
* considering that the gesture has begun;
|
* 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
|
* the gesture must begin immediately and that it must be cancelled
|
||||||
* once the drag exceed the configured threshold.
|
* 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.
|
* function.
|
||||||
*
|
|
||||||
* Since: 1.14
|
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
@ -50,9 +48,11 @@ typedef enum
|
|||||||
CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE
|
CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE
|
||||||
} ClutterGestureTriggerEdge;
|
} ClutterGestureTriggerEdge;
|
||||||
|
|
||||||
|
G_GNUC_INTERNAL
|
||||||
void _clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action,
|
void clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action,
|
||||||
ClutterGestureTriggerEdge edge);
|
ClutterGestureTriggerEdge edge);
|
||||||
|
G_GNUC_INTERNAL
|
||||||
|
ClutterGestureTriggerEdge clutter_gesture_action_get_threshold_trigger_egde (ClutterGestureAction *action);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@ -554,7 +554,7 @@ default_event_handler (ClutterGestureAction *action,
|
|||||||
|
|
||||||
|
|
||||||
/*< private >
|
/*< private >
|
||||||
* _clutter_gesture_action_set_threshold_trigger_edge:
|
* clutter_gesture_action_set_threshold_trigger_edge:
|
||||||
* @action: a #ClutterGestureAction
|
* @action: a #ClutterGestureAction
|
||||||
* @edge: the %ClutterGestureTriggerEdge
|
* @edge: the %ClutterGestureTriggerEdge
|
||||||
*
|
*
|
||||||
@ -562,14 +562,28 @@ default_event_handler (ClutterGestureAction *action,
|
|||||||
*
|
*
|
||||||
* This function can be called by #ClutterGestureAction subclasses that needs
|
* This function can be called by #ClutterGestureAction subclasses that needs
|
||||||
* to change the %CLUTTER_GESTURE_TRIGGER_EDGE_AFTER default.
|
* to change the %CLUTTER_GESTURE_TRIGGER_EDGE_AFTER default.
|
||||||
*
|
|
||||||
* Since: 1.14
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action,
|
clutter_gesture_action_set_threshold_trigger_edge (ClutterGestureAction *action,
|
||||||
ClutterGestureTriggerEdge edge)
|
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
|
static void
|
||||||
|
@ -122,8 +122,8 @@ clutter_tap_action_class_init (ClutterTapActionClass *klass)
|
|||||||
static void
|
static void
|
||||||
clutter_tap_action_init (ClutterTapAction *self)
|
clutter_tap_action_init (ClutterTapAction *self)
|
||||||
{
|
{
|
||||||
_clutter_gesture_action_set_threshold_trigger_edge (CLUTTER_GESTURE_ACTION (self),
|
clutter_gesture_action_set_threshold_trigger_edge (CLUTTER_GESTURE_ACTION (self),
|
||||||
CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE);
|
CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user