## ClutterSwipeAction

ClutterSwipeAction — Action for swipe gestures

## Synopsis

    struct              ClutterSwipeAction;
    struct              ClutterSwipeActionClass;
    enum                ClutterSwipeDirection;
    ClutterAction *     clutter_swipe_action_new            (void);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActorMeta
                   +----ClutterAction
                         +----ClutterGestureAction
                               +----ClutterSwipeAction

## Signals

      "swept"                                          : Run Last
      "swipe"                                          : Run Last

## Description

ClutterSwipeAction is a sub-class of ClutterGestureAction that implements the logic for recognizing swipe gestures.

## Details

### struct ClutterSwipeAction

    struct ClutterSwipeAction;

The ClutterSwipeAction structure contains only private data and should be accessed using the provided API

Since 1.8

### struct ClutterSwipeActionClass

    struct ClutterSwipeActionClass {
      void (* swept)  (ClutterSwipeAction    *action,
                       ClutterActor          *actor,
                       ClutterSwipeDirection  direction);

      gboolean (* swipe) (ClutterSwipeAction    *action,
                          ClutterActor          *actor,
                          ClutterSwipeDirection  direction);
    };

The ClutterSwipeActionClass structure contains only private data.

`swept` () | class handler for the "swept" signal; deprecated since 1.14
`swipe` () | class handler for the "swipe" signal

Since 1.8

### enum ClutterSwipeDirection

    typedef enum {
     /*< prefix=CLUTTER_SWIPE_DIRECTION >*/
      CLUTTER_SWIPE_DIRECTION_UP    = 1 << 0,
      CLUTTER_SWIPE_DIRECTION_DOWN  = 1 << 1,
      CLUTTER_SWIPE_DIRECTION_LEFT  = 1 << 2,
      CLUTTER_SWIPE_DIRECTION_RIGHT = 1 << 3
    } ClutterSwipeDirection;

The main direction of the swipe gesture

`CLUTTER_SWIPE_DIRECTION_UP` | Upwards swipe gesture
`CLUTTER_SWIPE_DIRECTION_DOWN` | Downwards swipe gesture
`CLUTTER_SWIPE_DIRECTION_LEFT` | Leftwards swipe gesture
`CLUTTER_SWIPE_DIRECTION_RIGHT` | Rightwards swipe gesture

Since 1.8

### clutter_swipe_action_new ()

    ClutterAction *     clutter_swipe_action_new            (void);

Creates a new ClutterSwipeAction instance

Returns : | the newly created ClutterSwipeAction

Since 1.8

## Signal Details

### The `"swept"` signal

    void                user_function                      (ClutterSwipeAction   *action,
                                                            ClutterActor         *actor,
                                                            ClutterSwipeDirection direction,
                                                            gpointer              user_data)      : Run Last

### Warning

`ClutterSwipeAction::swept` has been deprecated since version 1.14 and should not be used in newly-written code. Use the ::swipe signal instead.

The ::swept signal is emitted when a swipe gesture is recognized on the attached actor.

`action` : | the ClutterSwipeAction that emitted the signal
`actor` : | the ClutterActor attached to the `action`
`direction` : | the main direction of the swipe gesture
`user_data` : | user data set when the signal handler was connected.

Since 1.8

### The `"swipe"` signal

    gboolean            user_function                      (ClutterSwipeAction   *action,
                                                            ClutterActor         *actor,
                                                            ClutterSwipeDirection direction,
                                                            gpointer              user_data)      : Run Last

The ::swipe signal is emitted when a swipe gesture is recognized on the attached actor.

`action` : | the ClutterSwipeAction that emitted the signal
`actor` : | the ClutterActor attached to the `action`
`direction` : | the main direction of the swipe gesture
`user_data` : | user data set when the signal handler was connected.
Returns : | `TRUE` if the swipe should continue, and `FALSE` if the swipe should be cancelled.

Since 1.14