view src/gtkspell.h @ 2906:538c58b43eff

[gaim-migrate @ 2919] save save me from this wandered around the town all the thousand things i might miss and you think we'll suffer much think we'll close our eyes just to see the light pass us by with tomorrow coming hope that i don't let you down again said i'm so glad to be here does it mean a thing if only i could breathe what you breathe if only i could see what you see sit we'll take our time watching the flowers grow all the friends we've known say goodbye and you did you suffer much did you close your eyes just to see the night rush on by gathered all around you hope that we don't let you down again i said i'm so glad to be here does it mean a thing if only i could breathe what you breathe if only i could see what you see i said i'm so glad to be here does it mean a thing if only i could breathe what you breathe if only i could see what you see if only i could just believe a thing --Moist, "Breathe" (as transcribed by http://www.veddma.com/veddma/moist.htm) Patches from: Ari Pollak Ben Miller Mark Doliner Sean Egan Vincas Ciziunas Thanks everyone. Somewhere in the middle of all of this it started to get really tedious and annoying. I think it's getting close to the point where I quit. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 21 Dec 2001 10:23:04 +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__ */