Re-arrange files, add support for classic JS Documentor, and packer
[gnome.introspection-doc-generator] / Introspect / Struct.js
1 //<script type="text/javascript">
2
3 GI      = imports.gi.GIRepository;
4
5
6
7 XObject     = imports.XObject.XObject;
8 console     = imports.console.console;
9 NameSpace   = imports.NameSpace.NameSpace;
10
11 Base        = imports.Base.Base;
12
13  
14  
15 /**
16  * Struct
17  */
18
19 Struct = XObject.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 });