Clutter::Score(3) Controller for multiple timelines

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().

HIERARCHY

  Glib::Object
  +----Clutter::Score

METHODS

score = Clutter::Score->new

integer = $score->append ($parent, $timeline)

  • $parent (Clutter::Timeline or undef)
  • $timeline (Clutter::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)

COPYRIGHT

Copyright (C) 2006, 2007, 2008 OpenedHand Ltd

Copyright (C) 2009 Intel Corporation

This module is free software; you can redistribute it and/or modify it under the terms of either:

  • the GNU Lesser General Public Library version 2.1; or
  • the Artistic License, version 2.0.

See Clutter for the full copyright notice.