## ESpellDictionary ESpellDictionary |

## Synopsis

    struct              ESpellDictionary;
    ESpellDictionary *  e_spell_dictionary_new              (ESpellChecker *spell_checker,
                                                             EnchantDict *enchant_dict);
    guint               e_spell_dictionary_hash             (ESpellDictionary *dictionary);
    gboolean            e_spell_dictionary_equal            (ESpellDictionary *dictionary1,
                                                             ESpellDictionary *dictionary2);
    gint                e_spell_dictionary_compare          (ESpellDictionary *dictionary1,
                                                             ESpellDictionary *dictionary2);
    const gchar *       e_spell_dictionary_get_name         (ESpellDictionary *dictionary);
    const gchar *       e_spell_dictionary_get_code         (ESpellDictionary *dictionary);
    ESpellChecker *     e_spell_dictionary_ref_spell_checker
                                                            (ESpellDictionary *dictionary);
    gboolean            e_spell_dictionary_check_word       (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);
    void                e_spell_dictionary_learn_word       (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);
    void                e_spell_dictionary_ignore_word      (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);
    GList *             e_spell_dictionary_get_suggestions  (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);
    void                e_spell_dictionary_store_correction (ESpellDictionary *dictionary,
                                                             const gchar *misspelled,
                                                             gsize misspelled_length,
                                                             const gchar *correction,
                                                             gsize correction_length);

## Object Hierarchy

      GObject
       +----ESpellDictionary

## Properties

      "spell-checker"            ESpellChecker*        : Read / Write / Construct Only

## Description

## Details

### struct ESpellDictionary

    struct ESpellDictionary;

The ESpellDictionary is a wrapper around EnchantDict.

### e_spell_dictionary_new ()

    ESpellDictionary *  e_spell_dictionary_new              (ESpellChecker *spell_checker,
                                                             EnchantDict *enchant_dict);

### e_spell_dictionary_hash ()

    guint               e_spell_dictionary_hash             (ESpellDictionary *dictionary);

Generates a hash value for `dictionary` based on its ISO code. This function is intended for easily hashing an ESpellDictionary to add to a GHashTable or similar data structure.

`dictionary` : | an ESpellDictionary
Returns : | a hash value for `dictionary`

### e_spell_dictionary_equal ()

    gboolean            e_spell_dictionary_equal            (ESpellDictionary *dictionary1,
                                                             ESpellDictionary *dictionary2);

Checks two ESpellDictionary instances for equality based on their ISO codes.

`dictionary1` : | an ESpellDictionary
`dictionary2` : | another ESpellDictionary
Returns : | `TRUE` if `dictionary1` and `dictionary2` are equal

### e_spell_dictionary_compare ()

    gint                e_spell_dictionary_compare          (ESpellDictionary *dictionary1,
                                                             ESpellDictionary *dictionary2);

Compares `dictionary1` and `dictionary2` by their display names for the purpose of lexicographical sorting. Use this function where a GCompareFunc callback is required, such as `g_list_sort()`.

`dictionary1` : | an ESpellDictionary
`dictionary2` : | another ESpellDictionary
Returns : | 0 if the names match, a negative value if `dictionary1` < `dictionary2`, or a positive value of `dictionary1` > `dictionary2`

### e_spell_dictionary_get_name ()

    const gchar *       e_spell_dictionary_get_name         (ESpellDictionary *dictionary);

Returns the display name of the dictionary (for example "English (British)")

`dictionary` : | an ESpellDictionary
Returns : | the display name of the `dictionary`

### e_spell_dictionary_get_code ()

    const gchar *       e_spell_dictionary_get_code         (ESpellDictionary *dictionary);

Returns the ISO code of the spell-checking language for `dictionary` (for example "en_US").

`dictionary` : | an ESpellDictionary
Returns : | the language code of the `dictionary`

### e_spell_dictionary_ref_spell_checker ()

    ESpellChecker *     e_spell_dictionary_ref_spell_checker
                                                            (ESpellDictionary *dictionary);

Returns a new reference to the ESpellChecker which owns the dictionary. Unreference the ESpellChecker with `g_object_unref()` when finished with it.

`dictionary` : | an ESpellDictionary
Returns : | an ESpellChecker

### e_spell_dictionary_check_word ()

    gboolean            e_spell_dictionary_check_word       (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);

Tries to lookup the `word` in the `dictionary` to check whether it's spelled correctly or not.

`dictionary` : | an ESpellDictionary
`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_dictionary_learn_word ()

    void                e_spell_dictionary_learn_word       (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);

Permanently adds `word` to `dictionary` so that next time calling `e_spell_dictionary_check()` on the `word` will return `TRUE`.

`dictionary` : | an ESpellDictionary
`word` : | a word to add to `dictionary`
`length` : | length of `word` in bytes or -1 when `NULL`-terminated

### e_spell_dictionary_ignore_word ()

    void                e_spell_dictionary_ignore_word      (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);

Adds `word` to temporary ignore list of the `dictionary`, so that `e_spell_dictionary_check()` on the `word` will return `TRUE`. The list is cleared when the dictionary is freed.

`dictionary` : | an ESpellDictionary
`word` : | a word to add to ignore list
`length` : | length of `word` in bytes or -1 when `NULL`-terminated

### e_spell_dictionary_get_suggestions ()

    GList *             e_spell_dictionary_get_suggestions  (ESpellDictionary *dictionary,
                                                             const gchar *word,
                                                             gsize length);

Provides list of alternative spellings of `word`.

Free the returned spelling suggestions with `g_free()`, and the list itself with `g_list_free()`. An easy way to free the list properly in one step is as follows:

    1
    g_list_free_full (list, (GDestroyNotify) g_free);

`dictionary` : | an ESpellDictionary
`word` : | a word to which to find suggestions
`length` : | length of `word` in bytes or -1 when `NULL`-terminated
Returns : | a list of spelling suggestions for `word`

### e_spell_dictionary_store_correction ()

    void                e_spell_dictionary_store_correction (ESpellDictionary *dictionary,
                                                             const gchar *misspelled,
                                                             gsize misspelled_length,
                                                             const gchar *correction,
                                                             gsize correction_length);

## Property Details

### The `"spell-checker"` property

      "spell-checker"            ESpellChecker*        : Read / Write / Construct Only

Parent spell checker.