started to fix the manuals for EBuf. Implemented a
[neuro.git] / include / extlib.h
blobf1b3ededddbd6dca45e8ea7e7b8f4db98989d22f
1 /* Library Abstraction Layer header */
3 #ifndef __EXTLIB_H
4 #define __EXTLIB_H
6 #include "neuro_engine.h"
8 /* the keyboard events list
9 * please note that not all are supported so please
10 * use ISO/Latin unless told a certain one is supported.
13 /* default keysyms */
14 #define XK_MISCELLANY
15 #define XK_XKB_KEYS
16 #define XK_LATIN1 /* starts at line 407 */
17 #define XK_LATIN2
18 #define XK_LATIN3
19 #define XK_LATIN4
20 #define XK_LATIN8
21 #define XK_LATIN9
23 #define XK_VoidSymbol 0xFFFFFF /* void symbol */
25 #ifdef XK_MISCELLANY
27 * TTY Functions, cleverly chosen to map to ascii, for convenience of
28 * programming, but could have been arbitrary (at the cost of lookup
29 * tables in client code.
32 #define XK_BackSpace 0xFF08 /* back space, back char */
33 #define XK_Tab 0xFF09
34 #define XK_Linefeed 0xFF0A /* Linefeed, LF */
35 #define XK_Clear 0xFF0B
36 #define XK_Return 0xFF0D /* Return, enter */
37 #define XK_Pause 0xFF13 /* Pause, hold */
38 #define XK_Scroll_Lock 0xFF14
39 #define XK_Sys_Req 0xFF15
40 #define XK_Escape 0xFF1B
41 #define XK_Delete 0xFFFF /* Delete, rubout */
45 /* International & multi-key character composition */
47 #define XK_Multi_key 0xFF20 /* Multi-key character compose */
48 #define XK_Codeinput 0xFF37
49 #define XK_SingleCandidate 0xFF3C
50 #define XK_MultipleCandidate 0xFF3D
51 #define XK_PreviousCandidate 0xFF3E
53 /* Cursor control & motion */
55 #define XK_Home 0xFF50
56 #define XK_Left 0xFF51 /* Move left, left arrow */
57 #define XK_Up 0xFF52 /* Move up, up arrow */
58 #define XK_Right 0xFF53 /* Move right, right arrow */
59 #define XK_Down 0xFF54 /* Move down, down arrow */
60 #define XK_Prior 0xFF55 /* Prior, previous */
61 #define XK_Page_Up 0xFF55
62 #define XK_Next 0xFF56 /* Next */
63 #define XK_Page_Down 0xFF56
64 #define XK_End 0xFF57 /* EOL */
65 #define XK_Begin 0xFF58 /* BOL */
68 /* Misc Functions */
70 #define XK_Select 0xFF60 /* Select, mark */
71 #define XK_Print 0xFF61
72 #define XK_Execute 0xFF62 /* Execute, run, do */
73 #define XK_Insert 0xFF63 /* Insert, insert here */
74 #define XK_Undo 0xFF65 /* Undo, oops */
75 #define XK_Redo 0xFF66 /* redo, again */
76 #define XK_Menu 0xFF67
77 #define XK_Find 0xFF68 /* Find, search */
78 #define XK_Cancel 0xFF69 /* Cancel, stop, abort, exit */
79 #define XK_Help 0xFF6A /* Help */
80 #define XK_Break 0xFF6B
81 #define XK_Mode_switch 0xFF7E /* Character set switch */
82 #define XK_script_switch 0xFF7E /* Alias for mode_switch */
83 #define XK_Num_Lock 0xFF7F
85 /* Keypad Functions, keypad numbers cleverly chosen to map to ascii */
87 #define XK_KP_Space 0xFF80 /* space */
88 #define XK_KP_Tab 0xFF89
89 #define XK_KP_Enter 0xFF8D /* enter */
90 #define XK_KP_F1 0xFF91 /* PF1, KP_A, ... */
91 #define XK_KP_F2 0xFF92
92 #define XK_KP_F3 0xFF93
93 #define XK_KP_F4 0xFF94
94 #define XK_KP_Home 0xFF95
95 #define XK_KP_Left 0xFF96
96 #define XK_KP_Up 0xFF97
97 #define XK_KP_Right 0xFF98
98 #define XK_KP_Down 0xFF99
99 #define XK_KP_Prior 0xFF9A
100 #define XK_KP_Page_Up 0xFF9A
101 #define XK_KP_Next 0xFF9B
102 #define XK_KP_Page_Down 0xFF9B
103 #define XK_KP_End 0xFF9C
104 #define XK_KP_Begin 0xFF9D
105 #define XK_KP_Insert 0xFF9E
106 #define XK_KP_Delete 0xFF9F
107 #define XK_KP_Equal 0xFFBD /* equals */
108 #define XK_KP_Multiply 0xFFAA
109 #define XK_KP_Add 0xFFAB
110 #define XK_KP_Separator 0xFFAC /* separator, often comma */
111 #define XK_KP_Subtract 0xFFAD
112 #define XK_KP_Decimal 0xFFAE
113 #define XK_KP_Divide 0xFFAF
115 #define XK_KP_0 0xFFB0
116 #define XK_KP_1 0xFFB1
117 #define XK_KP_2 0xFFB2
118 #define XK_KP_3 0xFFB3
119 #define XK_KP_4 0xFFB4
120 #define XK_KP_5 0xFFB5
121 #define XK_KP_6 0xFFB6
122 #define XK_KP_7 0xFFB7
123 #define XK_KP_8 0xFFB8
124 #define XK_KP_9 0xFFB9
129 * Auxilliary Functions; note the duplicate definitions for left and right
130 * function keys; Sun keyboards and a few other manufactures have such
131 * function key groups on the left and/or right sides of the keyboard.
132 * We've not found a keyboard with more than 35 function keys total.
135 #define XK_F1 0xFFBE
136 #define XK_F2 0xFFBF
137 #define XK_F3 0xFFC0
138 #define XK_F4 0xFFC1
139 #define XK_F5 0xFFC2
140 #define XK_F6 0xFFC3
141 #define XK_F7 0xFFC4
142 #define XK_F8 0xFFC5
143 #define XK_F9 0xFFC6
144 #define XK_F10 0xFFC7
145 #define XK_F11 0xFFC8
146 #define XK_L1 0xFFC8
147 #define XK_F12 0xFFC9
148 #define XK_L2 0xFFC9
149 #define XK_F13 0xFFCA
150 #define XK_L3 0xFFCA
151 #define XK_F14 0xFFCB
152 #define XK_L4 0xFFCB
153 #define XK_F15 0xFFCC
154 #define XK_L5 0xFFCC
155 #define XK_F16 0xFFCD
156 #define XK_L6 0xFFCD
157 #define XK_F17 0xFFCE
158 #define XK_L7 0xFFCE
159 #define XK_F18 0xFFCF
160 #define XK_L8 0xFFCF
161 #define XK_F19 0xFFD0
162 #define XK_L9 0xFFD0
163 #define XK_F20 0xFFD1
164 #define XK_L10 0xFFD1
165 #define XK_F21 0xFFD2
166 #define XK_R1 0xFFD2
167 #define XK_F22 0xFFD3
168 #define XK_R2 0xFFD3
169 #define XK_F23 0xFFD4
170 #define XK_R3 0xFFD4
171 #define XK_F24 0xFFD5
172 #define XK_R4 0xFFD5
173 #define XK_F25 0xFFD6
174 #define XK_R5 0xFFD6
175 #define XK_F26 0xFFD7
176 #define XK_R6 0xFFD7
177 #define XK_F27 0xFFD8
178 #define XK_R7 0xFFD8
179 #define XK_F28 0xFFD9
180 #define XK_R8 0xFFD9
181 #define XK_F29 0xFFDA
182 #define XK_R9 0xFFDA
183 #define XK_F30 0xFFDB
184 #define XK_R10 0xFFDB
185 #define XK_F31 0xFFDC
186 #define XK_R11 0xFFDC
187 #define XK_F32 0xFFDD
188 #define XK_R12 0xFFDD
189 #define XK_F33 0xFFDE
190 #define XK_R13 0xFFDE
191 #define XK_F34 0xFFDF
192 #define XK_R14 0xFFDF
193 #define XK_F35 0xFFE0
194 #define XK_R15 0xFFE0
196 /* Modifiers */
198 #define XK_Shift_L 0xFFE1 /* Left shift */
199 #define XK_Shift_R 0xFFE2 /* Right shift */
200 #define XK_Control_L 0xFFE3 /* Left control */
201 #define XK_Control_R 0xFFE4 /* Right control */
202 #define XK_Caps_Lock 0xFFE5 /* Caps lock */
203 #define XK_Shift_Lock 0xFFE6 /* Shift lock */
205 #define XK_Meta_L 0xFFE7 /* Left meta */
206 #define XK_Meta_R 0xFFE8 /* Right meta */
207 #define XK_Alt_L 0xFFE9 /* Left alt */
208 #define XK_Alt_R 0xFFEA /* Right alt */
209 #define XK_Super_L 0xFFEB /* Left super */
210 #define XK_Super_R 0xFFEC /* Right super */
211 #define XK_Hyper_L 0xFFED /* Left hyper */
212 #define XK_Hyper_R 0xFFEE /* Right hyper */
213 #endif /* XK_MISCELLANY */
216 * ISO 9995 Function and Modifier Keys
217 * Byte 3 = 0xFE
220 #ifdef XK_XKB_KEYS
221 #define XK_ISO_Lock 0xFE01
222 #define XK_ISO_Level2_Latch 0xFE02
223 #define XK_ISO_Level3_Shift 0xFE03
224 #define XK_ISO_Level3_Latch 0xFE04
225 #define XK_ISO_Level3_Lock 0xFE05
226 #define XK_ISO_Group_Shift 0xFF7E /* Alias for mode_switch */
227 #define XK_ISO_Group_Latch 0xFE06
228 #define XK_ISO_Group_Lock 0xFE07
229 #define XK_ISO_Next_Group 0xFE08
230 #define XK_ISO_Next_Group_Lock 0xFE09
231 #define XK_ISO_Prev_Group 0xFE0A
232 #define XK_ISO_Prev_Group_Lock 0xFE0B
233 #define XK_ISO_First_Group 0xFE0C
234 #define XK_ISO_First_Group_Lock 0xFE0D
235 #define XK_ISO_Last_Group 0xFE0E
236 #define XK_ISO_Last_Group_Lock 0xFE0F
238 #define XK_ISO_Left_Tab 0xFE20
239 #define XK_ISO_Move_Line_Up 0xFE21
240 #define XK_ISO_Move_Line_Down 0xFE22
241 #define XK_ISO_Partial_Line_Up 0xFE23
242 #define XK_ISO_Partial_Line_Down 0xFE24
243 #define XK_ISO_Partial_Space_Left 0xFE25
244 #define XK_ISO_Partial_Space_Right 0xFE26
245 #define XK_ISO_Set_Margin_Left 0xFE27
246 #define XK_ISO_Set_Margin_Right 0xFE28
247 #define XK_ISO_Release_Margin_Left 0xFE29
248 #define XK_ISO_Release_Margin_Right 0xFE2A
249 #define XK_ISO_Release_Both_Margins 0xFE2B
250 #define XK_ISO_Fast_Cursor_Left 0xFE2C
251 #define XK_ISO_Fast_Cursor_Right 0xFE2D
252 #define XK_ISO_Fast_Cursor_Up 0xFE2E
253 #define XK_ISO_Fast_Cursor_Down 0xFE2F
254 #define XK_ISO_Continuous_Underline 0xFE30
255 #define XK_ISO_Discontinuous_Underline 0xFE31
256 #define XK_ISO_Emphasize 0xFE32
257 #define XK_ISO_Center_Object 0xFE33
258 #define XK_ISO_Enter 0xFE34
260 #define XK_dead_grave 0xFE50
261 #define XK_dead_acute 0xFE51
262 #define XK_dead_circumflex 0xFE52
263 #define XK_dead_tilde 0xFE53
264 #define XK_dead_macron 0xFE54
265 #define XK_dead_breve 0xFE55
266 #define XK_dead_abovedot 0xFE56
267 #define XK_dead_diaeresis 0xFE57
268 #define XK_dead_abovering 0xFE58
269 #define XK_dead_doubleacute 0xFE59
270 #define XK_dead_caron 0xFE5A
271 #define XK_dead_cedilla 0xFE5B
272 #define XK_dead_ogonek 0xFE5C
273 #define XK_dead_iota 0xFE5D
274 #define XK_dead_voiced_sound 0xFE5E
275 #define XK_dead_semivoiced_sound 0xFE5F
276 #define XK_dead_belowdot 0xFE60
277 #define XK_dead_hook 0xFE61
278 #define XK_dead_horn 0xFE62
280 #define XK_First_Virtual_Screen 0xFED0
281 #define XK_Prev_Virtual_Screen 0xFED1
282 #define XK_Next_Virtual_Screen 0xFED2
283 #define XK_Last_Virtual_Screen 0xFED4
284 #define XK_Terminate_Server 0xFED5
286 #define XK_AccessX_Enable 0xFE70
287 #define XK_AccessX_Feedback_Enable 0xFE71
288 #define XK_RepeatKeys_Enable 0xFE72
289 #define XK_SlowKeys_Enable 0xFE73
290 #define XK_BounceKeys_Enable 0xFE74
291 #define XK_StickyKeys_Enable 0xFE75
292 #define XK_MouseKeys_Enable 0xFE76
293 #define XK_MouseKeys_Accel_Enable 0xFE77
294 #define XK_Overlay1_Enable 0xFE78
295 #define XK_Overlay2_Enable 0xFE79
296 #define XK_AudibleBell_Enable 0xFE7A
298 #define XK_Pointer_Left 0xFEE0
299 #define XK_Pointer_Right 0xFEE1
300 #define XK_Pointer_Up 0xFEE2
301 #define XK_Pointer_Down 0xFEE3
302 #define XK_Pointer_UpLeft 0xFEE4
303 #define XK_Pointer_UpRight 0xFEE5
304 #define XK_Pointer_DownLeft 0xFEE6
305 #define XK_Pointer_DownRight 0xFEE7
306 #define XK_Pointer_Button_Dflt 0xFEE8
307 #define XK_Pointer_Button1 0xFEE9
308 #define XK_Pointer_Button2 0xFEEA
309 #define XK_Pointer_Button3 0xFEEB
310 #define XK_Pointer_Button4 0xFEEC
311 #define XK_Pointer_Button5 0xFEED
312 #define XK_Pointer_DblClick_Dflt 0xFEEE
313 #define XK_Pointer_DblClick1 0xFEEF
314 #define XK_Pointer_DblClick2 0xFEF0
315 #define XK_Pointer_DblClick3 0xFEF1
316 #define XK_Pointer_DblClick4 0xFEF2
317 #define XK_Pointer_DblClick5 0xFEF3
318 #define XK_Pointer_Drag_Dflt 0xFEF4
319 #define XK_Pointer_Drag1 0xFEF5
320 #define XK_Pointer_Drag2 0xFEF6
321 #define XK_Pointer_Drag3 0xFEF7
322 #define XK_Pointer_Drag4 0xFEF8
323 #define XK_Pointer_Drag5 0xFEFD
325 #define XK_Pointer_EnableKeys 0xFEF9
326 #define XK_Pointer_Accelerate 0xFEFA
327 #define XK_Pointer_DfltBtnNext 0xFEFB
328 #define XK_Pointer_DfltBtnPrev 0xFEFC
330 #endif
333 * 3270 Terminal Keys
334 * Byte 3 = 0xFD
337 #ifdef XK_3270
338 #define XK_3270_Duplicate 0xFD01
339 #define XK_3270_FieldMark 0xFD02
340 #define XK_3270_Right2 0xFD03
341 #define XK_3270_Left2 0xFD04
342 #define XK_3270_BackTab 0xFD05
343 #define XK_3270_EraseEOF 0xFD06
344 #define XK_3270_EraseInput 0xFD07
345 #define XK_3270_Reset 0xFD08
346 #define XK_3270_Quit 0xFD09
347 #define XK_3270_PA1 0xFD0A
348 #define XK_3270_PA2 0xFD0B
349 #define XK_3270_PA3 0xFD0C
350 #define XK_3270_Test 0xFD0D
351 #define XK_3270_Attn 0xFD0E
352 #define XK_3270_CursorBlink 0xFD0F
353 #define XK_3270_AltCursor 0xFD10
354 #define XK_3270_KeyClick 0xFD11
355 #define XK_3270_Jump 0xFD12
356 #define XK_3270_Ident 0xFD13
357 #define XK_3270_Rule 0xFD14
358 #define XK_3270_Copy 0xFD15
359 #define XK_3270_Play 0xFD16
360 #define XK_3270_Setup 0xFD17
361 #define XK_3270_Record 0xFD18
362 #define XK_3270_ChangeScreen 0xFD19
363 #define XK_3270_DeleteWord 0xFD1A
364 #define XK_3270_ExSelect 0xFD1B
365 #define XK_3270_CursorSelect 0xFD1C
366 #define XK_3270_PrintScreen 0xFD1D
367 #define XK_3270_Enter 0xFD1E
368 #endif
371 * Latin 1
372 * Byte 3 = 0
374 #ifdef XK_LATIN1
375 #define XK_space 0x020
376 #define XK_exclam 0x021
377 #define XK_quotedbl 0x022
378 #define XK_numbersign 0x023
379 #define XK_dollar 0x024
380 #define XK_percent 0x025
381 #define XK_ampersand 0x026
382 #define XK_apostrophe 0x027
383 #define XK_quoteright 0x027 /* deprecated */
384 #define XK_parenleft 0x028
385 #define XK_parenright 0x029
386 #define XK_asterisk 0x02a
387 #define XK_plus 0x02b
388 #define XK_comma 0x02c
389 #define XK_minus 0x02d
390 #define XK_period 0x02e
391 #define XK_slash 0x02f
392 #define XK_0 0x030
393 #define XK_1 0x031
394 #define XK_2 0x032
395 #define XK_3 0x033
396 #define XK_4 0x034
397 #define XK_5 0x035
398 #define XK_6 0x036
399 #define XK_7 0x037
400 #define XK_8 0x038
401 #define XK_9 0x039
402 #define XK_colon 0x03a
403 #define XK_semicolon 0x03b
404 #define XK_less 0x03c
405 #define XK_equal 0x03d
406 #define XK_greater 0x03e
407 #define XK_question 0x03f
408 #define XK_at 0x040
409 #define XK_A 0x041
410 #define XK_B 0x042
411 #define XK_C 0x043
412 #define XK_D 0x044
413 #define XK_E 0x045
414 #define XK_F 0x046
415 #define XK_G 0x047
416 #define XK_H 0x048
417 #define XK_I 0x049
418 #define XK_J 0x04a
419 #define XK_K 0x04b
420 #define XK_L 0x04c
421 #define XK_M 0x04d
422 #define XK_N 0x04e
423 #define XK_O 0x04f
424 #define XK_P 0x050
425 #define XK_Q 0x051
426 #define XK_R 0x052
427 #define XK_S 0x053
428 #define XK_T 0x054
429 #define XK_U 0x055
430 #define XK_V 0x056
431 #define XK_W 0x057
432 #define XK_X 0x058
433 #define XK_Y 0x059
434 #define XK_Z 0x05a
435 #define XK_bracketleft 0x05b
436 #define XK_backslash 0x05c
437 #define XK_bracketright 0x05d
438 #define XK_asciicircum 0x05e
439 #define XK_underscore 0x05f
440 #define XK_grave 0x060
441 #define XK_quoteleft 0x060 /* deprecated */
442 #define XK_a 0x061
443 #define XK_b 0x062
444 #define XK_c 0x063
445 #define XK_d 0x064
446 #define XK_e 0x065
447 #define XK_f 0x066
448 #define XK_g 0x067
449 #define XK_h 0x068
450 #define XK_i 0x069
451 #define XK_j 0x06a
452 #define XK_k 0x06b
453 #define XK_l 0x06c
454 #define XK_m 0x06d
455 #define XK_n 0x06e
456 #define XK_o 0x06f
457 #define XK_p 0x070
458 #define XK_q 0x071
459 #define XK_r 0x072
460 #define XK_s 0x073
461 #define XK_t 0x074
462 #define XK_u 0x075
463 #define XK_v 0x076
464 #define XK_w 0x077
465 #define XK_x 0x078
466 #define XK_y 0x079
467 #define XK_z 0x07a
468 #define XK_braceleft 0x07b
469 #define XK_bar 0x07c
470 #define XK_braceright 0x07d
471 #define XK_asciitilde 0x07e
473 #define XK_nobreakspace 0x0a0
474 #define XK_exclamdown 0x0a1
475 #define XK_cent 0x0a2
476 #define XK_sterling 0x0a3
477 #define XK_currency 0x0a4
478 #define XK_yen 0x0a5
479 #define XK_brokenbar 0x0a6
480 #define XK_section 0x0a7
481 #define XK_diaeresis 0x0a8
482 #define XK_copyright 0x0a9
483 #define XK_ordfeminine 0x0aa
484 #define XK_guillemotleft 0x0ab /* left angle quotation mark */
485 #define XK_notsign 0x0ac
486 #define XK_hyphen 0x0ad
487 #define XK_registered 0x0ae
488 #define XK_macron 0x0af
489 #define XK_degree 0x0b0
490 #define XK_plusminus 0x0b1
491 #define XK_twosuperior 0x0b2
492 #define XK_threesuperior 0x0b3
493 #define XK_acute 0x0b4
494 #define XK_mu 0x0b5
495 #define XK_paragraph 0x0b6
496 #define XK_periodcentered 0x0b7
497 #define XK_cedilla 0x0b8
498 #define XK_onesuperior 0x0b9
499 #define XK_masculine 0x0ba
500 #define XK_guillemotright 0x0bb /* right angle quotation mark */
501 #define XK_onequarter 0x0bc
502 #define XK_onehalf 0x0bd
503 #define XK_threequarters 0x0be
504 #define XK_questiondown 0x0bf
505 #define XK_Agrave 0x0c0
506 #define XK_Aacute 0x0c1
507 #define XK_Acircumflex 0x0c2
508 #define XK_Atilde 0x0c3
509 #define XK_Adiaeresis 0x0c4
510 #define XK_Aring 0x0c5
511 #define XK_AE 0x0c6
512 #define XK_Ccedilla 0x0c7
513 #define XK_Egrave 0x0c8
514 #define XK_Eacute 0x0c9
515 #define XK_Ecircumflex 0x0ca
516 #define XK_Ediaeresis 0x0cb
517 #define XK_Igrave 0x0cc
518 #define XK_Iacute 0x0cd
519 #define XK_Icircumflex 0x0ce
520 #define XK_Idiaeresis 0x0cf
521 #define XK_ETH 0x0d0
522 #define XK_Eth 0x0d0 /* deprecated */
523 #define XK_Ntilde 0x0d1
524 #define XK_Ograve 0x0d2
525 #define XK_Oacute 0x0d3
526 #define XK_Ocircumflex 0x0d4
527 #define XK_Otilde 0x0d5
528 #define XK_Odiaeresis 0x0d6
529 #define XK_multiply 0x0d7
530 #define XK_Ooblique 0x0d8
531 #define XK_Oslash XK_Ooblique
532 #define XK_Ugrave 0x0d9
533 #define XK_Uacute 0x0da
534 #define XK_Ucircumflex 0x0db
535 #define XK_Udiaeresis 0x0dc
536 #define XK_Yacute 0x0dd
537 #define XK_THORN 0x0de
538 #define XK_Thorn 0x0de /* deprecated */
539 #define XK_ssharp 0x0df
540 #define XK_agrave 0x0e0
541 #define XK_aacute 0x0e1
542 #define XK_acircumflex 0x0e2
543 #define XK_atilde 0x0e3
544 #define XK_adiaeresis 0x0e4
545 #define XK_aring 0x0e5
546 #define XK_ae 0x0e6
547 #define XK_ccedilla 0x0e7
548 #define XK_egrave 0x0e8
549 #define XK_eacute 0x0e9
550 #define XK_ecircumflex 0x0ea
551 #define XK_ediaeresis 0x0eb
552 #define XK_igrave 0x0ec
553 #define XK_iacute 0x0ed
554 #define XK_icircumflex 0x0ee
555 #define XK_idiaeresis 0x0ef
556 #define XK_eth 0x0f0
557 #define XK_ntilde 0x0f1
558 #define XK_ograve 0x0f2
559 #define XK_oacute 0x0f3
560 #define XK_ocircumflex 0x0f4
561 #define XK_otilde 0x0f5
562 #define XK_odiaeresis 0x0f6
563 #define XK_division 0x0f7
564 #define XK_oslash 0x0f8
565 #define XK_ooblique XK_oslash
566 #define XK_ugrave 0x0f9
567 #define XK_uacute 0x0fa
568 #define XK_ucircumflex 0x0fb
569 #define XK_udiaeresis 0x0fc
570 #define XK_yacute 0x0fd
571 #define XK_thorn 0x0fe
572 #define XK_ydiaeresis 0x0ff
573 #endif /* XK_LATIN1 */
576 * Latin 2
577 * Byte 3 = 1
580 #ifdef XK_LATIN2
581 #define XK_Aogonek 0x1a1
582 #define XK_breve 0x1a2
583 #define XK_Lstroke 0x1a3
584 #define XK_Lcaron 0x1a5
585 #define XK_Sacute 0x1a6
586 #define XK_Scaron 0x1a9
587 #define XK_Scedilla 0x1aa
588 #define XK_Tcaron 0x1ab
589 #define XK_Zacute 0x1ac
590 #define XK_Zcaron 0x1ae
591 #define XK_Zabovedot 0x1af
592 #define XK_aogonek 0x1b1
593 #define XK_ogonek 0x1b2
594 #define XK_lstroke 0x1b3
595 #define XK_lcaron 0x1b5
596 #define XK_sacute 0x1b6
597 #define XK_caron 0x1b7
598 #define XK_scaron 0x1b9
599 #define XK_scedilla 0x1ba
600 #define XK_tcaron 0x1bb
601 #define XK_zacute 0x1bc
602 #define XK_doubleacute 0x1bd
603 #define XK_zcaron 0x1be
604 #define XK_zabovedot 0x1bf
605 #define XK_Racute 0x1c0
606 #define XK_Abreve 0x1c3
607 #define XK_Lacute 0x1c5
608 #define XK_Cacute 0x1c6
609 #define XK_Ccaron 0x1c8
610 #define XK_Eogonek 0x1ca
611 #define XK_Ecaron 0x1cc
612 #define XK_Dcaron 0x1cf
613 #define XK_Dstroke 0x1d0
614 #define XK_Nacute 0x1d1
615 #define XK_Ncaron 0x1d2
616 #define XK_Odoubleacute 0x1d5
617 #define XK_Rcaron 0x1d8
618 #define XK_Uring 0x1d9
619 #define XK_Udoubleacute 0x1db
620 #define XK_Tcedilla 0x1de
621 #define XK_racute 0x1e0
622 #define XK_abreve 0x1e3
623 #define XK_lacute 0x1e5
624 #define XK_cacute 0x1e6
625 #define XK_ccaron 0x1e8
626 #define XK_eogonek 0x1ea
627 #define XK_ecaron 0x1ec
628 #define XK_dcaron 0x1ef
629 #define XK_dstroke 0x1f0
630 #define XK_nacute 0x1f1
631 #define XK_ncaron 0x1f2
632 #define XK_odoubleacute 0x1f5
633 #define XK_udoubleacute 0x1fb
634 #define XK_rcaron 0x1f8
635 #define XK_uring 0x1f9
636 #define XK_tcedilla 0x1fe
637 #define XK_abovedot 0x1ff
638 #endif /* XK_LATIN2 */
641 * Latin 3
642 * Byte 3 = 2
645 #ifdef XK_LATIN3
646 #define XK_Hstroke 0x2a1
647 #define XK_Hcircumflex 0x2a6
648 #define XK_Iabovedot 0x2a9
649 #define XK_Gbreve 0x2ab
650 #define XK_Jcircumflex 0x2ac
651 #define XK_hstroke 0x2b1
652 #define XK_hcircumflex 0x2b6
653 #define XK_idotless 0x2b9
654 #define XK_gbreve 0x2bb
655 #define XK_jcircumflex 0x2bc
656 #define XK_Cabovedot 0x2c5
657 #define XK_Ccircumflex 0x2c6
658 #define XK_Gabovedot 0x2d5
659 #define XK_Gcircumflex 0x2d8
660 #define XK_Ubreve 0x2dd
661 #define XK_Scircumflex 0x2de
662 #define XK_cabovedot 0x2e5
663 #define XK_ccircumflex 0x2e6
664 #define XK_gabovedot 0x2f5
665 #define XK_gcircumflex 0x2f8
666 #define XK_ubreve 0x2fd
667 #define XK_scircumflex 0x2fe
668 #endif /* XK_LATIN3 */
672 * Latin 4
673 * Byte 3 = 3
676 #ifdef XK_LATIN4
677 #define XK_kra 0x3a2
678 #define XK_kappa 0x3a2 /* deprecated */
679 #define XK_Rcedilla 0x3a3
680 #define XK_Itilde 0x3a5
681 #define XK_Lcedilla 0x3a6
682 #define XK_Emacron 0x3aa
683 #define XK_Gcedilla 0x3ab
684 #define XK_Tslash 0x3ac
685 #define XK_rcedilla 0x3b3
686 #define XK_itilde 0x3b5
687 #define XK_lcedilla 0x3b6
688 #define XK_emacron 0x3ba
689 #define XK_gcedilla 0x3bb
690 #define XK_tslash 0x3bc
691 #define XK_ENG 0x3bd
692 #define XK_eng 0x3bf
693 #define XK_Amacron 0x3c0
694 #define XK_Iogonek 0x3c7
695 #define XK_Eabovedot 0x3cc
696 #define XK_Imacron 0x3cf
697 #define XK_Ncedilla 0x3d1
698 #define XK_Omacron 0x3d2
699 #define XK_Kcedilla 0x3d3
700 #define XK_Uogonek 0x3d9
701 #define XK_Utilde 0x3dd
702 #define XK_Umacron 0x3de
703 #define XK_amacron 0x3e0
704 #define XK_iogonek 0x3e7
705 #define XK_eabovedot 0x3ec
706 #define XK_imacron 0x3ef
707 #define XK_ncedilla 0x3f1
708 #define XK_omacron 0x3f2
709 #define XK_kcedilla 0x3f3
710 #define XK_uogonek 0x3f9
711 #define XK_utilde 0x3fd
712 #define XK_umacron 0x3fe
713 #endif /* XK_LATIN4 */
716 * Latin-8
717 * Byte 3 = 18
719 #ifdef XK_LATIN8
720 #define XK_Babovedot 0x12a1
721 #define XK_babovedot 0x12a2
722 #define XK_Dabovedot 0x12a6
723 #define XK_Wgrave 0x12a8
724 #define XK_Wacute 0x12aa
725 #define XK_dabovedot 0x12ab
726 #define XK_Ygrave 0x12ac
727 #define XK_Fabovedot 0x12b0
728 #define XK_fabovedot 0x12b1
729 #define XK_Mabovedot 0x12b4
730 #define XK_mabovedot 0x12b5
731 #define XK_Pabovedot 0x12b7
732 #define XK_wgrave 0x12b8
733 #define XK_pabovedot 0x12b9
734 #define XK_wacute 0x12ba
735 #define XK_Sabovedot 0x12bb
736 #define XK_ygrave 0x12bc
737 #define XK_Wdiaeresis 0x12bd
738 #define XK_wdiaeresis 0x12be
739 #define XK_sabovedot 0x12bf
740 #define XK_Wcircumflex 0x12d0
741 #define XK_Tabovedot 0x12d7
742 #define XK_Ycircumflex 0x12de
743 #define XK_wcircumflex 0x12f0
744 #define XK_tabovedot 0x12f7
745 #define XK_ycircumflex 0x12fe
746 #endif /* XK_LATIN8 */
749 * Latin-9 (a.k.a. Latin-0)
750 * Byte 3 = 19
753 #ifdef XK_LATIN9
754 #define XK_OE 0x13bc
755 #define XK_oe 0x13bd
756 #define XK_Ydiaeresis 0x13be
757 #endif /* XK_LATIN9 */
760 /* take note that those functions herein are to be used stricly by the
761 * local library and not by the external programs!
763 * Those functions are designed for internal use only! their where abouts
764 * are not garanteed and they surely don't have any (none at all)
765 * backward compatibility! So use the Neuro_ functions, now please.
769 /* allocate stuff needed for the video */
770 extern int Lib_VideoInit(v_object **screen, v_object **screen_buf);
772 /* cleans up stuff allocated for the video */
773 extern void Lib_VideoExit();
775 /* allocated stuff needed for events */
776 extern int Lib_EventInit();
778 /* cleans up stuff allocated for events */
779 extern void Lib_EventExit();
781 /* allocates stuff needed for fonts */
782 extern int Lib_FontsInit();
784 /* cleans up stuff allocated for fonts */
785 extern void Lib_FontsExit();
787 /* you can set the size of the screen with this function.
788 * note that this function will not work on the fly, you
789 * can only use this __before__ you init Neuro! or
790 * else it won't work.
792 extern void Lib_SetScreenSize(u32 width, u32 height);
794 /* puts the size of the screen in current use in the input variables */
795 extern void Lib_GetScreenSize(u32 *width, u32 *height);
797 /* for pixel manipulations (input/output) this locks the lock on
798 * the pixels buffer. So nothing can be done in the background on
799 * them.
801 extern void Lib_LockVObject(v_object *vobj);
803 /* for pixel manipulations (input/output) this unlocks the lock on
804 * the pixels buffer.
806 extern void Lib_UnlockVObject(v_object *vobj);
808 /* free a v_object after its use is no longer needed. */
809 extern void Lib_FreeVobject(v_object *source);
811 /* flip the surface/screen if its double buffered */
812 extern void Lib_Flip(v_object *source);
814 /* draw rectangles on the surface */
815 extern void Lib_FillRect(v_object *source, Rectan *src, u32 color);
817 /* used to update only parts of the surface/screen at once */
818 extern void Lib_UpdateRect(v_object *source, Rectan *src);
820 /* blit one surface to another one with this function */
821 extern void Lib_BlitObject(v_object *source, Rectan *src, v_object *destination, Rectan *dst);
823 /* SOON TO BE OBSOLETE!!
825 * no idea what that does... it doesn't seem to have any use...
827 extern void Lib_GiveVobjectProp(v_object *source, Rectan *output);
829 /* outputs the current depth in use */
830 extern u32 Lib_GetDefaultDepth();
832 /* get sensible informations about a surface and yes, all those needs
833 * to be filled.
835 extern void Lib_GetVObjectData(v_object *vobj, u32 *flags, i32 *h, i32 *w, u32 *pitch, void **pixels, Rectan **clip_rect, u8 *bpp, u32 *Rmask, u32 *Gmask, u32 *Bmask, u32 *Amask);
837 /* load a M$ bitmap from a file that you input
838 * pass the address of a pointer v_object :
839 * v_object *image;
841 * and pointer for that is &image
843 extern void Lib_LoadBMP(const char *path, v_object **img);
845 /* load a M$ bitmap from a buffer in memory
846 * pass the address of a pointer v_object :
847 * v_object *image;
849 * and pointer for that is &image
851 extern void Lib_LoadBMPBuffer(void *data, v_object **img);
853 /* outputs the color code(properly aligned) corresponding to
854 * the three primary color inputs. For surfaces that have
855 * their own palette, we support an input of the surface.
857 extern u32 Lib_MapRGB(v_object *vobj, u8 r, u8 g, u8 b);
859 /* sets the color key that will not be drawn (for transparency) of a surface.
860 * this needs to be done strictly before loading a surface with X11 and
861 * can be done anytime with SDL.
863 extern void Lib_SetColorKey(v_object *vobj, u32 key);
865 /* sets the alpha (transparency) of a surface */
866 extern void Lib_SetAlpha(v_object *vobj, u8 alpha);
868 /* syncs the pixels so subsequent input or output on them
869 * are getting correct informations.
871 extern void Lib_SyncPixels(v_object *src);
873 /* puts a pixel into surface srf at the given coordinates */
874 extern void Lib_PutPixel(v_object *srf, int x, int y, u32 pixel);
876 /* outputs the color of a pixel in the surface srf */
877 extern u32 Lib_GetPixel(v_object *srf, int x, int y);
879 /* create visual surfaces with this function */
880 extern v_object * Lib_CreateVObject(u32 flags, i32 width, i32 height, i32 depth, u32 Rmask, u32 Gmask, u32 Bmask, u32 Amask);
882 /* a higher SDL function which is kinda an hack for event.c */
883 extern void Lib_EventPoll();
885 /* the poll for the events */
886 extern i32 Lib_PollEvent(void *event);
888 /* now obsolete, use the CheckKeyStatus function instead */
889 extern u8 *Lib_GetKeyState(i32 *numkeys);
891 /* better function to get key status */
892 extern u8 Lib_CheckKeyStatus(u32 key);
894 /* outputs the current status of the mouse and passes the coordinates to the
895 * address inputed.
897 extern u8 Lib_GetMouseState(i32 *x, i32 *y);
899 /* you can load a truetype (or any other that the freetype library
900 * supports) with this function.
901 * returns NULL on error or a pointer to a font_object.
903 extern font_object *Lib_LoadFontFile(const char *fonts_file_path);
905 /* this function is to clean a font file loaded
906 * using Lib_LoadFontFile
908 extern void Lib_CleanFont(font_object *font);
910 /* even though the input arguments seem to be quite complicated, it is not.
911 * the ttf input address can be given with the load fonts function, the size
912 * is the size of the fonts you want in pixels, the character is the character
913 * code you want to render.
915 * The x and y coordinates are a bit special, the value in those are changed so
916 * characters in a string have the correct spacing(instead of overlapping).
918 * color is the color you want your character to be and the 2 Rectan output
919 * the basic informations about the surface so it can be blit easily.
921 * returns the v_object pointer if the character got loaded well or
922 * NULL if either there was an error or the character that was input
923 * requires more than one byte to be complete.
925 * NOTE This function do handle spaces! ie ' '. just input the corresponding
926 * x and y addresses so the function can calculate itself the size they take.
927 * For this purpose, you CAN leave color, src and dst to 0 or NULL!
928 * just remember to put the correct size and character (to ' ') so the size
929 * of the space is correct.
931 extern v_object *Lib_RenderUnicode(font_object *ttf, u32 size, u32 character,
932 i16 *x, i16 *y, u32 color, Rectan *src, Rectan *dst);
934 #endif /* not __EXTLIB_H */