Sync API with GLib GDir head
[gnome.introspection-doc-generator] / JSDOC / Introspect / Property.js
1 //<script type="text/javascript">
2 //Gtk = imports.gi.Gtk;
3 GI      = imports.gi.GIRepository;
4
5 imports['Object.js'].load(Object);
6
7 console = imports['console.js'].console;
8
9
10
11 Introspect = imports['JSDOC/Introspect.js'].Introspect;
12 Basic = imports['JSDOC/Introspect/Basic.js'].Basic;
13
14
15 /**
16  * Property
17  */
18
19 Property = Object.define(
20     function(prop, memberOf, saveto, keylist) {
21         this.propertyType = 'Property';
22         var n_original = GI.base_info_get_name(prop);
23         this.name  =  n_original.replace(/\-/g, '_') ,
24         this.type  = this.typeToName(GI.property_info_get_type(prop)),
25         this.flags =  GI.property_info_get_flags(prop),
26         this.memberOf = memberOf.alias
27         memberOf[saveto].push(this);
28         keylist.push(this.name);
29         this.desc = Introspect.doc(this.memberOf + '.' + n_original);
30         
31
32         if (typeof(this.type) == 'string' && this.type.indexOf('.') > -1) {
33         
34             Introspect.references[this.type] = Introspect.references[this.type] || [];
35             Introspect.references[this.type].push(this);
36         }
37         
38     },
39     Basic
40 );