|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| build/ | H | 19-Sep-2018 | - | 25,962 | 20,841 |
| docs/ | H | 03-May-2022 | - | 1,801 | 1,444 |
| examples/ | H | 03-May-2022 | - | 1,378 | 1,187 |
| gtkspell/ | H | 03-May-2022 | - | 3,116 | 2,267 |
| po/ | H | 19-Sep-2018 | - | 3,647 | 3,111 |
| AUTHORS | H A D | 04-Apr-2016 | 164 | 5 | 4 |
| COPYING | H A D | 04-Apr-2016 | 17.7 KiB | 340 | 281 |
| ChangeLog | H A D | 19-Sep-2018 | 7.3 KiB | 188 | 159 |
| INSTALL | H A D | 19-Sep-2018 | 15.4 KiB | 369 | 287 |
| Makefile.am | H A D | 04-Apr-2016 | 544 | 24 | 13 |
| Makefile.in | H A D | 03-May-2022 | 28.1 KiB | 904 | 802 |
| NEWS | H A D | 04-Apr-2016 | 0 | | |
| README | H A D | 04-Apr-2016 | 3.2 KiB | 91 | 72 |
| aclocal.m4 | H A D | 19-Sep-2018 | 80.4 KiB | 2,304 | 2,080 |
| autogen.sh | H A D | 29-Jun-2018 | 2 KiB | 82 | 63 |
| config.h.in | H A D | 19-Sep-2018 | 2.6 KiB | 100 | 67 |
| configure | H A D | 03-May-2022 | 528.6 KiB | 18,092 | 15,074 |
| configure.ac | H A D | 29-Jun-2018 | 4.9 KiB | 152 | 125 |
| gtk-doc.make | H A D | 28-Aug-2018 | 10.5 KiB | 322 | 275 |
| gtkspell3.spec.in | H A D | 29-Jun-2018 | 4.7 KiB | 185 | 146 |
| intltool-extract.in | H A D | 19-Sep-2018 | 0 | | |
| intltool-merge.in | H A D | 03-May-2022 | 0 | | |
| intltool-update.in | H A D | 19-Sep-2018 | 0 | | |
README
1/* gtkspell - a spell-checking addon for GTK's TextView widget
2 * Copyright (c) 2002 Evan Martin
3 * Copyright (c) 2012-2013 Sandro Mani
4 */
5
6Introduction
7------------
8GtkSpell is a library which provides MSWord/MacOSX-style highlighting of
9misspelled words in a GtkTextView widget. Right-clicking a misspelled word pops
10up a menu of suggested replacements.
11
12GtkSpell depends on
13 * GTK+3
14 * Enchant
15 * GObject Introspection
16 * GTK-Doc (optional)
17 * GTK+2 (optional)
18
19For more information, see http://sourceforge.net/projects/gtkspell/ .
20
21
22Use of the C API
23----------------
24The easiest way to learn is to look at the provided example programs.
25It's pretty simple.
26
27Use gtk_spell_checker_new() and gtk_spell_checker_attach() to attach a new
28GtkSpellChecker to a GtkTextView.
29
30For convenience, gtk_spell_checker_new() is created as GInitiallyUnowned
31and gtk_spell_checker_attach() will sink the floating reference.
32gtk_spell_checker_attach() also connects the 'destroy' signal of the
33passed-in GObject to g_object_unref() the GtkSpellChecker, so in the most
34common use-case, you need not worry about cleaning it up, see
35examples/simple.c.
36
37However, if you want to detach and later reattach the GtkSpellChecker to a
38(possibly different) GtkTextView, you must get a pointer to it with
39gtk_spell_checker_get_from_text_view(), call g_object_ref() on the
40resulting pointer, call gtk_spell_checker_detach() on it, call
41gtk_spell_checker_attach() with the new GtkTextView, and finally call
42g_object_unref() to release the reference that you took at the beginning.
43
44Alternatively, you can sink the GtkSpellChecker immediately upon construction
45with g_object_ref_sink(), in which case you will retain the ownership of the
46GtkSpellChecker throughout the lifetime of the program, and you must remember
47to call g_object_unref() when you don't need it any more, see
48examples/advanced.c.
49
50You don't need to keep a pointer to an attached GtkSpellChecker object around,
51but you can retrieve it from a GtkTextView with
52gtk_spell_checker_get_from_text_view() when necessary.
53
54Once you have a pointer to a GtkSpellChecker, you can change the language it
55uses with gtk_spell_checker_set_language(). Use gtk_spell_checker_detach()
56to remove the GtkSpellChecker from its attached GtkTextView. Note that the
57GtkSpellChecker will get destroyed when gtk_spell_checker_detach() is called
58unless a reference is taken before via g_object_ref(). Finally,
59gtk_spell_checker_recheck_all() is provided to re-spellcheck the entire buffer,
60but it shouldn't be necessary.
61
62An API reference can be found in the documentation. It the documentation was
63not installed, gtkspell.h serves as an API reference.
64
65Available bindings
66------------------
67The package also includes python-bindings via GObject typelibs as well as vala
68bindings, if they were compiled.
69
70Original Author
71---------------
72Evan Martin <martine@danga.com> - http://neugierig.org/
73
74Previous Maintainers
75--------------------
76Nathan Fredrickson <nathan@silverorange.com>
77Eduardo Pérez Ureta <eperez@users.sourceforge.net> - http://edpeur.blogspot.com/
78
79Current Maintainers
80------------------
81Sandro Mani <manisandro@gmail.com>
82Daniel Atallah
83
84Thanks
85------
86Ari Pollak <ari@debian.org> - Debian packages.
87Alex <hansolo@rochester.rr.com> - Redhat packages.
88Evan Nemerson - Vala bindings.
89
90vim: tw=72
91