michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: [scriptable, uuid(B075D5DC-1DF1-441A-BEBF-680D8CAAA19C)] michael@0: michael@0: /** michael@0: * This interface contains various I18N related code used in various places by the spell checker. michael@0: */ michael@0: michael@0: interface mozISpellI18NUtil : nsISupports { michael@0: michael@0: const uint32_t kCheck=0; michael@0: const uint32_t kSuggest=1; michael@0: michael@0: /** michael@0: * The language being used to check spelling michael@0: */ michael@0: readonly attribute wstring language; michael@0: michael@0: /** michael@0: * Given a word return a list of possible root forms of that word michael@0: */ michael@0: void getRootForm(in wstring word, michael@0: in uint32_t type, michael@0: [array, size_is(count)] out wstring words, michael@0: out uint32_t count); michael@0: michael@0: /** michael@0: * Given a word return a list of possible root forms of that word michael@0: */ michael@0: void fromRootForm(in wstring word, michael@0: [array, size_is(icount)] in wstring iwords, michael@0: in uint32_t icount, michael@0: [array, size_is(ocount)] out wstring owords, michael@0: out uint32_t ocount); michael@0: michael@0: /** michael@0: * Given a unicode string and an offset, find the beginning and end of the michael@0: * next word. begin and end are -1 if there are no words remaining in the michael@0: * string. This should really be folded into the Line/WordBreaker. michael@0: */ michael@0: void findNextWord(in wstring word, in uint32_t length, in uint32_t offset, out int32_t begin, out int32_t end); michael@0: };