events: Add mouse button event bindings.
[guile-sdl2.git] / sdl2 / bindings.scm
1 ;;; guile-sdl2 --- FFI bindings for SDL2
2 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
3 ;;;
4 ;;; This file is part of guile-sdl2.
5 ;;;
6 ;;; Guile-sdl2 is free software; you can redistribute it and/or modify
7 ;;; it under the terms of the GNU Lesser General Public License as
8 ;;; published by the Free Software Foundation; either version 3 of the
9 ;;; License, or (at your option) any later version.
10 ;;;
11 ;;; Guile-sdl2 is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;; General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU Lesser General Public
17 ;;; License along with guile-sdl2. If not, see
18 ;;; <http://www.gnu.org/licenses/>.
19
20 ;;; Commentary:
21 ;;
22 ;; Low-level FFI bindings.
23 ;;
24 ;;; Code:
25
26 (define-module (sdl2 bindings)
27 #:use-module (system foreign)
28 #:use-module (sdl2 config)
29 #:export (boolean->sdl-bool
30
31 SDL_INIT_TIMER
32 SDL_INIT_AUDIO
33 SDL_INIT_VIDEO
34 SDL_INIT_HAPTIC
35 SDL_INIT_GAMECONTROLLER
36 SDL_INIT_EVENTS
37 SDL_INIT_NOPARACHUTE
38
39 SDL_WINDOW_FULLSCREEN
40 SDL_WINDOW_OPENGL
41 SDL_WINDOW_SHOWN
42 SDL_WINDOW_HIDDEN
43 SDL_WINDOW_BORDERLESS
44 SDL_WINDOW_RESIZABLE
45 SDL_WINDOW_MINIMIZED
46 SDL_WINDOW_MAXIMIZED
47 SDL_WINDOW_INPUT_GRABBED
48 SDL_WINDOW_INPUT_FOCUS
49 SDL_WINDOW_MOUSE_FOCUS
50 SDL_WINDOW_FULLSCREEN_DESKTOP
51 SDL_WINDOW_FOREIGN
52 SDL_WINDOW_ALLOW_HIGHDPI
53 SDL_WINDOW_MOUSE_CAPTURE
54
55 SDL_RENDERER_SOFTWARE
56 SDL_RENDERER_ACCELERATED
57 SDL_RENDERER_PRESENTVSYNC
58 SDL_RENDERER_TARGETTEXTURE))
59
60 (define sdl-func
61 (let ((lib (dynamic-link %libsdl2)))
62 (lambda (return-type function-name arg-types)
63 "Return a procedure for the foreign function FUNCTION-NAME in
64 the SDL2 shared library. That function must return a value of
65 RETURN-TYPE and accept arguments of ARG-TYPES."
66 (pointer->procedure return-type
67 (dynamic-func function-name lib)
68 arg-types))))
69
70 (define-syntax-rule (define-foreign name return-type func-name arg-types)
71 (define-public name
72 (sdl-func return-type func-name arg-types)))
73
74 \f
75 ;;;
76 ;;; Foreign Types
77 ;;;
78
79 (define sdl-bool int)
80
81 (define (boolean->sdl-bool b)
82 "Convert the boolean B to an SDL_bool."
83 (if b 1 0))
84
85 \f
86 ;;;
87 ;;; Errors
88 ;;;
89
90 (define-foreign sdl-get-error
91 '* "SDL_GetError" '())
92
93 \f
94 ;;;
95 ;;; Initialization
96 ;;;
97
98 (define SDL_INIT_TIMER #x00000001)
99 (define SDL_INIT_AUDIO #x00000010)
100 (define SDL_INIT_VIDEO #x00000020)
101 (define SDL_INIT_HAPTIC #x00001000)
102 (define SDL_INIT_GAMECONTROLLER #x00002000)
103 (define SDL_INIT_EVENTS #x00004000)
104
105 (define-foreign sdl-init
106 int "SDL_Init" (list uint32))
107
108 (define-foreign sdl-quit
109 void "SDL_Quit" '())
110
111 \f
112 ;;;
113 ;;; Version
114 ;;;
115
116 (define-foreign sdl-get-version
117 void "SDL_GetVersion" '(*))
118
119 \f
120 ;;;
121 ;;; Video
122 ;;;
123
124 (define SDL_WINDOW_FULLSCREEN #x00000001)
125 (define SDL_WINDOW_OPENGL #x00000002)
126 (define SDL_WINDOW_SHOWN #x00000004)
127 (define SDL_WINDOW_HIDDEN #x00000008)
128 (define SDL_WINDOW_BORDERLESS #x00000010)
129 (define SDL_WINDOW_RESIZABLE #x00000020)
130 (define SDL_WINDOW_MINIMIZED #x00000040)
131 (define SDL_WINDOW_MAXIMIZED #x00000080)
132 (define SDL_WINDOW_INPUT_GRABBED #x00000100)
133 (define SDL_WINDOW_INPUT_FOCUS #x00000200)
134 (define SDL_WINDOW_MOUSE_FOCUS #x00000400)
135 (define SDL_WINDOW_FULLSCREEN_DESKTOP (logior SDL_WINDOW_FULLSCREEN
136 #x00001000))
137 (define SDL_WINDOW_FOREIGN #x00000800)
138 (define SDL_WINDOW_ALLOW_HIGHDPI #x00002000)
139 (define SDL_WINDOW_MOUSE_CAPTURE #x00004000)
140
141 (define-foreign sdl-create-window
142 '* "SDL_CreateWindow" (list '* int int int int uint32))
143
144 (define-foreign sdl-destroy-window
145 void "SDL_DestroyWindow" '(*))
146
147 (define-foreign sdl-get-window-title
148 '* "SDL_GetWindowTitle" '(*))
149
150 (define-foreign sdl-get-window-size
151 void "SDL_GetWindowSize" '(* * *))
152
153 (define-foreign sdl-get-window-position
154 void "SDL_GetWindowPosition" '(* * *))
155
156 (define-foreign sdl-get-window-id
157 uint32 "SDL_GetWindowID" '(*))
158
159 (define-foreign sdl-get-window-from-id
160 '* "SDL_GetWindowFromID" (list uint32))
161
162 (define-foreign sdl-hide-window
163 void "SDL_HideWindow" '(*))
164
165 (define-foreign sdl-show-window
166 void "SDL_ShowWindow" '(*))
167
168 (define-foreign sdl-maximize-window
169 void "SDL_MaximizeWindow" '(*))
170
171 (define-foreign sdl-minimize-window
172 void "SDL_MinimizeWindow" '(*))
173
174 (define-foreign sdl-raise-window
175 void "SDL_RaiseWindow" '(*))
176
177 (define-foreign sdl-restore-window
178 void "SDL_RestoreWindow" '(*))
179
180 (define-foreign sdl-set-window-bordered
181 void "SDL_SetWindowBordered" (list '* sdl-bool))
182
183 (define-foreign sdl-set-window-title
184 void "SDL_SetWindowTitle" '(* *))
185
186 (define-foreign sdl-set-window-position
187 void "SDL_SetWindowPosition" (list '* int int))
188
189 (define-foreign sdl-set-window-size
190 void "SDL_SetWindowSize" (list '* int int))
191
192 (define-foreign sdl-gl-create-context
193 '* "SDL_GL_CreateContext" '(*))
194
195 (define-foreign sdl-gl-delete-context
196 void "SDL_GL_DeleteContext" '(*))
197
198 (define-foreign sdl-gl-swap-window
199 void "SDL_GL_SwapWindow" '(*))
200
201 (define SDL_RENDERER_SOFTWARE #x00000001)
202 (define SDL_RENDERER_ACCELERATED #x00000002)
203 (define SDL_RENDERER_PRESENTVSYNC #x00000004)
204 (define SDL_RENDERER_TARGETTEXTURE #x00000008)
205
206 (define-foreign sdl-create-renderer
207 '* "SDL_CreateRenderer" (list '* int uint32))
208
209 (define-foreign sdl-destroy-renderer
210 void "SDL_DestroyRenderer" '(*))
211
212 (define-foreign sdl-render-clear
213 int "SDL_RenderClear" '(*))
214
215 (define-foreign sdl-render-present
216 void "SDL_RenderPresent" '(*))
217
218 (define-foreign sdl-render-copy
219 int "SDL_RenderCopy" '(* * * *))
220
221 (define-foreign sdl-create-texture-from-surface
222 '* "SDL_CreateTextureFromSurface" '(* *))
223
224 \f
225 ;;;
226 ;;; Events
227 ;;;
228
229 (define-public SDL_QUIT #x100)
230 (define-public SDL_APP_TERMINATING #x101)
231 (define-public SDL_APP_LOWMEMORY #x102)
232 (define-public SDL_APP_WILLENTERBACKGROUND #x103)
233 (define-public SDL_APP_DIDENTERBACKGROUND #x104)
234 (define-public SDL_APP_WILLENTERFOREGROUND #x105)
235 (define-public SDL_APP_DIDENTERFOREGROUND #x106)
236 (define-public SDL_WINDOWEVENT #x200)
237 (define-public SDL_SYSWMEVENT #x201)
238 (define-public SDL_KEYDOWN #x300)
239 (define-public SDL_KEYUP #x301)
240 (define-public SDL_TEXTEDITING #x302)
241 (define-public SDL_TEXTINPUT #x303)
242 (define-public SDL_MOUSEMOTION #x400)
243 (define-public SDL_MOUSEBUTTONDOWN #x401)
244 (define-public SDL_MOUSEBUTTONUP #x402)
245 (define-public SDL_MOUSEWHEEL #x403)
246 (define-public SDL_JOYAXISMOTION #x600)
247 (define-public SDL_JOYBALLMOTION #x601)
248 (define-public SDL_JOYHATMOTION #x602)
249 (define-public SDL_JOYBUTTONDOWN #x603)
250 (define-public SDL_JOYBUTTONUP #x604)
251 (define-public SDL_JOYDEVICEADDED #x605)
252 (define-public SDL_JOYDEVICEREMOVED #x606)
253 (define-public SDL_CONTROLLERAXISMOTION #x650)
254 (define-public SDL_CONTROLLERBUTTONDOWN #x651)
255 (define-public SDL_CONTROLLERBUTTONUP #x652)
256 (define-public SDL_CONTROLLERDEVICEADDED #x653)
257 (define-public SDL_CONTROLLERDEVICEREMOVED #x654)
258 (define-public SDL_CONTROLLERDEVICEREMAPPED #x655)
259 (define-public SDL_FINGERDOWN #x700)
260 (define-public SDL_FINGERUP #x701)
261 (define-public SDL_FINGERMOTION #x702)
262 (define-public SDL_DOLLARGESTURE #x800)
263 (define-public SDL_DOLLARRECORD #x801)
264 (define-public SDL_MULTIGESTURE #x802)
265 (define-public SDL_CLIPBOARDUPDATE #x900)
266 (define-public SDL_DROPFILE #x1000)
267 (define-public SDL_RENDER_TARGETS_RESET #x2000)
268 (define-public SDL_USEREVENT #x8000)
269
270 (define-public SDL_RELEASED 0)
271 (define-public SDL_PRESSED 1)
272
273 (define-public SDL_WINDOWEVENT_NONE 0)
274 (define-public SDL_WINDOWEVENT_SHOWN 1)
275 (define-public SDL_WINDOWEVENT_HIDDEN 2)
276 (define-public SDL_WINDOWEVENT_EXPOSED 3)
277 (define-public SDL_WINDOWEVENT_MOVED 4)
278 (define-public SDL_WINDOWEVENT_RESIZED 5)
279 (define-public SDL_WINDOWEVENT_SIZE_CHANGED 6)
280 (define-public SDL_WINDOWEVENT_MINIMIZED 7)
281 (define-public SDL_WINDOWEVENT_MAXIMIZED 8)
282 (define-public SDL_WINDOWEVENT_RESTORED 9)
283 (define-public SDL_WINDOWEVENT_ENTER 10)
284 (define-public SDL_WINDOWEVENT_LEAVE 11)
285 (define-public SDL_WINDOWEVENT_FOCUS_GAINED 12)
286 (define-public SDL_WINDOWEVENT_FOCUS_LOST 13)
287 (define-public SDL_WINDOWEVENT_CLOSE 14)
288
289 (define-foreign sdl-poll-event
290 int "SDL_PollEvent" '(*))
291
292 \f
293 ;;;
294 ;;; Keycodes and scancodes
295 ;;;
296
297 (define-public KMOD_NONE #x0000)
298 (define-public KMOD_LSHIFT #x0001)
299 (define-public KMOD_RSHIFT #x0002)
300 (define-public KMOD_LCTRL #x0040)
301 (define-public KMOD_RCTRL #x0080)
302 (define-public KMOD_LALT #x0100)
303 (define-public KMOD_RALT #x0200)
304 (define-public KMOD_LGUI #x0400)
305 (define-public KMOD_RGUI #x0800)
306 (define-public KMOD_NUM #x1000)
307 (define-public KMOD_CAPS #x2000)
308 (define-public KMOD_MODE #x4000)
309
310 (define-public SDLK_SCANCODE_MASK (ash 1 30))
311
312 (define-public (scancode->keycode scancode)
313 (logior scancode SDLK_SCANCODE_MASK))
314
315 (define-public SDL_SCANCODE_UNKNOWN 0)
316 (define-public SDL_SCANCODE_A 4)
317 (define-public SDL_SCANCODE_B 5)
318 (define-public SDL_SCANCODE_C 6)
319 (define-public SDL_SCANCODE_D 7)
320 (define-public SDL_SCANCODE_E 8)
321 (define-public SDL_SCANCODE_F 9)
322 (define-public SDL_SCANCODE_G 10)
323 (define-public SDL_SCANCODE_H 11)
324 (define-public SDL_SCANCODE_I 12)
325 (define-public SDL_SCANCODE_J 13)
326 (define-public SDL_SCANCODE_K 14)
327 (define-public SDL_SCANCODE_L 15)
328 (define-public SDL_SCANCODE_M 16)
329 (define-public SDL_SCANCODE_N 17)
330 (define-public SDL_SCANCODE_O 18)
331 (define-public SDL_SCANCODE_P 19)
332 (define-public SDL_SCANCODE_Q 20)
333 (define-public SDL_SCANCODE_R 21)
334 (define-public SDL_SCANCODE_S 22)
335 (define-public SDL_SCANCODE_T 23)
336 (define-public SDL_SCANCODE_U 24)
337 (define-public SDL_SCANCODE_V 25)
338 (define-public SDL_SCANCODE_W 26)
339 (define-public SDL_SCANCODE_X 27)
340 (define-public SDL_SCANCODE_Y 28)
341 (define-public SDL_SCANCODE_Z 29)
342 (define-public SDL_SCANCODE_1 30)
343 (define-public SDL_SCANCODE_2 31)
344 (define-public SDL_SCANCODE_3 32)
345 (define-public SDL_SCANCODE_4 33)
346 (define-public SDL_SCANCODE_5 34)
347 (define-public SDL_SCANCODE_6 35)
348 (define-public SDL_SCANCODE_7 36)
349 (define-public SDL_SCANCODE_8 37)
350 (define-public SDL_SCANCODE_9 38)
351 (define-public SDL_SCANCODE_0 39)
352 (define-public SDL_SCANCODE_RETURN 40)
353 (define-public SDL_SCANCODE_ESCAPE 41)
354 (define-public SDL_SCANCODE_BACKSPACE 42)
355 (define-public SDL_SCANCODE_TAB 43)
356 (define-public SDL_SCANCODE_SPACE 44)
357 (define-public SDL_SCANCODE_MINUS 45)
358 (define-public SDL_SCANCODE_EQUALS 46)
359 (define-public SDL_SCANCODE_LEFTBRACKET 47)
360 (define-public SDL_SCANCODE_RIGHTBRACKET 48)
361 (define-public SDL_SCANCODE_BACKSLASH 49)
362 (define-public SDL_SCANCODE_NONUSHASH 50)
363 (define-public SDL_SCANCODE_SEMICOLON 51)
364 (define-public SDL_SCANCODE_APOSTROPHE 52)
365 (define-public SDL_SCANCODE_GRAVE 53)
366 (define-public SDL_SCANCODE_COMMA 54)
367 (define-public SDL_SCANCODE_PERIOD 55)
368 (define-public SDL_SCANCODE_SLASH 56)
369 (define-public SDL_SCANCODE_CAPSLOCK 57)
370 (define-public SDL_SCANCODE_F1 58)
371 (define-public SDL_SCANCODE_F2 59)
372 (define-public SDL_SCANCODE_F3 60)
373 (define-public SDL_SCANCODE_F4 61)
374 (define-public SDL_SCANCODE_F5 62)
375 (define-public SDL_SCANCODE_F6 63)
376 (define-public SDL_SCANCODE_F7 64)
377 (define-public SDL_SCANCODE_F8 65)
378 (define-public SDL_SCANCODE_F9 66)
379 (define-public SDL_SCANCODE_F10 67)
380 (define-public SDL_SCANCODE_F11 68)
381 (define-public SDL_SCANCODE_F12 69)
382 (define-public SDL_SCANCODE_PRINTSCREEN 70)
383 (define-public SDL_SCANCODE_SCROLLLOCK 71)
384 (define-public SDL_SCANCODE_PAUSE 72)
385 (define-public SDL_SCANCODE_INSERT 73)
386 (define-public SDL_SCANCODE_HOME 74)
387 (define-public SDL_SCANCODE_PAGEUP 75)
388 (define-public SDL_SCANCODE_DELETE 76)
389 (define-public SDL_SCANCODE_END 77)
390 (define-public SDL_SCANCODE_PAGEDOWN 78)
391 (define-public SDL_SCANCODE_RIGHT 79)
392 (define-public SDL_SCANCODE_LEFT 80)
393 (define-public SDL_SCANCODE_DOWN 81)
394 (define-public SDL_SCANCODE_UP 82)
395 (define-public SDL_SCANCODE_NUMLOCKCLEAR 83)
396 (define-public SDL_SCANCODE_KP_DIVIDE 84)
397 (define-public SDL_SCANCODE_KP_MULTIPLY 85)
398 (define-public SDL_SCANCODE_KP_MINUS 86)
399 (define-public SDL_SCANCODE_KP_PLUS 87)
400 (define-public SDL_SCANCODE_KP_ENTER 88)
401 (define-public SDL_SCANCODE_KP_1 89)
402 (define-public SDL_SCANCODE_KP_2 90)
403 (define-public SDL_SCANCODE_KP_3 91)
404 (define-public SDL_SCANCODE_KP_4 92)
405 (define-public SDL_SCANCODE_KP_5 93)
406 (define-public SDL_SCANCODE_KP_6 94)
407 (define-public SDL_SCANCODE_KP_7 95)
408 (define-public SDL_SCANCODE_KP_8 96)
409 (define-public SDL_SCANCODE_KP_9 97)
410 (define-public SDL_SCANCODE_KP_0 98)
411 (define-public SDL_SCANCODE_KP_PERIOD 99)
412 (define-public SDL_SCANCODE_NONUSBACKSLASH 100)
413 (define-public SDL_SCANCODE_APPLICATION 101)
414 (define-public SDL_SCANCODE_POWER 102)
415 (define-public SDL_SCANCODE_KP_EQUALS 103)
416 (define-public SDL_SCANCODE_F13 104)
417 (define-public SDL_SCANCODE_F14 105)
418 (define-public SDL_SCANCODE_F15 106)
419 (define-public SDL_SCANCODE_F16 107)
420 (define-public SDL_SCANCODE_F17 108)
421 (define-public SDL_SCANCODE_F18 109)
422 (define-public SDL_SCANCODE_F19 110)
423 (define-public SDL_SCANCODE_F20 111)
424 (define-public SDL_SCANCODE_F21 112)
425 (define-public SDL_SCANCODE_F22 113)
426 (define-public SDL_SCANCODE_F23 114)
427 (define-public SDL_SCANCODE_F24 115)
428 (define-public SDL_SCANCODE_EXECUTE 116)
429 (define-public SDL_SCANCODE_HELP 117)
430 (define-public SDL_SCANCODE_MENU 118)
431 (define-public SDL_SCANCODE_SELECT 119)
432 (define-public SDL_SCANCODE_STOP 120)
433 (define-public SDL_SCANCODE_AGAIN 121)
434 (define-public SDL_SCANCODE_UNDO 122)
435 (define-public SDL_SCANCODE_CUT 123)
436 (define-public SDL_SCANCODE_COPY 124)
437 (define-public SDL_SCANCODE_PASTE 125)
438 (define-public SDL_SCANCODE_FIND 126)
439 (define-public SDL_SCANCODE_MUTE 127)
440 (define-public SDL_SCANCODE_VOLUMEUP 128)
441 (define-public SDL_SCANCODE_VOLUMEDOWN 129)
442 (define-public SDL_SCANCODE_KP_COMMA 133)
443 (define-public SDL_SCANCODE_KP_EQUALSAS400 134)
444 (define-public SDL_SCANCODE_INTERNATIONAL1 135)
445 (define-public SDL_SCANCODE_INTERNATIONAL2 136)
446 (define-public SDL_SCANCODE_INTERNATIONAL3 137)
447 (define-public SDL_SCANCODE_INTERNATIONAL4 138)
448 (define-public SDL_SCANCODE_INTERNATIONAL5 139)
449 (define-public SDL_SCANCODE_INTERNATIONAL6 140)
450 (define-public SDL_SCANCODE_INTERNATIONAL7 141)
451 (define-public SDL_SCANCODE_INTERNATIONAL8 142)
452 (define-public SDL_SCANCODE_INTERNATIONAL9 143)
453 (define-public SDL_SCANCODE_LANG1 144)
454 (define-public SDL_SCANCODE_LANG2 145)
455 (define-public SDL_SCANCODE_LANG3 146)
456 (define-public SDL_SCANCODE_LANG4 147)
457 (define-public SDL_SCANCODE_LANG5 148)
458 (define-public SDL_SCANCODE_LANG6 149)
459 (define-public SDL_SCANCODE_LANG7 150)
460 (define-public SDL_SCANCODE_LANG8 151)
461 (define-public SDL_SCANCODE_LANG9 152)
462 (define-public SDL_SCANCODE_ALTERASE 153)
463 (define-public SDL_SCANCODE_SYSREQ 154)
464 (define-public SDL_SCANCODE_CANCEL 155)
465 (define-public SDL_SCANCODE_CLEAR 156)
466 (define-public SDL_SCANCODE_PRIOR 157)
467 (define-public SDL_SCANCODE_RETURN2 158)
468 (define-public SDL_SCANCODE_SEPARATOR 159)
469 (define-public SDL_SCANCODE_OUT 160)
470 (define-public SDL_SCANCODE_OPER 161)
471 (define-public SDL_SCANCODE_CLEARAGAIN 162)
472 (define-public SDL_SCANCODE_CRSEL 163)
473 (define-public SDL_SCANCODE_EXSEL 164)
474 (define-public SDL_SCANCODE_KP_00 176)
475 (define-public SDL_SCANCODE_KP_000 177)
476 (define-public SDL_SCANCODE_THOUSANDSSEPARATOR 178)
477 (define-public SDL_SCANCODE_DECIMALSEPARATOR 179)
478 (define-public SDL_SCANCODE_CURRENCYUNIT 180)
479 (define-public SDL_SCANCODE_CURRENCYSUBUNIT 181)
480 (define-public SDL_SCANCODE_KP_LEFTPAREN 182)
481 (define-public SDL_SCANCODE_KP_RIGHTPAREN 183)
482 (define-public SDL_SCANCODE_KP_LEFTBRACE 184)
483 (define-public SDL_SCANCODE_KP_RIGHTBRACE 185)
484 (define-public SDL_SCANCODE_KP_TAB 186)
485 (define-public SDL_SCANCODE_KP_BACKSPACE 187)
486 (define-public SDL_SCANCODE_KP_A 188)
487 (define-public SDL_SCANCODE_KP_B 189)
488 (define-public SDL_SCANCODE_KP_C 190)
489 (define-public SDL_SCANCODE_KP_D 191)
490 (define-public SDL_SCANCODE_KP_E 192)
491 (define-public SDL_SCANCODE_KP_F 193)
492 (define-public SDL_SCANCODE_KP_XOR 194)
493 (define-public SDL_SCANCODE_KP_POWER 195)
494 (define-public SDL_SCANCODE_KP_PERCENT 196)
495 (define-public SDL_SCANCODE_KP_LESS 197)
496 (define-public SDL_SCANCODE_KP_GREATER 198)
497 (define-public SDL_SCANCODE_KP_AMPERSAND 199)
498 (define-public SDL_SCANCODE_KP_DBLAMPERSAND 200)
499 (define-public SDL_SCANCODE_KP_VERTICALBAR 201)
500 (define-public SDL_SCANCODE_KP_DBLVERTICALBAR 202)
501 (define-public SDL_SCANCODE_KP_COLON 203)
502 (define-public SDL_SCANCODE_KP_HASH 204)
503 (define-public SDL_SCANCODE_KP_SPACE 205)
504 (define-public SDL_SCANCODE_KP_AT 206)
505 (define-public SDL_SCANCODE_KP_EXCLAM 207)
506 (define-public SDL_SCANCODE_KP_MEMSTORE 208)
507 (define-public SDL_SCANCODE_KP_MEMRECALL 209)
508 (define-public SDL_SCANCODE_KP_MEMCLEAR 210)
509 (define-public SDL_SCANCODE_KP_MEMADD 211)
510 (define-public SDL_SCANCODE_KP_MEMSUBTRACT 212)
511 (define-public SDL_SCANCODE_KP_MEMMULTIPLY 213)
512 (define-public SDL_SCANCODE_KP_MEMDIVIDE 214)
513 (define-public SDL_SCANCODE_KP_PLUSMINUS 215)
514 (define-public SDL_SCANCODE_KP_CLEAR 216)
515 (define-public SDL_SCANCODE_KP_CLEARENTRY 217)
516 (define-public SDL_SCANCODE_KP_BINARY 218)
517 (define-public SDL_SCANCODE_KP_OCTAL 219)
518 (define-public SDL_SCANCODE_KP_DECIMAL 220)
519 (define-public SDL_SCANCODE_KP_HEXADECIMAL 221)
520 (define-public SDL_SCANCODE_LCTRL 224)
521 (define-public SDL_SCANCODE_LSHIFT 225)
522 (define-public SDL_SCANCODE_LALT 226)
523 (define-public SDL_SCANCODE_LGUI 227)
524 (define-public SDL_SCANCODE_RCTRL 228)
525 (define-public SDL_SCANCODE_RSHIFT 229)
526 (define-public SDL_SCANCODE_RALT 230)
527 (define-public SDL_SCANCODE_RGUI 231)
528 (define-public SDL_SCANCODE_MODE 257)
529 (define-public SDL_SCANCODE_AUDIONEXT 258)
530 (define-public SDL_SCANCODE_AUDIOPREV 259)
531 (define-public SDL_SCANCODE_AUDIOSTOP 260)
532 (define-public SDL_SCANCODE_AUDIOPLAY 261)
533 (define-public SDL_SCANCODE_AUDIOMUTE 262)
534 (define-public SDL_SCANCODE_MEDIASELECT 263)
535 (define-public SDL_SCANCODE_WWW 264)
536 (define-public SDL_SCANCODE_MAIL 265)
537 (define-public SDL_SCANCODE_CALCULATOR 266)
538 (define-public SDL_SCANCODE_COMPUTER 267)
539 (define-public SDL_SCANCODE_AC_SEARCH 268)
540 (define-public SDL_SCANCODE_AC_HOME 269)
541 (define-public SDL_SCANCODE_AC_BACK 270)
542 (define-public SDL_SCANCODE_AC_FORWARD 271)
543 (define-public SDL_SCANCODE_AC_STOP 272)
544 (define-public SDL_SCANCODE_AC_REFRESH 273)
545 (define-public SDL_SCANCODE_AC_BOOKMARKS 274)
546 (define-public SDL_SCANCODE_BRIGHTNESSDOWN 275)
547 (define-public SDL_SCANCODE_BRIGHTNESSUP 276)
548 (define-public SDL_SCANCODE_DISPLAYSWITCH 277)
549 (define-public SDL_SCANCODE_KBDILLUMTOGGLE 278)
550 (define-public SDL_SCANCODE_KBDILLUMDOWN 279)
551 (define-public SDL_SCANCODE_KBDILLUMUP 280)
552 (define-public SDL_SCANCODE_EJECT 281)
553 (define-public SDL_SCANCODE_SLEEP 282)
554 (define-public SDL_SCANCODE_APP1 283)
555 (define-public SDL_SCANCODE_APP2 284)
556 (define-public SDL_NUM_SCANCODES 512)
557
558 (define-public SDLK_UNKNOWN 0)
559 (define-public SDLK_RETURN 13)
560 (define-public SDLK_ESCAPE 27)
561 (define-public SDLK_BACKSPACE 8)
562 (define-public SDLK_TAB 9)
563 (define-public SDLK_SPACE 32)
564 (define-public SDLK_EXCLAIM 33)
565 (define-public SDLK_QUOTEDBL 34)
566 (define-public SDLK_HASH 35)
567 (define-public SDLK_PERCENT 37)
568 (define-public SDLK_DOLLAR 36)
569 (define-public SDLK_AMPERSAND 38)
570 (define-public SDLK_QUOTE 39)
571 (define-public SDLK_LEFTPAREN 40)
572 (define-public SDLK_RIGHTPAREN 41)
573 (define-public SDLK_ASTERISK 42)
574 (define-public SDLK_PLUS 43)
575 (define-public SDLK_COMMA 44)
576 (define-public SDLK_MINUS 45)
577 (define-public SDLK_PERIOD 46)
578 (define-public SDLK_SLASH 47)
579 (define-public SDLK_0 48)
580 (define-public SDLK_1 49)
581 (define-public SDLK_2 50)
582 (define-public SDLK_3 51)
583 (define-public SDLK_4 52)
584 (define-public SDLK_5 53)
585 (define-public SDLK_6 54)
586 (define-public SDLK_7 55)
587 (define-public SDLK_8 56)
588 (define-public SDLK_9 57)
589 (define-public SDLK_COLON 58)
590 (define-public SDLK_SEMICOLON 59)
591 (define-public SDLK_LESS 60)
592 (define-public SDLK_EQUALS 61)
593 (define-public SDLK_GREATER 62)
594 (define-public SDLK_QUESTION 63)
595 (define-public SDLK_AT 64)
596 (define-public SDLK_LEFTBRACKET 91)
597 (define-public SDLK_BACKSLASH 92)
598 (define-public SDLK_RIGHTBRACKET 93)
599 (define-public SDLK_CARET 94)
600 (define-public SDLK_UNDERSCORE 95)
601 (define-public SDLK_BACKQUOTE 96)
602 (define-public SDLK_a 97)
603 (define-public SDLK_b 98)
604 (define-public SDLK_c 99)
605 (define-public SDLK_d 100)
606 (define-public SDLK_e 101)
607 (define-public SDLK_f 102)
608 (define-public SDLK_g 103)
609 (define-public SDLK_h 104)
610 (define-public SDLK_i 105)
611 (define-public SDLK_j 106)
612 (define-public SDLK_k 107)
613 (define-public SDLK_l 108)
614 (define-public SDLK_m 109)
615 (define-public SDLK_n 110)
616 (define-public SDLK_o 111)
617 (define-public SDLK_p 112)
618 (define-public SDLK_q 113)
619 (define-public SDLK_r 114)
620 (define-public SDLK_s 115)
621 (define-public SDLK_t 116)
622 (define-public SDLK_u 117)
623 (define-public SDLK_v 118)
624 (define-public SDLK_w 119)
625 (define-public SDLK_x 120)
626 (define-public SDLK_y 121)
627 (define-public SDLK_z 122)
628 (define-public SDLK_CAPSLOCK (scancode->keycode SDL_SCANCODE_CAPSLOCK))
629 (define-public SDLK_F1 (scancode->keycode SDL_SCANCODE_F1))
630 (define-public SDLK_F2 (scancode->keycode SDL_SCANCODE_F2))
631 (define-public SDLK_F3 (scancode->keycode SDL_SCANCODE_F3))
632 (define-public SDLK_F4 (scancode->keycode SDL_SCANCODE_F4))
633 (define-public SDLK_F5 (scancode->keycode SDL_SCANCODE_F5))
634 (define-public SDLK_F6 (scancode->keycode SDL_SCANCODE_F6))
635 (define-public SDLK_F7 (scancode->keycode SDL_SCANCODE_F7))
636 (define-public SDLK_F8 (scancode->keycode SDL_SCANCODE_F8))
637 (define-public SDLK_F9 (scancode->keycode SDL_SCANCODE_F9))
638 (define-public SDLK_F10 (scancode->keycode SDL_SCANCODE_F10))
639 (define-public SDLK_F11 (scancode->keycode SDL_SCANCODE_F11))
640 (define-public SDLK_F12 (scancode->keycode SDL_SCANCODE_F12))
641 (define-public SDLK_PRINTSCREEN (scancode->keycode SDL_SCANCODE_PRINTSCREEN))
642 (define-public SDLK_SCROLLLOCK (scancode->keycode SDL_SCANCODE_SCROLLLOCK))
643 (define-public SDLK_PAUSE (scancode->keycode SDL_SCANCODE_PAUSE))
644 (define-public SDLK_INSERT (scancode->keycode SDL_SCANCODE_INSERT))
645 (define-public SDLK_HOME (scancode->keycode SDL_SCANCODE_HOME))
646 (define-public SDLK_PAGEUP (scancode->keycode SDL_SCANCODE_PAGEUP))
647 (define-public SDLK_DELETE 127)
648 (define-public SDLK_END (scancode->keycode SDL_SCANCODE_END))
649 (define-public SDLK_PAGEDOWN (scancode->keycode SDL_SCANCODE_PAGEDOWN))
650 (define-public SDLK_RIGHT (scancode->keycode SDL_SCANCODE_RIGHT))
651 (define-public SDLK_LEFT (scancode->keycode SDL_SCANCODE_LEFT))
652 (define-public SDLK_DOWN (scancode->keycode SDL_SCANCODE_DOWN))
653 (define-public SDLK_UP (scancode->keycode SDL_SCANCODE_UP))
654 (define-public SDLK_NUMLOCKCLEAR (scancode->keycode SDL_SCANCODE_NUMLOCKCLEAR))
655 (define-public SDLK_KP_DIVIDE (scancode->keycode SDL_SCANCODE_KP_DIVIDE))
656 (define-public SDLK_KP_MULTIPLY (scancode->keycode SDL_SCANCODE_KP_MULTIPLY))
657 (define-public SDLK_KP_MINUS (scancode->keycode SDL_SCANCODE_KP_MINUS))
658 (define-public SDLK_KP_PLUS (scancode->keycode SDL_SCANCODE_KP_PLUS))
659 (define-public SDLK_KP_ENTER (scancode->keycode SDL_SCANCODE_KP_ENTER))
660 (define-public SDLK_KP_1 (scancode->keycode SDL_SCANCODE_KP_1))
661 (define-public SDLK_KP_2 (scancode->keycode SDL_SCANCODE_KP_2))
662 (define-public SDLK_KP_3 (scancode->keycode SDL_SCANCODE_KP_3))
663 (define-public SDLK_KP_4 (scancode->keycode SDL_SCANCODE_KP_4))
664 (define-public SDLK_KP_5 (scancode->keycode SDL_SCANCODE_KP_5))
665 (define-public SDLK_KP_6 (scancode->keycode SDL_SCANCODE_KP_6))
666 (define-public SDLK_KP_7 (scancode->keycode SDL_SCANCODE_KP_7))
667 (define-public SDLK_KP_8 (scancode->keycode SDL_SCANCODE_KP_8))
668 (define-public SDLK_KP_9 (scancode->keycode SDL_SCANCODE_KP_9))
669 (define-public SDLK_KP_0 (scancode->keycode SDL_SCANCODE_KP_0))
670 (define-public SDLK_KP_PERIOD (scancode->keycode SDL_SCANCODE_KP_PERIOD))
671 (define-public SDLK_APPLICATION (scancode->keycode SDL_SCANCODE_APPLICATION))
672 (define-public SDLK_POWER (scancode->keycode SDL_SCANCODE_POWER))
673 (define-public SDLK_KP_EQUALS (scancode->keycode SDL_SCANCODE_KP_EQUALS))
674 (define-public SDLK_F13 (scancode->keycode SDL_SCANCODE_F13))
675 (define-public SDLK_F14 (scancode->keycode SDL_SCANCODE_F14))
676 (define-public SDLK_F15 (scancode->keycode SDL_SCANCODE_F15))
677 (define-public SDLK_F16 (scancode->keycode SDL_SCANCODE_F16))
678 (define-public SDLK_F17 (scancode->keycode SDL_SCANCODE_F17))
679 (define-public SDLK_F18 (scancode->keycode SDL_SCANCODE_F18))
680 (define-public SDLK_F19 (scancode->keycode SDL_SCANCODE_F19))
681 (define-public SDLK_F20 (scancode->keycode SDL_SCANCODE_F20))
682 (define-public SDLK_F21 (scancode->keycode SDL_SCANCODE_F21))
683 (define-public SDLK_F22 (scancode->keycode SDL_SCANCODE_F22))
684 (define-public SDLK_F23 (scancode->keycode SDL_SCANCODE_F23))
685 (define-public SDLK_F24 (scancode->keycode SDL_SCANCODE_F24))
686 (define-public SDLK_EXECUTE (scancode->keycode SDL_SCANCODE_EXECUTE))
687 (define-public SDLK_HELP (scancode->keycode SDL_SCANCODE_HELP))
688 (define-public SDLK_MENU (scancode->keycode SDL_SCANCODE_MENU))
689 (define-public SDLK_SELECT (scancode->keycode SDL_SCANCODE_SELECT))
690 (define-public SDLK_STOP (scancode->keycode SDL_SCANCODE_STOP))
691 (define-public SDLK_AGAIN (scancode->keycode SDL_SCANCODE_AGAIN))
692 (define-public SDLK_UNDO (scancode->keycode SDL_SCANCODE_UNDO))
693 (define-public SDLK_CUT (scancode->keycode SDL_SCANCODE_CUT))
694 (define-public SDLK_COPY (scancode->keycode SDL_SCANCODE_COPY))
695 (define-public SDLK_PASTE (scancode->keycode SDL_SCANCODE_PASTE))
696 (define-public SDLK_FIND (scancode->keycode SDL_SCANCODE_FIND))
697 (define-public SDLK_MUTE (scancode->keycode SDL_SCANCODE_MUTE))
698 (define-public SDLK_VOLUMEUP (scancode->keycode SDL_SCANCODE_VOLUMEUP))
699 (define-public SDLK_VOLUMEDOWN (scancode->keycode SDL_SCANCODE_VOLUMEDOWN))
700 (define-public SDLK_KP_COMMA (scancode->keycode SDL_SCANCODE_KP_COMMA))
701 (define-public SDLK_KP_EQUALSAS400
702 (scancode->keycode SDL_SCANCODE_KP_EQUALSAS400))
703 (define-public SDLK_ALTERASE (scancode->keycode SDL_SCANCODE_ALTERASE))
704 (define-public SDLK_SYSREQ (scancode->keycode SDL_SCANCODE_SYSREQ))
705 (define-public SDLK_CANCEL (scancode->keycode SDL_SCANCODE_CANCEL))
706 (define-public SDLK_CLEAR (scancode->keycode SDL_SCANCODE_CLEAR))
707 (define-public SDLK_PRIOR (scancode->keycode SDL_SCANCODE_PRIOR))
708 (define-public SDLK_RETURN2 (scancode->keycode SDL_SCANCODE_RETURN2))
709 (define-public SDLK_SEPARATOR (scancode->keycode SDL_SCANCODE_SEPARATOR))
710 (define-public SDLK_OUT (scancode->keycode SDL_SCANCODE_OUT))
711 (define-public SDLK_OPER (scancode->keycode SDL_SCANCODE_OPER))
712 (define-public SDLK_CLEARAGAIN (scancode->keycode SDL_SCANCODE_CLEARAGAIN))
713 (define-public SDLK_CRSEL (scancode->keycode SDL_SCANCODE_CRSEL))
714 (define-public SDLK_EXSEL (scancode->keycode SDL_SCANCODE_EXSEL))
715 (define-public SDLK_KP_00 (scancode->keycode SDL_SCANCODE_KP_00))
716 (define-public SDLK_KP_000 (scancode->keycode SDL_SCANCODE_KP_000))
717 (define-public SDLK_THOUSANDSSEPARATOR
718 (scancode->keycode SDL_SCANCODE_THOUSANDSSEPARATOR))
719 (define-public SDLK_DECIMALSEPARATOR
720 (scancode->keycode SDL_SCANCODE_DECIMALSEPARATOR))
721 (define-public SDLK_CURRENCYUNIT (scancode->keycode SDL_SCANCODE_CURRENCYUNIT))
722 (define-public SDLK_CURRENCYSUBUNIT
723 (scancode->keycode SDL_SCANCODE_CURRENCYSUBUNIT))
724 (define-public SDLK_KP_LEFTPAREN (scancode->keycode SDL_SCANCODE_KP_LEFTPAREN))
725 (define-public SDLK_KP_RIGHTPAREN
726 (scancode->keycode SDL_SCANCODE_KP_RIGHTPAREN))
727 (define-public SDLK_KP_LEFTBRACE (scancode->keycode SDL_SCANCODE_KP_LEFTBRACE))
728 (define-public SDLK_KP_RIGHTBRACE (scancode->keycode SDL_SCANCODE_KP_RIGHTBRACE))
729 (define-public SDLK_KP_TAB (scancode->keycode SDL_SCANCODE_KP_TAB))
730 (define-public SDLK_KP_BACKSPACE (scancode->keycode SDL_SCANCODE_KP_BACKSPACE))
731 (define-public SDLK_KP_A (scancode->keycode SDL_SCANCODE_KP_A))
732 (define-public SDLK_KP_B (scancode->keycode SDL_SCANCODE_KP_B))
733 (define-public SDLK_KP_C (scancode->keycode SDL_SCANCODE_KP_C))
734 (define-public SDLK_KP_D (scancode->keycode SDL_SCANCODE_KP_D))
735 (define-public SDLK_KP_E (scancode->keycode SDL_SCANCODE_KP_E))
736 (define-public SDLK_KP_F (scancode->keycode SDL_SCANCODE_KP_F))
737 (define-public SDLK_KP_XOR (scancode->keycode SDL_SCANCODE_KP_XOR))
738 (define-public SDLK_KP_POWER (scancode->keycode SDL_SCANCODE_KP_POWER))
739 (define-public SDLK_KP_PERCENT (scancode->keycode SDL_SCANCODE_KP_PERCENT))
740 (define-public SDLK_KP_LESS (scancode->keycode SDL_SCANCODE_KP_LESS))
741 (define-public SDLK_KP_GREATER (scancode->keycode SDL_SCANCODE_KP_GREATER))
742 (define-public SDLK_KP_AMPERSAND (scancode->keycode SDL_SCANCODE_KP_AMPERSAND))
743 (define-public SDLK_KP_DBLAMPERSAND
744 (scancode->keycode SDL_SCANCODE_KP_DBLAMPERSAND))
745 (define-public SDLK_KP_VERTICALBAR
746 (scancode->keycode SDL_SCANCODE_KP_VERTICALBAR))
747 (define-public SDLK_KP_DBLVERTICALBAR
748 (scancode->keycode SDL_SCANCODE_KP_DBLVERTICALBAR))
749 (define-public SDLK_KP_COLON (scancode->keycode SDL_SCANCODE_KP_COLON))
750 (define-public SDLK_KP_HASH (scancode->keycode SDL_SCANCODE_KP_HASH))
751 (define-public SDLK_KP_SPACE (scancode->keycode SDL_SCANCODE_KP_SPACE))
752 (define-public SDLK_KP_AT (scancode->keycode SDL_SCANCODE_KP_AT))
753 (define-public SDLK_KP_EXCLAM (scancode->keycode SDL_SCANCODE_KP_EXCLAM))
754 (define-public SDLK_KP_MEMSTORE (scancode->keycode SDL_SCANCODE_KP_MEMSTORE))
755 (define-public SDLK_KP_MEMRECALL (scancode->keycode SDL_SCANCODE_KP_MEMRECALL))
756 (define-public SDLK_KP_MEMCLEAR (scancode->keycode SDL_SCANCODE_KP_MEMCLEAR))
757 (define-public SDLK_KP_MEMADD (scancode->keycode SDL_SCANCODE_KP_MEMADD))
758 (define-public SDLK_KP_MEMSUBTRACT
759 (scancode->keycode SDL_SCANCODE_KP_MEMSUBTRACT))
760 (define-public SDLK_KP_MEMMULTIPLY
761 (scancode->keycode SDL_SCANCODE_KP_MEMMULTIPLY))
762 (define-public SDLK_KP_MEMDIVIDE (scancode->keycode SDL_SCANCODE_KP_MEMDIVIDE))
763 (define-public SDLK_KP_PLUSMINUS (scancode->keycode SDL_SCANCODE_KP_PLUSMINUS))
764 (define-public SDLK_KP_CLEAR (scancode->keycode SDL_SCANCODE_KP_CLEAR))
765 (define-public SDLK_KP_CLEARENTRY (scancode->keycode SDL_SCANCODE_KP_CLEARENTRY))
766 (define-public SDLK_KP_BINARY (scancode->keycode SDL_SCANCODE_KP_BINARY))
767 (define-public SDLK_KP_OCTAL (scancode->keycode SDL_SCANCODE_KP_OCTAL))
768 (define-public SDLK_KP_DECIMAL (scancode->keycode SDL_SCANCODE_KP_DECIMAL))
769 (define-public SDLK_KP_HEXADECIMAL
770 (scancode->keycode SDL_SCANCODE_KP_HEXADECIMAL))
771 (define-public SDLK_LCTRL (scancode->keycode SDL_SCANCODE_LCTRL))
772 (define-public SDLK_LSHIFT (scancode->keycode SDL_SCANCODE_LSHIFT))
773 (define-public SDLK_LALT (scancode->keycode SDL_SCANCODE_LALT))
774 (define-public SDLK_LGUI (scancode->keycode SDL_SCANCODE_LGUI))
775 (define-public SDLK_RCTRL (scancode->keycode SDL_SCANCODE_RCTRL))
776 (define-public SDLK_RSHIFT (scancode->keycode SDL_SCANCODE_RSHIFT))
777 (define-public SDLK_RALT (scancode->keycode SDL_SCANCODE_RALT))
778 (define-public SDLK_RGUI (scancode->keycode SDL_SCANCODE_RGUI))
779 (define-public SDLK_MODE (scancode->keycode SDL_SCANCODE_MODE))
780 (define-public SDLK_AUDIONEXT (scancode->keycode SDL_SCANCODE_AUDIONEXT))
781 (define-public SDLK_AUDIOPREV (scancode->keycode SDL_SCANCODE_AUDIOPREV))
782 (define-public SDLK_AUDIOSTOP (scancode->keycode SDL_SCANCODE_AUDIOSTOP))
783 (define-public SDLK_AUDIOPLAY (scancode->keycode SDL_SCANCODE_AUDIOPLAY))
784 (define-public SDLK_AUDIOMUTE (scancode->keycode SDL_SCANCODE_AUDIOMUTE))
785 (define-public SDLK_MEDIASELECT (scancode->keycode SDL_SCANCODE_MEDIASELECT))
786 (define-public SDLK_WWW (scancode->keycode SDL_SCANCODE_WWW))
787 (define-public SDLK_MAIL (scancode->keycode SDL_SCANCODE_MAIL))
788 (define-public SDLK_CALCULATOR (scancode->keycode SDL_SCANCODE_CALCULATOR))
789 (define-public SDLK_COMPUTER (scancode->keycode SDL_SCANCODE_COMPUTER))
790 (define-public SDLK_AC_SEARCH (scancode->keycode SDL_SCANCODE_AC_SEARCH))
791 (define-public SDLK_AC_HOME (scancode->keycode SDL_SCANCODE_AC_HOME))
792 (define-public SDLK_AC_BACK (scancode->keycode SDL_SCANCODE_AC_BACK))
793 (define-public SDLK_AC_FORWARD (scancode->keycode SDL_SCANCODE_AC_FORWARD))
794 (define-public SDLK_AC_STOP (scancode->keycode SDL_SCANCODE_AC_STOP))
795 (define-public SDLK_AC_REFRESH (scancode->keycode SDL_SCANCODE_AC_REFRESH))
796 (define-public SDLK_AC_BOOKMARKS (scancode->keycode SDL_SCANCODE_AC_BOOKMARKS))
797 (define-public SDLK_BRIGHTNESSDOWN
798 (scancode->keycode SDL_SCANCODE_BRIGHTNESSDOWN))
799 (define-public SDLK_BRIGHTNESSUP (scancode->keycode SDL_SCANCODE_BRIGHTNESSUP))
800 (define-public SDLK_DISPLAYSWITCH (scancode->keycode SDL_SCANCODE_DISPLAYSWITCH))
801 (define-public SDLK_KBDILLUMTOGGLE
802 (scancode->keycode SDL_SCANCODE_KBDILLUMTOGGLE))
803 (define-public SDLK_KBDILLUMDOWN (scancode->keycode SDL_SCANCODE_KBDILLUMDOWN))
804 (define-public SDLK_KBDILLUMUP (scancode->keycode SDL_SCANCODE_KBDILLUMUP))
805 (define-public SDLK_EJECT (scancode->keycode SDL_SCANCODE_EJECT))
806 (define-public SDLK_SLEEP (scancode->keycode SDL_SCANCODE_SLEEP))
807
808 \f
809 ;;;
810 ;;; Mouse
811 ;;;
812
813 (define-public SDL_BUTTON_LEFT 1)
814 (define-public SDL_BUTTON_MIDDLE 2)
815 (define-public SDL_BUTTON_RIGHT 3)
816 (define-public SDL_BUTTON_X1 4)
817 (define-public SDL_BUTTON_X2 5)
818
819 \f
820 ;;;
821 ;;; Timer
822 ;;;
823
824 (define-foreign sdl-get-ticks
825 uint32 "SDL_GetTicks" '())
826
827 \f
828 ;;;
829 ;;; File I/O
830 ;;;
831
832 (define-foreign sdl-rw-from-file
833 '* "SDL_RWFromFile" (list '* '*))
834
835 \f
836 ;;;
837 ;;; Surface
838 ;;;
839
840 (define-foreign sdl-free-surface
841 void "SDL_FreeSurface" '(*))
842
843 (define-foreign sdl-load-bmp-rw
844 '* "SDL_LoadBMP_RW" (list '* int))