## ESpellChecker

ESpellChecker

## Functions

ESpellChecker * | e_spell_checker_new ()
GList * | e_spell_checker_list_available_dicts ()
ESpellDictionary * | e_spell_checker_ref_dictionary ()
EnchantDict * | e_spell_checker_get_enchant_dict ()
gboolean | e_spell_checker_get_language_active ()
void | e_spell_checker_set_language_active ()
gchar ** | e_spell_checker_list_active_languages ()
guint | e_spell_checker_count_active_languages ()
gboolean | e_spell_checker_check_word ()
void | e_spell_checker_learn_word ()
void | e_spell_checker_ignore_word ()

## Properties

GStrv | active-languages | Read

## Types and Values

struct | ESpellChecker

## Object Hierarchy

        GObject
        ╰── ESpellChecker

## Implemented Interfaces

ESpellChecker implements EExtensible and WebKitSpellChecker.

## Description

## Functions

### 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.

#### Parameters

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 needed 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.

#### Parameters

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.

#### Parameters

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()`.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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` .

#### Parameters

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

## Types and Values

### struct ESpellChecker

    struct 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

## Property Details

### The `“active-languages”` property

      “active-languages”         GStrv

Active spell check language codes.

Flags: Read