Clutter::Score3pm
Controller for multiple timelines
Usage
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
Overview
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().
Hierarchy
Glib::Object+----Clutter::Score
Methods
score = Clutter::Score->new
integer = $score->append ($parent, $timeline)
•
|
|
|---|---|
•
|
|
boolean = $score->is_playing
timelines = $score->list_timelines
boolean = $score->get_loop
$score->set_loop ($loop)
- •
-
$loop(boolean)
$score->pause
$score->remove ($id)
- •
-
$id(integer)
$score->remove_all
$score->rewind
$score->start
$score->stop
timeline = $score->get_timeline ($id)
- •
-
$id(integer)
Properties
- 'loop' (boolean : readable / writable / private)
-
Whether the score should restart once finished
Signals
completed(Clutter::Score)
started(Clutter::Score)
paused(Clutter::Score)
timeline-started(Clutter::Score, Clutter::Timeline)
timeline-completed(Clutter::Score, Clutter::Timeline)
Releases
2 releases since Debian 5.0 (Lenny); the text changed 1 time.