Bug 1890689 apply drift correction to input rate instead of output rate r=pehrsons
[gecko.git] / editor / nsIEditActionListener.idl
blobaa15dd4ce10eea84d5cf98f3709951fcefdb21b1
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 #include "nsISupports.idl"
7 #include "domstubs.idl"
9 webidl CharacterData;
10 webidl Node;
11 webidl Range;
13 %{C++
14 #include "mozilla/EditorDOMPoint.h"
15 class nsINode;
16 class nsIContent;
19 [ref] native EditorRawDOMPointRef(mozilla::EditorDOMPointBase<nsINode*, nsIContent*>);
22 Editor Action Listener interface to outside world
26 /**
27 * A generic editor action listener interface.
28 * <P>
29 * nsIEditActionListener is the interface used by applications wishing to be notified
30 * when the editor modifies the DOM tree.
32 * Note: this is the wrong class to implement if you are interested in generic
33 * change notifications. For generic notifications, you should implement
34 * nsIDocumentObserver.
36 [scriptable, uuid(b22907b1-ee93-11d2-8d50-000064657374)]
37 interface nsIEditActionListener : nsISupports
39 /**
40 * Called after the editor deletes a node.
41 * @param aChild The node to delete
42 * @param aResult The result of the delete node operation.
44 void DidDeleteNode(in Node aChild, in nsresult aResult);
46 /**
47 * Called after the editor joins 2 nodes.
48 * @param aJoinedPoint The joined point. If aLeftNodeWasRemoved is true,
49 * it points after inserted left node content in the
50 * right node. Otherwise, it points start of inserted
51 * right node content in the left node.
52 * @param aRemovedNode The removed node.
54 [noscript]
55 void DidJoinContents([const] in EditorRawDOMPointRef aJoinedPoint,
56 [const] in Node aRemovedNode);
58 /**
59 * Called after the editor inserts text.
60 * @param aTextNode This node getting inserted text.
61 * @param aOffset The offset in aTextNode to insert at.
62 * @param aString The string that gets inserted.
63 * @param aResult The result of the insert text operation.
65 void DidInsertText(in CharacterData aTextNode,
66 in long aOffset,
67 in AString aString,
68 in nsresult aResult);
70 /**
71 * Called before the editor deletes text.
72 * @param aTextNode This node getting text deleted.
73 * @param aOffset The offset in aTextNode to delete at.
74 * @param aLength The amount of text to delete.
76 void WillDeleteText(in CharacterData aTextNode,
77 in long aOffset,
78 in long aLength);
80 /**
81 * Called before the editor deletes the ranges.
82 * @param aRangesToDelete The ranges to be deleted.
84 void WillDeleteRanges(in Array<Range> aRangesToDelete);