michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsIAbsorbingTransaction_h__ michael@0: #define nsIAbsorbingTransaction_h__ michael@0: michael@0: #include "nsISupports.h" michael@0: michael@0: /* michael@0: Transaction interface to outside world michael@0: */ michael@0: michael@0: #define NS_IABSORBINGTRANSACTION_IID \ michael@0: { /* a6cf9116-15b3-11d2-932e-00805f8add32 */ \ michael@0: 0xa6cf9116, \ michael@0: 0x15b3, \ michael@0: 0x11d2, \ michael@0: {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} } michael@0: michael@0: class nsSelectionState; michael@0: class nsIEditor; michael@0: class nsIAtom; michael@0: michael@0: /** michael@0: * A transaction interface mixin - for transactions that can support. michael@0: * the placeholder absorbtion idiom. michael@0: */ michael@0: class nsIAbsorbingTransaction : public nsISupports{ michael@0: public: michael@0: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABSORBINGTRANSACTION_IID) michael@0: michael@0: NS_IMETHOD Init(nsIAtom* aName, nsSelectionState* aSelState, michael@0: nsEditor* aEditor) = 0; michael@0: michael@0: NS_IMETHOD EndPlaceHolderBatch()=0; michael@0: michael@0: NS_IMETHOD GetTxnName(nsIAtom **aName)=0; michael@0: michael@0: NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult)=0; michael@0: michael@0: NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress)=0; michael@0: michael@0: NS_IMETHOD Commit()=0; michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbsorbingTransaction, michael@0: NS_IABSORBINGTRANSACTION_IID) michael@0: michael@0: #endif // nsIAbsorbingTransaction_h__ michael@0: