Enchant: lib/enchant.h Source File

Enchant 2.8.2 Generic spell checking library

enchant.h
Go to the documentation of this file.
1
30 #ifndef ENCHANT_H
31 #define ENCHANT_H
32
33 #include <stdint.h> /* for uint32_t */
34 #include <sys/types.h> /* for size_t, ssize_t */
35
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 typedef struct _EnchantBroker EnchantBroker;
42 typedef struct _EnchantDict EnchantDict;
43
44 const char *enchant_get_version (void);
45
57 EnchantBroker *enchant_broker_init (void);
58
65 void enchant_broker_free (EnchantBroker * broker);
66
76 EnchantDict *enchant_broker_request_dict (EnchantBroker * broker, const char *const tag);
77
90 EnchantDict *enchant_broker_request_dict_with_pwl (EnchantBroker * broker, const char *const tag, const char *pwl);
91
99 EnchantDict *enchant_broker_request_pwl_dict (EnchantBroker * broker, const char *const pwl);
100
109 void enchant_broker_free_dict (EnchantBroker * broker, EnchantDict * dict);
110
119 int enchant_broker_dict_exists (EnchantBroker * broker, const char * const tag);
120
130 void enchant_broker_set_ordering (EnchantBroker * broker,
131 const char * const tag,
132 const char * const ordering);
142 const char *enchant_broker_get_error (EnchantBroker * broker);
143
154 typedef void (*EnchantBrokerDescribeFn) (const char * const provider_name,
155 const char * const provider_desc,
156 const char * const provider_dll_file,
157 void * user_data);
158
168 void enchant_broker_describe (EnchantBroker * broker,
169 EnchantBrokerDescribeFn fn,
170 void * user_data);
171
181 int enchant_dict_check (EnchantDict * dict, const char *const word, ssize_t len);
182
194 char **enchant_dict_suggest (EnchantDict * dict, const char *const word,
195 ssize_t len, size_t * out_n_suggs);
196
206 void enchant_dict_add (EnchantDict * dict, const char *const word, ssize_t len);
207
214 void enchant_dict_add_to_session (EnchantDict * dict, const char *const word, ssize_t len);
215
225 void enchant_dict_remove (EnchantDict * dict, const char *const word, ssize_t len);
226
233 void enchant_dict_remove_from_session (EnchantDict * dict, const char *const word, ssize_t len);
234
243 int enchant_dict_is_added (EnchantDict * dict, const char *const word, ssize_t len);
244
255 int enchant_dict_is_removed (EnchantDict * dict, const char *const word, ssize_t len);
256
268 void enchant_dict_store_replacement (EnchantDict * dict,
269 const char *const mis, ssize_t mis_len,
270 const char *const cor, ssize_t cor_len);
271
279 void enchant_dict_free_string_list (EnchantDict * dict, char **string_list);
280
290 const char *enchant_dict_get_error (EnchantDict * dict);
291
307 const char *enchant_dict_get_extra_word_characters (EnchantDict * dict);
308
336 int enchant_dict_is_word_character (EnchantDict * dict, uint32_t uc, size_t n);
337
349 typedef void (*EnchantDictDescribeFn) (const char * const lang_tag,
350 const char * const provider_name,
351 const char * const provider_desc,
352 const char * const provider_file,
353 void * user_data);
354
363 void enchant_dict_describe (EnchantDict * dict,
364 EnchantDictDescribeFn fn,
365 void * user_data);
366
375 void enchant_broker_list_dicts (EnchantBroker * broker,
376 EnchantDictDescribeFn fn,
377 void * user_data);
378
385 void enchant_set_prefix_dir(const char *);
386
387 #ifdef __cplusplus
388 }
389 #endif
390
391 #endif /* ENCHANT_H */
enchant_dict_store_replacement
void enchant_dict_store_replacement(EnchantDict *dict, const char *const mis, ssize_t mis_len, const char *const cor, ssize_t cor_len)
EnchantBrokerDescribeFn
void(* EnchantBrokerDescribeFn)(const char *const provider_name, const char *const provider_desc, const char *const provider_dll_file, void *user_data)
Definition: enchant.h:154
enchant_broker_set_ordering
void enchant_broker_set_ordering(EnchantBroker *broker, const char *const tag, const char *const ordering)
enchant_set_prefix_dir
void enchant_set_prefix_dir(const char *)
enchant_broker_request_dict_with_pwl
EnchantDict * enchant_broker_request_dict_with_pwl(EnchantBroker *broker, const char *const tag, const char *pwl)
enchant_dict_remove_from_session
void enchant_dict_remove_from_session(EnchantDict *dict, const char *const word, ssize_t len)
enchant_dict_get_extra_word_characters
const char * enchant_dict_get_extra_word_characters(EnchantDict *dict)
enchant_dict_is_word_character
int enchant_dict_is_word_character(EnchantDict *dict, uint32_t uc, size_t n)
enchant_broker_request_dict
EnchantDict * enchant_broker_request_dict(EnchantBroker *broker, const char *const tag)
enchant_dict_suggest
char ** enchant_dict_suggest(EnchantDict *dict, const char *const word, ssize_t len, size_t *out_n_suggs)
enchant_broker_init
EnchantBroker * enchant_broker_init(void)
enchant_broker_free
void enchant_broker_free(EnchantBroker *broker)
enchant_dict_get_error
const char * enchant_dict_get_error(EnchantDict *dict)
enchant_dict_is_added
int enchant_dict_is_added(EnchantDict *dict, const char *const word, ssize_t len)
enchant_broker_dict_exists
int enchant_broker_dict_exists(EnchantBroker *broker, const char *const tag)
enchant_broker_request_pwl_dict
EnchantDict * enchant_broker_request_pwl_dict(EnchantBroker *broker, const char *const pwl)
enchant_dict_add_to_session
void enchant_dict_add_to_session(EnchantDict *dict, const char *const word, ssize_t len)
enchant_dict_describe
void enchant_dict_describe(EnchantDict *dict, EnchantDictDescribeFn fn, void *user_data)
enchant_broker_free_dict
void enchant_broker_free_dict(EnchantBroker *broker, EnchantDict *dict)
enchant_dict_free_string_list
void enchant_dict_free_string_list(EnchantDict *dict, char **string_list)
enchant_dict_add
void enchant_dict_add(EnchantDict *dict, const char *const word, ssize_t len)
EnchantDictDescribeFn
void(* EnchantDictDescribeFn)(const char *const lang_tag, const char *const provider_name, const char *const provider_desc, const char *const provider_file, void *user_data)
Definition: enchant.h:349
enchant_dict_is_removed
int enchant_dict_is_removed(EnchantDict *dict, const char *const word, ssize_t len)
enchant_dict_remove
void enchant_dict_remove(EnchantDict *dict, const char *const word, ssize_t len)
enchant_dict_check
int enchant_dict_check(EnchantDict *dict, const char *const word, ssize_t len)
enchant_broker_get_error
const char * enchant_broker_get_error(EnchantBroker *broker)