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-2026 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
27
31
32#ifndef BRLAPI_INCLUDED
33#define BRLAPI_INCLUDED
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
39/* #undef BRLAPI_WIN32 */
40
43
45#define BRLAPI_RELEASE "0.8.8"
46
48#define BRLAPI_MAJOR 0
49
51#define BRLAPI_MINOR 8
52
54#define BRLAPI_REVISION 8
55
57 void brlapi_getLibraryVersion(int *major, int *minor, int *revision);
58
60
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
72typedef __int64 uint64_t;
73typedef __int32 uint32_t;
74#define UINT64_C(x) (x ## Ui64)
75#define PRIx64 "I64x"
76typedef 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
110
112 typedef struct brlapi_handle_t brlapi_handle_t;
113
115 size_t BRLAPI_STDCALL brlapi_getHandleSize(void);
116
118
128
130#define BRLAPI_SOCKETPORTNUM 4101
131#define BRLAPI_SOCKETPORT "4101"
132
134#define BRLAPI_SOCKETPATH "/var/lib/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__
169typedef 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
319
325
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
347
358
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
407
428
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
527
557
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
705
706#include "brlapi_keycodes.h"
707
720
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
916int 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
934int 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);
981
1004
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
1033ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size);
1034#endif /* BRLAPI_NO_SINGLE_SESSION */
1035ssize_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
1047ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size);
1048#endif /* BRLAPI_NO_SINGLE_SESSION */
1049ssize_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);
1070
1071#include "brlapi_param.h"
1072
1095
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
1101
1102/* brlapi_getParameter */
1115#ifndef BRLAPI_NO_SINGLE_SESSION
1116ssize_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
1118ssize_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
1231
1234
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
1261
1282
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 */
1330extern const char *brlapi_errlist[];
1331
1332/* brlapi_nerr */
1334extern 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
1370extern brlapi_error_t brlapi_error;
1371
1373extern enum brlapi_error brlapi_errno;
1375extern int brlapi_libcerrno;
1377extern int brlapi_gaierrno;
1379extern const char *brlapi_errfun;
1380
1382#define brlapi_error (*brlapi_error_location())
1384#define brlapi_errno (brlapi_error.brlerrno)
1386#define brlapi_libcerrno (brlapi_error.libcerrno)
1388#define brlapi_gaierrno (brlapi_error.gaierrno)
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
1483
1484/* Windows-specific tricks - don't look at this */
1485#ifdef BRLAPI_WIN32
1486#ifndef BRLAPI_NO_SINGLE_SESSION
1487int BRLAPI_STDCALL brlapi_writeTextWin(int cursor, const void *str, int wide);
1488#endif /* BRLAPI_NO_SINGLE_SESSION */
1489int BRLAPI_STDCALL brlapi__writeTextWin(brlapi_handle_t *handle, int cursor, const void *str, int wide);
1490
1491#ifndef BRLAPI_NO_SINGLE_SESSION
1492int BRLAPI_STDCALL brlapi_writeWin(const brlapi_writeArguments_t *s, int wide);
1493#endif /* BRLAPI_NO_SINGLE_SESSION */
1494int 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
1534
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_ERROR_INVALID_PARAMETER
#define BRLAPI_ERROR_INVALID_PARAMETER
Definition brlapi.h:1298
BRLAPI_ERROR_DEVICEBUSY
#define BRLAPI_ERROR_DEVICEBUSY
Definition brlapi.h:1292
BRLAPI_ERROR_TTYBUSY
#define BRLAPI_ERROR_TTYBUSY
Definition brlapi.h:1290
BRLAPI_ERROR_UNKNOWNTTY
#define BRLAPI_ERROR_UNKNOWNTTY
Definition brlapi.h:1310
BRLAPI_ERROR_DRIVERERROR
#define BRLAPI_ERROR_DRIVERERROR
Definition brlapi.h:1318
BRLAPI_ERROR_AUTHENTICATION
#define BRLAPI_ERROR_AUTHENTICATION
Definition brlapi.h:1320
BRLAPI_ERROR_LIBCERR
#define BRLAPI_ERROR_LIBCERR
Definition brlapi.h:1308
BRLAPI_ERROR_GAIERR
#define BRLAPI_ERROR_GAIERR
Definition brlapi.h:1306
BRLAPI_ERROR_OPNOTSUPP
#define BRLAPI_ERROR_OPNOTSUPP
Definition brlapi.h:1304
BRLAPI_ERROR_ILLEGAL_INSTRUCTION
#define BRLAPI_ERROR_ILLEGAL_INSTRUCTION
Definition brlapi.h:1296
BRLAPI_ERROR_EMPTYKEY
#define BRLAPI_ERROR_EMPTYKEY
Definition brlapi.h:1316
BRLAPI_ERROR_SUCCESS
#define BRLAPI_ERROR_SUCCESS
Definition brlapi.h:1286
BRLAPI_STDCALL
#define BRLAPI_STDCALL
Definition brlapi.h:68
BRLAPI_ERROR_INVALID_PACKET
#define BRLAPI_ERROR_INVALID_PACKET
Definition brlapi.h:1300
BRLAPI_ERROR_READONLY_PARAMETER
#define BRLAPI_ERROR_READONLY_PARAMETER
Definition brlapi.h:1322
BRLAPI_ERROR_NOMEM
#define BRLAPI_ERROR_NOMEM
Definition brlapi.h:1288
BRLAPI_ERROR_EOF
#define BRLAPI_ERROR_EOF
Definition brlapi.h:1314
BRLAPI_ERROR_CONNREFUSED
#define BRLAPI_ERROR_CONNREFUSED
Definition brlapi.h:1302
BRLAPI_ERROR_PROTOCOL_VERSION
#define BRLAPI_ERROR_PROTOCOL_VERSION
Definition brlapi.h:1312
BRLAPI_ERROR_UNKNOWN_INSTRUCTION
#define BRLAPI_ERROR_UNKNOWN_INSTRUCTION
Definition brlapi.h:1294
brlapi_keycodes.h
brlapi_param.h
brlapi_param_subparam_t
uint64_t brlapi_param_subparam_t
Definition brlapi_param.h:112
brlapi_setClientData
void BRLAPI_STDCALL brlapi_setClientData(void *data)
brlapi__getClientData
void *BRLAPI_STDCALL brlapi__getClientData(brlapi_handle_t *handle)
brlapi_getClientData
void *BRLAPI_STDCALL brlapi_getClientData(void)
brlapi__setClientData
void BRLAPI_STDCALL brlapi__setClientData(brlapi_handle_t *handle, void *data)
brlapi_fileDescriptor
int brlapi_fileDescriptor
Definition brlapi.h:171
brlapi__getFileDescriptor
brlapi_fileDescriptor BRLAPI_STDCALL brlapi__getFileDescriptor(brlapi_handle_t *handle)
brlapi_closeConnection
void BRLAPI_STDCALL brlapi_closeConnection(void)
brlapi__closeConnection
void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle)
brlapi__openConnection
brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
brlapi_openConnection
brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings)
brlapi_getFileDescriptor
brlapi_fileDescriptor BRLAPI_STDCALL brlapi_getFileDescriptor(void)
brlapi_resumeDriver
int BRLAPI_STDCALL brlapi_resumeDriver(void)
brlapi__leaveRawMode
int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle)
brlapi__resumeDriver
int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle)
brlapi__sendRaw
ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size)
brlapi__enterRawMode
int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver)
brlapi__suspendDriver
int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver)
brlapi_leaveRawMode
int BRLAPI_STDCALL brlapi_leaveRawMode(void)
brlapi_sendRaw
ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size)
brlapi__recvRaw
ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size)
brlapi_enterRawMode
int BRLAPI_STDCALL brlapi_enterRawMode(const char *driver)
brlapi_suspendDriver
int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver)
brlapi_recvRaw
ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size)
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_strexception
int BRLAPI_STDCALL brlapi_strexception(char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize)
brlapi__defaultExceptionHandler
void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size)
brlapi_defaultExceptionHandler
void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size)
brlapi_strerror_r
size_t BRLAPI_STDCALL brlapi_strerror_r(const brlapi_error_t *error, char *buf, size_t buflen)
brlapi_errno
#define brlapi_errno
Definition brlapi.h:1384
brlapi_errlist
const char * brlapi_errlist[]
brlapi_getPacketTypeName
const char *BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type)
brlapi_nerr
const int brlapi_nerr
brlapi_errfun
#define brlapi_errfun
Definition brlapi.h:1390
brlapi_error
#define brlapi_error
Definition brlapi.h:1382
brlapi_perror
void BRLAPI_STDCALL brlapi_perror(const char *s)
brlapi_gaierrno
#define brlapi_gaierrno
Definition brlapi.h:1388
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_libcerrno
#define brlapi_libcerrno
Definition brlapi.h:1386
brlapi_setExceptionHandler
brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler)
brlapi__setExceptionHandler
brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler)
brlapi_strerror
const char *BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error)
brlapi_packetType_t
uint32_t brlapi_packetType_t
Definition brlapi.h:1422
brlapi_error_location
brlapi_error_t *BRLAPI_STDCALL brlapi_error_location(void)
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_handle_t
struct brlapi_handle_t brlapi_handle_t
Definition brlapi.h:112
brlapi_getHandleSize
size_t BRLAPI_STDCALL brlapi_getHandleSize(void)
brlapi__getModelIdentifier
int BRLAPI_STDCALL brlapi__getModelIdentifier(brlapi_handle_t *handle, char *buffer, size_t size)
brlapi__getDriverName
int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size)
brlapi_getDriverName
int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size)
brlapi_getDisplaySize
int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y)
brlapi__getDisplaySize
int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y)
brlapi_getModelIdentifier
int BRLAPI_STDCALL brlapi_getModelIdentifier(char *buffer, size_t size)
brlapi_keyCode_t
uint64_t brlapi_keyCode_t
Definition brlapi_keycodes.h:109
BRLAPI_KEY_FLAGS_SHIFT
#define BRLAPI_KEY_FLAGS_SHIFT
Definition brlapi_keycodes.h:130
brlapi_rangeType_t
brlapi_rangeType_t
Definition brlapi.h:865
brlapi__acceptKeys
int BRLAPI_STDCALL brlapi__acceptKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi_acceptKeys
int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi__ignoreAllKeys
#define brlapi__ignoreAllKeys(handle)
Definition brlapi.h:920
brlapi_describeKeyCode
int BRLAPI_STDCALL brlapi_describeKeyCode(brlapi_keyCode_t code, brlapi_describedKeyCode_t *description)
brlapi_readKey
int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code)
brlapi__acceptAllKeys
#define brlapi__acceptAllKeys(handle)
Definition brlapi.h:938
brlapi__ignoreKeyRanges
int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count)
brlapi_ignoreKeys
int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi__acceptKeyRanges
int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, const brlapi_range_t ranges[], unsigned int count)
brlapi__readKey
int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code)
brlapi__ignoreKeys
int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)
brlapi_acceptKeyRanges
int BRLAPI_STDCALL brlapi_acceptKeyRanges(const brlapi_range_t ranges[], unsigned int count)
brlapi_ignoreAllKeys
#define brlapi_ignoreAllKeys()
Definition brlapi.h:917
brlapi_readKeyWithTimeout
int BRLAPI_STDCALL brlapi_readKeyWithTimeout(int timeout_ms, brlapi_keyCode_t *code)
brlapi__readKeyWithTimeout
int BRLAPI_STDCALL brlapi__readKeyWithTimeout(brlapi_handle_t *handle, int timeout_ms, brlapi_keyCode_t *code)
brlapi_acceptAllKeys
#define brlapi_acceptAllKeys()
Definition brlapi.h:935
brlapi_ignoreKeyRanges
int BRLAPI_STDCALL brlapi_ignoreKeyRanges(const brlapi_range_t ranges[], unsigned int count)
brlapi_expandKeyCode
int BRLAPI_STDCALL brlapi_expandKeyCode(brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion)
brlapi_rangeType_all
@ brlapi_rangeType_all
Definition brlapi.h:866
brlapi_rangeType_key
@ brlapi_rangeType_key
Definition brlapi.h:869
brlapi_rangeType_command
@ brlapi_rangeType_command
Definition brlapi.h:868
brlapi_rangeType_type
@ brlapi_rangeType_type
Definition brlapi.h:867
brlapi_rangeType_code
@ brlapi_rangeType_code
Definition brlapi.h:870
brlapi__pause
int BRLAPI_STDCALL brlapi__pause(brlapi_handle_t *handle, int timeout_ms)
brlapi_pause
int BRLAPI_STDCALL brlapi_pause(int timeout_ms)
brlapi_sync
int BRLAPI_STDCALL brlapi_sync(void)
brlapi__sync
int BRLAPI_STDCALL brlapi__sync(brlapi_handle_t *handle)
brlapi_paramCallbackDescriptor_t
void * brlapi_paramCallbackDescriptor_t
Definition brlapi.h:1184
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_getParameterAlloc
void *BRLAPI_STDCALL brlapi_getParameterAlloc(brlapi_param_t parameter, brlapi_param_subparam_t subparam, brlapi_param_flags_t flags, size_t *len)
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_param_flags_t
uint32_t brlapi_param_flags_t
Definition brlapi.h:1097
brlapi_param_t
brlapi_param_t
Definition brlapi_param.h:36
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__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__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__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_unwatchParameter
int BRLAPI_STDCALL brlapi_unwatchParameter(brlapi_paramCallbackDescriptor_t descriptor)
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__unwatchParameter
int BRLAPI_STDCALL brlapi__unwatchParameter(brlapi_handle_t *handle, brlapi_paramCallbackDescriptor_t descriptor)
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(const int *ttys, int count, const char *driver)
brlapi_setFocus
int BRLAPI_STDCALL brlapi_setFocus(int tty)
brlapi_leaveTtyMode
int BRLAPI_STDCALL brlapi_leaveTtyMode(void)
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__leaveTtyMode
int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle)
brlapi__setFocus
int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty)
brlapi__enterTtyModeWithPath
int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, const int *ttys, int count, const char *driver)
brlapi_getLibraryVersion
void brlapi_getLibraryVersion(int *major, int *minor, int *revision)
brlapi__writeWText
int BRLAPI_STDCALL brlapi__writeWText(brlapi_handle_t *handle, int cursor, const wchar_t *text)
brlapi_write
int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments)
brlapi__writeText
int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text)
brlapi_writeWText
int BRLAPI_STDCALL brlapi_writeWText(int cursor, const wchar_t *text)
brlapi__writeDots
int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots)
brlapi_writeText
int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text)
brlapi_writeDots
int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots)
brlapi__write
int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments)
brlapi_connectionSettings_t
Settings structure for BrlAPI connection.
Definition brlapi.h:214
brlapi_connectionSettings_t::host
const char * host
Definition brlapi.h:232
brlapi_connectionSettings_t::auth
const char * auth
Definition brlapi.h:222
brlapi_describedKeyCode_t
Definition brlapi.h:742
brlapi_describedKeyCode_t::command
const char * command
Definition brlapi.h:744
brlapi_describedKeyCode_t::values
brlapi_expandedKeyCode_t values
Definition brlapi.h:748
brlapi_describedKeyCode_t::flag
const char * flag[64 - BRLAPI_KEY_FLAGS_SHIFT]
Definition brlapi.h:747
brlapi_describedKeyCode_t::argument
unsigned int argument
Definition brlapi.h:745
brlapi_describedKeyCode_t::flags
unsigned int flags
Definition brlapi.h:746
brlapi_describedKeyCode_t::type
const char * type
Definition brlapi.h:743
brlapi_error_t
Definition brlapi.h:1345
brlapi_error_t::gaierrno
int gaierrno
Definition brlapi.h:1348
brlapi_error_t::brlerrno
enum brlapi_error brlerrno
Definition brlapi.h:1346
brlapi_error_t::errfun
const char * errfun
Definition brlapi.h:1349
brlapi_error_t::libcerrno
int libcerrno
Definition brlapi.h:1347
brlapi_expandedKeyCode_t
Definition brlapi.h:723
brlapi_expandedKeyCode_t::command
unsigned int command
Definition brlapi.h:725
brlapi_expandedKeyCode_t::argument
unsigned int argument
Definition brlapi.h:726
brlapi_expandedKeyCode_t::flags
unsigned int flags
Definition brlapi.h:727
brlapi_expandedKeyCode_t::type
unsigned int type
Definition brlapi.h:724
brlapi_range_t
Definition brlapi.h:944
brlapi_range_t::last
brlapi_keyCode_t last
Definition brlapi.h:946
brlapi_range_t::first
brlapi_keyCode_t first
Definition brlapi.h:945
brlapi_writeArguments_t
Definition brlapi.h:611
brlapi_writeArguments_t::charset
const char * charset
Definition brlapi.h:620
brlapi_writeArguments_t::orMask
const unsigned char * orMask
Definition brlapi.h:618
brlapi_writeArguments_t::text
const char * text
Definition brlapi.h:615
brlapi_writeArguments_t::regionSize
int regionSize
Definition brlapi.h:614
brlapi_writeArguments_t::textSize
int textSize
Definition brlapi.h:616
brlapi_writeArguments_t::cursor
int cursor
Definition brlapi.h:619
brlapi_writeArguments_t::andMask
const unsigned char * andMask
Definition brlapi.h:617
brlapi_writeArguments_t::displayNumber
int displayNumber
Definition brlapi.h:612
brlapi_writeArguments_t::regionBegin
unsigned int regionBegin
Definition brlapi.h:613
brlapi_writeStruct
Definition brlapi.h:1538
brlapi_writeStruct::displayNumber
int displayNumber
Definition brlapi.h:1539
brlapi_writeStruct::cursor
int cursor
Definition brlapi.h:1546
brlapi_writeStruct::regionBegin
unsigned int regionBegin
Definition brlapi.h:1540
brlapi_writeStruct::regionSize
unsigned int regionSize
Definition brlapi.h:1541
brlapi_writeStruct::text
const char * text
Definition brlapi.h:1542
brlapi_writeStruct::attrOr
const unsigned char * attrOr
Definition brlapi.h:1545
brlapi_writeStruct::charset
const char * charset
Definition brlapi.h:1547
brlapi_writeStruct::attrAnd
const unsigned char * attrAnd
Definition brlapi.h:1544
brlapi_writeStruct::textSize
int textSize
Definition brlapi.h:1543