Introspect/NameSpace.js
[gnome.introspection-doc-generator] / Introspect / NameSpace.js
index 710c9cc..9a6d13b 100644 (file)
@@ -12,13 +12,19 @@ console = imports.console.console;
 // BC/FC
 if (!GI.Repository) {
     GI.Repository = GI.IRepository;
-    
+    GI.FunctionInfoFlags = GI.IFunctionInfoFlags ;
     GI.InfoType = GI.IInfoType;
+    GI.TypeTag= GI.ITypeTag;
     
     GI.IBaseInfo.prototype.get_name = function(n) {
         return GI.base_info_get_name(this, n);
     }
-    
+     GI.IBaseInfo.prototype.get_namespace = function(n) {
+        return GI.base_info_get_namespace(this, n);
+    }
+    GI.IBaseInfo.prototype.get_attribute = function( n) {
+        return GI.base_info_get_attribute(this, n);
+    }
 }
 
 
@@ -92,9 +98,10 @@ NameSpace = {
      
         for (var i=0; i <  gi.get_n_infos (ns); i++ ) {
             var info = gi.get_info (ns, i);
+            print(JSON.Stringify(info));
            // print("NAME: " + info.get_name());
             //continue;
-            var info_type = GI.base_info_get_type (info);
+            var info_type = info.get_type();
            // print("Type: " + info_type);
             switch(info_type) {
                 case  GI.InfoType.OBJECT:
@@ -136,7 +143,7 @@ NameSpace = {
                     continue;
             }
         }
-        print ("SCAN NAMESPACE ALL DONE");
+        //print ("SCAN NAMESPACES ALL DONE");
                 
         var gi = GI.Repository.get_default();
         var ver = gi.get_version(ns);
@@ -184,7 +191,7 @@ NameSpace = {
         
    
     doc : function(what) {
-        print ("DOC: + " +what);
+        //print ("DOC: + " +what);
         var ns = what.split('.').shift();
         return '';
         this.commentLoad(ns);