2006-08-22 [colin] 2.4.0cvs73
[claws.git] / src / gtk / gtkaspell.h
1 /*
2     Stuphead: (C) 2000,2001 Grigroy Bakunov, Sergey Pinaev
3  */
4 /* gtkaspell - a spell-checking addon for GtkText
5  * Copyright (c) 2001-2002 Melvin Hadasht
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  * 
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
20  */
21
22 /*
23  * Adapted by the Sylpheed Claws Team.
24  */
25
26 /*
27  *  Adapted for pspell (c) 2001-2002 Melvin Hadasht
28  *  Adapted for GNU/aspell (c) 2002 Melvin Hadasht
29  *
30  */
31
32 #ifndef __GTKASPELL_H__
33 #define __GTKASPELL_H__
34
35 #ifdef HAVE_CONFIG_H
36 #  include "config.h"
37 #endif
38
39 #ifdef USE_ASPELL
40
41 #include <gtk/gtkoptionmenu.h>
42
43 typedef struct _GtkAspell GtkAspell; /* Defined in gtkaspell.c */
44
45 void            gtkaspell_checkers_init         (void);
46
47 void            gtkaspell_checkers_quit         (void);
48
49 const char *    gtkaspell_checkers_strerror     (void);
50
51 void            gtkaspell_checkers_reset_error  (void);
52
53 GtkAspell*      gtkaspell_new                   (const gchar *dictionary_path,
54                                                  const gchar *dictionary, 
55                                                  const gchar *encoding,
56                                                  gint  misspelled_color,
57                                                  gboolean check_while_typing,
58                                                  gboolean recheck_when_changing_dict,
59                                                  gboolean use_alternate,  
60                                                  GtkTextView *gtktext,
61                                                  GtkWindow *parent_win,
62                                                  void (*spell_menu_cb)(void *data),
63                                                  void *data);
64
65 void            gtkaspell_delete                (GtkAspell *gtkaspell); 
66
67 guchar*         gtkaspell_get_dict              (GtkAspell *gtkaspell);
68
69 gboolean        gtkaspell_change_dict           (GtkAspell *gtkaspell,
70                                                  const gchar* dictionary);
71
72 guchar*         gtkaspell_get_path              (GtkAspell *gtkaspell);
73
74 gboolean        gtkaspell_set_sug_mode          (GtkAspell *gtkaspell, 
75                                                  gint  themode);
76
77 GSList*         gtkaspell_get_dictionary_list   (const char *aspell_path,
78                                                  gint refresh);
79
80 void            gtkaspell_free_dictionary_list  (GSList *list);
81
82 void            gtkaspell_check_forwards_go     (GtkAspell *gtkaspell);
83 void            gtkaspell_check_backwards       (GtkAspell *gtkaspell);
84
85 void            gtkaspell_check_all             (GtkAspell *gtkaspell);
86 void            gtkaspell_uncheck_all           (GtkAspell *gtkaspell);
87 void            gtkaspell_highlight_all         (GtkAspell *gtkaspell);
88
89 GtkWidget*      gtkaspell_dictionary_option_menu_new    (const gchar *aspell_path);
90
91 gchar*          gtkaspell_get_dictionary_menu_active_item
92                                                         (GtkWidget *menu);
93 gint            gtkaspell_set_dictionary_menu_active_item
94                                                         (GtkWidget *menu, 
95                                                          const gchar *dictionary);
96
97 GtkWidget*      gtkaspell_sugmode_option_menu_new       (gint sugmode);
98
99 void            gtkaspell_sugmode_option_menu_set       (GtkOptionMenu *optmenu,
100                                                          gint sugmode);
101
102 gint            gtkaspell_get_sugmode_from_option_menu  (GtkOptionMenu *optmenu);
103 GSList*         gtkaspell_make_config_menu              (GtkAspell      *gtkaspell);
104
105 #endif /* USE_ASPELL */
106 #endif /* __GTKASPELL_H__ */