Initial checkin on XUL_19990930_BRANCH, the RDF-ectomy. Single XUL documents hobbling along.

This commit is contained in:
waterson%netscape.com 1999-10-01 03:01:22 +00:00
Родитель 4f13a6a21c
Коммит 61408ff762
6 изменённых файлов: 4362 добавлений и 0 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -0,0 +1,91 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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 Communicator client 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.
*/
/*
A content model builder interface. An object that implements this
interface is associated with an nsIXULDocument object to construct
an NGLayout content model.
*/
#ifndef nsIRDFContentModelBuilder_h__
#define nsIRDFContentModelBuilder_h__
#include "nsISupports.h"
class nsIAtom;
class nsIContent;
class nsIRDFCompositeDataSource;
class nsIXULDocument;
class nsIRDFNode;
class nsIRDFResource;
// {541AFCB0-A9A3-11d2-8EC5-00805F29F370}
#define NS_IRDFCONTENTMODELBUILDER_IID \
{ 0x541afcb0, 0xa9a3, 0x11d2, { 0x8e, 0xc5, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
class nsIRDFContentModelBuilder : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IRDFCONTENTMODELBUILDER_IID; return iid; }
/**
* Point the content model builder to the document. The content model
* builder must not reference count the document.
*/
NS_IMETHOD SetDocument(nsIXULDocument* aDocument) = 0;
NS_IMETHOD SetDataBase(nsIRDFCompositeDataSource* aDataBase) = 0;
NS_IMETHOD GetDataBase(nsIRDFCompositeDataSource** aDataBase) = 0;
/**
* Set the root element from which this content model will
* operate.
*/
NS_IMETHOD CreateRootContent(nsIRDFResource* aResource) = 0;
NS_IMETHOD SetRootContent(nsIContent* aElement) = 0;
/**
* Construct the contents for a container element.
*/
NS_IMETHOD CreateContents(nsIContent* aElement) = 0;
/**
* 'Open' a container element that was closed before. This gives
* the container a chance to populate its contents.
*/
NS_IMETHOD OpenContainer(nsIContent* aContainer) = 0;
/**
* 'Close' an open container. This gives the container a chance to
* release unused content nodes.
*/
NS_IMETHOD CloseContainer(nsIContent* aContainer) = 0;
/**
* Rebuild the contents of a container.
*/
NS_IMETHOD RebuildContainer(nsIContent* aContainer) = 0;
};
extern nsresult NS_NewXULTemplateBuilder(nsIRDFContentModelBuilder** aResult);
extern nsresult NS_NewRDFXULBuilder(nsIRDFContentModelBuilder** aResult);
#endif // nsIRDFContentModelBuilder_h__

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

@ -0,0 +1,91 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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 Communicator client 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.
*/
/*
A content model builder interface. An object that implements this
interface is associated with an nsIXULDocument object to construct
an NGLayout content model.
*/
#ifndef nsIRDFContentModelBuilder_h__
#define nsIRDFContentModelBuilder_h__
#include "nsISupports.h"
class nsIAtom;
class nsIContent;
class nsIRDFCompositeDataSource;
class nsIXULDocument;
class nsIRDFNode;
class nsIRDFResource;
// {541AFCB0-A9A3-11d2-8EC5-00805F29F370}
#define NS_IRDFCONTENTMODELBUILDER_IID \
{ 0x541afcb0, 0xa9a3, 0x11d2, { 0x8e, 0xc5, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
class nsIRDFContentModelBuilder : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IRDFCONTENTMODELBUILDER_IID; return iid; }
/**
* Point the content model builder to the document. The content model
* builder must not reference count the document.
*/
NS_IMETHOD SetDocument(nsIXULDocument* aDocument) = 0;
NS_IMETHOD SetDataBase(nsIRDFCompositeDataSource* aDataBase) = 0;
NS_IMETHOD GetDataBase(nsIRDFCompositeDataSource** aDataBase) = 0;
/**
* Set the root element from which this content model will
* operate.
*/
NS_IMETHOD CreateRootContent(nsIRDFResource* aResource) = 0;
NS_IMETHOD SetRootContent(nsIContent* aElement) = 0;
/**
* Construct the contents for a container element.
*/
NS_IMETHOD CreateContents(nsIContent* aElement) = 0;
/**
* 'Open' a container element that was closed before. This gives
* the container a chance to populate its contents.
*/
NS_IMETHOD OpenContainer(nsIContent* aContainer) = 0;
/**
* 'Close' an open container. This gives the container a chance to
* release unused content nodes.
*/
NS_IMETHOD CloseContainer(nsIContent* aContainer) = 0;
/**
* Rebuild the contents of a container.
*/
NS_IMETHOD RebuildContainer(nsIContent* aContainer) = 0;
};
extern nsresult NS_NewXULTemplateBuilder(nsIRDFContentModelBuilder** aResult);
extern nsresult NS_NewRDFXULBuilder(nsIRDFContentModelBuilder** aResult);
#endif // nsIRDFContentModelBuilder_h__

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

