]> git.lyx.org Git - lyx.git/blob - src/support/AppleSpeller.h
647471a52bf193ba18db0f4044e348b29229409f
[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 checkAppleSpeller(AppleSpeller speller, const char * word, const char * lang);
32 void ignoreAppleSpeller(AppleSpeller speller, const char * word);
33 size_t makeSuggestionAppleSpeller(AppleSpeller speller, const char * word, const char * lang);
34 const char * getSuggestionAppleSpeller(AppleSpeller speller, size_t pos);
35 void learnAppleSpeller(AppleSpeller speller, const char * word);
36 void unlearnAppleSpeller(AppleSpeller speller, const char * word);
37 int hasLanguageAppleSpeller(AppleSpeller speller, const char * lang);
38 int numMisspelledWordsAppleSpeller(AppleSpeller speller);
39 void misspelledWordAppleSpeller(AppleSpeller speller, int const position, int * start, int * length);
40
41 #ifdef __cplusplus
42 } // extern "C"
43 #endif
44
45 #endif