
@c %start of fragment

@node ClutterScore
@chapter ClutterScore
Controller for multiple timelines

@section Overview
@code{<clutter-score>} is a base class for sequencing multiple timelines in
order. Using @code{<clutter-score>} it is possible to start multiple timelines
at the same time or launch multiple timelines when a particular timeline has
emitted the ClutterTimeline::completed signal.

Each time a @code{<clutter-timeline>} is started and completed, a signal will be
emitted.

For example, this code will start two @code{<clutter-timeline>}s after a third
timeline terminates:

@example 

  ClutterTimeline *timeline_1, *timeline_2, *timeline_3;
  ClutterScore *score;

  timeline_1 = clutter_timeline_new_for_duration (1000);
  timeline_2 = clutter_timeline_new_for_duration (500);
  timeline_3 = clutter_timeline_new_for_duration (500);

  score = clutter_score_new ();

  clutter_score_append (score, NULL,       timeline_1);
  clutter_score_append (score, timeline_1, timeline_2);
  clutter_score_append (score, timeline_1, timeline_3);

  clutter_score_start ();
@end example

A @code{<clutter-score>} takes a reference on the timelines it manages, so
timelines can be safely unreferenced after being appended.

New timelines can be appended to the @code{<clutter-score>} using
@code{clutter-score-append} and removed using @code{clutter-score-remove}.

Timelines can also be appended to a specific marker on the parent timeline,
using @code{clutter-score-append-at-marker}.

The score can be cleared using @code{clutter-score-remove-all}.

The list of timelines can be retrieved using
@code{clutter-score-list-timelines}.

The score state is controlled using @code{clutter-score-start},
@code{clutter-score-pause}, @code{clutter-score-stop} and
@code{clutter-score-rewind}. The state can be queried using
@code{clutter-score-is-playing}.

@code{<clutter-score>} is available since Clutter 0.6

@section Usage
@include defuns-clutter-score.xml.texi

@c %end of fragment
