]> git.lyx.org Git - lyx.git/blob - src/support/AppleSpeller.h
Account for old versions of Pygments
[lyx.git] / src / support / AppleSpeller.h
1 // -*- C++ -*-
2 /**
3  * \file AppleSpeller.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Stephan Witt
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_SUPPORT_SPELLCHECK_H
13 #define LYX_SUPPORT_SPELLCHECK_H
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 typedef enum SpellCheckResult {
20         SPELL_CHECK_FAILED,
21         SPELL_CHECK_OK,
22         SPELL_CHECK_IGNORED,
23         SPELL_CHECK_LEARNED
24 } SpellCheckResult ;
25
26 typedef struct AppleSpellerRec * AppleSpeller ;
27
28 AppleSpeller newAppleSpeller(void);
29 void freeAppleSpeller(AppleSpeller speller);
30
31 SpellCheckResult AppleSpeller_check(AppleSpeller speller, const char * word, const char * lang);
32 void AppleSpeller_ignore(AppleSpeller speller, const char * word);
33 size_t AppleSpeller_makeSuggestion(AppleSpeller speller, const char * word, const char * lang);
34 const char * AppleSpeller_getSuggestion(AppleSpeller speller, size_t pos);
35 void AppleSpeller_learn(AppleSpeller speller, const char * word);
36 void AppleSpeller_unlearn(AppleSpeller speller, const char * word);
37 int AppleSpeller_hasLanguage(AppleSpeller speller, const char * lang);
38 int AppleSpeller_numMisspelledWords(AppleSpeller speller);
39 void AppleSpeller_misspelledWord(AppleSpeller speller, int index, int * start, int * length);
40
41 #ifdef __cplusplus
42 } // extern "C"
43 #endif
44
45 #endif