Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | #include "domstubs.idl" |
michael@0 | 8 | |
michael@0 | 9 | interface nsISelection; |
michael@0 | 10 | interface nsIEditor; |
michael@0 | 11 | interface nsIEditorSpellCheck; |
michael@0 | 12 | |
michael@0 | 13 | [scriptable, uuid(b7b7a77c-40c4-4196-b0b7-b0338243b3fe)] |
michael@0 | 14 | interface nsIInlineSpellChecker : nsISupports |
michael@0 | 15 | { |
michael@0 | 16 | readonly attribute nsIEditorSpellCheck spellChecker; |
michael@0 | 17 | |
michael@0 | 18 | void init(in nsIEditor aEditor); |
michael@0 | 19 | void cleanup(in boolean aDestroyingFrames); |
michael@0 | 20 | |
michael@0 | 21 | attribute boolean enableRealTimeSpell; |
michael@0 | 22 | |
michael@0 | 23 | void spellCheckAfterEditorChange(in long aAction, |
michael@0 | 24 | in nsISelection aSelection, |
michael@0 | 25 | in nsIDOMNode aPreviousSelectedNode, |
michael@0 | 26 | in long aPreviousSelectedOffset, |
michael@0 | 27 | in nsIDOMNode aStartNode, |
michael@0 | 28 | in long aStartOffset, |
michael@0 | 29 | in nsIDOMNode aEndNode, |
michael@0 | 30 | in long aEndOffset); |
michael@0 | 31 | |
michael@0 | 32 | void spellCheckRange(in nsIDOMRange aSelection); |
michael@0 | 33 | |
michael@0 | 34 | nsIDOMRange getMisspelledWord(in nsIDOMNode aNode, in long aOffset); |
michael@0 | 35 | void replaceWord(in nsIDOMNode aNode, in long aOffset, in AString aNewword); |
michael@0 | 36 | void addWordToDictionary(in AString aWord); |
michael@0 | 37 | void removeWordFromDictionary(in AString aWord); |
michael@0 | 38 | |
michael@0 | 39 | void ignoreWord(in AString aWord); |
michael@0 | 40 | void ignoreWords([array, size_is(aCount)] in wstring aWordsToIgnore, in unsigned long aCount); |
michael@0 | 41 | void updateCurrentDictionary(); |
michael@0 | 42 | |
michael@0 | 43 | readonly attribute boolean spellCheckPending; |
michael@0 | 44 | }; |
michael@0 | 45 | |
michael@0 | 46 | %{C++ |
michael@0 | 47 | |
michael@0 | 48 | #define MOZ_INLINESPELLCHECKER_CONTRACTID "@mozilla.org/spellchecker-inline;1" |
michael@0 | 49 | |
michael@0 | 50 | %} |