1 //<script type="text/javascript">
2 //Gtk = imports.gi.Gtk;
3 const GI = imports.gi.GIRepository;
4 const GLib = imports.gi.GLib;
5 //const xml = imports.libxml;
6 const xml = imports.gi.libxml2;
9 const XObject = imports.XObject.XObject;
10 const console = imports.console.console;
12 const NameSpace = imports.Introspect.NameSpace.NameSpace;
13 const Basic = imports.Introspect.Basic.Basic;
23 var Constant = XObject.define(
24 function(prop, memberOf, saveto, keylist) {
26 this.name = prop.get_name();
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),
33 this.value= 'UNKNOWN';
35 /* gjs constant_info_get_value introspectable="0"
36 if (ty != 'interface') {
37 //var argm = new GI.Argument();
38 //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;
49 this.desc = NameSpace.doc(memberOf.alias + '.' + this.name)
51 memberOf[saveto].push(this);
52 keylist.push(this.name);