Clutter.Timeline.set_auto_reverse

### Method

# Clutter Timelineset_auto_reverse

#### Declaration [src]

    void
    clutter_timeline_set_auto_reverse (
      ClutterTimeline* timeline,
      gboolean reverse
    )

#### Description [src]

Sets whether `timeline` should reverse the direction after the emission of the `ClutterTimeline::completed` signal.

Setting the `ClutterTimeline:auto-reverse` property to `TRUE` is the equivalent of connecting a callback to the `ClutterTimeline::completed` signal and changing the direction of the timeline from that callback; for instance, this code:

    static void
    reverse_timeline (ClutterTimeline *timeline)
    {
      ClutterTimelineDirection dir = clutter_timeline_get_direction (timeline);

      if (dir == CLUTTER_TIMELINE_FORWARD)
        dir = CLUTTER_TIMELINE_BACKWARD;
      else
        dir = CLUTTER_TIMELINE_FORWARD;

      clutter_timeline_set_direction (timeline, dir);
    }
    ...
      timeline = clutter_timeline_new (1000);
      clutter_timeline_set_repeat_count (timeline, -1);
      g_signal_connect (timeline, "completed",
                        G_CALLBACK (reverse_timeline),
                        NULL);

can be effectively replaced by:

      timeline = clutter_timeline_new (1000);
      clutter_timeline_set_repeat_count (timeline, -1);
      clutter_timeline_set_auto_reverse (timeline);

Available since: | 1.6

Sets property | `Clutter.Timeline:auto-reverse`

#### Parameters

`reverse` | `gboolean`
| `TRUE` if the `timeline` should reverse the direction.