~ubuntu-branches/debian/jessie/liblouis/jessie

« back to all changes in this revision

Viewing changes to liblouis/liblouis.h.in

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Thibault
  • Date: 2010-01-12 23:48:47 UTC
  • mto: (1.1.4 upstream) (5.2.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100112234847-ph9xdk3lrjdox6ks
ImportĀ upstreamĀ versionĀ 1.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* liblouis Braille Translation and Back-Translation Library
 
2
 
 
3
   Based on the Linux screenreader BRLTTY, copyright (C) 1999-2006 by
 
4
   The BRLTTY Team
 
5
 
 
6
   Copyright (C) 2004, 2005, 2006, 2009 ViewPlus Technologies, Inc.
 
7
   www.viewplus.com and JJB Software, Inc. www.jjb-software.com
 
8
 
 
9
   liblouis is free software: you can redistribute it and/or modify it
 
10
   under the terms of the GNU Lesser General Public License as
 
11
   published by the Free Software Foundation, either version 3 of the
 
12
   License, or (at your option) any later version.
 
13
 
 
14
   liblouis is distributed in the hope that it will be useful, but
 
15
   WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
17
   Lesser General Public License for more details.
 
18
 
 
19
   You should have received a copy of the GNU Lesser General Public
 
20
   License along with this program. If not, see
 
21
   <http://www.gnu.org/licenses/>.
 
22
 
 
23
   Maintained by John J. Boyer john.boyer@abilitiessoft.com
 
24
   */
 
25
 
 
26
#ifndef __LIBLOUIS_H_
 
27
#define __LIBLOUIS_H_
 
28
#ifdef __cplusplus
 
29
extern "C"
 
30
{
 
31
#endif                          /* __cplusplus */
 
32
 
 
33
#define widechar @WIDECHAR_TYPE@
 
34
 
 
35
#ifdef _WIN32
 
36
#define EXPORT_CALL __stdcall
 
37
char * EXPORT_CALL lou_getProgramPath (void);
 
38
#else
 
39
#define EXPORT_CALL
 
40
#endif
 
41
 
 
42
  typedef enum
 
43
  {
 
44
    plain_text = 0,
 
45
    italic = 1,
 
46
    underline = 2,
 
47
    bold = 4,
 
48
    computer_braille = 8
 
49
  } typeforms;
 
50
#define comp_emph_1 italic
 
51
#define comp_emph_2 underline
 
52
#define comp_emph_3 bold
 
53
 
 
54
  typedef enum
 
55
  {
 
56
    noContractions = 1,
 
57
    compbrlAtCursor = 2,
 
58
    dotsIO = 4,
 
59
    comp8Dots = 8,
 
60
    pass1Only = 16
 
61
  } translationModes;
 
62
 
 
63
char * EXPORT_CALL lou_version ();
 
64
 
 
65
  int EXPORT_CALL lou_translateString
 
66
    (const char *trantab,
 
67
     const widechar *inbuf,
 
68
     int *inlen,
 
69
     widechar * outbuf,
 
70
     int *outlen, char *typeform, char *spacing, int mode);
 
71
 
 
72
  int EXPORT_CALL lou_translate (const char *trantab, const widechar
 
73
                     *inbuf,
 
74
                     int *inlen, widechar * outbuf, int *outlen,
 
75
                     char *typeform, char *spacing, int *outputPos, int 
 
76
*inputPos, int *cursorPos, int mode);
 
77
int EXPORT_CALL lou_hyphenate (const char *trantab, const widechar
 
78
               *inbuf,
 
79
      int inlen, char *hyphens, int mode);
 
80
 
 
81
   int EXPORT_CALL lou_backTranslateString (const char *trantab,
 
82
                               const widechar *inbuf,
 
83
                               int *inlen,
 
84
                               widechar * outbuf,
 
85
                               int *outlen, char *typeform, char
 
86
                               *spacing, int mode);
 
87
 
 
88
  int EXPORT_CALL lou_backTranslate (const char *trantab, const widechar
 
89
                         *inbuf,
 
90
                         int *inlen, widechar * outbuf, int *outlen, 
 
91
char *typeform, char *spacing, int
 
92
                         *outputPos, int *inputPos, int *cursorPos, int
 
93
                         mode);
 
94
  void EXPORT_CALL lou_logPrint (char *format, ...);
 
95
/* prints error messages to a file */
 
96
 
 
97
  void EXPORT_CALL lou_logFile (char *filename);
 
98
/* Specifies the name of the file to be used by lou_logPrint. If it is 
 
99
* not used, this file is stderr*/
 
100
 
 
101
  int EXPORT_CALL lou_readCharFromFile (const char *fileName, int *mode);
 
102
/*Read a character from a file, whether big-encian, little-endian or 
 
103
* ASCII8, and return it as an integer. EOF at end of file. Mode = 1 on 
 
104
* first call, any other value thereafter*/
 
105
 
 
106
  void * EXPORT_CALL lou_getTable (const char *trantab);
 
107
/* This function checks a table for errors. If none are found it loads 
 
108
* the table into memory and returns a pointer to it. if errors are found 
 
109
* it returns a null pointer. It is called by _ou_translateString and 
 
110
* lou_backTranslateString and also by functions in liblouisxml
 
111
*/
 
112
 
 
113
  void EXPORT_CALL lou_free (void);
 
114
/* This function should be called at the end of 
 
115
* the application to free all memory allocated by liblouis. */
 
116
 
 
117
#ifdef __cplusplus
 
118
}
 
119
#endif                          /* __cplusplus */
 
120
 
 
121
#endif                          /*LibLOUIS_H_ */