![]() |
|
|
NGLayout Embedding APIsDocument activation...NGLayout provides a simple, extensible document activation framework which allows heterogeneous data viewers to be hosted by a generic container (such as the WebShell).Document activation involves interactions between three distinct components. A content viewer (nsIContentViewer interface) which is capable of processing the given content type. The content viewer container (nsIContentViewerContainer interface) which will host the particular nsIContentViewer instance. And the document loader factory (nsIDocumentLoaderFactory interface) which is used to instantiate the content viewer. In general, document activation involves the following steps:
Activation commands...When activating a document, an activation command is provided in addition to the content type of the data. This command specifies an action to perform on the data and is represented as a character string. Currently, this action is always View and acts as a place holder. However, in the future more commands may be added such as the following:
Document loader factory...For each supported data type a factory object is registered which supports the nsIDocumentLoaderFactory interface. This factory is responsible for the following:
Negotiations between the content viewer and its container...Communication between a content viewer and its container is performed via the QueryCapability(...) method on the nsIContentViewerContainer interface. This method allows the content viewer to ask its container if it can supply an implementation of a given interface. The rules for QueryCapability() are less restrictive than those for nsISupports::QueryInterface(...) in that the returned interface is not necessarily implemented (or aggregated) by the container. This means that the returned interface, it is not necessarily capable of returning the original container by calling nsISupports::QueryInterface(...).nsIContentViewer Interface
nsIContentViewerContainer Interface
nsIDocumentLoaderFactory Interface
Document loader...NGLayout provides a Document Loader component which orchestrates the activation process for a collection of related URLs which represent a document. This allows related URLs to have the same attributes applied when they are loaded and to provide notifications when the entire document has been loaded.Document loaders may be nested depending on the structure of the document which they represent. For example, if the document being loaded contains an HTML frame set, then child document loaders will be created for each frame. The Document Loader performs the following steps during a document activation...
nsIURLGroup Interface
nsIDocumentLoader Interface
nsIDocumentLoaderObserver Interface
WebShell component...The WebShell is an extensible document container which is currently capable of hosting NGLayout documents. The WebShell is designed to be easily embedded in host applications. It also provides much of the default behavior expected of a Web Browser.The WebShell encapsulates the underlying NGLayout subsystems and exposes a collection of interfaces which allow developers to customize its behavior. The WebShell itself is a chromeless window. However, in certain circumstances it is necessary to access the outer chrome of the window which contains the WebShell. For example, this type of access is necessary for javascript manipulation of window chrome. This access is accomplished via the nsIBrowserWindow interface which the WebShell will occasionally call... The nsIBrowserWindow is an interface which abstractly represents the top level window containing the outermost WebShell instance. It is important to remember that while there may be many nested WebShells representing a document only the outermost WebShell container supports the nsIBrowserWindow interface. Below is a diagram which illustrates the relationships between nested documents, WebShells and document loaders.
nsIWebShell Interface
nsIWebShellContainer Interface
nsIBrowserWindow Interface
Some future API changes...
Some open API issues...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 1998 The Mozilla Organization. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||