generate gjs documentation, run under gjs
[gnome.introspection-doc-generator] / Introspect / Callback.js
1 //<script type="text/javascript">
2 //Gtk = imports.gi.Gtk;
3 const GI      = imports.gi.GIRepository;
4 const GLib    = imports.gi.GLib;
5 //xml     = imports.libxml;
6 const xml     = imports.gi.libxml2;
7 //GObject = imports.gi.GObject;
8
9 const XObject = imports.XObject.XObject;
10 const console = imports.console.console;
11
12
13 const NameSpace = imports.Introspect.NameSpace.NameSpace;
14 const Basic     = imports.Introspect.Basic.Basic;
15
16
17
18 var Callback = XObject.define(
19     function(sig, memberOf, saveto, keylist) {
20
21         
22         var params = this.argsToArrays(sig);
23         // add a reference to self...
24         /*params.unshift({
25             name : 'self',
26             type : memberOf.alias,
27             direction : 'in',
28             be_null :  false
29                 
30         });
31         */
32         
33         XObject.extend(this,{
34             name : sig.get_name(),
35             params : params,
36             //memberOf : memberOf.alias,
37             exceptions : [],
38             returns :   [ { type :  this.typeToName(GI.callable_info_get_return_type(sig)) } ]            
39             
40         });
41         this.desc =  NameSpace.doc(memberOf.alias + '.' + this.name);
42         //memberOf[saveto].push(this);
43         //keylist.push(this.name);
44         
45     },
46     Basic,
47     {}
48 );
49