GtkSpell Tutorial

Basic usage
Error checking
Advanced usage
Building a program using GtkSpell
Simple Programs
Building Using Autoconf
Bindings for other languages

Basic usage

GtkSpell is pretty simple, including it in your program can be as simple as calling gtk_spell_checker_new, gtk_spell_checker_set_language and gtk_spell_checker_attach to attach a GtkSpellChecker to a GtkTextView, like this:

GtkTextView* view = gtk_text_view_new ();
GtkSpellChecker* spell = gtk_spell_checker_new ();
gtk_spell_checker_set_language (spell, "en_US", NULL);
gtk_spell_checker_attach (GTK_TEXT_VIEW (view));

The GtkSpellChecker then watches modifications to the GtkTextView and tries to highlight the misspellings. The GtkSpellChecker is automatically destroyed when the GtkTextView to which it is attached is destroyed.

The details of setting up the GtkTextView (setting the word wrap mode, packing it into a GtkScrolledWindow) are left for the GTK documentation to describe.