view src/gtkspell.h @ 1911:db3104dda736

[gaim-migrate @ 1921] Mike Heffner's redesigned UI. I changed around a lot of things from his patch, not because they weren't good or needed or anything like that; most of the changes I made just made the patch smaller. I moved functions back to where they originally where and renamed them back to what they originally were. Granted the names aren't as... good as the changes Mike made, but eh, it made my life a lot easier when I could see the meat of the changes without all the cosmetic details. The only thing I really changed about his patch was I made the list BROWSE instead of SINGLE so that there wouldn't be need for a deselect callback. Oh yeah, and update_show_plugins is called from different places (so that plugins can call load_plugin and have the window update properly). committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 29 May 2001 09:46:05 +0000
parents 3dfd2a83fb5e
children da324fe688b3
line wrap: on
line source

/* gtkspell - a spell-checking addon for GtkText
 * Copyright (c) 2000 Evan Martin.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 */

#ifndef __gtkspell_h__
#define __gtkspell_h__

/* PLEASE NOTE that this API is unstable and subject to change. */
#define GTKSPELL_VERSION "0.3.2"

extern int gtkspell_start(char *path, char *args[]);
/* Spawns the spell checking program.
 *
 * Arguments:
 *  - "path" should be the full path to the spell checking program, or NULL
 *    if you want to search the PATH for args[0].
 *  - "args" should be a array of arguments to the spell checking program.
 *    The first element should be the name of the program.
 *    You should give the argument to run the spell checking program in the
 *    "embedded" mode.  for ispell, this is "-a".
 *    The last element should be NULL.
 * Return:
 *  0 on success, and -1 on error.
 *
 * Example:
 *  char *args[] = { "ispell", "-a", NULL };
 *  if (gtkspell_start(NULL, args) < 0) {
 *  	fprintf(stderr, "Unable to start GtkSpell.\n");
 *  	return -1;
 *  }
 *
 */


extern void gtkspell_stop();
/* Stop the spellchecking program.
 * This kills the spell checker's process and frees memory.
 */

extern int gtkspell_running();
/* Is gtkspell running?
 *
 * Return:
 * 	nonzero if it running
 * 	zero if is not running
 *
 * Example:
 *  if (gtkspell_running())
 *  	printf("gtkspell is running.\n");
 */

extern void gtkspell_attach(GtkText *text);
/* Attach GtkSpell to a GtkText Widget.
 * This enables checking as you type and the popup menu.
 *
 * Arguments:
 *  - "text" is the widget to which GtkSpell should attach.
 *
 * Example:
 *  GtkWidget *text;
 *  text = gtk_text_new(NULL, NULL); 
 *  gtk_text_set_editable(GTK_TEXT(text), TRUE);
 *  gtkspell_attach(GTK_TEXT(text));
 */  

void gtkspell_detach(GtkText *gtktext);
/* Detach GtkSpell from a GtkText widget.
 * 
 * Arguments:
 *  - "text" is the widget from which GtkSpell should detach.
 * 
 */ 

void gtkspell_check_all(GtkText *gtktext);
/* Check and highlight the misspelled words.
 * Note that the popup menu will not work unless you gtkspell_attach().
 *
 * Arguments:
 *  - "text" is the widget to check.
 */

void gtkspell_uncheck_all(GtkText *gtktext);
/* Remove all of the highlighting from the widget.
 *
 * Arguments:
 *  - "text" is the widget to check.
 */

#endif /* __gtkspell_h__ */