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