X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FIntrospect%2FConstant.js;fp=JSDOC%2FIntrospect%2FConstant.js;h=f9558b2903332d96fd091cadc8d3b71c3768adb3;hp=10502e06a43c1eb56870372852c4f9d0219de0c5;hb=109b8349b9418a05e20e50ecede10bd80386b062;hpb=757c3e14454f0474f0660435ce4c478519130fc6 diff --git a/JSDOC/Introspect/Constant.js b/JSDOC/Introspect/Constant.js index 10502e0..f9558b2 100644 --- a/JSDOC/Introspect/Constant.js +++ b/JSDOC/Introspect/Constant.js @@ -3,11 +3,12 @@ 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; @@ -19,35 +20,36 @@ Basic = imports['JSDOC/Introspect/Basic.js'].Basic; */ -Constant = function(prop, memberOf, saveto, keylist) { - - this.name = GI.base_info_get_name(prop); - var tif = GI.constant_info_get_type(prop); - var ty = GI.type_tag_to_string( GI.type_info_get_tag(tif)); - this.type = this.typeToName(GI.constant_info_get_type(prop)); - - ///this.flags = GI.property_info_get_flags(prop), - - - this.value= 'UNKNOWN'; - - - if (ty != 'interface') { +Constant = Object.define( + function(prop, memberOf, saveto, keylist) { + + this.name = GI.base_info_get_name(prop); + var tif = GI.constant_info_get_type(prop); + var ty = GI.type_tag_to_string( GI.type_info_get_tag(tif)); + this.type = this.typeToName(GI.constant_info_get_type(prop)); + + ///this.flags = GI.property_info_get_flags(prop), + + + this.value= 'UNKNOWN'; + + + if (ty != 'interface') { + + var argm = new GI.Argument(); + GI.constant_info_get_value ( prop ,argm); + if (ty != 'utf8') { + this.value = argm.v_long; + } else { + this.value = argm.v_string; + } + } + + this.desc = Introspect.doc(memberOf.alias + '.' + this.name) - var argm = new GI.Argument(); - GI.constant_info_get_value ( prop ,argm); - if (ty != 'utf8') { - this.value = argm.v_long; - } else { - this.value = argm.v_string; - } - } - - this.desc = Introspect.doc(memberOf.alias + '.' + this.name) - - memberOf[saveto].push(this); - keylist.push(this.name); -} - - -Roo.extend(Constant,Basic); + memberOf[saveto].push(this); + keylist.push(this.name); + }, + Basic, + { } +);