Initial add of XUL/JS XPCOM component viewer.  Unix makefiles only.
to build on unix:
cd mozilla/extensions
make makefiles DIRS=cview
(ignore errors)
cd cview
make
start mozilla, you should have a "Component Viewer" in tasks->tools
This commit is contained in:
rginda%netscape.com 2000-05-24 04:58:18 +00:00
Родитель ead8cbec21
Коммит 555d6fcc77
16 изменённых файлов: 1957 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,36 @@
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Robert Ginda, rginda@nestcape.com, original author
#
#
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = resources
INSTALLROOT = $(DIST)/bin/chrome/packages/cview/cview
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,41 @@
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Robert Ginda, rginda@nestcape.com, original author
#
#
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = content locale skin
CHROME_DIR = packages/cview
CHROME_MISC_DIR = .
CHROME_TYPE = content locale skin
CHROME_MISC = \
manifest.rdf \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,44 @@
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Robert Ginda, rginda@nestcape.com, original author
#
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
CHROME_DIR=packages/cview
CHROME_CONTENT_DIR=cview/content
CHROME_CONTENT = \
cviewOverlay.xul \
cviewOverlay.js \
cview.xul \
cview-utils.js \
cview-handlers.js \
cview-static.js \
cview-rdf.js \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,201 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Robert Ginda, rginda@nestcape.com, original author
*/
/*
* This file contains event handlers for cview. The main code of cview is
* divided between this file and cview-static.js
*/
function onLoad()
{
/* see cview-rdf.js for the definition of RDFHelper */
cview.rdf = new RDFHelper();
cview.rdf.initTree ("component-list");
cview.rdf.initTree ("interface-list");
cview.rdf.setTreeRoot ("component-list", cview.rdf.resRoot);
cview.rdf.setTreeRoot ("interface-list", cview.rdf.resRoot);
onSortCol ("componentcol-progid");
onSortCol ("interfacecol-iname");
refreshComponents();
refreshInterfaces();
refreshLabels();
}
function onUnload()
{
/* nothing important to do onUnload yet */
}
function onSortCol(sortColName)
{
/* sort the <tree> widget on the column name |sortColName|. This code
* was basically ripped off some mozilla code that I can't recall at the
* moment.
*/
const nsIXULSortService = Components.interfaces.nsIXULSortService;
const isupports_uri = "component://netscape/rdf/xul-sort-service";
var node = document.getElementById(sortColName);
// determine column resource to sort on
var sortResource =
node.getAttribute("rdf:resource");
if (!node)
return false;
var sortDirection = "ascending";
//node.setAttribute("sortActive", "true");
switch (sortColName)
{
case "componentcol-progid":
document.getElementById("componentcol-clsid")
.setAttribute("sortDirection", "natural");
break;
case "componentcol-clsid":
document.getElementById("componentcol-progid")
.setAttribute("sortDirection", "natural");
break;
case "interfacecol-iname":
document.getElementById("interfacecol-iid")
.setAttribute("sortDirection", "natural");
break;
case "interfacecol-iid":
document.getElementById("interfacecol-iname")
.setAttribute("sortDirection", "natural");
break;
}
var currentDirection = node.getAttribute('sortDirection');
if (currentDirection == "ascending")
sortDirection = "descending";
else if (currentDirection == "descending")
sortDirection = "natural";
else
sortDirection = "ascending";
node.setAttribute ("sortDirection", sortDirection);
var xulSortService =
Components.classes[isupports_uri].getService(nsIXULSortService);
if (!xulSortService)
return false;
try
{
xulSortService.Sort(node, sortResource, sortDirection);
}
catch(ex)
{
//dd("Exception calling xulSortService.Sort()");
}
}
function onComponentClick(e)
{
cview.lastProgID = e.target.parentNode.getAttribute("progid");
if (cview.interfaceMode == "implemented-by")
{
cview.interfaceFilter = cview.lastProgID;
filterInterfaces();
}
}
function onInterfaceClick(e)
{
cview.lastIID = e.target.parentNode.getAttribute("iid");
refreshLabels();
}
function onLXRIFCLookup (e, type)
{
var treerow = document.popupNode.parentNode;
var iname = treerow.getAttribute("iname");
if (!iname)
{
dd ("** NO INAME attribute in onLXRIFCLookup **");
return;
}
/* Specifing "_content" as the second parameter to window.open places
* the url in the most recently open browser window
*/
window.open ("http://lxr.mozilla.org/mozilla/" + type + iname,
"_content", "");
}
function onChangeDisplayMode (e)
{
var id = e.target.getAttribute("id");
var ary = id.match (/menu-(cmp|ifc)-show-(.*)/);
if (!ary)
{
dd ("** UNKNOWN ID '" + id + "' in onChangeDisplayMode **");
return;
}
var typeDesc = (ary[1] == "cmp") ? "Components" : "Interfaces";
var filter = "";
if (ary[2] == "contains")
{
filter = window.prompt ("Show only " + typeDesc + " containing...");
if (!filter)
return;
filter = new RegExp(filter, "i");
}
if (ary[2] == "starts-with")
{
filter = window.prompt ("Show only " + typeDesc + " starting with...");
if (!filter)
return;
filter = new RegExp(filter, "i");
}
if (ary[2] == "implemented-by")
filter = cview.lastProgID;
if (ary[1] == "cmp")
{
cview.componentMode = ary[2];
cview.componentFilter = filter;
filterComponents();
}
else
{
cview.interfaceMode = ary[2];
cview.interfaceFilter = filter;
filterInterfaces();
}
}

