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-2025 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
32 #ifndef BRLAPI_INCLUDED
33 #define BRLAPI_INCLUDED
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif /* __cplusplus */
38
39 #define BRLAPI_WIN32 1
40
45 #define BRLAPI_RELEASE "0.8.7"
46
48 #define BRLAPI_MAJOR 0
49
51 #define BRLAPI_MINOR 8
52
54 #define BRLAPI_REVISION 7
55
57 void brlapi_getLibraryVersion(int *major, int *minor, int *revision);
58
61 /* Types are defined there */
62 #include <sys/types.h>
63
64 #ifdef BRLAPI_WIN32
65 #include <windows.h>
66 #define BRLAPI_STDCALL __stdcall
67 #else /* BRLAPI_WIN32 */
68 #define BRLAPI_STDCALL
69 #endif /* BRLAPI_WIN32 */
70
71 #ifdef _MSC_VER
72 typedef __int64 uint64_t;
73 typedef __int32 uint32_t;
74 #define UINT64_C(x) (x ## Ui64)
75 #define PRIx64 "I64x"
76 typedef signed int ssize_t;
77 #else /* _MSC_VER */
78
79 /* this is for uint*_t */
80 #include <stdint.h>
81
82 /* NULL is defined there */
83 #include <unistd.h>
84
85 #include <inttypes.h> /* For PRIx64 */
86 #endif /* _MSC_VER */
87
88 #include <wchar.h>
89
112 typedef struct brlapi_handle_t brlapi_handle_t;
113
115 size_t BRLAPI_STDCALL brlapi_getHandleSize(void);
116
130 #define BRLAPI_SOCKETPORTNUM 4101
131 #define BRLAPI_SOCKETPORT "4101"
132
134 #define BRLAPI_SOCKETPATH "\\\\.\\pipe\\BrlAPI"
135
140 #define BRLAPI_ETCDIR "//etc"
141
145 #define BRLAPI_AUTHKEYFILE "brlapi.key"
146
148 #ifdef BRLAPI_WIN32
149 /* No authentication by default on Windows */
150 #define BRLAPI_DEFAUTH "none"
151 #else /* BRLAPI_WIN32 */
152 #define BRLAPI_DEFAUTH_KEYFILE "keyfile:" BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE
153
154 #ifdef HAVE_POLKIT
155 #define BRLAPI_DEFAUTH_POLKIT "+polkit"
156 #else /* HAVE_POLKIT */
157 #define BRLAPI_DEFAUTH_POLKIT ""
158 #endif /* HAVE_POLKIT */
159
160 #define BRLAPI_DEFAUTH BRLAPI_DEFAUTH_KEYFILE BRLAPI_DEFAUTH_POLKIT
161 #endif /* BRLAPI_WIN32 */
162
168 #ifdef __MINGW32__
169 typedef HANDLE brlapi_fileDescriptor;
170 #else /* __MINGW32__ */
171 typedef int brlapi_fileDescriptor;
172 #endif /* __MINGW32__ */
173
178 #ifdef __MINGW32__
179 #define BRLAPI_INVALID_FILE_DESCRIPTOR INVALID_HANDLE_VALUE
180 #else /* __MINGW32__ */
181 #define BRLAPI_INVALID_FILE_DESCRIPTOR -1
182 #endif /* __MINGW32__ */
183
214 typedef struct {
222 const char *auth;
223
232 const char *host;
233 } brlapi_connectionSettings_t;
234
235 /* BRLAPI_SETTINGS_INITIALIZER */
238 #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
239
240 /* brlapi_openConnection */
287 #ifndef BRLAPI_NO_SINGLE_SESSION
288 brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
289 #endif /* BRLAPI_NO_SINGLE_SESSION */
290 brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
291
292 /* brlapi_fileDescriptor */
300 #ifndef BRLAPI_NO_SINGLE_SESSION
301 brlapi_fileDescriptor BRLAPI_STDCALL brlapi_getFileDescriptor(void);
302 #endif /* BRLAPI_NO_SINGLE_SESSION */
303 brlapi_fileDescriptor BRLAPI_STDCALL brlapi__getFileDescriptor(brlapi_handle_t *handle);
304
305
306 /* brlapi_closeConnection */
313 #ifndef BRLAPI_NO_SINGLE_SESSION
314 void BRLAPI_STDCALL brlapi_closeConnection(void);
315 #endif /* BRLAPI_NO_SINGLE_SESSION */
316 void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle);
317
326 /* brlapi__setClientData */
331 #ifndef BRLAPI_NO_SINGLE_SESSION
332 void BRLAPI_STDCALL brlapi_setClientData(void *data);
333 #endif /* BRLAPI_NO_SINGLE_SESSION */
334 void BRLAPI_STDCALL brlapi__setClientData(brlapi_handle_t *handle, void *data);
335
336 /* brlapi__getClientData */
341 #ifndef BRLAPI_NO_SINGLE_SESSION
342 void * BRLAPI_STDCALL brlapi_getClientData(void);
343 #endif /* BRLAPI_NO_SINGLE_SESSION */
344 void * BRLAPI_STDCALL brlapi__getClientData(brlapi_handle_t *handle);
345
361 #define BRLAPI_MAXNAMELENGTH 31
362
363 /* brlapi_getDriverName */
376 #ifndef BRLAPI_NO_SINGLE_SESSION
377 int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size);
378 #endif /* BRLAPI_NO_SINGLE_SESSION */
379 int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size);
380
381 /* brlapi_getModelIdentifier */
394 #ifndef BRLAPI_NO_SINGLE_SESSION
395 int BRLAPI_STDCALL brlapi_getModelIdentifier(char *buffer, size_t size);
396 #endif /* BRLAPI_NO_SINGLE_SESSION */
397 int BRLAPI_STDCALL brlapi__getModelIdentifier(brlapi_handle_t *handle, char *buffer, size_t size);
398
399 /* brlapi_getDisplaySize */
401 #ifndef BRLAPI_NO_SINGLE_SESSION
402 int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y);
403 #endif /* BRLAPI_NO_SINGLE_SESSION */
404 int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y);
405
429 /* brlapi_enterTtyMode */
458 #ifndef BRLAPI_NO_SINGLE_SESSION
459 int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver);
460 #endif /* BRLAPI_NO_SINGLE_SESSION */
461 int BRLAPI_STDCALL brlapi__enterTtyMode(brlapi_handle_t *handle, int tty, const char *driver);
462
472 #define BRLAPI_TTY_DEFAULT -1
473
474 /* brlapi_enterTtyModeWithPath */
493 #ifndef BRLAPI_NO_SINGLE_SESSION
494 int BRLAPI_STDCALL brlapi_enterTtyModeWithPath(const int *ttys, int count, const char *driver);
495 #endif /* BRLAPI_NO_SINGLE_SESSION */
496 int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, const int *ttys, int count, const char *driver);
497
498 /* brlapi_leaveTtyMode */
505 #ifndef BRLAPI_NO_SINGLE_SESSION
506 int BRLAPI_STDCALL brlapi_leaveTtyMode(void);
507 #endif /* BRLAPI_NO_SINGLE_SESSION */
508 int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle);
509
510 /* brlapi_setFocus */
521 #ifndef BRLAPI_NO_SINGLE_SESSION
522 int BRLAPI_STDCALL brlapi_setFocus(int tty);
523 #endif /* BRLAPI_NO_SINGLE_SESSION */
524 int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty);
525
558 /* brlapi_writeText */
573 #ifndef BRLAPI_NO_SINGLE_SESSION
574 int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text);
575 #endif /* BRLAPI_NO_SINGLE_SESSION */
576 int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text);
577
578 /* brlapi_writeWText */
591 #ifndef BRLAPI_NO_SINGLE_SESSION
592 int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text);
593 #endif /* BRLAPI_NO_SINGLE_SESSION */
594 int BRLAPI_STDCALL brlapi__writeWText(brlapi_handle_t *handle, int cursor, const wchar_t *text);
595
596 /* brlapi_writeDots */
604 #ifndef BRLAPI_NO_SINGLE_SESSION
605 int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots);
606 #endif /* BRLAPI_NO_SINGLE_SESSION */
607 int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots);
608
609 /* brlapi_writeArguments_t */
611 typedef struct {
612 int displayNumber ;
613 unsigned int regionBegin ;
614 int regionSize ;
615 const char *text ;
616 int textSize ;
617 const unsigned char *andMask ;
618 const unsigned char *orMask ;
619 int cursor ;
620 const char *charset ;
621 } brlapi_writeArguments_t;
622
627 #define BRLAPI_DISPLAY_DEFAULT -1
628
633 #define BRLAPI_CURSOR_LEAVE -1
634
639 #define BRLAPI_CURSOR_OFF 0
640
641 /* BRLAPI_WRITEARGUMENTS_INITIALIZER */
651 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { \
652 .displayNumber = BRLAPI_DISPLAY_DEFAULT, \
653 .regionBegin = 0, \
654 .regionSize = 0, \
655 .text = NULL, \
656 .textSize = -1, \
657 .andMask = NULL, \
658 .orMask = NULL, \
659 .cursor = BRLAPI_CURSOR_LEAVE, \
660 .charset = NULL \
661 }
662
663 /* brlapi_write */
699 #ifndef BRLAPI_NO_SINGLE_SESSION
700 int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments);
701 #endif /* BRLAPI_NO_SINGLE_SESSION */
702 int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments);
703
706 #include "brlapi_keycodes.h"
707
721 /* brlapi_expandedKeyCode_t */
723 typedef struct {
724 unsigned int type ;
725 unsigned int command ;
726 unsigned int argument ;
727 unsigned int flags ;
728 } brlapi_expandedKeyCode_t;
729
730 /* brlapi_expandKeyCode */
738 int BRLAPI_STDCALL brlapi_expandKeyCode (brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion);
739
740 /* brlapi_describedKeyCode_t */
742 typedef struct {
743 const char *type ;
744 const char *command ;
745 unsigned int argument ;
746 unsigned int flags ;
747 const char *flag[64 - BRLAPI_KEY_FLAGS_SHIFT] ;
748 brlapi_expandedKeyCode_t values ;
749 } brlapi_describedKeyCode_t;
750
751 /* brlapi_describeKeyCode */
759 int BRLAPI_STDCALL brlapi_describeKeyCode (brlapi_keyCode_t code, brlapi_describedKeyCode_t *description);
760
762 #define BRLAPI_UC_ROW 0x2800UL
763
764 /* brlapi_readKey */
833 #ifndef BRLAPI_NO_SINGLE_SESSION
834 int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code);
835 #endif /* BRLAPI_NO_SINGLE_SESSION */
836 int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code);
837
838 /* brlapi_readKeyWithTimeout */
859 #ifndef BRLAPI_NO_SINGLE_SESSION
860 int BRLAPI_STDCALL brlapi_readKeyWithTimeout(int timeout_ms, brlapi_keyCode_t *code);
861 #endif /* BRLAPI_NO_SINGLE_SESSION */
862 int BRLAPI_STDCALL brlapi__readKeyWithTimeout(brlapi_handle_t *handle, int timeout_ms, brlapi_keyCode_t *code);
863
865 typedef enum {
866 brlapi_rangeType_all,
867 brlapi_rangeType_type,
868 brlapi_rangeType_command,
869 brlapi_rangeType_key,
870 brlapi_rangeType_code,
871 } brlapi_rangeType_t;
872
873 /* brlapi_ignoreKeys */
885 #ifndef BRLAPI_NO_SINGLE_SESSION
886 int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
887 #endif /* BRLAPI_NO_SINGLE_SESSION */
888 int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
889
890 /* brlapi_acceptKeys */
902 #ifndef BRLAPI_NO_SINGLE_SESSION
903 int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
904 #endif /* BRLAPI_NO_SINGLE_SESSION */
905 int BRLAPI_STDCALL brlapi__acceptKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
906
907 /* brlapi_ignoreAllKeys */
915 #ifndef BRLAPI_NO_SINGLE_SESSION
916 int BRLAPI_STDCALL brlapi_ignoreAllKeys(void);
917 #define brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
918 #endif /* BRLAPI_NO_SINGLE_SESSION */
919 int BRLAPI_STDCALL brlapi__ignoreAllKeys(brlapi_handle_t *handle);
920 #define brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
921
922 /* brlapi_acceptAllKeys */
933 #ifndef BRLAPI_NO_SINGLE_SESSION
934 int BRLAPI_STDCALL brlapi_acceptAllKeys(void);
935 #define brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
936 #endif /* BRLAPI_NO_SINGLE_SESSION */
937 int BRLAPI_STDCALL brlapi__acceptAllKeys(brlapi_handle_t *handle);
938 #define brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
939
944 typedef struct {
945 brlapi_keyCode_t first;
946 brlapi_keyCode_t last;
947 } brlapi_range_t;
948
949 /* brlapi_ignoreKeyRanges */
960 #ifndef BRLAPI_NO_SINGLE_SESSION
961 int BRLAPI_STDCALL brlapi_ignoreKeyRanges(const brlapi_range_t ranges[], unsigned int count);
962 #endif /* BRLAPI_NO_SINGLE_SESSION */
963 int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count);
964
965 /* brlapi_acceptKeyRanges */
976 #ifndef BRLAPI_NO_SINGLE_SESSION
977 int BRLAPI_STDCALL brlapi_acceptKeyRanges(const brlapi_range_t ranges[], unsigned int count);
978 #endif /* BRLAPI_NO_SINGLE_SESSION */
979 int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count);
1005 /* brlapi_enterRawMode */
1013 #ifndef BRLAPI_NO_SINGLE_SESSION
1014 int BRLAPI_STDCALL brlapi_enterRawMode(const char *driver);
1015 #endif /* BRLAPI_NO_SINGLE_SESSION */
1016 int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver);
1017
1018 /* brlapi_leaveRawMode */
1021 #ifndef BRLAPI_NO_SINGLE_SESSION
1022 int BRLAPI_STDCALL brlapi_leaveRawMode(void);
1023 #endif /* BRLAPI_NO_SINGLE_SESSION */
1024 int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle);
1025
1026 /* brlapi_sendRaw */
1032 #ifndef BRLAPI_NO_SINGLE_SESSION
1033 ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size);
1034 #endif /* BRLAPI_NO_SINGLE_SESSION */
1035 ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size);
1036
1037 /* brlapi_recvRaw */
1046 #ifndef BRLAPI_NO_SINGLE_SESSION
1047 ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size);
1048 #endif /* BRLAPI_NO_SINGLE_SESSION */
1049 ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size);
1050
1051 /* brlapi_suspendDriver */
1056 #ifndef BRLAPI_NO_SINGLE_SESSION
1057 int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver);
1058 #endif /* BRLAPI_NO_SINGLE_SESSION */
1059 int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver);
1060
1061 /* brlapi_resumeDriver */
1065 #ifndef BRLAPI_NO_SINGLE_SESSION
1066 int BRLAPI_STDCALL brlapi_resumeDriver(void);
1067 #endif /* BRLAPI_NO_SINGLE_SESSION */
1068 int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle);
1071 #include "brlapi_param.h"
1072
1097 typedef uint32_t brlapi_param_flags_t;
1098 #define BRLAPI_PARAMF_LOCAL 0X00
1099 #define BRLAPI_PARAMF_GLOBAL 0X01
1100 #define BRLAPI_PARAMF_SELF 0X02
1102 /* brlapi_getParameter */
1103
1115 #ifndef BRLAPI_NO_SINGLE_SESSION
1116 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);
1117 #endif
1118 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);
1119
1120 /* brlapi_getParameterAlloc */
1133 #ifndef BRLAPI_NO_SINGLE_SESSION
1134 void * BRLAPI_STDCALL brlapi_getParameterAlloc(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, size_t *len);
1135 #endif
1136 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);
1137
1138 /* brlapi_setParameter */
1151 #ifndef BRLAPI_NO_SINGLE_SESSION
1152 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);
1153 #endif
1154 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);
1155
1156 /* brlapi_paramCallback_t */
1177 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);
1178
1179 /* brlapi_paramCallbackDescriptor_t */
1184 typedef void *brlapi_paramCallbackDescriptor_t;
1185
1186 /* brlapi_watchParameter */
1209 #ifndef BRLAPI_NO_SINGLE_SESSION
1210 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);
1211 #endif
1212 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);
1213
1214 /* brlapi_unwatchParameter */
1225 #ifndef BRLAPI_NO_SINGLE_SESSION
1226 int BRLAPI_STDCALL brlapi_unwatchParameter(brlapi_paramCallbackDescriptor_t descriptor);
1227 #endif
1228 int BRLAPI_STDCALL brlapi__unwatchParameter(brlapi_handle_t *handle, brlapi_paramCallbackDescriptor_t descriptor);
1229
1235 /* brlapi_pause */
1242 #ifndef BRLAPI_NO_SINGLE_SESSION
1243 int BRLAPI_STDCALL brlapi_pause(int timeout_ms);
1244 #endif
1245 int BRLAPI_STDCALL brlapi__pause(brlapi_handle_t *handle, int timeout_ms);
1246
1247 /* brlapi_sync */
1255 #ifndef BRLAPI_NO_SINGLE_SESSION
1256 int BRLAPI_STDCALL brlapi_sync(void);
1257 #endif
1258 int BRLAPI_STDCALL brlapi__sync(brlapi_handle_t *handle);
1259
1284 enum brlapi_error {
1285 BRLAPI_ERROR_SUCCESS = 0,
1286 #define BRLAPI_ERROR_SUCCESS 0
1287 BRLAPI_ERROR_NOMEM = 1,
1288 #define BRLAPI_ERROR_NOMEM BRLAPI_ERROR_NOMEM
1289 BRLAPI_ERROR_TTYBUSY = 2,
1290 #define BRLAPI_ERROR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1291 BRLAPI_ERROR_DEVICEBUSY = 3,
1292 #define BRLAPI_ERROR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1293 BRLAPI_ERROR_UNKNOWN_INSTRUCTION = 4,
1294 #define BRLAPI_ERROR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1295 BRLAPI_ERROR_ILLEGAL_INSTRUCTION = 5,
1296 #define BRLAPI_ERROR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1297 BRLAPI_ERROR_INVALID_PARAMETER = 6,
1298 #define BRLAPI_ERROR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1299 BRLAPI_ERROR_INVALID_PACKET = 7,
1300 #define BRLAPI_ERROR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1301 BRLAPI_ERROR_CONNREFUSED = 8,
1302 #define BRLAPI_ERROR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1303 BRLAPI_ERROR_OPNOTSUPP = 9,
1304 #define BRLAPI_ERROR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1305 BRLAPI_ERROR_GAIERR = 10,
1306 #define BRLAPI_ERROR_GAIERR BRLAPI_ERROR_GAIERR
1307 BRLAPI_ERROR_LIBCERR = 11,
1308 #define BRLAPI_ERROR_LIBCERR BRLAPI_ERROR_LIBCERR
1309 BRLAPI_ERROR_UNKNOWNTTY = 12,
1310 #define BRLAPI_ERROR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1311 BRLAPI_ERROR_PROTOCOL_VERSION = 13,
1312 #define BRLAPI_ERROR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1313 BRLAPI_ERROR_EOF = 14,
1314 #define BRLAPI_ERROR_EOF BRLAPI_ERROR_EOF
1315 BRLAPI_ERROR_EMPTYKEY = 15,
1316 #define BRLAPI_ERROR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1317 BRLAPI_ERROR_DRIVERERROR = 16,
1318 #define BRLAPI_ERROR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR
1319 BRLAPI_ERROR_AUTHENTICATION = 17,
1320 #define BRLAPI_ERROR_AUTHENTICATION BRLAPI_ERROR_AUTHENTICATION
1321 BRLAPI_ERROR_READONLY_PARAMETER = 18,
1322 #define BRLAPI_ERROR_READONLY_PARAMETER BRLAPI_ERROR_READONLY_PARAMETER
1323 };
1324
1325 /* brlapi_errlist */
1330 extern const char *brlapi_errlist[];
1331
1332 /* brlapi_nerr */
1334 extern const int brlapi_nerr;
1335
1336 /* brlapi_perror */
1341 void BRLAPI_STDCALL brlapi_perror(const char *s);
1342
1343 /* brlapi_error_t */
1345 typedef struct {
1346 enum brlapi_error brlerrno;
1347 int libcerrno;
1348 int gaierrno;
1349 const char *errfun;
1350 } brlapi_error_t;
1351
1360 brlapi_error_t * BRLAPI_STDCALL brlapi_error_location(void);
1361
1370 extern brlapi_error_t brlapi_error;
1371
1373 extern enum brlapi_error brlapi_errno;
1375 extern int brlapi_libcerrno;
1377 extern int brlapi_gaierrno;
1379 extern const char *brlapi_errfun;
1380
1382 #define brlapi_error (*brlapi_error_location())
1383
1384 #define brlapi_errno (brlapi_error.brlerrno)
1385
1386 #define brlapi_libcerrno (brlapi_error.libcerrno)
1387
1388 #define brlapi_gaierrno (brlapi_error.gaierrno)
1389
1390 #define brlapi_errfun (brlapi_error.errfun)
1391
1392 /* brlapi_strerror */
1400 const char * BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error);
1401
1402 /* brlapi_strerror_r */
1419 size_t BRLAPI_STDCALL brlapi_strerror_r(const brlapi_error_t *error, char *buf, size_t buflen);
1420
1422 typedef uint32_t brlapi_packetType_t;
1423
1424 /* brlapi_getPacketTypeName */
1430 const char * BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type);
1431
1432 /* brlapi_exceptionHandler_t */
1443 #ifndef BRLAPI_NO_SINGLE_SESSION
1444 typedef void (BRLAPI_STDCALL *brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size);
1445 #endif /* BRLAPI_NO_SINGLE_SESSION */
1446 typedef void (BRLAPI_STDCALL *brlapi__exceptionHandler_t)(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1447
1448 /* brlapi_strexception */
1458 #ifndef BRLAPI_NO_SINGLE_SESSION
1459 int BRLAPI_STDCALL brlapi_strexception(char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize);
1460 #endif /* BRLAPI_NO_SINGLE_SESSION */
1461 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);
1462
1463 /* brlapi_setExceptionHandler */
1472 #ifndef BRLAPI_NO_SINGLE_SESSION
1473 brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler);
1474 #endif /* BRLAPI_NO_SINGLE_SESSION */
1475 brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler);
1476
1477 #ifndef BRLAPI_NO_SINGLE_SESSION
1478 void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size);
1479 #endif /* BRLAPI_NO_SINGLE_SESSION */
1480 void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
1481
1484 /* Windows-specific tricks - don't look at this */
1485 #ifdef BRLAPI_WIN32
1486 #ifndef BRLAPI_NO_SINGLE_SESSION
1487 int BRLAPI_STDCALL brlapi_writeTextWin(int cursor, const void *str, int wide);
1488 #endif /* BRLAPI_NO_SINGLE_SESSION */
1489 int BRLAPI_STDCALL brlapi__writeTextWin(brlapi_handle_t *handle, int cursor, const void *str, int wide);
1490
1491 #ifndef BRLAPI_NO_SINGLE_SESSION
1492 int BRLAPI_STDCALL brlapi_writeWin(const brlapi_writeArguments_t *s, int wide);
1493 #endif /* BRLAPI_NO_SINGLE_SESSION */
1494 int BRLAPI_STDCALL brlapi__writeWin(brlapi_handle_t *handle, const brlapi_writeArguments_t *s, int wide);
1495
1496 #ifdef UNICODE
1497 #ifndef BRLAPI_NO_SINGLE_SESSION
1498 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 1)
1499 #endif /* BRLAPI_NO_SINGLE_SESSION */
1500 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 1)
1501
1502 #ifndef BRLAPI_NO_SINGLE_SESSION
1503 #define brlapi_write(s) brlapi_writeWin(s, 1)
1504 #endif /* BRLAPI_NO_SINGLE_SESSION */
1505 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 1)
1506
1507 #else /* UNICODE */
1508
1509 #ifndef BRLAPI_NO_SINGLE_SESSION
1510 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 0)
1511 #endif /* BRLAPI_NO_SINGLE_SESSION */
1512 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 0)
1513
1514 #ifndef BRLAPI_NO_SINGLE_SESSION
1515 #define brlapi_write(s) brlapi_writeWin(s, 0)
1516 #endif /* BRLAPI_NO_SINGLE_SESSION */
1517 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 0)
1518
1519 #endif /* UNICODE */
1520 #endif /* BRLAPI_WIN32 */
1521
1522 #ifndef BRLAPI_NO_DEPRECATED
1523
1535 #define brlapi_settings_t brlapi_connectionSettings_t
1536
1538 typedef struct {
1539 int displayNumber;
1540 unsigned int regionBegin;
1541 unsigned int regionSize;
1542 const char *text;
1543 int textSize;
1544 const unsigned char *attrAnd;
1545 const unsigned char *attrOr;
1546 int cursor;
1547 const char *charset;
1548 } brlapi_writeStruct;
1549 #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
1550
1551 #define brl_keycode_t brlapi_keyCode_t
1552 #define brl_type_t brlapi_packetType_t
1553
1554 #define BRLCOMMANDS NULL
1555 #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX
1556
1557 #ifndef BRLAPI_NO_SINGLE_SESSION
1558 #define brlapi_initializeConnection brlapi_openConnection
1559 #define brlapi_getTty brlapi_enterTtyMode
1560 #define brlapi_getTtyPath brlapi_enterTtyModeWithPath
1561 #define brlapi_leaveTty brlapi_leaveTtyMode
1562 #define brlapi_unignoreKeyRange brlapi_acceptKeyRange
1563 #define brlapi_unignoreKeySet brlapi_acceptKeySet
1564 #define brlapi_getRaw brlapi_enterRawMode
1565 #define brlapi_leaveRaw brlapi_leaveRawMode
1566 #define brlapi_suspend brlapi_suspendDriver
1567 #define brlapi_resume brlapi_resumeDriver
1568 #endif /* BRLAPI_NO_SINGLE_SESSION */
1569
1570 #define BRLERR_SUCCESS BRLAPI_ERROR_SUCCESS
1571 #define BRLERR_NOMEM BRLAPI_ERROR_NOMEM
1572 #define BRLERR_TTYBUSY BRLAPI_ERROR_TTYBUSY
1573 #define BRLERR_DEVICEBUSY BRLAPI_ERROR_DEVICEBUSY
1574 #define BRLERR_UNKNOWN_INSTRUCTION BRLAPI_ERROR_UNKNOWN_INSTRUCTION
1575 #define BRLERR_ILLEGAL_INSTRUCTION BRLAPI_ERROR_ILLEGAL_INSTRUCTION
1576 #define BRLERR_INVALID_PARAMETER BRLAPI_ERROR_INVALID_PARAMETER
1577 #define BRLERR_INVALID_PACKET BRLAPI_ERROR_INVALID_PACKET
1578 #define BRLERR_CONNREFUSED BRLAPI_ERROR_CONNREFUSED
1579 #define BRLERR_OPNOTSUPP BRLAPI_ERROR_OPNOTSUPP
1580 #define BRLERR_GAIERR BRLAPI_ERROR_GAIERR
1581 #define BRLERR_LIBCERR BRLAPI_ERROR_LIBCERR
1582 #define BRLERR_UNKNOWNTTY BRLAPI_ERROR_UNKNOWNTTY
1583 #define BRLERR_PROTOCOL_VERSION BRLAPI_ERROR_PROTOCOL_VERSION
1584 #define BRLERR_EOF BRLAPI_ERROR_EOF
1585 #define BRLERR_EMPTYKEY BRLAPI_ERROR_EMPTYKEY
1586 #define BRLERR_DRIVERERROR BRLAPI_ERROR_DRIVERERROR
1587
1589 #endif /* BRLAPI_NO_DEPRECATED */
1590
1591 #ifdef __cplusplus
1592 }
1593 #endif /* __cplusplus */
1594
1595 #endif /* BRLAPI_INCLUDED */
brlapi_writeStruct::text
const char * text
Definition: brlapi.h:1542
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:1543
BRLAPI_ERROR_LIBCERR
#define BRLAPI_ERROR_LIBCERR
Definition: brlapi.h:1308
brlapi_error_t::libcerrno
int libcerrno
Definition: brlapi.h:1347
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:222
brlapi_suspendDriver
int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver)
brlapi_paramCallbackDescriptor_t
void * brlapi_paramCallbackDescriptor_t
Definition: brlapi.h:1184
brlapi__leaveRawMode
int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle)
brlapi_writeStruct::displayNumber
int displayNumber
Definition: brlapi.h:1539
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:1386
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:1446
brlapi__writeText
#define brlapi__writeText(handle, cursor, str)
Definition: brlapi.h:1512
brlapi_rangeType_command
@ brlapi_rangeType_command
Definition: brlapi.h:868
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:723
brlapi_getDisplaySize
int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y)
brlapi_error_t::gaierrno
int gaierrno
Definition: brlapi.h:1348
brlapi__suspendDriver
int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver)
BRLAPI_ERROR_UNKNOWNTTY
#define BRLAPI_ERROR_UNKNOWNTTY
Definition: brlapi.h:1310
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:1290
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:1284
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:1286
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:1545
brlapi_writeStruct::cursor
int cursor
Definition: brlapi.h:1546
BRLAPI_ERROR_DEVICEBUSY
#define BRLAPI_ERROR_DEVICEBUSY
Definition: brlapi.h:1292
brlapi_errno
#define brlapi_errno
Definition: brlapi.h:1384
BRLAPI_ERROR_EOF
#define BRLAPI_ERROR_EOF
Definition: brlapi.h:1314
BRLAPI_ERROR_UNKNOWN_INSTRUCTION
#define BRLAPI_ERROR_UNKNOWN_INSTRUCTION
Definition: brlapi.h:1294
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:1318
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:935
brlapi__resumeDriver
int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle)
brlapi_connectionSettings_t
Settings structure for BrlAPI connection.
Definition: brlapi.h:214
brlapi_param_flags_t
uint32_t brlapi_param_flags_t
Definition: brlapi.h:1097
brlapi_write
#define brlapi_write(s)
Definition: brlapi.h:1515
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:944
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_rangeType_code
@ brlapi_rangeType_code
Definition: brlapi.h:870
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_writeText
#define brlapi_writeText(cursor, str)
Definition: brlapi.h:1510
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:946
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:1547
brlapi_writeStruct
Definition: brlapi.h:1538
brlapi_error_t
Definition: brlapi.h:1345
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:945
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:1322
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:869
brlapi_rangeType_type
@ brlapi_rangeType_type
Definition: brlapi.h:867
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:1177
brlapi_gaierrno
#define brlapi_gaierrno
Definition: brlapi.h:1388
brlapi_keyCode_t
uint64_t brlapi_keyCode_t
Definition: brlapi_keycodes.h:109
brlapi_error_t::errfun
const char * errfun
Definition: brlapi.h:1349
brlapi__sync
int BRLAPI_STDCALL brlapi__sync(brlapi_handle_t *handle)
brlapi__write
#define brlapi__write(handle, s)
Definition: brlapi.h:1517
brlapi_fileDescriptor
int brlapi_fileDescriptor
Definition: brlapi.h:171
brlapi__enterRawMode
int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver)
brlapi_writeWText
int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text)
BRLAPI_ERROR_OPNOTSUPP
#define BRLAPI_ERROR_OPNOTSUPP
Definition: brlapi.h:1304
brlapi_enterTtyMode
int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver)
BRLAPI_ERROR_CONNREFUSED
#define BRLAPI_ERROR_CONNREFUSED
Definition: brlapi.h:1302
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:1544
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:865
BRLAPI_ERROR_PROTOCOL_VERSION
#define BRLAPI_ERROR_PROTOCOL_VERSION
Definition: brlapi.h:1312
brlapi_handle_t
struct brlapi_handle_t brlapi_handle_t
Definition: brlapi.h:112
brlapi__ignoreAllKeys
#define brlapi__ignoreAllKeys(handle)
Definition: brlapi.h:920
brlapi_rangeType_all
@ brlapi_rangeType_all
Definition: brlapi.h:866
brlapi_writeArguments_t
Definition: brlapi.h:611
brlapi__writeTextWin
int BRLAPI_STDCALL brlapi__writeTextWin(brlapi_handle_t *handle, int cursor, const void *str, int wide)
brlapi_error
#define brlapi_error
Definition: brlapi.h:1382
brlapi_exceptionHandler_t
void(BRLAPI_STDCALL * brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size)
Definition: brlapi.h:1444
brlapi_writeStruct::regionSize
unsigned int regionSize
Definition: brlapi.h:1541
BRLAPI_ERROR_ILLEGAL_INSTRUCTION
#define BRLAPI_ERROR_ILLEGAL_INSTRUCTION
Definition: brlapi.h:1296
brlapi_unwatchParameter
int BRLAPI_STDCALL brlapi_unwatchParameter(brlapi_paramCallbackDescriptor_t descriptor)
brlapi__acceptAllKeys
#define brlapi__acceptAllKeys(handle)
Definition: brlapi.h:938
BRLAPI_STDCALL
#define BRLAPI_STDCALL
Definition: brlapi.h:66
brlapi__writeWin
int BRLAPI_STDCALL brlapi__writeWin(brlapi_handle_t *handle, const brlapi_writeArguments_t *s, int wide)
brlapi_writeStruct::regionBegin
unsigned int regionBegin
Definition: brlapi.h:1540
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:1288
brlapi__setFocus
int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty)
brlapi_writeWin
int BRLAPI_STDCALL brlapi_writeWin(const brlapi_writeArguments_t *s, int wide)
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:917
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:1422
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:232
BRLAPI_ERROR_AUTHENTICATION
#define BRLAPI_ERROR_AUTHENTICATION
Definition: brlapi.h:1320
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:742
BRLAPI_ERROR_INVALID_PARAMETER
#define BRLAPI_ERROR_INVALID_PARAMETER
Definition: brlapi.h:1298
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:1306
brlapi_writeTextWin
int BRLAPI_STDCALL brlapi_writeTextWin(int cursor, const void *str, int wide)
BRLAPI_ERROR_EMPTYKEY
#define BRLAPI_ERROR_EMPTYKEY
Definition: brlapi.h:1316
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:1300
brlapi_param_subparam_t
uint64_t brlapi_param_subparam_t
Definition: brlapi_param.h:112
brlapi_ignoreKeyRanges
int BRLAPI_STDCALL brlapi_ignoreKeyRanges(const brlapi_range_t ranges[], unsigned int count)
brlapi_errfun
#define brlapi_errfun
Definition: brlapi.h:1390
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)