Clutter.PanAction
Description: Reference for Clutter.PanAction

### Class

# ClutterPanAction

#### Description [src]

    class Clutter.PanAction : Clutter.GestureAction {
      /* No available fields */
    }

Action for pan gestures

`ClutterPanAction` is a sub-class of `ClutterGestureAction` that implements the logic for recognizing pan gestures.

The simplest usage of `ClutterPanAction` consists in adding it to a `ClutterActor` with a child and setting it as reactive; for instance, the following code:

      clutter_actor_add_action (actor, clutter_pan_action_new ());
      clutter_actor_set_reactive (actor, TRUE);

will automatically result in the actor children to be moved when dragging.

#### Ancestors

- ClutterGestureAction
- ClutterAction
- ClutterActorMeta
- GInitiallyUnowned
- GObject

#### Constructors

###### clutter_pan_action_new

Creates a new `ClutterPanAction` instance.

#### Instance methods

###### clutter_pan_action_get_acceleration_factor

Retrieves the initial acceleration factor for interpolated ::pan events.

###### clutter_pan_action_get_constrained_motion_delta

Retrieves the delta, in stage space, dependent on the current state of the `ClutterPanAction`, and respecting the constraint specified by the `ClutterPanAction:pan-axis` property.

###### clutter_pan_action_get_deceleration

Retrieves the deceleration rate of interpolated ::pan events.

###### clutter_pan_action_get_interpolate

Checks if the action should emit ::pan events even after releasing the pointer during a panning gesture, to emulate some kind of kinetic inertia.

###### clutter_pan_action_get_interpolated_coords

Retrieves the coordinates, in stage space, of the latest interpolated event, analogous to `clutter_gesture_action_get_motion_coords()`.

###### clutter_pan_action_get_interpolated_delta

Retrieves the delta, in stage space, since the latest interpolated event, analogous to `clutter_gesture_action_get_motion_delta()`.

###### clutter_pan_action_get_motion_coords

Retrieves the coordinates, in stage space, dependent on the current state of the `ClutterPanAction`. If it is inactive, both fields will be set to 0. If it is panning by user action, the values will be equivalent to those returned by `clutter_gesture_action_get_motion_coords()`. If it is interpolating with some form of kinetic scrolling, the values will be equivalent to those returned by `clutter_pan_action_get_interpolated_coords()`. This is a convenience method designed to be used in replacement “pan” signal handlers.

###### clutter_pan_action_get_motion_delta

Retrieves the delta, in stage space, dependent on the current state of the `ClutterPanAction`. If it is inactive, both fields will be set to 0. If it is panning by user action, the values will be equivalent to those returned by `clutter_gesture_action_get_motion_delta()`. If it is interpolating with some form of kinetic scrolling, the values will be equivalent to those returned by `clutter_pan_action_get_interpolated_delta()`. This is a convenience method designed to be used in replacement “pan” signal handlers.

###### clutter_pan_action_get_pan_axis

Retrieves the axis constraint set by `clutter_pan_action_set_pan_axis()`

###### clutter_pan_action_set_acceleration_factor

Factor applied to the momentum velocity at the time of releasing the pointer when generating interpolated ::pan events.

###### clutter_pan_action_set_deceleration

Sets the deceleration rate of the interpolated ::pan events generated after a pan gesture. This is approximately the value that the momentum at the time of releasing the pointer is divided by every 60th of a second.

###### clutter_pan_action_set_interpolate

Sets whether the action should emit interpolated ::pan events after the drag has ended, to emulate the gesture kinetic inertia.

###### clutter_pan_action_set_pan_axis

Restricts the panning action to a specific axis.

##### Methods inherited from ClutterGestureAction (17)

###### clutter_gesture_action_cancel

Cancel a `ClutterGestureAction` before it begins.

###### clutter_gesture_action_get_device

Retrieves the `ClutterInputDevice` of a touch point.

###### clutter_gesture_action_get_last_event

Retrieves a reference to the last `ClutterEvent` for a touch point. Call `clutter_event_copy()` if you need to store the reference somewhere.

###### clutter_gesture_action_get_motion_coords

Retrieves the coordinates, in stage space, of the latest motion event during the dragging.

###### clutter_gesture_action_get_motion_delta

Retrieves the incremental delta since the last motion event during the dragging.

###### clutter_gesture_action_get_n_current_points

Retrieves the number of points currently active.

###### clutter_gesture_action_get_n_touch_points

Retrieves the number of requested points to trigger the gesture.

###### clutter_gesture_action_get_press_coords

Retrieves the coordinates, in stage space, of the press event that started the dragging for a specific touch point.

###### clutter_gesture_action_get_release_coords

Retrieves the coordinates, in stage space, where the touch point was last released.

###### clutter_gesture_action_get_sequence

Retrieves the `ClutterEventSequence` of a touch point.

###### clutter_gesture_action_get_threshold_trigger_distance

Retrieves the threshold trigger distance of the gesture `action`, as set using `clutter_gesture_action_set_threshold_trigger_distance()`.

###### clutter_gesture_action_get_threshold_trigger_edge

Retrieves the edge trigger of the gesture `action`, as set using `clutter_gesture_action_set_threshold_trigger_edge()`.

###### clutter_gesture_action_get_threshold_trigger_egde