Просмотреть файл

@ -0,0 +1,223 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Chatzilla
*
* The Initial Developer of the Original Code is New Dimensions Consulting,
* Inc. Portions created by New Dimensions Consulting, Inc. are
* Copyright (C) 1999 New Dimenstions Consulting, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Robert Ginda, rginda@ndcico.com, original author
*/
/*
* This file is largely a ripoff of the chatzilla rdf.js file. It could (and
* probably should) be refactored into a more reusable library, and placed in
* some global place (like utils.js)
*/
/*
* The RDFHelper class wraps useful the RDFService and in-memory-datasource
* into a single object making them generally easier to use, and defines
* some RDF resources and literals that will be used throughout the app.
* it also makes it wasy to debug RDF asserts, (by forwarding
* RDFHelper.prototype.Assert() to RDFHelper.prototype.dAssert().)
*/
const RES_PFX = "http://home.netscape.com/NC-xpcom#";
const nsIRDFResource = Components.interfaces.nsIRDFResource;
const nsIRDFNode = Components.interfaces.nsIRDFNode;
const nsIRDFLiteral = Components.interfaces.nsIRDFLiteral;
function RDFHelper()
{
const RDF_MEMORYDS_PROGID =
"component://netscape/rdf/datasource?name=in-memory-datasource";
const RDF_DS_IID = Components.interfaces.nsIRDFDataSource;
const RDF_DS_PROGID = "component://netscape/rdf/rdf-service";
const RDF_SVC_IID = Components.interfaces.nsIRDFService;
this.ds =
Components.classes[RDF_MEMORYDS_PROGID].createInstance(RDF_DS_IID);
this.svc =
Components.classes[RDF_DS_PROGID].getService(RDF_SVC_IID);
/* predefined nodes */
this.resRoot = this.svc.GetResource ("NC:cview-data");
this.resEmptyRoot = this.svc.GetResource ("NC:cview-data-empty");
/* predefined arcs */
this.resCmp = this.svc.GetResource (RES_PFX + "component");
this.resProgID = this.svc.GetResource (RES_PFX + "progid");
this.resCLSID = this.svc.GetResource (RES_PFX + "clsid");
this.resIfc = this.svc.GetResource (RES_PFX + "interface");
this.resIName = this.svc.GetResource (RES_PFX + "iname");
this.resIID = this.svc.GetResource (RES_PFX + "iid");
this.resShow = this.svc.GetResource (RES_PFX + "show");
/* predefined literals */
this.litTrue = this.svc.GetLiteral ("true");
this.litFalse = this.svc.GetLiteral ("false");
}
RDFHelper.prototype.GetResource =
function rdf_getr (s)
{
return this.svc.GetResource(s);
}
RDFHelper.prototype.GetLiteral =
function rdf_getl (s)
{
return this.svc.GetLiteral(s);
}
RDFHelper.prototype.Assert =
function rdf_assert (n1, a, n2, f)
{
if (typeof f == "undefined")
f = true;
/*return this.dAssert (n1, a, n2, f);*/
return this.ds.Assert (n1, a, n2, f);
}
RDFHelper.prototype.Unassert =
function rdf_uassert (n1, a, n2)
{
/*return this.dUnassert (n1, a, n2);*/
return this.ds.Unassert (n1, a, n2);
}
RDFHelper.prototype.dAssert =
function rdf_dassert (n1, a, n2, f)
{
var n1v = n1 ? n1.Value : "!!!";
var av = a ? a.Value : "!!!";
var n2v = n2 ? n2.Value : "!!!";
if (!n1 || !a || !n2)
dd(getStackTrace());
this.ds.Assert (n1, a, n2, f)
}
RDFHelper.prototype.dUnassert =
function rdf_duassert (n1, a, n2)
{
var n1v = n1 ? n1.Value : "!!!";
var av = a ? a.Value : "!!!";
var n2v = n2 ? n2.Value : "!!!";
if (!n1 || !a || !n2)
dd(getStackTrace());
this.ds.Unassert (n1, a, n2)
}
RDFHelper.prototype.Change =
function rdf_duassert (n1, a, n2)
{
var oldN2 = this.ds.GetTarget (n1, a, true);
if (!oldN2)
{
dd ("** Unable to change " + n1.Value + " -[" + a.Value + "]->, " +
"because old value was not found.");
return;
}
return this.ds.Change (n1, a, oldN2, n2);
}
RDFHelper.prototype.GetTarget =
function rdf_gettarget (n1, a)
{
return this.ds.GetTarget (n1, a, true);
}
RDFHelper.prototype.GetTargets =
function rdf_gettarget (n1, a)
{
return this.ds.GetTargets (n1, a, true);
}
RDFHelper.prototype.clearTargets =
function rdf_inittree (n1, a, recurse)
{
if (typeof recurse == "undefined")
recurse = false;
var targets = this.ds.GetTargets(n1, a, true);
while (targets.hasMoreElements())
{
var n2 = targets.getNext().QueryInterface(nsIRDFNode);
if (recurse)
{
try
{
var resN2 = n2.QueryInterface(nsIRDFResource);
var arcs = this.ds.ArcLabelsOut(resN2);
while (arcs.hasMoreElements())
{
arc = arcs.getNext().QueryInterface(nsIRDFNode);
this.clearTargets (resN2, arc, true);
}
}
catch (e)
{
/*
dd ("** Caught " + e + " while recursivley clearing " +
n2.Value + " **");
*/
}
}
this.Unassert (n1, a, n2);
}
}
RDFHelper.prototype.initTree =
function rdf_inittree (id)
{
var tree = document.getElementById (id);
tree.database.AddDataSource (this.ds);
}
RDFHelper.prototype.setTreeRoot =
function rdf_settroot (id, root)
{
var tree = document.getElementById (id);
if (typeof root == "object")
root = root.Value;
tree.setAttribute ("ref", root);
}
RDFHelper.prototype.getTreeRoot =
function rdf_gettroot (id, root)
{
var tree = document.getElementById (id);
return tree.getAttribute ("ref");
}

