a705d0eed4a817112e3fc4dbc42af8e22ff55e32
[gnome.introspection-doc-generator] / JSDOC / Introspect / Struct.js
1 //<script type="text/javascript">
2
3 GI      = imports.gi.GIRepository;
4
5 imports['Object.js'].load(Object);
6
7
8 console = imports['console.js'].console;
9
10
11
12
13 Introspect = imports['JSDOC/Introspect.js'].Introspect;
14 Base = imports['JSDOC/Introspect/Base.js'].Base;
15 /**
16  * Struct
17  */
18
19 Struct = Object.define(
20     function(ns, name) {
21         Base.call(this, ns, name);
22        
23     },
24
25     Base, 
26     {
27         titleType: 'Struct',
28         
29         _loaded : false,
30         load : function()
31         {
32             if (this._loaded) {
33                 return; // already loaded..
34             }
35             // my props..
36             var props = [];
37             this.genericBuildList('struct', 'field', props, 'properties');
38             
39             var methods = [];
40             
41             
42             if (GI.struct_info_get_size (this.getBI()) > 0 ) {
43                
44             
45                 
46                 this.constructors.push({
47                     name : '',
48                     params: [],
49                     returns :  [],
50                     isConstructor : true,
51                     isStatic : false,
52                     memberOf : this.alias,
53                     exceptions : [],
54                     desc : ''
55                 });
56             }
57             
58             this.genericBuildList('struct', 'method', methods, 'methods');
59               
60             this._loaded  = true;
61         },
62          
63
64 });