extensions/spellcheck/idl/mozISpellI18NUtil.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extensions/spellcheck/idl/mozISpellI18NUtil.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     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 +[scriptable, uuid(B075D5DC-1DF1-441A-BEBF-680D8CAAA19C)]
    1.12 +
    1.13 +/**
    1.14 + * This interface contains various I18N related code used in various places by the spell checker.
    1.15 + */
    1.16 +
    1.17 +interface mozISpellI18NUtil : nsISupports {
    1.18 +
    1.19 +    const uint32_t kCheck=0;
    1.20 +    const uint32_t kSuggest=1;
    1.21 +
    1.22 +   /**
    1.23 +    * The language being used to check spelling
    1.24 +    */
    1.25 +    readonly attribute wstring language;
    1.26 +    
    1.27 +   /**
    1.28 +    * Given a word return a list of possible root forms of that word
    1.29 +    */
    1.30 +    void getRootForm(in wstring word,
    1.31 +                     in uint32_t type,
    1.32 +                     [array, size_is(count)] out wstring words,
    1.33 +                     out uint32_t count);
    1.34 +    
    1.35 +   /**
    1.36 +    * Given a word return a list of possible root forms of that word
    1.37 +    */
    1.38 +    void fromRootForm(in wstring word,
    1.39 +                      [array, size_is(icount)] in wstring iwords,
    1.40 +                      in uint32_t icount,
    1.41 +                      [array, size_is(ocount)] out wstring owords,
    1.42 +                      out uint32_t ocount);
    1.43 +    
    1.44 +    /**
    1.45 +     * Given a unicode string and an offset, find the beginning and end of the
    1.46 +     * next word. begin and end are -1 if there are no words remaining in the 
    1.47 +     * string. This should really be folded into the Line/WordBreaker.
    1.48 +     */
    1.49 +    void findNextWord(in wstring word, in uint32_t length, in uint32_t offset, out int32_t begin, out int32_t end); 
    1.50 +};

mercurial