2001-09-25 05:32:19 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
2000-05-10 01:42:40 +04:00
|
|
|
*
|
2001-09-25 05:32:19 +04:00
|
|
|
* 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/
|
2000-05-10 01:42:40 +04:00
|
|
|
*
|
2001-09-25 05:32:19 +04:00
|
|
|
* 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.
|
2000-05-10 01:42:40 +04:00
|
|
|
*
|
|
|
|
* The Original Code is Mozilla Communicator client code.
|
|
|
|
*
|
2001-09-25 05:32:19 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
2000-05-10 01:42:40 +04:00
|
|
|
*
|
2001-09-25 05:32:19 +04:00
|
|
|
* Contributor(s):
|
2000-05-10 01:42:40 +04:00
|
|
|
* Original Author: David W. Hyatt (hyatt@netscape.com)
|
|
|
|
*
|
2001-09-25 05:32:19 +04:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2000-05-10 01:42:40 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
Private interface to the XBL Binding
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsIBinding_Manager_h__
|
|
|
|
#define nsIBinding_Manager_h__
|
|
|
|
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsISupports.h"
|
2000-08-12 10:28:02 +04:00
|
|
|
#include "nsISupportsArray.h"
|
2000-05-10 01:42:40 +04:00
|
|
|
|
|
|
|
class nsIContent;
|
|
|
|
class nsIXBLBinding;
|
2000-08-24 13:21:27 +04:00
|
|
|
class nsIXBLBindingAttachedHandler;
|
2000-08-12 10:28:02 +04:00
|
|
|
class nsIXBLDocumentInfo;
|
2000-05-10 01:42:40 +04:00
|
|
|
class nsIAtom;
|
2000-08-06 09:03:36 +04:00
|
|
|
class nsIStreamListener;
|
2000-12-07 13:11:21 +03:00
|
|
|
class nsIXPConnectWrappedJS;
|
2001-07-16 06:40:48 +04:00
|
|
|
class nsIDOMNodeList;
|
2000-05-10 01:42:40 +04:00
|
|
|
|
|
|
|
// {55D70FE0-C8E5-11d3-97FB-00400553EEF0}
|
|
|
|
#define NS_IBINDING_MANAGER_IID \
|
|
|
|
{ 0x55d70fe0, 0xc8e5, 0x11d3, { 0x97, 0xfb, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
|
|
|
|
|
|
|
|
class nsIBindingManager : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static const nsIID& GetIID() { static nsIID iid = NS_IBINDING_MANAGER_IID; return iid; }
|
|
|
|
|
|
|
|
NS_IMETHOD GetBinding(nsIContent* aContent, nsIXBLBinding** aResult) = 0;
|
|
|
|
NS_IMETHOD SetBinding(nsIContent* aContent, nsIXBLBinding* aBinding) = 0;
|
|
|
|
|
2001-02-02 03:54:47 +03:00
|
|
|
NS_IMETHOD GetInsertionParent(nsIContent* aContent, nsIContent** aResult)=0;
|
|
|
|
NS_IMETHOD SetInsertionParent(nsIContent* aContent, nsIContent* aResult)=0;
|
|
|
|
|
2000-12-07 13:11:21 +03:00
|
|
|
NS_IMETHOD GetWrappedJS(nsIContent* aContent, nsIXPConnectWrappedJS** aResult) = 0;
|
|
|
|
NS_IMETHOD SetWrappedJS(nsIContent* aContent, nsIXPConnectWrappedJS* aResult) = 0;
|
|
|
|
|
2000-09-20 04:14:04 +04:00
|
|
|
/**
|
|
|
|
* Notify the binding manager that an element
|
|
|
|
* has been moved from one document to another,
|
|
|
|
* so that it can update any bindings or
|
|
|
|
* nsIAnonymousContentCreator-created anonymous
|
|
|
|
* content that may depend on the document.
|
|
|
|
* @param aContent the element that's being moved
|
|
|
|
* @param aOldDocument the old document in which the
|
|
|
|
* content resided. May be null if the the content
|
|
|
|
* was not in any document.
|
|
|
|
* @param aNewDocument the document in which the
|
|
|
|
* content will reside. May be null if the content
|
|
|
|
* will not reside in any document, or if the
|
|
|
|
* content is being destroyed.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD ChangeDocumentFor(nsIContent* aContent, nsIDocument* aOldDocument,
|
|
|
|
nsIDocument* aNewDocument) = 0;
|
|
|
|
|
|
|
|
|
2000-05-24 12:19:10 +04:00
|
|
|
NS_IMETHOD ResolveTag(nsIContent* aContent, PRInt32* aNameSpaceID, nsIAtom** aResult) = 0;
|
2000-05-22 12:23:09 +04:00
|
|
|
|
2001-09-13 00:19:41 +04:00
|
|
|
/**
|
|
|
|
* Return a list of all explicit children, including any children
|
|
|
|
* that may have been inserted via XBL insertion points.
|
|
|
|
*/
|
2001-02-02 03:54:47 +03:00
|
|
|
NS_IMETHOD GetContentListFor(nsIContent* aContent, nsIDOMNodeList** aResult) = 0;
|
2001-09-13 00:19:41 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the insertion point children for the specified element.
|
|
|
|
*/
|
2001-02-02 03:54:47 +03:00
|
|
|
NS_IMETHOD SetContentListFor(nsIContent* aContent, nsISupportsArray* aList)=0;
|
2001-09-13 00:19:41 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Determine whether or not the explicit child list has been altered
|
|
|
|
* by XBL insertion points.
|
|
|
|
*/
|
2001-08-03 11:34:28 +04:00
|
|
|
NS_IMETHOD HasContentListFor(nsIContent* aContent, PRBool* aResult) = 0;
|
2001-02-02 03:54:47 +03:00
|
|
|
|
2001-09-13 00:19:41 +04:00
|
|
|
/**
|
|
|
|
* For a given element, retrieve the anonymous child content.
|
|
|
|
*/
|
2001-02-02 03:54:47 +03:00
|
|
|
NS_IMETHOD GetAnonymousNodesFor(nsIContent* aContent, nsIDOMNodeList** aResult) = 0;
|
2001-09-13 00:19:41 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the anonymous child content for the specified element.
|
|
|
|
*/
|
2001-02-02 03:54:47 +03:00
|
|
|
NS_IMETHOD SetAnonymousNodesFor(nsIContent* aContent, nsISupportsArray* aList) = 0;
|
|
|
|
|
2001-09-13 00:19:41 +04:00
|
|
|
/**
|
|
|
|
* Retrieves the anonymous list of children if the element has one;
|
|
|
|
* otherwise, retrieves the list of explicit children. N.B. that if
|
|
|
|
* the explicit child list has not been altered by XBL insertion
|
|
|
|
* points, then aResult will be null.
|
|
|
|
*/
|
2001-02-20 04:05:34 +03:00
|
|
|
NS_IMETHOD GetXBLChildNodesFor(nsIContent* aContent, nsIDOMNodeList** aResult) = 0;
|
|
|
|
|
2001-09-13 00:19:41 +04:00
|
|
|
/**
|
|
|
|
* Given a parent element and a child content, determine where the
|
|
|
|
* child content should be inserted in the parent element's
|
|
|
|
* anonymous content tree. Specifically, aChild should be inserted
|
|
|
|
* beneath aResult at the index specified by aIndex.
|
|
|
|
*/
|
2001-02-02 03:54:47 +03:00
|
|
|
NS_IMETHOD GetInsertionPoint(nsIContent* aParent, nsIContent* aChild, nsIContent** aResult, PRUint32* aIndex) = 0;
|
2001-09-13 00:19:41 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the unfiltered insertion point for the specified parent
|
|
|
|
* element. If other filtered insertion points exist,
|
|
|
|
* aMultipleInsertionPoints will be set to true.
|
|
|
|
*/
|
2001-02-02 03:54:47 +03:00
|
|
|
NS_IMETHOD GetSingleInsertionPoint(nsIContent* aParent, nsIContent** aResult, PRUint32* aIndex,
|
2000-05-22 12:23:09 +04:00
|
|
|
PRBool* aMultipleInsertionPoints) = 0;
|
2000-06-02 12:13:29 +04:00
|
|
|
|
2002-03-24 01:46:13 +03:00
|
|
|
NS_IMETHOD AddLayeredBinding(nsIContent* aContent, const nsAString& aURL) = 0;
|
|
|
|
NS_IMETHOD RemoveLayeredBinding(nsIContent* aContent, const nsAString& aURL) = 0;
|
|
|
|
NS_IMETHOD LoadBindingDocument(nsIDocument* aDocument, const nsAString& aURL,
|
2000-09-05 11:29:01 +04:00
|
|
|
nsIDocument** aResult) = 0;
|
2000-07-28 04:35:02 +04:00
|
|
|
|
|
|
|
NS_IMETHOD AddToAttachedQueue(nsIXBLBinding* aBinding)=0;
|
2000-08-24 13:21:27 +04:00
|
|
|
NS_IMETHOD AddHandlerToAttachedQueue(nsIXBLBindingAttachedHandler* aHandler)=0;
|
2000-07-28 04:35:02 +04:00
|
|
|
NS_IMETHOD ClearAttachedQueue()=0;
|
|
|
|
NS_IMETHOD ProcessAttachedQueue()=0;
|
2000-08-06 02:33:29 +04:00
|
|
|
|
2000-09-08 10:57:03 +04:00
|
|
|
NS_IMETHOD ExecuteDetachedHandlers()=0;
|
|
|
|
|
2000-08-12 10:28:02 +04:00
|
|
|
NS_IMETHOD PutXBLDocumentInfo(nsIXBLDocumentInfo* aDocumentInfo)=0;
|
2001-11-02 04:53:13 +03:00
|
|
|
NS_IMETHOD RemoveXBLDocumentInfo(nsIXBLDocumentInfo* aDocumentInfo)=0;
|
2000-08-12 10:28:02 +04:00
|
|
|
NS_IMETHOD GetXBLDocumentInfo(const nsCString& aURL, nsIXBLDocumentInfo** aResult)=0;
|
2000-08-06 02:33:29 +04:00
|
|
|
|
2000-08-06 09:03:36 +04:00
|
|
|
NS_IMETHOD PutLoadingDocListener(const nsCString& aURL, nsIStreamListener* aListener) = 0;
|
|
|
|
NS_IMETHOD GetLoadingDocListener(const nsCString& aURL, nsIStreamListener** aResult) = 0;
|
2000-08-06 08:57:55 +04:00
|
|
|
NS_IMETHOD RemoveLoadingDocListener(const nsCString& aURL)=0;
|
2000-08-12 10:28:02 +04:00
|
|
|
|
|
|
|
NS_IMETHOD InheritsStyle(nsIContent* aContent, PRBool* aResult) = 0;
|
2001-12-18 01:51:39 +03:00
|
|
|
NS_IMETHOD FlushSkinBindings() = 0;
|
2000-12-07 13:11:21 +03:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 20:46:42 +04:00
|
|
|
NS_IMETHOD GetBindingImplementation(nsIContent* aContent, REFNSIID aIID, void** aResult)=0;
|
2000-12-07 13:11:21 +03:00
|
|
|
|
|
|
|
NS_IMETHOD ShouldBuildChildFrames(nsIContent* aContent, PRBool* aResult) = 0;
|
2000-05-10 01:42:40 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsIBinding_Manager_h__
|