1 GtkClutter = imports.gi.GtkClutter;
2 Clutter = imports.gi.Clutter;
6 GtkClutter.init(null,null);
9 /* construct the toplevel UI */
10 //win = new Gtk.Window.c_new(Gtk.WindowType.TOPLEVEL);
13 clutter = new GtkClutter.Window({
14 type:Gtk.WindowType.TOPLEVEL,
21 clutter.signal.show.connect(function() {
23 stage = clutter.get_stage();
24 button = new Gtk.Button({ label: 'test'} );
26 actor = new GtkClutter.Actor.with_contents(button);
29 stage.add_actor(actor);
30 actor.set_receives_events(true);
31 button.signal.enter.connect(function() {
34 animate = actor.animate(
35 Clutter.AnimationMode.EASE_OUT_ELASTIC, 2000,
42 animate.timeline.start();
44 button.signal.leave.connect(function() {
47 animate = actor.animate(
48 Clutter.AnimationMode.EASE_OUT_ELASTIC, 2000,
55 animate.timeline.start();
58 animation = actor.animatev(
59 Clutter.AnimationMode.EASE_IN_OUT_SINE, 5000,
61 [ "fixed::x", // (float) allocation.x,
62 "fixed::y", //(float) allocation.y,
63 // "fixed::scale-gravity", //CLUTTER_GRAVITY_CENTER,