1 //<script type="text/javascript">
2 //Gtk = imports.gi.Gtk;
3 GI = imports.gi.GIRepository;
4 GLib = imports.gi.GLib;
7 imports['Object.js'].load(Object);
9 console = imports['console.js'].console;
14 Introspect = imports['JSDOC/Introspect.js'].Introspect;
15 Basic = imports['JSDOC/Introspect/Basic.js'].Basic;
23 Constant = Object.define(
24 function(prop, memberOf, saveto, keylist) {
26 this.name = GI.base_info_get_name(prop);
27 var tif = GI.constant_info_get_type(prop);
28 var ty = GI.type_tag_to_string( GI.type_info_get_tag(tif));
29 this.type = this.typeToName(GI.constant_info_get_type(prop));
31 ///this.flags = GI.property_info_get_flags(prop),
34 this.value= 'UNKNOWN';
37 if (ty != 'interface') {
39 var argm = new GI.Argument();
40 GI.constant_info_get_value ( prop ,argm);
42 this.value = argm.v_long;
44 this.value = argm.v_string;
48 this.desc = Introspect.doc(memberOf.alias + '.' + this.name)
50 memberOf[saveto].push(this);
51 keylist.push(this.name);