---
name: "Clutter::Score"
section: "3pm"
platform: "linux"
package: "libclutter-perl"
version: "1.002-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Clutter::Score"
---

# Clutter::Score(3pm)

Controller for multiple timelines

## NAME

Clutter::Score - 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)

  ## SEE ALSO

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.