Просмотреть файл

@ -0,0 +1,432 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Robert Ginda, rginda@nestcape.com, original author
*/
/*
* This file contains "static" functions for cview. In this case static just
* means not-an-event-handler. If you can come up with a better name, let
* me know. The main code of cview is divided between this file and
* cview-handlers.js
*/
var cview = new Object();
/*
* instead of creating a slew of global variables, all app-wide values are
* stored on this cview object. Doing this instead of global variable is
* somewhat religious; it avoids any "m" prefix for module vars, makes
* it trivial to track down all globals, and in theory makes it possible
* to embed the code in another app without colliding globals.
*/
/* number of items to process per refresh step */
cview.REFRESH_ITEMS_PER_CYCLE = 30;
/* number of milliseconds to wait between refresh steps */
cview.REFRESH_CYCLE_DELAY = 200;
cview.componentMode = "all";
cview.interfaceMode = "all";
/*
* Refreshing components and interfaces is a time consuming process.
* We'll be asserting about 1300 (currently) new resources into the rdf graph,
* each with 4 arcs. In order to keep mozilla from becoming *totally*
* unresponsive during this refresh, we do the update in steps. The refresh
* cycle can be tweaked by adjusting the REFRESH_ITEMS_PER_CYCLE and
* REFRESH_CYCLE_DELAY properties on the cview object.
*
* Normally, components and interfaces will only need to be refreshed once
* per execution, at app start. After that, items are hidden/shown with the
* filter*() functions.
*/
/*
* One step in the components refresh process
*/
function refreshComponentsStep()
{
var i;
for (i = 0; i < cview.REFRESH_ITEMS_PER_CYCLE; i++)
{
var cls = cview.pendingComponents.pop();
if (!cls)
break;
var res = cview.rdf.GetResource ("component:" + (++cview.componentID));
cview.rdf.Assert (res, cview.rdf.resProgID,
cview.rdf.GetLiteral(cls.name));
cview.rdf.Assert (res, cview.rdf.resCLSID,
cview.rdf.GetLiteral(cls.id));
cview.rdf.Assert (res, cview.rdf.resShow,
cview.rdf.litTrue);
cview.rdf.Assert (cview.rdf.resRoot, cview.rdf.resCmp, res);
}
if (cls)
cview.componentRefreshTimeout =
window.setTimeout ("refreshComponentsStep();",
cview.REFRESH_CYCLE_DELAY);
else
{
cview.rdf.setTreeRoot ("component-list", cview.rdf.resRoot);
cview.componentMode = "all";
delete cview.componentRefreshTimeout;
delete cview.pendingComponents;
delete cview.componentID;
}
cview.visibleComponents += i;
refreshLabels();
}
/*
* Kick off a components refresh.
*/
function refreshComponents()
{
cview.rdf.setTreeRoot ("component-list", cview.rdf.resNullRoot);
cview.rdf.clearTargets (cview.rdf.resRoot, cview.rdf.resCmp, true);
if (cview.componentRefreshTimeout)
window.clearTimeout (cview.componentRefreshTimeout);
cview.pendingComponents = new Array();
for (var c in Components.classes)
cview.pendingComponents.push(Components.classes[c]);
cview.totalComponents = cview.pendingComponents.length;
cview.visibleComponents = 0;
cview.componentID = 0;
cview.componentMode = "refreshing";
refreshLabels();
cview.componentRefreshTimeout =
window.setTimeout ("refreshComponentsStep();",
cview.REFRESH_CYCLE_DELAY);
}
/*
* One step in the interface refresh process
*/
function refreshInterfacesStep()
{
var i;
for (i = 0; i < cview.REFRESH_ITEMS_PER_CYCLE; i++)
{
var ifc = cview.pendingInterfaces.pop();
if (!ifc)
break;
var res = cview.rdf.GetResource ("interface:" + (++cview.interfaceID));
cview.rdf.Assert (res, cview.rdf.resIName,
cview.rdf.GetLiteral(ifc.name));
cview.rdf.Assert (res, cview.rdf.resIID,
cview.rdf.GetLiteral(ifc.id));
cview.rdf.Assert (res, cview.rdf.resShow,
cview.rdf.litTrue);
cview.rdf.Assert (cview.rdf.resRoot, cview.rdf.resIfc, res);
}
if (ifc)
cview.interfaceRefreshTimeout =
window.setTimeout ("refreshInterfacesStep();",
cview.REFRESH_CYCLE_DELAY);
else
{
cview.rdf.setTreeRoot ("interface-list", cview.rdf.resRoot);
cview.interfaceMode = "all";
delete cview.interfaceID;
delete cview.interfaceRefreshTimeout;
delete cview.pendingInterfaces;
}
cview.visibleInterfaces += i;
refreshLabels();
}
/*
* Kick off the interface refresh process
*/
function refreshInterfaces()
{
cview.rdf.setTreeRoot ("interface-list", cview.rdf.resNullRoot);
cview.rdf.clearTargets (cview.rdf.resRoot, cview.rdf.resIfc, true);
if (cview.interfaceRefreshTimeout)
window.clearTimeout (cview.interfaceRefreshTimeout);
cview.pendingInterfaces = new Array();
for (var i in Components.interfaces)
cview.pendingInterfaces.push(Components.interfaces[i]);
cview.totalInterfaces = cview.pendingInterfaces.length;
cview.visibleInterfaces = 0;
cview.interfaceID = 0;
cview.interfaceMode = "refreshing";
refreshLabels();
cview.interfaceRefreshTimeout =
window.setTimeout ("refreshInterfacesStep();",
cview.REFRESH_CYCLE_DELAY);
}
/*
* hide/show entries in the components list based on the componentMode and
* componentFilter properties of the cview object.
*/
function filterComponents()
{
cview.rdf.setTreeRoot ("component-list", cview.rdf.resNullRoot);
cview.visibleComponents = 0;
var cmps = cview.rdf.GetTargets (cview.rdf.resRoot, cview.rdf.resCmp);
while (cmps.hasMoreElements())
{
var cmpNode = cmps.getNext().QueryInterface(nsIRDFResource);
var cmpName = cview.rdf.GetTarget(cmpNode, cview.rdf.resProgID);
if (cmpName)
{
cmpName = cmpName.QueryInterface(nsIRDFLiteral);
cmpName = cmpName.Value;
}
else
{
dd ("** NODE WITHOUT NAME ARC in filterComponents **");
continue;
}
switch (cview.componentMode)
{
case "all":
cview.rdf.Change (cmpNode, cview.rdf.resShow,
cview.rdf.litTrue);
cview.visibleComponents++;
break;
case "contains":
if (cmpName.search(cview.componentFilter) != -1)
{
cview.rdf.Change (cmpNode, cview.rdf.resShow,
cview.rdf.litTrue);
cview.visibleComponents++;
}
else
cview.rdf.Change (cmpNode, cview.rdf.resShow,
cview.rdf.litFalse);
break;
case "starts-with":
if (cmpName.search(cview.componentFilter) == 0)
{
cview.rdf.Change (cmpNode, cview.rdf.resShow,
cview.rdf.litTrue);
cview.visibleComponents++;
}
else
cview.rdf.Change (cmpNode, cview.rdf.resShow,
cview.rdf.litFalse);
break;
}
}
cview.rdf.setTreeRoot ("component-list", cview.rdf.resRoot);
refreshLabels();
}
/*
* Same as filterComponents() except it works on the interface list
*/
function filterInterfaces()
{
var e;
var cls;
cview.rdf.setTreeRoot ("interface-list", cview.rdf.resNullRoot);
var ifcs = cview.rdf.GetTargets (cview.rdf.resRoot, cview.rdf.resIfc);
cview.visibleInterfaces = 0;
if (cview.interfaceMode == "implemented-by")
{
cls = Components.classes[cview.interfaceFilter];
if (cls)
cls = cls.createInstance();
}
while (ifcs.hasMoreElements())
{
var ifcNode = ifcs.getNext().QueryInterface(nsIRDFResource);
var ifcName = cview.rdf.GetTarget(ifcNode, cview.rdf.resIName);
if (ifcName)
{
ifcName = ifcName.QueryInterface (nsIRDFLiteral);
ifcName = ifcName.Value;
}
else
{
dd ("** NODE WITHOUT NAME ARC in filterInterfaces **");
continue;
}
switch (cview.interfaceMode)
{
case "all":
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litTrue);
cview.visibleInterfaces++;
break;
case "contains":
if (ifcName.search(cview.interfaceFilter) != -1)
{
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litTrue);
cview.visibleInterfaces++;
}
else
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litFalse);
break;
case "starts-with":
if (ifcName.search(cview.interfaceFilter) == 0)
{
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litTrue);
cview.visibleInterfaces++;
}
else
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litFalse);
break;
case "implemented-by":
if (cls)
try
{
cls.QueryInterface(Components.interfaces[ifcName]);
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litTrue);
cview.visibleInterfaces++;
}
catch (e)
{
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litFalse);
}
else
cview.rdf.Change (ifcNode, cview.rdf.resShow,
cview.rdf.litFalse);
break;
}
}
cview.rdf.setTreeRoot ("interface-list", cview.rdf.resRoot);
refreshLabels();
}
/*
* Update the list headings based on the componentMode and
* componentFilter properties of the cview object.
*/
function refreshLabels()
{
var value = "";
switch (cview.componentMode)
{
case "all":
value = "All components";
break;
case "contains":
value = "Components containing '" + cview.componentFilter + "'";
break;
case "starts-with":
value = "Components starting with '" + cview.componentFilter + "'";
break;
case "refreshing":
value = "Refreshing Components list...";
break;
default:
value = "Components?";
break;
}
value += " (" + cview.visibleComponents + "/" +
cview.totalComponents + ")";
document.getElementById("component-label").setAttribute ("value", value);
switch (cview.interfaceMode)
{
case "all":
value = "All interfaces";
break;
case "contains":
value = "Interfaces containing '" + cview.interfaceFilter + "'";
break;
case "starts-with":
value = "Interfaces starting with '" + cview.interfaceFilter + "'";
break;
case "implemented-by":
if (!cview.interfaceFilter)
value = "Please select a component";
else
value = "Interfaces implemented by '" +
Components.classes[cview.interfaceFilter] + "'";
break;
case "refreshing":
value = "Refreshing Interfaces list...";
break;
default:
value = "Interfaces?";
break;
}
value += " (" + cview.visibleInterfaces + "/" +
cview.totalInterfaces + ")";
document.getElementById("interface-label").setAttribute ("value", value);
}

