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 win = new Gtk.Window({
14 type:Gtk.WindowType.TOPLEVEL,
19 clutter = new GtkClutter.Embed({
25 clutter.signal.show.connect(function() {
27 stage = clutter.get_stage();
28 button = new Gtk.Button({ label: 'test'} );
30 actor = new GtkClutter.Actor.with_contents(button);
33 stage.add_actor(actor);
34 actor.set_receives_events(true);
35 button.signal.enter.connect(function() {
38 animate = actor.animate(
39 Clutter.AnimationMode.EASE_OUT_ELASTIC, 2000,
46 animate.timeline.start();
48 button.signal.leave.connect(function() {
51 animate = actor.animate(
52 Clutter.AnimationMode.EASE_OUT_ELASTIC, 2000,
59 animate.timeline.start();
62 animation = actor.animatev(
63 Clutter.AnimationMode.EASE_IN_OUT_SINE, 5000,
65 [ "fixed::x", // (float) allocation.x,
66 "fixed::y", //(float) allocation.y,
67 // "fixed::scale-gravity", //CLUTTER_GRAVITY_CENTER,