## ESpellChecker ESpellChecker |

## Synopsis

                        ESpellChecker;
    ESpellChecker *     e_spell_checker_new                 (void);
    GList *             e_spell_checker_list_available_dicts
                                                            (ESpellChecker *checker);
    ESpellDictionary *  e_spell_checker_ref_dictionary      (ESpellChecker *checker,
                                                             const gchar *language_code);
    EnchantDict *       e_spell_checker_get_enchant_dict    (ESpellChecker *checker,
                                                             const gchar *language_code);
    gboolean            e_spell_checker_get_language_active (ESpellChecker *checker,
                                                             const gchar *language_code);
    void                e_spell_checker_set_language_active (ESpellChecker *checker,
                                                             const gchar *language_code,
                                                             gboolean active);
    gchar **            e_spell_checker_list_active_languages
                                                            (ESpellChecker *checker,
                                                             guint *n_languages);
    guint               e_spell_checker_count_active_languages
                                                            (ESpellChecker *checker);
    gboolean            e_spell_checker_check_word          (ESpellChecker *checker,
                                                             const gchar *word,
                                                             gsize length);
    void                e_spell_checker_learn_word          (ESpellChecker *checker,
                                                             const gchar *word);
    void                e_spell_checker_ignore_word         (ESpellChecker *checker,
                                                             const gchar *word);

## Object Hierarchy

      GObject
       +----ESpellChecker

## Implemented Interfaces

ESpellChecker implements EExtensible and WebKitSpellChecker.

## Properties

      "active-languages"         GStrv                 : Read

## Description

## Details

### ESpellChecker

    typedef struct _ESpellChecker ESpellChecker;

ESpellChecker represents a spellchecker in Evolution. It can be used as a provider for dictionaries. It also implements WebKitSpellCheckerInterface, so it can be set as a default spell-checker to WebKit editors

### e_spell_checker_new ()

    ESpellChecker *     e_spell_checker_new                 (void);

Creates a new ESpellChecker instance.

Returns : | a new ESpellChecker

### e_spell_checker_list_available_dicts ()

    GList *             e_spell_checker_list_available_dicts
                                                            (ESpellChecker *checker);

Returns list of all dictionaries available to the actual spell-checking backend.

`checker` : | An ESpellChecker
Returns : | new copy of GList of ESpellDictionary. The dictionaries are owned by the `checker` and should not be free'd. The list should be freed using `g_list_free()` when not neede anymore. [transfer-list]

### e_spell_checker_ref_dictionary ()

    ESpellDictionary *  e_spell_checker_ref_dictionary      (ESpellChecker *checker,
                                                             const gchar *language_code);

Tries to find an ESpellDictionary for given `language_code`. If `language_code` is `NULL`, the function will return a default ESpellDictionary.

`checker` : | an ESpellChecker
`language_code` : | language code of a dictionary, or `NULL`. [allow-none]
Returns : | an ESpellDictionary for `language_code`

### e_spell_checker_get_enchant_dict ()

    EnchantDict *       e_spell_checker_get_enchant_dict    (ESpellChecker *checker,
                                                             const gchar *language_code);

Returns the EnchantDict for `language_code`, or `NULL` if there is none.

`checker` : | an ESpellChecker
`language_code` : | language code of a dictionary, or `NULL`
Returns : | the EnchantDict for `language_code`, or `NULL`

### e_spell_checker_get_language_active ()

    gboolean            e_spell_checker_get_language_active (ESpellChecker *checker,
                                                             const gchar *language_code);

### e_spell_checker_set_language_active ()

    void                e_spell_checker_set_language_active (ESpellChecker *checker,
                                                             const gchar *language_code,
                                                             gboolean active);

### e_spell_checker_list_active_languages ()

    gchar **            e_spell_checker_list_active_languages
                                                            (ESpellChecker *checker,
                                                             guint *n_languages);

Returns a `NULL`-terminated array of language codes actively being used for spell checking. Free the returned array with `g_strfreev()`.

`checker` : | an ESpellChecker
`n_languages` : | return location for the number of active languages, or `NULL`
Returns : | a `NULL`-teriminated array of language codes

### e_spell_checker_count_active_languages ()

    guint               e_spell_checker_count_active_languages
                                                            (ESpellChecker *checker);

Returns the number of languages actively being used for spell checking.

`checker` : | an ESpellChecker
Returns : | number of active spell checking languages

### e_spell_checker_check_word ()

    gboolean            e_spell_checker_check_word          (ESpellChecker *checker,
                                                             const gchar *word,
                                                             gsize length);

Calls `e_spell_dictionary_check_word()` on all active dictionaries in `checker`, and returns `TRUE` if `word` is recognized by any of them.

`checker` : | an SpellChecker
`word` : | a word to spell-check
`length` : | length of `word` in bytes or -1 when `NULL`-terminated
Returns : | `TRUE` if `word` is recognized, `FALSE` otherwise

### e_spell_checker_learn_word ()

    void                e_spell_checker_learn_word          (ESpellChecker *checker,
                                                             const gchar *word);

Calls `e_spell_dictionary_learn_word()` on all active dictionaries in the `checker`.

`checker` : | an ESpellChecker
`word` : | word to learn

### e_spell_checker_ignore_word ()

    void                e_spell_checker_ignore_word         (ESpellChecker *checker,
                                                             const gchar *word);

Calls `e_spell_dictionary_ignore_word()` on all active dictionaries in the `checker`.

`checker` : | an ESpellChecker
`word` : | word to ignore for the rest of session

## Property Details

### The `"active-languages"` property

      "active-languages"         GStrv                 : Read

Active spell check language codes.