Просмотреть файл

@ -0,0 +1,510 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Robert Ginda, rginda@nestcape.com, original author
*/
/*
* This file is (at the time of this writing) an exact copy of the chatzilla
* utility functions. It should actually be globally accessible (not just
* part of chatzilla.) This hasn't happened yet, so it's copied here to
* avoid a dependancy on chatzilla
*/
if (typeof document == "undefined") /* in xpcshell */
dumpln = print;
else
if (typeof dump == "function")
dumpln = function (str) {dump (str + "\n");}
else if (jsenv.HAS_RHINO)
dumpln = function (str) {var out = java.lang.System.out;
out.println(str); out.flush(); }
else
dumpln = function () {} /* no suitable function */
if (DEBUG)
dd = dumpln;
else
dd = function (){};
var jsenv = new Object();
jsenv.HAS_SECURITYMANAGER = ((typeof netscape == "object") &&
(typeof netscape.security == "object"));
jsenv.HAS_XPCOM = ((typeof Components == "function") &&
(typeof Components.classes == "function"));
jsenv.HAS_JAVA = (typeof java == "object");
jsenv.HAS_RHINO = (typeof defineClass == "function");
jsenv.HAS_DOCUMENT = (typeof document == "object");
function dumpObject (o, pfx, sep)
{
var p;
var s = "";
sep = (typeof sep == "undefined") ? " = " : sep;
pfx = (typeof pfx == "undefined") ? "" : pfx;
for (p in o)
{
if (typeof (o[p]) != "function")
s += pfx + p + sep + o[p] + "\n";
else
s += pfx + p + sep + "function\n";
}
return s;
}
/* Dumps an object in tree format, recurse specifiec the the number of objects
* to recurse, compress is a boolean that can uncompress (true) the output
* format, and level is the number of levels to intitialy indent (only useful
* internally.) A sample dumpObjectTree (o, 1) is shown below.
*
* + parent (object)
* + users (object)
* | + jsbot (object)
* | + mrjs (object)
* | + nakkezzzz (object)
* | *
* + bans (object)
* | *
* + topic (string) 'ircclient.js:59: nothing is not defined'
* + getUsersLength (function) 9 lines
* *
*/
function dumpObjectTree (o, recurse, compress, level)
{
var s = "";
var pfx = "";
if (typeof recurse == "undefined")
recurse = 0;
if (typeof level == "undefined")
level = 0;
if (typeof compress == "undefined")
compress = true;
for (var i = 0; i < level; i++)
pfx += (compress) ? "| " : "| ";
var tee = (compress) ? "+ " : "+- ";
for (i in o)
{
var t = typeof o[i];
switch (t)
{
case "function":
var sfunc = o[i].toString().split("\n");
if (sfunc[2] == " [native code]")
var sfunc = "[native code]";
else
sfunc = sfunc.length + " lines";
s += pfx + tee + i + " (function) " + sfunc + "\n";
break;
case "object":
s += pfx + tee + i + " (object)\n";
if (!compress)
s += pfx + "|\n";
if ((i != "parent") && (recurse))
s += dumpObjectTree (o[i], recurse - 1,
compress, level + 1);
break;
case "string":
if (o[i].length > 200)
s += pfx + tee + i + " (" + t + ") " +
o[i].length + " chars\n";
else
s += pfx + tee + i + " (" + t + ") '" + o[i] + "'\n";
break;
default:
s += pfx + tee + i + " (" + t + ") " + o[i] + "\n";
}
if (!compress)
s += pfx + "|\n";
}
s += pfx + "*\n";
return s;
}
/*
* Clones an existing object (Only the enumerable properties
* of course.) use as a function..
* var c = Clone (obj);
* or a constructor...
* var c = new Clone (obj);
*/
function Clone (obj)
{
robj = new Object();
for (var p in obj)
robj[p] = obj[p];
return robj;
}
/*
* matches a real object against one or more pattern objects.
* if you pass an array of pattern objects, |negate| controls wether to check
* if the object matches ANY of the patterns, or NONE of the patterns.
*/
function matchObject (o, pattern, negate)
{
negate = Boolean(negate);
function _match (o, pattern)
{
if (pattern instanceof Function)
return pattern(o);
for (p in pattern)
{
var val;
/* nice to have, but slow as molases, allows you to match
* properties of objects with obj$prop: "foo" syntax */
/*
if (p[0] == "$")
val = eval ("o." +
p.substr(1,p.length).replace (/\$/g, "."));
else
*/
val = o[p];
if (pattern[p] instanceof Function)
{
if (!pattern[p](val))
return false;
}
else
{
var ary = (new String(val)).match(pattern[p]);
if (ary == null)
return false;
else
o.matchresult = ary;
}
}
return true;
}
if (!(pattern instanceof Array))
return Boolean (negate ^ _match(o, pattern));
for (var i in pattern)
if (_match (o, pattern[i]))
return !negate;
return negate;
}
function matchEntry (partialName, list)
{
if ((typeof partialName == "undefined") ||
(String(partialName) == ""))
return list;
var ary = new Array();
for (var i in list)
{
if (list[i].indexOf(partialName) == 0)
ary.push (list[i]);
}
return ary;
}
function getCommonPfx (list)
{
var pfx = list[0];
var l = list.length;
for (var i = 1; i < l; i++)
{
for (var c = 0; c < pfx.length; c++)
if (pfx[c] != list[i][c])
pfx = pfx.substr (0, c);
}
return pfx;
}
function renameProperty (obj, oldname, newname)
{
if (oldname == newname)
return;
obj[newname] = obj[oldname];
delete obj[oldname];
}
function newObject(progID, iface)
{
if (!jsenv.HAS_XPCOM)
return null;
var obj = Components.classes[progID].createInstance();
var rv;
switch (typeof iface)
{
case "string":
rv = obj.QueryInterface(Components.interfaces[iface]);
break;
case "object":
rv = obj.QueryInterface[iface];
break;
default:
rv = null;
break;
}
return rv;
}
function getPriv (priv)
{
if (!jsenv.HAS_SECURITYMANAGER)
return true;
var rv = true;
try
{
netscape.security.PrivilegeManager.enablePrivilege(priv);
}
catch (e)
{
dd ("getPriv: unable to get privlege '" + priv + "': " + e);
rv = false;
}
return rv;
}
function keys (o)
{
var rv = "";
for (var p in o)
rv += rv ? ", " + p : p;
return rv;
}
function stringTrim (s)
{
if (!s)
return "";
s = s.replace (/^\s+/, "");
return s.replace (/\s+$/, "");
}
function arrayInsertAt (ary, i, o)
{
ary.splice (i, 0, o);
/* doh, forgot about that 'splice' thing
if (ary.length < i)
{
this[i] = o;
return;
}
for (var j = ary.length; j > i; j--)
ary[j] = ary[j - 1];
ary[i] = o;
*/
}
function arrayRemoveAt (ary, i)
{
ary.splice (i, 1);
/* doh, forgot about that 'splice' thing
if (ary.length < i)
return false;
for (var j = i; j < ary.length; j++)
ary[j] = ary[j + 1];
ary.length--;
*/
}
/* length should be an even number >= 6 */
function abbreviateWord (str, length)
{
if (str.length <= length || length < 6)
return str;
var left = str.substr (0, (length / 2) - 1);
var right = str.substr (str.length - (length / 2) + 1);
return left + "..." + right;
}
function getRandomElement (ary)
{
var i = parseInt (Math.random() * ary.length)
if (i == ary.length) i = 0;
return ary[i];
}
function roundTo (num, prec)
{
return parseInt (( Math.round(num) * Math.pow (10, prec))) /
Math.pow (10, prec);
}
function randomRange (min, max)
{
if (typeof min == "undefined")
min = 0;
if (typeof max == "undefined")
max = 1;
var rv = (parseInt(Math.round((Math.random() * (max - min)) + min )));
return rv;
}
function getStackTrace ()
{
if (!jsenv.HAS_XPCOM)
return "No stack trace available.";
var frame = Components.stack.caller;
var str = "<top>";
while (frame)
{
var name = frame.functionName ? frame.functionName : "[anonymous]";
str += "\n" + name + "@" + frame.lineNumber;
frame = frame.caller;
}
return str;
}
function getInterfaces (cls)
{
if (!jsenv.HAS_XPCOM)
return null;
var rv = new Object();
var e;
for (var i in Components.interfaces)
{
try
{
var ifc = Components.interfaces[i];
cls.QueryInterface(ifc);
rv[i] = ifc;
}
catch (e)
{
/* nada */
}
}
return rv;
}
/**
* Calls a named function for each element in an array, sending
* the same parameter each call.
*
* @param ary an array of objects
* @param func_name string name of function to call.
* @param data data object to pass to each object.
*/
function mapObjFunc(ary, func_name, data)
{
/*
* WARNING: Caller assumes resonsibility to verify ary
* and func_name
*/
for (var i in ary)
ary[i][func_name](data);
}
/**
* Passes each element of an array to a given function object.
*
* @param func a function object.
* @param ary an array of values.
*/
function map(func, ary) {
/*
* WARNING: Caller assumnes responsibility to verify
* func and ary.
*/
for (var i in ary)
func(ary[i]);
}

