X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Introspect%2FNameSpace.js;h=9a6d13b661d0a675c44464629662f1cbe0cfcf79;hb=627fbd6090412e9aad8d423bafb45d975bc3b22a;hp=003aab6caf3708241c4a628138f7b84af0890207;hpb=59df97321e16979e4545dac8cb24cbee3f793fc1;p=gnome.introspection-doc-generator diff --git a/Introspect/NameSpace.js b/Introspect/NameSpace.js index 003aab6..9a6d13b 100644 --- a/Introspect/NameSpace.js +++ b/Introspect/NameSpace.js @@ -9,7 +9,25 @@ XObject = imports.XObject.XObject; 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); + } +} + + NameSpace = { @@ -80,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: @@ -124,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); @@ -172,7 +191,7 @@ NameSpace = { doc : function(what) { - print ("DOC: + " +what); + //print ("DOC: + " +what); var ns = what.split('.').shift(); return ''; this.commentLoad(ns);