1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/libeditor/base/nsIAbsorbingTransaction.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,53 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsIAbsorbingTransaction_h__ 1.10 +#define nsIAbsorbingTransaction_h__ 1.11 + 1.12 +#include "nsISupports.h" 1.13 + 1.14 +/* 1.15 +Transaction interface to outside world 1.16 +*/ 1.17 + 1.18 +#define NS_IABSORBINGTRANSACTION_IID \ 1.19 +{ /* a6cf9116-15b3-11d2-932e-00805f8add32 */ \ 1.20 + 0xa6cf9116, \ 1.21 + 0x15b3, \ 1.22 + 0x11d2, \ 1.23 + {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} } 1.24 + 1.25 +class nsSelectionState; 1.26 +class nsIEditor; 1.27 +class nsIAtom; 1.28 + 1.29 +/** 1.30 + * A transaction interface mixin - for transactions that can support. 1.31 + * the placeholder absorbtion idiom. 1.32 + */ 1.33 +class nsIAbsorbingTransaction : public nsISupports{ 1.34 +public: 1.35 + 1.36 + NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABSORBINGTRANSACTION_IID) 1.37 + 1.38 + NS_IMETHOD Init(nsIAtom* aName, nsSelectionState* aSelState, 1.39 + nsEditor* aEditor) = 0; 1.40 + 1.41 + NS_IMETHOD EndPlaceHolderBatch()=0; 1.42 + 1.43 + NS_IMETHOD GetTxnName(nsIAtom **aName)=0; 1.44 + 1.45 + NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult)=0; 1.46 + 1.47 + NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress)=0; 1.48 + 1.49 + NS_IMETHOD Commit()=0; 1.50 +}; 1.51 + 1.52 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbsorbingTransaction, 1.53 + NS_IABSORBINGTRANSACTION_IID) 1.54 + 1.55 +#endif // nsIAbsorbingTransaction_h__ 1.56 +