Mercurial > pidgin
annotate src/gtkspell.h @ 3344:28033f11b3e7
[gaim-migrate @ 3363]
death is quite becoming
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Tue, 02 Jul 2002 05:44:20 +0000 |
parents | da324fe688b3 |
children |
rev | line source |
---|---|
1117 | 1 /* gtkspell - a spell-checking addon for GtkText |
2 * Copyright (c) 2000 Evan Martin. | |
3 * | |
4 * This library is free software; you can redistribute it and/or | |
5 * modify it under the terms of the GNU Lesser General Public | |
6 * License as published by the Free Software Foundation; either | |
7 * version 2 of the License, or (at your option) any later version. | |
8 * | |
9 * This library is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 * Lesser General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU Lesser General Public | |
15 * License along with this library; if not, write to the Free Software | |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
17 */ | |
18 | |
19 #ifndef __gtkspell_h__ | |
20 #define __gtkspell_h__ | |
21 | |
22 /* PLEASE NOTE that this API is unstable and subject to change. */ | |
23 #define GTKSPELL_VERSION "0.3.2" | |
24 | |
25 extern int gtkspell_start(char *path, char *args[]); | |
26 /* Spawns the spell checking program. | |
27 * | |
28 * Arguments: | |
29 * - "path" should be the full path to the spell checking program, or NULL | |
30 * if you want to search the PATH for args[0]. | |
31 * - "args" should be a array of arguments to the spell checking program. | |
32 * The first element should be the name of the program. | |
33 * You should give the argument to run the spell checking program in the | |
34 * "embedded" mode. for ispell, this is "-a". | |
35 * The last element should be NULL. | |
36 * Return: | |
37 * 0 on success, and -1 on error. | |
38 * | |
39 * Example: | |
40 * char *args[] = { "ispell", "-a", NULL }; | |
41 * if (gtkspell_start(NULL, args) < 0) { | |
42 * fprintf(stderr, "Unable to start GtkSpell.\n"); | |
43 * return -1; | |
44 * } | |
45 * | |
46 */ | |
47 | |
48 | |
49 extern void gtkspell_stop(); | |
50 /* Stop the spellchecking program. | |
51 * This kills the spell checker's process and frees memory. | |
52 */ | |
53 | |
54 extern int gtkspell_running(); | |
55 /* Is gtkspell running? | |
56 * | |
1415
3dfd2a83fb5e
[gaim-migrate @ 1425]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1128
diff
changeset
|
57 * Return: |
3105 | 58 * nonzero, positive pid if it's running |
1117 | 59 * zero if is not running |
60 * | |
61 * Example: | |
62 * if (gtkspell_running()) | |
63 * printf("gtkspell is running.\n"); | |
64 */ | |
65 | |
3105 | 66 extern void gtkspell_notrunning(void); |
67 /* | |
68 * Set gtkspell status to "not running" | |
69 * Intended to be used only by signal-catcher | |
70 * when the SIGCHLD signal it catches matches | |
71 * the gtkspell process i.d. | |
72 * | |
73 * Example: | |
74 * gtkspell_notrunning(); | |
75 */ | |
76 | |
1117 | 77 extern void gtkspell_attach(GtkText *text); |
78 /* Attach GtkSpell to a GtkText Widget. | |
79 * This enables checking as you type and the popup menu. | |
80 * | |
81 * Arguments: | |
82 * - "text" is the widget to which GtkSpell should attach. | |
83 * | |
84 * Example: | |
85 * GtkWidget *text; | |
86 * text = gtk_text_new(NULL, NULL); | |
87 * gtk_text_set_editable(GTK_TEXT(text), TRUE); | |
88 * gtkspell_attach(GTK_TEXT(text)); | |
89 */ | |
90 | |
91 void gtkspell_detach(GtkText *gtktext); | |
92 /* Detach GtkSpell from a GtkText widget. | |
93 * | |
94 * Arguments: | |
95 * - "text" is the widget from which GtkSpell should detach. | |
96 * | |
97 */ | |
98 | |
99 void gtkspell_check_all(GtkText *gtktext); | |
100 /* Check and highlight the misspelled words. | |
101 * Note that the popup menu will not work unless you gtkspell_attach(). | |
102 * | |
103 * Arguments: | |
104 * - "text" is the widget to check. | |
105 */ | |
106 | |
107 void gtkspell_uncheck_all(GtkText *gtktext); | |
108 /* Remove all of the highlighting from the widget. | |
109 * | |
110 * Arguments: | |
111 * - "text" is the widget to check. | |
112 */ | |
113 | |
114 #endif /* __gtkspell_h__ */ |