BrlAPI 0.8

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-2020 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.app/
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.8.0"
39
41 #define BRLAPI_MAJOR 0
42
44 #define BRLAPI_MINOR 8
45
47 #define BRLAPI_REVISION 0
48
50 void brlapi_getLibraryVersion(int *major, int *minor, int *revision);
51
54 /* Types are defined there */
55 #include <sys/types.h>
56
57 #ifdef BRLAPI_WIN32
58 #include <windows.h>
59 #define BRLAPI_STDCALL __stdcall
60 #else /* BRLAPI_WIN32 */
61 #define BRLAPI_STDCALL
62 #endif /* BRLAPI_WIN32 */
63
64 #ifdef _MSC_VER
65 typedef __int64 uint64_t;
66 typedef __int32 uint32_t;
67 #define UINT64_C(x) (x ## Ui64)
68 #define PRIx64 "I64x"
69 typedef signed int ssize_t;
70 #else /* _MSC_VER */
71
72 /* this is for uint*_t */
73 #include <stdint.h>
74
75 /* NULL is defined there */
76 #include <unistd.h>
77
78 #include <inttypes.h> /* For PRIx64 */
79 #endif /* _MSC_VER */
80
81 #include <wchar.h>
82
105 typedef struct brlapi_handle_t brlapi_handle_t;
106
108 size_t BRLAPI_STDCALL brlapi_getHandleSize(void);
109
123 #define BRLAPI_SOCKETPORTNUM 4101
124 #define BRLAPI_SOCKETPORT "4101"
125
127 #define BRLAPI_SOCKETPATH "/var/lib/BrlAPI"
128
133 #define BRLAPI_ETCDIR "/etc"
134
138 #define BRLAPI_AUTHKEYFILE "brlapi.key"
139
141 #ifdef BRLAPI_WIN32
142 /* No authentication by default on Windows */
143 #define BRLAPI_DEFAUTH "none"
144 #else /* BRLAPI_WIN32 */
145 #define BRLAPI_DEFAUTH_KEYFILE "keyfile:" BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE
146
147 #ifdef USE_POLKIT
148 #define BRLAPI_DEFAUTH_POLKIT "+polkit"
149 #else /* USE_POLKIT */
150 #define BRLAPI_DEFAUTH_POLKIT ""
151 #endif /* USE_POLKIT */
152
153 #define BRLAPI_DEFAUTH BRLAPI_DEFAUTH_KEYFILE BRLAPI_DEFAUTH_POLKIT
154 #endif /* BRLAPI_WIN32 */
155
156 #ifdef __MINGW32__
157 typedef HANDLE brlapi_fileDescriptor;
158 #else /* __MINGW32__ */
159 typedef int brlapi_fileDescriptor;
160 #endif /* __MINGW32__ */
161
192 typedef struct {
200 const char *auth;
201
210 const char *host;
211 } brlapi_connectionSettings_t;
212
213 /* BRLAPI_SETTINGS_INITIALIZER */
216 #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
217
218 /* brlapi_openConnection */
263 #ifndef BRLAPI_NO_SINGLE_SESSION
264 brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
265 #endif /* BRLAPI_NO_SINGLE_SESSION */
266 brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
267
268 /* brlapi_closeConnection */
275 #ifndef BRLAPI_NO_SINGLE_SESSION
276 void BRLAPI_STDCALL brlapi_closeConnection(void);
277 #endif /* BRLAPI_NO_SINGLE_SESSION */
278 void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle);
279
288 /* brlapi__setClientData */
293 #ifndef BRLAPI_NO_SINGLE_SESSION
294 void BRLAPI_STDCALL brlapi_setClientData(void *data);
295 #endif /* BRLAPI_NO_SINGLE_SESSION */
296 void BRLAPI_STDCALL brlapi__setClientData(brlapi_handle_t *handle, void *data);
297
298 /* brlapi__getClientData */
303 #ifndef BRLAPI_NO_SINGLE_SESSION
304 void * BRLAPI_STDCALL brlapi_getClientData(void);
305 #endif /* BRLAPI_NO_SINGLE_SESSION */
306 void * BRLAPI_STDCALL brlapi__getClientData(brlapi_handle_t *handle);
307
323 #define BRLAPI_MAXNAMELENGTH 31
324
325 /* brlapi_getDriverName */
338 #ifndef BRLAPI_NO_SINGLE_SESSION
339 int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size);
340 #endif /* BRLAPI_NO_SINGLE_SESSION */
341 int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size);
342
343 /* brlapi_getModelIdentifier */
356 #ifndef BRLAPI_NO_SINGLE_SESSION
357 int BRLAPI_STDCALL brlapi_getModelIdentifier(char *buffer, size_t size);
358 #endif /* BRLAPI_NO_SINGLE_SESSION */
359 int BRLAPI_STDCALL brlapi__getModelIdentifier(brlapi_handle_t *handle, char *buffer, size_t size);
360
361 /* brlapi_getDisplaySize */
363 #ifndef BRLAPI_NO_SINGLE_SESSION
364 int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y);
365 #endif /* BRLAPI_NO_SINGLE_SESSION */
366 int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y);
367
391 /* brlapi_enterTtyMode */
411 #ifndef BRLAPI_NO_SINGLE_SESSION
412 int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver);
413 #endif /* BRLAPI_NO_SINGLE_SESSION */
414 int BRLAPI_STDCALL brlapi__enterTtyMode(brlapi_handle_t *handle, int tty, const char *driver);
415
425 #define BRLAPI_TTY_DEFAULT -1
426
427 /* brlapi_enterTtyModeWithPath */
439 #ifndef BRLAPI_NO_SINGLE_SESSION
440 int BRLAPI_STDCALL brlapi_enterTtyModeWithPath(int *ttys, int count, const char *driver);
441 #endif /* BRLAPI_NO_SINGLE_SESSION */
442 int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, int *ttys, int count, const char *driver);
443
444 /* brlapi_leaveTtyMode */
451 #ifndef BRLAPI_NO_SINGLE_SESSION
452 int BRLAPI_STDCALL brlapi_leaveTtyMode(void);
453 #endif /* BRLAPI_NO_SINGLE_SESSION */
454 int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle);
455
456 /* brlapi_setFocus */
467 #ifndef BRLAPI_NO_SINGLE_SESSION
468 int BRLAPI_STDCALL brlapi_setFocus(int tty);
469 #endif /* BRLAPI_NO_SINGLE_SESSION */
470 int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty);
471
501 /* brlapi_writeText */
516 #ifndef BRLAPI_NO_SINGLE_SESSION
517 int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text);
518 #endif /* BRLAPI_NO_SINGLE_SESSION */
519 int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text);
520
521 /* brlapi_writeWText */
534 #ifndef BRLAPI_NO_SINGLE_SESSION
535 int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text);
536 #endif /* BRLAPI_NO_SINGLE_SESSION */
537 int BRLAPI_STDCALL brlapi__writeWText(brlapi_handle_t *handle, int cursor, const wchar_t *text);
538
539 /* brlapi_writeDots */
547 #ifndef BRLAPI_NO_SINGLE_SESSION
548 int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots);
549 #endif /* BRLAPI_NO_SINGLE_SESSION */
550 int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots);
551
552 /* brlapi_writeArguments_t */
554 typedef struct {
555 int displayNumber ;
556 unsigned int regionBegin ;
557 unsigned int regionSize ;
558 char *text ;
559 int textSize ;
560 unsigned char *andMask ;
561 unsigned char *orMask ;
562 int cursor ;
563 char *charset ;
564 } brlapi_writeArguments_t;
565
570 #define BRLAPI_DISPLAY_DEFAULT -1
571
576 #define BRLAPI_CURSOR_LEAVE -1
577
582 #define BRLAPI_CURSOR_OFF 0
583
584 /* BRLAPI_WRITEARGUMENTS_INITIALIZER */
594 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { \
595 .displayNumber = BRLAPI_DISPLAY_DEFAULT, \
596 .regionBegin = 0, \
597 .regionSize = 0, \
598 .text = NULL, \
599 .textSize = -1, \
600 .andMask = NULL, \
601 .orMask = NULL, \
602 .cursor = BRLAPI_CURSOR_LEAVE, \
603 .charset = NULL \
604 }
605
606 /* brlapi_write */
642 #ifndef BRLAPI_NO_SINGLE_SESSION
643 int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments);
644 #endif /* BRLAPI_NO_SINGLE_SESSION */
645 int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments);
646
649 #include "brlapi_keycodes.h"
650
664 /* brlapi_expandedKeyCode_t */
666 typedef struct {
667 unsigned int type ;
668 unsigned int command ;
669 unsigned int argument ;
670 unsigned int flags ;
671 } brlapi_expandedKeyCode_t;
672
673 /* brlapi_expandKeyCode */
681 int BRLAPI_STDCALL brlapi_expandKeyCode (brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion);
682
683 /* brlapi_describedKeyCode_t */
685 typedef struct {
686 const char *type ;
687 const char *command ;
688 unsigned int argument ;
689 unsigned int flags ;
690 const char *flag[64 - BRLAPI_KEY_FLAGS_SHIFT] ;
691 brlapi_expandedKeyCode_t values ;
692 } brlapi_describedKeyCode_t;
693
694 /* brlapi_describeKeyCode */
702 int BRLAPI_STDCALL brlapi_describeKeyCode (brlapi_keyCode_t code, brlapi_describedKeyCode_t *description);
703
705 #define BRLAPI_UC_ROW 0x2800UL
706
707 /* brlapi_readKey */
774 #ifndef BRLAPI_NO_SINGLE_SESSION
775 int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code);
776 #endif /* BRLAPI_NO_SINGLE_SESSION */
777 int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code);
778
779 /* brlapi_readKeyWithTimeout */
799 #ifndef BRLAPI_NO_SINGLE_SESSION
800 int BRLAPI_STDCALL brlapi_readKeyWithTimeout(int timeout_ms, brlapi_keyCode_t *code);
801 #endif /* BRLAPI_NO_SINGLE_SESSION */
802 int BRLAPI_STDCALL brlapi__readKeyWithTimeout(brlapi_handle_t *handle, int timeout_ms, brlapi_keyCode_t *code);
803
805 typedef enum {
806 brlapi_rangeType_all,
807 brlapi_rangeType_type,
808 brlapi_rangeType_command,
809 brlapi_rangeType_key,
810 brlapi_rangeType_code,
811 } brlapi_rangeType_t;
812
813 /* brlapi_ignoreKeys */
826 #ifndef BRLAPI_NO_SINGLE_SESSION
827 int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
828 #endif /* BRLAPI_NO_SINGLE_SESSION */
829 int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
830
831 /* brlapi_acceptKeys */
844 #ifndef BRLAPI_NO_SINGLE_SESSION
845 int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
846 #endif /* BRLAPI_NO_SINGLE_SESSION */
847 int BRLAPI_STDCALL brlapi__acceptKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
848
849 /* brlapi_ignoreAllKeys */
855 #ifndef BRLAPI_NO_SINGLE_SESSION
856 int BRLAPI_STDCALL brlapi_ignoreAllKeys(void);
857 #define brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
858 #endif /* BRLAPI_NO_SINGLE_SESSION */
859 int BRLAPI_STDCALL brlapi__ignoreAllKeys(brlapi_handle_t *handle);
860 #define brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
861
862 /* brlapi_acceptAllKeys */
871 #ifndef BRLAPI_NO_SINGLE_SESSION
872 int BRLAPI_STDCALL brlapi_acceptAllKeys(void);
873 #define brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
874 #endif /* BRLAPI_NO_SINGLE_SESSION */
875 int BRLAPI_STDCALL brlapi__acceptAllKeys(brlapi_handle_t *handle);
876 #define brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
877
882 typedef struct {
883 brlapi_keyCode_t first;
884 brlapi_keyCode_t last;
885 } brlapi_range_t;
886
887 /* brlapi_ignoreKeyRanges */
898 #ifndef BRLAPI_NO_SINGLE_SESSION
899 int BRLAPI_STDCALL brlapi_ignoreKeyRanges(const brlapi_range_t ranges[], unsigned int count);
900 #endif /* BRLAPI_NO_SINGLE_SESSION */
901 int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count);
902
903 /* brlapi_acceptKeyRanges */
914 #ifndef BRLAPI_NO_SINGLE_SESSION
915 int BRLAPI_STDCALL brlapi_acceptKeyRanges(const brlapi_range_t ranges[], unsigned int count);
916 #endif /* BRLAPI_NO_SINGLE_SESSION */
917 int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count);
943 /* brlapi_enterRawMode */
948 #ifndef BRLAPI_NO_SINGLE_SESSION
949 int BRLAPI_STDCALL brlapi_enterRawMode(const char *driver);
950 #endif /* BRLAPI_NO_SINGLE_SESSION */
951 int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver);
952
953 /* brlapi_leaveRawMode */
956 #ifndef BRLAPI_NO_SINGLE_SESSION
957 int BRLAPI_STDCALL brlapi_leaveRawMode(void);
958 #endif /* BRLAPI_NO_SINGLE_SESSION */
959 int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle);
960
961 /* brlapi_sendRaw */
967 #ifndef BRLAPI_NO_SINGLE_SESSION
968 ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size);
969 #endif /* BRLAPI_NO_SINGLE_SESSION */
970 ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size);
971
972 /* brlapi_recvRaw */
979 #ifndef BRLAPI_NO_SINGLE_SESSION
980 ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size);
981 #endif /* BRLAPI_NO_SINGLE_SESSION */
982 ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size);
983
984 /* brlapi_suspendDriver */
989 #ifndef BRLAPI_NO_SINGLE_SESSION
990 int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver);
991 #endif /* BRLAPI_NO_SINGLE_SESSION */
992 int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver);
993
994 /* brlapi_resumeDriver */
998 #ifndef BRLAPI_NO_SINGLE_SESSION
999 int BRLAPI_STDCALL brlapi_resumeDriver(void);
1000 #endif /* BRLAPI_NO_SINGLE_SESSION */
1001 int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle);
1004 #include "brlapi_param.h"
1005
1030 typedef uint32_t brlapi_param_flags_t;
1031 #define BRLAPI_PARAMF_LOCAL 0X00
1032 #define BRLAPI_PARAMF_GLOBAL 0X01
1033 #define BRLAPI_PARAMF_SELF 0X02
1035 /* brlapi_getParameter */
1036
1048 #ifndef BRLAPI_NO_SINGLE_SESSION
1049 ssize_t BRLAPI_STDCALL brlapi_getParameter(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, void* data, size_t len);
1050 #endif
1051 ssize_t BRLAPI_STDCALL brlapi__getParameter(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, void* data, size_t len);
1052
1053 /* brlapi_getParameterAlloc */
1066 #ifndef BRLAPI_NO_SINGLE_SESSION
1067 void * BRLAPI_STDCALL brlapi_getParameterAlloc(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, size_t *len);
1068 #endif
1069 void * BRLAPI_STDCALL brlapi__getParameterAlloc(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, size_t *len);
1070
1071 /* brlapi_setParameter */
1084 #ifndef BRLAPI_NO_SINGLE_SESSION
1085 int BRLAPI_STDCALL brlapi_setParameter(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, const void* data, size_t len);
1086 #endif
1087 int BRLAPI_STDCALL brlapi__setParameter(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, const void* data, size_t len);
1088
1089 /* brlapi_paramCallback_t */
1104 typedef void (*brlapi_paramCallback_t)(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, void *priv, const void *data, size_t len);
1105
1106 /* brlapi_paramCallbackDescriptor_t */
1111 typedef void *brlapi_paramCallbackDescriptor_t;
1112
1113 /* brlapi_watchParameter */
1136 #ifndef BRLAPI_NO_SINGLE_SESSION
1137 brlapi_paramCallbackDescriptor_t BRLAPI_STDCALL brlapi_watchParameter(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, brlapi_paramCallback_t func, void *priv, void* data, size_t len);
1138 #endif
1139 brlapi_paramCallbackDescriptor_t BRLAPI_STDCALL brlapi__watchParameter(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, brlapi_paramCallback_t func, void *priv, void* data, size_t len);
1140
1141 /* brlapi_unwatchParameter */
1152 #ifndef BRLAPI_NO_SINGLE_SESSION
1153 int BRLAPI_STDCALL brlapi_unwatchParameter(brlapi_paramCallbackDescriptor_t descriptor);
1154 #endif
1155 int BRLAPI_STDCALL brlapi__unwatchParameter(brlapi_handle_t *handle, brlapi_paramCallbackDescriptor_t descriptor);
1156
1162 /* brlapi_pause */
1168 #ifndef BRLAPI_NO_SINGLE_SESSION
1169 void BRLAPI_STDCALL brlapi_pause(int timeout_ms);
1170 #endif
1171 void BRLAPI_STDCALL brlapi__pause(brlapi_handle_t *handle, int timeout_ms);
1172
1196 /* Error codes */
1197 #define BRLAPI_ERROR_SUCCESS 0
1198 #define BRLAPI_ERROR_NOMEM 1
1199 #define BRLAPI_ERROR_TTYBUSY 2
1200 #define BRLAPI_ERROR_DEVICEBUSY 3
1201 #define BRLAPI_ERROR_UNKNOWN_INSTRUCTION 4
1202 #define BRLAPI_ERROR_ILLEGAL_INSTRUCTION 5
1203 #define BRLAPI_ERROR_INVALID_PARAMETER 6
1204 #define BRLAPI_ERROR_INVALID_PACKET 7
1205 #define BRLAPI_ERROR_CONNREFUSED 8
1206 #define BRLAPI_ERROR_OPNOTSUPP 9
1207 #define BRLAPI_ERROR_GAIERR 10
1208 #define BRLAPI_ERROR_LIBCERR 11
1209 #define BRLAPI_ERROR_UNKNOWNTTY 12
1210 #define BRLAPI_ERROR_PROTOCOL_VERSION 13
1211 #define BRLAPI_ERROR_EOF 14
1212 #define BRLAPI_ERROR_EMPTYKEY 15
1213 #define BRLAPI_ERROR_DRIVERERROR 16
1214 #define BRLAPI_ERROR_AUTHENTICATION 17
1215 #define BRLAPI_ERROR_READONLY_PARAMETER 18
1217 /* brlapi_errlist */
1218
1222 extern const char *brlapi_errlist[];
1223
1224 /* brlapi_nerr */
1226 extern const int brlapi_nerr;
1227
1228 /* brlapi_perror */
1233 void BRLAPI_STDCALL brlapi_perror(const char *s);
1234
1235 /* brlapi_error_t */
1237 typedef struct {
1238 int brlerrno;
1239 int libcerrno;
1240 int gaierrno;
1241 const char *errfun;
1242 } brlapi_error_t;
1243
1252 brlapi_error_t * BRLAPI_STDCALL brlapi_error_location(void);
1253
1262 extern brlapi_error_t brlapi_error;
1263
1265 extern int brlapi_errno;
1267 extern int brlapi_libcerrno;
1269 extern int brlapi_gaierrno;
1271 extern const char *brlapi_errfun;
1272
1274 #define brlapi_error (*brlapi_error_location())
1275
1276 #define brlapi_errno (brlapi_error.brlerrno)
1277
1278 #define brlapi_libcerrno (brlapi_error.libcerrno)
1279
1280 #define brlapi_gaierrno (brlapi_error.gaierrno)
1281
1282 #define brlapi_errfun (brlapi_error.errfun)
1283
1284 /* brlapi_strerror */
1290 const char * BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error);
1291
1293 typedef uint32_t brlapi_packetType_t;
1294
1295 /* brlapi_getPacketTypeName */
1301 const char * BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type);
1302
1303 /* brlapi_exceptionHandler_t */
1315 #ifndef BRLAPI_NO_SINGLE_SESSION
1316 typedef void (BRLAPI_STDCALL *brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size);
1317 #endif /* BRLAPI_NO_SINGLE_SESSION */
1318 typedef void (BRLAPI_STDCALL *brlapi__exceptionHandler_t)(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1319
1320 /* brlapi_strexception */
1330 #ifndef BRLAPI_NO_SINGLE_SESSION
1331 int BRLAPI_STDCALL brlapi_strexception(char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize);
1332 #endif /* BRLAPI_NO_SINGLE_SESSION */
1333 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);
1334
1335 /* brlapi_setExceptionHandler */
1344 #ifndef BRLAPI_NO_SINGLE_SESSION
1345 brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler);
1346 #endif /* BRLAPI_NO_SINGLE_SESSION */
1347 brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler);
1348
1349 #ifndef BRLAPI_NO_SINGLE_SESSION
1350 void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size);
1351 #endif /* BRLAPI_NO_SINGLE_SESSION */
1352 void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1353
1356 /* Windows-specific tricks - don't look at this */
1357 #ifdef BRLAPI_WIN32
1358 #ifndef BRLAPI_NO_SINGLE_SESSION
1359 int BRLAPI_STDCALL brlapi_writeTextWin(int cursor, const void *str, int wide);
1360 #endif /* BRLAPI_NO_SINGLE_SESSION */
1361 int BRLAPI_STDCALL brlapi__writeTextWin(brlapi_handle_t *handle, int cursor, const void *str, int wide);
1362
1363 #ifndef BRLAPI_NO_SINGLE_SESSION
1364 int BRLAPI_STDCALL brlapi_writeWin(const brlapi_writeArguments_t *s, int wide);
1365 #endif /* BRLAPI_NO_SINGLE_SESSION */
1366 int BRLAPI_STDCALL brlapi__writeWin(brlapi_handle_t *handle, const brlapi_writeArguments_t *s, int wide);
1367
1368 #ifdef UNICODE
1369 #ifndef BRLAPI_NO_SINGLE_SESSION
1370 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 1)
1371 #endif /* BRLAPI_NO_SINGLE_SESSION */
1372 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 1)
1373
1374 #ifndef BRLAPI_NO_SINGLE_SESSION
1375 #define brlapi_write(s) brlapi_writeWin(s, 1)
1376 #endif /* BRLAPI_NO_SINGLE_SESSION */
1377 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 1)
1378
1379 #else /* UNICODE */
1380
1381 #ifndef BRLAPI_NO_SINGLE_SESSION
1382 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 0)
1383 #endif /* BRLAPI_NO_SINGLE_SESSION */
1384 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 0)
1385
1386 #ifndef BRLAPI_NO_SINGLE_SESSION
1387 #define brlapi_write(s) brlapi_writeWin(s, 0)
1388 #endif /* BRLAPI_NO_SINGLE_SESSION */
1389 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 0)
1390
1391 #endif /* UNICODE */
1392 #endif /* BRLAPI_WIN32 */
1393
1394 #ifndef BRLAPI_NO_DEPRECATED
1395
1407 #define brlapi_settings_t brlapi_connectionSettings_t
1408
1410 typedef struct {
1411 int displayNumber;
1412 unsigned int regionBegin;
1413 unsigned int regionSize;
1414 char *text;
1415 int textSize;
1416 unsigned char *attrAnd;
1417 unsigned char *attrOr;
1418 int cursor;
1419 char *charset;
1420 } brlapi_writeStruct;
1421 #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
1422
1423 #define brl_keycode_t brlapi_keyCode_t
1424 #define brl_type_t brlapi_packetType_t
1425
1426 #define BRLCOMMANDS NULL
1427 #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX
1428
1429 #ifndef BRLAPI_NO_SINGLE_SESSION
1430 #define brlapi_initializeConnection brlapi_openConnection
1431 #define brlapi_getTty brlapi_enterTtyMode
1432 #define brlapi_getTtyPath brlapi_enterTtyModeWithPath
1433 #define brlapi_leaveTty brlapi_leaveTtyMode
1434 #define brlapi_unignoreKeyRange brlapi_acceptKeyRange
1435 #define brlapi_unignoreKeySet brlapi_acceptKeySet
1436 #define brlapi_getRaw brlapi_enterRawMode
1437 #define brlapi_leaveRaw brlapi_leaveRawMode
1438 #define brlapi_suspend brlapi_suspendDriver
1439 #define brlapi_resume brlapi_resumeDriver
1440 #endif /* BRLAPI_NO_SINGLE_SESSION */
1441
1442 #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS
1443 #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM
1444 #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1445 #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1446 #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1447 #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1448 #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1449 #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1450 #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1451 #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1452 #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR
1453 #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR
1454 #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1455 #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1456 #define BRLERR_EOF BRLAPI_ERROR_EOF
1457 #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1458 #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR
1459
1461 #endif /* BRLAPI_NO_DEPRECATED */
1462
1463 #ifdef __cplusplus
1464 }
1465 #endif /* __cplusplus */
1466
1467 #endif /* BRLAPI_INCLUDED */
brlapi_readKeyWithTimeout
int BRLAPI_STDCALL brlapi_readKeyWithTimeout(int timeout_ms, brlapi_keyCode_t *code)
brlapi_keycodes.h
brlapi_rangeType_key
Definition: brlapi.h:809
brlapi__watchParameter
brlapi_paramCallbackDescriptor_t BRLAPI_STDCALL brlapi__watchParameter(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, brlapi_paramCallback_t func, void *priv, void *data, size_t len)
BRLAPI_STDCALL
#define BRLAPI_STDCALL
Definition: brlapi.h:61
brlapi_ignoreKeyRanges
int BRLAPI_STDCALL brlapi_ignoreKeyRanges(const brlapi_range_t ranges[], unsigned int count)
brlapi_writeText
int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text)
brlapi_fileDescriptor
int brlapi_fileDescriptor
Definition: brlapi.h:159
brlapi_writeDots
int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots)
brlapi_handle_t
struct brlapi_handle_t brlapi_handle_t
Definition: brlapi.h:105
brlapi__sendRaw
ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size)
brlapi_getLibraryVersion
void brlapi_getLibraryVersion(int *major, int *minor, int *revision)
brlapi_resumeDriver
int BRLAPI_STDCALL brlapi_resumeDriver(void)
brlapi_errlist
const char * brlapi_errlist[]
brlapi_getHandleSize
size_t BRLAPI_STDCALL brlapi_getHandleSize(void)
brlapi_rangeType_all
Definition: brlapi.h:806
brlapi_error_t::gaierrno
int gaierrno
Definition: brlapi.h:1240
brlapi__readKey
int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code)
brlapi__resumeDriver
int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle)
brlapi__getDisplaySize
int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y)
brlapi_getDisplaySize
int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y)
brlapi_error
#define brlapi_error
Definition: brlapi.h:1274
brlapi_getClientData
void *BRLAPI_STDCALL brlapi_getClientData(void)
brlapi__ignoreKeyRanges
int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count)
brlapi_acceptKeyRanges
int BRLAPI_STDCALL brlapi_acceptKeyRanges(const brlapi_range_t ranges[], unsigned int count)
brlapi__acceptKeys
int BRLAPI_STDCALL brlapi__acceptKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi__getParameterAlloc
void *BRLAPI_STDCALL brlapi__getParameterAlloc(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, size_t *len)
brlapi_getPacketTypeName
const char *BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type)
brlapi__readKeyWithTimeout
int BRLAPI_STDCALL brlapi__readKeyWithTimeout(brlapi_handle_t *handle, int timeout_ms, brlapi_keyCode_t *code)
brlapi_recvRaw
ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size)
brlapi_expandedKeyCode_t
Definition: brlapi.h:666
brlapi_writeStruct::displayNumber
int displayNumber
Definition: brlapi.h:1411
brlapi_writeStruct::regionBegin
unsigned int regionBegin
Definition: brlapi.h:1412
brlapi_nerr
const int brlapi_nerr
brlapi_setParameter
int BRLAPI_STDCALL brlapi_setParameter(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, const void *data, size_t len)
brlapi__acceptKeyRanges
int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count)
brlapi__exceptionHandler_t
void(BRLAPI_STDCALL * brlapi__exceptionHandler_t)(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size)
Definition: brlapi.h:1318
brlapi_range_t::first
brlapi_keyCode_t first
Definition: brlapi.h:883
brlapi_writeStruct::regionSize
unsigned int regionSize
Definition: brlapi.h:1413
brlapi__setClientData
void BRLAPI_STDCALL brlapi__setClientData(brlapi_handle_t *handle, void *data)
brlapi_setClientData
void BRLAPI_STDCALL brlapi_setClientData(void *data)
brlapi_range_t::last
brlapi_keyCode_t last
Definition: brlapi.h:884
brlapi__getParameter
ssize_t BRLAPI_STDCALL brlapi__getParameter(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, void *data, size_t len)
brlapi__enterTtyModeWithPath
int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, int *ttys, int count, const char *driver)
brlapi_connectionSettings_t::auth
const char * auth
Definition: brlapi.h:200
brlapi_closeConnection
void BRLAPI_STDCALL brlapi_closeConnection(void)
brlapi_writeStruct::cursor
int cursor
Definition: brlapi.h:1418
brlapi_ignoreKeys
int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi_sendRaw
ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size)
brlapi_perror
void BRLAPI_STDCALL brlapi_perror(const char *s)
brlapi__leaveTtyMode
int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle)
brlapi_suspendDriver
int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver)
brlapi__write
int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments)
brlapi_keyCode_t
uint64_t brlapi_keyCode_t
Definition: brlapi_keycodes.h:90
brlapi_param_flags_t
uint32_t brlapi_param_flags_t
Definition: brlapi.h:1030
brlapi__ignoreKeys
int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi__writeText
int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text)
brlapi_leaveRawMode
int BRLAPI_STDCALL brlapi_leaveRawMode(void)
brlapi_param_t
brlapi_param_t
Definition: brlapi_param.h:36
brlapi_libcerrno
#define brlapi_libcerrno
Definition: brlapi.h:1278
brlapi_error_location
brlapi_error_t *BRLAPI_STDCALL brlapi_error_location(void)
brlapi__enterRawMode
int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver)
brlapi_writeStruct::textSize
int textSize
Definition: brlapi.h:1415
brlapi_defaultExceptionHandler
void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size)
brlapi_write
int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments)
brlapi_errno
#define brlapi_errno
Definition: brlapi.h:1276
brlapi_openConnection
brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
brlapi_writeStruct
Definition: brlapi.h:1410
brlapi_getDriverName
int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size)
brlapi_strexception
int BRLAPI_STDCALL brlapi_strexception(char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize)
brlapi_describeKeyCode
int BRLAPI_STDCALL brlapi_describeKeyCode(brlapi_keyCode_t code, brlapi_describedKeyCode_t *description)
brlapi_error_t::brlerrno
int brlerrno
Definition: brlapi.h:1238
BRLAPI_KEY_FLAGS_SHIFT
#define BRLAPI_KEY_FLAGS_SHIFT
Definition: brlapi_keycodes.h:111
brlapi_rangeType_command
Definition: brlapi.h:808
brlapi_writeStruct::attrAnd
unsigned char * attrAnd
Definition: brlapi.h:1416
brlapi__closeConnection
void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle)
brlapi_packetType_t
uint32_t brlapi_packetType_t
Definition: brlapi.h:1293
brlapi__suspendDriver
int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver)
brlapi_errfun
#define brlapi_errfun
Definition: brlapi.h:1282
brlapi_writeArguments_t
Definition: brlapi.h:554
brlapi__acceptAllKeys
#define brlapi__acceptAllKeys(handle)
Definition: brlapi.h:876
brlapi__strexception
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)
brlapi_unwatchParameter
int BRLAPI_STDCALL brlapi_unwatchParameter(brlapi_paramCallbackDescriptor_t descriptor)
brlapi_writeStruct::text
char * text
Definition: brlapi.h:1414
brlapi__writeDots
int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots)
brlapi_paramCallbackDescriptor_t
void * brlapi_paramCallbackDescriptor_t
Definition: brlapi.h:1111
brlapi_acceptAllKeys
#define brlapi_acceptAllKeys()
Definition: brlapi.h:873
brlapi_setExceptionHandler
brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler)
brlapi_enterTtyModeWithPath
int BRLAPI_STDCALL brlapi_enterTtyModeWithPath(int *ttys, int count, const char *driver)
brlapi_expandKeyCode
int BRLAPI_STDCALL brlapi_expandKeyCode(brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion)
brlapi_readKey
int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code)
brlapi_error_t::errfun
const char * errfun
Definition: brlapi.h:1241
brlapi_writeStruct::attrOr
unsigned char * attrOr
Definition: brlapi.h:1417
brlapi_enterTtyMode
int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver)
brlapi__enterTtyMode
int BRLAPI_STDCALL brlapi__enterTtyMode(brlapi_handle_t *handle, int tty, const char *driver)
brlapi__getModelIdentifier
int BRLAPI_STDCALL brlapi__getModelIdentifier(brlapi_handle_t *handle, char *buffer, size_t size)
brlapi_param.h
brlapi_watchParameter
brlapi_paramCallbackDescriptor_t BRLAPI_STDCALL brlapi_watchParameter(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, brlapi_paramCallback_t func, void *priv, void *data, size_t len)
brlapi__unwatchParameter
int BRLAPI_STDCALL brlapi__unwatchParameter(brlapi_handle_t *handle, brlapi_paramCallbackDescriptor_t descriptor)
brlapi_setFocus
int BRLAPI_STDCALL brlapi_setFocus(int tty)
brlapi_rangeType_t
brlapi_rangeType_t
Definition: brlapi.h:805
brlapi__setFocus
int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty)
brlapi__getDriverName
int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size)
brlapi__pause
void BRLAPI_STDCALL brlapi__pause(brlapi_handle_t *handle, int timeout_ms)
brlapi_range_t
Definition: brlapi.h:882
brlapi__openConnection
brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
brlapi__leaveRawMode
int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle)
brlapi__writeWText
int BRLAPI_STDCALL brlapi__writeWText(brlapi_handle_t *handle, int cursor, const wchar_t *text)
brlapi_pause
void BRLAPI_STDCALL brlapi_pause(int timeout_ms)
brlapi_enterRawMode
int BRLAPI_STDCALL brlapi_enterRawMode(const char *driver)
brlapi__defaultExceptionHandler
void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size)
brlapi_describedKeyCode_t
Definition: brlapi.h:685
brlapi_connectionSettings_t
Settings structure for BrlAPI connection.
Definition: brlapi.h:192
brlapi_rangeType_type
Definition: brlapi.h:807
brlapi_acceptKeys
int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi_connectionSettings_t::host
const char * host
Definition: brlapi.h:210
brlapi_error_t::libcerrno
int libcerrno
Definition: brlapi.h:1239
brlapi_error_t
Definition: brlapi.h:1237
brlapi_writeStruct::charset
char * charset
Definition: brlapi.h:1419
brlapi__setParameter
int BRLAPI_STDCALL brlapi__setParameter(brlapi_handle_t *handle, brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, const void *data, size_t len)
brlapi_getParameter
ssize_t BRLAPI_STDCALL brlapi_getParameter(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, void *data, size_t len)
brlapi__setExceptionHandler
brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler)
brlapi_rangeType_code
Definition: brlapi.h:810
brlapi_param_subparam_t
uint64_t brlapi_param_subparam_t
Definition: brlapi_param.h:110
brlapi_writeWText
int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text)
brlapi_ignoreAllKeys
#define brlapi_ignoreAllKeys()
Definition: brlapi.h:857
brlapi__getClientData
void *BRLAPI_STDCALL brlapi__getClientData(brlapi_handle_t *handle)
brlapi_gaierrno
#define brlapi_gaierrno
Definition: brlapi.h:1280
brlapi_strerror
const char *BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error)
brlapi_exceptionHandler_t
void(BRLAPI_STDCALL * brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size)
Definition: brlapi.h:1316
brlapi_leaveTtyMode
int BRLAPI_STDCALL brlapi_leaveTtyMode(void)
brlapi_getParameterAlloc
void *BRLAPI_STDCALL brlapi_getParameterAlloc(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, size_t *len)
brlapi__ignoreAllKeys
#define brlapi__ignoreAllKeys(handle)
Definition: brlapi.h:860
brlapi_getModelIdentifier
int BRLAPI_STDCALL brlapi_getModelIdentifier(char *buffer, size_t size)
brlapi_paramCallback_t
void(* brlapi_paramCallback_t)(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, void *priv, const void *data, size_t len)
Definition: brlapi.h:1104
brlapi__recvRaw
ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size)