2 //<Script type="Text/javascript">
4 XObject = imports.XObject.XObject
5 GtkClutter = imports.gi.GtkClutter;
8 // children are not added at init / but at show stage..
9 // listener is added on show..
10 // we should really add a hock to destroy it..
14 pack : function(parent, item)
16 print('actor pack: ' + XObject.type(parent.xtype));
17 if (XObject.type(parent.xtype) == 'GtkClutterWindow') {
18 var st = parent.el.getStage();
19 st.add_actor(this.el);
24 onConstruct : function() {
25 if (!this.items.length) {
26 XObject.fatal("Actor does not have any children");
30 this.items[0].pack = false;
36 if (!this.items.length) {
37 print ("Actor does not have any children");
40 var child = this.items[0];
44 //var contents = new Gtk.Button({ label: 'test' });
46 // print(JSON.stringify(this.items));
49 this.el = new GtkClutter.Actor.with_contents ( child.el) ;
51 XObject.prototype.init.call(this);