sync
authorAlan Knowles <alan@akbkhome.com>
Fri, 23 Jul 2010 04:43:53 +0000 (12:43 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 23 Jul 2010 04:43:53 +0000 (12:43 +0800)
26 files changed:
Date.js [moved from DateExtra.js with 99% similarity]
Introspect/Base.js [new file with mode: 0644]
Introspect/Basic.js [new file with mode: 0644]
Introspect/Callback.js [new file with mode: 0644]
Introspect/Class.js [new file with mode: 0644]
Introspect/Constant.js [new file with mode: 0644]
Introspect/Enum.js [new file with mode: 0644]
Introspect/Field.js [new file with mode: 0644]
Introspect/Interface.js [new file with mode: 0644]
Introspect/Method.js [new file with mode: 0644]
Introspect/NameSpace.js [new file with mode: 0644]
Introspect/Property.js [new file with mode: 0644]
Introspect/Signal.js [new file with mode: 0644]
Introspect/Struct.js [new file with mode: 0644]
Introspect/Union.js [new file with mode: 0644]
Introspect/extensions/xml.js [new file with mode: 0644]
String.js [new file with mode: 0644]
pack.js [new file with mode: 0644]
templates/resources/default.css [new file with mode: 0644]
templates/resources/library_gnome.css [new file with mode: 0644]
templates/resources/library_gnome_print.css [new file with mode: 0644]
templates/resources/page.js [new file with mode: 0644]
templates/seed/class.html [new file with mode: 0644]
templates/seed/class_ix.html [new file with mode: 0644]
templates/seed/index.html [new file with mode: 0644]
templates/seed/references.html [new file with mode: 0644]

similarity index 99%
rename from DateExtra.js
rename to Date.js
index ef10a88..ceb5292 100644 (file)
+++ b/Date.js
@@ -8,7 +8,7 @@
  * Fork - LGPL
  * <script type="text/javascript">
  */
-// usage: Date=  imports.Date.Date;
+// usage: Seed.include('Date.js')
 
 
 String          = imports.String.String;
@@ -112,9 +112,7 @@ document.write(dt.format(Date.patterns.ShortDate));
      @return {Number} The diff in milliseconds
      @member Date getElapsed
      */
-DateExtra = Date; 
-
-XObject.extend(DateExtra,
+Date = XObject.extend(Date,
     {
         
         // private
@@ -332,7 +330,9 @@ XObject.extend(DateExtra,
             return Date[func](input);
         },
 
-        // private
+        /**
+        * @private
+        */
         createParser : function(format) {
             var funcName = "parse" + Date.parseFunctions.count++;
             var regexNum = Date.parseRegexes.length;
@@ -523,7 +523,7 @@ XObject.extend(DateExtra,
 }); // end static date..
 
 // now add functions to date..
-XObject.extend(DateExtra.prototype,
+XObject.extend(Date.prototype,
     {
 
         getElapsed : function(date) {
diff --git a/Introspect/Base.js b/Introspect/Base.js
new file mode 100644 (file)
index 0000000..9876fb5
--- /dev/null
@@ -0,0 +1,172 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+//GObject = imports.gi.GObject;
+
+XObject = imports.XObject.XObject;
+console = imports.console.console;
+
+NameSpace = imports.NameSpace.NameSpace;
+Basic = imports.Basic.Basic;
+
+
+
+
+/**
+ * Base  types methods/interfaces/structs/unions etc.
+ */
+
+
+
+Base = XObject.define(
+   function(ns, name) {
+        // fake should not happen?
+        
+        
+        if (typeof(name) == 'undefined') {
+            var ar = ns.split('.');
+            ns = ar[0];
+            name = ar[1];
+        }
+        this.ns = ns;
+        this.name = name;
+        this.alias = ns + '.' + name;
+        //console.log("CREATE(Base) " + this.alias);
+        this._loaded = false;
+        
+        
+        // reset all of these..
+        this.signals = [];
+        this.methods = [];
+        this.constructors = [];
+        this.functions= [];
+       
+        this.values = []; // for enum;g;
+        this.constants = [];
+        
+        this.properties = [];
+        this.implementInterfaces = []; // obect - which interface it implements.
+        this.implementedBy = []; // interface - which object uses it.
+        this.extendsClasses = []; // what it extends...
+        this.childClasses = []; // what 
+         this.desc = NameSpace.doc(this.alias );
+        
+        
+        var gi = GI.IRepository.get_default();
+        var ver = gi.get_version(ns);
+        var pth = GI.IRepository.get_search_path ();
+        var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
+       //console.log(fn);
+        this.gir_file = gir_path + '/'+ ns + '-' + ver + '.gir';
+        this.gir_filename = ns + '-' + ver + '.gir';
+        
+        
+    }, 
+    Basic, 
+    {
+        titleType: 'Unknown',
+        name :  '',
+        ns : '',
+       
+        signals : [],
+        methods : [],
+        constructors : [],
+        functions: [],
+       
+        values : [], // for enum
+        constants : [],
+        
+        properties : [],
+        implementInterfaces : [], // obect - which interface it implements.
+        implementedBy : [], // interface - which object uses it.
+        extendsClasses : [], // what it extends...
+        childClasses : [], // what 
+        
+        
+        
+        
+        getBI : function()  {
+            
+            var gi = GI.IRepository.get_default();
+            return gi.find_by_name(this.ns, this.name);
+        },
+         // on, getwhat, simple list (name), variable to add to.
+        genericBuildList : function( onwhat, type, keylist, saveto)
+        {
+            
+            //console.log(this.alias +" - ADDING :" + type);
+            //if (this[saveto].length) {
+            //    Seed.print( "EROROR = it's alreayd loaded why?");
+                //throw "oops";
+            //   }
+            var bb = this.getBI();
+            var _this = this;
+           //console.log("ADD " + type[0].toUpperCase() + type.substring(1));
+            var clname = type[0].toUpperCase() + type.substring(1);
+            var cls = imports[clname][clname];
+            if (!cls) {
+                console.log("COULD NOT FIND Introspect: " + type[0].toUpperCase() + type.substring(1));
+               }
+                
+            var plural = type + 's';
+            plural = plural == 'propertys' ? 'properties' : plural;
+            
+            
+            for(var i =0; i < GI[onwhat + '_info_get_n_' + plural ](bb); i++) {            
+                var add= new cls(GI[onwhat + '_info_get_' + type ](bb,i), this, saveto, keylist);
+                //console.log("CLS :" + this.alias + " EL: " + add.name);
+            }
+             
+            
+        },
+        // loop through and add stuff from extends..
+        genericExtends :  function(  keylist,  saveto)   
+        {
+            // do not overlay gobject props or methods etc.
+            
+            if (!this.extendsClasses.length) {
+                return;
+            }
+            if (this.extendsClasses[0].alias == 'GObject.Object') {
+                return;
+            }
+                
+            
+            var _this = this;
+            
+            this.extendsClasses[0].load();
+            this.extendsClasses[0][saveto].map(function(prop) {
+                if (keylist.indexOf(prop.name) < 0) {
+                    _this[saveto].push(prop);
+                    keylist.push(prop.name);
+                }
+            },this);
+            
+        },
+        // loop through and add stuff from implements..
+        genericImplements :  function(  keylist,  saveto)   {
+        
+            var _this = this;
+            this.implementInterfaces.map(function(iface) {
+                
+                iface.load();
+                
+                iface[saveto].map( function(prop) {
+                    if (keylist.indexOf(prop.name) < 0) {
+                        _this[saveto].push(prop);
+                        keylist.push(prop.name);
+                    }
+                },this);
+                
+            }, this);
+            
+        },
+                
+            
+        
+});
+
+
diff --git a/Introspect/Basic.js b/Introspect/Basic.js
new file mode 100644 (file)
index 0000000..50f58b9
--- /dev/null
@@ -0,0 +1,148 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+//GObject = imports.gi.GObject;
+
+XObject = imports.XObject.XObject;
+console = imports.console.console;
+
+
+
+/**
+ * Base class for Properties, functions, methods etc.
+ */
+
+
+Basic = XObject.define(
+    function( ) {
+         // never called?
+    },
+    Object,
+    {
+        
+        typeToName : function (type_info) {
+            var ty = GI.type_tag_to_string( GI.type_info_get_tag(type_info));
+            
+            if ((ty == 'void') && GI.type_info_is_pointer(type_info)) {
+                return 'void*'; // it's a fake string?!?!!? - slightly naughty...
+            }
+            if (ty == 'array') {
+                // array of what!?!?
+                var param_type = GI.type_info_get_param_type (type_info, 0);
+                var atype = GI.type_info_get_tag(param_type);
+                if (atype == GI.ITypeTag.UINT8) {
+                    return 'utf8';
+                }
+                
+                            
+                return ty;
+            }
+            if (ty != 'interface') {
+                return ty;
+            }
+            var interface_info = GI.type_info_get_interface (type_info);       
+            var interface_type = GI.base_info_get_type (interface_info);
+            if (interface_type  == GI.IInfoType.CALLBACK) {
+                // callback.. 
+                var Callback = imports.Callback.Callback ;
+                var ret=  new Callback(interface_info, this, false, false);
+                ret.alias = GI.base_info_get_namespace(interface_info) + '.' + GI.base_info_get_name(interface_info);
+                return ret;
+                 
+                
+            }
+
+            return  GI.base_info_get_namespace(interface_info) + '.' + GI.base_info_get_name(interface_info);
+            
+        },
+        
+        directions : [ "in", "out"," inout"],
+        
+        argsToArrays : function(m,  returnArray) 
+        {
+            
+            var outIntoReturn = false;
+            if (returnArray && returnArray.length == 1 && returnArray[0].type == 'void') {
+                outIntoReturn = true;
+            }
+            
+            var outArg = {
+                name : 'out_values',
+                ns : '',
+                type : 'Object',
+                direction : 'out',
+                be_null :  true, // in theory..
+                desc : "Return Object, use an empty Object, and the properties will get set as follows",
+                properties : []
+            };
+            
+            var args = [];
+            var firstOut = -1;
+            for(var a_i  =0; a_i   < GI.callable_info_get_n_args(m); a_i++) {
+                var arg = GI.callable_info_get_arg(m, a_i);
+                
+                var direction = this.directions[GI.arg_info_get_direction(arg)];
+                
+                var add = {
+                    name : GI.base_info_get_name(arg),
+                    ns : GI.base_info_get_namespace(arg),
+                    type : this.typeToName(GI.arg_info_get_type(arg)),
+                    direction : direction,
+                    be_null :  GI.arg_info_may_be_null(arg) || GI.arg_info_is_optional(arg),
+                    desc : GI.base_info_get_attribute(arg, 'doc') || ''
+                };
+                
+                
+                add.alias = add.ns + '.' + add.name;
+                
+                if (direction == 'out') {
+                    firstOut = firstOut  > -1 ? firstOut : a_i;
+                    if (outIntoReturn) {
+                        returnArray.push(add);
+                    } else {
+                        outArg.properties.push(add);
+                    }
+                }
+                
+                
+                args.push(add);
+            }
+            
+            // drop all the 'out args from the end of args..
+            if (returnArray) {
+                    
+                while (true) {
+                    if (!args.length) {
+                        break;
+                    }
+                    var l = args.pop(); // drop!
+                    if (l.direction == 'out') {
+                        // got an out arg..
+                        continue;
+                    }
+                    args.push(l); // put it back in (it's not a out).
+                    break;
+                    
+                }
+            }
+            if (outArg.properties.length) {
+                // put the out arg in there...
+                if (firstOut >= args.length) {
+                    args.push(outArg);
+                } else {
+                    args[firstOut]  = outArg;
+                }
+            }
+            
+             
+            // remove void return....
+            
+            if (returnArray && returnArray.length > 1 && returnArray[0].type == 'void') {
+                returnArray.shift();
+            }
+            
+            return args;
+        }
+});
diff --git a/Introspect/Callback.js b/Introspect/Callback.js
new file mode 100644 (file)
index 0000000..d9a7318
--- /dev/null
@@ -0,0 +1,48 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+//GObject = imports.gi.GObject;
+
+XObject = imports.XObject.XObject;
+console = imports.console.console;
+
+
+NameSpace = imports.NameSpace.NameSpace;
+Basic = imports.Basic.Basic;
+
+
+
+Callback = XObject.define(
+    function(sig, memberOf, saveto, keylist) {
+
+        
+        var params = this.argsToArrays(sig);
+        // add a reference to self...
+        /*params.unshift({
+            name : 'self',
+            type : memberOf.alias,
+            direction : 'in',
+            be_null :  false
+                
+        });
+        */
+        
+        XObject.extend(this,{
+            name : GI.base_info_get_name(sig),
+            params : params,
+            //memberOf : memberOf.alias,
+            exceptions : [],
+            returns :   [ { type :  this.typeToName(GI.callable_info_get_return_type(sig)) } ]            
+            
+        });
+        this.desc =  NameSpace.doc(memberOf.alias + '.' + this.name);
+        //memberOf[saveto].push(this);
+        //keylist.push(this.name);
+        
+    },
+    Basic,
+    {}
+);
+
diff --git a/Introspect/Class.js b/Introspect/Class.js
new file mode 100644 (file)
index 0000000..dba5f90
--- /dev/null
@@ -0,0 +1,176 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+//GObject = imports.gi.GObject;
+XObject = imports.XObject.XObject;
+console = imports.console.console;
+NameSpace = imports.NameSpace.NameSpace;
+
+Base = imports.Base.Base;
+
+
+
+
+/**
+ * Class
+ */
+
+
+
+
+Class = XObject.define(
+    function(ns, name) {
+        Base.call(this, ns, name);
+        this.loadExtends();
+        this.loadImplements();
+        //console.log("CREATED(Class) " + this.alias);
+    },
+    Base, 
+    {
+        titleType : 'Class',
+        
+        loadExtends : function()
+        {
+            var bi = this.getBI();
+            
+            var pi = GI.object_info_get_parent(bi);
+            this.extendsClasses = [];
+            if (!pi) {
+                return;
+            }
+            this.parent = NameSpace.factory(
+                'Class',
+                GI.base_info_get_namespace(pi),
+                GI.base_info_get_name(pi)
+            );
+            
+            this.extendsClasses = [ this.parent ];
+            
+            
+            this.parent.extendsClasses.map(function(p) {
+                this.extendsClasses.push(p);
+            },this);
+            
+            
+            
+        },
+        loadImplements : function()
+        {
+            var bb = this.getBI();
+            this.implementInterfaces = [];
+            
+            var iflist = [];
+            for(var i =0; i < GI.object_info_get_n_interfaces(bb); i++) {
+               
+                var prop = GI.object_info_get_interface(bb,i);
+                 
+                
+                var iface = NameSpace.factory(
+                    'Interface', 
+                    GI.base_info_get_namespace(prop) , GI.base_info_get_name(prop)
+                );
+                
+                
+                if (iflist.indexOf(iface.alias) < 0) {
+                    //console.log("ADDING IFACE " + iface.alias);
+                    iflist.push(iface.alias);
+                    this.implementInterfaces.push(iface);
+                }
+            }
+            // ask the first of the parents.. - which will have it loaded already
+            if (this.extendsClasses.length) {
+                
+                //this.extendsClasses[0].loadImplements();
+                
+                this.extendsClasses[0].implementInterfaces.map( function(si) {
+                    
+                    if (iflist.indexOf(si.alias) < 0) {
+                        //console.log("From extends ("+ si.alias + ") IFACE " + si.alias);
+                        iflist.push(si.alias);
+                        this.implementInterfaces.push(si);
+                    }
+                },this);
+                
+            }
+            //console.dump(iflist);
+            if (this.alias == 'Atk.NoOpObject') {
+            //    throw "exut";
+               }
+           // console.dump(this.implementInterfaces);
+        },
+        
+        
+        
+        
+        load : function()
+        {
+            if (this._loaded) {
+                return; // already loaded..
+            }
+            
+            if (this.parent) { // load up parents first
+                this.parent.load();
+            }
+            this.implementInterfaces.map(function(iface) {
+                iface.load();
+            });
+            
+            
+            //console.log("load(Class) " + this.alias);
+            // my props..
+            var props = [];
+            this.genericBuildList('object', 'property', props, 'properties');
+            this.genericBuildList('object', 'field', props, 'properties');
+
+            this.genericExtends(  props, 'properties');    
+            this.genericImplements( props, 'properties');    
+           
+            var signals = [];
+            this.genericBuildList('object', 'signal', signals, 'signals');
+            this.genericExtends(  signals, 'signals');    
+            this.genericImplements( signals, 'signals');    
+            
+            
+            NameSpace.references[this.alias] = NameSpace.references[this.alias] || [];
+            if (this.alias == 'GObject.Object') {
+                this._loaded = true;
+                return;
+            }
+            
+            
+            this.constructors.push({
+                name : '', // not really...
+                params:   this.properties.length ?  [ { type :  'Object', be_null :  true,  name : 'properties' } ] : [],
+                returns :  [],
+                isConstructor : true,
+                isStatic : false,
+                memberOf : this.alias,
+                exceptions : [],
+                // in theory..
+                desc : ''
+            });
+            
+            
+            var methods = [];
+            this.genericBuildList('object', 'method', methods, 'methods');
+            // dont inherit functiosn or consturctors...
+            
+            this.genericExtends(  methods, 'methods');    
+            this.genericImplements( methods, 'methods');    
+            
+            
+            
+            //console.log("loaded(Class) " + this.alias);
+              
+            this._loaded  = true;
+        }
+         
+         
+        
+        
+        
+});
diff --git a/Introspect/Constant.js b/Introspect/Constant.js
new file mode 100644 (file)
index 0000000..bad3f6d
--- /dev/null
@@ -0,0 +1,54 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+
+
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+NameSpace   = imports.NameSpace.NameSpace;
+
+Basic        = imports.Basic.Basic;
+
+
+/**
+ * Constant
+ */
+
+
+Constant = XObject.define(
+    function(prop, memberOf, saveto, keylist) {
+          
+        this.name  =  GI.base_info_get_name(prop);
+        var tif    = GI.constant_info_get_type(prop);
+        var ty = GI.type_tag_to_string( GI.type_info_get_tag(tif));
+        this.type  = this.typeToName(GI.constant_info_get_type(prop));
+        
+        ///this.flags =  GI.property_info_get_flags(prop),
+        
+        
+        this.value= 'UNKNOWN';
+        
+        
+        if (ty != 'interface') {
+            
+            var argm = new GI.Argument();
+            GI.constant_info_get_value ( prop ,argm);
+            if (ty != 'utf8') {
+                this.value = argm.v_long;
+            } else {
+                this.value = argm.v_string;
+            }
+        } 
+        
+        this.desc = NameSpace.doc(memberOf.alias + '.' + this.name)
+        
+        memberOf[saveto].push(this);
+        keylist.push(this.name);
+    },
+    Basic,
+    { }
+);
diff --git a/Introspect/Enum.js b/Introspect/Enum.js
new file mode 100644 (file)
index 0000000..1dddc21
--- /dev/null
@@ -0,0 +1,59 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+
+
+
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+NameSpace   = imports.NameSpace.NameSpace;
+
+Base        = imports.Base.Base;
+
+  
+
+
+
+
+Enum = XObject.define(
+    function(ns, name) {
+        Base.call(this, ns, name);
+    },
+    Base, 
+    {
+        titleType: 'Enum',
+         _loaded : false,
+        load : function()
+        {
+            if (this._loaded) {
+                return; // already loaded..
+            }
+            
+            this.desc = NameSpace.doc(this.alias);
+            var bi = this.getBI();
+                 
+            for(var i =0; i < GI.enum_info_get_n_values(bi); i++) {
+               
+                var prop = GI.enum_info_get_value(bi,i);
+                 
+              
+                this.values.push({
+                    name :  GI.base_info_get_name(prop).toUpperCase() ,
+                    type :   GI.type_tag_to_string(GI.enum_info_get_storage_type(bi)),
+                    value:   GI.value_info_get_value(prop) ,
+                    memberOf : this.alias
+                });
+            }
+            
+            this._loaded = true;
+             
+             
+            
+            
+        }
+});
+
\ No newline at end of file
diff --git a/Introspect/Field.js b/Introspect/Field.js
new file mode 100644 (file)
index 0000000..ee59e3a
--- /dev/null
@@ -0,0 +1,35 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+
+
+
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+NameSpace   = imports.NameSpace.NameSpace;
+
+Basic        = imports.Basic.Basic;
+
+
+/**
+ * Field
+ */
+
+Field = XObject.define(
+    function(prop, memberOf, saveto, keylist) {
+          
+       this.name  =  GI.base_info_get_name(prop) ,
+        this.type  = this.typeToName(GI.field_info_get_type(prop)),
+        this.flags =  GI.field_info_get_flags(prop),
+        this.memberOf = memberOf.alias
+        memberOf[saveto].push(this);
+        keylist.push(this.name);
+
+    },
+    Basic,
+    {}
+);
diff --git a/Introspect/Interface.js b/Introspect/Interface.js
new file mode 100644 (file)
index 0000000..a83a5ac
--- /dev/null
@@ -0,0 +1,54 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+NameSpace   = imports.NameSpace.NameSpace;
+
+Base        = imports.Base.Base;
+
+
+
+/**
+ * Interface
+ */
+
+Interface = XObject.define(
+    function(ns, name) {
+        Base.call(this, ns, name);
+       
+    },
+
+    Base, 
+    {
+         titleType: 'Interface',
+        _loaded : false,
+        load : function()
+        {
+            if (this._loaded) {
+                return; // already loaded..
+            }
+            // my props..
+            var props = [];
+            this.genericBuildList('interface', 'property', props, 'properties');
+           
+           
+            var signals = [];
+            this.genericBuildList('interface', 'signal', signals, 'signals');
+          
+            
+            var methods = [];
+            this.genericBuildList('interface', 'method', methods, 'methods');
+            
+            
+            NameSpace.ifaceList[this.alias] = NameSpace.ifaceList[this.alias] || [];
+            this.implementedBy = NameSpace.ifaceList[this.alias];
+            
+              
+           
+            this._loaded  = true;
+        },
+         
+
+});
diff --git a/Introspect/Method.js b/Introspect/Method.js
new file mode 100644 (file)
index 0000000..2c44879
--- /dev/null
@@ -0,0 +1,150 @@
+//<script type="text/javascript">
+
+GI      = imports.gi.GIRepository;
+
+
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+NameSpace   = imports.NameSpace.NameSpace;
+
+Basic        = imports.Basic.Basic;
+
+  
+/**
+ * Methods, functions or consturctors
+ */
+
+
+
+
+Method = XObject.define(
+    function(m, memberOf, saveto, keylist) {
+        this.propertyType  = 'Method';
+        
+        var flags = GI.function_info_get_flags (m);
+        var n = GI.base_info_get_name(m);
+        var n_original = n + '';
+        // posibly add: sink, 
+        if (n.match(/_(ref|unref)$/) || n.match(/^(ref|unref|weakref|weakunref)$/)) {
+            return false; // skip these!
+        }
+        
+        if (n == 'new') {
+            n = 'c_new';
+        }
+
+        
+        var retval = [ { 
+                name : 0, 
+                type :  this.typeToName(GI.callable_info_get_return_type(m)),
+                desc : NameSpace.doc(memberOf.alias + '.' + n_original + '.return-value')
+        } ];
+        
+        
+        
+        var args = this.argsToArrays(m, retval);
+        
+        
+        if ((n == 'c_new') && !args.length && memberOf.constructors.length) {
+            
+            memberOf.constructors[0].doc = NameSpace.doc(memberOf.alias + '.' + n_original);
+            
+            return false; // skip.
+        }
+        
+
+        
+        
+        
+        //console.log(GI.base_info_get_name(m));
+       // console.dump(GI.base_info_get_attribute(m, 'doc') );
+       
+         // this is a bit messy, as we probably loose the doc's on new..
+       
+        
+        XObject.extend(this, {
+            name : n,
+            params: args,
+            returns :  retval,
+            isConstructor : flags & GI.IFunctionInfoFlags.IS_CONSTRUCTOR,
+            isStatic : !(flags & GI.IFunctionInfoFlags.IS_METHOD),
+            memberOf : memberOf.alias,
+            exceptions : [],
+            desc : NameSpace.doc(memberOf.alias + '.' + n_original)
+        });
+        // add descriptions to the arguments..
+        this.params.map(function(p) {
+            
+            
+            p.desc = NameSpace.doc(memberOf.alias + '.' + n_original + '.' + p.name);
+            //Seed.print(memberOf.alias + '.' + n_original + '.' + p.name + ':' +  p.desc);
+            
+        });
+        
+        
+            // collect references...
+        var addedto = [ memberOf.alias ]; // do not add to self...
+       
+         for(var i =0; i < args.length;i++) {
+            var ty = args[i].type;
+            if (typeof(ty) != 'string' || ty.indexOf('.') < 0) {
+                continue;
+            }
+            if (addedto.indexOf(ty) > -1) {
+                continue;
+            }
+            
+            
+            
+            NameSpace.references[ty] = NameSpace.references[ty] || [];
+            NameSpace.references[ty].push(this);
+            addedto.push(ty);
+        }
+        
+        
+         // decide what to add to...
+         
+        if (this.isConstructor) {
+            
+            if (this.name.match(/^new_/)) {
+                this.name = this.name.substring(4);
+            }
+            
+            
+            memberOf.constructors.push(this);
+            return;
+        }
+        // return values  = only applicable to non-constructors..
+        for(var i =0; i < retval.length;i++) {
+            var ty = retval[i].type;
+            if (typeof(ty) != 'string' || ty.indexOf('.') < 0) {
+                continue;
+            }
+            if (addedto.indexOf(ty) > -1) {
+                continue;
+            }
+            
+            
+            
+            NameSpace.references[ty] = NameSpace.references[ty] || [];
+            NameSpace.references[ty].push(this);
+            addedto.push(ty);
+        }
+        
+        
+        if (this.isStatic) {
+            
+            memberOf.functions.push(this);
+            return;
+        }
+            
+            
+        memberOf.methods.push(this);
+        keylist.push(this.name);
+            
+        
+            
+    },
+    Basic, 
+    { }
+);
\ No newline at end of file
diff --git a/Introspect/NameSpace.js b/Introspect/NameSpace.js
new file mode 100644 (file)
index 0000000..a169d1b
--- /dev/null
@@ -0,0 +1,293 @@
+//<script type="text/javascript">
+//Gtk = imports.gi.Gtk;
+GI      = imports.gi.GIRepository;
+GLib    = imports.gi.GLib;
+xml     = imports.libxml;
+
+
+XObject = imports.XObject.XObject;
+
+console = imports.console.console;
+
+
+NameSpace = {
+   
+    references : { }, 
+    
+    namespaces : function(ns) 
+    {
+        // this should be a class of it's own...
+        this.references[ns] = []; // technically not needed - but fills in files..
+        // get this from GI... (it's the path..)
+        var ret = [];
+       
+        function scanGir(dir) 
+        {
+            if (!GLib.file_test(dir, GLib.FileTest.EXISTS)) {
+                return;
+            }
+            var gdir = GLib.dir_open(dir,0);
+            
+            while (true) {
+                
+                var fn = gdir.read_name ? gdir.read_name () : GLib.dir_read_name(gdir);
+           //      console.log('trying ' +  fn);
+                if (!fn) {
+                    gdir.close ? gdir.close() : GLib.dir_close(gdir);
+                    return;;
+                }
+                if (!fn.match(/.typelib$/)) {
+                    continue;
+                }
+                var par = fn.split('-').shift();
+                 //console.log('trying ' +  par);
+                if (ret.indexOf(par) > -1) {
+                     continue;
+                }
+                ret.push(par);
+                
+                
+            } 
+        }
+        var gi = GI.IRepository.get_default();
+        var pth = GI.IRepository.get_search_path ();
+        
+        scanGir(pth[0]);
+        ret.sort();
+        console.dump(ret);
+        return ret;
+        
+    },
+        
+        
+    ns:  function(ns) {
+        var gi = GI.IRepository.get_default();
+        ret = {
+            titleType: 'Namespace',
+            ns: ns,
+            name : ns,
+            alias : ns,
+            objects : [],
+            functions : [],
+            enums : [],
+            structs: [],
+            constants : [],
+            unions : [],
+            
+            // so ns looks like class..
+          
+            extendsClasses : [], // what it extends...
+            childClasses : [], // what uses it..
+            properties : [],
+            constructors : [],
+            methods : [],
+            values : [], /// really constants.
+            signals : [],
+            interfaces: [],
+        };
+     
+        for (var i=0; i <  gi.get_n_infos (ns); i++ ) {
+            var info = gi.get_info (ns, i);
+            
+            var info_type = GI.base_info_get_type (info);
+            switch(info_type) {
+                case  GI.IInfoType.OBJECT:
+                    ret.objects.push(GI.base_info_get_name(info));
+                    this.clsGatherInterfaces(ns , GI.base_info_get_name(info));
+                    continue;
+                 case  GI.IInfoType.INTERFACE:
+                    ret.interfaces.push(GI.base_info_get_name(info));
+                    continue;
+                case  GI.IInfoType.FUNCTION:
+                    new imports.Method.Method(info, ret, 'functions', []);    
+                    continue;
+                
+                case  GI.IInfoType.CALLBACK:
+                   // new Introspect.Callback(info, ret, 'callbacks', []);
+                    continue;
+                
+                case  GI.IInfoType.ENUM:
+                case  GI.IInfoType.FLAGS:
+                    ret.enums.push(GI.base_info_get_name(info));
+                    continue;
+                case  GI.IInfoType.STRUCT:
+                    if (GI.struct_info_is_gtype_struct (info)) {
+                        continue;
+                    }
+
+                    ret.structs.push(GI.base_info_get_name(info));
+                    continue;
+                case  GI.IInfoType.UNION:
+                    ret.unions.push(GI.base_info_get_name(info));
+                    continue;
+                case  GI.IInfoType.CONSTANT:
+                    new imports.Constant.Constant(info, ret, 'values', []);
+                    
+                    continue;
+                
+                
+                default:
+                    continue;
+            }
+        }
+        
+                
+        var gi = GI.IRepository.get_default();
+        var ver = gi.get_version(ns);
+        var pth = GI.IRepository.get_search_path ();
+        var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
+       //console.log(fn);
+        ret.gir_file = gir_path + '/'+ ns + '-' + ver + '.gir';
+        ret.gir_filename = ns + '-' + ver + '.gir';
+        
+        //console.dump(this.ifaceList);
+        return ret;
+
+    },
+    
+  
+    // store all the interfaces, so we can show a list of them later...
+    // called when you list the namespace
+    clsGatherInterfaces : function(ns, cls)
+    {
+        var gi = GI.IRepository.get_default();
+        var bb = gi.find_by_name(ns, cls);
+        var fullname = ns+'.'+cls;
+        this.ifaceList = this.ifaceList || { };
+         
+        
+        for(var i =0; i < GI.object_info_get_n_interfaces(bb); i++) {
+           
+            var prop = GI.object_info_get_interface(bb,i);
+           
+            var add =  GI.base_info_get_namespace(prop) +'.' + GI.base_info_get_name(prop);
+            this.ifaceList[add] = this.ifaceList[add] || [];
+            if (this.ifaceList[add].indexOf(fullname) < 0) {
+                this.ifaceList[add].push(fullname);
+            }
+             
+        }
+        
+       
+        
+    },
+    
+           
+        
+   
+    doc : function(what) {
+        var ns = what.split('.').shift();
+        this.commentLoad(ns);
+        return typeof(this.comments[ns][what]) == 'undefined' ?  '' : this.comments[ns][what];
+        
+    },
+    
+    
+    
+    comments : {},
+    
+    commentLoad : function(ns)
+    {
+        
+        if (typeof(this.comments[ns]) != 'undefined') {
+            return;
+        }
+        
+        console.log("LOAD DOCS: " + ns);
+        var gi = GI.IRepository.get_default();
+        var ver = gi.get_version(ns);
+        if (!ver) {
+            this.comments[ns] = {};
+            return;
+        }
+        var ret = { };
+        
+        // no idea why this is broken on my build system.
+        var  getAttribute = function(n, name){
+            var properties = n.properties;
+            while (properties){
+                if (properties.name == name)
+                    return properties.children.content;
+                properties = properties.next
+            }
+            return null;
+        }
+                
+        
+        function walk (element, path) {
+            
+            
+            if (!element) {
+                return;
+            }
+            
+            var n =  getAttribute(element, 'name') ;
+            //console.log("WALK" + n);
+            if (element.name == 'signal') {
+                path += '.signal';
+            }
+            
+            if (n) {
+                path += path.length ? '.' : '';
+                path += n;
+            }
+            if (element.name == 'return-value') {
+                path += '.return-value';
+            }
+            
+            var d =   getAttribute(element,'doc');
+            if (d) {
+             //   Seed.print(path + ':' + d);
+                ret[path] = d;
+            }
+            
+            var child = element.children;
+
+            while (child){
+                //console.log(child.tag);
+                if (child.type == "element"){
+                    walk (child, path);
+                }
+                child = child.next;
+            }
+        }
+        
+        var pth = GI.IRepository.get_search_path ();
+        
+        
+        var gir_path = pth[0].replace(/lib\/girepository-1.0/, 'share\/gir-1.0');
+       
+        
+        //console.log(fn);
+        var  fn = gir_path + '/'+ ns + '-' + ver + '.gir';
+       // console.log(fn);
+        
+        if (!GLib.file_test(fn, GLib.FileTest.EXISTS)) {
+            console.log('missing docc file ' + fn);
+            this.comments[ns] = {};
+            
+            return;
+        }
+        var doc = xml.parseFile(fn);
+        //console.log("xmldoc?" + doc);
+        walk (doc.root, '');
+        //console.dump(ret);
+        this.comments[ns] = ret;
+
+    },
+    registry : { },
+    factory : function(type, ns, name) {
+        if (typeof (this.registry[ns +'.' + name]) == 'undefined') {
+            this.registry[ns +'.' + name] = new imports[type][type](ns,name);
+            this.registry[ns +'.' + name].load();
+        }
+        
+        return this.registry[ns +'.' + name];
+    }
+        
+};
+
+
+
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
+);
diff --git a/Introspect/Signal.js b/Introspect/Signal.js
new file mode 100644 (file)
index 0000000..9524512
--- /dev/null
@@ -0,0 +1,68 @@
+//<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;
+
+  
+
+Signal = XObject.define(
+    function(sig, memberOf, saveto, keylist) {
+
+        this.propertyType  = 'Signal';
+        
+        var params = this.argsToArrays(sig);
+        // add a reference to self...
+        params.unshift({
+            name : 'self',
+            type : memberOf.alias,
+            direction : 'in',
+            be_null :  false
+                
+        });
+        var n_original  = GI.base_info_get_name(sig);
+        
+        XObject.extend(this,{
+            name : n_original.replace(/-/g,'_'),
+            params : params,
+            memberOf : memberOf.alias,
+            exceptions : [],
+            returns :   [ { type :  this.typeToName(GI.callable_info_get_return_type(sig)) } ],
+            desc : NameSpace.doc(memberOf.alias + '.signal.' + n_original)
+        });
+        memberOf[saveto].push(this);
+        keylist.push(this.name);
+        
+        var addedto = [ memberOf.alias ]; // do not add to self...
+       
+        for(var i =1; i < params.length;i++) {
+            var ty = params[i].type;
+            if (typeof(ty) != 'string' || ty.indexOf('.') < 0) {
+                continue;
+            }
+            if (addedto.indexOf(ty) > -1) {
+                continue;
+            }
+            
+            
+            
+            NameSpace.references[ty] = NameSpace.references[ty] || [];
+            NameSpace.references[ty].push(this);
+            addedto.push(ty);
+        }
+        
+        
+        
+        
+        
+    },
+    Basic
+);
+
+
+
diff --git a/Introspect/Struct.js b/Introspect/Struct.js
new file mode 100644 (file)
index 0000000..a3a72dc
--- /dev/null
@@ -0,0 +1,64 @@
+//<script type="text/javascript">
+
+GI      = imports.gi.GIRepository;
+
+
+
+XObject     = imports.XObject.XObject;
+console     = imports.console.console;
+NameSpace   = imports.NameSpace.NameSpace;
+
+Base        = imports.Base.Base;
+
+/**
+ * Struct
+ */
+
+Struct = XObject.define(
+    function(ns, name) {
+        Base.call(this, ns, name);
+       
+    },
+
+    Base, 
+    {
+        titleType: 'Struct',
+        
+        _loaded : false,
+        load : function()
+        {
+            if (this._loaded) {
+                return; // already loaded..
+            }
+            // my props..
+            var props = [];
+            this.genericBuildList('struct', 'field', props, 'properties');
+            
+            var methods = [];
+            
+            
+            if (GI.struct_info_get_size (this.getBI()) > 0 ) {
+               
+            
+                
+                this.constructors.push({
+                    name : '',
+                    params: [],
+                    returns :  [],
+                    isConstructor : true,
+                    isStatic : false,
+                    memberOf : this.alias,
+                    exceptions : [],
+                    desc : ''
+                });
+            }
+            
+            this.genericBuildList('struct', 'method', methods, 'methods');
+              
+            this._loaded  = true;
+        },
+         
+
+});
\ No newline at end of file
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
diff --git a/Introspect/extensions/xml.js b/Introspect/extensions/xml.js
new file mode 100644 (file)
index 0000000..f4249f2
--- /dev/null
@@ -0,0 +1,90 @@
+//<script type="text/javascript"> 
+/**
+* @class xml.XMLNode
+* Xml node 
+* @noconstructor
+* 
+* @cfg {String} name Name of Node ???
+* @cfg {XMLNode} children First child (use next property to iterate children
+* @cfg {XMLNode} parent Parent node of this one
+* @cfg {XMLNode} next Next sibling
+* @cfg {XMLNode} prev Previous sibling
+* @cfg {String} Text contents of Node
+* @cfg {XMLNode} last Last Sibling? or last child - FIXME
+* @cfg {String} type - Type of node : element, attribute, text
+* @cfg {XMLAttribute} properties First Attribute of node
+*/
+XMLNode = function() {}
+
+Roo.apply(XMLNode.prototype, {
+    
+});
+
+
+/**
+* @class xml.XMLDocument
+* Xml document 
+* @noconstructor
+* 
+* @cfg {String} name Name of Node ???
+* @cfg {XMLNode} children First child (use next property to iterate children
+* @cfg {XMLNode} parent Parent node of this one
+* @cfg {XMLNode} next Next sibling
+* @cfg {XMLNode} prev Previous sibling
+* @cfg {String} Text contents of Node
+* @cfg {XMLNode} last Last Sibling? or last child - FIXME
+* @cfg {String} type - Type of node : element, attribute, text
+* @cfg {XMLAttribute} properties First Attribute of node
+* @cfg {XMLNode} root Root node of document.
+*/
+
+
+XMLDocument  = function () { };
+
+Roo.extend(XMLDocument, XMLNode, {
+    root : { }, 
+});
+
+
+/**
+* Create a new xpath context ?
+* @param {Object} .....
+* @return {XMLNode} returns obj
+* @member XMLDocument xpathNewContext
+*/
+
+XMLDocument.xpathNewContext = function() { }
+
+
+
+
+   
+XMLAttribute  = function () { };
+   
+Roo.extend(XMLAttribute, XMLNode, {   
+
+});
+
+XMLXPathContext  = function() { };
+Roo.apply(XMLXPathContext.prototype, {
+    value : '',
+});
+
+XMLXPathContext.xpathEval = function () {} 
+XMLXPathContext.xpathRegisterNs = function () {} 
+
+
+XMLXPathObj = function() { };
+Roo.apply(XMLXPathObj.prototype, {
+    value : '',
+});
+
+
+
+parseFile = function () { }
+parseString = function () { }
+_nodeProto = { }
+   
+  
\ No newline at end of file
diff --git a/String.js b/String.js
new file mode 100644 (file)
index 0000000..d30b494
--- /dev/null
+++ b/String.js
@@ -0,0 +1,159 @@
+/*
+ * Based on:
+ * Ext JS Library 1.1.1
+ * Copyright(c) 2006-2007, Ext JS, LLC.
+ *
+ * Originally Released Under LGPL - original licence link has changed is not relivant.
+ *
+ * Fork - LGPL
+ * <script type="text/javascript">
+ */
+// usage:
+// Seed.include('String.js');
+XObject = imports.XObject.XObject;
+
+
+XObject.extend(String, 
+    {
+    
+        /** @scope String */
+        
+        /**
+         * Escapes the passed string for ' and \
+         * @param {String} string The string to escape
+         * @return {String} The escaped string
+         * @static
+         */
+        escape : function(string) {
+            return string.replace(/('|\\)/g, "\\$1");
+        },
+
+        /**
+         * Pads the left side of a string with a specified character.  This is especially useful
+         * for normalizing number and date strings.  Example usage:
+         * <pre><code>
+    var s = String.leftPad('123', 5, '0');
+    // s now contains the string: '00123'
+    </code></pre>
+         * @param {String} string The original string
+         * @param {Number} size The total length of the output string
+         * @param {String} char (optional) The character with which to pad the original string (defaults to empty string " ")
+         * @return {String} The padded string
+         * @static
+         */
+        leftPad : function (val, size, ch) {
+            var result = new String(val);
+            if(ch === null || ch === undefined || ch === '') {
+                ch = " ";
+            }
+            while (result.length < size) {
+                result = ch + result;
+            }
+            return result;
+        },
+         /**
+         * Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.  Each
+         * token must be unique, and must increment in the format {0}, {1}, etc.  Example usage:
+         * <pre><code>
+    var cls = 'my-class', text = 'Some text';
+    var s = String.format('<div class="{0}">{1}</div>', cls, text);
+    // s now contains the string: '<div class="my-class">Some text</div>'
+    </code></pre>
+         * @p aram {String} string The tokenized string to be formatted
+         * @param {String} value1 The value to replace token {0}
+         * @param {String} value2 Etc...
+         * @return {String} The formatted string
+         * @static
+         */
+        format : function(format){
+            var args = Array.prototype.slice.call(arguments, 1);
+            return format.replace(/\{(\d+)\}/g, function(m, i){
+                return args[i];
+            });
+        },
+        
+
+        /**
+         * Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens.  Each
+         * token must be unique, and must increment in the format {0}, {1}, etc.  Example usage:
+         * <pre><code>
+    var cls = 'my-class', text = 'Some text';
+    var s = String.format('<div class="{0}">{1}</div>', cls, text);
+    // s now contains the string: '<div class="my-class">Some text</div>'
+    </code></pre>
+         * @param {String} string The tokenized string to be formatted
+         * @param {String} value1 The value to replace token {0}
+         * @param {String} value2 Etc...
+         * @return {String} The formatted string, all arguments will be htmlEncoded.
+         * @static
+         */
+        htmlFormat : function(format){
+            var args = Array.prototype.slice.call(arguments, 1);
+            return format.replace(/\{(\d+)\}/g, function(m, i){
+                return this.htmlEncode(args[i]);
+            });
+        },
+        
+        /**
+         * Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.
+         * @param {String} value The string to encode
+         * @return {String} The encoded text
+         */
+        htmlEncode : function(value){
+            return !value ? value : 
+                String(value).replace(/&/g, "&amp;"
+                    ).replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
+        }
+        
+        
+    }
+);
+
+    /**
+     * Utility function that allows you to easily switch a string between two alternating values.  The passed value
+     * is compared to the current string, and if they are equal, the other value that was passed in is returned.  If
+     * they are already different, the first value passed in is returned.  Note that this method returns the new value
+     * but does not change the current string.
+     * <pre><code>
+    // alternate sort directions
+    sort = sort.toggle('ASC', 'DESC');
+
+    // instead of conditional logic:
+    sort = (sort == 'ASC' ? 'DESC' : 'ASC');
+    </code></pre>
+     * @param {String} value The value to compare to the current string
+     * @param {String} other The new value to use if the string already equals the first value passed in
+     * @return {String} The new value
+     */
+     
+XObject.extend(String.prototype,  {
+        
+        toggle : function(value, other){
+            return this == value ? other : value;
+        },
+        
+        trim : function (toTrim) {
+            var out = this.ltrim(toTrim);
+            out = out.rtrim(toTrim);
+            return out;
+        },
+        
+        ltrim : function (toTrim) {
+            if (this.substr(0, toTrim.length) == toTrim) {
+                return this.slice(toTrim.length);
+            }
+            
+            return this;
+        },
+        
+        rtrim : function (toTrim) {
+            if (this.substr(this.length - toTrim.length) == toTrim) {
+                return this.slice(0, this.length - toTrim.length);
+            }
+       
+            return this;
+        }
+    
+   
+});
\ No newline at end of file
diff --git a/pack.js b/pack.js
new file mode 100644 (file)
index 0000000..c51f006
--- /dev/null
+++ b/pack.js
@@ -0,0 +1,86 @@
+#!/usr/bin/seed
+//<script type="text/javascript">
+/**
+ * packer command line
+ * 
+ * -o Output
+ * -O Output debug file here.
+ * -t Translate json file.
+ * -w Cache / working dir.
+ * -f File to read with a list of source paths / or class names.
+ * -C no cleanup (use with -w if you need are using a cache directory.)
+ * -p prefix for translation md5 generator (directory that files are in, and is removed 
+ *    from path when generating an md5 for the translated name.
+ * compresses files listed as arguments and outputs result
+ */
+File            = imports.File.File;
+Packer          = imports.JSDOC.Packer.Packer;
+
+
+  
+
+var args = Array.prototype.slice.call(Seed.argv);
+args.shift(); //seed
+args.shift(); // pack.js
+var cfg = {
+    files : [],
+    target : false,
+    srcfiles : []
+}
+
+
+for(var i =0; i < args.length;i++) {
+    if (args[i] == '-o') {
+        cfg.target = args[i+1];
+        i++;
+        continue;
+    }
+    if (args[i] == '-O') {
+        cfg.debugTarget = args[i+1];
+        i++;
+        continue;
+    }
+    if (args[i] == '-t') {
+        cfg.translateJSON = args[i+1];
+        i++;
+        continue;
+    }
+    if (args[i] == '-w') {
+        cfg.tmpDir = args[i+1];
+        i++;
+        continue;
+    }
+    if (args[i] == '-p') {
+        cfg.prefix = args[i+1];
+        i++;
+        continue;
+    }
+    if (args[i] == '-C') {
+        cfg.cleanup = false;
+        continue;
+    }
+    if (args[i] == '-f') {
+        cfg.srcfiles.push(args[i+1]);
+        i++;
+        continue;
+    }
+    if (cfg.files.indexOf(args[i]) > -1) {
+        continue; // remove dupes.
+    }
+    cfg.files.push(args[i]);
+}
+var pack;
+try {
+    pack = new Packer(cfg)
+} catch (e) {
+    print("ERROR " + e.toString());
+    throw e;
+}
+if (!pack.target) {
+    print(pack.out);
+}
+
+
diff --git a/templates/resources/default.css b/templates/resources/default.css
new file mode 100644 (file)
index 0000000..5935d5d
--- /dev/null
@@ -0,0 +1,519 @@
+/* default.css
+/<style>
+/ */
+.detailList dd {
+       clear: both;
+}
+.left-class-list ol, .left-class-list ul {
+       list-style-image:none;
+       list-style-position:outside;
+       list-style-type:none;
+       margin: 4px;
+       padding: 4px;
+}
+.left-class-list {
+       background:#F8F8F8 none repeat scroll 0 0;
+       border:1px solid white;
+       float:left;
+       margin:5px;
+       padding:5px;
+       width:18%;
+}
+.class-picture {
+       float:right;
+       margin:20px 10px 10px;
+
+}
+
+body
+{
+       font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
+       /* width: 800px; */
+}
+
+.header
+{
+       clear: both;
+       background-color: #ccc;
+       padding: 8px;
+}
+
+h1
+{
+       font-size: 150%;
+       font-weight: bold;
+       padding: 0;
+       margin: 1em 0 0 .3em;
+}
+
+hr
+{
+       border: none 0;
+       border-top: 1px solid #7F8FB1;
+       height: 1px;
+}
+
+pre.code
+{
+       display: block;
+       padding: 8px;
+       border: 1px dashed #ccc;
+}
+
+#index
+{
+       margin-top: 24px;
+       float: left;
+       width: 160px;
+       position: absolute;
+       left: 8px;
+       background-color: #F3F3F3;
+       padding: 8px;
+}
+
+#content
+{
+       margin-left: 190px;
+       width: 600px;
+}
+
+.classList
+{
+       list-style-type: none;
+       padding: 0;
+       margin: 0 0 0 8px;
+       font-family: arial, sans-serif;
+       font-size: 1em;
+       overflow: auto;
+}
+
+.classList li
+{
+       padding: 0;
+       margin: 0 0 8px 0;
+}
+
+.summaryTable { width: 100%; }
+
+h1.classTitle
+{
+       font-size:170%;
+       line-height:130%;
+}
+
+h2 {
+  font-size: 110%;
+  padding-left: 1em;
+}
+
+/* --------- the labels at the top of the page... -------- */
+.class-summary-table .label
+{
+    vertical-align: top;
+    margin-bottom: 4px;
+}
+
+.class-summary-table
+{
+    margin-left:10px;
+    margin-top:5px;
+
+}
+.class-summary-table  td
+{
+    font-size:12px;
+    padding:2px 10px 2px 2px;
+}
+.elbow
+{
+  vertical-align: middle;
+  padding-right: 2px;
+}
+
+.elbow_indent2 {
+  padding-left: 10px;
+}
+
+.elbow_indent3 {
+  padding-left: 20px;
+}
+
+.elbow_indent4 {
+  padding-left: 40px;
+}
+
+.elbow_indent5 {
+  padding-left: 50px;
+}
+
+.elbow_indent6 {
+  padding-left: 50px;
+}
+
+.elbow_indent7 {
+  padding-left: 60px;
+}
+
+/** ---------------------   Caption above tables -----------------------**/
+caption.Empty,
+caption,
+div.sectionTitle
+{
+       background-color: #7F8FB1;
+       color: #fff;
+       font-size:130%;
+       text-align: left;
+       padding: 2px 6px 2px 6px;
+       border: 1px #7F8FB1 solid;
+    width: 100%;
+    font-weight: bold;
+}
+
+div.sectionTitle { margin-bottom: 8px; }
+.summaryTable thead { display: none; }
+
+.summaryTable td
+{
+       vertical-align: top;
+       padding: 4px;
+       border-bottom: 1px #7F8FB1 solid;
+       border-right: 1px #7F8FB1 solid;
+}
+
+/*col#summaryAttributes {}*/
+.summaryTable td.attributes
+{
+       border-left: 1px #7F8FB1 solid;
+       width: 140px;
+       text-align: right;
+}
+
+td.attributes, .fixedFont
+{
+       line-height: 15px;
+       font-family: "Courier New",Courier,monospace;
+       font-size: 13px;
+    margin-left: 10px;
+}
+td.attributes, .fixedFont a
+{
+       color: #999999;
+       font-family: "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
+}
+td.attributes, .fixedFont b i
+{
+       font-family: "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
+}
+.itemname
+{
+    color: #002EBE;
+}
+
+
+.summaryTable td.nameDescription
+{
+       text-align: left;
+       font-size: 13px;
+       line-height: 15px;
+}
+
+.summaryTable td.nameDescription, .description
+{
+       line-height: 15px;
+       padding: 4px;
+       padding-left: 4px;
+}
+
+.summaryTable { margin-bottom: 8px; }
+
+ul.inheritsList
+{
+       list-style: square;
+       margin-left: 20px;
+       padding-left: 0;
+}
+
+.detailList {
+       margin-left: 20px;
+    padding-top: 10px;
+       line-height: 20px;
+    clear: left;
+}
+.detailList dt
+{
+    margin-left: 20px;
+    clear: left;
+    float: left;
+
+}
+
+.detailList .heading
+{
+       font-weight: bold;
+       padding-bottom: 6px;
+       margin-left: 0;
+
+}
+
+.light, td.attributes, .light a:link, .light a:visited
+{
+       color: #777;
+       font-style: italic;
+}
+
+.fineprint
+{
+       text-align: right;
+       font-size: 10px;
+}
+
+.detailList dd
+{
+    clear: none;
+    float: left;
+    margin-left: 10px;
+
+
+}
+
+
+.detailList dt
+{
+
+
+    margin-bottom::    12px;
+    margin-left:       20px;
+}
+/** ----------------------- RooJS extra stuff  ----------------------- */
+
+.body-wrap {
+    margin: 5px;
+}
+
+.top-tools  {
+    text-align:right;
+}
+.inner-link {
+    margin-left: 10px;
+}
+.inheritance {
+    float:right;
+    margin-top:20px;
+    width:300px;
+}
+.res-block {
+    margin-bottom:15px;
+    padding-top:5px;
+   /* width:210px; */
+}
+.inheritance pre {
+    border:0pt none;
+    font-size:11px;
+    /* line-height:18px !important; */
+    margin:0pt;
+    padding:0pt 8px 5px !important;
+    text-align:left;
+    background-color: #f8f8f8;
+}
+div.hr {
+    background:#CCCCCC none repeat scroll 0%;
+    height:1px;
+    line-height:1px;
+    margin:5px 0pt;
+    overflow:hidden;
+        clear: both;
+}
+/** ----------------------- RooJS table stuff  ----------------------- */
+
+.member-table {
+    margin-bottom:10px;
+    width:100%;
+}
+
+.member-table th {
+    background-color:#eee;
+    border-left:1px solid #EEE;
+    border-right:1px solid #DDD;
+    border-top:1px solid #EEE;
+    padding:3px;
+    text-align:left;
+    vertical-align:middle;
+
+
+    font-size:11px;
+    white-space:nowrap;
+
+}
+
+.member-table td.micon {
+    background:#F9F9F9;
+    border-right:1px solid #D0D0D0;
+    padding:0px;
+    width:16px;
+}
+
+.member-table td.micon a {
+
+    display:block;
+
+    text-decoration: none;
+
+     height:18px;
+    width:16px;
+}
+
+.member-table td.micon,
+.member-table td.sig,
+.member-table td.msource {
+    border-top:1px solid #D0D0D0;
+    vertical-align:top;
+    padding: 5px;
+    font-size: 13px;
+}
+.expanded .mdesc .short{
+    display:none;
+}
+.expanded .mdesc .comments,
+.expanded .mdesc .long {
+    display:block;
+    margin-top: 10px;
+    margin-left: 10px;
+}
+
+
+.mdesc .comments,
+.mdesc .long {
+    display:none;
+}
+.mdesc .short {
+    color: #999;
+    margin-left: 10px;
+}
+
+.expandable td.micon a {
+    background:transparent url(elbow-plus-nl.gif) no-repeat scroll 0px 0px;
+    cursor:pointer}
+
+.expanded  td.micon a {
+    background:transparent url(elbow-minus-nl.gif) no-repeat scroll 0px 0px;
+    cursor:pointer;
+
+}
+
+
+/* ---- table with no contents */
+
+caption.Empty
+{
+    background-color:#EEEEEE;
+    border:medium none;
+    color:#666666;
+    font-size:10pt;
+    font-style:italic;
+    font-weight: normal;
+}
+
+
+/* fix up lists back to normal */
+
+
+.body-wrap ul
+{
+    ist-style-image:   none;
+    list-style-position:       outside;
+    list-style-type:   disc;
+    padding-left: 40px;
+}
+
+.long pre,
+.description pre  {
+    background:#F8F8F8 none repeat scroll 0% 0%;
+    border-color:#ccc;
+    border-style:solid;
+    border-width:1px 1px 1px 5px;
+    font-size:12px !important;
+    line-height:14px !important;
+    margin:10px 10px 10px 0px;
+    padding:10px;
+}
+
+
+.comments {
+    background:#F8F8F8 none repeat scroll 0% 0%;
+    border-color:#f30;
+    border-style:solid;
+    border-width:1px 15px 1px 15px;
+    font-size:12px !important;
+    line-height:14px !important;
+    margin:10px 10px 10px 0px;
+    padding:10px;
+    width:95%;
+    float:left;
+
+}
+
+
+/** methods etc. defined in this class are highlighted. **/
+
+/** -------- alternating rows.. ---- */
+
+.config-row-alt0 {
+    background-color : #f8f8f8;
+}
+.notInherited td.micon,
+.notInherited td.msource
+{
+
+    background-color: #7F8FB1; 
+    color : #fff;
+    font-weight: bold;
+}
+td.msource
+{
+    width: 160px;
+}
+
+.detailList dd {
+       clear: both;
+}
+.left-class-list ol, .left-class-list ul {
+       list-style-image:none;
+       list-style-position:outside;
+       list-style-type:none;
+       margin: 4px;
+       padding: 4px;
+}
+.left-class-list {
+       background:#F8F8F8 none repeat scroll 0 0;
+       border:1px solid white;
+       float:left;
+       margin:5px;
+       padding:5px;
+       width:18%;
+}
+.class-picture {
+       float:right;
+       margin:20px 10px 10px;
+       
+}
+.left-class-list ol, .left-class-list ul {
+       list-style-image:none;
+       list-style-position:outside;
+       list-style-type:none;
+       margin: 4px;
+       padding: 4px;
+}
+.left-class-list {
+       background:#F8F8F8 none repeat scroll 0 0;
+       border:1px solid white;
+       float:left;
+       margin:5px;
+       padding:5px;
+       width:18%;
+}
+.ns-list {
+        
+    display:block;
+    float:left;
+    margin:30px;
+}
\ No newline at end of file
diff --git a/templates/resources/library_gnome.css b/templates/resources/library_gnome.css
new file mode 100644 (file)
index 0000000..2fee732
--- /dev/null
@@ -0,0 +1,715 @@
+body {
+       margin: 0px;
+       padding: 0px;
+       font-family: sans-serif;
+       background: white;
+       color: black;
+       height: 101%;
+}
+
+div {
+       margin: 0;
+}
+
+body.with-star {
+       background: white url(star.png) -100px -200px no-repeat;
+}
+
+#page {
+       margin: 0px;
+       padding: 0px;
+}
+
+#page ul {
+       margin: 0;
+}
+
+div.in-column {
+       margin: 0 0 2em 1em;
+       float: right;
+       max-width: 12em;
+}
+
+hr {
+       color: #888;
+       background: #888;
+       border: 0;
+       height: 1px;
+       width: 90%;
+       text-align: center;
+       clear: both;
+}
+
+
+div.body {
+       clear: both;
+}
+
+
+div.sidebar {
+       position: absolute;
+       text-align: left;
+       right: 0px;
+       top: 60px;
+       width: 27ex;
+       padding-left: 1ex;
+       border-left: 1ex solid #eee;
+       margin-top: 4em;
+}
+
+div.sidebar h2 {
+       margin-top: 0;
+       padding: 5px 2ex 5px 2ex;
+       background: url(t.png) top left repeat-y;
+       font-size: 100%;
+}
+
+ul.i18n,
+ul.toc {
+       padding: 0;
+       padding-left: 20px;
+       margin: 0;
+       margin-right: 10px;
+       list-style: none;
+}
+
+ul.i18n li,
+ul.toc li {
+       margin: 0;
+       margin-left: 1em;
+       padding: 0;
+       list-style: circle;
+}
+
+ul.toc li a {
+       text-decoration: none;
+       color: black;
+}
+
+ul.toc li a:hover {
+       text-decoration: underline;
+}
+
+#general {
+       list-style: none;
+       background: #2E3436 url(general_bg.png) 0 100% repeat-x;
+       text-align: right;
+       padding: 0 1ex;
+       margin: 0;
+       font-size: 70%;
+}
+
+#general li {
+       display: inline;
+       background: url(general_separator.png) 0 0 no-repeat;
+       padding-top: 10px;
+       padding-bottom: 8px;
+       margin-left: 0px;
+       margin-top: 0px;
+}
+
+#general li a {
+       font-weight: bold;
+       color: #FFFFFF;
+       margin: 0 2ex;
+       text-decoration: none;
+       line-height: 30px;
+}
+
+#general li a:hover {
+       text-decoration: underline;
+}
+
+#general .home {
+       float: left;
+       background: url(general_separator.png) 100% 0 no-repeat;
+       padding-top: 0;
+       padding-bottom: 0;
+}
+
+#general .home a {
+       float: left;
+       background: url(foot.png) 7px 50% no-repeat;
+       margin-left: 0;
+       padding-left: 27px;
+}
+
+
+#header {
+       background: #729FCF url(top-header-gradient.png) top left repeat-x;
+       float: left;
+       width: 100%;
+       font-size: 75%;
+}
+
+#header-wrap {
+       background: transparent url(library.png) 15px 10px no-repeat;
+       min-height: 67px;
+}
+
+#header h1 {
+       margin: 0;
+       margin-left: 85px;
+       padding-top: 25px;
+       font-size: 200%;
+       color: #eeeeec;
+}
+
+#tabs {
+       background: url(bar.png) 0 100% repeat-x;
+       width: 100%;
+       float: left;
+       margin: 0;
+       padding: 0;
+}
+
+#portal-globalnav {
+       float: right;
+       list-style: none;
+       margin: 0;
+       margin-right: 3ex;
+}
+
+#portal-globalnav li {
+       float: left;
+       margin: 0;
+       margin-left: 0.2ex;
+       font-size: 2ex;
+}
+
+#portal-globalnav li a:hover {
+       color: #111111;
+}
+
+#portal-globalnav li a {
+       float: left;
+       text-decoration: none;
+       color: #555555;
+       background: url(tab_left.png) 0 0 no-repeat;
+       padding: 7px 0 7px 7px;
+       border-bottom: 2px solid #CCCCCC;
+}
+
+#portal-globalnav li span {
+       background: url(tab_right.png) 100% 0 no-repeat;
+       padding: 7px 28px 7px 19px;
+}
+
+#portal-globalnav li.selected a {
+       color: #3566A5;
+       background: url(tab_left.png) 0 -57px no-repeat;
+       border-bottom: none;
+       padding-top: 8px;
+       padding-bottom: 8px;
+}
+
+#portal-globalnav li.selected a span {
+       background: url(tab_right.png) 100% -57px no-repeat;
+       padding-top: 8px;
+       padding-bottom: 8px;
+}
+
+
+
+div.articleinfo h1 {
+       padding-top: 1ex;
+       color: #3f3f3f;
+}
+
+div.articleinfo h3.abstract {
+       font-weight: normal;
+       border: 5px solid #eee;
+       padding: 1ex;
+       -moz-border-radius: 10px;
+       -khtml-border-radius: 10px;
+       font-size: 100%;
+       background: white;
+}
+
+div.articleinfo dd.affiliation {
+       color: #a4a4a4;
+       margin-bottom: 1ex;
+}
+
+div.articleinfo dl {
+       margin-left: 1em;
+}
+
+dl.doc-index {
+       margin-left: 1em;
+}
+
+dl.doc-index p {
+       margin: 0.5ex 0;
+}
+
+dl.doc-index dt {
+       margin-top: 2em;
+}
+
+dl.doc-index dd {
+       margin: 0em 1em 2em 1em;
+}
+
+dl.doc-index dt a {
+       text-decoration: none;
+       font-weight: bold;
+       font-size: 110%;
+}
+
+dl.doc-index dt a:hover {
+       text-decoration: underline;
+}
+
+div.body {
+       background-color: transparent;
+       border: none;
+       padding: 1em;
+} 
+
+div.body-sidebar {
+       margin-right: 27ex;
+}
+
+a {
+       color: #3465a4;
+}
+
+div.navbar {
+       margin: 0 29ex 0 2ex;
+}
+
+h1.title {
+       font-size: 1.72em;
+       margin: 0; padding: 0;
+       color: #3f3f3f;
+}
+
+h1.title a {
+       color: inherit;
+       text-decoration: none;
+}
+
+div#language {
+       position: absolute;
+       right: 2em;
+       top: 6ex;
+}
+
+/* from goran css */
+
+#dev, #usr, #adm {
+       float: left;
+       margin: 20px 3% 0px 3%;
+       width: 42%;
+       padding: 5px;
+}
+
+div.sidebar #dev, div.sidebar #usr, div.sidebar #adm {
+       float: none;
+       width: 90%;
+       font-size: 90%;
+       margin-top: 0;
+}
+
+br.clear {
+       clear: both;
+}
+
+#dev p, #usr p, #adm p {
+       margin: 20px;
+}
+
+#usr h2 a, #usr h2 span,
+#dev h2 a, #dev h2 span,
+#adm h2 a, #adm h2 span {
+       display: block; width: 80%;
+       text-decoration: none;  
+       padding: 10px 20px;
+}
+#usr h2 a, #usr h2 span { color: #ffffff; }
+#dev h2 a, #dev h2 span { color: #2e3436; }
+#adm h2 a, #adm h2 span { color: #ffffff; }
+
+#usr h2, #dev h2, #adm h2 {
+       height: 40px;
+       font-size: 11pt;
+       -moz-border-radius: 10px;
+       -khtml-border-radius: 10px;
+       padding: 0px;
+       background: none;
+}
+
+#usr h2 { background: #729fcf url(user-icon.png) 95% no-repeat; }
+#dev h2 { background: #edd400 url(dev-icon.png) 95% no-repeat; }
+#adm h2 { background: #00b147 url(adm-icon.png) 95% no-repeat; }
+
+#updated h3 { margin-bottom: 15px; }
+
+div.sidebar h4 a {
+       text-decoration: none;
+       margin: 0px;
+}
+div.sidebar p.i18n {
+       margin-top: -15px;
+}
+
+div.sidebar fieldset { 
+       margin-top: 30px;
+       border: none;
+}
+
+table#top {
+       margin: 1em auto;
+       clear: both;
+       border: 1px solid #faa;
+       background: #fee;
+       width: 95%;
+}
+
+div.book, div.chapter, div.refentry, div.sect1, div.index {
+       margin: 1em;
+}
+
+.synopsis, .classsynopsis 
+{
+       background: #eee;
+       border: solid 1px #aaa;
+       padding: 0.5em;
+}
+.programlisting 
+{
+       background: #eef;
+       border: solid 1px #aaf;
+       padding: 0.5em;
+}
+.variablelist 
+{
+       padding: 4px;
+       margin-left: 3em;
+}
+.variablelist td:first-child
+{
+       vertical-align: top;
+}
+
+.variablelist p {
+       margin: 0;
+}
+
+div.other-languages ul, div.downloads ul {
+       list-style: none;
+       padding: 0 1em;
+       margin: 0;
+}
+
+div.other-languages ul li, div.downloads ul li {
+       margin: 0;
+       padding: 0;
+}
+
+div.other-languages a, div.downloads a {
+       text-decoration: none;
+}
+
+div.other-languages a:hover, div.downloads a:hover {
+       text-decoration: underline;
+}
+
+ul.versions {
+       margin: 0;
+       padding: 0;
+       padding-left: 1em;
+}
+
+ul.versions li {
+       display: inline;
+       margin: 0 0.5ex;
+}
+
+h2.category {
+       background-position: center left;
+       background-repeat: no-repeat;
+       margin-top: 2em;
+       color: #006;
+       min-height: 32px;
+}
+
+h2.cat-accessibility-directory { padding-left: 40px; background-image: url(icons/accessibility-directory.png); }
+h2.cat-gnome-util { padding-left: 40px; background-image: url(icons/gnome-util.png); }
+h2.cat-gnome-joystick { padding-left: 40px; background-image: url(icons/gnome-joystick.png); }
+h2.cat-gnome-graphics { padding-left: 40px; background-image: url(icons/gnome-graphics.png); }
+h2.cat-gnome-globe { padding-left: 40px; background-image: url(icons/gnome-globe.png); }
+h2.cat-gnome-applications { padding-left: 40px; background-image: url(icons/gnome-applications.png); }
+h2.cat-gnome-other { padding-left: 40px; background-image: url(icons/gnome-other.png); }
+h2.cat-gnome-devel { padding-left: 40px; background-image: url(icons/gnome-devel.png); }
+h2.cat-gnome-multimedia { padding-left: 40px; background-image: url(icons/gnome-multimedia.png); }
+h2.cat-gnome-system { padding-left: 40px; background-image: url(icons/gnome-system.png); }
+h2.cat-gnome-other { padding-left: 40px; background-image: url(icons/gnome-other.png); }
+
+h2.cat-gdp-documentation { padding-left: 40px; background-image: url(icons/gdp-32.png); }
+
+h3.subsection {
+       color: #006;
+       font-style: italic;
+       margin-left: 1ex;
+}
+
+span.lang-code {
+       font-size: 70%;
+       color: #666;
+}
+
+li.active-language {
+       font-weight: bold;
+       margin-bottom: 1ex;
+}
+
+p.no-translation {
+       font-style: italic;
+       color: #888;
+       font-size: 80%;
+}
+
+p.no-translation a {
+       text-decoration: none;
+}
+
+div.subindex {
+       margin: 2em 7em 1em 4em;
+       padding-left: 110px;
+       background-position: top left;
+       background-repeat: no-repeat;
+       min-height: 96px;
+}
+
+div.subindex p {
+       color: #666;
+}
+
+div.subindex h2 {
+       padding: 0;
+       margin: 0;
+}
+
+div.subindex h2 a {
+       text-decoration: inherit;
+}
+
+div.subindex h2 a:hover {
+       text-decoration: underline;
+}
+
+h1.subindex {
+       padding-left: 110px;
+       background-position: top left;
+       background-repeat: no-repeat;
+       line-height: 96px;
+       min-height: 96px;
+}
+
+#subindex-references { background-image: url(icons/api-96.png); }
+#subindex-guides { background-image: url(icons/guides-96.png); }
+#subindex-tools { background-image: url(icons/tools-96.png); }
+#subindex-gdp { background-image: url(icons/gdp-96.png); }
+#subindex-gnome-devel { background-image: url(icons/gnome-development-96.png); }
+
+div#search {
+       position: absolute;
+       text-align: right;
+       right: 1em;
+       top: 5em;
+       font-size: 75%;
+}
+
+form#symlookup {
+       margin: 2em 1em 2em 0em;
+       text-align: right;
+}
+
+input.searchTerms {
+       border: 1px solid #888888;
+}
+
+div#search input.searchTerms {
+       margin-right: 1ex;
+}
+
+input.searchButton {
+       background: white url(search_icon.gif) no-repeat scroll 2px center;
+       color: black;
+       cursor: pointer;
+       padding: 1px 1px 1px 15px;
+       text-transform: none;
+       border: 1px solid #888888;
+}
+
+form#symlookup input.searchTerms {
+       width: 100%;
+       margin-bottom: 1ex;
+}
+
+p.other-versions {
+       font-size: 80%;
+       color: #888;
+}
+
+p.other-versions a {
+       text-decoration: none;
+}
+
+p.upcoming-deprecation {
+       padding: 0.5em 1em 0.5em 60px;
+       min-height: 48px;
+       border: solid 1px #e0e0df;
+       background-color: #fffff0;
+       background-position: 6px 0.5em;
+       background-repeat: no-repeat;
+       background-image: url(/skin/admon-warning.png);
+}
+
+p.canonical-ref {
+       padding: 0.5em 1em 0.5em 60px;
+       min-height: 48px;
+       border: solid 1px #e0e0df;
+       margin-right: 29ex;
+       background-color: #fffff0;
+       background-position: 6px 0.5em;
+       background-repeat: no-repeat;
+       background-image: url(/skin/admon-note.png);
+}
+
+ul.indextoc {
+       margin: 1em 0;
+       padding: 0 0 0 1em;
+       list-style: circle;
+}
+
+ul.indextoc ul {
+       padding: 0 0 0 1em;
+}
+
+ul.indextoc li {
+       font-weight: bold;
+}
+
+ul.indextoc li li {
+       font-weight: normal;
+}
+
+ul.indextoc > li {
+       margin-bottom: 1ex;
+}
+
+ul.indextoc a {
+       text-decoration: none;
+}
+
+div.downloads h4 {
+       min-height: 24px;
+       line-height: 24px;
+       background: transparent url(gnome-mime-application-x-archive.png) top left no-repeat;
+       padding-left: 26px;
+}
+
+div.downloads p.devhelp-note {
+       font-size: 80%;
+}
+
+div.downloads p.devhelp-note {
+       font-size: 80%;
+       color: #444;
+}
+
+span.module-more {
+       font-size: 75%;
+}
+
+dl.doc-index dt span.module-more a {
+       font-weight: normal;
+}
+
+div#footer {
+       margin: 2ex 30ex 2ex 1ex;
+       clear: both;
+       text-align: center;
+       border-top: 1px solid gray;
+       padding-top: 1.5em;
+       color: #888;
+}
+
+div#footer p {
+       margin: 0;
+       font-size: 80%;
+}
+
+div#footer a {
+       color: #3465a4;
+       text-decoration: none;
+}
+
+div#footer a:hover {
+       text-decoration: underline;
+}
+
+div.devel-remark {
+       font-style: italic;
+       color: #800;
+       margin: 1ex 0;
+}
+
+p.caution-nightly {
+       background: #eee url(caution-nightly.png) no-repeat;
+       font-weight: bold;
+       border: 1px outset black;
+       padding: 2px 2px 2px 50px;
+       text-align: center;
+       margin-bottom: 2em;
+       min-height: 50px;
+}
+
+/* code listings */
+
+.listing_code .programlisting .cbracket   { color: #a40000; } /* tango: scarlet red 3 */
+.listing_code .programlisting .comment    { color: #a1a39d; } /* tango: aluminium 4 */
+.listing_code .programlisting .function   { color: #000000; font-weight: bold; }
+.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */
+.listing_code .programlisting .keyword    { color: #4e9a06; } /* tango: chameleon 3  */
+.listing_code .programlisting .linenum    { color: #babdb6; } /* tango: aluminium 3 */
+.listing_code .programlisting .normal     { color: #000000; }
+.listing_code .programlisting .number     { color: #75507b; } /* tango: plum 2 */
+.listing_code .programlisting .preproc    { color: #204a87; } /* tango: sky blue 3  */
+.listing_code .programlisting .string     { color: #c17d11; } /* tango: chocolate 2 */
+.listing_code .programlisting .type       { color: #000000; }
+.listing_code .programlisting .type a     { color: #11326b; } /* tango: sky blue 4 */
+.listing_code .programlisting .symbol     { color: #ce5c00; } /* tango: orange 3 */
+
+.listing_frame {
+  /* tango:sky blue 1 */
+  border: solid 1px #729fcf;
+  padding: 0px;
+}
+
+.listing_lines, .listing_code {
+  margin-top: 0px;
+  margin-bottom: 0px;
+  padding: 0.5em;
+}
+.listing_lines {
+  /* tango:sky blue 0.5 */
+  background: #a6c5e3;
+  /* tango:aluminium 6 */
+  color: #2e3436;
+}
+.listing_code {
+  /* tango:sky blue 0 */
+  background: #e6f3ff;
+}
+.listing_code .programlisting {
+  /* override from previous */
+  border: none 0px;
+  padding: 0px;
+}
+.listing_lines pre, .listing_code pre {
+  margin: 0px;
+}
diff --git a/templates/resources/library_gnome_print.css b/templates/resources/library_gnome_print.css
new file mode 100644 (file)
index 0000000..47d4d1a
--- /dev/null
@@ -0,0 +1,9 @@
+ul#general,
+div#header,
+div.sidebar {
+       display: none;
+}
+
+div.body-sidebar {
+       margin-right: 0;
+}
diff --git a/templates/resources/page.js b/templates/resources/page.js
new file mode 100644 (file)
index 0000000..3d7c49c
--- /dev/null
@@ -0,0 +1,172 @@
+//<script type="text/javascript">
+/* -- IE kludge as usual! */
+if (!Array.prototype.indexOf)
+{
+  Array.prototype.indexOf = function(elt /*, from*/)
+  {
+    var len = this.length;
+
+    var from = Number(arguments[1]) || 0;
+    from = (from < 0)
+         ? Math.ceil(from)
+         : Math.floor(from);
+    if (from < 0)
+      from += len;
+
+    for (; from < len; from++)
+    {
+      if (from in this &&
+          this[from] === elt)
+        return from;
+    }
+    return -1;
+  };
+}
+
+
+
+RooDocsPage = {
+    
+    isIE: function() {
+        var ua = navigator.userAgent.toLowerCase();
+        return ua.indexOf("msie") > -1;
+        
+    },
+    
+    
+    onload : function()
+    {
+        //console.log("loading");
+        
+        this.addEvent(document,'click', function(e) {
+            var ev = e || window.event;
+            var t = ev.target || ev.srcElement;
+            //console.log(t);
+            return RooDocsPage.clicked(t);
+            
+        });
+        
+        
+        
+    },
+    addEvent: function(el, eventName, fn)
+    {
+        
+        if (window.addEventListener) {
+            capture = false;
+            el.addEventListener(eventName, fn, (capture));
+            return;
+        } 
+        if (window.attachEvent) {
+            el.attachEvent("on" + eventName, fn);
+            return;
+         
+        }
+    },
+    clicked : function(t)
+    {
+        
+        
+        var classAr = t.className.split(' ');
+        //console.log(classAr)
+        if ((t.nodeName == 'a') && (classAr.indexOf('exi') < 0) && (classAr.indexOf('micon') < 0)) {
+            // link clicked...
+            return false;
+           
+        }
+            
+           
+        
+        
+        if (classAr.indexOf('exi') > -1 || classAr.indexOf('micon') > -1) {
+            
+            var tr = t;
+            //console.log(tr.parentNode);
+            while (tr.parentNode) {
+                ///console.log(tr.nodeName);
+                if (tr.nodeName.toUpperCase() =='TR') {
+                    break;
+                }
+                tr = tr.parentNode;
+            }
+            if (tr.nodeName.toUpperCase() != 'TR') { // no tr!
+                return false;
+            }
+            //console.log(tr.className)
+            if (tr.className.match(/expandable/)) {
+                
+                if (!/expanded/.test(tr.className)) {
+                    
+                    tr.className += " expanded";
+                    
+                    //this.loadComments(tr);
+                    
+                  //  console.log("ADDED:"+ tr.className);
+                } else {
+                    tr.className = tr.className.replace(/ expanded/,'');
+                    //console.log("REMOVED:"+ tr.className);
+                }
+            }
+            return true;
+            
+            
+            
+        }
+        return false;
+    },
+    
+    getAttributeNS : function(d,ns,name) {
+        if (this.isIE()) {
+            // ie uses attribute stuff...
+            var type = typeof d[ns+":"+name];
+            if(type != 'undefined' && type != 'unknown'){
+                return d[ns+":"+name];
+            }
+            return d[name];
+            
+        } 
+        return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name];
+    }
+    
+}
+
+
+ /*
+this.preview.getEl().on('click', function(e, target)
+        {
+            //console.log("click pressed?");
+            
+            if(target = e.getTarget('a:not(.exi)', 3)) {
+                var cls = Ext.fly(target).getAttributeNS('roo', 'cls');
+                e.stopEvent();
+                if(cls){
+                    var member = Ext.fly(target).getAttributeNS('roo', 'member');
+                    //this.loadClass(target.href, cls, member);
+                    
+                    if (/^src\//.test(cls)) {
+                        cls = cls.replace(/.js$/, ''); // get rid of .js for source links..
+                    }
+                    
+                    
+                    MainBody.loadPage("symbols/"+ cls +".html");
+                    return;
+                }
+                if(target.className == 'inner-link'){ // go to #
+                    this.getActiveTab().scrollToSection(target.href.split('#')[1]);
+                    return;
+                }
+                window.open(target.href);
+                
+                return; // no more...
+            }
+            if(target = e.getTarget('.micon', 2)){
+                
+                e.stopEvent();
+                var tr = Ext.fly(target.parentNode);
+                if(tr.hasClass('expandable')){
+                    tr.toggleClass('expanded');
+                }
+            }
+          
+        });
+*/
\ No newline at end of file
diff --git a/templates/seed/class.html b/templates/seed/class.html
new file mode 100644 (file)
index 0000000..3b729a3
--- /dev/null
@@ -0,0 +1,750 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:roo="http://www.akbkhome.com/roojs1/" xml:lang="en" lang="en">
+       <head>
+               <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+               <meta name="generator" content="JsDoc Toolkit" />
+               {! Link.base = "../"; /* all generated links will be relative to this */ !}
+               
+               <title>JsDoc Reference - {+data.name+}</title>
+               
+        <script type="text/javascript" src="page.js"></script>
+               
+        <link rel="stylesheet" type="text/css" href="default.css" />
+        <link rel="stylesheet" type="text/css" href="library_gnome.css"></link>
+        <link media="print" rel="stylesheet" type="text/css" href="library_gnome_print.css"></link>
+       </head>
+
+       <body onload="RooDocsPage.onload();">
+       
+       <div id="page">
+        
+        <div id="header">
+            <div id="header-wrap">
+                <h1>
+                    Un-official Seed Documentation<!-- GNOME Documentation Library-->
+                </h1>
+        
+            </div>
+        </div>
+       
+       
+       
+       
+       
+       
+       
+       
+       
+        
+        <div class="left-class-list"  style="width:18%;float:left;"> 
+            <a href="index.html"> Back to Seed Clases </a>
+            <br/><br/> 
+            {+data.left_bar+}
+        </div>
+         
+ <div class="body-wrap" style="width:78%;float:left;">
+
+    <!-- ============================== links to methods. ================================= -->        
+
+    <div class="top-tools">
+    <!--
+        <a class="inner-link" href="#{+data.name+}-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
+        <a class="inner-link" href="#{+data.name+}-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
+        <a class="inner-link" href="#{+data.name+}-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
+        <a class="inner-link" href="#{+data.name+}-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
+        <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
+       -->
+    </div>
+
+
+    
+    
+    
+<!-- ============================== inheritance Block. ================================= -->   
+       <if test="data.extendsClasses.length">
+               <div class="inheritance res-block">
+                  <p class="res-block-inner">{!
+                               var iblock_indent = 0;
+                               
+                                       
+                                data.extendsClasses.reverse().map(
+                                       function($) {  
+                                               
+                                               output += (iblock_indent ? '<img src="elbow-end.gif" class="elbow elbow_indent' +
+                            + iblock_indent + '" alt="parent-child marker"/>' : '');
+                                               output += new Link().toSymbolLong($.alias);
+                                               output += "\n<br/>";
+                                               iblock_indent += 1;
+                        
+                                       }
+                               )
+                               
+                       !}<img class="elbow elbow_indent{+iblock_indent+}" src="elbow-end.gif" alt="parent-child marker"/>
+                {+data.alias+}
+
+                  </p>
+               </div>
+       </if>
+       
+       {+makeImage(data.alias)+}
+       
+       
+<!-- ============================== class title / details ============================ -->
+    
+   
+    <h1 class="classTitle">
+                                
+                               
+        {+data.titleType+} {+data.alias+}
+                       </h1>
+                       
+    <table cellspacing="0" class="class-summary-table">
+    
+<if test="data.ns">
+        <tr>
+            <td class="label">Import line:</td>
+            <td class="hd-info">{+data.ns+} = imports.gi.{+data.ns+}; </td>
+       </tr>
+</if>
+     <tr>
+            <td class="label">GIR File:</td>
+            <td class="hd-info"><a href="{+data.gir_filename+}">{+data.gir_filename+}</a></td>
+        </tr>
+        <tr>
+            <td class="label">C documentation:</td>
+            <td class="hd-info">{+new Link().toGnome(data.alias)+}</td>
+        </tr>
+        <tr>
+            <td class="label">{+data.titleType+} :</td>
+            <td class="hd-info">{+data.name+}</td>
+        </tr>
+       
+<if test="data.implementInterfaces && data.implementInterfaces.length">
+
+        <tr>
+            <td class="label">Implements:</td>
+            <td class="hd-info">
+               {+
+                       data.implementInterfaces.map(
+                               function($) { return new Link().toSymbolLong($.alias); }
+                       ).join(", ")
+               +}
+            </td>
+        </tr>
+
+</if>
+<if test="data.implementedBy && data.implementedBy.length">
+        <tr>
+            <td class="label">Implementations:</td>
+            <td class="hd-info">
+               {+
+                       data.implementedBy
+                       .sort()
+                       .map(
+                               function($) { return new Link().toSymbolLong($); }
+                       ).join(", ")
+               +}
+            </td>
+        </tr>
+
+
+</if>
+<if test="data.childClasses.length">
+        <tr>
+            <td class="label">Subclasses:</td>
+            <td class="hd-info">
+               {+
+                       data.childClasses
+                       .sort()
+                       .map(
+                               function($) { return new Link().toSymbolLong($); }
+                       ).join(", ")
+               +}
+
+       
+       
+            </td>
+        </tr>
+</if>
+
+       <if test="data.extendsClasses.length">
+       
+               <tr><td class="label">Extends:</td><td class="hd-info">
+                       {+
+                               new Link().toSymbolLong(data.extendsClasses[data.extendsClasses.length -1].alias)
+                               
+                       +}
+       
+               </td></tr>    
+       </if>
+       
+    </table>
+
+    
+<!-- ============================== class summary ========================== -->                       
+    <div class="description">
+       {+resolveLinks(data.desc)+}
+    </div>
+
+       
+<!-- ============================== Class comment block... ========================== -->                                      
+<!-- 
+<div class="comments">
+       <b>Class Comments / Notes</B> =>  
+       <u onclick="parent.CommentDialog.showCommentId = '{+data.name+}';">[Add Your comment/notes about this class]</u>
+       <br/>
+       <iframe frameborder="0"  id="comments-{+data.name+}" style="border: none;width:100%;" 
+               src="http://www.akbkhome.com/blog.php/SeedComments/{+data.ns+}.{+data.name+}.html"></iframe>
+</div>
+-->    
+       
+<!-- ============================== enum values ========================== -->                                         
+                
+    
+       {!
+       
+        
+        
+       
+               cfgProperties = data.values ? data.values.sort(makeSortby("name")) : [];
+               
+       
+               
+               
+       !}
+               
+    <div class="hr"></div>
+    <a id="{+data.alias+}-values"></a>
+               
+    <if test="!cfgProperties.length">
+    
+     
+    </if>
+     
+    <if test="cfgProperties.length">
+       
+      <table cellspacing="0" class="member-table">   
+      <caption>Values </caption>
+    
+       
+        <tr>
+            <th class="sig-header" colspan="2">Properties</th>
+           
+        </tr>
+       
+       
+       
+       <for each="dtag" in="cfgProperties">
+       
+               <tr class="config-row expandable config-row-alt{+$dtag_i % 2+}{+ ((dtag.memberOf == data.alias) ?   " notInherited" : "") +}">
+                  <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+                   <td class="sig">
+
+                       <a id="{+dtag.memberOf+}-cfg-{+dtag.name+}" name=".{+dtag.name+}"></a>
+                       <div class="fixedFont">
+               {+(new Link().toSymbolLong(dtag.type))+} {+data.alias+}.<b  class="itemname">{+dtag.name+}</b> : {+dtag.value+}
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">{+resolveLinks(summarize(dtag.desc))+}</div> 
+                       </div>
+                       
+                       <div class="mdesc">
+                           <div class="long">{+resolveLinks(dtag.desc)+}</div> 
+                       </div>
+                       
+                       
+
+                   </td>
+                  
+               </tr>
+        </for>
+        
+    </table>
+  </if>                
+  
+  
+  
+  
+               
+<!-- ============================== config options ========================== -->                                              
+                
+    
+       {!
+       
+        
+        
+       
+               cfgProperties = data.properties.sort(makeSortby("name"));
+               
+       
+               
+               
+       !}
+               
+    <div class="hr"></div>
+    <a id="{+data.alias+}-configs"></a>
+               
+    <if test="!cfgProperties.length">
+    
+     <table cellspacing="0" class="member-table">
+      <caption class="Empty">Properties</caption>
+      <tr><td>None</td></tr>
+     </table>
+    
+    </if>
+     
+    <if test="cfgProperties.length">
+       
+      <table cellspacing="0" class="member-table">   
+      <caption>Properties </caption>
+    
+       
+        <tr>
+            <th class="sig-header" colspan="2">Properties</th>
+           
+            <th class="msource-header">Defined By</th>
+        </tr>
+       
+       
+       
+       <for each="dtag" in="cfgProperties">
+       
+               <tr class="config-row expandable config-row-alt{+$dtag_i % 2+}{+ ((dtag.memberOf == data.alias) ?   " notInherited" : "") +}">
+                  <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+                   <td class="sig">
+
+                       <a id="{+dtag.memberOf+}-cfg-{+dtag.name+}" name=".{+dtag.name+}"></a>
+                       <div class="fixedFont">
+                               <b  class="itemname">{+dtag.name+}</b> : {+((dtag.type) ? (new Link().toSymbolLong(dtag.type)) : "" )+} 
+                 {+ (dtag.flags ? (dtag.flags & 2 ? '' : 'read only') : '')+}  
+                     
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">{+resolveLinks(summarize(dtag.desc))+}</div> 
+                       </div>
+                       
+                       <div class="mdesc">
+                           <div class="long">{+resolveLinks(dtag.desc)+}</div> 
+                       </div>
+                       
+                       
+
+                   </td>
+                   <td class="msource">
+                       {# - fixme - add inheritied as link here #}
+                       {+ (dtag.memberOf == data.alias) ? dtag.memberOf :  new Link().toSymbolLong(dtag.memberOf) +}
+                               
+                   </td>
+               </tr>
+        </for>
+        
+    </table>
+  </if>                
+  
+  
+  
+  
+  
+  
+   
+  <!-- ============================== methods summary / details ======================== -->
+  
+  
+  <a id="{+data.alias+}-methods"></a>
+       <!-- constructor?? -->
+       {! 
+               
+        
+               
+               var ownMethods = [];
+               ownMethods.push.apply(ownMethods, data.constructors.sort(makeSortby("name")));
+               ownMethods.push.apply(ownMethods, data.functions.sort(makeSortby("name")));
+               ownMethods.push.apply(ownMethods, data.methods.sort(makeSortby("name")));
+               
+       !}
+    <!-- constructors, then statics, then dynamics -->
+  
+  
+    <if test="!ownMethods.length">
+    
+     <table cellspacing="0" class="member-table">
+      <caption class="Empty">Public Methods</caption>
+      <tr><td>None</td></tr>
+     </table>
+    
+    </if>
+    <if test="ownMethods.length">
+    
+      <table cellspacing="0" class="member-table">
+      <caption>Methods / Constructors</caption>
+        <tr>
+            <th class="sig-header" colspan="2">Method / Constructor</th>            
+            <th class="msource-header">Defined By</th>
+
+        </tr>
+        
+       
+       
+        
+       
+        <for each="member" in="ownMethods">
+         
+          <tr class="method-row config-row-alt{+$member_i % 2+}{!
+                 if (member.isConstructor && (!member.params || !member.params.length)) {
+                         output += '';
+                } else {
+                         output += ' expandable';
+                       }
+                 
+                 
+               if (member.memberOf == data.alias) {
+                       output += " notInherited";
+                }
+                 
+                !}">
+            <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+          
+          
+            <td class="sig">
+                <a id="{+member.memberOf+}-method-{+member.name+}"   name=".{+member.name+}"></a>
+               <div class="fixedFont">
+                       <span class="attributes">{!
+                                       if (member.isConstructor) {
+                                               output +=  "new  <B>" + 
+                                                    member.memberOf + (!member.name || !member.name.length ? "" : ".") +"</B>";
+                                       } else {
+                                                
+                                               if (member.isStatic) {
+                                                       output +=  data.alias + ".";
+                                               }
+                                       }
+                               !}</span><b class="itemname">{!  
+                                        output += (!member.name || !member.name.length  ? "" : member.name);
+                               !}</b>
+                               
+                                {+makeSignature(member.params)+} 
+                       
+                               <if test="(member.returns && member.returns.length) || !member.isConstructor">
+                                        : 
+                                       {! 
+                                          if (member.returns.length > 1) {
+                                                  output += (new Link().toSymbol("Object"));
+                                          } else {
+                                                  output += (new Link().toSymbolLong(member.returns[0].type));
+                                          }
+                                         
+                                        !}
+                                       
+                               </if>
+                       
+               </div>
+                <div class="mdesc">
+               <if test="!member.isConstructor">
+                   <div class="short">{+resolveLinks(summarize(member.desc))+}</div> 
+                </if>
+                <if test="member.isConstructor">
+                       <div class="short">Create a new {+data.alias +}</div> 
+                </if>
+                
+                    <div class="long">
+                       <if test="!member.isConstructor">
+                               {+resolveLinks(member.desc)+}
+                   
+                               <if test="member.example">
+                                       <pre class="code">{+member.example+}</pre>
+                               </if>
+                       </if>
+                       
+                       <if test="member.isConstructor">
+                               Create a new {+data.alias +}
+                       </if>
+                       <if test="member.params && member.params.length">
+                               <dl class="detailList">
+                               <dt class="heading">Parameters:</dt>
+                               <for each="item" in="member.params">
+                                       <dt>
+                    
+                       <if test="typeof(item.type) == 'object'">
+                            <span class="fixedFont">{+(new Link().toSymbolLong('Function'))+}</span>
+                            {+makeSignature(item.type.params)+} 
+                            
+                        
+                               {! 
+                                   if (member.returns && member.returns.length) {
+                                       output += ' : ' + (new Link().toSymbolLong(member.returns[0].type)) + ' ';
+                                   } else {
+                                       output += ' :  none ';
+                                   }
+                                  
+                                 !}
+                                 
+                        </if>
+                        <if test="typeof(item.type) != 'object'">
+                            {+((item.type)?"<span class=\"fixedFont\">"+(new Link().toSymbolLong(item.type))+"</span> " : "")+} <b>{+item.name+}</b>
+                        </if>
+                    
+                        <if test="item.isOptional">
+                            <i>Optional
+                            <if test="item.defaultValue">, 
+                                Default: {+item.defaultValue+}
+                            </if>
+                            </i>
+                        </if>
+                        <if test="!item.be_null">
+                            <span style="color:red;">
+                               Required (not null)
+                            </span>
+                        </if>
+                        
+                                               
+                                               
+                                               
+                                       </dt>
+                                       <dd>
+                                               {+resolveLinks(item.desc)+}
+                                               
+                                               
+                                               <if test="item.properties && item.properties.length">
+                                                    <dl class="detailList">
+                                                       <for each="returnitem" in="item.properties">
+                                                            <dt>
+                                                               {+((returnitem.type)?"<span class=\"fixedFont\">"+(new Link().toSymbolLong(returnitem.type))+"</span> " : "")+} <b>{+returnitem.name+}</b>
+                                                             </dt>
+                                                             <dd>
+                                                             {+resolveLinks(returnitem.desc)+}
+                                                               </dd>
+                                                       
+                                                       </for>
+                                                     </dl>
+                                               
+                                               </if>
+                                       
+                                        
+                                       
+                                       
+                                       
+                                       </dd>
+                                       
+                                       
+                                       
+                               </for>
+                               </dl>
+                       </if>
+                       <if test="member.deprecated">
+                               <dl class="detailList">
+                               <dt class="heading">Deprecated:</dt>
+                               <dt>
+                                       {+member.deprecated+}
+                               </dt>
+                               </dl>
+                       </if>
+                        
+                       <if test="member.exceptions && member.exceptions.length">
+                               <dl class="detailList">
+                               <dt class="heading">Throws:</dt>
+                               <for each="item" in="member.exceptions">
+                                       <dt>
+                                               {+((item.type)?"<span class=\"fixedFont\">{"+(new Link().toSymbolLong(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
+                                       </dt>
+                                       <dd>{+resolveLinks(item.desc)+}</dd>
+                               </for>
+                               </dl>
+                       </if>
+                       <if test="member.returns && member.returns.length">
+                               <dl class="detailList">
+                               <dt class="heading">Returns:</dt>
+                               
+                               <if test="member.returns > 1">
+                                       <dl>An Object with these properties</dl>
+                               </if>
+                               
+                               <for each="item" in="member.returns">
+                                       <dd>{! 
+                                               if (member.returns.length > 1) {
+                                                       output += item.name+ ': ';
+                                               }
+                                               !}
+                                        {+((item.type)?"<span class=\"fixedFont\">"+(new Link().toSymbolLong(item.type))+"</span> " : "")+} 
+                                           {+resolveLinks(item.desc)+}</dd>
+                               </for>
+                               </dl>
+                       </if>
+                        
+                   
+                    
+                    </div>                    
+                </div>
+
+            </td>
+            <td class="msource">
+               <if test="!member.isConstructor">
+                       {+ (member.memberOf == data.alias) ? member.memberOf :  new Link().toSymbolLong(member.memberOf) +}
+               </if>&nbsp;
+            </td>
+        </tr>
+       </for>
+                                                      
+    </table>
+</if>
+  
+  <!-- ============================== events summary / details ======================== -->
+  
+  
+  <a id="{+data.alias+}-events"></a>
+    
+  
+       {! 
+               
+               
+               var ownEvents = data.signals.sort(makeSortby("name"));
+                
+       !}
+   <if test="!ownEvents.length">
+    
+     <table cellspacing="0" class="member-table">
+      <caption class="Empty">Events</caption>
+      <tr><td>None</td></tr>
+     </table>
+    
+    </if>
+  
+    
+    <if test="ownEvents.length">
+    
+      <table cellspacing="0" class="member-table">
+               <caption>Events - usage syntax:  this.signals.EVENTNAME.connect( {+(new Link().toSymbolLong('Function' ))+} ) </caption>
+             <thead>
+               <tr>
+                   <th class="sig-header" colspan="2">Event</th>            
+                   <th class="msource-header">Defined By</th>
+
+               </tr>
+             </thead>  
+       
+       
+        
+       
+        <for each="member" in="ownEvents">
+          <tr class="method-row expandable config-row-alt{+$member_i % 2+}{!
+
+               if (member.memberOf == data.alias) {
+                       output += " notInherited";
+                }
+                 
+                 
+                 
+                 
+                 
+                 
+                !}">
+            <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
+           
+            <td class="sig">
+                <a id="{+member.memberOf+}-event-{+member.name+}"></a>
+                
+              <div class="fixedFont">
+               <b class="itemname">{+member.name+}</b> {+makeSignature(member.params)+} 
+                : 
+                                       {! 
+                                          if (member.returns && member.returns.length) {
+                                                  output += (new Link().toSymbolLong(member.returns[0].type));
+                                          } else {
+                                                  output += 'none';
+                                          }
+                                         
+                                        !}
+                                       
+        
+        
+               </div>
+
+                <div class="mdesc">
+
+                   <div class="short">{+resolveLinks(summarize(member.desc))+}
+                  
+               </div> 
+                   
+                    <div class="long">
+                   
+                       {+resolveLinks(member.desc)+}
+                   
+                        
+                       <if test="member.params && member.params.length">
+                               <dl class="detailList">
+                               <dt class="heading">Parameters:</dt>
+                               <for each="item" in="member.params">
+                                       <dt>
+                                               {+((item.type)?"<span class=\"fixedFont\">"+(new Link().toSymbolLong(item.type))+"</span> " : "")+}<b>{+item.name+}</b>
+                                               <if test="item.isOptional"><i>Optional
+                                                       <if test="item.defaultValue">, 
+                                                       Default: {+item.defaultValue+}
+                                               </if></i></if>
+                                       </dt>
+                                       <dd>{+resolveLinks(item.desc)+}</dd>
+                               </for>
+                               </dl>
+                       </if>
+                        
+                       <if test="member.exceptions.length">
+                               <dl class="detailList">
+                               <dt class="heading">Throws:</dt>
+                               <for each="item" in="member.exceptions">
+                                       <dt>
+                                               {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbolLong(item.type))+"}</span> " : "")+} <b>{+item.name+}</b>
+                                       </dt>
+                                       <dd>{+resolveLinks(item.desc)+}</dd>
+                               </for>  
+                               </dl>
+                       </if>
+                       <if test="member.returns && member.returns.length">
+                               <dl class="detailList">
+                               <dt class="heading">Returns:</dt>
+                               <for each="item" in="member.returns">
+                                       <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbolLong(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd>
+                               </for>
+                               </dl>
+                       </if>
+                        
+                   
+                   
+                    
+                    </div>                    
+                </div>
+
+            </td>
+            <td class="msource">
+                {+ (member.memberOf == data.alias) ? member.memberOf :  new Link().toSymbolLong(member.memberOf) +}
+            </td>
+        </tr>
+       </for>
+                                                      
+    </table>
+</if>
+  
+  <a id="{+data.alias+}-references"></a> 
+  <!--references-->
+</div>
+</div>
+  
+<!-- ============================== footer ================================= -->
+               <div class="fineprint" style="clear:both">
+                       <if test="data.copyright">&copy;{+data.copyright+}<br /></if>
+                       Documentation generated by 
+            <a href="http://git.gnome.org/browse/introspection-doc-generator">Introspection Doc Generator</a> 
+                       Loosely Based on 
+                       <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> on {+new Date()+}
+               </div>
+       </body>
+</html>
\ No newline at end of file
diff --git a/templates/seed/class_ix.html b/templates/seed/class_ix.html
new file mode 100644 (file)
index 0000000..96602b1
--- /dev/null
@@ -0,0 +1,49 @@
+<h2 class="classTitle">{+ (new Link().toSymbol(data.name)) +}</h2>
+<br/>
+
+<h3>Classes</h3>
+
+<if test="data.objects.length > 0">
+  <ul>
+         <for each="c" in="data.objects">
+                 <li>  {+ (new Link().toSymbol(data.name + '.' + c)) +} </li>
+         </for>
+  </ul>
+</if>
+
+<h3>Interfaces</h3>
+<if test="data.interfaces.length > 0">
+  <ul>
+    <for each="c" in="data.interfaces">
+      <li>  {+ (new Link().toSymbol(data.name + '.' + c)) +} </li>
+    </for>
+  </ul>
+</if>
+
+<h3>Structs</h3>
+<if test="data.structs.length > 0">
+  <ul>
+    <for each="c" in="data.structs">
+      <li>  {+ (new Link().toSymbol(data.name + '.' + c)) +} </li>
+    </for>
+  </ul>
+</if>
+
+<h3>Unions</h3>
+<if test="data.unions.length > 0">
+  <ul>
+         <for each="c" in="data.unions">
+                 <li>  {+ (new Link().toSymbol(data.name + '.' + c)) +} </li>
+         </for>
+  </ul>
+</if>
+
+<h3>Enums</h3>
+<if test="data.enums.length > 0">
+  <ul>
+         <for each="c" in="data.enums">
+                 <li>  {+ (new Link().toSymbol(data.name + '.' + c)) +} </li>
+         </for>
+
+  </ul>
+</if>
\ No newline at end of file
diff --git a/templates/seed/index.html b/templates/seed/index.html
new file mode 100644 (file)
index 0000000..0accbb3
--- /dev/null
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
+ <head> 
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
+  <title>Seed Documentation</title> 
+  <link rel="stylesheet" type="text/css" href="default.css" /> 
+  <link rel="stylesheet" type="text/css" href="library_gnome.css"></link> 
+  <link media="print" rel="stylesheet" type="text/css" href="library_gnome_print.css"></link> 
+ </head> 
+ <body> 
+     
+    <div id="page"> 
+        <div id="header"> 
+            <div id="header-wrap"> 
+                <h1>Un-official Seed Documentation</h1> 
+            </div> 
+        </div> 
+        <div class="body-wrap"> 
+                
+            <div class="ns-list"> 
+                <h2>GObject Libraries</h2> 
+                <for each="thisClass" in="data"> 
+                    {!
+                    if (!thisClass.objects) { continue; }
+                    !}
+                    <div> 
+                        <h2 class="classTitle">{+ (new Link().toSymbol(thisClass.name)) +}</h2> 
+                    </div> 
+                </for> 
+            </div> 
+            
+            <div class="ns-list"> 
+     
+                <h2>Non - GObject Libraries</h2> 
+                <for each="thisClass" in="data"> 
+                    {!
+                    if (thisClass.objects) { continue; }
+                    !}
+                    <div> 
+                        <h2 class="classTitle">{+ (new Link().toSymbol(thisClass.name)) +}</h2> 
+                    </div> 
+                </for> 
+            </div> 
+     
+        </div> 
+    </div> 
+</body> 
+</html> 
+       
\ No newline at end of file
diff --git a/templates/seed/references.html b/templates/seed/references.html
new file mode 100644 (file)
index 0000000..bd1d2c7
--- /dev/null
@@ -0,0 +1,146 @@
+  
+   
+  <!-- ============================== methods summary / details ======================== -->
+  
+  
+  <! --  -->
+       <!-- constructor?? -->
+       {! 
+               
+        
+               var ownMethods = data.sort(makeSortby("memberOf"));
+               //var ownMethods = [];
+               //ownMethods.push.apply(ownMethods, data.sort(makeSortby("alias")));
+        //ownMethods.push.apply(ownMethods, data);
+               
+               
+       !}
+        
+        
+       <!-- then dynamics first -->
+  
+  
+    <if test="!ownMethods.length">
+    
+     <table cellspacing="0" class="member-table">
+      <caption class="Empty">Used by These Methods / Signals / Properties- Nowhere other than here</caption>
+     </table>
+    
+    </if>
+    <if test="ownMethods.length">
+    
+    
+    
+    
+      <table cellspacing="0" class="member-table">
+      <caption>Used by These Methods / Signals / Properties</caption>
+        <tr>
+                    <th class="msource-header">Class / Namespace</th>
+            <th class="sig-header">Method / Signal / Properties</th>            
+
+
+        </tr>
+               
+       
+        <for each="member" in="ownMethods">
+         
+          <tr class="method-row config-row-alt{+$member_i % 2+}">
+         
+             <td class="msource">
+               
+                       {+  new Link().toSymbolLong(member.memberOf) +}
+            <br/>
+            {+ member.propertyType +}
+            <!--<div class="mdesc">
+                <div class="short">
+                 
+                </div>
+            </div> -->
+               
+            </td>
+
+            
+            
+<if test="member.propertyType != 'Property'">
+ <!-- signal or method -->
+          
+            <td class="sig">
+                <a id="{+member.memberOf+}-method-{+member.name+}"   name=".{+member.name+}"></a>
+               <div class="fixedFont">
+                       <span class="attributes">{!
+                                       if (member.isConstructor) {
+                                               output +=  "new  <B>" + 
+                                                    member.memberOf + (!member.name || !member.name.length ? "" : ".") +"</B>";
+                                       } else {
+                                                
+                                               if (member.isStatic) {
+                                                       output +=  member.memberOf + ".";
+                                               }
+                                       }
+                               !}</span><b class="itemname">{!  
+                                        output += (!member.name || !member.name.length  ? "" : member.name);
+                               !}</b>
+                               
+                                {+makeSignature(member.params)+} 
+                       
+                               <if test="(member.returns && member.returns.length) || !member.isConstructor">
+                                        : 
+                                       {! 
+                                          if (member.returns.length > 1) {
+                                                  output += (new Link().toSymbol("Object"));
+                                          } else {
+                                                  output += (new Link().toSymbolLong(member.returns[0].type));
+                                          }
+                                         
+                                        !}
+                                       
+                               </if>
+                       
+               </div>
+                <div class="mdesc">
+               <if test="!member.isConstructor">
+                   <div class="short">{+resolveLinks(summarize(member.desc))+}</div> 
+                </if>
+                <if test="member.isConstructor">
+                       <div class="short">Create a new {+member.memberOf +}</div> 
+                </if>
+                
+                 
+                    
+              
+            </td>
+</if>
+<!-- property -->
+
+<if test="member.propertyType == 'Property'">
+ <!-- signal or method -->
+  <td class="sig">
+
+                       <a id="{+member.memberOf+}-cfg-{+member.name+}" name=".{+member.name+}"></a>
+                       <div class="fixedFont">
+                               <b  class="itemname">{+member.name+}</b> : {+((member.type) ? (new Link().toSymbolLong(member.type)) : "" )+} 
+                 {+ (member.flags ? (member.flags & 2 ? '' : 'read only') : '')+}  
+                     
+                       </div>
+                 
+                       <div class="mdesc">
+                           <div class="short">{+resolveLinks(summarize(member.desc))+}</div> 
+                       </div>
+                        
+                       
+
+                   </td>
+</if>
+
+
+            
+        
+        </tr>
+       </for>
+                                                      
+    </table>
+</if>
+   
\ No newline at end of file