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"
14 #include
"mozilla/EditorDOMPoint.h"
19 [ref] native EditorRawDOMPointRef
(mozilla
::EditorDOMPointBase
<nsINode
*, nsIContent
*>);
22 Editor Action Listener interface to outside world
27 * A generic editor action listener interface.
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
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
);
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.
55 void DidJoinContents
([const] in EditorRawDOMPointRef aJoinedPoint
,
56 [const] in Node aRemovedNode
);
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
,
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
,
81 * Called before the editor deletes the ranges.
82 * @param aRangesToDelete The ranges to be deleted.
84 void WillDeleteRanges
(in Array
<Range> aRangesToDelete
);