#!/usr/bin/perl use warnings; use strict; use Glib qw( :constants ); use Clutter qw( :init ); our $buffer =<new(); our $score = undef; sub do_quit { Clutter->main_quit(); } sub do_press { my ($actor, $event) = @_; $score->start(); return TRUE; } eval { $script->load_from_data($buffer); }; if ($@) { warn "Unable to load the UI definition:\n$@"; exit 1; } $script->connect_signals(undef); my ($move_timeline, $scale_timeline, $fade_timeline) = $script->get_object('move-timeline', 'scale-timeline', 'fade-timeline'); $score = Clutter::Score->new(); $score->append(undef, $move_timeline ); $score->append($move_timeline, $scale_timeline); $score->append($scale_timeline, $fade_timeline ); $score->signal_connect(completed => \&do_quit); my $stage = $script->get_object('main-stage'); die "Unable to retrieve the 'main-stage' object\n" unless defined $stage; $stage->show_all(); Clutter->main(); 0;