tools/build_gtk_tree.js
[app.Builder.js] / tools / build_gtk_tree.js
index e73cc51..9089805 100644 (file)
@@ -32,11 +32,19 @@ ns_list = ns_list.sort();
 print("loading library to make sure it works.");
 ns_list.forEach(function(ns_name) {   
     var  core = imports.gi[ns_name];
+    var ns = NameSpace.ns(ns_name); // fetch all the elements in namespace...
+    ns['objects'].forEach( function(n) {
+        NameSpace.factory('Class', ns_name, n);
+    }
+    ns['interfaces'].forEach( function(n) {
+        NameSpace.factory('Interface', ns_name, n);
+    }
 });
 
 
 print("Looping throught namespaces");
 var ns_idx = [];
+var implementations = {};
 ns_list.forEach(function(ns_name) 
 {
     
@@ -47,29 +55,33 @@ ns_list.forEach(function(ns_name)
     print("START:" + ns_name);
    
     var ns = NameSpace.ns(ns_name); // fetch all the elements in namespace...
-    // as a type => array list..
+    // as a type => list of them..
     
+   
     
     
-    var actions = {
-        'objects' : 'Class',
-        'interfaces' : 'Interface',
-        //'structs' : 'Struct',
-        //'unions' : 'Union',
-        //'enums' : 'Enum'
-        
-    };
     
-    for (var i in actions) {
-        // we flag GLib as a GObject lib...
+    
+      
        
-        ns[i].forEach( function(n) {
-            
-            print('NameSpace.factory(' + actions[i] +','+ns_name+','+n);
-            var odata =   NameSpace.factory(actions[i], ns_name, n);
-            print(JSON.stringify(odata,null,4));
-        }); 
-    }
+    ns['objects'].forEach( function(n) {
+        
+       print('NameSpace.factory(Class,'+ns_name+'.'+n+')');
+        var odata =   NameSpace.factory('Class', ns_name, n);
+        implementations[odata.alias] = odata.childClasses;
+        //print(JSON.stringify(odata.childClasses,null,4));
+    });
+    ns['interfaces'].forEach( function(n) {
+        
+        print('NameSpace.factory(Interface,'+ns_name+'.'+n+')');
+        var odata =   NameSpace.factory('Interface', ns_name, n);
+        implementations[odata.alias] = odata.implementedBy;
+        //print(JSON.stringify(odata.implementedBy,null,4));
+    });
+         // what we are interested in..
+        
+         
     
     
 });
+print(JSON.stringify(implementations,null,4));
\ No newline at end of file