| Gnome User Interface Library Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
#include <gnome.h> struct GnomeSpell; struct GnomeSpellInfo; GtkWidget* gnome_spell_new (void); gint gnome_spell_check (GnomeSpell *gtkspell, const gchar *str); void gnome_spell_accept (GnomeSpell *gtkspell, const gchar *word); void gnome_spell_insert (GnomeSpell *gtkspell, const gchar *word, gboolean lowercase); int gnome_spell_next (GnomeSpell *gtkspell); void gnome_spell_kill (GnomeSpell *gtkspell); |
GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkVBox +----GnomeSpell |
"found-word" void user_function (GnomeSpell *spell, gpointer arg1, gpointer user_data); "handled-word" void user_function (GnomeSpell *spell, gpointer arg1, gpointer user_data); |
struct GnomeSpellInfo {
const gchar* original;
gchar* replacement;
gchar* word;
guint offset;
GSList * words;
}; |
GtkWidget* gnome_spell_new (void); |
Create a new GNOME spell checker object.
| Returns : | Pointer to new GNOME spell checker object, or NULL on failure. |
gint gnome_spell_check (GnomeSpell *gtkspell, const gchar *str); |
Perform spell-checking on one or more words.
FIXME: there is a problem when you call gnome_spell_check(spell, "bogus bogus"): if you accept bogus the first time, it will be reported again because ispell checked it before... The easiest solution is to spell-check a word at a time (but it's slow).
| spell : | Pointer to GNOME spell checker object. |
| str : | String to be spell-checked. |
| Returns : | 1 if spelling is ok, 0 if not, -1 on system error. |
void gnome_spell_accept (GnomeSpell *gtkspell, const gchar *word); |
Adds a single word to the runtime list of words that the spelling checker should ignore.
| spell : | Pointer to GNOME spell checker object. |
| word : | Word to be ignored. |
void gnome_spell_insert (GnomeSpell *gtkspell, const gchar *word, gboolean lowercase); |
Adds a single word to the spelling checker's private dictionary.
| spell : | Pointer to GNOME spell checker object. |
| word : | Word to be added to private dictionary. |
| lowercase : | TRUE if the added word should be changed to lowercase, FALSE if not. |
int gnome_spell_next (GnomeSpell *gtkspell); |
Adds a single word to the runtime list of words that the spelling checker should ignore.
| spell : | Pointer to GNOME spell checker object. |
| Returns : | TRUE on success, FALSE on failure. |
void gnome_spell_kill (GnomeSpell *gtkspell); |
Terminates the external spelling checker process, if present.
| spell : | Pointer to GNOME spell checker object. |
void user_function (GnomeSpell *spell, gpointer arg1, gpointer user_data); |
| spell : | The object which received the signal. |
| arg1 : | User data |
| user_data : | user data set when the signal handler was connected. |
void user_function (GnomeSpell *spell, gpointer arg1, gpointer user_data); |
| spell : | The object which received the signal. |
| arg1 : | User data |
| user_data : | user data set when the signal handler was connected. |