• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build/H19-Sep-2018-25,96220,841

docs/H03-May-2022-1,8011,444

examples/H03-May-2022-1,3781,187

gtkspell/H03-May-2022-3,1162,267

po/H19-Sep-2018-3,6473,111

AUTHORSH A D04-Apr-2016164 54

COPYINGH A D04-Apr-201617.7 KiB340281

ChangeLogH A D19-Sep-20187.3 KiB188159

INSTALLH A D19-Sep-201815.4 KiB369287

Makefile.amH A D04-Apr-2016544 2413

Makefile.inH A D03-May-202228.1 KiB904802

NEWSH A D04-Apr-20160

READMEH A D04-Apr-20163.2 KiB9172

aclocal.m4H A D19-Sep-201880.4 KiB2,3042,080

autogen.shH A D29-Jun-20182 KiB8263

config.h.inH A D19-Sep-20182.6 KiB10067

configureH A D03-May-2022528.6 KiB18,09215,074

configure.acH A D29-Jun-20184.9 KiB152125

gtk-doc.makeH A D28-Aug-201810.5 KiB322275

gtkspell3.spec.inH A D29-Jun-20184.7 KiB185146

intltool-extract.inH A D19-Sep-20180

intltool-merge.inH A D03-May-20220

intltool-update.inH A D19-Sep-20180

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