editor/libeditor/base/nsIAbsorbingTransaction.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     6 #ifndef nsIAbsorbingTransaction_h__
     7 #define nsIAbsorbingTransaction_h__
     9 #include "nsISupports.h"
    11 /*
    12 Transaction interface to outside world
    13 */
    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} }
    22 class nsSelectionState;
    23 class nsIEditor;
    24 class nsIAtom;
    26 /**
    27  * A transaction interface mixin - for transactions that can support. 
    28  * the placeholder absorbtion idiom. 
    29  */
    30 class nsIAbsorbingTransaction  : public nsISupports{
    31 public:
    33   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABSORBINGTRANSACTION_IID)
    35   NS_IMETHOD Init(nsIAtom* aName, nsSelectionState* aSelState,
    36                   nsEditor* aEditor) = 0;
    38   NS_IMETHOD EndPlaceHolderBatch()=0;
    40   NS_IMETHOD GetTxnName(nsIAtom **aName)=0;
    42   NS_IMETHOD StartSelectionEquals(nsSelectionState *aSelState, bool *aResult)=0;
    44   NS_IMETHOD ForwardEndBatchTo(nsIAbsorbingTransaction *aForwardingAddress)=0;
    46   NS_IMETHOD Commit()=0;
    47 };
    49 NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbsorbingTransaction,
    50                               NS_IABSORBINGTRANSACTION_IID)
    52 #endif // nsIAbsorbingTransaction_h__

mercurial