1 //<Script type="Text/javascript">
3 XObject = imports.XObject.XObject
4 GtkClutter = imports.gi.GtkClutter;
7 // children are not added at init / but at show stage..
8 // listener is added on show..
9 // we should really add a hock to destroy it..
10 GtkClutterEmbed = XObject.define(
12 XObject.call(this, cfg);
13 this.items.forEach( function(i) {
18 onConstruct : function (x)
20 // make sure all the child elements are packed as false.
21 this.items.forEach( function(i) {
28 // add the event listener..
30 XObject.prototype.init.call(this);
32 print("----------Embed init");
33 this.addListener('show', function () {
34 print("-------EMBED - show");
35 var stage = this.el.get_stage();
36 //print(this.items.length);
37 this.items.forEach( function(e) {
39 stage.add_actor(e.el);