1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/extensions/spellcheck/idl/mozIPersonalDictionary.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,77 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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 + 1.11 +interface nsIStringEnumerator; 1.12 + 1.13 +[scriptable, uuid(7EF52EAF-B7E1-462B-87E2-5D1DBACA9048)] 1.14 + 1.15 +/** 1.16 + * This interface represents a Personal Dictionary. 1.17 + */ 1.18 + 1.19 +interface mozIPersonalDictionary : nsISupports { 1.20 + 1.21 + /** 1.22 + * Load the dictionary 1.23 + */ 1.24 + void load(); 1.25 + 1.26 + /** 1.27 + * Save the dictionary 1.28 + */ 1.29 + void save(); 1.30 + 1.31 + /** 1.32 + * Get the (lexicographically sorted) list of words 1.33 + */ 1.34 + readonly attribute nsIStringEnumerator wordList; 1.35 + 1.36 + /** 1.37 + * Check a unicode string 1.38 + */ 1.39 + boolean check(in wstring word, in wstring lang); 1.40 + 1.41 + /** 1.42 + * Add a word to the personal dictionary 1.43 + */ 1.44 + void addWord(in wstring word, in wstring lang); 1.45 + 1.46 + /** 1.47 + * Remove a word from the personal dictionary 1.48 + */ 1.49 + void removeWord(in wstring word, in wstring lang); 1.50 + 1.51 + /** 1.52 + * Add a word to the ignore all list 1.53 + */ 1.54 + void ignoreWord(in wstring word); 1.55 + 1.56 + /** 1.57 + * Clear the ignore list 1.58 + */ 1.59 + void endSession(); 1.60 + 1.61 + /** 1.62 + * These three functions are here in case we want to store previous 1.63 + * misspellings and return them at the head of the misspell list. 1.64 + */ 1.65 + 1.66 + /** 1.67 + * Add a misspelling to the list of corrections 1.68 + */ 1.69 + void addCorrection(in wstring word,in wstring correction, in wstring lang); 1.70 + 1.71 + /** 1.72 + * Remove a misspelling from the list of corrections 1.73 + */ 1.74 + void removeCorrection(in wstring word,in wstring correction, in wstring lang); 1.75 + 1.76 + /** 1.77 + * Get a list of previous corrections for the word 1.78 + */ 1.79 + void getCorrection(in wstring word, [array, size_is(count)] out wstring words, out uint32_t count); 1.80 +};