## ESpellChecker

ESpellChecker

## Functions

void | e_spell_checker_free_global_memory ()
ESpellChecker * | e_spell_checker_new ()
GList * | e_spell_checker_list_available_dicts ()
guint | e_spell_checker_count_available_dicts ()
ESpellDictionary * | e_spell_checker_ref_dictionary ()
gboolean | e_spell_checker_get_language_active ()
void | e_spell_checker_set_language_active ()
void | e_spell_checker_set_active_languages ()
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 ()
gchar ** | e_spell_checker_get_guesses_for_word ()

## Properties

GStrv | active-languages | Read

## Object Hierarchy

        GObject
        ╰── ESpellChecker

## Description

## Functions

### e_spell_checker_free_global_memory ()

    void
    e_spell_checker_free_global_memory (void);

Frees global memory used by the ESpellChecker. This should be called at the end of `main()`, to avoid memory leaks.

Since: 3.16

### 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_count_available_dicts ()

    guint
    e_spell_checker_count_available_dicts (ESpellChecker *checker);

#### Parameters

checker | An ESpellChecker |

#### Returns

Count of available dictionaries.

### 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_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_set_active_languages ()

    void
    e_spell_checker_set_active_languages (ESpellChecker *checker,
                                          const gchar * const *languages);

Activates only the languages from `languages` , all others will be deactivated after this function is finished.

#### Parameters

checker | An ESpellChecker |
languages | A list of languages to have activated |

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

### e_spell_checker_get_guesses_for_word ()

    gchar **
    e_spell_checker_get_guesses_for_word (ESpellChecker *checker,
                                          const gchar *word);

#### Parameters

checker | an ESpellChecker |
word | word to get guesses for |

#### Returns

a NULL-terminated array of guesses for the `word` . Free the returned pointer with `g_strfreev()` when done with it.

## Property Details

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

      “active-languages”         GStrv

Active spell check language codes.

Owner: ESpellChecker

Flags: Read