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