# brlapi.h

Go to the documentation of this file.

    00001 /* Programs/brlapi.h.  Generated from brlapi.h.in by configure.  */
    00002 /*
    00003  * libbrlapi - A library providing access to braille terminals for applications.
    00004  *
    00005  * Copyright (C) 2002-2012 by
    00006  *   Samuel Thibault <Samuel.Thibault@ens-lyon.org>
    00007  *   Sébastien Hinderer <Sebastien.Hinderer@ens-lyon.org>
    00008  *
    00009  * libbrlapi comes with ABSOLUTELY NO WARRANTY.
    00010  *
    00011  * This is free software, placed under the terms of the
    00012  * GNU Lesser General Public License, as published by the Free Software
    00013  * Foundation; either version 2.1 of the License, or (at your option) any
    00014  * later version. Please see the file LICENSE-LGPL for details.
    00015  *
    00016  * Web Page: http://mielke.cc/brltty/
    00017  *
    00018  * This software is maintained by Dave Mielke <dave@mielke.cc>.
    00019  */
    00020
    00025 #ifndef BRLAPI_INCLUDED
    00026 #define BRLAPI_INCLUDED
    00027
    00028 #ifdef __cplusplus
    00029 extern "C" {
    00030 #endif /* __cplusplus */
    00031
    00032 /* #undef BRLAPI_WIN32 */
    00033
    00038 #define BRLAPI_RELEASE "0.5.7"
    00039
    00041 #define BRLAPI_MAJOR 0
    00042
    00044 #define BRLAPI_MINOR 5
    00045
    00047 #define BRLAPI_REVISION 7
    00048
    00051 /* Types are defined there */
    00052 #include <sys/types.h>
    00053
    00054 #ifdef BRLAPI_WIN32
    00055 #include <windows.h>
    00056 #define BRLAPI_STDCALL __stdcall
    00057 #else /* BRLAPI_WIN32 */
    00058 #define BRLAPI_STDCALL
    00059 #endif /* BRLAPI_WIN32 */
    00060
    00061 #ifdef _MSC_VER
    00062 typedef __int64 uint64_t;
    00063 typedef __int32 uint32_t;
    00064 #define UINT64_C(x) (x ## Ui64)
    00065 #define PRIx64 "I64x"
    00066 typedef signed int ssize_t;
    00067 #else /* _MSC_VER */
    00068
    00069 /* this is for uint*_t */
    00070 #include <stdint.h>
    00071
    00072 /* NULL is defined there */
    00073 #include <unistd.h>
    00074
    00075 #include <inttypes.h> /* For PRIx64 */
    00076 #endif /* _MSC_VER */
    00077
    00100 typedef struct brlapi_handle_t brlapi_handle_t;
    00101
    00103 size_t BRLAPI_STDCALL brlapi_getHandleSize(void);
    00104
    00118 #define BRLAPI_SOCKETPORTNUM 4101
    00119 #define BRLAPI_SOCKETPORT "4101"
    00120
    00122 #define BRLAPI_SOCKETPATH "/var/lib/BrlAPI"
    00123
    00128 #define BRLAPI_ETCDIR "/etc"
    00129
    00133 #define BRLAPI_AUTHKEYFILE "brlapi.key"
    00134
    00136 #define BRLAPI_DEFAUTH BRLAPI_ETCDIR "/" BRLAPI_AUTHKEYFILE
    00137
    00138 #ifdef __MINGW32__
    00139 typedef HANDLE brlapi_fileDescriptor;
    00140 #else /* __MINGW32__ */
    00141 typedef int brlapi_fileDescriptor;
    00142 #endif /* __MINGW32__ */
    00143
    00174 typedef struct {
    00182   char *auth;
    00183
    00192   char *host;
    00193 } brlapi_connectionSettings_t;
    00194
    00195 /* BRLAPI_SETTINGS_INITIALIZER */
    00198 #define BRLAPI_SETTINGS_INITIALIZER { NULL, NULL }
    00199
    00200 /* brlapi_openConnection */
    00245 #ifndef BRLAPI_NO_SINGLE_SESSION
    00246 brlapi_fileDescriptor BRLAPI_STDCALL brlapi_openConnection(const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
    00247 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00248 brlapi_fileDescriptor BRLAPI_STDCALL brlapi__openConnection(brlapi_handle_t *handle, const brlapi_connectionSettings_t *desiredSettings, brlapi_connectionSettings_t *actualSettings);
    00249
    00250 /* brlapi_closeConnection */
    00257 #ifndef BRLAPI_NO_SINGLE_SESSION
    00258 void BRLAPI_STDCALL brlapi_closeConnection(void);
    00259 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00260 void BRLAPI_STDCALL brlapi__closeConnection(brlapi_handle_t *handle);
    00261
    00277 #define BRLAPI_MAXNAMELENGTH 31
    00278
    00279 /* brlapi_getDriverName */
    00291 #ifndef BRLAPI_NO_SINGLE_SESSION
    00292 int BRLAPI_STDCALL brlapi_getDriverName(char *buffer, size_t size);
    00293 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00294 int BRLAPI_STDCALL brlapi__getDriverName(brlapi_handle_t *handle, char *buffer, size_t size);
    00295
    00296 /* brlapi_getDisplaySize */
    00298 #ifndef BRLAPI_NO_SINGLE_SESSION
    00299 int BRLAPI_STDCALL brlapi_getDisplaySize(unsigned int *x, unsigned int *y);
    00300 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00301 int BRLAPI_STDCALL brlapi__getDisplaySize(brlapi_handle_t *handle, unsigned int *x, unsigned int *y);
    00302
    00326 /* brlapi_enterTtyMode */
    00346 #ifndef BRLAPI_NO_SINGLE_SESSION
    00347 int BRLAPI_STDCALL brlapi_enterTtyMode(int tty, const char *driver);
    00348 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00349 int BRLAPI_STDCALL brlapi__enterTtyMode(brlapi_handle_t *handle, int tty, const char *driver);
    00350
    00360 #define BRLAPI_TTY_DEFAULT -1
    00361
    00362 /* brlapi_enterTtyModeWithPath */
    00374 #ifndef BRLAPI_NO_SINGLE_SESSION
    00375 int BRLAPI_STDCALL brlapi_enterTtyModeWithPath(int *ttys, int count, const char *driver);
    00376 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00377 int BRLAPI_STDCALL brlapi__enterTtyModeWithPath(brlapi_handle_t *handle, int *ttys, int count, const char *driver);
    00378
    00379 /* brlapi_leaveTtyMode */
    00386 #ifndef BRLAPI_NO_SINGLE_SESSION
    00387 int BRLAPI_STDCALL brlapi_leaveTtyMode(void);
    00388 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00389 int BRLAPI_STDCALL brlapi__leaveTtyMode(brlapi_handle_t *handle);
    00390
    00391 /* brlapi_setFocus */
    00402 #ifndef BRLAPI_NO_SINGLE_SESSION
    00403 int BRLAPI_STDCALL brlapi_setFocus(int tty);
    00404 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00405 int BRLAPI_STDCALL brlapi__setFocus(brlapi_handle_t *handle, int tty);
    00406
    00436 /* brlapi_writeText */
    00451 #ifndef BRLAPI_NO_SINGLE_SESSION
    00452 int BRLAPI_STDCALL brlapi_writeText(int cursor, const char *text);
    00453 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00454 int BRLAPI_STDCALL brlapi__writeText(brlapi_handle_t *handle, int cursor, const char *text);
    00455
    00456 /* brlapi_writeDots */
    00464 #ifndef BRLAPI_NO_SINGLE_SESSION
    00465 int BRLAPI_STDCALL brlapi_writeDots(const unsigned char *dots);
    00466 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00467 int BRLAPI_STDCALL brlapi__writeDots(brlapi_handle_t *handle, const unsigned char *dots);
    00468
    00469 /* brlapi_writeArguments_t */
    00471 typedef struct {
    00472   int displayNumber ;
    00473   unsigned int regionBegin ;
    00474   unsigned int regionSize ;
    00475   char *text ;
    00476   int textSize ;
    00477   unsigned char *andMask ;
    00478   unsigned char *orMask ;
    00479   int cursor ;
    00480   char *charset ;
    00481 } brlapi_writeArguments_t;
    00482
    00487 #define BRLAPI_DISPLAY_DEFAULT -1
    00488
    00493 #define BRLAPI_CURSOR_LEAVE -1
    00494
    00499 #define BRLAPI_CURSOR_OFF 0
    00500
    00501 /* BRLAPI_WRITEARGUMENTS_INITIALIZER */
    00511 #define BRLAPI_WRITEARGUMENTS_INITIALIZER { BRLAPI_DISPLAY_DEFAULT, 0, 0, NULL, -1, NULL, NULL, BRLAPI_CURSOR_LEAVE, NULL }
    00512
    00513 /* brlapi_write */
    00549 #ifndef BRLAPI_NO_SINGLE_SESSION
    00550 int BRLAPI_STDCALL brlapi_write(const brlapi_writeArguments_t *arguments);
    00551 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00552 int BRLAPI_STDCALL brlapi__write(brlapi_handle_t *handle, const brlapi_writeArguments_t *arguments);
    00553
    00556 #include "brlapi_keycodes.h"
    00557
    00571 /* brlapi_expandedKeyCode_t */
    00573 typedef struct {
    00574   unsigned int type ;
    00575   unsigned int command ;
    00576   unsigned int argument ;
    00577   unsigned int flags ;
    00578 } brlapi_expandedKeyCode_t;
    00579
    00580 /* brlapi_expandKeyCode */
    00588 int BRLAPI_STDCALL brlapi_expandKeyCode (brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion);
    00589
    00590 /* brlapi_describedKeyCode_t */
    00592 typedef struct {
    00593   const char *type ;
    00594   const char *command ;
    00595   unsigned int argument ;
    00596   unsigned int flags ;
    00597   const char *flag[64 - BRLAPI_KEY_FLAGS_SHIFT] ;
    00598   brlapi_expandedKeyCode_t values ;
    00599 } brlapi_describedKeyCode_t;
    00600
    00601 /* brlapi_describeKeyCode */
    00609 int BRLAPI_STDCALL brlapi_describeKeyCode (brlapi_keyCode_t code, brlapi_describedKeyCode_t *description);
    00610
    00612 #define BRLAPI_UC_ROW   0x2800UL
    00613
    00614 /* brlapi_readKey */
    00681 #ifndef BRLAPI_NO_SINGLE_SESSION
    00682 int BRLAPI_STDCALL brlapi_readKey(int wait, brlapi_keyCode_t *code);
    00683 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00684 int BRLAPI_STDCALL brlapi__readKey(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code);
    00685
    00687 typedef enum {
    00688   brlapi_rangeType_all,
    00689   brlapi_rangeType_type,
    00690   brlapi_rangeType_command,
    00691   brlapi_rangeType_key,
    00692   brlapi_rangeType_code,
    00693 } brlapi_rangeType_t;
    00694
    00695 /* brlapi_ignoreKeys */
    00708 #ifndef BRLAPI_NO_SINGLE_SESSION
    00709 int BRLAPI_STDCALL brlapi_ignoreKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
    00710 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00711 int BRLAPI_STDCALL brlapi__ignoreKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
    00712
    00713 /* brlapi_acceptKeys */
    00726 #ifndef BRLAPI_NO_SINGLE_SESSION
    00727 int BRLAPI_STDCALL brlapi_acceptKeys(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
    00728 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00729 int BRLAPI_STDCALL brlapi__acceptKeys(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count);
    00730
    00731 /* brlapi_ignoreAllKeys */
    00737 #ifndef BRLAPI_NO_SINGLE_SESSION
    00738 int BRLAPI_STDCALL brlapi_ignoreAllKeys(void);
    00739 #define brlapi_ignoreAllKeys() brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)
    00740 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00741 int BRLAPI_STDCALL brlapi__ignoreAllKeys(brlapi_handle_t *handle);
    00742 #define brlapi__ignoreAllKeys(handle) brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)
    00743
    00744 /* brlapi_acceptAllKeys */
    00753 #ifndef BRLAPI_NO_SINGLE_SESSION
    00754 int BRLAPI_STDCALL brlapi_acceptAllKeys(void);
    00755 #define brlapi_acceptAllKeys() brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)
    00756 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00757 int BRLAPI_STDCALL brlapi__acceptAllKeys(brlapi_handle_t *handle);
    00758 #define brlapi__acceptAllKeys(handle) brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)
    00759
    00764 typedef struct {
    00765         brlapi_keyCode_t first;
    00766         brlapi_keyCode_t last;
    00767 } brlapi_range_t;
    00768
    00769 /* brlapi_ignoreKeyRanges */
    00780 #ifndef BRLAPI_NO_SINGLE_SESSION
    00781 int BRLAPI_STDCALL brlapi_ignoreKeyRanges(brlapi_range_t ranges[], unsigned int count);
    00782 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00783 int BRLAPI_STDCALL brlapi__ignoreKeyRanges(brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count);
    00784
    00785 /* brlapi_acceptKeyRanges */
    00796 #ifndef BRLAPI_NO_SINGLE_SESSION
    00797 int BRLAPI_STDCALL brlapi_acceptKeyRanges(brlapi_range_t ranges[], unsigned int count);
    00798 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00799 int BRLAPI_STDCALL brlapi__acceptKeyRanges(brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count);
    00825 /* brlapi_enterRawMode */
    00830 #ifndef BRLAPI_NO_SINGLE_SESSION
    00831 int BRLAPI_STDCALL brlapi_enterRawMode(const char *driver);
    00832 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00833 int BRLAPI_STDCALL brlapi__enterRawMode(brlapi_handle_t *handle, const char *driver);
    00834
    00835 /* brlapi_leaveRawMode */
    00838 #ifndef BRLAPI_NO_SINGLE_SESSION
    00839 int BRLAPI_STDCALL brlapi_leaveRawMode(void);
    00840 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00841 int BRLAPI_STDCALL brlapi__leaveRawMode(brlapi_handle_t *handle);
    00842
    00843 /* brlapi_sendRaw */
    00849 #ifndef BRLAPI_NO_SINGLE_SESSION
    00850 ssize_t BRLAPI_STDCALL brlapi_sendRaw(const void *buffer, size_t size);
    00851 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00852 ssize_t BRLAPI_STDCALL brlapi__sendRaw(brlapi_handle_t *handle, const void *buffer, size_t size);
    00853
    00854 /* brlapi_recvRaw */
    00861 #ifndef BRLAPI_NO_SINGLE_SESSION
    00862 ssize_t BRLAPI_STDCALL brlapi_recvRaw(void *buffer, size_t size);
    00863 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00864 ssize_t BRLAPI_STDCALL brlapi__recvRaw(brlapi_handle_t *handle, void *buffer, size_t size);
    00865
    00866 /* brlapi_suspendDriver */
    00871 #ifndef BRLAPI_NO_SINGLE_SESSION
    00872 int BRLAPI_STDCALL brlapi_suspendDriver(const char *driver);
    00873 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00874 int BRLAPI_STDCALL brlapi__suspendDriver(brlapi_handle_t *handle, const char *driver);
    00875
    00876 /* brlapi_resumeDriver */
    00880 #ifndef BRLAPI_NO_SINGLE_SESSION
    00881 int BRLAPI_STDCALL brlapi_resumeDriver(void);
    00882 #endif /* BRLAPI_NO_SINGLE_SESSION */
    00883 int BRLAPI_STDCALL brlapi__resumeDriver(brlapi_handle_t *handle);
    00907 /* Error codes */
    00908 #define BRLAPI_ERROR_SUCCESS               0
    00909 #define BRLAPI_ERROR_NOMEM                 1
    00910 #define BRLAPI_ERROR_TTYBUSY               2
    00911 #define BRLAPI_ERROR_DEVICEBUSY            3
    00912 #define BRLAPI_ERROR_UNKNOWN_INSTRUCTION   4
    00913 #define BRLAPI_ERROR_ILLEGAL_INSTRUCTION   5
    00914 #define BRLAPI_ERROR_INVALID_PARAMETER     6
    00915 #define BRLAPI_ERROR_INVALID_PACKET        7
    00916 #define BRLAPI_ERROR_CONNREFUSED           8
    00917 #define BRLAPI_ERROR_OPNOTSUPP             9
    00918 #define BRLAPI_ERROR_GAIERR               10
    00919 #define BRLAPI_ERROR_LIBCERR              11
    00920 #define BRLAPI_ERROR_UNKNOWNTTY           12
    00921 #define BRLAPI_ERROR_PROTOCOL_VERSION     13
    00922 #define BRLAPI_ERROR_EOF                  14
    00923 #define BRLAPI_ERROR_EMPTYKEY             15
    00924 #define BRLAPI_ERROR_DRIVERERROR          16
    00925 #define BRLAPI_ERROR_AUTHENTICATION       17
    00927 /* brlapi_errlist */
    00928
    00932 extern const char *brlapi_errlist[];
    00933
    00934 /* brlapi_nerr */
    00936 extern const int brlapi_nerr;
    00937
    00938 /* brlapi_perror */
    00943 void BRLAPI_STDCALL brlapi_perror(const char *s);
    00944
    00945 /* brlapi_error_t */
    00947 typedef struct {
    00948   int brlerrno;
    00949   int libcerrno;
    00950   int gaierrno;
    00951   const char *errfun;
    00952 } brlapi_error_t;
    00953
    00962 brlapi_error_t * BRLAPI_STDCALL brlapi_error_location(void);
    00963
    00972 extern brlapi_error_t brlapi_error;
    00973
    00975 extern int brlapi_errno;
    00977 extern int brlapi_libcerrno;
    00979 extern int brlapi_gaierrno;
    00981 extern const char *brlapi_errfun;
    00982
    00984 #define brlapi_error (*brlapi_error_location())
    00985
    00986 #define brlapi_errno (brlapi_error.brlerrno)
    00987
    00988 #define brlapi_libcerrno (brlapi_error.libcerrno)
    00989
    00990 #define brlapi_gaierrno (brlapi_error.gaierrno)
    00991
    00992 #define brlapi_errfun (brlapi_error.errfun)
    00993
    00994 /* brlapi_strerror */
    01000 const char * BRLAPI_STDCALL brlapi_strerror(const brlapi_error_t *error);
    01001
    01003 typedef uint32_t brlapi_packetType_t;
    01004
    01005 /* brlapi_getPacketTypeName */
    01011 const char * BRLAPI_STDCALL brlapi_getPacketTypeName(brlapi_packetType_t type);
    01012
    01013 /* brlapi_exceptionHandler_t */
    01025 #ifndef BRLAPI_NO_SINGLE_SESSION
    01026 typedef void (BRLAPI_STDCALL *brlapi_exceptionHandler_t)(int error, brlapi_packetType_t type, const void *packet, size_t size);
    01027 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01028 typedef void (BRLAPI_STDCALL *brlapi__exceptionHandler_t)(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
    01029
    01030 /* brlapi_strexception */
    01040 #ifndef BRLAPI_NO_SINGLE_SESSION
    01041 int BRLAPI_STDCALL brlapi_strexception(char *buffer, size_t bufferSize, int error, brlapi_packetType_t type, const void *packet, size_t packetSize);
    01042 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01043 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);
    01044
    01045 /* brlapi_setExceptionHandler */
    01054 #ifndef BRLAPI_NO_SINGLE_SESSION
    01055 brlapi_exceptionHandler_t BRLAPI_STDCALL brlapi_setExceptionHandler(brlapi_exceptionHandler_t handler);
    01056 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01057 brlapi__exceptionHandler_t BRLAPI_STDCALL brlapi__setExceptionHandler(brlapi_handle_t *handle, brlapi__exceptionHandler_t handler);
    01058
    01059 #ifndef BRLAPI_NO_SINGLE_SESSION
    01060 void BRLAPI_STDCALL brlapi_defaultExceptionHandler(int error, brlapi_packetType_t type, const void *packet, size_t size);
    01061 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01062 void BRLAPI_STDCALL brlapi__defaultExceptionHandler(brlapi_handle_t *handle, int error, brlapi_packetType_t type, const void *packet, size_t size);
    01063
    01066 /* Windows-specific tricks - don't look at this */
    01067 #ifdef BRLAPI_WIN32
    01068 #ifndef BRLAPI_NO_SINGLE_SESSION
    01069 int BRLAPI_STDCALL brlapi_writeTextWin(int cursor, const void *str, int wide);
    01070 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01071 int BRLAPI_STDCALL brlapi__writeTextWin(brlapi_handle_t *handle, int cursor, const void *str, int wide);
    01072
    01073 #ifndef BRLAPI_NO_SINGLE_SESSION
    01074 int BRLAPI_STDCALL brlapi_writeWin(const brlapi_writeArguments_t *s, int wide);
    01075 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01076 int BRLAPI_STDCALL brlapi__writeWin(brlapi_handle_t *handle, const brlapi_writeArguments_t *s, int wide);
    01077
    01078 #ifdef UNICODE
    01079 #ifndef BRLAPI_NO_SINGLE_SESSION
    01080 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 1)
    01081 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01082 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 1)
    01083
    01084 #ifndef BRLAPI_NO_SINGLE_SESSION
    01085 #define brlapi_write(s) brlapi_writeWin(s, 1)
    01086 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01087 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 1)
    01088
    01089 #else /* UNICODE */
    01090
    01091 #ifndef BRLAPI_NO_SINGLE_SESSION
    01092 #define brlapi_writeText(cursor, str) brlapi_writeTextWin(cursor, str, 0)
    01093 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01094 #define brlapi__writeText(handle, cursor, str) brlapi__writeTextWin(handle, cursor, str, 0)
    01095
    01096 #ifndef BRLAPI_NO_SINGLE_SESSION
    01097 #define brlapi_write(s) brlapi_writeWin(s, 0)
    01098 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01099 #define brlapi__write(handle, s) brlapi__writeWin(handle, s, 0)
    01100
    01101 #endif /* UNICODE */
    01102 #endif /* BRLAPI_WIN32 */
    01103
    01104 #ifndef BRLAPI_NO_DEPRECATED
    01105
    01117 #define brlapi_settings_t brlapi_connectionSettings_t
    01118
    01120 typedef struct {
    01121   int displayNumber;
    01122   unsigned int regionBegin;
    01123   unsigned int regionSize;
    01124   char *text;
    01125   int textSize;
    01126   unsigned char *attrAnd;
    01127   unsigned char *attrOr;
    01128   int cursor;
    01129   char *charset;
    01130 } brlapi_writeStruct;
    01131 #define BRLAPI_WRITESTRUCT_INITIALIZER BRLAPI_WRITEARGUMENTS_INITIALIZER
    01132
    01133 #define brl_keycode_t brlapi_keyCode_t
    01134 #define brl_type_t brlapi_packetType_t
    01135
    01136 #define BRLCOMMANDS NULL
    01137 #define BRL_KEYCODE_MAX BRLAPI_KEY_MAX
    01138
    01139 #ifndef BRLAPI_NO_SINGLE_SESSION
    01140 #define brlapi_initializeConnection brlapi_openConnection
    01141 #define brlapi_getTty brlapi_enterTtyMode
    01142 #define brlapi_getTtyPath brlapi_enterTtyModeWithPath
    01143 #define brlapi_leaveTty brlapi_leaveTtyMode
    01144 #define brlapi_unignoreKeyRange brlapi_acceptKeyRange
    01145 #define brlapi_unignoreKeySet brlapi_acceptKeySet
    01146 #define brlapi_getRaw brlapi_enterRawMode
    01147 #define brlapi_leaveRaw brlapi_leaveRawMode
    01148 #define brlapi_suspend brlapi_suspendDriver
    01149 #define brlapi_resume brlapi_resumeDriver
    01150 #endif /* BRLAPI_NO_SINGLE_SESSION */
    01151
    01152 #define BRLERR_SUCCESS                 BRLAPI_ERROR_SUCCESS
    01153 #define BRLERR_NOMEM                   BRLAPI_ERROR_NOMEM
    01154 #define BRLERR_TTYBUSY                 BRLAPI_ERROR_TTYBUSY
    01155 #define BRLERR_DEVICEBUSY              BRLAPI_ERROR_DEVICEBUSY
    01156 #define BRLERR_UNKNOWN_INSTRUCTION     BRLAPI_ERROR_UNKNOWN_INSTRUCTION
    01157 #define BRLERR_ILLEGAL_INSTRUCTION     BRLAPI_ERROR_ILLEGAL_INSTRUCTION
    01158 #define BRLERR_INVALID_PARAMETER       BRLAPI_ERROR_INVALID_PARAMETER
    01159 #define BRLERR_INVALID_PACKET          BRLAPI_ERROR_INVALID_PACKET
    01160 #define BRLERR_CONNREFUSED             BRLAPI_ERROR_CONNREFUSED
    01161 #define BRLERR_OPNOTSUPP               BRLAPI_ERROR_OPNOTSUPP
    01162 #define BRLERR_GAIERR                  BRLAPI_ERROR_GAIERR
    01163 #define BRLERR_LIBCERR                 BRLAPI_ERROR_LIBCERR
    01164 #define BRLERR_UNKNOWNTTY              BRLAPI_ERROR_UNKNOWNTTY
    01165 #define BRLERR_PROTOCOL_VERSION        BRLAPI_ERROR_PROTOCOL_VERSION
    01166 #define BRLERR_EOF                     BRLAPI_ERROR_EOF
    01167 #define BRLERR_EMPTYKEY                BRLAPI_ERROR_EMPTYKEY
    01168 #define BRLERR_DRIVERERROR             BRLAPI_ERROR_DRIVERERROR
    01169
    01171 #endif /* BRLAPI_NO_DEPRECATED */
    01172
    01173 #ifdef __cplusplus
    01174 }
    01175 #endif /* __cplusplus */
    01176
    01177 #endif /* BRLAPI_INCLUDED */