BrlAPI: brlapi.h Source File

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-2021 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.3"
39
41 #define BRLAPI_MAJOR 0
42
44 #define BRLAPI_MINOR 8
45
47 #define BRLAPI_REVISION 3
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 HAVE_POLKIT
148 #define BRLAPI_DEFAUTH_POLKIT "+polkit"
149 #else /* HAVE_POLKIT */
150 #define BRLAPI_DEFAUTH_POLKIT ""
151 #endif /* HAVE_POLKIT */
152
153 #define BRLAPI_DEFAUTH BRLAPI_DEFAUTH_KEYFILE BRLAPI_DEFAUTH_POLKIT
154 #endif /* BRLAPI_WIN32 */
155
161 #ifdef __MINGW32__
162 typedef HANDLE brlapi_fileDescriptor;
163 #else /* __MINGW32__ */
164 typedef int brlapi_fileDescriptor;
165 #endif /* __MINGW32__ */
166
171 #ifdef __MINGW32__
172 #define BRLAPI_INVALID_FILE_DESCRIPTOR INVALID_HANDLE_VALUE
173 #else /* __MINGW32__ */
174 #define BRLAPI_INVALID_FILE_DESCRIPTOR -1
175 #endif /* __MINGW32__ */
176
207 typedef struct {
215 const char *auth;
216
225 const char *host;
226 } brlapi_connectionSettings_t;
227
228 /* BRLAPI_SETTINGS_INITIALIZER */
231 #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
232
233 /* brlapi_openConnection */
280 #ifndef BRLAPI_NO_SINGLE_SESSION
281 brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
282 #endif /* BRLAPI_NO_SINGLE_SESSION */
283 brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
284
285 /* brlapi_fileDescriptor */
293 #ifndef BRLAPI_NO_SINGLE_SESSION
294 brlapi_fileDescriptor BRLAPI_STDCALL brlapi_getFileDescriptor(void);
295 #endif /* BRLAPI_NO_SINGLE_SESSION */
296 brlapi_fileDescriptor BRLAPI_STDCALL brlapi__getFileDescriptor(brlapi_handle_t *handle);
297
298
299 /* brlapi_closeConnection */
306 #ifndef BRLAPI_NO_SINGLE_SESSION
307 void BRLAPI_STDCALL brlapi_closeConnection(void);
308 #endif /* BRLAPI_NO_SINGLE_SESSION */
309 void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle);
310
319 /* brlapi__setClientData */
324 #ifndef BRLAPI_NO_SINGLE_SESSION
325 void BRLAPI_STDCALL brlapi_setClientData(void *data);
326 #endif /* BRLAPI_NO_SINGLE_SESSION */
327 void BRLAPI_STDCALL brlapi__setClientData(brlapi_handle_t *handle, void *data);
328
329 /* brlapi__getClientData */
334 #ifndef BRLAPI_NO_SINGLE_SESSION
335 void * BRLAPI_STDCALL brlapi_getClientData(void);
336 #endif /* BRLAPI_NO_SINGLE_SESSION */
337 void * BRLAPI_STDCALL brlapi__getClientData(brlapi_handle_t *handle);
338
354 #define BRLAPI_MAXNAMELENGTH 31
355
356 /* brlapi_getDriverName */
369 #ifndef BRLAPI_NO_SINGLE_SESSION
370 int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size);
371 #endif /* BRLAPI_NO_SINGLE_SESSION */
372 int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size);
373
374 /* brlapi_getModelIdentifier */
387 #ifndef BRLAPI_NO_SINGLE_SESSION
388 int BRLAPI_STDCALL brlapi_getModelIdentifier(char *buffer, size_t size);
389 #endif /* BRLAPI_NO_SINGLE_SESSION */
390 int BRLAPI_STDCALL brlapi__getModelIdentifier(brlapi_handle_t *handle, char *buffer, size_t size);
391
392 /* brlapi_getDisplaySize */
394 #ifndef BRLAPI_NO_SINGLE_SESSION
395 int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y);
396 #endif /* BRLAPI_NO_SINGLE_SESSION */
397 int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y);
398
422 /* brlapi_enterTtyMode */
444 #ifndef BRLAPI_NO_SINGLE_SESSION
445 int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver);
446 #endif /* BRLAPI_NO_SINGLE_SESSION */
447 int BRLAPI_STDCALL brlapi__enterTtyMode(brlapi_handle_t *handle, int tty, const char *driver);
448
458 #define BRLAPI_TTY_DEFAULT -1
459
460 /* brlapi_enterTtyModeWithPath */
479 #ifndef BRLAPI_NO_SINGLE_SESSION
480 int BRLAPI_STDCALL brlapi_enterTtyModeWithPath(const int *ttys, int count, const char *driver);
481 #endif /* BRLAPI_NO_SINGLE_SESSION */
482 int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, const int *ttys, int count, const char *driver);
483
484 /* brlapi_leaveTtyMode */
491 #ifndef BRLAPI_NO_SINGLE_SESSION
492 int BRLAPI_STDCALL brlapi_leaveTtyMode(void);
493 #endif /* BRLAPI_NO_SINGLE_SESSION */
494 int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle);
495
496 /* brlapi_setFocus */
507 #ifndef BRLAPI_NO_SINGLE_SESSION
508 int BRLAPI_STDCALL brlapi_setFocus(int tty);
509 #endif /* BRLAPI_NO_SINGLE_SESSION */
510 int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty);
511
541 /* brlapi_writeText */
556 #ifndef BRLAPI_NO_SINGLE_SESSION
557 int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text);
558 #endif /* BRLAPI_NO_SINGLE_SESSION */
559 int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text);
560
561 /* brlapi_writeWText */
574 #ifndef BRLAPI_NO_SINGLE_SESSION
575 int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text);
576 #endif /* BRLAPI_NO_SINGLE_SESSION */
577 int BRLAPI_STDCALL brlapi__writeWText(brlapi_handle_t *handle, int cursor, const wchar_t *text);
578
579 /* brlapi_writeDots */
587 #ifndef BRLAPI_NO_SINGLE_SESSION
588 int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots);
589 #endif /* BRLAPI_NO_SINGLE_SESSION */
590 int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots);
591
592 /* brlapi_writeArguments_t */
594 typedef struct {
595 int displayNumber ;
596 unsigned int regionBegin ;
597 int regionSize ;
598 const char *text ;
599 int textSize ;
600 const unsigned char *andMask ;
601 const unsigned char *orMask ;
602 int cursor ;
603 const char *charset ;
604 } brlapi_writeArguments_t;
605
610 #define BRLAPI_DISPLAY_DEFAULT -1
611
616 #define BRLAPI_CURSOR_LEAVE -1
617
622 #define BRLAPI_CURSOR_OFF 0
623
624 /* BRLAPI_WRITEARGUMENTS_INITIALIZER */
634 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { \
635 .displayNumber = BRLAPI_DISPLAY_DEFAULT, \
636 .regionBegin = 0, \
637 .regionSize = 0, \
638 .text = NULL, \
639 .textSize = -1, \
640 .andMask = NULL, \
641 .orMask = NULL, \
642 .cursor = BRLAPI_CURSOR_LEAVE, \
643 .charset = NULL \
644 }
645
646 /* brlapi_write */
682 #ifndef BRLAPI_NO_SINGLE_SESSION
683 int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments);
684 #endif /* BRLAPI_NO_SINGLE_SESSION */
685 int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments);
686
689 #include "brlapi_keycodes.h"
690
704 /* brlapi_expandedKeyCode_t */
706 typedef struct {
707 unsigned int type ;
708 unsigned int command ;
709 unsigned int argument ;
710 unsigned int flags ;
711 } brlapi_expandedKeyCode_t;
712
713 /* brlapi_expandKeyCode */
721 int BRLAPI_STDCALL brlapi_expandKeyCode (brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion);
722
723 /* brlapi_describedKeyCode_t */
725 typedef struct {
726 const char *type ;
727 const char *command ;
728 unsigned int argument ;
729 unsigned int flags ;
730 const char *flag[64 - BRLAPI_KEY_FLAGS_SHIFT] ;
731 brlapi_expandedKeyCode_t values ;
732 } brlapi_describedKeyCode_t;
733
734 /* brlapi_describeKeyCode */
742 int BRLAPI_STDCALL brlapi_describeKeyCode (brlapi_keyCode_t code, brlapi_describedKeyCode_t *description);
743
745 #define BRLAPI_UC_ROW 0x2800UL
746
747 /* brlapi_readKey */
816 #ifndef BRLAPI_NO_SINGLE_SESSION
817 int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code);
818 #endif /* BRLAPI_NO_SINGLE_SESSION */
819 int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code);
820
821 /* brlapi_readKeyWithTimeout */
842 #ifndef BRLAPI_NO_SINGLE_SESSION
843 int BRLAPI_STDCALL brlapi_readKeyWithTimeout(int timeout_ms, brlapi_keyCode_t *code);
844 #endif /* BRLAPI_NO_SINGLE_SESSION */
845 int BRLAPI_STDCALL brlapi__readKeyWithTimeout(brlapi_handle_t *handle, int timeout_ms, brlapi_keyCode_t *code);
846
848 typedef enum {
849 brlapi_rangeType_all,
850 brlapi_rangeType_type,
851 brlapi_rangeType_command,
852 brlapi_rangeType_key,
853 brlapi_rangeType_code,
854 } brlapi_rangeType_t;
855
856 /* brlapi_ignoreKeys */
868 #ifndef BRLAPI_NO_SINGLE_SESSION
869 int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
870 #endif /* BRLAPI_NO_SINGLE_SESSION */
871 int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
872
873 /* brlapi_acceptKeys */
885 #ifndef BRLAPI_NO_SINGLE_SESSION
886 int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
887 #endif /* BRLAPI_NO_SINGLE_SESSION */
888 int BRLAPI_STDCALL brlapi__acceptKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
889
890 /* brlapi_ignoreAllKeys */
898 #ifndef BRLAPI_NO_SINGLE_SESSION
899 int BRLAPI_STDCALL brlapi_ignoreAllKeys(void);
900 #define brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
901 #endif /* BRLAPI_NO_SINGLE_SESSION */
902 int BRLAPI_STDCALL brlapi__ignoreAllKeys(brlapi_handle_t *handle);
903 #define brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
904
905 /* brlapi_acceptAllKeys */
916 #ifndef BRLAPI_NO_SINGLE_SESSION
917 int BRLAPI_STDCALL brlapi_acceptAllKeys(void);
918 #define brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
919 #endif /* BRLAPI_NO_SINGLE_SESSION */
920 int BRLAPI_STDCALL brlapi__acceptAllKeys(brlapi_handle_t *handle);
921 #define brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
922
927 typedef struct {
928 brlapi_keyCode_t first;
929 brlapi_keyCode_t last;
930 } brlapi_range_t;
931
932 /* brlapi_ignoreKeyRanges */
943 #ifndef BRLAPI_NO_SINGLE_SESSION
944 int BRLAPI_STDCALL brlapi_ignoreKeyRanges(const brlapi_range_t ranges[], unsigned int count);
945 #endif /* BRLAPI_NO_SINGLE_SESSION */
946 int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count);
947
948 /* brlapi_acceptKeyRanges */
959 #ifndef BRLAPI_NO_SINGLE_SESSION
960 int BRLAPI_STDCALL brlapi_acceptKeyRanges(const brlapi_range_t ranges[], unsigned int count);
961 #endif /* BRLAPI_NO_SINGLE_SESSION */
962 int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count);
988 /* brlapi_enterRawMode */
993 #ifndef BRLAPI_NO_SINGLE_SESSION
994 int BRLAPI_STDCALL brlapi_enterRawMode(const char *driver);
995 #endif /* BRLAPI_NO_SINGLE_SESSION */
996 int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver);
997
998 /* brlapi_leaveRawMode */
1001 #ifndef BRLAPI_NO_SINGLE_SESSION
1002 int BRLAPI_STDCALL brlapi_leaveRawMode(void);
1003 #endif /* BRLAPI_NO_SINGLE_SESSION */
1004 int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle);
1005
1006 /* brlapi_sendRaw */
1012 #ifndef BRLAPI_NO_SINGLE_SESSION
1013 ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size);
1014 #endif /* BRLAPI_NO_SINGLE_SESSION */
1015 ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size);
1016
1017 /* brlapi_recvRaw */
1026 #ifndef BRLAPI_NO_SINGLE_SESSION
1027 ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size);
1028 #endif /* BRLAPI_NO_SINGLE_SESSION */
1029 ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size);
1030
1031 /* brlapi_suspendDriver */
1036 #ifndef BRLAPI_NO_SINGLE_SESSION
1037 int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver);
1038 #endif /* BRLAPI_NO_SINGLE_SESSION */
1039 int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver);
1040
1041 /* brlapi_resumeDriver */
1045 #ifndef BRLAPI_NO_SINGLE_SESSION
1046 int BRLAPI_STDCALL brlapi_resumeDriver(void);
1047 #endif /* BRLAPI_NO_SINGLE_SESSION */
1048 int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle);
1051 #include "brlapi_param.h"
1052
1077 typedef uint32_t brlapi_param_flags_t;
1078 #define BRLAPI_PARAMF_LOCAL 0X00
1079 #define BRLAPI_PARAMF_GLOBAL 0X01
1080 #define BRLAPI_PARAMF_SELF 0X02
1082 /* brlapi_getParameter */
1083
1095 #ifndef BRLAPI_NO_SINGLE_SESSION
1096 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);
1097 #endif
1098 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);
1099
1100 /* brlapi_getParameterAlloc */
1113 #ifndef BRLAPI_NO_SINGLE_SESSION
1114 void * BRLAPI_STDCALL brlapi_getParameterAlloc(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, size_t *len);
1115 #endif
1116 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);
1117
1118 /* brlapi_setParameter */
1131 #ifndef BRLAPI_NO_SINGLE_SESSION
1132 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);
1133 #endif
1134 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);
1135
1136 /* brlapi_paramCallback_t */
1151 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);
1152
1153 /* brlapi_paramCallbackDescriptor_t */
1158 typedef void *brlapi_paramCallbackDescriptor_t;
1159
1160 /* brlapi_watchParameter */
1183 #ifndef BRLAPI_NO_SINGLE_SESSION
1184 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);
1185 #endif
1186 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);
1187
1188 /* brlapi_unwatchParameter */
1199 #ifndef BRLAPI_NO_SINGLE_SESSION
1200 int BRLAPI_STDCALL brlapi_unwatchParameter(brlapi_paramCallbackDescriptor_t descriptor);
1201 #endif
1202 int BRLAPI_STDCALL brlapi__unwatchParameter(brlapi_handle_t *handle, brlapi_paramCallbackDescriptor_t descriptor);
1203
1209 /* brlapi_pause */
1216 #ifndef BRLAPI_NO_SINGLE_SESSION
1217 int BRLAPI_STDCALL brlapi_pause(int timeout_ms);
1218 #endif
1219 int BRLAPI_STDCALL brlapi__pause(brlapi_handle_t *handle, int timeout_ms);
1220
1221 /* brlapi_sync */
1229 #ifndef BRLAPI_NO_SINGLE_SESSION
1230 int BRLAPI_STDCALL brlapi_sync(void);
1231 #endif
1232 int BRLAPI_STDCALL brlapi__sync(brlapi_handle_t *handle);
1233
1258 enum brlapi_error {
1259 BRLAPI_ERROR_SUCCESS = 0,
1260 #define BRLAPI_ERROR_SUCCESS 0
1261 BRLAPI_ERROR_NOMEM = 1,
1262 #define BRLAPI_ERROR_NOMEM BRLAPI_ERROR_NOMEM
1263 BRLAPI_ERROR_TTYBUSY = 2,
1264 #define BRLAPI_ERROR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1265 BRLAPI_ERROR_DEVICEBUSY = 3,
1266 #define BRLAPI_ERROR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1267 BRLAPI_ERROR_UNKNOWN_INSTRUCTION = 4,
1268 #define BRLAPI_ERROR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1269 BRLAPI_ERROR_ILLEGAL_INSTRUCTION = 5,
1270 #define BRLAPI_ERROR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1271 BRLAPI_ERROR_INVALID_PARAMETER = 6,
1272 #define BRLAPI_ERROR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1273 BRLAPI_ERROR_INVALID_PACKET = 7,
1274 #define BRLAPI_ERROR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1275 BRLAPI_ERROR_CONNREFUSED = 8,
1276 #define BRLAPI_ERROR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1277 BRLAPI_ERROR_OPNOTSUPP = 9,
1278 #define BRLAPI_ERROR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1279 BRLAPI_ERROR_GAIERR = 10,
1280 #define BRLAPI_ERROR_GAIERR BRLAPI_ERROR_GAIERR
1281 BRLAPI_ERROR_LIBCERR = 11,
1282 #define BRLAPI_ERROR_LIBCERR BRLAPI_ERROR_LIBCERR
1283 BRLAPI_ERROR_UNKNOWNTTY = 12,
1284 #define BRLAPI_ERROR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1285 BRLAPI_ERROR_PROTOCOL_VERSION = 13,
1286 #define BRLAPI_ERROR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1287 BRLAPI_ERROR_EOF = 14,
1288 #define BRLAPI_ERROR_EOF BRLAPI_ERROR_EOF
1289 BRLAPI_ERROR_EMPTYKEY = 15,
1290 #define BRLAPI_ERROR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1291 BRLAPI_ERROR_DRIVERERROR = 16,
1292 #define BRLAPI_ERROR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR
1293 BRLAPI_ERROR_AUTHENTICATION = 17,
1294 #define BRLAPI_ERROR_AUTHENTICATION BRLAPI_ERROR_AUTHENTICATION
1295 BRLAPI_ERROR_READONLY_PARAMETER = 18,
1296 #define BRLAPI_ERROR_READONLY_PARAMETER BRLAPI_ERROR_READONLY_PARAMETER
1297 };
1298
1299 /* brlapi_errlist */
1304 extern const char *brlapi_errlist[];
1305
1306 /* brlapi_nerr */
1308 extern const int brlapi_nerr;
1309
1310 /* brlapi_perror */
1315 void BRLAPI_STDCALL brlapi_perror(const char *s);
1316
1317 /* brlapi_error_t */
1319 typedef struct {
1320 enum brlapi_error brlerrno;
1321 int libcerrno;
1322 int gaierrno;
1323 const char *errfun;
1324 } brlapi_error_t;
1325
1334 brlapi_error_t * BRLAPI_STDCALL brlapi_error_location(void);
1335
1344 extern brlapi_error_t brlapi_error;
1345
1347 extern enum brlapi_error brlapi_errno;
1349 extern int brlapi_libcerrno;
1351 extern int brlapi_gaierrno;
1353 extern const char *brlapi_errfun;
1354
1356 #define brlapi_error (*brlapi_error_location())
1357
1358 #define brlapi_errno (brlapi_error.brlerrno)
1359
1360 #define brlapi_libcerrno (brlapi_error.libcerrno)
1361
1362 #define brlapi_gaierrno (brlapi_error.gaierrno)
1363
1364 #define brlapi_errfun (brlapi_error.errfun)
1365
1366 /* brlapi_strerror */
1374 const char * BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error);
1375
1376 /* brlapi_strerror_r */
1393 size_t BRLAPI_STDCALL brlapi_strerror_r(const brlapi_error_t *error, char *buf, size_t buflen);
1394
1396 typedef uint32_t brlapi_packetType_t;
1397
1398 /* brlapi_getPacketTypeName */
1404 const char * BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type);
1405
1406 /* brlapi_exceptionHandler_t */
1418 #ifndef BRLAPI_NO_SINGLE_SESSION
1419 typedef void (BRLAPI_STDCALL *brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size);
1420 #endif /* BRLAPI_NO_SINGLE_SESSION */
1421 typedef void (BRLAPI_STDCALL *brlapi__exceptionHandler_t)(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1422
1423 /* brlapi_strexception */
1433 #ifndef BRLAPI_NO_SINGLE_SESSION
1434 int BRLAPI_STDCALL brlapi_strexception(char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize);
1435 #endif /* BRLAPI_NO_SINGLE_SESSION */
1436 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);
1437
1438 /* brlapi_setExceptionHandler */
1447 #ifndef BRLAPI_NO_SINGLE_SESSION
1448 brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler);
1449 #endif /* BRLAPI_NO_SINGLE_SESSION */
1450 brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler);
1451
1452 #ifndef BRLAPI_NO_SINGLE_SESSION
1453 void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size);
1454 #endif /* BRLAPI_NO_SINGLE_SESSION */
1455 void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1456
1459 /* Windows-specific tricks - don't look at this */
1460 #ifdef BRLAPI_WIN32
1461 #ifndef BRLAPI_NO_SINGLE_SESSION
1462 int BRLAPI_STDCALL brlapi_writeTextWin(int cursor, const void *str, int wide);
1463 #endif /* BRLAPI_NO_SINGLE_SESSION */
1464 int BRLAPI_STDCALL brlapi__writeTextWin(brlapi_handle_t *handle, int cursor, const void *str, int wide);
1465
1466 #ifndef BRLAPI_NO_SINGLE_SESSION
1467 int BRLAPI_STDCALL brlapi_writeWin(const brlapi_writeArguments_t *s, int wide);
1468 #endif /* BRLAPI_NO_SINGLE_SESSION */
1469 int BRLAPI_STDCALL brlapi__writeWin(brlapi_handle_t *handle, const brlapi_writeArguments_t *s, int wide);
1470
1471 #ifdef UNICODE
1472 #ifndef BRLAPI_NO_SINGLE_SESSION
1473 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 1)
1474 #endif /* BRLAPI_NO_SINGLE_SESSION */
1475 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 1)
1476
1477 #ifndef BRLAPI_NO_SINGLE_SESSION
1478 #define brlapi_write(s) brlapi_writeWin(s, 1)
1479 #endif /* BRLAPI_NO_SINGLE_SESSION */
1480 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 1)
1481
1482 #else /* UNICODE */
1483
1484 #ifndef BRLAPI_NO_SINGLE_SESSION
1485 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 0)
1486 #endif /* BRLAPI_NO_SINGLE_SESSION */
1487 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 0)
1488
1489 #ifndef BRLAPI_NO_SINGLE_SESSION
1490 #define brlapi_write(s) brlapi_writeWin(s, 0)
1491 #endif /* BRLAPI_NO_SINGLE_SESSION */
1492 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 0)
1493
1494 #endif /* UNICODE */
1495 #endif /* BRLAPI_WIN32 */
1496
1497 #ifndef BRLAPI_NO_DEPRECATED
1498
1510 #define brlapi_settings_t brlapi_connectionSettings_t
1511
1513 typedef struct {
1514 int displayNumber;
1515 unsigned int regionBegin;
1516 unsigned int regionSize;
1517 const char *text;
1518 int textSize;
1519 const unsigned char *attrAnd;
1520 const unsigned char *attrOr;
1521 int cursor;
1522 const char *charset;
1523 } brlapi_writeStruct;
1524 #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
1525
1526 #define brl_keycode_t brlapi_keyCode_t
1527 #define brl_type_t brlapi_packetType_t
1528
1529 #define BRLCOMMANDS NULL
1530 #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX
1531
1532 #ifndef BRLAPI_NO_SINGLE_SESSION
1533 #define brlapi_initializeConnection brlapi_openConnection
1534 #define brlapi_getTty brlapi_enterTtyMode
1535 #define brlapi_getTtyPath brlapi_enterTtyModeWithPath
1536 #define brlapi_leaveTty brlapi_leaveTtyMode
1537 #define brlapi_unignoreKeyRange brlapi_acceptKeyRange
1538 #define brlapi_unignoreKeySet brlapi_acceptKeySet
1539 #define brlapi_getRaw brlapi_enterRawMode
1540 #define brlapi_leaveRaw brlapi_leaveRawMode
1541 #define brlapi_suspend brlapi_suspendDriver
1542 #define brlapi_resume brlapi_resumeDriver
1543 #endif /* BRLAPI_NO_SINGLE_SESSION */
1544
1545 #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS
1546 #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM
1547 #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1548 #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1549 #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1550 #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1551 #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1552 #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1553 #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1554 #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1555 #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR
1556 #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR
1557 #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1558 #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1559 #define BRLERR_EOF BRLAPI_ERROR_EOF
1560 #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1561 #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR
1562
1564 #endif /* BRLAPI_NO_DEPRECATED */
1565
1566 #ifdef __cplusplus
1567 }
1568 #endif /* __cplusplus */
1569
1570 #endif /* BRLAPI_INCLUDED */
brlapi_writeStruct::text
const char * text
Definition: brlapi.h:1517
brlapi__defaultExceptionHandler
void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size)
brlapi__recvRaw
ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size)
brlapi_writeStruct::textSize
int textSize
Definition: brlapi.h:1518
BRLAPI_ERROR_LIBCERR
#define BRLAPI_ERROR_LIBCERR
Definition: brlapi.h:1282
brlapi_error_t::libcerrno
int libcerrno
Definition: brlapi.h:1321
brlapi_enterTtyModeWithPath
int BRLAPI_STDCALL brlapi_enterTtyModeWithPath(const int *ttys, int count, const char *driver)
brlapi_getLibraryVersion
void brlapi_getLibraryVersion(int *major, int *minor, int *revision)
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_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_connectionSettings_t::auth
const char * auth
Definition: brlapi.h:215
brlapi_suspendDriver
int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver)
brlapi_paramCallbackDescriptor_t
void * brlapi_paramCallbackDescriptor_t
Definition: brlapi.h:1158
brlapi__leaveRawMode
int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle)
brlapi_writeStruct::displayNumber
int displayNumber
Definition: brlapi.h:1514
brlapi__sendRaw
ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size)
brlapi_libcerrno
#define brlapi_libcerrno
Definition: brlapi.h:1360
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:1421
brlapi_rangeType_command
@ brlapi_rangeType_command
Definition: brlapi.h:851
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__getDisplaySize
int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y)
brlapi_recvRaw
ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size)
brlapi_expandedKeyCode_t
Definition: brlapi.h:706
brlapi_getDisplaySize
int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y)
brlapi_error_t::gaierrno
int gaierrno
Definition: brlapi.h:1322
brlapi__suspendDriver
int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver)
BRLAPI_ERROR_UNKNOWNTTY
#define BRLAPI_ERROR_UNKNOWNTTY
Definition: brlapi.h:1284
brlapi_setExceptionHandler
brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler)
brlapi_error_location
brlapi_error_t *BRLAPI_STDCALL brlapi_error_location(void)
brlapi_closeConnection
void BRLAPI_STDCALL brlapi_closeConnection(void)
BRLAPI_ERROR_TTYBUSY
#define BRLAPI_ERROR_TTYBUSY
Definition: brlapi.h:1264
brlapi_perror
void BRLAPI_STDCALL brlapi_perror(const char *s)
brlapi_pause
int BRLAPI_STDCALL brlapi_pause(int timeout_ms)
brlapi_error
brlapi_error
Definition: brlapi.h:1258
brlapi__writeText
int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text)
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_writeDots
int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots)
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_param.h
BRLAPI_ERROR_SUCCESS
#define BRLAPI_ERROR_SUCCESS
Definition: brlapi.h:1260
brlapi__openConnection
brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
brlapi_describeKeyCode
int BRLAPI_STDCALL brlapi_describeKeyCode(brlapi_keyCode_t code, brlapi_describedKeyCode_t *description)
brlapi_writeStruct::attrOr
const unsigned char * attrOr
Definition: brlapi.h:1520
brlapi_writeStruct::cursor
int cursor
Definition: brlapi.h:1521
BRLAPI_ERROR_DEVICEBUSY
#define BRLAPI_ERROR_DEVICEBUSY
Definition: brlapi.h:1266
brlapi_errno
#define brlapi_errno
Definition: brlapi.h:1358
BRLAPI_ERROR_EOF
#define BRLAPI_ERROR_EOF
Definition: brlapi.h:1288
BRLAPI_ERROR_UNKNOWN_INSTRUCTION
#define BRLAPI_ERROR_UNKNOWN_INSTRUCTION
Definition: brlapi.h:1268
brlapi_keycodes.h
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_ERROR_DRIVERERROR
#define BRLAPI_ERROR_DRIVERERROR
Definition: brlapi.h:1292
brlapi__setClientData
void BRLAPI_STDCALL brlapi__setClientData(brlapi_handle_t *handle, void *data)
brlapi_ignoreKeys
int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi__enterTtyModeWithPath
int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, const int *ttys, int count, const char *driver)
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__writeDots
int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots)
brlapi_acceptAllKeys
#define brlapi_acceptAllKeys()
Definition: brlapi.h:918
brlapi__resumeDriver
int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle)
brlapi_connectionSettings_t
Settings structure for BrlAPI connection.
Definition: brlapi.h:207
brlapi_param_flags_t
uint32_t brlapi_param_flags_t
Definition: brlapi.h:1077
brlapi_setClientData
void BRLAPI_STDCALL brlapi_setClientData(void *data)
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_range_t
Definition: brlapi.h:927
brlapi__readKeyWithTimeout
int BRLAPI_STDCALL brlapi__readKeyWithTimeout(brlapi_handle_t *handle, int timeout_ms, brlapi_keyCode_t *code)
brlapi_resumeDriver
int BRLAPI_STDCALL brlapi_resumeDriver(void)
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__pause
int BRLAPI_STDCALL brlapi__pause(brlapi_handle_t *handle, int timeout_ms)
brlapi_writeText
int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text)
brlapi_rangeType_code
@ brlapi_rangeType_code
Definition: brlapi.h:853
brlapi__getDriverName
int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size)
brlapi_leaveRawMode
int BRLAPI_STDCALL brlapi_leaveRawMode(void)
brlapi__unwatchParameter
int BRLAPI_STDCALL brlapi__unwatchParameter(brlapi_handle_t *handle, brlapi_paramCallbackDescriptor_t descriptor)
brlapi_strerror
const char *BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error)
brlapi__acceptKeyRanges
int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count)
brlapi_range_t::last
brlapi_keyCode_t last
Definition: brlapi.h:929
brlapi__getModelIdentifier
int BRLAPI_STDCALL brlapi__getModelIdentifier(brlapi_handle_t *handle, char *buffer, size_t size)
brlapi__getFileDescriptor
brlapi_fileDescriptor BRLAPI_STDCALL brlapi__getFileDescriptor(brlapi_handle_t *handle)
brlapi_writeStruct::charset
const char * charset
Definition: brlapi.h:1522
brlapi_writeStruct
Definition: brlapi.h:1513
brlapi_error_t
Definition: brlapi.h:1319
brlapi_sendRaw
ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size)
brlapi_range_t::first
brlapi_keyCode_t first
Definition: brlapi.h:928
brlapi__readKey
int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code)
brlapi__leaveTtyMode
int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle)
BRLAPI_ERROR_READONLY_PARAMETER
#define BRLAPI_ERROR_READONLY_PARAMETER
Definition: brlapi.h:1296
brlapi_param_t
brlapi_param_t
Definition: brlapi_param.h:36
brlapi_openConnection
brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
BRLAPI_KEY_FLAGS_SHIFT
#define BRLAPI_KEY_FLAGS_SHIFT
Definition: brlapi_keycodes.h:130
brlapi__ignoreKeyRanges
int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count)
brlapi_rangeType_key
@ brlapi_rangeType_key
Definition: brlapi.h:852
brlapi_rangeType_type
@ brlapi_rangeType_type
Definition: brlapi.h:850
brlapi_acceptKeys
int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
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:1151
brlapi_gaierrno
#define brlapi_gaierrno
Definition: brlapi.h:1362
brlapi_keyCode_t
uint64_t brlapi_keyCode_t
Definition: brlapi_keycodes.h:109
brlapi_error_t::errfun
const char * errfun
Definition: brlapi.h:1323
brlapi__sync
int BRLAPI_STDCALL brlapi__sync(brlapi_handle_t *handle)
brlapi_fileDescriptor
int brlapi_fileDescriptor
Definition: brlapi.h:164
brlapi__enterRawMode
int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver)
brlapi_write
int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments)
brlapi_writeWText
int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text)
BRLAPI_ERROR_OPNOTSUPP
#define BRLAPI_ERROR_OPNOTSUPP
Definition: brlapi.h:1278
brlapi_enterTtyMode
int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver)
BRLAPI_ERROR_CONNREFUSED
#define BRLAPI_ERROR_CONNREFUSED
Definition: brlapi.h:1276
brlapi__setExceptionHandler
brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler)
brlapi_getClientData
void *BRLAPI_STDCALL brlapi_getClientData(void)
brlapi_writeStruct::attrAnd
const unsigned char * attrAnd
Definition: brlapi.h:1519
brlapi__closeConnection
void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle)
brlapi__ignoreKeys
int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi_rangeType_t
brlapi_rangeType_t
Definition: brlapi.h:848
BRLAPI_ERROR_PROTOCOL_VERSION
#define BRLAPI_ERROR_PROTOCOL_VERSION
Definition: brlapi.h:1286
brlapi_handle_t
struct brlapi_handle_t brlapi_handle_t
Definition: brlapi.h:105
brlapi__ignoreAllKeys
#define brlapi__ignoreAllKeys(handle)
Definition: brlapi.h:903
brlapi_rangeType_all
@ brlapi_rangeType_all
Definition: brlapi.h:849
brlapi_writeArguments_t
Definition: brlapi.h:594
brlapi_error
#define brlapi_error
Definition: brlapi.h:1356
brlapi_exceptionHandler_t
void(BRLAPI_STDCALL * brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size)
Definition: brlapi.h:1419
brlapi_writeStruct::regionSize
unsigned int regionSize
Definition: brlapi.h:1516
BRLAPI_ERROR_ILLEGAL_INSTRUCTION
#define BRLAPI_ERROR_ILLEGAL_INSTRUCTION
Definition: brlapi.h:1270
brlapi_unwatchParameter
int BRLAPI_STDCALL brlapi_unwatchParameter(brlapi_paramCallbackDescriptor_t descriptor)
brlapi__acceptAllKeys
#define brlapi__acceptAllKeys(handle)
Definition: brlapi.h:921
BRLAPI_STDCALL
#define BRLAPI_STDCALL
Definition: brlapi.h:61
brlapi_writeStruct::regionBegin
unsigned int regionBegin
Definition: brlapi.h:1515
brlapi_errlist
const char * brlapi_errlist[]
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_setFocus
int BRLAPI_STDCALL brlapi_setFocus(int tty)
BRLAPI_ERROR_NOMEM
#define BRLAPI_ERROR_NOMEM
Definition: brlapi.h:1262
brlapi__setFocus
int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty)
brlapi_getFileDescriptor
brlapi_fileDescriptor BRLAPI_STDCALL brlapi_getFileDescriptor(void)
brlapi__getClientData
void *BRLAPI_STDCALL brlapi__getClientData(brlapi_handle_t *handle)
brlapi_ignoreAllKeys
#define brlapi_ignoreAllKeys()
Definition: brlapi.h:900
brlapi__enterTtyMode
int BRLAPI_STDCALL brlapi__enterTtyMode(brlapi_handle_t *handle, int tty, const char *driver)
brlapi_packetType_t
uint32_t brlapi_packetType_t
Definition: brlapi.h:1396
brlapi__write
int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments)
brlapi_sync
int BRLAPI_STDCALL brlapi_sync(void)
brlapi__writeWText
int BRLAPI_STDCALL brlapi__writeWText(brlapi_handle_t *handle, int cursor, const wchar_t *text)
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_connectionSettings_t::host
const char * host
Definition: brlapi.h:225
BRLAPI_ERROR_AUTHENTICATION
#define BRLAPI_ERROR_AUTHENTICATION
Definition: brlapi.h:1294
brlapi_getHandleSize
size_t BRLAPI_STDCALL brlapi_getHandleSize(void)
brlapi_readKeyWithTimeout
int BRLAPI_STDCALL brlapi_readKeyWithTimeout(int timeout_ms, brlapi_keyCode_t *code)
brlapi_nerr
const int brlapi_nerr
brlapi_describedKeyCode_t
Definition: brlapi.h:725
BRLAPI_ERROR_INVALID_PARAMETER
#define BRLAPI_ERROR_INVALID_PARAMETER
Definition: brlapi.h:1272
brlapi_getPacketTypeName
const char *BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type)
brlapi_getModelIdentifier
int BRLAPI_STDCALL brlapi_getModelIdentifier(char *buffer, size_t size)
BRLAPI_ERROR_GAIERR
#define BRLAPI_ERROR_GAIERR
Definition: brlapi.h:1280
BRLAPI_ERROR_EMPTYKEY
#define BRLAPI_ERROR_EMPTYKEY
Definition: brlapi.h:1290
brlapi_getDriverName
int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size)
brlapi_strerror_r
size_t BRLAPI_STDCALL brlapi_strerror_r(const brlapi_error_t *error, char *buf, size_t buflen)
BRLAPI_ERROR_INVALID_PACKET
#define BRLAPI_ERROR_INVALID_PACKET
Definition: brlapi.h:1274
brlapi_param_subparam_t
uint64_t brlapi_param_subparam_t
Definition: brlapi_param.h:108
brlapi_ignoreKeyRanges
int BRLAPI_STDCALL brlapi_ignoreKeyRanges(const brlapi_range_t ranges[], unsigned int count)
brlapi_errfun
#define brlapi_errfun
Definition: brlapi.h:1364
brlapi_leaveTtyMode
int BRLAPI_STDCALL brlapi_leaveTtyMode(void)
brlapi_enterRawMode
int BRLAPI_STDCALL brlapi_enterRawMode(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_defaultExceptionHandler
void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size)