Emmanuele Bassi > Clutter > xs/ClutterScore.xs

Download:
Clutter-1.002.tar.gz

Annotate this POD

CPAN RT

New  2
Open  2
View Bugs
Report a bug
Source  

SYNOPSIS ^

    my $t1 = Clutter::Timeline->new(200);
    my $t2 = Clutter::Timeline->new(200);
    my $t3 = Clutter::Timeline->new(500);

    my $score = Clutter::Score->new();
    $score->append(undef, $t1); # appends t1 to the beginning
    $score->append($t1,   $t2); # appends t2 to t1
    $score->append($t1,   $t3); # appends t3 to t1

DESCRIPTION ^

Clutter::Score is a base class for sequencing multiple timelines in order.

Using Clutter::Score it is possible to start multiple timelines at the same time or launch multiple timelines when a particular timeline has emitted the Clutter::Timeline::completed signal.

Each time a Clutter::Timeline is started and completed, a signal will be emitted.

A Clutter::Score takes a reference on the timelines it manages, so scalars referencing timelines can be safely discarded as long as the score remains referenced.

New timelines can be appended to the Clutter::Score using the append() method, and removed using the remove() one.

Timelines can also be appended to a specific marker on the parent timeline, using Clutter::Score::append_at_marker().

The score can be cleared using Clutter::Score::remove_all().

The list of timelines can be retrieved using Clutter::Score::list_timelines().

The score state is controlled using Clutter::Score::start(), Clutter::Score::pause(), Clutter::Score::stop() and Clutter::Score::rewind().

The state can be queried using Clutter::Score::is_playing().

SEE ALSO ^

Clutter::Timeline