📄 aspell.h
字号:
extern const struct AspellErrorInfo * const aerror_language_not_supported;
extern const struct AspellErrorInfo * const aerror_no_wordlist_for_lang;
extern const struct AspellErrorInfo * const aerror_mismatched_language;
extern const struct AspellErrorInfo * const aerror_encoding;
extern const struct AspellErrorInfo * const aerror_unknown_encoding;
extern const struct AspellErrorInfo * const aerror_encoding_not_supported;
extern const struct AspellErrorInfo * const aerror_conversion_not_supported;
extern const struct AspellErrorInfo * const aerror_pipe;
extern const struct AspellErrorInfo * const aerror_cant_create_pipe;
extern const struct AspellErrorInfo * const aerror_process_died;
extern const struct AspellErrorInfo * const aerror_bad_input;
extern const struct AspellErrorInfo * const aerror_invalid_word;
extern const struct AspellErrorInfo * const aerror_word_list_flags;
extern const struct AspellErrorInfo * const aerror_invalid_flag;
extern const struct AspellErrorInfo * const aerror_conflicting_flags;
/******************************* speller *******************************/
typedef struct AspellSpeller AspellSpeller;
typedef struct AspellCanHaveError * (__cdecl * PFUNC_new_aspell_speller)(struct AspellConfig * config);
typedef struct AspellSpeller * (__cdecl * PFUNC_to_aspell_speller)(struct AspellCanHaveError * obj);
typedef void (__cdecl * PFUNC_delete_aspell_speller)(struct AspellSpeller * ths);
typedef unsigned int (__cdecl * PFUNC_aspell_speller_error_number)(const struct AspellSpeller * ths);
typedef const char * (__cdecl * PFUNC_aspell_speller_error_message)(const struct AspellSpeller * ths);
typedef const struct AspellError * (__cdecl * PFUNC_aspell_speller_error)(const struct AspellSpeller * ths);
typedef struct AspellConfig * (__cdecl * PFUNC_aspell_speller_config)(struct AspellSpeller * ths);
/* returns 0 if it is not in the dictionary,
* 1 if it is, or -1 on error. */
typedef int (__cdecl * PFUNC_aspell_speller_check)(struct AspellSpeller * ths, const char * word, int word_size);
typedef int (__cdecl * PFUNC_aspell_speller_add_to_personal)(struct AspellSpeller * ths, const char * word, int word_size);
typedef int (__cdecl * PFUNC_aspell_speller_add_to_session)(struct AspellSpeller * ths, const char * word, int word_size);
typedef const struct AspellWordList * (__cdecl * PFUNC_aspell_speller_personal_word_list)(struct AspellSpeller * ths);
typedef const struct AspellWordList * (__cdecl * PFUNC_aspell_speller_session_word_list)(struct AspellSpeller * ths);
typedef const struct AspellWordList * (__cdecl * PFUNC_aspell_speller_main_word_list)(struct AspellSpeller * ths);
typedef int (__cdecl * PFUNC_aspell_speller_save_all_word_lists)(struct AspellSpeller * ths);
typedef int (__cdecl * PFUNC_aspell_speller_clear_session)(struct AspellSpeller * ths);
/* Return null on error.
* the word list returned by suggest is only valid until the next
* call to suggest */
typedef const struct AspellWordList * (__cdecl * PFUNC_aspell_speller_suggest)(struct AspellSpeller * ths, const char * word, int word_size);
typedef int (__cdecl * PFUNC_aspell_speller_store_replacement)(struct AspellSpeller * ths, const char * mis, int mis_size, const char * cor, int cor_size);
/******************************** filter ********************************/
typedef struct AspellFilter AspellFilter;
typedef void (__cdecl * PFUNC_delete_aspell_filter)(struct AspellFilter * ths);
typedef unsigned int (__cdecl * PFUNC_aspell_filter_error_number)(const struct AspellFilter * ths);
typedef const char * (__cdecl * PFUNC_aspell_filter_error_message)(const struct AspellFilter * ths);
typedef const struct AspellError * (__cdecl * PFUNC_aspell_filter_error)(const struct AspellFilter * ths);
typedef struct AspellFilter * (__cdecl * PFUNC_to_aspell_filter)(struct AspellCanHaveError * obj);
/*************************** document checker ***************************/
struct AspellToken {
unsigned int offset;
unsigned int len;
};
typedef struct AspellToken AspellToken;
typedef struct AspellDocumentChecker AspellDocumentChecker;
typedef void (__cdecl * PFUNC_delete_aspell_document_checker)(struct AspellDocumentChecker * ths);
typedef unsigned int (__cdecl * PFUNC_aspell_document_checker_error_number)(const struct AspellDocumentChecker * ths);
typedef const char * (__cdecl * PFUNC_aspell_document_checker_error_message)(const struct AspellDocumentChecker * ths);
typedef const struct AspellError * (__cdecl * PFUNC_aspell_document_checker_error)(const struct AspellDocumentChecker * ths);
/* Creates a new document checker.
* The speller class is expect to last until this
* class is destroyed.
* If config is given it will be used to overwide
* any relevent options set by this speller class.
* The config class is not once this function is done.
* If filter is given then it will take ownership of
* the filter class and use it to do the filtering.
* You are expected to free the checker when done. */
typedef struct AspellCanHaveError * (__cdecl * PFUNC_new_aspell_document_checker)(struct AspellSpeller * speller);
typedef struct AspellDocumentChecker * (__cdecl * PFUNC_to_aspell_document_checker)(struct AspellCanHaveError * obj);
/* reset the internal state of the filter.
* should be called whenever a new document is being filtered */
typedef void (__cdecl * PFUNC_aspell_document_checker_reset)(struct AspellDocumentChecker * ths);
/* process a string
* The string passed in should only be split on white space
* characters. Furthermore, between calles to reset, each string
* should be passed in exactly once and in the order they appeared
* in the document. Passing in stings out of order, skipping
* strings or passing them in more than once may lead to undefined
* results. */
typedef void (__cdecl * PFUNC_aspell_document_checker_process)(struct AspellDocumentChecker * ths, const char * str, int size);
/* returns the next misspelled word in the processed string
* if there are no more misspelled word than token.word
* will be null and token.size will be 0 */
typedef struct AspellToken (__cdecl * PFUNC_aspell_document_checker_next_misspelling)(struct AspellDocumentChecker * ths);
/* returns the underlying filter class */
typedef struct AspellFilter * (__cdecl * PFUNC_aspell_document_checker_filter)(struct AspellDocumentChecker * ths);
/****************************** word list ******************************/
typedef struct AspellWordList AspellWordList;
typedef int (__cdecl * PFUNC_aspell_word_list_empty)(const struct AspellWordList * ths);
typedef unsigned int (__cdecl * PFUNC_aspell_word_list_size)(const struct AspellWordList * ths);
typedef struct AspellStringEnumeration * (__cdecl * PFUNC_aspell_word_list_elements)(const struct AspellWordList * ths);
/************************** string enumeration **************************/
typedef struct AspellStringEnumeration AspellStringEnumeration;
typedef void (__cdecl * PFUNC_delete_aspell_string_enumeration)(struct AspellStringEnumeration * ths);
typedef struct AspellStringEnumeration * (__cdecl * PFUNC_aspell_string_enumeration_clone)(const struct AspellStringEnumeration * ths);
typedef void (__cdecl * PFUNC_aspell_string_enumeration_assign)(struct AspellStringEnumeration * ths, const struct AspellStringEnumeration * other);
typedef int (__cdecl * PFUNC_aspell_string_enumeration_at_end)(const struct AspellStringEnumeration * ths);
typedef const char * (__cdecl * PFUNC_aspell_string_enumeration_next)(struct AspellStringEnumeration * ths);
/********************************* info *********************************/
struct AspellModuleInfo {
const char * name;
double order_num;
const char * lib_dir;
struct AspellStringList * dict_dirs;
struct AspellStringList * dict_exts;
};
typedef struct AspellModuleInfo AspellModuleInfo;
struct AspellDictInfo {
/* name to identify the dictionary by */
const char * name;
const char * code;
const char * jargon;
int size;
const char * size_str;
struct AspellModuleInfo * module;
};
typedef struct AspellDictInfo AspellDictInfo;
typedef struct AspellModuleInfoList AspellModuleInfoList;
typedef struct AspellModuleInfoList * (__cdecl * PFUNC_get_aspell_module_info_list)(struct AspellConfig * config);
typedef int (__cdecl * PFUNC_aspell_module_info_list_empty)(const struct AspellModuleInfoList * ths);
typedef unsigned int (__cdecl * PFUNC_aspell_module_info_list_size)(const struct AspellModuleInfoList * ths);
typedef struct AspellModuleInfoEnumeration * (__cdecl * PFUNC_aspell_module_info_list_elements)(const struct AspellModuleInfoList * ths);
typedef struct AspellDictInfoList AspellDictInfoList;
typedef struct AspellDictInfoList * (__cdecl * PFUNC_get_aspell_dict_info_list)(struct AspellConfig * config);
typedef int (__cdecl * PFUNC_aspell_dict_info_list_empty)(const struct AspellDictInfoList * ths);
typedef unsigned int (__cdecl * PFUNC_aspell_dict_info_list_size)(const struct AspellDictInfoList * ths);
typedef struct AspellDictInfoEnumeration * (__cdecl * PFUNC_aspell_dict_info_list_elements)(const struct AspellDictInfoList * ths);
typedef struct AspellModuleInfoEnumeration AspellModuleInfoEnumeration;
typedef int (__cdecl * PFUNC_aspell_module_info_enumeration_at_end)(const struct AspellModuleInfoEnumeration * ths);
typedef const struct AspellModuleInfo * (__cdecl * PFUNC_aspell_module_info_enumeration_next)(struct AspellModuleInfoEnumeration * ths);
typedef void (__cdecl * PFUNC_delete_aspell_module_info_enumeration)(struct AspellModuleInfoEnumeration * ths);
typedef struct AspellModuleInfoEnumeration * (__cdecl * PFUNC_aspell_module_info_enumeration_clone)(const struct AspellModuleInfoEnumeration * ths);
typedef void (__cdecl * PFUNC_aspell_module_info_enumeration_assign)(struct AspellModuleInfoEnumeration * ths, const struct AspellModuleInfoEnumeration * other);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -