1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/txtsvc/public/nsIInlineSpellChecker.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 +#include "domstubs.idl" 1.11 + 1.12 +interface nsISelection; 1.13 +interface nsIEditor; 1.14 +interface nsIEditorSpellCheck; 1.15 + 1.16 +[scriptable, uuid(b7b7a77c-40c4-4196-b0b7-b0338243b3fe)] 1.17 +interface nsIInlineSpellChecker : nsISupports 1.18 +{ 1.19 + readonly attribute nsIEditorSpellCheck spellChecker; 1.20 + 1.21 + void init(in nsIEditor aEditor); 1.22 + void cleanup(in boolean aDestroyingFrames); 1.23 + 1.24 + attribute boolean enableRealTimeSpell; 1.25 + 1.26 + void spellCheckAfterEditorChange(in long aAction, 1.27 + in nsISelection aSelection, 1.28 + in nsIDOMNode aPreviousSelectedNode, 1.29 + in long aPreviousSelectedOffset, 1.30 + in nsIDOMNode aStartNode, 1.31 + in long aStartOffset, 1.32 + in nsIDOMNode aEndNode, 1.33 + in long aEndOffset); 1.34 + 1.35 + void spellCheckRange(in nsIDOMRange aSelection); 1.36 + 1.37 + nsIDOMRange getMisspelledWord(in nsIDOMNode aNode, in long aOffset); 1.38 + void replaceWord(in nsIDOMNode aNode, in long aOffset, in AString aNewword); 1.39 + void addWordToDictionary(in AString aWord); 1.40 + void removeWordFromDictionary(in AString aWord); 1.41 + 1.42 + void ignoreWord(in AString aWord); 1.43 + void ignoreWords([array, size_is(aCount)] in wstring aWordsToIgnore, in unsigned long aCount); 1.44 + void updateCurrentDictionary(); 1.45 + 1.46 + readonly attribute boolean spellCheckPending; 1.47 +}; 1.48 + 1.49 +%{C++ 1.50 + 1.51 +#define MOZ_INLINESPELLCHECKER_CONTRACTID "@mozilla.org/spellchecker-inline;1" 1.52 + 1.53 +%}