Back to index

lightning-sunbird  0.9+nobinonly
nsIXULPrototypeDocument.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla Communicator client code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 /*
00039 
00040 
00041 
00042  */
00043 
00044 #ifndef nsIXULPrototypeDocument_h__
00045 #define nsIXULPrototypeDocument_h__
00046 
00047 #include "nsISerializable.h"
00048 #include "nsAString.h"
00049 
00050 class nsIAtom;
00051 class nsIPrincipal;
00052 class nsIStyleSheet;
00053 class nsIURI;
00054 class nsString;
00055 class nsVoidArray;
00056 class nsXULPrototypeElement;
00057 class nsIXULDocument;
00058 class nsIScriptGlobalObject;
00059 class nsNodeInfoManager;
00060 class nsISupportsArray;
00061 
00062 #define NS_IXULPROTOTYPEDOCUMENT_IID \
00063 { 0x726f0ab8, 0xb3cb, 0x11d8, { 0xb2, 0x67, 0x00, 0x0a, 0x95, 0xdc, 0x23, 0x4c } }
00064 
00065 class nsIXULPrototypeDocument : public nsISerializable
00066 {
00067 public:
00068     NS_DEFINE_STATIC_IID_ACCESSOR(NS_IXULPROTOTYPEDOCUMENT_IID);
00069 
00073     NS_IMETHOD SetURI(nsIURI* aURI) = 0;
00074     NS_IMETHOD GetURI(nsIURI** aResult) = 0;
00075 
00079     NS_IMETHOD GetRootElement(nsXULPrototypeElement** aResult) = 0;
00080     NS_IMETHOD SetRootElement(nsXULPrototypeElement* aElement) = 0;
00081 
00082     NS_IMETHOD AddStyleSheetReference(nsIURI* aStyleSheet) = 0;
00083     NS_IMETHOD GetStyleSheetReferences(nsISupportsArray** aResult) = 0;
00084 
00085     NS_IMETHOD AddOverlayReference(nsIURI* aURI) = 0;
00086     NS_IMETHOD GetOverlayReferences(nsISupportsArray** aResult) = 0;
00087 
00088     NS_IMETHOD GetHeaderData(nsIAtom* aField, nsAString& aData) const = 0;
00089     NS_IMETHOD SetHeaderData(nsIAtom* aField, const nsAString& aData) = 0;
00090 
00091     virtual nsIPrincipal *GetDocumentPrincipal() = 0;
00092     virtual void SetDocumentPrincipal(nsIPrincipal *aPrincipal) = 0;
00093 
00094     virtual nsNodeInfoManager *GetNodeInfoManager() = 0;
00095 
00096     NS_IMETHOD AwaitLoadDone(nsIXULDocument* aDocument, PRBool* aResult) = 0;
00097     NS_IMETHOD NotifyLoadDone() = 0;
00098 };
00099 
00100 
00101 // CID for factory-based creation, used only for deserialization.
00102 #define NS_XULPROTOTYPEDOCUMENT_CLASSNAME "XUL Prototype Document"
00103 #define NS_XULPROTOTYPEDOCUMENT_CID \
00104     {0xa08101ae,0xc0e8,0x4464,{0x99,0x9e,0xe5,0xa4,0xd7,0x09,0xa9,0x28}}
00105 
00106 
00107 NS_IMETHODIMP
00108 NS_NewXULPrototypeDocument(nsISupports* aOuter, REFNSIID aIID, void** aResult);
00109 
00110 #endif // nsIXULPrototypeDocument_h__