#include "TSpell.h"

#include <Files.h>

#define IS_SPELLED_CORRECTLY     (1)
#define IS_NOT_SPELLED_CORRECTLY (0)

#define MAXlong (unsigned long) (-1)

/* Definitions used when specifying dictionary types */

#define AUTO_DICT          (1)
#define SUGGEST_DICT       (2)
#define DOCUMENT_DICT      (4)
#define SKIP_DICT          (8)
#define USER_DICT          (16)
#define MAIN_DICT          (32)


#ifdef __WINDOWS_DLL__
#define FuncType		_export
#else
#define FuncType
#endif


extern "C"  void*	FuncType	StartSpellCheckSession();
extern "C"  void  FuncType	EndSpellCheckSession(void *Speller);
extern "C"  short FuncType	DictOpen(void *Speller, unsigned long *DictNum, short DictType,
							long Size, FioParam *theFile);
extern "C"  void  FuncType	DictClose(void *Speller, unsigned long DictNum);
extern "C"  short	FuncType	SelectWord(void *Speller, char *Word, char *Suggestion);
extern "C"  short FuncType 	CheckWord(void *Speller, unsigned long DictNum,short DictType,
							char *Word, WordInfo *Info);
extern "C"  short FuncType  	FindFirstSuggestion(void *Speller, unsigned long DictNum, short DictType,
							char *Word, char *Suggestion, char *Comment, short *AutoReplace,  CallBackProc CallBack);
extern "C"  short FuncType  	FindNextSuggestion(void *Speller, unsigned long DictNum, short DictType,
							char *Word, char *Suggestion, char *Comment, short *AutoReplace, CallBackProc CallBack);
extern "C"  short FuncType  	AddToDictionary(void *Speller, unsigned long DictNum, char *Word,
							char *Suggestion, char *Comment);
extern "C"  short FuncType  	FindFirstRegex(void *Speller, unsigned long DictNum, short DictType, char *Word,
							CallBackProc CallBack);
extern "C"  short FuncType  	FindNextRegex(void *Speller, unsigned long DictNum, short DictType, char *Word,
							CallBackProc CallBack);
extern "C"  short FuncType  	LocateWord(void *Speller, unsigned long DictNum, short DictType, char *Word);
extern "C"  short FuncType  	NextWord(void *Speller, unsigned long DictNum, short DictType, char *Word);
extern "C"  short FuncType  	CurrentWord(void *Speller, unsigned long DictNum, short DictType, char *Word);
extern "C"  short	FuncType	GetSpellError();
extern "C"  void  FuncType	FixCase(void *Speller, char *Word, short CaseCode);