Просмотреть файл

@ -0,0 +1,226 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is mozilla.org code
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Robert Ginda, rginda@nestcape.com, original author
-->
<!DOCTYPE window>
<?xml-stylesheet href="chrome://cview/skin" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://global/content/tasksOverlay.xul"?>
<!--
including tasksOverlay.xul imports the tasks menu, it will appear
under the 'tasksMenu' <menu> below.
-->
<window id="main-window"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xpcom="http://home.netscape.com/NC-xpcom#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
align="vertical" onload="onLoad();" onunload="onUnload();"
persist="width height" title="XPCOM Component Viewer">
<!--
note the xmlns:xpcom in the <window> tag, it's used in the <rule>s
below.
The persist attribute contains attributes that should be saved to
localstore.rdf when the window closes. The next time this window is
opened, persisted properties will be automatically restored.
-->
<html:script>
var DEBUG = true;
</html:script>
<!--
debug needs to be set before loading the utility library.
-->
<html:script src="chrome://cview/content/cview-utils.js"/>
<html:script src="chrome://cview/content/cview-rdf.js"/>
<html:script src="chrome://cview/content/cview-static.js"/>
<html:script src="chrome://cview/content/cview-handlers.js"/>
<popupset>
<popup id="interfacePopup">
<menuitem value="LXR filename lookup"
oncommand="onLXRIFCLookup(event,'find?string=');"/>
<menuitem value="LXR text lookup"
oncommand="onLXRIFCLookup(event, 'search?string=');"/>
</popup>
</popupset>
<!--
This popup is the context menu for elements in the interfaces list.
-->
<toolbox>
<menubar id="main-menubar">
<menu id="view-menu" value="View">
<menupopup>
<menu value="Components">
<menupopup>
<menuitem id="menu-cmp-show-all" value="All" checked="true"
type="checkbox"
oncommand="onChangeDisplayMode(event);"/>
<menuitem id="menu-cmp-show-contains"
value="Containing..." type="checkbox"
oncommand="onChangeDisplayMode(event);"/>
<menuitem id="menu-cmp-show-starts-with"
value="Starting with..." type="checkbox"
oncommand="onChangeDisplayMode(event);"/>
</menupopup>
</menu>
<menu value="Interfaces">
<menupopup>
<menuitem id="menu-ifc-show-all" value="All" checked="true"
type="checkbox"
oncommand="onChangeDisplayMode(event);"/>
<menuitem id="menu-ifc-show-contains"
value="Containing..." type="checkbox"
oncommand="onChangeDisplayMode(event);"/>
<menuitem id="menu-ifc-show-starts-with"
value="Starting with..." type="checkbox"
oncommand="onChangeDisplayMode(event);"/>
<menuitem id="menu-ifc-show-implemented-by"
value="Implemented by selected component"
type="checkbox"
oncommand="onChangeDisplayMode(event);"/>
</menupopup>
</menu>
</menupopup>
</menu>
<menu id="tasksMenu"/>
</menubar>
</toolbox>
<box id="outer-box" flex="1">
<box id="component-box" align="vertical" flex="1">
<text id="component-label" value="Components..."/>
<tree id="component-list" container="true" datasources="rdf:null" flex="1"
containment="http://home.netscape.com/NC-xpcom#component">
<template>
<rule xpcom:show="false"/>
<!--
xpcom: here refers to the namespace declared in the <window> tag. If the
resource has a http://home.netscape.com/NC-xpcom#show arc pointing the
literal value "false", no content will be created for that resource
-->
<rule xpcom:show="true">
<!--
If, on the otherhand, the resource has a
http://home.netscape.com/NC-xpcom#show arc pointing the literal value
"true", the following content will be created.
-->
<treechildren>
<treeitem uri="...">
<treerow onclick="onComponentClick(event);"
progid="rdf:http://home.netscape.com/NC-xpcom#progid">
<!--
Even though we specified the onClick handler as an attribute of the
<treerow> tag, the event's target will be the <treecell>. We compensate
by looking at the target's parentNode. See
cview-handlers.js:onComponentClick().
-->
<treecell>
<text value="rdf:http://home.netscape.com/NC-xpcom#progid"/>
</treecell>
<treecell>
<text value="rdf:http://home.netscape.com/NC-xpcom#clsid"/>
</treecell>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
<treecolgroup>
<treecol
rdf:resource="http://home.netscape.com/NC-xpcom#progid"/>
<treecol
rdf:resource="http://home.netscape.com/NC-xpcom#clsid"/>
</treecolgroup>
<treehead>
<treerow>
<treecell id="componentcol-progid"
rdf:resource="http://home.netscape.com/NC-xpcom#progid"
class="treecell-header sortDirectionIndicator" value="ProgID"
onclick="return onSortCol('componentcol-progid');"/>
<treecell id="componentcol-clsid"
rdf:resource="http://home.netscape.com/NC-xpcom#clsid"
class="treecell-header sortDirectionIndicator" value="CLSID"
onclick="return onSortCol('componentcol-clsid');"/>
</treerow>
</treehead>
</tree>
</box>
<splitter id="main-splitter" align="vertical" collapse="before"/>
<box id="interface-box" align="vertical" flex="1">
<text id="interface-label" value="Interfaces..."/>
<tree id="interface-list" container="true" datasources="rdf:null" flex="1"
containment="http://home.netscape.com/NC-xpcom#interface">
<template>
<rule xpcom:show="false"/>
<rule xpcom:show="true">
<treechildren>
<treeitem uri="...">
<treerow onclick="onInterfaceClick(event);"
iname="rdf:http://home.netscape.com/NC-xpcom#iname"
context="interfacePopup">
<treecell>
<text value="rdf:http://home.netscape.com/NC-xpcom#iname"/>
</treecell>
<treecell>
<text value="rdf:http://home.netscape.com/NC-xpcom#iid"/>
</treecell>
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
<treecolgroup>
<treecol
rdf:resource="http://home.netscape.com/NC-xpcom#iname"/>
<treecol
rdf:resource="http://home.netscape.com/NC-xpcom#iid"/>
</treecolgroup>
<treehead>
<treerow>
<treecell id="interfacecol-iname"
rdf:resource="http://home.netscape.com/NC-xpcom#iname"
class="treecell-header sortDirectionIndicator" value="Interface"
onclick="return onSortCol('interfacecol-iname');"/>
<treecell id="interfacecol-iid"
rdf:resource="http://home.netscape.com/NC-xpcom#iid"
class="treecell-header sortDirectionIndicator" value="IID"
onclick="return onSortCol('interfacecol-iid');"/>
</treerow>
</treehead>
</tree>
</box>
</box>
</window>