@ -0,0 +1,50 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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 Communicator client 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.
*/
#ifndef nsIXULContentSink_h__
#define nsIXULContentSink_h__
#include "nsIXMLContentSink.h"
class nsIDocument;
class nsIRDFDataSource;
// {E49AA620-C16C-11d2-A6AA-00104BDE6048}
#define NS_IXULCONTENTSINK_IID \
{ 0xe49aa620, 0xc16c, 0x11d2, { 0xa6, 0xaa, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } }
class nsIXULContentSink : public nsIXMLContentSink
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IXULCONTENTSINK_IID; return iid; }
NS_IMETHOD Init(nsIDocument* aDocument) = 0;
NS_IMETHOD UnblockNextOverlay() = 0;
NS_IMETHOD UpdateOverlayCounters(PRInt32 aDelta) = 0;
};
nsresult
NS_NewXULContentSink(nsIXULContentSink** aResult);
#endif // nsIXULContentSink_h__

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

@ -0,0 +1,108 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (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 Communicator client 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.
*/
/*
An XUL-specific extension to nsIXMLDocument. Includes methods for
setting the root resource of the document content model, a factory
method for constructing the children of a node, etc.
XXX This should really be called nsIXULDocument.
*/
#ifndef nsIXULDocument_h___
#define nsIXULDocument_h___
class nsIContent; // XXX nsIXMLDocument.h is bad and doesn't declare this class...
#include "nsIXMLDocument.h"
class nsIAtom;
class nsIRDFCompositeDataSource;
class nsIRDFContent;
class nsIRDFContentModelBuilder;
class nsISupportsArray;
class nsIRDFResource;
class nsIDOMElement;
class nsIDOMHTMLFormElement;
// {954F0811-81DC-11d2-B52A-000000000000}
#define NS_IRDFDOCUMENT_IID \
{ 0x954f0811, 0x81dc, 0x11d2, { 0xb5, 0x2a, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
/**
* RDF document extensions to nsIDocument
*/
class nsIRDFDataSource;
class nsIXULDocument : public nsIXMLDocument
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IRDFDOCUMENT_IID; return iid; }
// The resource-to-element map is a one-to-many mapping of RDF
// resources to content elements.
/**
* Add an entry to the ID-to-element map.
*/
NS_IMETHOD AddElementForID(const nsString& aID, nsIContent* aElement) = 0;
/**
* Remove an entry from the ID-to-element map.
*/
NS_IMETHOD RemoveElementForID(const nsString& aID, nsIContent* aElement) = 0;
/**
* Get the elements for a particular resource in the resource-to-element
* map. The nsISupportsArray will be truncated and filled in with
* nsIContent pointers.
*/
NS_IMETHOD GetElementsForID(const nsString& aID, nsISupportsArray* aElements) = 0;
NS_IMETHOD CreateContents(nsIContent* aElement) = 0;
/**
* Add a content model builder to the document.
*/
NS_IMETHOD AddContentModelBuilder(nsIRDFContentModelBuilder* aBuilder) = 0;
/**
* Manipulate the XUL document's form element
*/
NS_IMETHOD GetForm(nsIDOMHTMLFormElement** aForm) = 0;
NS_IMETHOD SetForm(nsIDOMHTMLFormElement* aForm) = 0;
/**
* Add a "forward declaration" of a XUL observer. Such declarations
* will be resolved when document loading completes.
*/
NS_IMETHOD AddForwardObserverDecl(nsIDOMElement* aListener,
const nsString& aTargetID,
const nsString& aAttribute) = 0;
NS_IMETHOD ResolveForwardObserverDecls() = 0;
};
// factory functions
nsresult NS_NewXULDocument(nsIXULDocument** result);
#endif // nsIXULDocument_h___

Разница между файлами не показана из-за своего большого размера Загрузить разницу