1 //<script type="text/javascript">
2 //Gtk = imports.gi.Gtk;
3 GI = imports.gi.GIRepository;
4 GLib = imports.gi.GLib;
8 XObject = imports.XObject.XObject;
9 console = imports.console.console;
10 NameSpace = imports.NameSpace.NameSpace;
12 Basic = imports.Basic.Basic;
20 * <union name="Argument" c:type="GIArgument">
22 * NEEDS <function name="constant_info_get_value"
23 c:identifier="g_constant_info_get_value"
25 <type name="Argument" c:type="GIArgument*"/>
30 Constant = XObject.define(
31 function(prop, memberOf, saveto, keylist) {
33 this.name = prop.get_name();
34 var tif = GI.constant_info_get_type(prop);
35 var ty = GI.type_tag_to_string( GI.type_info_get_tag(tif));
36 this.type = this.typeToName(GI.constant_info_get_type(prop));
38 ///this.flags = GI.property_info_get_flags(prop),
41 this.value= 'UNKNOWN';
44 if (ty != 'interface') {
46 var argm = new GI._Argument();
48 GI.constant_info_get_value ( prop ,argm)
52 this.value = argm.v_long;
54 this.value = argm.v_string;
58 this.desc = NameSpace.doc(memberOf.alias + '.' + this.name)
60 memberOf[saveto].push(this);
61 keylist.push(this.name);