20dce2607e3f2b65133a7d75d669ca422eab9c7f
[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 3 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, see <http://www.gnu.org/licenses/>.
19  */
20
21 /*
22  * Adapted by the Claws Mail Team.
23  */
24
25 /*
26  *  Adapted for pspell (c) 2001-2002 Melvin Hadasht
27  *  Adapted for GNU/aspell (c) 2002 Melvin Hadasht
28  *
29  */
30
31 #ifndef __GTKASPELL_H__
32 #define __GTKASPELL_H__
33
34 #ifdef HAVE_CONFIG_H
35 #  include "config.h"
36 #endif
37
38 #ifdef USE_ASPELL
39
40 #include <gtk/gtk.h>
41
42 typedef struct _GtkAspell GtkAspell; /* Defined in gtkaspell.c */
43
44 void            gtkaspell_checkers_init         (void);
45
46 void            gtkaspell_checkers_quit         (void);
47
48 const char *    gtkaspell_checkers_strerror     (void);
49
50 void            gtkaspell_checkers_reset_error  (void);
51
52 GtkAspell*      gtkaspell_new                   (const gchar *dictionary_path,
53                                                  const gchar *dictionary, 
54                                                  const gchar *alt_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                                                  gboolean use_both_dicts,  
61                                                  GtkTextView *gtktext,
62                                                  GtkWindow *parent_win,
63                                                  void (*spell_menu_cb)(void *data),
64                                                  void *data);
65
66 void            gtkaspell_delete                (GtkAspell *gtkaspell); 
67
68
69 gboolean        gtkaspell_change_dict           (GtkAspell *gtkaspell,
70                                                  const gchar* dictionary,
71                                                          gboolean always_set_alt_dict);
72
73 gboolean        gtkaspell_change_alt_dict       (GtkAspell *gtkaspell,
74                                                  const gchar* alt_dictionary);
75
76
77 gboolean        gtkaspell_set_sug_mode          (GtkAspell *gtkaspell, 
78                                                  gint  themode);
79
80 void            gtkaspell_check_forwards_go     (GtkAspell *gtkaspell);
81 void            gtkaspell_check_backwards       (GtkAspell *gtkaspell);
82
83 void            gtkaspell_check_all             (GtkAspell *gtkaspell);
84 void            gtkaspell_highlight_all         (GtkAspell *gtkaspell);
85
86 GtkWidget*      gtkaspell_dictionary_combo_new  (const gchar *aspell_path,
87                                                  const gboolean refresh);
88
89 GtkTreeModel*   gtkaspell_dictionary_store_new  (const gchar *aspell_path);
90 GtkTreeModel*   gtkaspell_dictionary_store_new_with_refresh
91                                                         (const gchar *aspell_path,
92                                                          gboolean     refresh);
93
94 gchar*          gtkaspell_get_dictionary_menu_active_item
95                                                         (GtkComboBox *combo);
96 gint            gtkaspell_set_dictionary_menu_active_item
97                                                         (GtkComboBox *combo, 
98                                                          const gchar *dictionary);
99
100 GtkWidget*      gtkaspell_sugmode_combo_new     (gint sugmode);
101
102 GSList*         gtkaspell_make_config_menu              (GtkAspell      *gtkaspell);
103
104 gchar *gtkaspell_get_default_dictionary(GtkAspell *gtkaspell);
105
106 #endif /* USE_ASPELL */
107 #endif /* __GTKASPELL_H__ */