Gio = imports.gi.Gio;
GIRepository = imports.gi.GIRepository;
+GObject= imports.gi.GObject;
xml = imports.libxml;
console = imports.console;
XObject = imports.XObject.XObject;
type : ty,
desc : this.doc(ename + '.' + n_original),
sig : '',
- ctor_only : flags == 8 //GObject.ParamFlags.CONSTRUCT_ONLY
+ ctor_only : (flags & GObject.ParamFlags.CONSTRUCT_ONLY) > 0
}
plist.push(add)
}
for (var i =0;i < GIRepository[meth[4]](bi); i++) {
var prop = GIRepository[meth[5]](bi,i);
var n_original = prop.get_name();
- print(ename +": ADD : " + n_original );
- var flags = GIRepository.property_info_get_flags(prop);
- if (flags & GIRepository.FunctionInfoFlags.IS_CONSTRUCTOR) {
- continue;
- }
- if (!(flags & GIRepository.FunctionInfoFlags.IS_METHOD)) {
+ print(ename +": ADD method: " + n_original );
+ //var flags = GIRepository.property_info_get_flags(prop);
+
+ if (n_original.match(/^new/)) {
+ var add = {
+ name : n_original.replace(/\-/g, '_'),
+ type : 'ctor', //???
+ desc : '',
+ //desc : this.doc(ename + "."+ n_original)
+ };
+ this.genParams(prop,add);
+ mlist.push(add);
continue;
}
+ continue;
+ // not sure why we need all the other ones...
+ //if (!(flags & GIRepository.FunctionInfoFlags.IS_METHOD)) {
+ // continue;
+ //}
// print ('signal: ' + n_original);
var add = {
name : n_original.replace(/\-/g, '_'),
type : 'function', //???
- desc : this.doc(ename + '.signal.' + n_original)
+ desc : '', //this.doc(ename + '.' + n_original)
};
this.genParams(prop,add);
mlist.push(add);
meth.params = [];
for(var a_i =0; a_i < GIRepository.callable_info_get_n_args(sig); a_i++) {
var arg = GIRepository.callable_info_get_arg(sig, a_i);
-
+ print(arg.get_name());
+ print(arg.get_type());
meth.params.push({
name : arg.get_name(),
type : this.typeToName(arg.get_type(), true)
},
typeToName : function (type_info, allow_iface) // find type for properties or arguments.
{
- var ty = GIRepository.type_tag_to_string( GIRepository.type_info_get_tag(type_info));
+ print(type_info);
+ if (type_info == 17) {
+ return 'integer';
+ }
+
+ var x = GIRepository.type_info_get_tag(type_info);
+ print(x);
+ var ty = GIRepository.type_tag_to_string( GIRepository.type_info_get_tag(type_info));
+ print(ty);
if ((ty == 'void') && GIRepository.type_info_is_pointer(type_info)) {
return false;