[go: up one dir, main page]

Menu

Tree [679184] master gtkspell_3_0_10 /
 History

HTTPS access


File Date Author Commit
 docs 2016-08-06 Sandro Mani Sandro Mani [c3d649] Add gtk_spell_checker_add_to_dictionary, gtk_sp...
 examples 2013-05-13 Sandro Mani Sandro Mani [a6a1a7] Fix @foo@ syntax
 gtkspell 2018-06-29 Sandro Mani Sandro Mani [c29e0b] Port to enchant-2
 po 2018-06-29 Sandro Mani Sandro Mani [653096] Update translations
 .hgignore 2014-04-19 Sandro Mani Sandro Mani [f2708b] Update .hgignore
 .hgtags 2015-02-19 Sandro Mani Sandro Mani [6687ad] Added tag gtkspell_3_0_7 for changeset ba8212cc...
 AUTHORS 2012-10-01 Sandro Mani Sandro Mani [82a5ff] Update AUTHORS and README
 COPYING 2012-11-16 Sandro Mani Sandro Mani [694298] Update GPL2 license file, with correct FSF address
 ChangeLog 2018-06-29 Sandro Mani Sandro Mani [679184] Set version to 3.0.10
 INSTALL 2018-06-29 Sandro Mani Sandro Mani [02beed] Update INSTALL
 Makefile.am 2014-04-19 Sandro Mani Sandro Mani [7ce83e] Build things in build subfolder as far as possible
 NEWS 2002-11-01 eeyem eeyem [9f5bff] Initial revision
 README 2013-02-23 Sandro Mani Sandro Mani [ef128d] Update documentation
 autogen.sh 2018-05-21 林博仁(Buo-ren Lin) 林博仁(Buo-ren Lin) [f7b9b8] Improve gtkdocize command detection in autogen ...
 configure.ac 2018-06-29 Sandro Mani Sandro Mani [679184] Set version to 3.0.10
 gtkspell3.spec.in 2018-06-29 Sandro Mani Sandro Mani [c29e0b] Port to enchant-2

Read Me

/* gtkspell - a spell-checking addon for GTK's TextView widget
 * Copyright (c) 2002 Evan Martin
 * Copyright (c) 2012-2013 Sandro Mani
 */

Introduction
------------
GtkSpell is a library which provides MSWord/MacOSX-style highlighting of
misspelled words in a GtkTextView widget. Right-clicking a misspelled word pops
up a menu of suggested replacements.

GtkSpell depends on
 * GTK+3
 * Enchant
 * GObject Introspection
 * GTK-Doc (optional)
 * GTK+2 (optional)

For more information, see http://sourceforge.net/projects/gtkspell/ .


Use of the C API
----------------
The easiest way to learn is to look at the provided example programs.
It's pretty simple.

Use gtk_spell_checker_new() and gtk_spell_checker_attach() to attach a new
GtkSpellChecker to a GtkTextView.

For convenience, gtk_spell_checker_new() is created as GInitiallyUnowned
and gtk_spell_checker_attach() will sink the floating reference.
gtk_spell_checker_attach() also connects the 'destroy' signal of the
passed-in GObject to g_object_unref() the GtkSpellChecker, so in the most
common use-case, you need not worry about cleaning it up, see
examples/simple.c.

However, if you want to detach and later reattach the GtkSpellChecker to a
(possibly different) GtkTextView, you must get a pointer to it with
gtk_spell_checker_get_from_text_view(), call g_object_ref() on the
resulting pointer, call gtk_spell_checker_detach() on it, call
gtk_spell_checker_attach() with the new GtkTextView, and finally call
g_object_unref() to release the reference that you took at the beginning.

Alternatively, you can sink the GtkSpellChecker immediately upon construction
with g_object_ref_sink(), in which case you will retain the ownership of the
GtkSpellChecker throughout the lifetime of the program, and you must remember
to call g_object_unref() when you don't need it any more, see
examples/advanced.c.

You don't need to keep a pointer to an attached GtkSpellChecker object around,
but you can retrieve it from a GtkTextView with
gtk_spell_checker_get_from_text_view() when necessary.

Once you have a pointer to a GtkSpellChecker, you can change the language it
uses with gtk_spell_checker_set_language().  Use gtk_spell_checker_detach()
to remove the GtkSpellChecker from its attached GtkTextView. Note that the
GtkSpellChecker will get destroyed when gtk_spell_checker_detach() is called
unless a reference is taken before via g_object_ref(). Finally,
gtk_spell_checker_recheck_all() is provided to re-spellcheck the entire buffer,
but it shouldn't be necessary.

An API reference can be found in the documentation. It the documentation was
not installed, gtkspell.h serves as an API reference.

Available bindings
------------------
The package also includes python-bindings via GObject typelibs as well as vala
bindings, if they were compiled.

Original Author
---------------
Evan Martin <martine@danga.com> - http://neugierig.org/

Previous Maintainers
--------------------
Nathan Fredrickson <nathan@silverorange.com>
Eduardo Pérez Ureta <eperez@users.sourceforge.net> - http://edpeur.blogspot.com/

Current Maintainers
------------------
Sandro Mani <manisandro@gmail.com>
Daniel Atallah

Thanks
------
Ari Pollak <ari@debian.org> - Debian packages.
Alex <hansolo@rochester.rr.com> - Redhat packages.
Evan Nemerson - Vala bindings.

vim: tw=72