Blame README

rpm-build 6bebb9
/* gtkspell - a spell-checking addon for GTK's TextView widget
rpm-build 6bebb9
 * Copyright (c) 2002 Evan Martin
rpm-build 6bebb9
 * Copyright (c) 2012-2013 Sandro Mani
rpm-build 6bebb9
 */
rpm-build 6bebb9
rpm-build 6bebb9
Introduction
rpm-build 6bebb9
------------
rpm-build 6bebb9
GtkSpell is a library which provides MSWord/MacOSX-style highlighting of
rpm-build 6bebb9
misspelled words in a GtkTextView widget. Right-clicking a misspelled word pops
rpm-build 6bebb9
up a menu of suggested replacements.
rpm-build 6bebb9
rpm-build 6bebb9
GtkSpell depends on
rpm-build 6bebb9
 * GTK+3
rpm-build 6bebb9
 * Enchant
rpm-build 6bebb9
 * GObject Introspection
rpm-build 6bebb9
 * GTK-Doc (optional)
rpm-build 6bebb9
 * GTK+2 (optional)
rpm-build 6bebb9
rpm-build 6bebb9
For more information, see http://sourceforge.net/projects/gtkspell/ .
rpm-build 6bebb9
rpm-build 6bebb9
rpm-build 6bebb9
Use of the C API
rpm-build 6bebb9
----------------
rpm-build 6bebb9
The easiest way to learn is to look at the provided example programs.
rpm-build 6bebb9
It's pretty simple.
rpm-build 6bebb9
rpm-build 6bebb9
Use gtk_spell_checker_new() and gtk_spell_checker_attach() to attach a new
rpm-build 6bebb9
GtkSpellChecker to a GtkTextView.
rpm-build 6bebb9
rpm-build 6bebb9
For convenience, gtk_spell_checker_new() is created as GInitiallyUnowned
rpm-build 6bebb9
and gtk_spell_checker_attach() will sink the floating reference.
rpm-build 6bebb9
gtk_spell_checker_attach() also connects the 'destroy' signal of the
rpm-build 6bebb9
passed-in GObject to g_object_unref() the GtkSpellChecker, so in the most
rpm-build 6bebb9
common use-case, you need not worry about cleaning it up, see
rpm-build 6bebb9
examples/simple.c.
rpm-build 6bebb9
rpm-build 6bebb9
However, if you want to detach and later reattach the GtkSpellChecker to a
rpm-build 6bebb9
(possibly different) GtkTextView, you must get a pointer to it with
rpm-build 6bebb9
gtk_spell_checker_get_from_text_view(), call g_object_ref() on the
rpm-build 6bebb9
resulting pointer, call gtk_spell_checker_detach() on it, call
rpm-build 6bebb9
gtk_spell_checker_attach() with the new GtkTextView, and finally call
rpm-build 6bebb9
g_object_unref() to release the reference that you took at the beginning.
rpm-build 6bebb9
rpm-build 6bebb9
Alternatively, you can sink the GtkSpellChecker immediately upon construction
rpm-build 6bebb9
with g_object_ref_sink(), in which case you will retain the ownership of the
rpm-build 6bebb9
GtkSpellChecker throughout the lifetime of the program, and you must remember
rpm-build 6bebb9
to call g_object_unref() when you don't need it any more, see
rpm-build 6bebb9
examples/advanced.c.
rpm-build 6bebb9
rpm-build 6bebb9
You don't need to keep a pointer to an attached GtkSpellChecker object around,
rpm-build 6bebb9
but you can retrieve it from a GtkTextView with
rpm-build 6bebb9
gtk_spell_checker_get_from_text_view() when necessary.
rpm-build 6bebb9
rpm-build 6bebb9
Once you have a pointer to a GtkSpellChecker, you can change the language it
rpm-build 6bebb9
uses with gtk_spell_checker_set_language().  Use gtk_spell_checker_detach()
rpm-build 6bebb9
to remove the GtkSpellChecker from its attached GtkTextView. Note that the
rpm-build 6bebb9
GtkSpellChecker will get destroyed when gtk_spell_checker_detach() is called
rpm-build 6bebb9
unless a reference is taken before via g_object_ref(). Finally,
rpm-build 6bebb9
gtk_spell_checker_recheck_all() is provided to re-spellcheck the entire buffer,
rpm-build 6bebb9
but it shouldn't be necessary.
rpm-build 6bebb9
rpm-build 6bebb9
An API reference can be found in the documentation. It the documentation was
rpm-build 6bebb9
not installed, gtkspell.h serves as an API reference.
rpm-build 6bebb9
rpm-build 6bebb9
Available bindings
rpm-build 6bebb9
------------------
rpm-build 6bebb9
The package also includes python-bindings via GObject typelibs as well as vala
rpm-build 6bebb9
bindings, if they were compiled.
rpm-build 6bebb9
rpm-build 6bebb9
Original Author
rpm-build 6bebb9
---------------
rpm-build 6bebb9
Evan Martin <martine@danga.com> - http://neugierig.org/
rpm-build 6bebb9
rpm-build 6bebb9
Previous Maintainers
rpm-build 6bebb9
--------------------
rpm-build 6bebb9
Nathan Fredrickson <nathan@silverorange.com>
rpm-build 6bebb9
Eduardo PĂ©rez Ureta <eperez@users.sourceforge.net> - http://edpeur.blogspot.com/
rpm-build 6bebb9
rpm-build 6bebb9
Current Maintainers
rpm-build 6bebb9
------------------
rpm-build 6bebb9
Sandro Mani <manisandro@gmail.com>
rpm-build 6bebb9
Daniel Atallah
rpm-build 6bebb9
rpm-build 6bebb9
Thanks
rpm-build 6bebb9
------
rpm-build 6bebb9
Ari Pollak <ari@debian.org> - Debian packages.
rpm-build 6bebb9
Alex <hansolo@rochester.rr.com> - Redhat packages.
rpm-build 6bebb9
Evan Nemerson - Vala bindings.
rpm-build 6bebb9
rpm-build 6bebb9
vim: tw=72