X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=Introspect%2FNameSpace.js;fp=JSDOC%2FIntrospect.js;h=a169d1b0f6ac354ac93d25c9796203f9a05f68b6;hp=f85d17427635b747a448e08c35295cb2a638ee72;hb=134619d3049edce9b27810483e8011e5dfb783e0;hpb=649a91296eb2d7e5cbd4d1407deb9c1fa714229f diff --git a/JSDOC/Introspect.js b/Introspect/NameSpace.js similarity index 93% rename from JSDOC/Introspect.js rename to Introspect/NameSpace.js index f85d174..a169d1b 100644 --- a/JSDOC/Introspect.js +++ b/Introspect/NameSpace.js @@ -5,24 +5,13 @@ GLib = imports.gi.GLib; xml = imports.libxml; -imports['Object.js'].load(Object); +XObject = imports.XObject.XObject; -console = imports['console.js'].console; - - -xnew = imports['xnew.js'].xnew; +console = imports.console.console; - -Introspect = {}; - -xnew.load(Introspect,'JSDOC/Introspect'); - - - -Object.extend(Introspect, { - +NameSpace = { references : { }, @@ -42,10 +31,10 @@ Object.extend(Introspect, { while (true) { - var fn = GLib.dir_read_name(gdir); + var fn = gdir.read_name ? gdir.read_name () : GLib.dir_read_name(gdir); // console.log('trying ' + fn); if (!fn) { - GLib.dir_close(gdir); + gdir.close ? gdir.close() : GLib.dir_close(gdir); return;; } if (!fn.match(/.typelib$/)) { @@ -111,7 +100,7 @@ Object.extend(Introspect, { ret.interfaces.push(GI.base_info_get_name(info)); continue; case GI.IInfoType.FUNCTION: - new Introspect.Method(info, ret, 'functions', []); + new imports.Method.Method(info, ret, 'functions', []); continue; case GI.IInfoType.CALLBACK: @@ -133,7 +122,7 @@ Object.extend(Introspect, { ret.unions.push(GI.base_info_get_name(info)); continue; case GI.IInfoType.CONSTANT: - new Introspect.Constant(info, ret, 'values', []); + new imports.Constant.Constant(info, ret, 'values', []); continue; @@ -236,6 +225,10 @@ Object.extend(Introspect, { var n = getAttribute(element, 'name') ; //console.log("WALK" + n); + if (element.name == 'signal') { + path += '.signal'; + } + if (n) { path += path.length ? '.' : ''; path += n; @@ -244,7 +237,6 @@ Object.extend(Introspect, { path += '.return-value'; } - var d = getAttribute(element,'doc'); if (d) { // Seed.print(path + ':' + d); @@ -288,16 +280,14 @@ Object.extend(Introspect, { registry : { }, factory : function(type, ns, name) { if (typeof (this.registry[ns +'.' + name]) == 'undefined') { - this.registry[ns +'.' + name] = new Introspect[type](ns,name); + this.registry[ns +'.' + name] = new imports[type][type](ns,name); this.registry[ns +'.' + name].load(); } return this.registry[ns +'.' + name]; } - - -}); +};