2010-07-07 17:40:50 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file AppleSpeller.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Stephan Witt
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LYX_SUPPORT_SPELLCHECK_H
|
|
|
|
#define LYX_SUPPORT_SPELLCHECK_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-08-05 20:10:40 +00:00
|
|
|
typedef enum SpellCheckResult {
|
|
|
|
SPELL_CHECK_FAILED,
|
|
|
|
SPELL_CHECK_OK,
|
|
|
|
SPELL_CHECK_IGNORED,
|
|
|
|
SPELL_CHECK_LEARNED
|
|
|
|
} SpellCheckResult ;
|
|
|
|
|
2010-07-07 17:40:50 +00:00
|
|
|
typedef struct AppleSpellerRec * AppleSpeller ;
|
|
|
|
|
|
|
|
AppleSpeller newAppleSpeller(void);
|
|
|
|
void freeAppleSpeller(AppleSpeller speller);
|
|
|
|
|
2010-09-04 07:48:15 +00:00
|
|
|
SpellCheckResult AppleSpeller_check(AppleSpeller speller, const char * word, const char * lang);
|
|
|
|
void AppleSpeller_ignore(AppleSpeller speller, const char * word);
|
|
|
|
size_t AppleSpeller_makeSuggestion(AppleSpeller speller, const char * word, const char * lang);
|
|
|
|
const char * AppleSpeller_getSuggestion(AppleSpeller speller, size_t pos);
|
|
|
|
void AppleSpeller_learn(AppleSpeller speller, const char * word);
|
|
|
|
void AppleSpeller_unlearn(AppleSpeller speller, const char * word);
|
|
|
|
int AppleSpeller_hasLanguage(AppleSpeller speller, const char * lang);
|
|
|
|
int AppleSpeller_numMisspelledWords(AppleSpeller speller);
|
|
|
|
void AppleSpeller_misspelledWord(AppleSpeller speller, int index, int * start, int * length);
|
2010-07-07 17:40:50 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|