Back to index

lightning-sunbird  0.9+nobinonly
nsIBindingManager.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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  *   Original Author: David W. Hyatt (hyatt@netscape.com)
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either of the GNU General Public License Version 2 or later (the "GPL"),
00027  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00045 #ifndef nsIBinding_Manager_h__
00046 #define nsIBinding_Manager_h__
00047 
00048 #include "nsISupports.h"
00049 
00050 class nsIContent;
00051 class nsIDocument;
00052 class nsXBLBinding;
00053 class nsIXBLDocumentInfo;
00054 class nsIAtom;
00055 class nsIStreamListener;
00056 class nsIURI;
00057 class nsIXPConnectWrappedJS;
00058 class nsIDOMNodeList;
00059 class nsVoidArray;
00060 
00061 #define NS_IBINDING_MANAGER_IID \
00062 { 0x92281eaa, 0x89c4, 0x4457, { 0x8f, 0x8d, 0xca, 0x92, 0xbf, 0xbe, 0x0f, 0x50 } }
00063 
00064 class nsIBindingManager : public nsISupports
00065 {
00066 public:
00067   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBINDING_MANAGER_IID)
00068 
00069   virtual nsXBLBinding* GetBinding(nsIContent* aContent) = 0;
00070   NS_IMETHOD SetBinding(nsIContent* aContent, nsXBLBinding* aBinding) = 0;
00071 
00072   NS_IMETHOD GetInsertionParent(nsIContent* aContent, nsIContent** aResult)=0;
00073   NS_IMETHOD SetInsertionParent(nsIContent* aContent, nsIContent* aResult)=0;
00074 
00075   NS_IMETHOD GetWrappedJS(nsIContent* aContent, nsIXPConnectWrappedJS** aResult) = 0;
00076   NS_IMETHOD SetWrappedJS(nsIContent* aContent, nsIXPConnectWrappedJS* aResult) = 0;
00077 
00093   NS_IMETHOD ChangeDocumentFor(nsIContent* aContent, nsIDocument* aOldDocument,
00094                                nsIDocument* aNewDocument) = 0;
00095 
00096 
00097   NS_IMETHOD ResolveTag(nsIContent* aContent, PRInt32* aNameSpaceID, nsIAtom** aResult) = 0;
00098 
00103   NS_IMETHOD GetContentListFor(nsIContent* aContent, nsIDOMNodeList** aResult) = 0;
00104 
00109   NS_IMETHOD SetContentListFor(nsIContent* aContent, nsVoidArray* aList)=0;
00110 
00115   NS_IMETHOD HasContentListFor(nsIContent* aContent, PRBool* aResult) = 0;
00116 
00120   NS_IMETHOD GetAnonymousNodesFor(nsIContent* aContent, nsIDOMNodeList** aResult) = 0;
00121 
00126   NS_IMETHOD SetAnonymousNodesFor(nsIContent* aContent, nsVoidArray* aList) = 0;
00127 
00134   NS_IMETHOD GetXBLChildNodesFor(nsIContent* aContent, nsIDOMNodeList** aResult) = 0;
00135 
00142   virtual nsIContent* GetInsertionPoint(nsIContent* aParent,
00143                                         nsIContent* aChild,
00144                                         PRUint32* aIndex) = 0;
00145 
00151   virtual nsIContent* GetSingleInsertionPoint(nsIContent* aParent,
00152                                               PRUint32* aIndex,  
00153                                               PRBool* aMultipleInsertionPoints) = 0;
00154 
00155   NS_IMETHOD AddLayeredBinding(nsIContent* aContent, nsIURI* aURL) = 0;
00156   NS_IMETHOD RemoveLayeredBinding(nsIContent* aContent, nsIURI* aURL) = 0;
00157   NS_IMETHOD LoadBindingDocument(nsIDocument* aDocument, nsIURI* aURL,
00158                                  nsIDocument** aResult) = 0;
00159 
00160   NS_IMETHOD AddToAttachedQueue(nsXBLBinding* aBinding)=0;
00161   NS_IMETHOD ClearAttachedQueue()=0;
00162   NS_IMETHOD ProcessAttachedQueue()=0;
00163 
00164   NS_IMETHOD ExecuteDetachedHandlers()=0;
00165 
00166   NS_IMETHOD PutXBLDocumentInfo(nsIXBLDocumentInfo* aDocumentInfo)=0;
00167   NS_IMETHOD RemoveXBLDocumentInfo(nsIXBLDocumentInfo* aDocumentInfo)=0;
00168   NS_IMETHOD GetXBLDocumentInfo(nsIURI* aURI, nsIXBLDocumentInfo** aResult)=0;
00169 
00170   NS_IMETHOD PutLoadingDocListener(nsIURI* aURL, nsIStreamListener* aListener) = 0;
00171   NS_IMETHOD GetLoadingDocListener(nsIURI* aURL, nsIStreamListener** aResult) = 0;
00172   NS_IMETHOD RemoveLoadingDocListener(nsIURI* aURL) = 0;
00173 
00174   NS_IMETHOD FlushSkinBindings() = 0;
00175 
00176   NS_IMETHOD GetBindingImplementation(nsIContent* aContent, REFNSIID aIID, void** aResult)=0;
00177 
00178   NS_IMETHOD ShouldBuildChildFrames(nsIContent* aContent, PRBool* aResult) = 0;
00179 };
00180 
00181 #endif // nsIBinding_Manager_h__