michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: #include "domstubs.idl" michael@0: michael@0: interface nsISelection; michael@0: interface nsIEditor; michael@0: interface nsIEditorSpellCheck; michael@0: michael@0: [scriptable, uuid(b7b7a77c-40c4-4196-b0b7-b0338243b3fe)] michael@0: interface nsIInlineSpellChecker : nsISupports michael@0: { michael@0: readonly attribute nsIEditorSpellCheck spellChecker; michael@0: michael@0: void init(in nsIEditor aEditor); michael@0: void cleanup(in boolean aDestroyingFrames); michael@0: michael@0: attribute boolean enableRealTimeSpell; michael@0: michael@0: void spellCheckAfterEditorChange(in long aAction, michael@0: in nsISelection aSelection, michael@0: in nsIDOMNode aPreviousSelectedNode, michael@0: in long aPreviousSelectedOffset, michael@0: in nsIDOMNode aStartNode, michael@0: in long aStartOffset, michael@0: in nsIDOMNode aEndNode, michael@0: in long aEndOffset); michael@0: michael@0: void spellCheckRange(in nsIDOMRange aSelection); michael@0: michael@0: nsIDOMRange getMisspelledWord(in nsIDOMNode aNode, in long aOffset); michael@0: void replaceWord(in nsIDOMNode aNode, in long aOffset, in AString aNewword); michael@0: void addWordToDictionary(in AString aWord); michael@0: void removeWordFromDictionary(in AString aWord); michael@0: michael@0: void ignoreWord(in AString aWord); michael@0: void ignoreWords([array, size_is(aCount)] in wstring aWordsToIgnore, in unsigned long aCount); michael@0: void updateCurrentDictionary(); michael@0: michael@0: readonly attribute boolean spellCheckPending; michael@0: }; michael@0: michael@0: %{C++ michael@0: michael@0: #define MOZ_INLINESPELLCHECKER_CONTRACTID "@mozilla.org/spellchecker-inline;1" michael@0: michael@0: %}