move introspect
[gnome.introspection-doc-generator] / Introspect / Union.js
diff --git a/Introspect/Union.js b/Introspect/Union.js
new file mode 100644 (file)
index 0000000..723a756
--- /dev/null
@@ -0,0 +1,58 @@
+//<script type="text/javascript">
+
+GI      = imports.gi.GIRepository;
+
+
+
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+Base        = imports.Base.Base;
+
+  
+   
+
+/**
+ * Union
+ */
+Union = XObject.define(
+    function(ns, name) {
+        Base.call(this, ns, name);
+       
+    }, 
+    Base, 
+    {
+        titleType: 'Union',
+        _loaded : false,
+        load : function()
+        {
+            if (this._loaded) {
+                return; // already loaded..
+            }
+            // my props..
+            var props = [];
+            this.genericBuildList('union', 'field', props, 'properties');
+            
+            if (GI.union_info_get_size (this.getBI()) > 0 ) { 
+                
+                this.constructors.push({
+                    name : '',
+                    params: [],
+                    returns :  [],
+                    isConstructor : true,
+                    isStatic : false,
+                    memberOf : this.alias,
+                    exceptions : [],
+                    desc : ''
+                });
+            }
+            var methods = [];
+            this.genericBuildList('union', 'method', methods, 'methods');
+              
+            this._loaded  = true;
+        }
+         
+
+});
\ No newline at end of file