Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/. */
6 #include "nsISupports.idl"
8 interface nsIStringEnumerator;
10 [scriptable, uuid(7EF52EAF-B7E1-462B-87E2-5D1DBACA9048)]
12 /**
13 * This interface represents a Personal Dictionary.
14 */
16 interface mozIPersonalDictionary : nsISupports {
18 /**
19 * Load the dictionary
20 */
21 void load();
23 /**
24 * Save the dictionary
25 */
26 void save();
28 /**
29 * Get the (lexicographically sorted) list of words
30 */
31 readonly attribute nsIStringEnumerator wordList;
33 /**
34 * Check a unicode string
35 */
36 boolean check(in wstring word, in wstring lang);
38 /**
39 * Add a word to the personal dictionary
40 */
41 void addWord(in wstring word, in wstring lang);
43 /**
44 * Remove a word from the personal dictionary
45 */
46 void removeWord(in wstring word, in wstring lang);
48 /**
49 * Add a word to the ignore all list
50 */
51 void ignoreWord(in wstring word);
53 /**
54 * Clear the ignore list
55 */
56 void endSession();
58 /**
59 * These three functions are here in case we want to store previous
60 * misspellings and return them at the head of the misspell list.
61 */
63 /**
64 * Add a misspelling to the list of corrections
65 */
66 void addCorrection(in wstring word,in wstring correction, in wstring lang);
68 /**
69 * Remove a misspelling from the list of corrections
70 */
71 void removeCorrection(in wstring word,in wstring correction, in wstring lang);
73 /**
74 * Get a list of previous corrections for the word
75 */
76 void getCorrection(in wstring word, [array, size_is(count)] out wstring words, out uint32_t count);
77 };