BrlAPI 0.8

brlapi_param.h
Go to the documentation of this file.
1 /*
2 * libbrlapi - A library providing access to braille terminals for applications.
3 *
4 * Copyright (C) 2002-2020 by
5 * Samuel Thibault <Samuel.Thibault@ens-lyon.org>
6 * Sébastien Hinderer <Sebastien.Hinderer@ens-lyon.org>
7 *
8 * libbrlapi comes with ABSOLUTELY NO WARRANTY.
9 *
10 * This is free software, placed under the terms of the
11 * GNU Lesser General Public License, as published by the Free Software
12 * Foundation; either version 2.1 of the License, or (at your option) any
13 * later version. Please see the file LICENSE-LGPL for details.
14 *
15 * Web Page: http://brltty.app/
16 *
17 * This software is maintained by Dave Mielke <dave@mielke.cc>.
18 */
19
23 #ifndef BRLAPI_INCLUDED_PARAM
24 #define BRLAPI_INCLUDED_PARAM
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29
30 #include "brlapi_keycodes.h"
31
36 typedef enum {
37 //Connection Parameters
38 BRLAPI_PARAM_SERVER_VERSION = 0,
39 BRLAPI_PARAM_CLIENT_PRIORITY = 1,
41 //Device Parameters
42 BRLAPI_PARAM_DRIVER_NAME = 2,
43 BRLAPI_PARAM_DRIVER_CODE = 3,
44 BRLAPI_PARAM_DRIVER_VERSION = 4,
45 BRLAPI_PARAM_DEVICE_MODEL = 5,
46 BRLAPI_PARAM_DEVICE_CELL_SIZE = 31,
47 BRLAPI_PARAM_DISPLAY_SIZE = 6,
48 BRLAPI_PARAM_DEVICE_IDENTIFIER = 7,
49 BRLAPI_PARAM_DEVICE_SPEED = 8,
50 BRLAPI_PARAM_DEVICE_ONLINE = 9,
51 /* TODO: status area */
52
53 //Input Parameters
54 BRLAPI_PARAM_RETAIN_DOTS = 10,
56 //Braille Rendering Parameters
57 BRLAPI_PARAM_COMPUTER_BRAILLE_CELL_SIZE = 11,
58 BRLAPI_PARAM_LITERARY_BRAILLE = 12,
59 BRLAPI_PARAM_CURSOR_DOTS = 13,
60 BRLAPI_PARAM_CURSOR_BLINK_PERIOD = 14,
61 BRLAPI_PARAM_CURSOR_BLINK_PERCENTAGE = 15,
62 BRLAPI_PARAM_RENDERED_CELLS = 16,
64 //Navigation Parameters
65 BRLAPI_PARAM_SKIP_IDENTICAL_LINES = 17,
66 BRLAPI_PARAM_AUDIBLE_ALERTS = 18,
68 //Clipboard Parameters
69 BRLAPI_PARAM_CLIPBOARD_CONTENT = 19,
71 //TTY Mode Parameters
72 BRLAPI_PARAM_BOUND_COMMAND_CODES = 20,
74 BRLAPI_PARAM_COMMAND_SHORT_NAME = 21,
77 BRLAPI_PARAM_COMMAND_LONG_NAME = 22,
81 //Raw Mode Parameters
82 BRLAPI_PARAM_DEVICE_KEY_CODES = 23,
84 BRLAPI_PARAM_KEY_SHORT_NAME = 24,
87 BRLAPI_PARAM_KEY_LONG_NAME = 25,
91 //Braille Translation Parameters
92 BRLAPI_PARAM_COMPUTER_BRAILLE_ROWS_MASK = 26,
95 BRLAPI_PARAM_COMPUTER_BRAILLE_ROW_CELLS = 27,
98 BRLAPI_PARAM_COMPUTER_BRAILLE_TABLE = 28,
99 BRLAPI_PARAM_LITERARY_BRAILLE_TABLE = 29,
100 BRLAPI_PARAM_MESSAGE_LOCALE = 30,
101 /* TODO: dot-to-unicode as well */
102
103 /* TODO: help strings */
104
105 BRLAPI_PARAM_COUNT = 32
106 } brlapi_param_t;
107
108 /* brlapi_param_subparam_t */
110 typedef uint64_t brlapi_param_subparam_t;
111
112 /* brlapi_param_bool_t */
114 typedef uint8_t brlapi_param_bool_t;
115
116 /* brlapi_param_serverVersion_t */
118 typedef uint32_t brlapi_param_serverVersion_t;
119
120 /* brlapi_param_clientPriority_t */
122 typedef uint32_t brlapi_param_clientPriority_t;
123
124 /* BRLAPI_PARAM_CLIENT_PRIORITY_DEFAULT */
126 #define BRLAPI_PARAM_CLIENT_PRIORITY_DEFAULT 50
127
128 /* brlapi_param_driverName_t */
130 typedef char *brlapi_param_driverName_t;
131
132 /* brlapi_param_driverCode_t */
134 typedef char *brlapi_param_driverCode_t;
135
136 /* brlapi_param_driverVersion_t */
138 typedef char *brlapi_param_driverVersion_t;
139
140 /* brlapi_param_deviceModel_t */
142 typedef char *brlapi_param_deviceModel_t;
143
144 /* brlapi_param_deviceCellSize_t */
146 typedef uint8_t brlapi_param_deviceCellSize_t;
147
148 /* brlapi_param_displaySize_t */
150 typedef struct {
151 uint32_t columns;
152 uint32_t rows;
153 } brlapi_param_displaySize_t;
154
155 /* brlapi_param_deviceIdentifier_t */
157 typedef char *brlapi_param_deviceIdentifier_t;
158
159 /* brlapi_param_deviceSpeed_t */
161 typedef uint32_t brlapi_param_deviceSpeed_t;
162
163 /* brlapi_param_deviceOnline_t */
165 typedef brlapi_param_bool_t brlapi_param_deviceOnline_t;
166
167 /* brlapi_param_retainDots_t */
169 typedef brlapi_param_bool_t brlapi_param_retainDots_t;
170
171 /* brlapi_param_computerBrailleCellSize_t */
173 typedef uint8_t brlapi_param_computerBrailleCellSize_t;
174
175 /* brlapi_param_literaryBraille_t */
177 typedef brlapi_param_bool_t brlapi_param_literaryBraille_t;
178
179 /* brlapi_param_cursorDots_t */
181 typedef uint8_t brlapi_param_cursorDots_t;
182
183 /* brlapi_param_cursorBlinkPeriod_t */
185 typedef uint32_t brlapi_param_cursorBlinkPeriod_t;
186
187 /* brlapi_param_cursorBlinkPercentage_t */
189 typedef uint8_t brlapi_param_cursorBlinkPercentage_t;
190
191 /* brlapi_param_renderedCells_t */
193 typedef uint8_t *brlapi_param_renderedCells_t;
194
195 /* brlapi_param_skipIdenticalLines_t */
197 typedef brlapi_param_bool_t brlapi_param_skipIdenticalLines_t;
198
199 /* brlapi_param_audibleAlerts_t */
201 typedef brlapi_param_bool_t brlapi_param_audibleAlerts_t;
202
203 /* brlapi_param_clipboardContent_t */
205 typedef char *brlapi_param_clipboardContent_t;
206
207 /* brlapi_param_commandCode_t */
209 typedef brlapi_keyCode_t brlapi_param_commandCode_t;
210
211 /* brlapi_param_commandShortName_t */
213 typedef char *brlapi_param_commandShortName_t;
214
215 /* brlapi_param_commandLongName_t */
217 typedef char *brlapi_param_commandLongName_t;
218
219 /* brlapi_param_keyCode_t */
221 typedef brlapi_keyCode_t brlapi_param_keyCode_t;
222
223 /* brlapi_param_keyShortName_t */
225 typedef char *brlapi_param_keyShortName_t;
226
227 /* brlapi_param_keyLongName_t */
229 typedef char *brlapi_param_keyLongName_t;
230
231 /* brlapi_param_computerBrailleRowsMask_t */
233 typedef uint8_t brlapi_param_computerBrailleRowsMask_t[544];
234
235 /* brlapi_param_computerBrailleRowCells_t */
237 typedef struct {
238 uint8_t cells[0X100];
239 uint8_t defined[0X100 / 8];
240 } brlapi_param_computerBrailleRowCells_t;
241
242 /* brlapi_param_computerBrailleTable_t */
244 typedef char *brlapi_param_computerBrailleTable_t;
245
246 /* brlapi_param_literaryBrailleTable_t */
248 typedef char *brlapi_param_literaryBrailleTable_t;
249
250 /* brlapi_param_messageLocale_t */
252 typedef char *brlapi_param_messageLocale_t;
253
255 typedef enum {
256 BRLAPI_PARAM_TYPE_STRING,
257 BRLAPI_PARAM_TYPE_BOOLEAN,
258 BRLAPI_PARAM_TYPE_UINT8,
259 BRLAPI_PARAM_TYPE_UINT16,
260 BRLAPI_PARAM_TYPE_UINT32,
261 BRLAPI_PARAM_TYPE_UINT64,
262 BRLAPI_PARAM_TYPE_KEYCODE = BRLAPI_PARAM_TYPE_UINT64,
263 } brlapi_param_type_t;
264
266 typedef struct {
267 brlapi_param_type_t type;
268 uint16_t count;
269 uint8_t isArray;
270 uint8_t hasSubparam;
271 } brlapi_param_properties_t;
272
274 /* brlapi_getParameterProperties */
281 extern const brlapi_param_properties_t *brlapi_getParameterProperties(brlapi_param_t parameter);
282
285 #ifdef __cplusplus
286 }
287 #endif /* __cplusplus */
288
289 #endif /* BRLAPI_INCLUDED_PARAM */
brlapi_param_cursorDots_t
uint8_t brlapi_param_cursorDots_t
Definition: brlapi_param.h:181
brlapi_param_commandShortName_t
char * brlapi_param_commandShortName_t
Definition: brlapi_param.h:213
brlapi_param_properties_t::hasSubparam
uint8_t hasSubparam
Definition: brlapi_param.h:270
brlapi_param_renderedCells_t
uint8_t * brlapi_param_renderedCells_t
Definition: brlapi_param.h:193
BRLAPI_PARAM_CURSOR_DOTS
Definition: brlapi_param.h:59
brlapi_keycodes.h
brlapi_param_keyShortName_t
char * brlapi_param_keyShortName_t
Definition: brlapi_param.h:225
brlapi_param_commandLongName_t
char * brlapi_param_commandLongName_t
Definition: brlapi_param.h:217
brlapi_param_cursorBlinkPercentage_t
uint8_t brlapi_param_cursorBlinkPercentage_t
Definition: brlapi_param.h:189
brlapi_param_displaySize_t::columns
uint32_t columns
Definition: brlapi_param.h:151
BRLAPI_PARAM_DEVICE_CELL_SIZE
Definition: brlapi_param.h:46
brlapi_param_deviceCellSize_t
uint8_t brlapi_param_deviceCellSize_t
Definition: brlapi_param.h:146
brlapi_param_deviceIdentifier_t
char * brlapi_param_deviceIdentifier_t
Definition: brlapi_param.h:157
BRLAPI_PARAM_COMPUTER_BRAILLE_ROWS_MASK
Definition: brlapi_param.h:92
brlapi_param_clipboardContent_t
char * brlapi_param_clipboardContent_t
Definition: brlapi_param.h:205
brlapi_param_computerBrailleTable_t
char * brlapi_param_computerBrailleTable_t
Definition: brlapi_param.h:244
BRLAPI_PARAM_DRIVER_VERSION
Definition: brlapi_param.h:44
BRLAPI_PARAM_COMPUTER_BRAILLE_ROW_CELLS
Definition: brlapi_param.h:95
BRLAPI_PARAM_TYPE_UINT8
Definition: brlapi_param.h:258
BRLAPI_PARAM_CURSOR_BLINK_PERIOD
Definition: brlapi_param.h:60
BRLAPI_PARAM_TYPE_UINT64
Definition: brlapi_param.h:261
BRLAPI_PARAM_LITERARY_BRAILLE
Definition: brlapi_param.h:58
BRLAPI_PARAM_DEVICE_MODEL
Definition: brlapi_param.h:45
brlapi_param_displaySize_t::rows
uint32_t rows
Definition: brlapi_param.h:152
BRLAPI_PARAM_TYPE_KEYCODE
Definition: brlapi_param.h:262
BRLAPI_PARAM_MESSAGE_LOCALE
Definition: brlapi_param.h:100
BRLAPI_PARAM_TYPE_BOOLEAN
Definition: brlapi_param.h:257
brlapi_param_deviceModel_t
char * brlapi_param_deviceModel_t
Definition: brlapi_param.h:142
BRLAPI_PARAM_RETAIN_DOTS
Definition: brlapi_param.h:54
brlapi_param_driverName_t
char * brlapi_param_driverName_t
Definition: brlapi_param.h:130
BRLAPI_PARAM_SERVER_VERSION
Definition: brlapi_param.h:38
BRLAPI_PARAM_DRIVER_NAME
Definition: brlapi_param.h:42
brlapi_param_properties_t::isArray
uint8_t isArray
Definition: brlapi_param.h:269
brlapi_param_computerBrailleRowCells_t
Definition: brlapi_param.h:237
brlapi_param_properties_t
Definition: brlapi_param.h:266
BRLAPI_PARAM_KEY_SHORT_NAME
Definition: brlapi_param.h:84
BRLAPI_PARAM_DEVICE_ONLINE
Definition: brlapi_param.h:50
BRLAPI_PARAM_TYPE_UINT16
Definition: brlapi_param.h:259
brlapi_param_literaryBraille_t
brlapi_param_bool_t brlapi_param_literaryBraille_t
Definition: brlapi_param.h:177
BRLAPI_PARAM_COMPUTER_BRAILLE_CELL_SIZE
Definition: brlapi_param.h:57
BRLAPI_PARAM_KEY_LONG_NAME
Definition: brlapi_param.h:87
BRLAPI_PARAM_DEVICE_KEY_CODES
Definition: brlapi_param.h:82
BRLAPI_PARAM_COMMAND_SHORT_NAME
Definition: brlapi_param.h:74
brlapi_param_deviceOnline_t
brlapi_param_bool_t brlapi_param_deviceOnline_t
Definition: brlapi_param.h:165
brlapi_param_literaryBrailleTable_t
char * brlapi_param_literaryBrailleTable_t
Definition: brlapi_param.h:248
brlapi_keyCode_t
uint64_t brlapi_keyCode_t
Definition: brlapi_keycodes.h:90
brlapi_param_clientPriority_t
uint32_t brlapi_param_clientPriority_t
Definition: brlapi_param.h:122
brlapi_param_commandCode_t
brlapi_keyCode_t brlapi_param_commandCode_t
Definition: brlapi_param.h:209
brlapi_param_t
brlapi_param_t
Definition: brlapi_param.h:36
brlapi_getParameterProperties
const brlapi_param_properties_t * brlapi_getParameterProperties(brlapi_param_t parameter)
brlapi_param_displaySize_t
Definition: brlapi_param.h:150
BRLAPI_PARAM_LITERARY_BRAILLE_TABLE
Definition: brlapi_param.h:99
BRLAPI_PARAM_DEVICE_SPEED
Definition: brlapi_param.h:49
BRLAPI_PARAM_COMPUTER_BRAILLE_TABLE
Definition: brlapi_param.h:98
brlapi_param_computerBrailleCellSize_t
uint8_t brlapi_param_computerBrailleCellSize_t
Definition: brlapi_param.h:173
BRLAPI_PARAM_CLIPBOARD_CONTENT
Definition: brlapi_param.h:69
BRLAPI_PARAM_DISPLAY_SIZE
Definition: brlapi_param.h:47
BRLAPI_PARAM_BOUND_COMMAND_CODES
Definition: brlapi_param.h:72
BRLAPI_PARAM_DRIVER_CODE
Definition: brlapi_param.h:43
BRLAPI_PARAM_CLIENT_PRIORITY
Definition: brlapi_param.h:39
brlapi_param_keyLongName_t
char * brlapi_param_keyLongName_t
Definition: brlapi_param.h:229
brlapi_param_retainDots_t
brlapi_param_bool_t brlapi_param_retainDots_t
Definition: brlapi_param.h:169
brlapi_param_computerBrailleRowsMask_t
uint8_t brlapi_param_computerBrailleRowsMask_t[544]
Definition: brlapi_param.h:233
brlapi_param_serverVersion_t
uint32_t brlapi_param_serverVersion_t
Definition: brlapi_param.h:118
brlapi_param_bool_t
uint8_t brlapi_param_bool_t
Definition: brlapi_param.h:114
brlapi_param_audibleAlerts_t
brlapi_param_bool_t brlapi_param_audibleAlerts_t
Definition: brlapi_param.h:201
BRLAPI_PARAM_DEVICE_IDENTIFIER
Definition: brlapi_param.h:48
brlapi_param_driverVersion_t
char * brlapi_param_driverVersion_t
Definition: brlapi_param.h:138
BRLAPI_PARAM_TYPE_UINT32
Definition: brlapi_param.h:260
BRLAPI_PARAM_TYPE_STRING
Definition: brlapi_param.h:256
BRLAPI_PARAM_SKIP_IDENTICAL_LINES
Definition: brlapi_param.h:65
brlapi_param_properties_t::type
brlapi_param_type_t type
Definition: brlapi_param.h:267
brlapi_param_driverCode_t
char * brlapi_param_driverCode_t
Definition: brlapi_param.h:134
BRLAPI_PARAM_COMMAND_LONG_NAME
Definition: brlapi_param.h:77
brlapi_param_messageLocale_t
char * brlapi_param_messageLocale_t
Definition: brlapi_param.h:252
BRLAPI_PARAM_CURSOR_BLINK_PERCENTAGE
Definition: brlapi_param.h:61
brlapi_param_subparam_t
uint64_t brlapi_param_subparam_t
Definition: brlapi_param.h:110
brlapi_param_type_t
brlapi_param_type_t
Definition: brlapi_param.h:255
brlapi_param_deviceSpeed_t
uint32_t brlapi_param_deviceSpeed_t
Definition: brlapi_param.h:161
brlapi_param_cursorBlinkPeriod_t
uint32_t brlapi_param_cursorBlinkPeriod_t
Definition: brlapi_param.h:185
brlapi_param_skipIdenticalLines_t
brlapi_param_bool_t brlapi_param_skipIdenticalLines_t
Definition: brlapi_param.h:197
BRLAPI_PARAM_RENDERED_CELLS
Definition: brlapi_param.h:62
brlapi_param_keyCode_t
brlapi_keyCode_t brlapi_param_keyCode_t
Definition: brlapi_param.h:221
BRLAPI_PARAM_AUDIBLE_ALERTS
Definition: brlapi_param.h:66
brlapi_param_properties_t::count
uint16_t count
Definition: brlapi_param.h:268
BRLAPI_PARAM_COUNT
Definition: brlapi_param.h:105