Просмотреть файл

@ -0,0 +1,8 @@
function toCView()
{
toOpenWindowByType("tools:cview",
"chrome://cview/content/");
}

Просмотреть файл

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<!--
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.
The Original Code is mozilla.org code
The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All
Rights Reserved.
Contributor(s):
Robert Ginda, rginda@nestcape.com, original author
-->
<!--
This file is designed to overlay the tasks menu (which itself is an overlay),
placing the "Component Viewer" menu item under the tools submenu.
The mainfest.rdf tells mozilla that this file exists, without the correct
entry in manifest.rdf, this file will be ignored.
-->
<!DOCTYPE window SYSTEM "chrome://cview/locale/cviewOverlay.dtd" >
<overlay id="CViewTaskMenuID"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<html:script language="JavaScript"
src="chrome://cview/content/cviewOverlay.js"/>
<!--
This is the id that the menuitem will be appended to. see tasksOverlay.xul
-->
<menupopup id="toolsPopup">
<menuitem position="5" value="&cviewCmd.label;" oncommand="toCView()"/>
</menupopup>
</overlay>

Просмотреть файл

@ -0,0 +1,31 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = en-US
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,37 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
CHROME_DIR=packages/cview
CHROME_L10N_DIR=cview/locale
CHROME_L10N = \
cviewOverlay.dtd \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1 @@
<!ENTITY cviewCmd.label "Component Viewer">

