|
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/. */ |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 |
|
8 interface nsIStringEnumerator; |
|
9 |
|
10 [scriptable, uuid(7EF52EAF-B7E1-462B-87E2-5D1DBACA9048)] |
|
11 |
|
12 /** |
|
13 * This interface represents a Personal Dictionary. |
|
14 */ |
|
15 |
|
16 interface mozIPersonalDictionary : nsISupports { |
|
17 |
|
18 /** |
|
19 * Load the dictionary |
|
20 */ |
|
21 void load(); |
|
22 |
|
23 /** |
|
24 * Save the dictionary |
|
25 */ |
|
26 void save(); |
|
27 |
|
28 /** |
|
29 * Get the (lexicographically sorted) list of words |
|
30 */ |
|
31 readonly attribute nsIStringEnumerator wordList; |
|
32 |
|
33 /** |
|
34 * Check a unicode string |
|
35 */ |
|
36 boolean check(in wstring word, in wstring lang); |
|
37 |
|
38 /** |
|
39 * Add a word to the personal dictionary |
|
40 */ |
|
41 void addWord(in wstring word, in wstring lang); |
|
42 |
|
43 /** |
|
44 * Remove a word from the personal dictionary |
|
45 */ |
|
46 void removeWord(in wstring word, in wstring lang); |
|
47 |
|
48 /** |
|
49 * Add a word to the ignore all list |
|
50 */ |
|
51 void ignoreWord(in wstring word); |
|
52 |
|
53 /** |
|
54 * Clear the ignore list |
|
55 */ |
|
56 void endSession(); |
|
57 |
|
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 */ |
|
62 |
|
63 /** |
|
64 * Add a misspelling to the list of corrections |
|
65 */ |
|
66 void addCorrection(in wstring word,in wstring correction, in wstring lang); |
|
67 |
|
68 /** |
|
69 * Remove a misspelling from the list of corrections |
|
70 */ |
|
71 void removeCorrection(in wstring word,in wstring correction, in wstring lang); |
|
72 |
|
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 }; |