2008-12-21 [paul] 3.7.0cvs2
[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 __GTKENCHANT_H__
32 #define __GTKENCHANT_H__
33
34 #ifdef HAVE_CONFIG_H
35 #  include "config.h"
36 #endif
37
38 #ifdef USE_ENCHANT
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, 
53                                                  const gchar *alt_dictionary, 
54                                                  const gchar *encoding,
55                                                  gint  misspelled_color,
56                                                  gboolean check_while_typing,
57                                                  gboolean recheck_when_changing_dict,
58                                                  gboolean use_alternate,  
59                                                  gboolean use_both_dicts,  
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
68 gboolean        gtkaspell_change_dict           (GtkAspell *gtkaspell,
69                                                  const gchar* dictionary,
70                                                          gboolean always_set_alt_dict);
71
72 gboolean        gtkaspell_change_alt_dict       (GtkAspell *gtkaspell,
73                                                  const gchar* alt_dictionary);
74
75
76 void            gtkaspell_check_forwards_go     (GtkAspell *gtkaspell);
77 void            gtkaspell_check_backwards       (GtkAspell *gtkaspell);
78
79 void            gtkaspell_check_all             (GtkAspell *gtkaspell);
80 void            gtkaspell_highlight_all         (GtkAspell *gtkaspell);
81
82 GtkWidget*      gtkaspell_dictionary_combo_new  (const gboolean refresh);
83
84 GtkTreeModel*   gtkaspell_dictionary_store_new  (void);
85 GtkTreeModel*   gtkaspell_dictionary_store_new_with_refresh
86                                                         (gboolean     refresh);
87
88 gchar*          gtkaspell_get_dictionary_menu_active_item
89                                                         (GtkComboBox *combo);
90 gint            gtkaspell_set_dictionary_menu_active_item
91                                                         (GtkComboBox *combo, 
92                                                          const gchar *dictionary);
93
94 GSList*         gtkaspell_make_config_menu              (GtkAspell      *gtkaspell);
95
96 gchar *gtkaspell_get_default_dictionary(GtkAspell *gtkaspell);
97
98 #endif /* USE_ENCHANT */
99 #endif /* __GTKENCHANT_H__ */