GtkSpell

GtkSpell — GtkSpell objects and methods.

Synopsis


#include <gtkspell/gtkspell.h>


struct      GtkSpell;
GtkSpell*   gtkspell_new_attach             (GtkTextView *view,
                                             const gchar *lang,
                                             GError **error);
gboolean    gtkspell_set_language           (GtkSpell *spell,
                                             const gchar *lang,
                                             GError **error);
void        gtkspell_recheck_all            (GtkSpell *spell);
GtkSpell*   gtkspell_get_from_text_view     (GtkTextView *view);
void        gtkspell_detach                 (GtkSpell *spell);
#define     GTKSPELL_ERROR
enum        GtkSpellError;

Description

Details

struct GtkSpell

struct GtkSpell;

The opaque GtkSpell object. It is created with gtkspell_new_attach() and freed with gtkspell_detach().


gtkspell_new_attach ()

GtkSpell*   gtkspell_new_attach             (GtkTextView *view,
                                             const gchar *lang,
                                             GError **error);

Create a new GtkSpell object attached to view with language lang.

view : The GtkTextView to attach to.
lang : The language to use, in a form pspell understands (it appears to be a locale specifier?).
error : Return location for error.
Returns : a new GtkSpell object, or NULL on error.

gtkspell_set_language ()

gboolean    gtkspell_set_language           (GtkSpell *spell,
                                             const gchar *lang,
                                             GError **error);

Set the language on spell to lang, possibily returning an error in error.

spell : The GtkSpell object.
lang : The language to use, in a form pspell understands (it appears to be a locale specifier?).
error : Return location for error.
Returns : FALSE if there was an error.

gtkspell_recheck_all ()

void        gtkspell_recheck_all            (GtkSpell *spell);

Recheck the spelling in the entire buffer.

spell : The GtkSpell object.

gtkspell_get_from_text_view ()

GtkSpell*   gtkspell_get_from_text_view     (GtkTextView *view);

Retrieves the GtkSpell object attached to a text view.

view : A GtkTextView.
Returns : the GtkSpell object, or NULL if there is no GtkSpell attached to view.

gtkspell_detach ()

void        gtkspell_detach                 (GtkSpell *spell);

Detaches this GtkSpell from its text view. Use gtkspell_get_from_text_view() to retrieve a GtkSpell from a GtkTextView.

spell : A GtkSpell.

GTKSPELL_ERROR

#define GTKSPELL_ERROR gtkspell_error_quark()

Error domain for GtkSpell functions. Errors in this domain will be from the GtkSpellError enumeration. See GError for information on error domains.


enum GtkSpellError

typedef enum {
	GTKSPELL_ERROR_BACKEND,
} GtkSpellError;

Currently there is only one type of error that GtkSpell can report.

GTKSPELL_ERROR_BACKEND Aspell (or pspell) reported an error.