|
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 #include "nsISupports.idl" |
|
7 #include "domstubs.idl" |
|
8 |
|
9 interface nsISelection; |
|
10 interface nsIEditor; |
|
11 interface nsIEditorSpellCheck; |
|
12 |
|
13 [scriptable, uuid(b7b7a77c-40c4-4196-b0b7-b0338243b3fe)] |
|
14 interface nsIInlineSpellChecker : nsISupports |
|
15 { |
|
16 readonly attribute nsIEditorSpellCheck spellChecker; |
|
17 |
|
18 void init(in nsIEditor aEditor); |
|
19 void cleanup(in boolean aDestroyingFrames); |
|
20 |
|
21 attribute boolean enableRealTimeSpell; |
|
22 |
|
23 void spellCheckAfterEditorChange(in long aAction, |
|
24 in nsISelection aSelection, |
|
25 in nsIDOMNode aPreviousSelectedNode, |
|
26 in long aPreviousSelectedOffset, |
|
27 in nsIDOMNode aStartNode, |
|
28 in long aStartOffset, |
|
29 in nsIDOMNode aEndNode, |
|
30 in long aEndOffset); |
|
31 |
|
32 void spellCheckRange(in nsIDOMRange aSelection); |
|
33 |
|
34 nsIDOMRange getMisspelledWord(in nsIDOMNode aNode, in long aOffset); |
|
35 void replaceWord(in nsIDOMNode aNode, in long aOffset, in AString aNewword); |
|
36 void addWordToDictionary(in AString aWord); |
|
37 void removeWordFromDictionary(in AString aWord); |
|
38 |
|
39 void ignoreWord(in AString aWord); |
|
40 void ignoreWords([array, size_is(aCount)] in wstring aWordsToIgnore, in unsigned long aCount); |
|
41 void updateCurrentDictionary(); |
|
42 |
|
43 readonly attribute boolean spellCheckPending; |
|
44 }; |
|
45 |
|
46 %{C++ |
|
47 |
|
48 #define MOZ_INLINESPELLCHECKER_CONTRACTID "@mozilla.org/spellchecker-inline;1" |
|
49 |
|
50 %} |