Introspect/NameSpace.js
[gnome.introspection-doc-generator] / Introspect / NameSpace.js
index c6c6e3e..52f601a 100644 (file)
@@ -88,13 +88,15 @@ NameSpace = {
         };
      
         for (var i=0; i <  GI.Repository.get_n_infos (gi,ns); i++ ) {
-            var info = GI.Repository.get_info (gi,ns, i);
-            
+            var info = GI.Repository.get_info (gi, ns, i);
+            print("NAME: " + info.get_name());
+            //continue;
             var info_type = GI.base_info_get_type (info);
+            ping ("Type: " + info_type);
             switch(info_type) {
                 case  GI.InfoType.OBJECT:
-                    ret.objects.push(GI.base_info_get_name(info));
-                    this.clsGatherInterfaces(ns , GI.base_info_get_name(info));
+                    ret.objects.push(info.get_name());
+                    this.clsGatherInterfaces(ns , info.get_name());
                     continue;
                  case  GI.InfoType.INTERFACE:
                     ret.interfaces.push(info.get_name());
@@ -116,10 +118,10 @@ NameSpace = {
                         continue;
                     }
 
-                    ret.structs.push(GI.base_info_get_name(info));
+                    ret.structs.push(info.get_name());
                     continue;
                 case  GI.InfoType.UNION:
-                    ret.unions.push(GI.base_info_get_name(info));
+                    ret.unions.push(info.get_name());
                     continue;
                 case  GI.InfoType.CONSTANT:
                     new imports.Constant.Constant(info, ret, 'values', []);
@@ -134,7 +136,7 @@ NameSpace = {
         
                 
         var gi = GI.Repository.get_default();
-        var ver = gi.get_version(ns);
+        var ver = GI.Repository.get_version(gi,ns);
         var pth = GI.Repository.get_search_path ();
         var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
        //console.log(fn);
@@ -152,8 +154,9 @@ NameSpace = {
     // called when you list the namespace
     clsGatherInterfaces : function(ns, cls)
     {
+       // print("clsGatherInterfaces: " + ns + ", " + cls);
         var gi = GI.Repository.get_default();
-        var bb = gi.find_by_name(ns, cls);
+        var bb = GI.Repository.find_by_name(gi,ns, cls);
         var fullname = ns+'.'+cls;
         this.ifaceList = this.ifaceList || { };
          
@@ -162,7 +165,7 @@ NameSpace = {
            
             var prop = GI.object_info_get_interface(bb,i);
            
-            var add =  GI.base_info_get_namespace(prop) +'.' + GI.base_info_get_name(prop);
+            var add =  prop.get_namespace() +'.' + prop.get_name();
             this.ifaceList[add] = this.ifaceList[add] || [];
             if (this.ifaceList[add].indexOf(fullname) < 0) {
                 this.ifaceList[add].push(fullname);
@@ -178,7 +181,9 @@ NameSpace = {
         
    
     doc : function(what) {
+        print ("DOC: + " +what);
         var ns = what.split('.').shift();
+        return '';
         this.commentLoad(ns);
         return typeof(this.comments[ns][what]) == 'undefined' ?  '' : this.comments[ns][what];
         
@@ -197,7 +202,7 @@ NameSpace = {
         
         console.log("LOAD DOCS: " + ns);
         var gi = GI.Repository.get_default();
-        var ver = gi.get_version(ns);
+        var ver = GI.Repository.get_version(gi,ns);
         if (!ver) {
             this.comments[ns] = {};
             return;