Yattm - unified GTK instant-messaging client | |
[Generated for version 0.2-17 - Mon Jan 6 19:01:23 GMT+1 2003] |
00001 /* gtkspell - a spell-checking addon for GtkText 00002 * Copyright (c) 2000 Evan Martin. 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 */ 00018 00019 #ifndef __gtkspell_h__ 00020 #define __gtkspell_h__ 00021 00022 /* PLEASE NOTE that this API is unstable and subject to change. */ 00023 #define GTKSPELL_VERSION "0.3.1" 00024 00025 extern int gtkspell_start(char *path, char *args[]); 00026 /* Spawns the spell checking program. 00027 * 00028 * Arguments: 00029 * - "path" should be the full path to the spell checking program, or NULL 00030 * if you want to search the PATH for args[0]. 00031 * - "args" should be a array of arguments to the spell checking program. 00032 * The first element should be the name of the program. 00033 * You should give the argument to run the spell checking program in the 00034 * "embedded" mode. for ispell, this is "-a". 00035 * The last element should be NULL. 00036 * Return: 00037 * 0 on success, and -1 on error. 00038 * 00039 * Example: 00040 * char *args[] = { "ispell", "-a", NULL }; 00041 * if (gtkspell_start(NULL, args) < 0) { 00042 * fprintf(stderr, "Unable to start GtkSpell.\n"); 00043 * return -1; 00044 * } 00045 * 00046 */ 00047 00048 00049 extern void gtkspell_stop(); 00050 /* Stop the spellchecking program. 00051 * This kills the spell checker's process and frees memory. 00052 */ 00053 00054 extern int gtkspell_running(); 00055 /* Is gtkspell running? 00056 * 00057 * Returns: 00058 * nonzero if it running 00059 * zero if is not running 00060 * 00061 * Example: 00062 * if (gtkspell_running()) 00063 * printf("gtkspell is running.\n"); 00064 */ 00065 00066 extern void gtkspell_attach(GtkText *text); 00067 /* Attach GtkSpell to a GtkText Widget. 00068 * This enables checking as you type and the popup menu. 00069 * 00070 * Arguments: 00071 * - "text" is the widget to which GtkSpell should attach. 00072 * 00073 * Example: 00074 * GtkWidget *text; 00075 * text = gtk_text_new(NULL, NULL); 00076 * gtk_text_set_editable(GTK_TEXT(text), TRUE); 00077 * gtkspell_attach(GTK_TEXT(text)); 00078 */ 00079 00080 void gtkspell_detach(GtkText *gtktext); 00081 /* Detach GtkSpell from a GtkText widget. 00082 * 00083 * Arguments: 00084 * - "text" is the widget from which GtkSpell should detach. 00085 * 00086 */ 00087 00088 void gtkspell_check_all(GtkText *gtktext); 00089 /* Check and highlight the misspelled words. 00090 * Note that the popup menu will not work unless you gtkspell_attach(). 00091 * 00092 * Arguments: 00093 * - "text" is the widget to check. 00094 */ 00095 00096 void gtkspell_uncheck_all(GtkText *gtktext); 00097 /* Remove all of the highlighting from the widget. 00098 * 00099 * Arguments: 00100 * - "text" is the widget to check. 00101 */ 00102 00103 #endif /* __gtkspell_h__ */