move introspect
[gnome.introspection-doc-generator] / Introspect / Property.js
diff --git a/Introspect/Property.js b/Introspect/Property.js
new file mode 100644 (file)
index 0000000..832152f
--- /dev/null
@@ -0,0 +1,41 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+
+
+
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+NameSpace   = imports.NameSpace.NameSpace;
+
+Basic        = imports.Basic.Basic;
+
+   
+
+
+/**
+ * Property
+ */
+
+Property = XObject.define(
+    function(prop, memberOf, saveto, keylist) {
+        this.propertyType = 'Property';
+        var n_original = GI.base_info_get_name(prop);
+        this.name  =  n_original.replace(/\-/g, '_') ,
+        this.type  = this.typeToName(GI.property_info_get_type(prop)),
+        this.flags =  GI.property_info_get_flags(prop),
+        this.memberOf = memberOf.alias
+        memberOf[saveto].push(this);
+        keylist.push(this.name);
+        this.desc = NameSpace.doc(this.memberOf + '.' + n_original);
+        
+
+        if (typeof(this.type) == 'string' && this.type.indexOf('.') > -1) {
+        
+            NameSpace.references[this.type] = NameSpace.references[this.type] || [];
+            NameSpace.references[this.type].push(this);
+        }
+        
+    },
+    Basic
+);