BrlAPI 1.0

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

brlapi.h
Go to the documentation of this file.
1 /* Programs/brlapi.h. Generated from brlapi.h.in by configure. */
2 /*
3 * libbrlapi - A library providing access to braille terminals for applications.
4 *
5 * Copyright (C) 2002-2015 by
6 * Samuel Thibault <Samuel.Thibault@ens-lyon.org>
7 * Sébastien Hinderer <Sebastien.Hinderer@ens-lyon.org>
8 *
9 * libbrlapi comes with ABSOLUTELY NO WARRANTY.
10 *
11 * This is free software, placed under the terms of the
12 * GNU Lesser General Public License, as published by the Free Software
13 * Foundation; either version 2.1 of the License, or (at your option) any
14 * later version. Please see the file LICENSE-LGPL for details.
15 *
16 * Web Page: http://brltty.com/
17 *
18 * This software is maintained by Dave Mielke <dave@mielke.cc>.
19 */
20
25 #ifndef BRLAPI_INCLUDED
26 #define BRLAPI_INCLUDED
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /* #undef BRLAPI_WIN32 */
33
38 #define BRLAPI_RELEASE "0.6.4"
39
41 #define BRLAPI_MAJOR 0
42
44 #define BRLAPI_MINOR 6
45
47 #define BRLAPI_REVISION 4
48
51 /* Types are defined there */
52 #include <sys/types.h>
53
54 #ifdef BRLAPI_WIN32
55 #include <windows.h>
56 #define BRLAPI_STDCALL __stdcall
57 #else /* BRLAPI_WIN32 */
58 #define BRLAPI_STDCALL
59 #endif /* BRLAPI_WIN32 */
60
61 #ifdef _MSC_VER
62 typedef __int64 uint64_t;
63 typedef __int32 uint32_t;
64 #define UINT64_C(x) (x ## Ui64)
65 #define PRIx64 "I64x"
66 typedef signed int ssize_t;
67 #else /* _MSC_VER */
68
69 /* this is for uint*_t */
70 #include <stdint.h>
71
72 /* NULL is defined there */
73 #include <unistd.h>
74
75 #include <inttypes.h> /* For PRIx64 */
76 #endif /* _MSC_VER */
77
78 #include <wchar.h>
79
102 typedef struct brlapi_handle_t brlapi_handle_t;
103
105 size_t BRLAPI_STDCALL brlapi_getHandleSize(void);
106
120 #define BRLAPI_SOCKETPORTNUM 4101
121 #define BRLAPI_SOCKETPORT "4101"
122
124 #define BRLAPI_SOCKETPATH "/var/lib/BrlAPI"
125
130 #define BRLAPI_ETCDIR "/etc"
131
135 #define BRLAPI_AUTHKEYFILE "brlapi.key"
136
138 #ifdef BRLAPI_WIN32
139 /* No authentication by default on Windows */
140 #define BRLAPI_DEFAUTH "none"
141 #else
142 #define BRLAPI_DEFAUTH BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE
143 #endif /* BRLAPI_WIN32 */
144
145 #ifdef __MINGW32__
146 typedef HANDLE brlapi_fileDescriptor;
147 #else /* __MINGW32__ */
148 typedef int brlapi_fileDescriptor;
149 #endif /* __MINGW32__ */
150
181 typedef struct {
189 char *auth;
190
199 char *host;
200 } brlapi_connectionSettings_t;
201
202 /* BRLAPI_SETTINGS_INITIALIZER */
205 #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
206
207 /* brlapi_openConnection */
252 #ifndef BRLAPI_NO_SINGLE_SESSION
253 brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
254 #endif /* BRLAPI_NO_SINGLE_SESSION */
255 brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
256
257 /* brlapi_closeConnection */
264 #ifndef BRLAPI_NO_SINGLE_SESSION
265 void BRLAPI_STDCALL brlapi_closeConnection(void);
266 #endif /* BRLAPI_NO_SINGLE_SESSION */
267 void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle);
268
284 #define BRLAPI_MAXNAMELENGTH 31
285
286 /* brlapi_getDriverName */
298 #ifndef BRLAPI_NO_SINGLE_SESSION
299 int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size);
300 #endif /* BRLAPI_NO_SINGLE_SESSION */
301 int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size);
302
303 /* brlapi_getDisplaySize */
305 #ifndef BRLAPI_NO_SINGLE_SESSION
306 int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y);
307 #endif /* BRLAPI_NO_SINGLE_SESSION */
308 int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y);
309
333 /* brlapi_enterTtyMode */
353 #ifndef BRLAPI_NO_SINGLE_SESSION
354 int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver);
355 #endif /* BRLAPI_NO_SINGLE_SESSION */
356 int BRLAPI_STDCALL brlapi__enterTtyMode(brlapi_handle_t *handle, int tty, const char *driver);
357
367 #define BRLAPI_TTY_DEFAULT -1
368
369 /* brlapi_enterTtyModeWithPath */
381 #ifndef BRLAPI_NO_SINGLE_SESSION
382 int BRLAPI_STDCALL brlapi_enterTtyModeWithPath(int *ttys, int count, const char *driver);
383 #endif /* BRLAPI_NO_SINGLE_SESSION */
384 int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, int *ttys, int count, const char *driver);
385
386 /* brlapi_leaveTtyMode */
393 #ifndef BRLAPI_NO_SINGLE_SESSION
394 int BRLAPI_STDCALL brlapi_leaveTtyMode(void);
395 #endif /* BRLAPI_NO_SINGLE_SESSION */
396 int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle);
397
398 /* brlapi_setFocus */
409 #ifndef BRLAPI_NO_SINGLE_SESSION
410 int BRLAPI_STDCALL brlapi_setFocus(int tty);
411 #endif /* BRLAPI_NO_SINGLE_SESSION */
412 int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty);
413
443 /* brlapi_writeText */
458 #ifndef BRLAPI_NO_SINGLE_SESSION
459 int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text);
460 #endif /* BRLAPI_NO_SINGLE_SESSION */
461 int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text);
462
463 /* brlapi_writeWText */
476 #ifndef BRLAPI_NO_SINGLE_SESSION
477 int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text);
478 #endif /* BRLAPI_NO_SINGLE_SESSION */
479 int BRLAPI_STDCALL brlapi__writeWText(brlapi_handle_t *handle, int cursor, const wchar_t *text);
480
481 /* brlapi_writeDots */
489 #ifndef BRLAPI_NO_SINGLE_SESSION
490 int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots);
491 #endif /* BRLAPI_NO_SINGLE_SESSION */
492 int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots);
493
494 /* brlapi_writeArguments_t */
496 typedef struct {
497 int displayNumber ;
498 unsigned int regionBegin ;
499 unsigned int regionSize ;
500 char *text ;
501 int textSize ;
502 unsigned char *andMask ;
503 unsigned char *orMask ;
504 int cursor ;
505 char *charset ;
506 } brlapi_writeArguments_t;
507
512 #define BRLAPI_DISPLAY_DEFAULT -1
513
518 #define BRLAPI_CURSOR_LEAVE -1
519
524 #define BRLAPI_CURSOR_OFF 0
525
526 /* BRLAPI_WRITEARGUMENTS_INITIALIZER */
536 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { \
537 .displayNumber = BRLAPI_DISPLAY_DEFAULT, \
538 .regionBegin = 0, \
539 .regionSize = 0, \
540 .text = NULL, \
541 .textSize = -1, \
542 .andMask = NULL, \
543 .orMask = NULL, \
544 .cursor = BRLAPI_CURSOR_LEAVE, \
545 .charset = NULL \
546 }
547
548 /* brlapi_write */
584 #ifndef BRLAPI_NO_SINGLE_SESSION
585 int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments);
586 #endif /* BRLAPI_NO_SINGLE_SESSION */
587 int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments);
588
591 #include "brlapi_keycodes.h"
592
606 /* brlapi_expandedKeyCode_t */
608 typedef struct {
609 unsigned int type ;
610 unsigned int command ;
611 unsigned int argument ;
612 unsigned int flags ;
613 } brlapi_expandedKeyCode_t;
614
615 /* brlapi_expandKeyCode */
623 int BRLAPI_STDCALL brlapi_expandKeyCode (brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion);
624
625 /* brlapi_describedKeyCode_t */
627 typedef struct {
628 const char *type ;
629 const char *command ;
630 unsigned int argument ;
631 unsigned int flags ;
632 const char *flag[64 - BRLAPI_KEY_FLAGS_SHIFT] ;
633 brlapi_expandedKeyCode_t values ;
634 } brlapi_describedKeyCode_t;
635
636 /* brlapi_describeKeyCode */
644 int BRLAPI_STDCALL brlapi_describeKeyCode (brlapi_keyCode_t code, brlapi_describedKeyCode_t *description);
645
647 #define BRLAPI_UC_ROW 0x2800UL
648
649 /* brlapi_readKey */
716 #ifndef BRLAPI_NO_SINGLE_SESSION
717 int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code);
718 #endif /* BRLAPI_NO_SINGLE_SESSION */
719 int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code);
720
722 typedef enum {
723 brlapi_rangeType_all,
724 brlapi_rangeType_type,
725 brlapi_rangeType_command,
726 brlapi_rangeType_key,
727 brlapi_rangeType_code,
728 } brlapi_rangeType_t;
729
730 /* brlapi_ignoreKeys */
743 #ifndef BRLAPI_NO_SINGLE_SESSION
744 int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
745 #endif /* BRLAPI_NO_SINGLE_SESSION */
746 int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
747
748 /* brlapi_acceptKeys */
761 #ifndef BRLAPI_NO_SINGLE_SESSION
762 int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
763 #endif /* BRLAPI_NO_SINGLE_SESSION */
764 int BRLAPI_STDCALL brlapi__acceptKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
765
766 /* brlapi_ignoreAllKeys */
772 #ifndef BRLAPI_NO_SINGLE_SESSION
773 int BRLAPI_STDCALL brlapi_ignoreAllKeys(void);
774 #define brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
775 #endif /* BRLAPI_NO_SINGLE_SESSION */
776 int BRLAPI_STDCALL brlapi__ignoreAllKeys(brlapi_handle_t *handle);
777 #define brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
778
779 /* brlapi_acceptAllKeys */
788 #ifndef BRLAPI_NO_SINGLE_SESSION
789 int BRLAPI_STDCALL brlapi_acceptAllKeys(void);
790 #define brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
791 #endif /* BRLAPI_NO_SINGLE_SESSION */
792 int BRLAPI_STDCALL brlapi__acceptAllKeys(brlapi_handle_t *handle);
793 #define brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
794
799 typedef struct {
800 brlapi_keyCode_t first;
801 brlapi_keyCode_t last;
802 } brlapi_range_t;
803
804 /* brlapi_ignoreKeyRanges */
815 #ifndef BRLAPI_NO_SINGLE_SESSION
816 int BRLAPI_STDCALL brlapi_ignoreKeyRanges(brlapi_range_t ranges[], unsigned int count);
817 #endif /* BRLAPI_NO_SINGLE_SESSION */
818 int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count);
819
820 /* brlapi_acceptKeyRanges */
831 #ifndef BRLAPI_NO_SINGLE_SESSION
832 int BRLAPI_STDCALL brlapi_acceptKeyRanges(brlapi_range_t ranges[], unsigned int count);
833 #endif /* BRLAPI_NO_SINGLE_SESSION */
834 int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count);
860 /* brlapi_enterRawMode */
865 #ifndef BRLAPI_NO_SINGLE_SESSION
866 int BRLAPI_STDCALL brlapi_enterRawMode(const char *driver);
867 #endif /* BRLAPI_NO_SINGLE_SESSION */
868 int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver);
869
870 /* brlapi_leaveRawMode */
873 #ifndef BRLAPI_NO_SINGLE_SESSION
874 int BRLAPI_STDCALL brlapi_leaveRawMode(void);
875 #endif /* BRLAPI_NO_SINGLE_SESSION */
876 int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle);
877
878 /* brlapi_sendRaw */
884 #ifndef BRLAPI_NO_SINGLE_SESSION
885 ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size);
886 #endif /* BRLAPI_NO_SINGLE_SESSION */
887 ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size);
888
889 /* brlapi_recvRaw */
896 #ifndef BRLAPI_NO_SINGLE_SESSION
897 ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size);
898 #endif /* BRLAPI_NO_SINGLE_SESSION */
899 ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size);
900
901 /* brlapi_suspendDriver */
906 #ifndef BRLAPI_NO_SINGLE_SESSION
907 int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver);
908 #endif /* BRLAPI_NO_SINGLE_SESSION */
909 int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver);
910
911 /* brlapi_resumeDriver */
915 #ifndef BRLAPI_NO_SINGLE_SESSION
916 int BRLAPI_STDCALL brlapi_resumeDriver(void);
917 #endif /* BRLAPI_NO_SINGLE_SESSION */
918 int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle);
942 /* Error codes */
943 #define BRLAPI_ERROR_SUCCESS 0
944 #define BRLAPI_ERROR_NOMEM 1
945 #define BRLAPI_ERROR_TTYBUSY 2
946 #define BRLAPI_ERROR_DEVICEBUSY 3
947 #define BRLAPI_ERROR_UNKNOWN_INSTRUCTION 4
948 #define BRLAPI_ERROR_ILLEGAL_INSTRUCTION 5
949 #define BRLAPI_ERROR_INVALID_PARAMETER 6
950 #define BRLAPI_ERROR_INVALID_PACKET 7
951 #define BRLAPI_ERROR_CONNREFUSED 8
952 #define BRLAPI_ERROR_OPNOTSUPP 9
953 #define BRLAPI_ERROR_GAIERR 10
954 #define BRLAPI_ERROR_LIBCERR 11
955 #define BRLAPI_ERROR_UNKNOWNTTY 12
956 #define BRLAPI_ERROR_PROTOCOL_VERSION 13
957 #define BRLAPI_ERROR_EOF 14
958 #define BRLAPI_ERROR_EMPTYKEY 15
959 #define BRLAPI_ERROR_DRIVERERROR 16
960 #define BRLAPI_ERROR_AUTHENTICATION 17
962 /* brlapi_errlist */
963
967 extern const char *brlapi_errlist[];
968
969 /* brlapi_nerr */
971 extern const int brlapi_nerr;
972
973 /* brlapi_perror */
978 void BRLAPI_STDCALL brlapi_perror(const char *s);
979
980 /* brlapi_error_t */
982 typedef struct {
983 int brlerrno;
984 int libcerrno;
985 int gaierrno;
986 const char *errfun;
987 } brlapi_error_t;
988
997 brlapi_error_t * BRLAPI_STDCALL brlapi_error_location(void);
998
1007 extern brlapi_error_t brlapi_error;
1008
1010 extern int brlapi_errno;
1012 extern int brlapi_libcerrno;
1014 extern int brlapi_gaierrno;
1016 extern const char *brlapi_errfun;
1017
1019 #define brlapi_error (*brlapi_error_location())
1020
1021 #define brlapi_errno (brlapi_error.brlerrno)
1022
1023 #define brlapi_libcerrno (brlapi_error.libcerrno)
1024
1025 #define brlapi_gaierrno (brlapi_error.gaierrno)
1026
1027 #define brlapi_errfun (brlapi_error.errfun)
1028
1029 /* brlapi_strerror */
1035 const char * BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error);
1036
1038 typedef uint32_t brlapi_packetType_t;
1039
1040 /* brlapi_getPacketTypeName */
1046 const char * BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type);
1047
1048 /* brlapi_exceptionHandler_t */
1060 #ifndef BRLAPI_NO_SINGLE_SESSION
1061 typedef void (BRLAPI_STDCALL *brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size);
1062 #endif /* BRLAPI_NO_SINGLE_SESSION */
1063 typedef void (BRLAPI_STDCALL *brlapi__exceptionHandler_t)(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1064
1065 /* brlapi_strexception */
1075 #ifndef BRLAPI_NO_SINGLE_SESSION
1076 int BRLAPI_STDCALL brlapi_strexception(char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize);
1077 #endif /* BRLAPI_NO_SINGLE_SESSION */
1078 int BRLAPI_STDCALL brlapi__strexception(brlapi_handle_t *handle, char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize);
1079
1080 /* brlapi_setExceptionHandler */
1089 #ifndef BRLAPI_NO_SINGLE_SESSION
1090 brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler);
1091 #endif /* BRLAPI_NO_SINGLE_SESSION */
1092 brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler);
1093
1094 #ifndef BRLAPI_NO_SINGLE_SESSION
1095 void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size);
1096 #endif /* BRLAPI_NO_SINGLE_SESSION */
1097 void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1098
1101 /* Windows-specific tricks - don't look at this */
1102 #ifdef BRLAPI_WIN32
1103 #ifndef BRLAPI_NO_SINGLE_SESSION
1104 int BRLAPI_STDCALL brlapi_writeTextWin(int cursor, const void *str, int wide);
1105 #endif /* BRLAPI_NO_SINGLE_SESSION */
1106 int BRLAPI_STDCALL brlapi__writeTextWin(brlapi_handle_t *handle, int cursor, const void *str, int wide);
1107
1108 #ifndef BRLAPI_NO_SINGLE_SESSION
1109 int BRLAPI_STDCALL brlapi_writeWin(const brlapi_writeArguments_t *s, int wide);
1110 #endif /* BRLAPI_NO_SINGLE_SESSION */
1111 int BRLAPI_STDCALL brlapi__writeWin(brlapi_handle_t *handle, const brlapi_writeArguments_t *s, int wide);
1112
1113 #ifdef UNICODE
1114 #ifndef BRLAPI_NO_SINGLE_SESSION
1115 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 1)
1116 #endif /* BRLAPI_NO_SINGLE_SESSION */
1117 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 1)
1118
1119 #ifndef BRLAPI_NO_SINGLE_SESSION
1120 #define brlapi_write(s) brlapi_writeWin(s, 1)
1121 #endif /* BRLAPI_NO_SINGLE_SESSION */
1122 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 1)
1123
1124 #else /* UNICODE */
1125
1126 #ifndef BRLAPI_NO_SINGLE_SESSION
1127 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 0)
1128 #endif /* BRLAPI_NO_SINGLE_SESSION */
1129 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 0)
1130
1131 #ifndef BRLAPI_NO_SINGLE_SESSION
1132 #define brlapi_write(s) brlapi_writeWin(s, 0)
1133 #endif /* BRLAPI_NO_SINGLE_SESSION */
1134 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 0)
1135
1136 #endif /* UNICODE */
1137 #endif /* BRLAPI_WIN32 */
1138
1139 #ifndef BRLAPI_NO_DEPRECATED
1140
1152 #define brlapi_settings_t brlapi_connectionSettings_t
1153
1155 typedef struct {
1156 int displayNumber;
1157 unsigned int regionBegin;
1158 unsigned int regionSize;
1159 char *text;
1160 int textSize;
1161 unsigned char *attrAnd;
1162 unsigned char *attrOr;
1163 int cursor;
1164 char *charset;
1165 } brlapi_writeStruct;
1166 #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
1167
1168 #define brl_keycode_t brlapi_keyCode_t
1169 #define brl_type_t brlapi_packetType_t
1170
1171 #define BRLCOMMANDS NULL
1172 #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX
1173
1174 #ifndef BRLAPI_NO_SINGLE_SESSION
1175 #define brlapi_initializeConnection brlapi_openConnection
1176 #define brlapi_getTty brlapi_enterTtyMode
1177 #define brlapi_getTtyPath brlapi_enterTtyModeWithPath
1178 #define brlapi_leaveTty brlapi_leaveTtyMode
1179 #define brlapi_unignoreKeyRange brlapi_acceptKeyRange
1180 #define brlapi_unignoreKeySet brlapi_acceptKeySet
1181 #define brlapi_getRaw brlapi_enterRawMode
1182 #define brlapi_leaveRaw brlapi_leaveRawMode
1183 #define brlapi_suspend brlapi_suspendDriver
1184 #define brlapi_resume brlapi_resumeDriver
1185 #endif /* BRLAPI_NO_SINGLE_SESSION */
1186
1187 #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS
1188 #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM
1189 #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1190 #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1191 #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1192 #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1193 #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1194 #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1195 #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1196 #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1197 #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR
1198 #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR
1199 #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1200 #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1201 #define BRLERR_EOF BRLAPI_ERROR_EOF
1202 #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1203 #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR
1204
1206 #endif /* BRLAPI_NO_DEPRECATED */
1207
1208 #ifdef __cplusplus
1209 }
1210 #endif /* __cplusplus */
1211
1212 #endif /* BRLAPI_INCLUDED */