| liblouis.h | | liblouis.h | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| #endif /* __cplusplus */ | | #endif /* __cplusplus */ | |
| | | | |
| #include "louiscfg.h" | | #include "louiscfg.h" | |
| | | | |
| #if WIDECHAR_SIZE == 2 | | #if WIDECHAR_SIZE == 2 | |
| #define widechar unsigned short int | | #define widechar unsigned short int | |
| #else | | #else | |
| #define widechar unsigned int | | #define widechar unsigned int | |
| #endif | | #endif | |
| | | | |
|
| | | #ifdef _WIN32 | |
| | | #define EXPORT_CALL __stdcall | |
| | | char * EXPORT_CALL lou_getProgramPath (void); | |
| | | #else | |
| | | #define EXPORT_CALL | |
| | | #endif | |
| | | | |
| typedef enum | | typedef enum | |
| { | | { | |
| plain_text = 0, | | plain_text = 0, | |
| italic = 1, | | italic = 1, | |
| underline = 2, | | underline = 2, | |
| bold = 4, | | bold = 4, | |
| computer_braille = 8 | | computer_braille = 8 | |
| } typeforms; | | } typeforms; | |
| #define comp_emph_1 italic | | #define comp_emph_1 italic | |
| #define comp_emph_2 underline | | #define comp_emph_2 underline | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 75 | |
| | | | |
| typedef enum | | typedef enum | |
| { | | { | |
| noContractions = 1, | | noContractions = 1, | |
| compbrlAtCursor = 2, | | compbrlAtCursor = 2, | |
| dotsIO = 4, | | dotsIO = 4, | |
| comp8Dots = 8, | | comp8Dots = 8, | |
| pass1Only = 16 | | pass1Only = 16 | |
| } translationModes; | | } translationModes; | |
| | | | |
|
| char *lou_version (); | | char * EXPORT_CALL lou_version (); | |
| | | | |
|
| int lou_translateString | | int EXPORT_CALL lou_translateString | |
| (const char *trantab, | | (const char *trantab, | |
| const widechar *inbuf, | | const widechar *inbuf, | |
| int *inlen, | | int *inlen, | |
| widechar * outbuf, | | widechar * outbuf, | |
| int *outlen, char *typeform, char *spacing, int mode); | | int *outlen, char *typeform, char *spacing, int mode); | |
| | | | |
|
| int lou_translate (const char *trantab, const widechar | | int EXPORT_CALL lou_translate (const char *trantab, const widechar | |
| *inbuf, | | *inbuf, | |
| int *inlen, widechar * outbuf, int *outlen, | | int *inlen, widechar * outbuf, int *outlen, | |
| char *typeform, char *spacing, int *outputPos, int | | char *typeform, char *spacing, int *outputPos, int | |
| *inputPos, int *cursorPos, int mode); | | *inputPos, int *cursorPos, int mode); | |
|
| int lou_hyphenate (const char *trantab, const widechar | | int EXPORT_CALL lou_hyphenate (const char *trantab, const widechar | |
| *inbuf, | | *inbuf, | |
| int inlen, char *hyphens, int mode); | | int inlen, char *hyphens, int mode); | |
| | | | |
|
| int lou_backTranslateString (const char *trantab, | | int EXPORT_CALL lou_backTranslateString (const char *trantab, | |
| const widechar *inbuf, | | const widechar *inbuf, | |
| int *inlen, | | int *inlen, | |
| widechar * outbuf, | | widechar * outbuf, | |
| int *outlen, char *typeform, char | | int *outlen, char *typeform, char | |
| *spacing, int mode); | | *spacing, int mode); | |
| | | | |
|
| int lou_backTranslate (const char *trantab, const widechar | | int EXPORT_CALL lou_backTranslate (const char *trantab, const widechar | |
| *inbuf, | | *inbuf, | |
| int *inlen, widechar * outbuf, int *outlen, | | int *inlen, widechar * outbuf, int *outlen, | |
| char *typeform, char *spacing, int | | char *typeform, char *spacing, int | |
| *outputPos, int *inputPos, int *cursorPos, int | | *outputPos, int *inputPos, int *cursorPos, int | |
| mode); | | mode); | |
|
| void lou_logPrint (char *format, ...); | | void EXPORT_CALL lou_logPrint (char *format, ...); | |
| /* prints error messages to a file */ | | /* prints error messages to a file */ | |
| | | | |
|
| void lou_logFile (char *filename); | | void EXPORT_CALL lou_logFile (char *filename); | |
| /* Specifies the name of the file to be used by lou_logPrint. If it is | | /* Specifies the name of the file to be used by lou_logPrint. If it is | |
| * not used, this file is stderr*/ | | * not used, this file is stderr*/ | |
| | | | |
|
| int lou_readCharFromFile (const char *fileName, int *mode); | | int EXPORT_CALL lou_readCharFromFile (const char *fileName, int *mode); | |
| /*Read a character from a file, whether big-encian, little-endian or | | /*Read a character from a file, whether big-encian, little-endian or | |
| * ASCII8, and return it as an integer. EOF at end of file. Mode = 1 on | | * ASCII8, and return it as an integer. EOF at end of file. Mode = 1 on | |
| * first call, any other value thereafter*/ | | * first call, any other value thereafter*/ | |
| | | | |
|
| void *lou_getTable (const char *trantab); | | void * EXPORT_CALL lou_getTable (const char *trantab); | |
| /* This function checks a table for errors. If none are found it loads | | /* This function checks a table for errors. If none are found it loads | |
| * the table into memory and returns a pointer to it. if errors are found | | * the table into memory and returns a pointer to it. if errors are found | |
| * it returns a null pointer. It is called by _ou_translateString and | | * it returns a null pointer. It is called by _ou_translateString and | |
| * lou_backTranslateString and also by functions in liblouisxml | | * lou_backTranslateString and also by functions in liblouisxml | |
| */ | | */ | |
| | | | |
|
| void lou_free (void); | | void EXPORT_CALL lou_free (void); | |
| /* This function should be called at the end of | | /* This function should be called at the end of | |
| * the application to free all memory allocated by liblouis. */ | | * the application to free all memory allocated by liblouis. */ | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif /* __cplusplus */ | | #endif /* __cplusplus */ | |
| | | | |
| #endif /*LibLOUIS_H_ */ | | #endif /*LibLOUIS_H_ */ | |
| | | | |
End of changes. 12 change blocks. |
| 11 lines changed or deleted | | 18 lines changed or added | |
|