Retrieves the edge trigger of the gesture `action`, as set using `clutter_gesture_action_set_threshold_trigger_edge()`.

Deprecated since: 1.20

###### clutter_gesture_action_get_velocity

Retrieves the velocity, in stage pixels per millisecond, of the latest motion event during the dragging.

###### clutter_gesture_action_set_n_touch_points

Sets the number of points needed to trigger the gesture.

###### clutter_gesture_action_set_threshold_trigger_distance

Sets the threshold trigger distance for the gesture drag threshold, if any.

###### clutter_gesture_action_set_threshold_trigger_edge

Sets the edge trigger for the gesture drag threshold, if any.

##### Methods inherited from ClutterAction (1)

###### clutter_action_get_phase

No description available.

##### Methods inherited from ClutterActorMeta (5)

###### clutter_actor_meta_get_actor

Retrieves a pointer to the `ClutterActor` that owns `meta`.

###### clutter_actor_meta_get_enabled

Retrieves whether `meta` is enabled.

###### clutter_actor_meta_get_name

Retrieves the name set using `clutter_actor_meta_set_name()`

###### clutter_actor_meta_set_enabled

Sets whether `meta` should be enabled or not.

###### clutter_actor_meta_set_name

Sets the name of `meta`.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Clutter.PanAction:acceleration-factor

The initial acceleration factor.

###### Clutter.PanAction:deceleration

The rate at which the interpolated panning will decelerate in.

###### Clutter.PanAction:interpolate

Whether interpolated events emission is enabled.

###### Clutter.PanAction:pan-axis

Constraints the panning action to the specified axis.

##### Properties inherited from ClutterGestureAction (4)

###### Clutter.GestureAction:n-touch-points

Number of touch points to trigger a gesture action.

###### Clutter.GestureAction:threshold-trigger-distance-x

The horizontal trigger distance to be used by the action to either emit the `ClutterGestureAction::gesture-begin` signal or to emit the `ClutterGestureAction::gesture-cancel` signal.

###### Clutter.GestureAction:threshold-trigger-distance-y

The vertical trigger distance to be used by the action to either emit the `ClutterGestureAction::gesture-begin` signal or to emit the `ClutterGestureAction::gesture-cancel` signal.

###### Clutter.GestureAction:threshold-trigger-edge

The trigger edge to be used by the action to either emit the `ClutterGestureAction::gesture-begin` signal or to emit the `ClutterGestureAction::gesture-cancel` signal.

##### Properties inherited from ClutterActorMeta (3)

###### Clutter.ActorMeta:actor

The `ClutterActor` attached to the `ClutterActorMeta` instance.

###### Clutter.ActorMeta:enabled

Whether or not the `ClutterActorMeta` is enabled.

###### Clutter.ActorMeta:name

The unique name to access the `ClutterActorMeta`.

#### Signals

###### Clutter.PanAction::pan

The signal is emitted to keep track of the motion during a pan gesture. `is_interpolated` is set to `TRUE` during the interpolation phase of the pan, after the drag has ended and the :interpolate property was set to `TRUE`.

###### Clutter.PanAction::pan-stopped

The signal is emitted at the end of the interpolation phase of the pan action, only when :interpolate is set to `TRUE`.

##### Signals inherited from ClutterGestureAction (4)

###### Clutter.GestureAction::gesture-begin

The signal is emitted when the `ClutterActor` to which a `ClutterGestureAction` has been applied starts receiving a gesture.

###### Clutter.GestureAction::gesture-cancel

The signal is emitted when the ongoing gesture gets cancelled from the `ClutterGestureAction::gesture-progress` signal handler.

###### Clutter.GestureAction::gesture-end

The signal is emitted at the end of the gesture gesture, when the pointer’s button is released.

###### Clutter.GestureAction::gesture-progress

The signal is emitted for each motion event after the `ClutterGestureAction::gesture-begin` signal has been emitted.

##### Signals inherited from GObject (1)

###### GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct ClutterPanActionClass {
      void (* pan_stopped) (
        ClutterPanAction* action,
        ClutterActor* actor
      );
      void (* _clutter_pan_action1) (
    void
      );
      void (* _clutter_pan_action2) (
    void
      );
      void (* _clutter_pan_action3) (
    void
      );
      void (* _clutter_pan_action4) (
    void
      );
      void (* _clutter_pan_action5) (
    void
      );
      void (* _clutter_pan_action6) (
    void
      );

    }

###### Class members

`pan_stopped` |
    void (* pan_stopped) (
        ClutterPanAction* action,
        ClutterActor* actor
      )
| No description available.
`_clutter_pan_action1` |
    void (* _clutter_pan_action1) (
    void
      )
| No description available.
`_clutter_pan_action2` |
    void (* _clutter_pan_action2) (
    void
      )
| No description available.
`_clutter_pan_action3` |
    void (* _clutter_pan_action3) (
    void
      )
| No description available.
`_clutter_pan_action4` |
    void (* _clutter_pan_action4) (
    void
      )
| No description available.
`_clutter_pan_action5` |
    void (* _clutter_pan_action5) (
    void
      )
| No description available.
`_clutter_pan_action6` |
    void (* _clutter_pan_action6) (
    void
      )
| No description available.

#### Virtual methods

###### Clutter.PanActionClass.pan_stopped

No description available.