ClutterTest/Window.bjs
authorAlan Knowles <alan@akbkhome.com>
Tue, 22 Jun 2010 11:16:28 +0000 (19:16 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 22 Jun 2010 11:16:28 +0000 (19:16 +0800)
ClutterTest/Window.bjs

index 89fe19f..2a1de99 100644 (file)
@@ -1,9 +1,9 @@
 {
-    "id": "file-gtk-11",
+    "id": "file-gtk-12",
     "name": "Window",
     "parent": "",
     "title": false,
-    "path": "/home/alan/cluttertest/Window.bjs",
+    "path": "/home/alan/gitlive/app.Builder.js/ClutterTest/Window.bjs",
     "items": [
         {
             "default_height": 600,
                                     "|xns": "Gtk"
                                 }
                             ]
+                        },
+                        {
+                            "pack": false,
+                            "x": 100,
+                            "xtype": "Actor",
+                            "y": 100,
+                            "|init": "function() {\n\n    var child = new XObject(this.items[0]);\n    child.init();\n    child.parent = this;\n    //var contents = new Gtk.Button({ label: 'test' }); \n    var contents = child.el;\n   \n    print(JSON.stringify(this.items));\n    \n    \n    this.el = new GtkClutter.Actor.with_contents (  contents) ;\n    XObject.prototype.init.call(this);\n}\n",
+                            "|xns": "GtkClutter",
+                            "items": [
+                                {
+                                    "listeners": {
+                                        "clicked": "function (self) {\n   Clutter = imports.gi.Clutter;\n        var animate = this.parent.el.animate(\n\t\tClutter.AnimationMode.EASE_OUT_ELASTIC, 2000,\n\t\t{\n\t\t\t   scale_x : 5,\n\t\t\t  scale_y: 5,\n\n\t\t}\n\t\t);\n\t\tanimate.timeline.start();\n\n}"
+                                    },
+                                    "height_request": 100,
+                                    "label": "test",
+                                    "pack": false,
+                                    "width_request": 100,
+                                    "xtype": "Button",
+                                    "|xns": "Gtk"
+                                }
+                            ]
                         }
                     ]
                 }