mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
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 >
|
||||
* 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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user