|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 #ifndef nsIAbsorbingTransaction_h__ |
|
7 #define nsIAbsorbingTransaction_h__ |
|
8 |
|
9 #include "nsISupports.h" |
|
10 |
|
11 /* |
|
12 Transaction interface to outside world |
|
13 */ |
|
14 |
|
15 #define NS_IABSORBINGTRANSACTION_IID \ |
|
16 { /* a6cf9116-15b3-11d2-932e-00805f8add32 */ \ |
|
17 0xa6cf9116, \ |
|
18 0x15b3, \ |
|
19 0x11d2, \ |
|
20 {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} } |
|
21 |
|
22 class nsSelectionState; |
|
23 class nsIEditor; |
|
24 class nsIAtom; |
|
25 |
|
26 /** |
|
27 * A transaction interface mixin - for transactions that can support. |
|
28 * the placeholder absorbtion idiom. |
|
29 */ |
|
30 class nsIAbsorbingTransaction : public nsISupports{ |
|
31 public: |
|
32 |
|
33 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABSORBINGTRANSACTION_IID) |
|
34 |
|
35 NS_IMETHOD Init(nsIAtom* aName, nsSelectionState* aSelState, |
|
36 nsEditor* aEditor) = 0; |
|
37 |
|
38 NS_IMETHOD EndPlaceHolderBatch()=0; |
|
39 |
|
40 NS_IMETHOD GetTxnName(nsIAtom **aName)=0; |
|
41 |
|
42 NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult)=0; |
|
43 |
|
44 NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress)=0; |
|
45 |
|
46 NS_IMETHOD Commit()=0; |
|
47 }; |
|
48 |
|
49 NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbsorbingTransaction, |
|
50 NS_IABSORBINGTRANSACTION_IID) |
|
51 |
|
52 #endif // nsIAbsorbingTransaction_h__ |
|
53 |