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