projects
/
gnome.introspection-doc-generator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
generate gjs documentation, run under gjs
[gnome.introspection-doc-generator]
/
Introspect
/
Constant.js
diff --git
a/Introspect/Constant.js
b/Introspect/Constant.js
index
4021197
..
9992ffb
100644
(file)
--- a/
Introspect/Constant.js
+++ b/
Introspect/Constant.js
@@
-1,15
+1,16
@@
//<script type="text/javascript">
//Gtk = imports.gi.Gtk;
//<script type="text/javascript">
//Gtk = imports.gi.Gtk;
-GI = imports.gi.GIRepository;
-GLib = imports.gi.GLib;
-xml = imports.libxml;
+const GI = imports.gi.GIRepository;
+const GLib = imports.gi.GLib;
+//const xml = imports.libxml;
+const xml = imports.gi.libxml2;
-XObject = imports.XObject.XObject;
-console = imports.console.console;
-NameSpace = imports.NameSpace.NameSpace;
+const XObject = imports.XObject.XObject;
+const console = imports.console.console;
-Basic = imports.Basic.Basic;
+const NameSpace = imports.Introspect.NameSpace.NameSpace;
+const Basic = imports.Introspect.Basic.Basic;
@@
-19,36
+20,39
@@
Basic = imports.Basic.Basic;
*/
*/
-Constant = XObject.define(
+
var
Constant = XObject.define(
function(prop, memberOf, saveto, keylist) {
function(prop, memberOf, saveto, keylist) {
-
- this.name =
prop.get_name();
+
+ this.name = prop.get_name();
var tif = GI.constant_info_get_type(prop);
var tif = GI.constant_info_get_type(prop);
- var ty = GI.type_tag_to_string( GI.type_info_get_tag(tif));
+ var ty
= GI.type_tag_to_string( GI.type_info_get_tag(tif));
this.type = this.typeToName(GI.constant_info_get_type(prop));
this.type = this.typeToName(GI.constant_info_get_type(prop));
-
+
///this.flags = GI.property_info_get_flags(prop),
///this.flags = GI.property_info_get_flags(prop),
-
-
+
this.value= 'UNKNOWN';
this.value= 'UNKNOWN';
-
-
+
+ /* gjs constant_info_get_value introspectable="0"
if (ty != 'interface') {
if (ty != 'interface') {
-
- var argm = new GI.Argument();
- GI.constant_info_get_value ( prop ,argm);
+ //var argm = new GI.Argument();
+ //var argm = new GI._Argument();
+ var argm;
+ GI.constant_info_get_value(prop, argm);
if (ty != 'utf8') {
this.value = argm.v_long;
} else {
this.value = argm.v_string;
}
}
if (ty != 'utf8') {
this.value = argm.v_long;
} else {
this.value = argm.v_string;
}
}
-
+ */
+
this.desc = NameSpace.doc(memberOf.alias + '.' + this.name)
this.desc = NameSpace.doc(memberOf.alias + '.' + this.name)
-
+
memberOf[saveto].push(this);
keylist.push(this.name);
},
memberOf[saveto].push(this);
keylist.push(this.name);
},
+
Basic,
Basic,
- { }
+
+ {}
);
);