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
9interface nsIEditor;
10interface nsIEditorSpellCheck;
11
12webidl Node;
13webidl Range;
14
15[scriptable, uuid(b7b7a77c-40c4-4196-b0b7-b0338243b3fe)]
16interface nsIInlineSpellChecker : nsISupports
17{
18  readonly attribute nsIEditorSpellCheck spellChecker;
19
20  void init(in nsIEditor aEditor);
21  void cleanup(in boolean aDestroyingFrames);
22
23  attribute boolean enableRealTimeSpell;
24
25  void spellCheckRange(in Range aSelection);
26
27  Range getMisspelledWord(in Node aNode, in long aOffset);
28  [can_run_script]
29  void replaceWord(in Node aNode, in long aOffset, in AString aNewword);
30  void addWordToDictionary(in AString aWord);
31  void removeWordFromDictionary(in AString aWord);
32
33  void ignoreWord(in AString aWord);
34  void ignoreWords(in Array<AString> aWordsToIgnore);
35  void updateCurrentDictionary();
36
37  readonly attribute boolean spellCheckPending;
38};
39