X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FIntrospect%2FEnum.js;h=dcdf1a6aedf7f2a7cf3d26b571295cd52999ced0;hp=e61ad08ba2d5a7db2dcf3026930a31a129ceca44;hb=109b8349b9418a05e20e50ecede10bd80386b062;hpb=757c3e14454f0474f0660435ce4c478519130fc6 diff --git a/JSDOC/Introspect/Enum.js b/JSDOC/Introspect/Enum.js index e61ad08..dcdf1a6 100644 --- a/JSDOC/Introspect/Enum.js +++ b/JSDOC/Introspect/Enum.js @@ -3,11 +3,13 @@ GI = imports.gi.GIRepository; GLib = imports.gi.GLib; xml = imports.libxml; -//GObject = imports.gi.GObject; + + +imports['Object.js'].load(Object); console = imports['console.js'].console; JSDOC = imports['JSDOC.js'].JSDOC; -Roo = imports['Roo.js'].Roo; + Introspect = imports['JSDOC/Introspect.js'].Introspect; @@ -17,41 +19,42 @@ Base = imports['JSDOC/Introspect/Base.js'].Base; -Enum = function(ns, name) { - Base.call(this, ns, name); - -} -Roo.extend(Enum, Base, { - titleType: 'Enum', - _loaded : false, - load : function() +Enum = Object.define( + function(ns, name) { + Base.call(this, ns, name); + }, + Base, { - if (this._loaded) { - return; // already loaded.. - } - - this.desc = Introspect.doc(this.alias); - var bi = this.getBI(); + titleType: 'Enum', + _loaded : false, + load : function() + { + if (this._loaded) { + return; // already loaded.. + } + + this.desc = Introspect.doc(this.alias); + var bi = this.getBI(); + + for(var i =0; i < GI.enum_info_get_n_values(bi); i++) { + + var prop = GI.enum_info_get_value(bi,i); + + + this.values.push({ + name : GI.base_info_get_name(prop).toUpperCase() , + type : GI.type_tag_to_string(GI.enum_info_get_storage_type(bi)), + value: GI.value_info_get_value(prop) , + memberOf : this.alias + }); + } + + this._loaded = true; - for(var i =0; i < GI.enum_info_get_n_values(bi); i++) { - - var prop = GI.enum_info_get_value(bi,i); - - this.values.push({ - name : GI.base_info_get_name(prop).toUpperCase() , - type : GI.type_tag_to_string(GI.enum_info_get_storage_type(bi)), - value: GI.value_info_get_value(prop) , - memberOf : this.alias - }); + + } - - this._loaded = true; - - - - - } }); \ No newline at end of file