Просмотреть файл

@ -0,0 +1,56 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:cview"/>
</RDF:Seq>
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<RDF:Seq about="urn:mozilla:skin:root">
<RDF:li resource="urn:mozilla:skin:modern/1.0" />
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:cview"
chrome:displayName="Component Viewer (cview)"
chrome:author="mozilla.org"
chrome:name="cview">
</RDF:Description>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:displayName="English(US)"
chrome:author="mozilla.org"
chrome:name="en-US"
chrome:previewURL="http://www.mozilla.org/locales/en-US.gif">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:cview"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- overlay information -->
<RDF:Seq about="urn:mozilla:overlays">
<RDF:li resource="chrome://global/content/tasksOverlay.xul"/>
</RDF:Seq>
<RDF:Seq about="chrome://global/content/tasksOverlay.xul">
<RDF:li>chrome://cview/content/cviewOverlay.xul</RDF:li>
</RDF:Seq>
<!-- skin information -->
<RDF:Description about="urn:mozilla:skin:modern/1.0"
chrome:displayName="Modern"
chrome:author="mozilla.org"
chrome:name="modern/1.0">
<chrome:packages>
<RDF:Seq about="urn:mozilla:skin:modern/1.0:packages">
<RDF:li resource="urn:mozilla:skin:modern/1.0:cview"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,38 @@
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Robert Ginda, rginda@nestcape.com, original author
#
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
CHROME_DIR=packages/cview
CHROME_SKIN_DIR=cview/skin
CHROME_SKIN = \
cview.css \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,24 @@
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
* Robert Ginda, rginda@nestcape.com, original author
*
*/
@import url(chrome://communicator/skin/);