Artifact
0f51d0dd85009faa4feca07353b18b0e74bfda25:
- File
sdl2/events-types.ss
— part of check-in
[b358a80757]
at
2016-09-04 14:50:46
on branch trunk
— added missing file changes
(user:
aldo
size: 15456)
0000: 3b 3b 0a 3b 3b 20 43 6f 70 79 72 69 67 68 74 20 ;;.;; Copyright
0010: 32 30 31 36 20 41 6c 64 6f 20 4e 69 63 6f 6c 61 2016 Aldo Nicola
0020: 73 20 42 72 75 6e 6f 0a 3b 3b 0a 3b 3b 20 4c 69 s Bruno.;;.;; Li
0030: 63 65 6e 73 65 64 20 75 6e 64 65 72 20 74 68 65 censed under the
0040: 20 41 70 61 63 68 65 20 4c 69 63 65 6e 73 65 2c Apache License,
0050: 20 56 65 72 73 69 6f 6e 20 32 2e 30 20 28 74 68 Version 2.0 (th
0060: 65 20 22 4c 69 63 65 6e 73 65 22 29 3b 0a 3b 3b e "License");.;;
0070: 20 79 6f 75 20 6d 61 79 20 6e 6f 74 20 75 73 65 you may not use
0080: 20 74 68 69 73 20 66 69 6c 65 20 65 78 63 65 70 this file excep
0090: 74 20 69 6e 20 63 6f 6d 70 6c 69 61 6e 63 65 20 t in compliance
00a0: 77 69 74 68 20 74 68 65 20 4c 69 63 65 6e 73 65 with the License
00b0: 2e 0a 3b 3b 20 59 6f 75 20 6d 61 79 20 6f 62 74 ..;; You may obt
00c0: 61 69 6e 20 61 20 63 6f 70 79 20 6f 66 20 74 68 ain a copy of th
00d0: 65 20 4c 69 63 65 6e 73 65 20 61 74 0a 3b 3b 0a e License at.;;.
00e0: 3b 3b 20 20 20 20 20 68 74 74 70 3a 2f 2f 77 77 ;; http://ww
00f0: 77 2e 61 70 61 63 68 65 2e 6f 72 67 2f 6c 69 63 w.apache.org/lic
0100: 65 6e 73 65 73 2f 4c 49 43 45 4e 53 45 2d 32 2e enses/LICENSE-2.
0110: 30 0a 3b 3b 0a 3b 3b 20 55 6e 6c 65 73 73 20 72 0.;;.;; Unless r
0120: 65 71 75 69 72 65 64 20 62 79 20 61 70 70 6c 69 equired by appli
0130: 63 61 62 6c 65 20 6c 61 77 20 6f 72 20 61 67 72 cable law or agr
0140: 65 65 64 20 74 6f 20 69 6e 20 77 72 69 74 69 6e eed to in writin
0150: 67 2c 20 73 6f 66 74 77 61 72 65 0a 3b 3b 20 64 g, software.;; d
0160: 69 73 74 72 69 62 75 74 65 64 20 75 6e 64 65 72 istributed under
0170: 20 74 68 65 20 4c 69 63 65 6e 73 65 20 69 73 20 the License is
0180: 64 69 73 74 72 69 62 75 74 65 64 20 6f 6e 20 61 distributed on a
0190: 6e 20 22 41 53 20 49 53 22 20 42 41 53 49 53 2c n "AS IS" BASIS,
01a0: 0a 3b 3b 20 57 49 54 48 4f 55 54 20 57 41 52 52 .;; WITHOUT WARR
01b0: 41 4e 54 49 45 53 20 4f 52 20 43 4f 4e 44 49 54 ANTIES OR CONDIT
01c0: 49 4f 4e 53 20 4f 46 20 41 4e 59 20 4b 49 4e 44 IONS OF ANY KIND
01d0: 2c 20 65 69 74 68 65 72 20 65 78 70 72 65 73 73 , either express
01e0: 20 6f 72 20 69 6d 70 6c 69 65 64 2e 0a 3b 3b 20 or implied..;;
01f0: 53 65 65 20 74 68 65 20 4c 69 63 65 6e 73 65 20 See the License
0200: 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 63 for the specific
0210: 20 6c 61 6e 67 75 61 67 65 20 67 6f 76 65 72 6e language govern
0220: 69 6e 67 20 70 65 72 6d 69 73 73 69 6f 6e 73 20 ing permissions
0230: 61 6e 64 0a 3b 3b 20 6c 69 6d 69 74 61 74 69 6f and.;; limitatio
0240: 6e 73 20 75 6e 64 65 72 20 74 68 65 20 4c 69 63 ns under the Lic
0250: 65 6e 73 65 2e 0a 0a 28 64 65 66 69 6e 65 2d 66 ense...(define-f
0260: 6c 61 67 73 20 73 64 6c 2d 65 76 65 6e 74 2d 74 lags sdl-event-t
0270: 79 70 65 0a 20 20 20 20 28 66 69 72 73 74 65 76 ype. (firstev
0280: 65 6e 74 20 20 20 20 20 20 20 30 20 29 20 3b 20 ent 0 ) ;
0290: 20 20 20 20 2f 2a 2a 3c 20 75 6e 75 73 65 64 20 /**< unused
02a0: 28 64 6f 20 6e 6f 74 20 72 65 6d 6f 76 65 29 20 (do not remove)
02b0: 2a 2f 0a 0a 20 20 20 20 3b 2f 2a 20 61 70 70 6c */.. ;/* appl
02c0: 69 63 61 74 69 6f 6e 20 65 76 65 6e 74 73 20 2a ication events *
02d0: 2f 0a 20 20 20 20 28 71 75 69 74 20 20 20 20 20 /. (quit
02e0: 20 20 20 20 20 20 20 20 23 78 31 30 30 29 20 3b #x100) ;
02f0: 20 2f 2a 2a 3c 20 75 73 65 72 2d 72 65 71 75 65 /**< user-reque
0300: 73 74 65 64 20 71 75 69 74 20 2a 2f 0a 0a 20 20 sted quit */..
0310: 20 20 3b 2f 2a 20 74 68 65 73 65 20 61 70 70 6c ;/* these appl
0320: 69 63 61 74 69 6f 6e 20 65 76 65 6e 74 73 20 68 ication events h
0330: 61 76 65 20 73 70 65 63 69 61 6c 20 6d 65 61 6e ave special mean
0340: 69 6e 67 20 6f 6e 20 69 6f 73 2c 20 73 65 65 20 ing on ios, see
0350: 72 65 61 64 6d 65 2d 69 6f 73 2e 74 78 74 20 66 readme-ios.txt f
0360: 6f 72 20 64 65 74 61 69 6c 73 20 2a 2f 0a 20 20 or details */.
0370: 20 20 28 61 70 70 2d 74 65 72 6d 69 6e 61 74 69 (app-terminati
0380: 6e 67 20 20 20 23 78 31 30 31 29 3b 20 20 20 20 ng #x101);
0390: 20 20 20 20 2f 2a 2a 3c 20 74 68 65 20 61 70 70 /**< the app
03a0: 6c 69 63 61 74 69 6f 6e 20 69 73 20 62 65 69 6e lication is bein
03b0: 67 20 74 65 72 6d 69 6e 61 74 65 64 20 62 79 20 g terminated by
03c0: 74 68 65 20 6f 73 0a 20 20 20 20 20 20 20 20 20 the os.
03d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
03e0: 20 20 20 20 20 20 20 20 3b 20 20 20 20 63 61 6c ; cal
03f0: 6c 65 64 20 6f 6e 20 69 6f 73 20 69 6e 20 61 70 led on ios in ap
0400: 70 6c 69 63 61 74 69 6f 6e 77 69 6c 6c 74 65 72 plicationwillter
0410: 6d 69 6e 61 74 65 28 29 0a 20 20 20 20 20 20 20 minate().
0420: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0430: 20 20 20 20 20 20 20 20 20 20 3b 20 20 20 20 63 ; c
0440: 61 6c 6c 65 64 20 6f 6e 20 61 6e 64 72 6f 69 64 alled on android
0450: 20 69 6e 20 6f 6e 64 65 73 74 72 6f 79 28 29 0a in ondestroy().
0460: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0470: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0480: 0a 20 20 20 20 28 61 70 70 2d 6c 6f 77 6d 65 6d . (app-lowmem
0490: 6f 72 79 20 20 20 23 78 31 30 32 29 20 3b 2c 20 ory #x102) ;,
04a0: 20 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 74 68 /**< th
04b0: 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 69 73 e application is
04c0: 20 6c 6f 77 20 6f 6e 20 6d 65 6d 6f 72 79 2c 20 low on memory,
04d0: 66 72 65 65 20 6d 65 6d 6f 72 79 20 69 66 20 70 free memory if p
04e0: 6f 73 73 69 62 6c 65 2e 0a 20 20 20 20 20 20 20 ossible..
04f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0500: 20 20 20 20 20 20 20 20 20 20 3b 20 20 20 20 63 ; c
0510: 61 6c 6c 65 64 20 6f 6e 20 69 6f 73 20 69 6e 20 alled on ios in
0520: 61 70 70 6c 69 63 61 74 69 6f 6e 64 69 64 72 65 applicationdidre
0530: 63 65 69 76 65 6d 65 6d 6f 72 79 77 61 72 6e 69 ceivememorywarni
0540: 6e 67 28 29 0a 20 20 20 20 20 20 20 20 20 20 20 ng().
0550: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0560: 20 20 20 20 20 20 3b 20 20 20 20 63 61 6c 6c 65 ; calle
0570: 64 20 6f 6e 20 61 6e 64 72 6f 69 64 20 69 6e 20 d on android in
0580: 6f 6e 6c 6f 77 6d 65 6d 6f 72 79 28 29 0a 20 20 onlowmemory().
0590: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
05a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 .
05b0: 20 20 20 28 61 70 70 2d 77 69 6c 6c 65 6e 74 65 (app-willente
05c0: 72 62 61 63 6b 67 72 6f 75 6e 64 20 20 20 23 78 rbackground #x
05d0: 31 30 33 29 20 3b 2c 20 20 2f 2a 2a 3c 20 74 68 103) ;, /**< th
05e0: 65 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 69 73 e application is
05f0: 20 61 62 6f 75 74 20 74 6f 20 65 6e 74 65 72 20 about to enter
0600: 74 68 65 20 62 61 63 6b 67 72 6f 75 6e 64 0a 20 the background.
0610: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0620: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0630: 20 20 20 3b 20 63 61 6c 6c 65 64 20 6f 6e 20 69 ; called on i
0640: 6f 73 20 69 6e 20 61 70 70 6c 69 63 61 74 69 6f os in applicatio
0650: 6e 77 69 6c 6c 72 65 73 69 67 6e 61 63 74 69 76 nwillresignactiv
0660: 65 28 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 e().
0670: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0680: 20 20 20 20 20 20 20 20 3b 20 63 61 6c 6c 65 64 ; called
0690: 20 6f 6e 20 61 6e 64 72 6f 69 64 20 69 6e 20 6f on android in o
06a0: 6e 70 61 75 73 65 28 29 0a 20 20 20 20 20 20 20 npause().
06b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
06c0: 20 20 20 20 20 20 20 20 20 20 0a 20 20 20 20 28 . (
06d0: 61 70 70 2d 64 69 64 65 6e 74 65 72 62 61 63 6b app-didenterback
06e0: 67 72 6f 75 6e 64 20 20 20 23 78 31 30 34 29 20 ground #x104)
06f0: 3b 2f 2a 2a 3c 20 74 68 65 20 61 70 70 6c 69 63 ;/**< the applic
0700: 61 74 69 6f 6e 20 64 69 64 20 65 6e 74 65 72 20 ation did enter
0710: 74 68 65 20 62 61 63 6b 67 72 6f 75 6e 64 20 61 the background a
0720: 6e 64 20 6d 61 79 20 6e 6f 74 20 67 65 74 20 63 nd may not get c
0730: 70 75 20 66 6f 72 20 73 6f 6d 65 20 74 69 6d 65 pu for some time
0740: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .
0750: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0760: 20 20 20 20 20 20 3b 63 61 6c 6c 65 64 20 6f 6e ;called on
0770: 20 69 6f 73 20 69 6e 20 61 70 70 6c 69 63 61 74 ios in applicat
0780: 69 6f 6e 64 69 64 65 6e 74 65 72 62 61 63 6b 67 iondidenterbackg
0790: 72 6f 75 6e 64 28 29 0a 20 20 20 20 20 20 20 20 round().
07a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
07b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 63 61 ;ca
07c0: 6c 6c 65 64 20 6f 6e 20 61 6e 64 72 6f 69 64 20 lled on android
07d0: 69 6e 20 6f 6e 70 61 75 73 65 28 29 0a 20 20 20 in onpause().
07e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
07f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 20 .
0800: 20 20 28 61 70 70 2d 77 69 6c 6c 65 6e 74 65 72 (app-willenter
0810: 66 6f 72 65 67 72 6f 75 6e 64 20 20 20 23 78 31 foreground #x1
0820: 30 35 29 20 3b 2f 2a 2a 3c 20 74 68 65 20 61 70 05) ;/**< the ap
0830: 70 6c 69 63 61 74 69 6f 6e 20 69 73 20 61 62 6f plication is abo
0840: 75 74 20 74 6f 20 65 6e 74 65 72 20 74 68 65 20 ut to enter the
0850: 66 6f 72 65 67 72 6f 75 6e 64 0a 20 20 20 20 20 foreground.
0860: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0870: 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 20 20 ;
0880: 20 63 61 6c 6c 65 64 20 6f 6e 20 69 6f 73 20 69 called on ios i
0890: 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 77 69 6c n applicationwil
08a0: 6c 65 6e 74 65 72 66 6f 72 65 67 72 6f 75 6e 64 lenterforeground
08b0: 28 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 ().
08c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
08d0: 20 20 20 20 3b 20 20 20 20 63 61 6c 6c 65 64 20 ; called
08e0: 6f 6e 20 61 6e 64 72 6f 69 64 20 69 6e 20 6f 6e on android in on
08f0: 72 65 73 75 6d 65 28 29 0a 20 20 20 20 20 20 20 resume().
0900: 20 0a 20 20 20 20 28 61 70 70 2d 64 69 64 65 6e . (app-diden
0910: 74 65 72 66 6f 72 65 67 72 6f 75 6e 64 20 20 20 terforeground
0920: 23 78 31 30 36 29 3b 20 2f 2a 2a 3c 20 74 68 65 #x106); /**< the
0930: 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 69 73 20 application is
0940: 6e 6f 77 20 69 6e 74 65 72 61 63 74 69 76 65 0a now interactive.
0950: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0960: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0970: 20 20 20 20 20 3b 63 61 6c 6c 65 64 20 6f 6e 20 ;called on
0980: 69 6f 73 20 69 6e 20 61 70 70 6c 69 63 61 74 69 ios in applicati
0990: 6f 6e 64 69 64 62 65 63 6f 6d 65 61 63 74 69 76 ondidbecomeactiv
09a0: 65 28 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 e().
09b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
09c0: 20 20 20 20 20 20 20 20 20 3b 63 61 6c 6c 65 64 ;called
09d0: 20 6f 6e 20 61 6e 64 72 6f 69 64 20 69 6e 20 6f on android in o
09e0: 6e 72 65 73 75 6d 65 28 29 0a 20 20 20 20 20 20 nresume().
09f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0a00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b ;
0a10: 2a 2f 0a 0a 20 20 20 3b 20 20 20 2f 2a 20 77 69 */.. ; /* wi
0a20: 6e 64 6f 77 20 65 76 65 6e 74 73 20 2a 2f 0a 20 ndow events */.
0a30: 20 20 20 28 77 69 6e 64 6f 77 65 76 65 6e 74 20 (windowevent
0a40: 20 20 20 20 20 23 78 32 30 30 29 3b 20 2f 2a 2a #x200); /**
0a50: 3c 20 77 69 6e 64 6f 77 20 73 74 61 74 65 20 63 < window state c
0a60: 68 61 6e 67 65 20 2a 2f 0a 20 20 20 20 28 73 79 hange */. (sy
0a70: 73 77 6d 65 76 65 6e 74 20 20 20 20 20 20 20 23 swmevent #
0a80: 78 32 30 31 29 3b 20 2f 2a 2a 3c 20 73 79 73 74 x201); /**< syst
0a90: 65 6d 20 73 70 65 63 69 66 69 63 20 65 76 65 6e em specific even
0aa0: 74 20 2a 2f 0a 0a 20 20 20 20 3b 2f 2a 20 6b 65 t */.. ;/* ke
0ab0: 79 62 6f 61 72 64 20 65 76 65 6e 74 73 20 2a 2f yboard events */
0ac0: 0a 20 20 20 20 28 6b 65 79 64 6f 77 6e 20 20 20 . (keydown
0ad0: 20 20 20 20 20 20 20 23 78 33 30 30 29 3b 20 2f #x300); /
0ae0: 2a 2a 3c 20 6b 65 79 20 70 72 65 73 73 65 64 20 **< key pressed
0af0: 2a 2f 0a 20 20 20 20 28 6b 65 79 75 70 20 20 20 */. (keyup
0b00: 20 20 20 20 20 20 20 20 20 23 78 33 30 31 29 3b #x301);
0b10: 20 2f 2a 2a 3c 20 6b 65 79 20 72 65 6c 65 61 73 /**< key releas
0b20: 65 64 20 2a 2f 0a 20 20 20 20 28 74 65 78 74 65 ed */. (texte
0b30: 64 69 74 69 6e 67 20 20 20 20 20 20 23 78 33 30 diting #x30
0b40: 32 29 3b 20 2f 2a 2a 3c 20 6b 65 79 62 6f 61 72 2); /**< keyboar
0b50: 64 20 74 65 78 74 20 65 64 69 74 69 6e 67 20 28 d text editing (
0b60: 63 6f 6d 70 6f 73 69 74 69 6f 6e 29 20 2a 2f 0a composition) */.
0b70: 20 20 20 20 28 74 65 78 74 69 6e 70 75 74 20 20 (textinput
0b80: 20 20 20 20 20 20 23 78 33 30 33 29 3b 20 2f 2a #x303); /*
0b90: 2a 3c 20 6b 65 79 62 6f 61 72 64 20 74 65 78 74 *< keyboard text
0ba0: 20 69 6e 70 75 74 20 2a 2f 0a 0a 20 20 20 20 3b input */.. ;
0bb0: 2a 20 6d 6f 75 73 65 20 65 76 65 6e 74 73 20 2a * mouse events *
0bc0: 2f 0a 20 20 20 28 6d 6f 75 73 65 6d 6f 74 69 6f /. (mousemotio
0bd0: 6e 20 20 20 20 20 20 20 23 78 34 30 30 29 3b 2f n #x400);/
0be0: 2a 2a 3c 20 6d 6f 75 73 65 20 6d 6f 76 65 64 20 **< mouse moved
0bf0: 2a 2f 0a 20 20 20 28 6d 6f 75 73 65 62 75 74 74 */. (mousebutt
0c00: 6f 6e 64 6f 77 6e 20 20 20 23 78 34 30 31 29 3b ondown #x401);
0c10: 2a 2a 3c 20 6d 6f 75 73 65 20 62 75 74 74 6f 6e **< mouse button
0c20: 20 70 72 65 73 73 65 64 20 2a 2f 0a 20 20 20 28 pressed */. (
0c30: 6d 6f 75 73 65 62 75 74 74 6f 6e 75 70 20 20 20 mousebuttonup
0c40: 20 20 23 78 34 30 32 29 3b 2a 2a 3c 20 6d 6f 75 #x402);**< mou
0c50: 73 65 20 62 75 74 74 6f 6e 20 72 65 6c 65 61 73 se button releas
0c60: 65 64 20 2a 2f 0a 20 20 20 28 6d 6f 75 73 65 77 ed */. (mousew
0c70: 68 65 65 6c 20 20 20 20 20 20 20 20 23 78 34 30 heel #x40
0c80: 33 29 3b 2a 2a 3c 20 6d 6f 75 73 65 20 77 68 65 3);**< mouse whe
0c90: 65 6c 20 6d 6f 74 69 6f 6e 20 2a 2f 0a 0a 20 20 el motion */..
0ca0: 20 20 3b 2a 20 6a 6f 79 73 74 69 63 6b 20 65 76 ;* joystick ev
0cb0: 65 6e 74 73 20 2a 2f 0a 20 20 20 28 6a 6f 79 61 ents */. (joya
0cc0: 78 69 73 6d 6f 74 69 6f 6e 20 20 20 20 23 78 36 xismotion #x6
0cd0: 30 30 29 3b 2f 2a 2a 3c 20 6a 6f 79 73 74 69 63 00);/**< joystic
0ce0: 6b 20 61 78 69 73 20 6d 6f 74 69 6f 6e 20 2a 2f k axis motion */
0cf0: 0a 20 20 20 28 6a 6f 79 62 61 6c 6c 6d 6f 74 69 . (joyballmoti
0d00: 6f 6e 20 20 20 20 23 78 36 30 31 29 3b 2f 2a 2a on #x601);/**
0d10: 3c 20 6a 6f 79 73 74 69 63 6b 20 74 72 61 63 6b < joystick track
0d20: 62 61 6c 6c 20 6d 6f 74 69 6f 6e 20 2a 2f 0a 20 ball motion */.
0d30: 20 20 28 6a 6f 79 68 61 74 6d 6f 74 69 6f 6e 20 (joyhatmotion
0d40: 20 20 20 20 23 78 36 30 32 29 3b 2f 2a 2a 3c 20 #x602);/**<
0d50: 6a 6f 79 73 74 69 63 6b 20 68 61 74 20 70 6f 73 joystick hat pos
0d60: 69 74 69 6f 6e 20 63 68 61 6e 67 65 20 2a 2f 0a ition change */.
0d70: 20 20 20 28 6a 6f 79 62 75 74 74 6f 6e 64 6f 77 (joybuttondow
0d80: 6e 20 20 20 20 23 78 36 30 33 29 3b 2f 2a 2a 3c n #x603);/**<
0d90: 20 6a 6f 79 73 74 69 63 6b 20 62 75 74 74 6f 6e joystick button
0da0: 20 70 72 65 73 73 65 64 20 2a 2f 0a 20 20 20 28 pressed */. (
0db0: 6a 6f 79 62 75 74 74 6f 6e 75 70 20 20 20 20 20 joybuttonup
0dc0: 20 23 78 36 30 34 29 3b 2f 2a 2a 3c 20 6a 6f 79 #x604);/**< joy
0dd0: 73 74 69 63 6b 20 62 75 74 74 6f 6e 20 72 65 6c stick button rel
0de0: 65 61 73 65 64 20 2a 2f 0a 20 20 20 28 6a 6f 79 eased */. (joy
0df0: 64 65 76 69 63 65 61 64 64 65 64 20 20 20 23 78 deviceadded #x
0e00: 36 30 35 29 3b 2f 2a 2a 3c 20 61 20 6e 65 77 20 605);/**< a new
0e10: 6a 6f 79 73 74 69 63 6b 20 68 61 73 20 62 65 65 joystick has bee
0e20: 6e 20 69 6e 73 65 72 74 65 64 20 69 6e 74 6f 20 n inserted into
0e30: 74 68 65 20 73 79 73 74 65 6d 20 2a 2f 0a 20 20 the system */.
0e40: 20 28 6a 6f 79 64 65 76 69 63 65 72 65 6d 6f 76 (joydeviceremov
0e50: 65 64 20 20 20 23 78 36 30 36 29 3b 31 3c 20 61 ed #x606);1< a
0e60: 6e 20 6f 70 65 6e 65 64 20 6a 6f 79 73 74 69 63 n opened joystic
0e70: 6b 20 68 61 73 20 62 65 65 6e 20 72 65 6d 6f 76 k has been remov
0e80: 65 64 20 2a 2f 0a 0a 20 20 20 3b 2f 2a 20 67 61 ed */.. ;/* ga
0e90: 6d 65 20 63 6f 6e 74 72 6f 6c 6c 65 72 20 65 76 me controller ev
0ea0: 65 6e 74 73 20 2a 2f 0a 20 20 20 28 63 6f 6e 74 ents */. (cont
0eb0: 72 6f 6c 6c 65 72 61 78 69 73 6d 6f 74 69 6f 6e rolleraxismotion
0ec0: 20 20 20 20 23 78 36 35 30 29 3b 2f 2a 2a 3c 20 #x650);/**<
0ed0: 67 61 6d 65 20 63 6f 6e 74 72 6f 6c 6c 65 72 20 game controller
0ee0: 61 78 69 73 20 6d 6f 74 69 6f 6e 20 2a 2f 0a 20 axis motion */.
0ef0: 20 20 28 63 6f 6e 74 72 6f 6c 6c 65 72 62 75 74 (controllerbut
0f00: 74 6f 6e 64 6f 77 6e 20 20 20 20 23 78 36 35 31 tondown #x651
0f10: 29 3b 2f 2a 2a 3c 20 67 61 6d 65 20 63 6f 6e 74 );/**< game cont
0f20: 72 6f 6c 6c 65 72 20 62 75 74 74 6f 6e 20 70 72 roller button pr
0f30: 65 73 73 65 64 20 2a 2f 0a 20 20 20 28 63 6f 6e essed */. (con
0f40: 74 72 6f 6c 6c 65 72 62 75 74 74 6f 6e 75 70 20 trollerbuttonup
0f50: 20 20 20 20 20 23 78 36 35 32 29 3b 2f 2a 2a 3c #x652);/**<
0f60: 20 67 61 6d 65 20 63 6f 6e 74 72 6f 6c 6c 65 72 game controller
0f70: 20 62 75 74 74 6f 6e 20 72 65 6c 65 61 73 65 64 button released
0f80: 20 2a 2f 0a 20 20 20 28 63 6f 6e 74 72 6f 6c 6c */. (controll
0f90: 65 72 64 65 76 69 63 65 61 64 64 65 64 20 20 20 erdeviceadded
0fa0: 23 78 36 35 33 29 3b 2f 2a 2a 3c 20 61 20 6e 65 #x653);/**< a ne
0fb0: 77 20 67 61 6d 65 20 63 6f 6e 74 72 6f 6c 6c 65 w game controlle
0fc0: 72 20 68 61 73 20 62 65 65 6e 20 69 6e 73 65 72 r has been inser
0fd0: 74 65 64 20 69 6e 74 6f 20 74 68 65 20 73 79 73 ted into the sys
0fe0: 74 65 6d 20 2a 2f 0a 20 20 20 28 63 6f 6e 74 72 tem */. (contr
0ff0: 6f 6c 6c 65 72 64 65 76 69 63 65 72 65 6d 6f 76 ollerdeviceremov
1000: 65 64 20 20 20 23 78 36 35 34 29 3b 2a 3c 20 61 ed #x654);*< a
1010: 6e 20 6f 70 65 6e 65 64 20 67 61 6d 65 20 63 6f n opened game co
1020: 6e 74 72 6f 6c 6c 65 72 20 68 61 73 20 62 65 65 ntroller has bee
1030: 6e 20 72 65 6d 6f 76 65 64 20 2a 2f 0a 20 20 20 n removed */.
1040: 28 63 6f 6e 74 72 6f 6c 6c 65 72 64 65 76 69 63 (controllerdevic
1050: 65 72 65 6d 61 70 70 65 64 20 20 20 23 78 36 35 eremapped #x65
1060: 35 29 3b 2a 3c 20 74 68 65 20 63 6f 6e 74 72 6f 5);*< the contro
1070: 6c 6c 65 72 20 6d 61 70 70 69 6e 67 20 77 61 73 ller mapping was
1080: 20 75 70 64 61 74 65 64 20 2a 2f 0a 0a 20 20 20 updated */..
1090: 20 3b 2a 20 74 6f 75 63 68 20 65 76 65 6e 74 73 ;* touch events
10a0: 20 2a 2f 0a 20 20 20 28 66 69 6e 67 65 72 64 6f */. (fingerdo
10b0: 77 6e 20 20 20 20 20 20 20 20 23 78 37 30 30 29 wn #x700)
10c0: 0a 20 20 20 28 66 69 6e 67 65 72 75 70 20 20 20 . (fingerup
10d0: 20 20 20 20 20 20 20 23 78 37 30 31 29 0a 20 20 #x701).
10e0: 20 28 66 69 6e 67 65 72 6d 6f 74 69 6f 6e 20 20 (fingermotion
10f0: 20 20 20 20 23 78 37 30 32 29 0a 0a 20 20 20 20 #x702)..
1100: 3b 2a 20 67 65 73 74 75 72 65 20 65 76 65 6e 74 ;* gesture event
1110: 73 20 2a 2f 0a 20 20 20 28 64 6f 6c 6c 61 72 67 s */. (dollarg
1120: 65 73 74 75 72 65 20 20 20 20 20 23 78 38 30 30 esture #x800
1130: 29 0a 20 20 20 28 64 6f 6c 6c 61 72 72 65 63 6f ). (dollarreco
1140: 72 64 20 20 20 20 20 20 23 78 38 30 31 29 0a 20 rd #x801).
1150: 20 20 28 6d 75 6c 74 69 67 65 73 74 75 72 65 20 (multigesture
1160: 20 20 20 20 20 23 78 38 30 32 29 0a 0a 20 20 20 #x802)..
1170: 20 3b 2a 20 63 6c 69 70 62 6f 61 72 64 20 65 76 ;* clipboard ev
1180: 65 6e 74 73 20 2a 2f 0a 20 20 20 28 63 6c 69 70 ents */. (clip
1190: 62 6f 61 72 64 75 70 64 61 74 65 20 20 20 23 78 boardupdate #x
11a0: 39 30 30 29 3b 2f 2a 2a 3c 20 74 68 65 20 63 6c 900);/**< the cl
11b0: 69 70 62 6f 61 72 64 20 63 68 61 6e 67 65 64 20 ipboard changed
11c0: 2a 2f 0a 0a 20 20 20 20 3b 2a 20 64 72 61 67 20 */.. ;* drag
11d0: 61 6e 64 20 64 72 6f 70 20 65 76 65 6e 74 73 20 and drop events
11e0: 2a 2f 0a 20 20 20 28 64 72 6f 70 66 69 6c 65 20 */. (dropfile
11f0: 20 20 20 20 20 20 20 20 20 23 78 31 30 30 30 29 #x1000)
1200: 3b 2f 2a 2a 3c 20 74 68 65 20 73 79 73 74 65 6d ;/**< the system
1210: 20 72 65 71 75 65 73 74 73 20 61 20 66 69 6c 65 requests a file
1220: 20 6f 70 65 6e 20 2a 2f 0a 0a 20 20 20 20 3b 2a open */.. ;*
1230: 20 72 65 6e 64 65 72 20 65 76 65 6e 74 73 20 2a render events *
1240: 2f 0a 20 20 20 28 72 65 6e 64 65 72 2d 74 61 72 /. (render-tar
1250: 67 65 74 73 2d 72 65 73 65 74 20 20 20 23 78 32 gets-reset #x2
1260: 30 30 30 29 3b 2f 2a 2a 3c 20 74 68 65 20 72 65 000);/**< the re
1270: 6e 64 65 72 20 74 61 72 67 65 74 73 20 68 61 76 nder targets hav
1280: 65 20 62 65 65 6e 20 72 65 73 65 74 20 2a 2f 0a e been reset */.
1290: 0a 20 20 3b 20 2f 2a 2a 20 65 76 65 6e 74 73 20 . ; /** events
12a0: 3a 3a 75 73 65 72 65 76 65 6e 74 20 74 68 72 6f ::userevent thro
12b0: 75 67 68 20 3a 3a 6c 61 73 74 65 76 65 6e 74 20 ugh ::lastevent
12c0: 61 72 65 20 66 6f 72 20 79 6f 75 72 20 75 73 65 are for your use
12d0: 2c 0a 20 20 3b 20 20 2a 20 20 61 6e 64 20 73 68 ,. ; * and sh
12e0: 6f 75 6c 64 20 62 65 20 61 6c 6c 6f 63 61 74 65 ould be allocate
12f0: 64 20 77 69 74 68 20 72 65 67 69 73 74 65 72 65 d with registere
1300: 76 65 6e 74 73 28 29 0a 20 20 3b 20 20 2a 2f 0a vents(). ; */.
1310: 20 20 20 28 75 73 65 72 65 76 65 6e 74 20 20 20 (userevent
1320: 20 20 20 23 78 38 30 30 30 29 0a 0a 20 20 3b 20 #x8000).. ;
1330: 2f 2a 2a 0a 20 20 3b 20 20 2a 20 20 74 68 69 73 /**. ; * this
1340: 20 6c 61 73 74 20 65 76 65 6e 74 20 69 73 20 6f last event is o
1350: 6e 6c 79 20 66 6f 72 20 62 6f 75 6e 64 69 6e 67 nly for bounding
1360: 20 69 6e 74 65 72 6e 61 6c 20 61 72 72 61 79 73 internal arrays
1370: 0a 20 20 3b 20 20 2a 2f 0a 20 20 20 28 6c 61 73 . ; */. (las
1380: 74 65 76 65 6e 74 20 20 20 20 20 20 23 78 66 66 tevent #xff
1390: 66 66 29 29 0a 0a 3b 20 46 69 65 6c 64 73 20 73 ff))..; Fields s
13a0: 68 61 72 65 64 20 62 79 20 65 76 65 72 79 20 65 hared by every e
13b0: 76 65 6e 74 0a 28 64 65 66 69 6e 65 2d 66 74 79 vent.(define-fty
13c0: 70 65 20 73 64 6c 2d 63 6f 6d 6d 6f 6e 2d 65 76 pe sdl-common-ev
13d0: 65 6e 74 2d 74 0a 20 20 28 73 74 72 75 63 74 0a ent-t. (struct.
13e0: 20 20 20 28 74 79 70 65 20 75 69 6e 74 33 32 29 (type uint32)
13f0: 0a 20 20 20 28 74 69 6d 65 73 74 61 6d 70 20 75 . (timestamp u
1400: 69 6e 74 33 32 29 29 29 0a 0a 20 28 64 65 66 69 int32))).. (defi
1410: 6e 65 2d 66 74 79 70 65 20 73 64 6c 2d 63 6f 6d ne-ftype sdl-com
1420: 6d 6f 6e 2d 65 76 65 6e 74 2d 74 2a 20 76 6f 69 mon-event-t* voi
1430: 64 2a 29 0a 0a 3b 20 57 69 6e 64 6f 77 20 73 74 d*)..; Window st
1440: 61 74 65 20 63 68 61 6e 67 65 20 65 76 65 6e 74 ate change event
1450: 20 64 61 74 61 20 28 65 76 65 6e 74 2e 77 69 6e data (event.win
1460: 64 6f 77 2e 2a 29 0a 28 64 65 66 69 6e 65 2d 66 dow.*).(define-f
1470: 74 79 70 65 20 73 64 6c 2d 77 69 6e 64 6f 77 2d type sdl-window-
1480: 65 76 65 6e 74 2d 74 0a 20 20 28 73 74 72 75 63 event-t. (struc
1490: 74 0a 20 20 20 20 28 74 79 70 65 20 75 69 6e 74 t. (type uint
14a0: 33 32 29 20 3b 20 20 20 20 20 20 20 20 2f 2a 2a 32) ; /**
14b0: 3c 20 3a 3a 53 44 4c 5f 57 49 4e 44 4f 57 45 56 < ::SDL_WINDOWEV
14c0: 45 4e 54 20 2a 2f 0a 20 20 20 20 28 74 69 6d 65 ENT */. (time
14d0: 73 74 61 6d 70 20 75 69 6e 74 33 32 29 0a 20 20 stamp uint32).
14e0: 20 20 28 77 69 6e 64 6f 77 2d 69 64 20 75 69 6e (window-id uin
14f0: 74 33 32 29 3b 20 20 20 20 2f 2a 2a 3c 20 54 68 t32); /**< Th
1500: 65 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 6e e associated win
1510: 64 6f 77 20 2a 2f 0a 20 20 20 20 28 65 76 65 6e dow */. (even
1520: 74 20 75 69 6e 74 38 29 3b 20 20 20 20 20 20 20 t uint8);
1530: 20 2f 2a 2a 3c 20 3a 3a 53 44 4c 5f 57 69 6e 64 /**< ::SDL_Wind
1540: 6f 77 45 76 65 6e 74 49 44 20 2a 2f 0a 20 20 20 owEventID */.
1550: 20 28 70 61 64 64 69 6e 67 31 20 75 69 6e 74 38 (padding1 uint8
1560: 29 0a 20 20 20 20 28 70 61 64 64 69 6e 67 32 20 ). (padding2
1570: 75 69 6e 74 38 29 0a 20 20 20 20 28 70 61 64 64 uint8). (padd
1580: 69 6e 67 33 20 75 69 6e 74 38 29 0a 20 20 20 20 ing3 uint8).
1590: 28 64 61 74 61 31 20 73 69 6e 74 33 32 29 3b 20 (data1 sint32);
15a0: 20 20 20 20 20 20 2f 2a 2a 3c 20 65 76 65 6e 74 /**< event
15b0: 20 64 65 70 65 6e 64 65 6e 74 20 64 61 74 61 20 dependent data
15c0: 2a 2f 0a 20 20 20 20 28 64 61 74 61 32 20 73 69 */. (data2 si
15d0: 6e 74 33 32 29 29 29 20 3b 20 20 20 20 20 20 20 nt32))) ;
15e0: 2f 2a 2a 3c 20 65 76 65 6e 74 20 64 65 70 65 6e /**< event depen
15f0: 64 65 6e 74 20 64 61 74 61 20 2a 2f 0a 0a 3b 20 dent data */..;
1600: 4b 65 79 62 6f 61 72 64 20 62 75 74 74 6f 6e 20 Keyboard button
1610: 65 76 65 6e 74 20 73 74 72 75 63 74 75 72 65 20 event structure
1620: 28 65 76 65 6e 74 2e 6b 65 79 2e 2a 29 0a 28 64 (event.key.*).(d
1630: 65 66 69 6e 65 2d 66 74 79 70 65 20 73 64 6c 2d efine-ftype sdl-
1640: 6b 65 79 62 6f 61 72 64 2d 65 76 65 6e 74 2d 74 keyboard-event-t
1650: 0a 20 20 28 73 74 72 75 63 74 0a 20 20 20 20 28 . (struct. (
1660: 74 79 70 65 20 75 69 6e 74 33 32 29 20 3b 20 20 type uint32) ;
1670: 20 20 20 20 20 20 2f 2a 2a 3c 20 3a 3a 53 44 4c /**< ::SDL
1680: 5f 4b 45 59 44 4f 57 4e 20 6f 72 20 3a 3a 53 44 _KEYDOWN or ::SD
1690: 4c 5f 4b 45 59 55 50 20 2a 2f 0a 20 20 20 20 28 L_KEYUP */. (
16a0: 74 69 6d 65 73 74 61 6d 70 20 75 69 6e 74 33 32 timestamp uint32
16b0: 29 0a 20 20 20 20 28 77 69 6e 64 6f 77 2d 69 64 ). (window-id
16c0: 20 75 69 6e 74 33 32 29 20 3b 20 20 20 20 2f 2a uint32) ; /*
16d0: 2a 3c 20 54 68 65 20 77 69 6e 64 6f 77 20 77 69 *< The window wi
16e0: 74 68 20 6b 65 79 62 6f 61 72 64 20 66 6f 63 75 th keyboard focu
16f0: 73 2c 20 69 66 20 61 6e 79 20 2a 2f 0a 20 20 20 s, if any */.
1700: 20 28 73 74 61 74 65 20 75 69 6e 74 38 29 20 3b (state uint8) ;
1710: 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 3a 3a 53 /**< ::S
1720: 44 4c 5f 50 52 45 53 53 45 44 20 6f 72 20 3a 3a DL_PRESSED or ::
1730: 53 44 4c 5f 52 45 4c 45 41 53 45 44 20 2a 2f 0a SDL_RELEASED */.
1740: 20 20 20 20 28 72 65 70 65 61 74 20 75 69 6e 74 (repeat uint
1750: 38 29 20 3b 20 20 20 20 20 20 20 2f 2a 2a 3c 20 8) ; /**<
1760: 4e 6f 6e 2d 7a 65 72 6f 20 69 66 20 74 68 69 73 Non-zero if this
1770: 20 69 73 20 61 20 6b 65 79 20 72 65 70 65 61 74 is a key repeat
1780: 20 2a 2f 0a 20 20 20 20 28 70 61 64 64 69 6e 67 */. (padding
1790: 32 20 75 69 6e 74 38 29 20 0a 20 20 20 20 28 70 2 uint8) . (p
17a0: 61 64 64 69 6e 67 33 20 75 69 6e 74 38 29 20 0a adding3 uint8) .
17b0: 20 20 20 20 28 6b 65 79 73 79 6d 20 73 64 6c 2d (keysym sdl-
17c0: 6b 65 79 73 79 6d 2d 74 29 29 29 20 20 3b 20 20 keysym-t))) ;
17d0: 2f 2a 2a 3c 20 54 68 65 20 6b 65 79 20 74 68 61 /**< The key tha
17e0: 74 20 77 61 73 20 70 72 65 73 73 65 64 20 6f 72 t was pressed or
17f0: 20 72 65 6c 65 61 73 65 64 20 2a 2f 0a 0a 28 64 released */..(d
1800: 65 66 69 6e 65 2d 73 79 6e 74 61 78 20 73 64 6c efine-syntax sdl
1810: 2d 74 65 78 74 65 64 69 74 69 6e 67 65 76 65 6e -texteditingeven
1820: 74 2d 74 65 78 74 2d 73 69 7a 65 20 28 69 64 65 t-text-size (ide
1830: 6e 74 69 66 69 65 72 2d 73 79 6e 74 61 78 20 33 ntifier-syntax 3
1840: 32 29 29 0a 0a 3b 20 4b 65 79 62 6f 61 72 64 20 2))..; Keyboard
1850: 74 65 78 74 20 65 64 69 74 69 6e 67 20 65 76 65 text editing eve
1860: 6e 74 20 73 74 72 75 63 74 75 72 65 20 28 65 76 nt structure (ev
1870: 65 6e 74 2e 65 64 69 74 2e 2a 29 0a 20 20 28 64 ent.edit.*). (d
1880: 65 66 69 6e 65 2d 66 74 79 70 65 20 73 64 6c 2d efine-ftype sdl-
1890: 74 65 78 74 2d 65 64 69 74 69 6e 67 2d 65 76 65 text-editing-eve
18a0: 6e 74 2d 74 0a 20 20 20 20 28 73 74 72 75 63 74 nt-t. (struct
18b0: 0a 20 20 20 20 20 28 74 79 70 65 20 75 69 6e 74 . (type uint
18c0: 33 32 29 20 20 20 20 20 20 20 20 3b 20 20 20 20 32) ;
18d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
18e0: 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 2a 3c /**<
18f0: 20 3a 3a 53 44 4c 5f 54 45 58 54 45 44 49 54 49 ::SDL_TEXTEDITI
1900: 4e 47 20 2a 2f 0a 20 20 20 20 20 28 74 69 6d 65 NG */. (time
1910: 73 74 61 6d 70 20 75 69 6e 74 33 32 29 20 20 20 stamp uint32)
1920: 0a 20 20 20 20 20 28 77 69 6e 64 6f 77 2d 69 64 . (window-id
1930: 20 75 69 6e 74 33 32 29 20 20 20 3b 20 20 20 20 uint32) ;
1940: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1950: 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 65 /**< The
1960: 20 77 69 6e 64 6f 77 20 77 69 74 68 20 6b 65 79 window with key
1970: 62 6f 61 72 64 20 66 6f 63 75 73 2c 20 69 66 20 board focus, if
1980: 61 6e 79 20 2a 2f 0a 20 20 20 20 20 28 74 65 78 any */. (tex
1990: 74 20 28 61 72 72 61 79 20 33 32 20 63 68 61 72 t (array 32 char
19a0: 29 29 20 20 20 20 20 3b 20 73 64 6c 2d 74 65 78 )) ; sdl-tex
19b0: 74 65 64 69 74 69 6e 67 65 76 65 6e 74 2d 74 65 teditingevent-te
19c0: 78 74 2d 73 69 7a 65 20 20 2f 2a 2a 3c 20 54 68 xt-size /**< Th
19d0: 65 20 65 64 69 74 69 6e 67 20 74 65 78 74 20 2a e editing text *
19e0: 2f 0a 20 20 20 20 20 28 73 74 61 72 74 20 73 69 /. (start si
19f0: 6e 74 33 32 29 20 20 20 3b 20 20 20 20 20 20 20 nt32) ;
1a00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1a10: 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 65 /**< The
1a20: 20 73 74 61 72 74 20 63 75 72 73 6f 72 20 6f 66 start cursor of
1a30: 20 73 65 6c 65 63 74 65 64 20 65 64 69 74 69 6e selected editin
1a40: 67 20 74 65 78 74 20 2a 2f 0a 20 20 20 20 20 28 g text */. (
1a50: 6c 65 6e 67 74 68 20 73 69 6e 74 33 32 29 29 29 length sint32)))
1a60: 20 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ;
1a70: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1a80: 2f 2a 2a 3c 20 54 68 65 20 6c 65 6e 67 74 68 20 /**< The length
1a90: 6f 66 20 73 65 6c 65 63 74 65 64 20 65 64 69 74 of selected edit
1aa0: 69 6e 67 20 74 65 78 74 20 2a 2f 0a 20 0a 28 64 ing text */. .(d
1ab0: 65 66 69 6e 65 2d 73 79 6e 74 61 78 20 73 64 6c efine-syntax sdl
1ac0: 2d 74 65 78 74 69 6e 70 75 74 65 76 65 6e 74 2d -textinputevent-
1ad0: 74 65 78 74 2d 73 69 7a 65 20 28 69 64 65 6e 74 text-size (ident
1ae0: 69 66 69 65 72 2d 73 79 6e 74 61 78 20 33 32 29 ifier-syntax 32)
1af0: 29 0a 0a 3b 20 4b 65 79 62 6f 61 72 64 20 74 65 )..; Keyboard te
1b00: 78 74 20 69 6e 70 75 74 20 65 76 65 6e 74 20 73 xt input event s
1b10: 74 72 75 63 74 75 72 65 20 28 65 76 65 6e 74 2e tructure (event.
1b20: 74 65 78 74 2e 2a 29 0a 28 64 65 66 69 6e 65 2d text.*).(define-
1b30: 66 74 79 70 65 20 73 64 6c 2d 74 65 78 74 2d 69 ftype sdl-text-i
1b40: 6e 70 75 74 2d 65 76 65 6e 74 2d 74 0a 20 20 28 nput-event-t. (
1b50: 73 74 72 75 63 74 0a 20 20 20 28 74 79 70 65 20 struct. (type
1b60: 75 69 6e 74 33 32 29 20 3b 20 20 20 20 20 20 20 uint32) ;
1b70: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1b80: 20 20 20 20 20 20 20 2f 2a 2a 3c 20 3a 3a 53 44 /**< ::SD
1b90: 4c 5f 54 45 58 54 49 4e 50 55 54 20 2a 2f 0a 20 L_TEXTINPUT */.
1ba0: 20 20 28 74 69 6d 65 73 74 61 6d 70 20 75 69 6e (timestamp uin
1bb0: 74 33 32 29 3b 0a 20 20 20 28 77 69 6e 64 6f 77 t32);. (window
1bc0: 2d 69 64 20 75 69 6e 74 33 32 29 3b 20 20 20 20 -id uint32);
1bd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1be0: 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 65 20 77 /**< The w
1bf0: 69 6e 64 6f 77 20 77 69 74 68 20 6b 65 79 62 6f indow with keybo
1c00: 61 72 64 20 66 6f 63 75 73 2c 20 69 66 20 61 6e ard focus, if an
1c10: 79 20 2a 2f 0a 20 20 20 28 74 65 78 74 20 28 61 y */. (text (a
1c20: 72 72 61 79 20 33 32 20 63 68 61 72 29 29 29 29 rray 32 char))))
1c30: 20 3b 73 64 6c 2d 74 65 78 74 69 6e 70 75 74 65 ;sdl-textinpute
1c40: 76 65 6e 74 2d 74 65 78 74 2d 73 69 7a 65 20 20 vent-text-size
1c50: 2f 2a 2a 3c 20 54 68 65 20 69 6e 70 75 74 20 74 /**< The input t
1c60: 65 78 74 20 2a 2f 0a 0a 3b 20 4d 6f 75 73 65 20 ext */..; Mouse
1c70: 6d 6f 74 69 6f 6e 20 65 76 65 6e 74 20 73 74 72 motion event str
1c80: 75 63 74 75 72 65 20 28 65 76 65 6e 74 2e 6d 6f ucture (event.mo
1c90: 74 69 6f 6e 2e 2a 29 0a 28 64 65 66 69 6e 65 2d tion.*).(define-
1ca0: 66 74 79 70 65 20 73 64 6c 2d 6d 6f 75 73 65 2d ftype sdl-mouse-
1cb0: 6d 6f 74 69 6f 6e 2d 65 76 65 6e 74 2d 74 0a 20 motion-event-t.
1cc0: 20 28 73 74 72 75 63 74 0a 20 20 20 20 20 28 74 (struct. (t
1cd0: 79 70 65 20 75 69 6e 74 33 32 29 3b 20 20 20 20 ype uint32);
1ce0: 20 20 20 20 2f 2a 2a 3c 20 3a 3a 53 44 4c 5f 4d /**< ::SDL_M
1cf0: 4f 55 53 45 4d 4f 54 49 4f 4e 20 2a 2f 0a 20 20 OUSEMOTION */.
1d00: 20 20 20 28 74 69 6d 65 73 74 61 6d 70 20 75 69 (timestamp ui
1d10: 6e 74 33 32 29 3b 0a 20 20 20 20 20 28 77 69 6e nt32);. (win
1d20: 64 6f 77 2d 69 64 20 75 69 6e 74 33 32 29 3b 20 dow-id uint32);
1d30: 20 20 20 2f 2a 2a 3c 20 54 68 65 20 77 69 6e 64 /**< The wind
1d40: 6f 77 20 77 69 74 68 20 6d 6f 75 73 65 20 66 6f ow with mouse fo
1d50: 63 75 73 2c 20 69 66 20 61 6e 79 20 2a 2f 0a 20 cus, if any */.
1d60: 20 20 20 20 28 77 68 69 63 68 20 75 69 6e 74 33 (which uint3
1d70: 32 29 3b 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 2); /**< T
1d80: 68 65 20 6d 6f 75 73 65 20 69 6e 73 74 61 6e 63 he mouse instanc
1d90: 65 20 69 64 2c 20 6f 72 20 53 44 4c 5f 54 4f 55 e id, or SDL_TOU
1da0: 43 48 5f 4d 4f 55 53 45 49 44 20 2a 2f 0a 20 20 CH_MOUSEID */.
1db0: 20 20 20 28 73 74 61 74 65 20 75 69 6e 74 33 32 (state uint32
1dc0: 29 3b 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 ); /**< Th
1dd0: 65 20 63 75 72 72 65 6e 74 20 62 75 74 74 6f 6e e current button
1de0: 20 73 74 61 74 65 20 2a 2f 0a 20 20 20 20 20 28 state */. (
1df0: 78 20 73 69 6e 74 33 32 29 3b 20 20 20 20 20 20 x sint32);
1e00: 20 20 20 20 20 2f 2a 2a 3c 20 58 20 63 6f 6f 72 /**< X coor
1e10: 64 69 6e 61 74 65 2c 20 72 65 6c 61 74 69 76 65 dinate, relative
1e20: 20 74 6f 20 77 69 6e 64 6f 77 20 2a 2f 0a 20 20 to window */.
1e30: 20 20 20 28 79 20 73 69 6e 74 33 32 29 3b 20 20 (y sint32);
1e40: 20 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 59 20 /**< Y
1e50: 63 6f 6f 72 64 69 6e 61 74 65 2c 20 72 65 6c 61 coordinate, rela
1e60: 74 69 76 65 20 74 6f 20 77 69 6e 64 6f 77 20 2a tive to window *
1e70: 2f 0a 20 20 20 20 20 28 78 72 65 6c 20 73 69 6e /. (xrel sin
1e80: 74 33 32 29 3b 20 20 20 20 20 20 20 20 2f 2a 2a t32); /**
1e90: 3c 20 54 68 65 20 72 65 6c 61 74 69 76 65 20 6d < The relative m
1ea0: 6f 74 69 6f 6e 20 69 6e 20 74 68 65 20 58 20 64 otion in the X d
1eb0: 69 72 65 63 74 69 6f 6e 20 2a 2f 0a 20 20 20 20 irection */.
1ec0: 20 28 79 72 65 6c 20 73 69 6e 74 33 32 29 29 29 (yrel sint32)))
1ed0: 3b 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 ; /**< Th
1ee0: 65 20 72 65 6c 61 74 69 76 65 20 6d 6f 74 69 6f e relative motio
1ef0: 6e 20 69 6e 20 74 68 65 20 59 20 64 69 72 65 63 n in the Y direc
1f00: 74 69 6f 6e 20 2a 2f 0a 0a 3b 20 4d 6f 75 73 65 tion */..; Mouse
1f10: 20 62 75 74 74 6f 6e 20 65 76 65 6e 74 20 73 74 button event st
1f20: 72 75 63 74 75 72 65 20 28 65 76 65 6e 74 2e 62 ructure (event.b
1f30: 75 74 74 6f 6e 2e 2a 29 0a 28 64 65 66 69 6e 65 utton.*).(define
1f40: 2d 66 74 79 70 65 20 73 64 6c 2d 6d 6f 75 73 65 -ftype sdl-mouse
1f50: 2d 62 75 74 74 6f 6e 2d 65 76 65 6e 74 2d 74 0a -button-event-t.
1f60: 20 20 28 73 74 72 75 63 74 0a 20 20 20 20 28 74 (struct. (t
1f70: 79 70 65 20 75 69 6e 74 33 32 29 3b 20 20 20 20 ype uint32);
1f80: 20 20 20 20 2f 2a 2a 3c 20 3a 3a 53 44 4c 5f 4d /**< ::SDL_M
1f90: 4f 55 53 45 42 55 54 54 4f 4e 44 4f 57 4e 20 6f OUSEBUTTONDOWN o
1fa0: 72 20 3a 3a 53 44 4c 5f 4d 4f 55 53 45 42 55 54 r ::SDL_MOUSEBUT
1fb0: 54 4f 4e 55 50 20 2a 2f 0a 20 20 20 20 28 74 69 TONUP */. (ti
1fc0: 6d 65 73 74 61 6d 70 20 75 69 6e 74 33 32 29 3b mestamp uint32);
1fd0: 0a 20 20 20 20 28 77 69 6e 64 6f 77 2d 69 64 20 . (window-id
1fe0: 75 69 6e 74 33 32 29 3b 20 20 20 20 2f 2a 2a 3c uint32); /**<
1ff0: 20 54 68 65 20 77 69 6e 64 6f 77 20 77 69 74 68 The window with
2000: 20 6d 6f 75 73 65 20 66 6f 63 75 73 2c 20 69 66 mouse focus, if
2010: 20 61 6e 79 20 2a 2f 0a 20 20 20 20 28 77 68 69 any */. (whi
2020: 63 68 20 75 69 6e 74 33 32 29 3b 20 20 20 20 20 ch uint32);
2030: 20 20 2f 2a 2a 3c 20 54 68 65 20 6d 6f 75 73 65 /**< The mouse
2040: 20 69 6e 73 74 61 6e 63 65 20 69 64 2c 20 6f 72 instance id, or
2050: 20 53 44 4c 5f 54 4f 55 43 48 5f 4d 4f 55 53 45 SDL_TOUCH_MOUSE
2060: 49 44 20 2a 2f 0a 20 20 20 20 28 62 75 74 74 6f ID */. (butto
2070: 6e 20 75 69 6e 74 38 29 3b 20 20 20 20 20 20 20 n uint8);
2080: 2f 2a 2a 3c 20 54 68 65 20 6d 6f 75 73 65 20 62 /**< The mouse b
2090: 75 74 74 6f 6e 20 69 6e 64 65 78 20 2a 2f 0a 20 utton index */.
20a0: 20 20 20 28 73 74 61 74 65 20 75 69 6e 74 38 29 (state uint8)
20b0: 3b 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 3a 3a ; /**< ::
20c0: 53 44 4c 5f 50 52 45 53 53 45 44 20 6f 72 20 3a SDL_PRESSED or :
20d0: 3a 53 44 4c 5f 52 45 4c 45 41 53 45 44 20 2a 2f :SDL_RELEASED */
20e0: 0a 20 20 20 20 28 63 6c 69 63 6b 73 20 75 69 6e . (clicks uin
20f0: 74 38 29 3b 20 20 20 20 20 20 20 2f 2a 2a 3c 20 t8); /**<
2100: 31 20 66 6f 72 20 73 69 6e 67 6c 65 2d 63 6c 69 1 for single-cli
2110: 63 6b 2c 20 32 20 66 6f 72 20 64 6f 75 62 6c 65 ck, 2 for double
2120: 2d 63 6c 69 63 6b 2c 20 65 74 63 2e 20 2a 2f 0a -click, etc. */.
2130: 20 20 20 20 28 70 61 64 64 69 6e 67 31 20 75 69 (padding1 ui
2140: 6e 74 38 29 3b 0a 20 20 20 20 28 78 20 73 69 6e nt8);. (x sin
2150: 74 33 32 29 3b 20 20 20 20 20 20 20 20 20 20 20 t32);
2160: 2f 2a 2a 3c 20 58 20 63 6f 6f 72 64 69 6e 61 74 /**< X coordinat
2170: 65 2c 20 72 65 6c 61 74 69 76 65 20 74 6f 20 77 e, relative to w
2180: 69 6e 64 6f 77 20 2a 2f 0a 20 20 20 20 28 79 20 indow */. (y
2190: 73 69 6e 74 33 32 29 29 29 3b 20 20 20 20 20 20 sint32)));
21a0: 20 20 20 20 20 2f 2a 2a 3c 20 59 20 63 6f 6f 72 /**< Y coor
21b0: 64 69 6e 61 74 65 2c 20 72 65 6c 61 74 69 76 65 dinate, relative
21c0: 20 74 6f 20 77 69 6e 64 6f 77 20 2a 2f 0a 0a 3b to window */..;
21d0: 20 20 4d 6f 75 73 65 20 77 68 65 65 6c 20 65 76 Mouse wheel ev
21e0: 65 6e 74 20 73 74 72 75 63 74 75 72 65 20 28 65 ent structure (e
21f0: 76 65 6e 74 2e 77 68 65 65 6c 2e 2a 29 0a 28 64 vent.wheel.*).(d
2200: 65 66 69 6e 65 2d 66 74 79 70 65 20 73 64 6c 2d efine-ftype sdl-
2210: 6d 6f 75 73 65 2d 77 68 65 65 6c 2d 65 76 65 6e mouse-wheel-even
2220: 74 2d 74 0a 20 20 28 73 74 72 75 63 74 0a 20 20 t-t. (struct.
2230: 20 28 74 79 70 65 20 75 69 6e 74 33 32 29 3b 20 (type uint32);
2240: 20 20 20 20 20 20 20 2f 2a 2a 3c 20 3a 3a 53 44 /**< ::SD
2250: 4c 5f 4d 4f 55 53 45 57 48 45 45 4c 20 2a 2f 0a L_MOUSEWHEEL */.
2260: 20 20 20 28 74 69 6d 65 73 74 61 6d 70 20 75 69 (timestamp ui
2270: 6e 74 33 32 29 3b 0a 20 20 20 28 77 69 6e 64 6f nt32);. (windo
2280: 77 2d 69 64 20 75 69 6e 74 33 32 29 3b 20 20 20 w-id uint32);
2290: 20 20 2f 2a 2a 3c 20 54 68 65 20 77 69 6e 64 6f /**< The windo
22a0: 77 20 77 69 74 68 20 6d 6f 75 73 65 20 66 6f 63 w with mouse foc
22b0: 75 73 2c 20 69 66 20 61 6e 79 20 2a 2f 0a 20 20 us, if any */.
22c0: 20 28 77 68 69 63 68 20 75 69 6e 74 33 32 29 3b (which uint32);
22d0: 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 65 20 /**< The
22e0: 6d 6f 75 73 65 20 69 6e 73 74 61 6e 63 65 20 69 mouse instance i
22f0: 64 2c 20 6f 72 20 53 44 4c 5f 54 4f 55 43 48 5f d, or SDL_TOUCH_
2300: 4d 4f 55 53 45 49 44 20 2a 2f 0a 20 20 20 28 78 MOUSEID */. (x
2310: 20 73 69 6e 74 33 32 29 3b 20 20 20 20 20 20 20 sint32);
2320: 20 20 20 20 2f 2a 2a 3c 20 54 68 65 20 61 6d 6f /**< The amo
2330: 75 6e 74 20 73 63 72 6f 6c 6c 65 64 20 68 6f 72 unt scrolled hor
2340: 69 7a 6f 6e 74 61 6c 6c 79 2c 20 70 6f 73 69 74 izontally, posit
2350: 69 76 65 20 74 6f 20 74 68 65 20 72 69 67 68 74 ive to the right
2360: 20 61 6e 64 20 6e 65 67 61 74 69 76 65 20 74 6f and negative to
2370: 20 74 68 65 20 6c 65 66 74 20 2a 2f 0a 20 20 20 the left */.
2380: 28 79 20 73 69 6e 74 33 32 29 29 29 3b 20 20 20 (y sint32)));
2390: 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 65 /**< The
23a0: 20 61 6d 6f 75 6e 74 20 73 63 72 6f 6c 6c 65 64 amount scrolled
23b0: 20 76 65 72 74 69 63 61 6c 6c 79 2c 20 70 6f 73 vertically, pos
23c0: 69 74 69 76 65 20 61 77 61 79 20 66 72 6f 6d 20 itive away from
23d0: 74 68 65 20 75 73 65 72 20 61 6e 64 20 6e 65 67 the user and neg
23e0: 61 74 69 76 65 20 74 6f 77 61 72 64 20 74 68 65 ative toward the
23f0: 20 75 73 65 72 20 2a 2f 0a 0a 3b 3b 20 4a 4f 59 user */..;; JOY
2400: 53 54 49 43 4b 20 41 4e 44 20 43 4f 4e 54 52 4f STICK AND CONTRO
2410: 4c 4c 45 52 53 20 41 52 45 20 4e 4f 54 20 4f 46 LLERS ARE NOT OF
2420: 20 4d 59 20 49 4e 54 45 52 45 53 54 20 42 55 54 MY INTEREST BUT
2430: 20 59 4f 55 20 43 41 4e 20 49 4d 50 4c 45 4d 45 YOU CAN IMPLEME
2440: 4e 54 20 54 48 45 4d 20 41 53 20 48 4f 4d 45 57 NT THEM AS HOMEW
2450: 4f 52 4b 0a 0a 0a 3b 20 54 6f 75 63 68 20 66 69 ORK...; Touch fi
2460: 6e 67 65 72 20 65 76 65 6e 74 20 73 74 72 75 63 nger event struc
2470: 74 75 72 65 20 28 65 76 65 6e 74 2e 74 66 69 6e ture (event.tfin
2480: 67 65 72 2e 2a 29 0a 28 64 65 66 69 6e 65 2d 66 ger.*).(define-f
2490: 74 79 70 65 20 73 64 6c 2d 74 6f 75 63 68 2d 66 type sdl-touch-f
24a0: 69 6e 67 65 72 2d 65 76 65 6e 74 2d 74 0a 20 20 inger-event-t.
24b0: 28 73 74 72 75 63 74 0a 20 20 20 28 74 79 70 65 (struct. (type
24c0: 20 75 69 6e 74 33 32 29 3b 20 20 20 20 20 20 20 uint32);
24d0: 20 2f 2a 2a 3c 20 3a 3a 53 44 4c 5f 46 49 4e 47 /**< ::SDL_FING
24e0: 45 52 4d 4f 54 49 4f 4e 20 6f 72 20 3a 3a 53 44 ERMOTION or ::SD
24f0: 4c 5f 46 49 4e 47 45 52 44 4f 57 4e 20 6f 72 20 L_FINGERDOWN or
2500: 3a 3a 53 44 4c 5f 46 49 4e 47 45 52 55 50 20 2a ::SDL_FINGERUP *
2510: 2f 0a 20 20 20 28 74 69 6d 65 73 74 61 6d 70 20 /. (timestamp
2520: 75 69 6e 74 33 32 29 3b 0a 20 20 20 20 28 74 6f uint32);. (to
2530: 75 63 68 2d 69 64 20 73 64 6c 2d 74 6f 75 63 68 uch-id sdl-touch
2540: 2d 69 64 2d 74 29 3b 20 2f 2a 2a 3c 20 54 68 65 -id-t); /**< The
2550: 20 74 6f 75 63 68 20 64 65 76 69 63 65 20 69 64 touch device id
2560: 20 2a 2f 0a 20 20 20 20 28 66 69 6e 67 65 72 2d */. (finger-
2570: 69 64 20 73 64 6c 2d 66 69 6e 67 65 72 2d 69 64 id sdl-finger-id
2580: 2d 74 29 3b 0a 20 20 20 20 28 78 20 66 6c 6f 61 -t);. (x floa
2590: 74 29 3b 20 20 20 20 20 20 20 20 20 20 20 20 2f t); /
25a0: 2a 2a 3c 20 4e 6f 72 6d 61 6c 69 7a 65 64 20 69 **< Normalized i
25b0: 6e 20 74 68 65 20 72 61 6e 67 65 20 30 2e 2e 2e n the range 0...
25c0: 31 20 2a 2f 0a 20 20 20 20 28 79 20 66 6c 6f 61 1 */. (y floa
25d0: 74 29 3b 20 20 20 20 20 20 20 20 20 20 20 20 2f t); /
25e0: 2a 2a 3c 20 4e 6f 72 6d 61 6c 69 7a 65 64 20 69 **< Normalized i
25f0: 6e 20 74 68 65 20 72 61 6e 67 65 20 30 2e 2e 2e n the range 0...
2600: 31 20 2a 2f 0a 20 20 20 20 28 64 78 20 66 6c 6f 1 */. (dx flo
2610: 61 74 29 3b 20 20 20 20 20 20 20 20 20 20 20 2f at); /
2620: 2a 2a 3c 20 4e 6f 72 6d 61 6c 69 7a 65 64 20 69 **< Normalized i
2630: 6e 20 74 68 65 20 72 61 6e 67 65 20 30 2e 2e 2e n the range 0...
2640: 31 20 2a 2f 0a 20 20 20 20 28 64 79 20 66 6c 6f 1 */. (dy flo
2650: 61 74 29 3b 20 20 20 20 20 20 20 20 20 20 20 2f at); /
2660: 2a 2a 3c 20 4e 6f 72 6d 61 6c 69 7a 65 64 20 69 **< Normalized i
2670: 6e 20 74 68 65 20 72 61 6e 67 65 20 30 2e 2e 2e n the range 0...
2680: 31 20 2a 2f 0a 20 20 20 20 28 70 72 65 73 73 75 1 */. (pressu
2690: 72 65 20 66 6c 6f 61 74 29 29 29 0a 0a 3b 20 4d re float)))..; M
26a0: 75 6c 74 69 70 6c 65 20 46 69 6e 67 65 72 20 47 ultiple Finger G
26b0: 65 73 74 75 72 65 20 45 76 65 6e 74 20 28 65 76 esture Event (ev
26c0: 65 6e 74 2e 6d 67 65 73 74 75 72 65 2e 2a 29 0a ent.mgesture.*).
26d0: 28 64 65 66 69 6e 65 2d 66 74 79 70 65 20 73 64 (define-ftype sd
26e0: 6c 2d 6d 75 6c 74 69 2d 67 65 73 74 75 72 65 2d l-multi-gesture-
26f0: 65 76 65 6e 74 2d 74 0a 20 20 28 73 74 72 75 63 event-t. (struc
2700: 74 0a 20 20 20 28 74 79 70 65 20 75 69 6e 74 33 t. (type uint3
2710: 32 29 3b 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 2); /**<
2720: 3a 3a 53 44 4c 5f 4d 55 4c 54 49 47 45 53 54 55 ::SDL_MULTIGESTU
2730: 52 45 20 2a 2f 0a 20 20 20 20 28 74 69 6d 65 73 RE */. (times
2740: 74 61 6d 70 20 75 69 6e 74 33 32 29 3b 0a 20 20 tamp uint32);.
2750: 20 20 28 74 6f 75 63 68 2d 69 64 20 73 64 6c 2d (touch-id sdl-
2760: 74 6f 75 63 68 2d 69 64 2d 74 29 3b 20 2f 2a 2a touch-id-t); /**
2770: 3c 20 54 68 65 20 74 6f 75 63 68 20 64 65 76 69 < The touch devi
2780: 63 65 20 69 6e 64 65 78 20 2a 2f 0a 20 20 20 20 ce index */.
2790: 28 64 2d 74 68 65 74 61 20 66 6c 6f 61 74 29 0a (d-theta float).
27a0: 20 20 20 20 28 64 2d 64 69 73 74 20 66 6c 6f 61 (d-dist floa
27b0: 74 29 0a 20 20 20 20 28 78 20 66 6c 6f 61 74 29 t). (x float)
27c0: 0a 20 20 20 20 28 79 20 66 6c 6f 61 74 29 0a 20 . (y float).
27d0: 20 20 20 28 6e 75 6d 2d 66 69 6e 67 65 72 73 20 (num-fingers
27e0: 75 69 6e 74 31 36 29 0a 20 20 20 20 28 70 61 64 uint16). (pad
27f0: 64 69 6e 67 20 75 69 6e 74 31 36 29 29 29 0a 0a ding uint16)))..
2800: 0a 3b 20 42 65 67 69 6e 20 52 65 63 6f 72 64 69 .; Begin Recordi
2810: 6e 67 20 61 20 67 65 73 74 75 72 65 20 6f 6e 20 ng a gesture on
2820: 74 68 65 20 73 70 65 63 69 66 69 65 64 20 74 6f the specified to
2830: 75 63 68 2c 20 6f 72 20 61 6c 6c 20 74 6f 75 63 uch, or all touc
2840: 68 65 73 20 28 2d 31 29 0a 3b 28 64 65 66 69 6e hes (-1).;(defin
2850: 65 2d 73 64 6c 2d 66 75 6e 63 20 69 6e 74 25 20 e-sdl-func int%
2860: 53 44 4c 5f 52 65 63 6f 72 64 47 65 73 74 75 72 SDL_RecordGestur
2870: 65 20 28 28 74 6f 75 63 68 2d 69 64 20 73 64 6c e ((touch-id sdl
2880: 2d 74 6f 75 63 68 2d 69 64 29 29 29 0a 0a 3b 3b -touch-id)))..;;
2890: 20 3b 28 64 65 66 69 6e 65 2d 73 64 6c 2d 66 75 ;(define-sdl-fu
28a0: 6e 63 20 69 6e 74 20 53 44 4c 5f 53 61 76 65 72 nc int SDL_Saver
28b0: 41 6c 6c 44 6f 6c 6c 61 72 54 65 6d 70 6c 61 74 AllDollarTemplat
28c0: 65 73 20 28 53 44 4c 5f 52 57 6f 70 73 2a 29 29 es (SDL_RWops*))
28d0: 0a 3b 3b 20 3b 28 64 65 66 69 6e 65 2d 73 64 6c .;; ;(define-sdl
28e0: 2d 66 75 6e 63 20 69 6e 74 20 53 44 4c 5f 53 61 -func int SDL_Sa
28f0: 76 65 44 6f 6c 6c 61 72 54 65 6d 70 6c 61 74 65 veDollarTemplate
2900: 20 28 53 44 4c 5f 47 65 73 74 75 72 65 49 44 20 (SDL_GestureID
2910: 53 44 4c 5f 52 57 6f 70 73 2a 29 29 0a 0a 3b 20 SDL_RWops*))..;
2920: 44 6f 6c 6c 61 72 20 47 65 73 74 75 72 65 20 45 Dollar Gesture E
2930: 76 65 6e 74 20 28 65 76 65 6e 74 2e 64 67 65 73 vent (event.dges
2940: 74 75 72 65 2e 2a 29 0a 28 64 65 66 69 6e 65 2d ture.*).(define-
2950: 66 74 79 70 65 20 73 64 6c 2d 64 6f 6c 6c 61 72 ftype sdl-dollar
2960: 2d 67 65 73 74 75 72 65 2d 65 76 65 6e 74 2d 74 -gesture-event-t
2970: 0a 20 20 28 73 74 72 75 63 74 0a 20 20 20 28 74 . (struct. (t
2980: 79 70 65 20 75 69 6e 74 33 32 29 3b 20 20 20 20 ype uint32);
2990: 20 20 20 20 2f 2a 2a 3c 20 3a 3a 53 44 4c 5f 44 /**< ::SDL_D
29a0: 4f 4c 4c 41 52 47 45 53 54 55 52 45 20 2a 2f 0a OLLARGESTURE */.
29b0: 20 20 20 20 28 74 69 6d 65 73 74 61 6d 70 20 75 (timestamp u
29c0: 69 6e 74 33 32 29 3b 0a 20 20 20 20 28 74 6f 75 int32);. (tou
29d0: 63 68 2d 69 64 20 73 64 6c 2d 74 6f 75 63 68 2d ch-id sdl-touch-
29e0: 69 64 2d 74 29 3b 20 2f 2a 2a 3c 20 54 68 65 20 id-t); /**< The
29f0: 74 6f 75 63 68 20 64 65 76 69 63 65 20 69 64 20 touch device id
2a00: 2a 2f 0a 20 20 20 20 28 67 65 73 74 75 72 65 2d */. (gesture-
2a10: 69 64 20 73 64 6c 2d 67 65 73 74 75 72 65 2d 69 id sdl-gesture-i
2a20: 64 2d 74 29 3b 0a 20 20 20 20 28 6e 75 6d 2d 66 d-t);. (num-f
2a30: 69 6e 67 65 72 73 20 75 69 6e 74 33 32 29 0a 20 ingers uint32).
2a40: 20 20 20 28 65 72 72 6f 72 20 66 6c 6f 61 74 29 (error float)
2a50: 3b 0a 20 20 20 20 28 78 20 66 6c 6f 61 74 29 3b ;. (x float);
2a60: 20 20 20 20 20 20 20 20 20 20 20 20 2f 2a 2a 3c /**<
2a70: 20 4e 6f 72 6d 61 6c 69 7a 65 64 20 63 65 6e 74 Normalized cent
2a80: 65 72 20 6f 66 20 67 65 73 74 75 72 65 20 2a 2f er of gesture */
2a90: 0a 20 20 20 20 28 79 20 66 6c 6f 61 74 29 29 29 . (y float)))
2aa0: 0a 0a 3b 20 41 6e 20 65 76 65 6e 74 20 75 73 65 ..; An event use
2ab0: 64 20 74 6f 20 72 65 71 75 65 73 74 20 61 20 66 d to request a f
2ac0: 69 6c 65 20 6f 70 65 6e 20 62 79 20 74 68 65 20 ile open by the
2ad0: 73 79 73 74 65 6d 20 28 65 76 65 6e 74 2e 64 72 system (event.dr
2ae0: 6f 70 2e 2a 29 0a 3b 20 54 68 69 73 20 65 76 65 op.*).; This eve
2af0: 6e 74 20 69 73 20 64 69 73 61 62 6c 65 64 20 62 nt is disabled b
2b00: 79 20 64 65 66 61 75 6c 74 2c 20 79 6f 75 20 63 y default, you c
2b10: 61 6e 20 65 6e 61 62 6c 65 20 69 74 20 77 69 74 an enable it wit
2b20: 68 20 53 44 4c 5f 45 76 65 6e 74 53 74 61 74 65 h SDL_EventState
2b30: 28 29 0a 3b 3a 20 49 66 20 79 6f 75 20 65 6e 61 ().;: If you ena
2b40: 62 6c 65 20 74 68 69 73 20 65 76 65 6e 74 2c 20 ble this event,
2b50: 79 6f 75 20 6d 75 73 74 20 66 72 65 65 20 74 68 you must free th
2b60: 65 20 66 69 6c 65 6e 61 6d 65 20 69 6e 20 74 68 e filename in th
2b70: 65 20 65 76 65 6e 74 2e 0a 28 64 65 66 69 6e 65 e event..(define
2b80: 2d 66 74 79 70 65 20 73 64 6c 2d 64 72 6f 70 2d -ftype sdl-drop-
2b90: 65 76 65 6e 74 2d 74 0a 20 20 28 73 74 72 75 63 event-t. (struc
2ba0: 74 0a 20 20 20 28 74 79 70 65 20 75 69 6e 74 33 t. (type uint3
2bb0: 32 29 3b 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 2); /**<
2bc0: 3a 3a 53 44 4c 5f 44 52 4f 50 46 49 4c 45 20 2a ::SDL_DROPFILE *
2bd0: 2f 0a 20 20 20 28 74 69 6d 65 73 74 61 6d 70 20 /. (timestamp
2be0: 75 69 6e 74 33 32 29 3b 0a 20 20 20 28 66 69 6c uint32);. (fil
2bf0: 65 6e 61 6d 65 20 76 6f 69 64 2a 29 29 29 3b 20 ename void*)));
2c00: 20 20 20 20 20 20 20 20 2f 2a 2a 3c 20 54 68 65 /**< The
2c10: 20 66 69 6c 65 20 6e 61 6d 65 2c 20 77 68 69 63 file name, whic
2c20: 68 20 73 68 6f 75 6c 64 20 62 65 20 66 72 65 65 h should be free
2c30: 64 20 77 69 74 68 20 53 44 4c 5f 66 72 65 65 28 d with SDL_free(
2c40: 29 20 2a 2f 0a 0a 3b 20 54 68 65 20 22 71 75 69 ) */..; The "qui
2c50: 74 20 72 65 71 75 65 73 74 65 64 22 20 65 76 65 t requested" eve
2c60: 6e 74 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 nt.(define-ftype
2c70: 20 73 64 6c 2d 71 75 69 74 2d 65 76 65 6e 74 2d sdl-quit-event-
2c80: 74 0a 20 20 28 73 74 72 75 63 74 20 0a 20 20 20 t. (struct .
2c90: 28 74 79 70 65 20 75 69 6e 74 33 32 29 20 3b 20 (type uint32) ;
2ca0: 2f 2a 2a 3c 20 3a 3a 53 44 4c 5f 51 55 49 54 20 /**< ::SDL_QUIT
2cb0: 2a 2f 0a 20 20 20 28 74 69 6d 65 73 74 61 6d 70 */. (timestamp
2cc0: 20 75 69 6e 74 33 32 29 29 29 0a 3b 20 41 20 75 uint32))).; A u
2cd0: 73 65 72 2d 64 65 66 69 6e 65 64 20 65 76 65 6e ser-defined even
2ce0: 74 20 74 79 70 65 20 28 65 76 65 6e 74 2e 75 73 t type (event.us
2cf0: 65 72 2e 2a 29 0a 0a 28 64 65 66 69 6e 65 2d 66 er.*)..(define-f
2d00: 74 79 70 65 20 73 64 6c 2d 75 73 65 72 2d 65 76 type sdl-user-ev
2d10: 65 6e 74 2d 74 0a 20 20 28 73 74 72 75 63 74 0a ent-t. (struct.
2d20: 20 20 20 28 74 79 70 65 20 75 69 6e 74 33 32 29 (type uint32)
2d30: 20 20 20 20 20 20 3b 20 20 2f 2a 2a 3c 20 3a 3a ; /**< ::
2d40: 53 44 4c 5f 55 53 45 52 45 56 45 4e 54 20 74 68 SDL_USEREVENT th
2d50: 72 6f 75 67 68 20 3a 3a 53 44 4c 5f 4c 41 53 54 rough ::SDL_LAST
2d60: 45 56 45 4e 54 2d 31 20 2a 2f 0a 20 20 20 28 74 EVENT-1 */. (t
2d70: 69 6d 65 73 74 61 6d 70 20 75 69 6e 74 33 32 29 imestamp uint32)
2d80: 0a 20 20 20 28 77 69 6e 64 6f 77 2d 69 64 20 75 . (window-id u
2d90: 69 6e 74 33 32 29 20 3b 20 20 20 2f 2a 2a 3c 20 int32) ; /**<
2da0: 54 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 77 The associated w
2db0: 69 6e 64 6f 77 20 69 66 20 61 6e 79 20 2a 2f 0a indow if any */.
2dc0: 20 20 20 28 63 6f 64 65 20 73 69 6e 74 33 32 29 (code sint32)
2dd0: 20 20 3b 20 20 20 20 20 20 2f 2a 2a 3c 20 55 73 ; /**< Us
2de0: 65 72 20 64 65 66 69 6e 65 64 20 65 76 65 6e 74 er defined event
2df0: 20 63 6f 64 65 20 2a 2f 0a 20 20 20 28 64 61 74 code */. (dat
2e00: 61 31 20 76 6f 69 64 2a 29 20 20 3b 20 20 20 20 a1 void*) ;
2e10: 20 20 2f 2a 2a 3c 20 55 73 65 72 20 64 65 66 69 /**< User defi
2e20: 6e 65 64 20 64 61 74 61 20 70 6f 69 6e 74 65 72 ned data pointer
2e30: 20 2a 2f 0a 20 20 20 28 64 61 74 61 32 20 76 6f */. (data2 vo
2e40: 69 64 2a 29 29 29 3b 20 20 20 20 20 20 20 20 2f id*))); /
2e50: 2a 2a 3c 20 55 73 65 72 20 64 65 66 69 6e 65 64 **< User defined
2e60: 20 64 61 74 61 20 70 6f 69 6e 74 65 72 20 2a 2f data pointer */
2e70: 0a 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 20 ..(define-ftype
2e80: 73 64 6c 2d 73 79 73 2d 77 6d 2d 6d 73 67 20 28 sdl-sys-wm-msg (
2e90: 73 74 72 75 63 74 29 29 0a 0a 3b 20 2a 20 20 5c struct))..; * \
2ea0: 62 72 69 65 66 20 41 20 76 69 64 65 6f 20 64 72 brief A video dr
2eb0: 69 76 65 72 20 64 65 70 65 6e 64 65 6e 74 20 73 iver dependent s
2ec0: 79 73 74 65 6d 20 65 76 65 6e 74 20 28 65 76 65 ystem event (eve
2ed0: 6e 74 2e 73 79 73 77 6d 2e 2a 29 0a 3b 20 2a 20 nt.syswm.*).; *
2ee0: 20 20 20 20 20 20 20 20 54 68 69 73 20 65 76 65 This eve
2ef0: 6e 74 20 69 73 20 64 69 73 61 62 6c 65 64 20 62 nt is disabled b
2f00: 79 20 64 65 66 61 75 6c 74 2c 20 79 6f 75 20 63 y default, you c
2f10: 61 6e 20 65 6e 61 62 6c 65 20 69 74 20 77 69 74 an enable it wit
2f20: 68 20 53 44 4c 5f 45 76 65 6e 74 53 74 61 74 65 h SDL_EventState
2f30: 28 29 0a 3b 20 2a 0a 3b 20 2a 20 20 5c 6e 6f 74 ().; *.; * \not
2f40: 65 20 49 66 20 79 6f 75 20 77 61 6e 74 20 74 6f e If you want to
2f50: 20 75 73 65 20 74 68 69 73 20 65 76 65 6e 74 2c use this event,
2f60: 20 79 6f 75 20 73 68 6f 75 6c 64 20 69 6e 63 6c you should incl
2f70: 75 64 65 20 53 44 4c 5f 73 79 73 77 6d 2e 68 2e ude SDL_syswm.h.
2f80: 0a 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 20 ..(define-ftype
2f90: 73 64 6c 2d 73 79 73 2d 77 6d 2d 65 76 65 6e 74 sdl-sys-wm-event
2fa0: 2d 74 0a 20 20 28 73 74 72 75 63 74 0a 20 20 20 -t. (struct.
2fb0: 28 74 79 70 65 20 75 69 6e 74 33 32 29 20 20 20 (type uint32)
2fc0: 20 20 20 20 20 3b 2f 2a 2a 3c 20 3a 3a 53 44 4c ;/**< ::SDL
2fd0: 5f 53 59 53 57 4d 45 56 45 4e 54 20 2a 2f 0a 20 _SYSWMEVENT */.
2fe0: 20 20 28 74 69 6d 65 73 74 61 6d 70 20 75 69 6e (timestamp uin
2ff0: 74 33 32 29 0a 20 20 20 28 6d 73 67 20 28 2a 20 t32). (msg (*
3000: 73 64 6c 2d 73 79 73 2d 77 6d 2d 6d 73 67 29 29 sdl-sys-wm-msg))
3010: 29 29 20 20 3b 2f 2a 2a 3c 20 64 72 69 76 65 72 )) ;/**< driver
3020: 20 64 65 70 65 6e 64 65 6e 74 20 64 61 74 61 2c dependent data,
3030: 20 64 65 66 69 6e 65 64 20 69 6e 20 53 44 4c 5f defined in SDL_
3040: 73 79 73 77 6d 2e 68 20 2a 2f 0a 0a 28 64 65 66 syswm.h */..(def
3050: 69 6e 65 2d 66 74 79 70 65 20 73 64 6c 2d 6a 6f ine-ftype sdl-jo
3060: 79 2d 61 78 69 73 2d 65 76 65 6e 74 2d 74 20 28 y-axis-event-t (
3070: 73 74 72 75 63 74 29 29 0a 28 64 65 66 69 6e 65 struct)).(define
3080: 2d 66 74 79 70 65 20 73 64 6c 2d 6a 6f 79 2d 68 -ftype sdl-joy-h
3090: 61 74 2d 65 76 65 6e 74 2d 74 20 28 73 74 72 75 at-event-t (stru
30a0: 63 74 29 29 0a 28 64 65 66 69 6e 65 2d 66 74 79 ct)).(define-fty
30b0: 70 65 20 73 64 6c 2d 6a 6f 79 2d 64 65 76 69 63 pe sdl-joy-devic
30c0: 65 2d 65 76 65 6e 74 2d 74 20 28 73 74 72 75 63 e-event-t (struc
30d0: 74 29 29 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 t)).(define-ftyp
30e0: 65 20 73 64 6c 2d 6a 6f 79 2d 62 75 74 74 6f 6e e sdl-joy-button
30f0: 2d 65 76 65 6e 74 2d 74 20 28 73 74 72 75 63 74 -event-t (struct
3100: 29 29 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 )).(define-ftype
3110: 20 73 64 6c 2d 6a 6f 79 2d 62 61 6c 6c 2d 65 76 sdl-joy-ball-ev
3120: 65 6e 74 2d 74 20 28 73 74 72 75 63 74 29 29 0a ent-t (struct)).
3130: 28 64 65 66 69 6e 65 2d 66 74 79 70 65 20 73 64 (define-ftype sd
3140: 6c 2d 63 6f 6e 74 72 6f 6c 6c 65 72 2d 62 75 74 l-controller-but
3150: 74 6f 6e 2d 65 76 65 6e 74 2d 74 20 28 73 74 72 ton-event-t (str
3160: 75 63 74 29 29 0a 28 64 65 66 69 6e 65 2d 66 74 uct)).(define-ft
3170: 79 70 65 20 73 64 6c 2d 63 6f 6e 74 72 6f 6c 6c ype sdl-controll
3180: 65 72 2d 64 65 76 69 63 65 2d 65 76 65 6e 74 2d er-device-event-
3190: 74 20 28 73 74 72 75 63 74 29 29 0a 28 64 65 66 t (struct)).(def
31a0: 69 6e 65 2d 66 74 79 70 65 20 73 64 6c 2d 6a 6f ine-ftype sdl-jo
31b0: 79 73 74 69 63 6b 2d 69 64 2d 74 20 73 69 6e 74 ystick-id-t sint
31c0: 33 32 29 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 32).(define-ftyp
31d0: 65 20 73 64 6c 2d 63 6f 6e 74 72 6f 6c 6c 65 72 e sdl-controller
31e0: 2d 61 78 69 73 2d 65 76 65 6e 74 2d 74 20 0a 20 -axis-event-t .
31f0: 20 28 73 74 72 75 63 74 0a 20 20 20 28 74 79 70 (struct. (typ
3200: 65 20 75 69 6e 74 33 32 29 0a 20 20 20 28 74 69 e uint32). (ti
3210: 6d 65 73 74 61 6d 70 20 75 69 6e 74 33 32 29 0a mestamp uint32).
3220: 20 20 20 28 77 68 69 63 68 20 73 64 6c 2d 6a 6f (which sdl-jo
3230: 79 73 74 69 63 6b 2d 69 64 2d 74 29 0a 20 20 20 ystick-id-t).
3240: 28 61 78 69 73 20 75 69 6e 74 38 29 0a 20 20 20 (axis uint8).
3250: 28 70 61 64 64 69 6e 67 31 20 75 69 6e 74 38 29 (padding1 uint8)
3260: 0a 20 20 20 28 70 61 64 64 69 6e 67 32 20 75 69 . (padding2 ui
3270: 6e 74 38 29 0a 20 20 20 28 70 61 64 64 69 6e 67 nt8). (padding
3280: 33 20 75 69 6e 74 38 29 0a 20 20 20 28 76 61 6c 3 uint8). (val
3290: 75 65 20 73 69 6e 74 31 36 29 0a 20 20 20 28 70 ue sint16). (p
32a0: 61 64 64 69 6e 67 34 20 75 69 6e 74 31 36 29 29 adding4 uint16))
32b0: 29 0a 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 )..(define-ftype
32c0: 20 73 64 6c 2d 65 76 65 6e 74 2d 74 0a 20 20 28 sdl-event-t. (
32d0: 75 6e 69 6f 6e 0a 20 20 20 28 74 79 70 65 20 75 union. (type u
32e0: 69 6e 74 33 32 29 20 20 20 20 20 20 20 20 20 20 int32)
32f0: 20 20 20 20 20 20 20 20 20 20 3b 20 2f 2a 2a 3c ; /**<
3300: 20 45 76 65 6e 74 20 74 79 70 65 2c 20 73 68 61 Event type, sha
3310: 72 65 64 20 77 69 74 68 20 61 6c 6c 20 65 76 65 red with all eve
3320: 6e 74 73 20 2a 2f 0a 20 20 20 28 63 6f 6d 6d 6f nts */. (commo
3330: 6e 20 73 64 6c 2d 63 6f 6d 6d 6f 6e 2d 65 76 65 n sdl-common-eve
3340: 6e 74 2d 74 29 20 20 20 20 20 20 20 20 20 3b 20 nt-t) ;
3350: 2f 2a 2a 3c 20 43 6f 6d 6d 6f 6e 20 65 76 65 6e /**< Common even
3360: 74 20 64 61 74 61 20 2a 2f 0a 20 20 20 28 77 69 t data */. (wi
3370: 6e 64 6f 77 20 73 64 6c 2d 77 69 6e 64 6f 77 2d ndow sdl-window-
3380: 65 76 65 6e 74 2d 74 29 20 20 20 20 20 20 20 20 event-t)
3390: 20 3b 20 2f 2a 2a 3c 20 57 69 6e 64 6f 77 20 65 ; /**< Window e
33a0: 76 65 6e 74 20 64 61 74 61 20 2a 2f 0a 20 20 20 vent data */.
33b0: 28 6b 65 79 20 73 64 6c 2d 6b 65 79 62 6f 61 72 (key sdl-keyboar
33c0: 64 2d 65 76 65 6e 74 2d 74 29 20 20 20 20 20 20 d-event-t)
33d0: 20 20 20 20 3b 20 2f 2a 2a 3c 20 4b 65 79 62 6f ; /**< Keybo
33e0: 61 72 64 20 65 76 65 6e 74 20 64 61 74 61 20 2a ard event data *
33f0: 2f 0a 20 20 20 28 65 64 69 74 20 73 64 6c 2d 74 /. (edit sdl-t
3400: 65 78 74 2d 65 64 69 74 69 6e 67 2d 65 76 65 6e ext-editing-even
3410: 74 2d 74 29 20 20 20 20 20 20 3b 20 2f 2a 2a 3c t-t) ; /**<
3420: 20 54 65 78 74 20 65 64 69 74 69 6e 67 20 65 76 Text editing ev
3430: 65 6e 74 20 64 61 74 61 20 2a 2f 0a 20 20 20 28 ent data */. (
3440: 74 65 78 74 20 73 64 6c 2d 74 65 78 74 2d 69 6e text sdl-text-in
3450: 70 75 74 2d 65 76 65 6e 74 2d 74 29 20 20 20 20 put-event-t)
3460: 20 20 20 20 3b 20 2f 2a 2a 3c 20 54 65 78 74 20 ; /**< Text
3470: 69 6e 70 75 74 20 65 76 65 6e 74 20 64 61 74 61 input event data
3480: 20 2a 2f 0a 20 20 20 28 6d 6f 74 69 6f 6e 20 73 */. (motion s
3490: 64 6c 2d 6d 6f 75 73 65 2d 6d 6f 74 69 6f 6e 2d dl-mouse-motion-
34a0: 65 76 65 6e 74 2d 74 29 20 20 20 20 3b 20 2f 2a event-t) ; /*
34b0: 2a 3c 20 4d 6f 75 73 65 20 6d 6f 74 69 6f 6e 20 *< Mouse motion
34c0: 65 76 65 6e 74 20 64 61 74 61 20 2a 2f 0a 20 20 event data */.
34d0: 20 28 62 75 74 74 6f 6e 20 73 64 6c 2d 6d 6f 75 (button sdl-mou
34e0: 73 65 2d 62 75 74 74 6f 6e 2d 65 76 65 6e 74 2d se-button-event-
34f0: 74 29 20 20 20 20 3b 20 2f 2a 2a 3c 20 4d 6f 75 t) ; /**< Mou
3500: 73 65 20 62 75 74 74 6f 6e 20 65 76 65 6e 74 20 se button event
3510: 64 61 74 61 20 2a 2f 0a 20 20 20 28 77 68 65 65 data */. (whee
3520: 6c 20 73 64 6c 2d 6d 6f 75 73 65 2d 77 68 65 65 l sdl-mouse-whee
3530: 6c 2d 65 76 65 6e 74 2d 74 29 20 20 20 20 20 20 l-event-t)
3540: 3b 20 2f 2a 2a 3c 20 4d 6f 75 73 65 20 77 68 65 ; /**< Mouse whe
3550: 65 6c 20 65 76 65 6e 74 20 64 61 74 61 20 2a 2f el event data */
3560: 0a 20 20 20 28 6a 61 78 69 73 20 73 64 6c 2d 6a . (jaxis sdl-j
3570: 6f 79 2d 61 78 69 73 2d 65 76 65 6e 74 2d 74 29 oy-axis-event-t)
3580: 20 20 20 20 20 20 20 20 20 3b 20 2f 2a 2a 3c 20 ; /**<
3590: 4a 6f 79 73 74 69 63 6b 20 61 78 69 73 20 65 76 Joystick axis ev
35a0: 65 6e 74 20 64 61 74 61 20 2a 2f 0a 20 20 20 28 ent data */. (
35b0: 6a 62 61 6c 6c 20 73 64 6c 2d 6a 6f 79 2d 62 61 jball sdl-joy-ba
35c0: 6c 6c 2d 65 76 65 6e 74 2d 74 29 20 20 20 20 20 ll-event-t)
35d0: 20 20 20 20 3b 20 2f 2a 2a 3c 20 4a 6f 79 73 74 ; /**< Joyst
35e0: 69 63 6b 20 62 61 6c 6c 20 65 76 65 6e 74 20 64 ick ball event d
35f0: 61 74 61 20 2a 2f 0a 20 20 20 28 6a 68 61 74 20 ata */. (jhat
3600: 73 64 6c 2d 6a 6f 79 2d 68 61 74 2d 65 76 65 6e sdl-joy-hat-even
3610: 74 2d 74 29 20 20 20 20 20 20 20 20 20 20 20 3b t-t) ;
3620: 20 2f 2a 2a 3c 20 4a 6f 79 73 74 69 63 6b 20 68 /**< Joystick h
3630: 61 74 20 65 76 65 6e 74 20 64 61 74 61 20 2a 2f at event data */
3640: 0a 20 20 20 28 6a 62 75 74 74 6f 6e 20 73 64 6c . (jbutton sdl
3650: 2d 6a 6f 79 2d 62 75 74 74 6f 6e 2d 65 76 65 6e -joy-button-even
3660: 74 2d 74 29 20 20 20 20 20 3b 20 2f 2a 2a 3c 20 t-t) ; /**<
3670: 4a 6f 79 73 74 69 63 6b 20 62 75 74 74 6f 6e 20 Joystick button
3680: 65 76 65 6e 74 20 64 61 74 61 20 2a 2f 0a 20 20 event data */.
3690: 20 28 6a 64 65 76 69 63 65 20 73 64 6c 2d 6a 6f (jdevice sdl-jo
36a0: 79 2d 64 65 76 69 63 65 2d 65 76 65 6e 74 2d 74 y-device-event-t
36b0: 29 20 20 20 20 20 3b 20 2f 2a 2a 3c 20 4a 6f 79 ) ; /**< Joy
36c0: 73 74 69 63 6b 20 64 65 76 69 63 65 20 63 68 61 stick device cha
36d0: 6e 67 65 20 65 76 65 6e 74 20 64 61 74 61 20 2a nge event data *
36e0: 2f 0a 20 20 20 28 63 61 78 69 73 20 73 64 6c 2d /. (caxis sdl-
36f0: 63 6f 6e 74 72 6f 6c 6c 65 72 2d 61 78 69 73 2d controller-axis-
3700: 65 76 65 6e 74 2d 74 29 20 20 20 20 20 20 3b 20 event-t) ;
3710: 2f 2a 2a 3c 20 47 61 6d 65 20 43 6f 6e 74 72 6f /**< Game Contro
3720: 6c 6c 65 72 20 61 78 69 73 20 65 76 65 6e 74 20 ller axis event
3730: 64 61 74 61 20 2a 2f 0a 20 20 20 28 63 62 75 74 data */. (cbut
3740: 74 6f 6e 20 73 64 6c 2d 63 6f 6e 74 72 6f 6c 6c ton sdl-controll
3750: 65 72 2d 62 75 74 74 6f 6e 2d 65 76 65 6e 74 2d er-button-event-
3760: 74 29 20 20 3b 20 2f 2a 2a 3c 20 47 61 6d 65 20 t) ; /**< Game
3770: 43 6f 6e 74 72 6f 6c 6c 65 72 20 62 75 74 74 6f Controller butto
3780: 6e 20 65 76 65 6e 74 20 64 61 74 61 20 2a 2f 0a n event data */.
3790: 20 20 20 28 63 64 65 76 69 63 65 20 73 64 6c 2d (cdevice sdl-
37a0: 63 6f 6e 74 72 6f 6c 6c 65 72 2d 64 65 76 69 63 controller-devic
37b0: 65 2d 65 76 65 6e 74 2d 74 29 20 20 3b 20 2f 2a e-event-t) ; /*
37c0: 2a 3c 20 47 61 6d 65 20 43 6f 6e 74 72 6f 6c 6c *< Game Controll
37d0: 65 72 20 64 65 76 69 63 65 20 65 76 65 6e 74 20 er device event
37e0: 64 61 74 61 20 2a 2f 0a 20 20 20 28 71 75 69 74 data */. (quit
37f0: 20 73 64 6c 2d 71 75 69 74 2d 65 76 65 6e 74 2d sdl-quit-event-
3800: 74 29 20 20 20 20 20 20 20 20 20 20 20 20 20 3b t) ;
3810: 20 2f 2a 2a 3c 20 51 75 69 74 20 72 65 71 75 65 /**< Quit reque
3820: 73 74 20 65 76 65 6e 74 20 64 61 74 61 20 2a 2f st event data */
3830: 0a 20 20 20 28 75 73 65 72 20 73 64 6c 2d 75 73 . (user sdl-us
3840: 65 72 2d 65 76 65 6e 74 2d 74 29 20 20 20 20 20 er-event-t)
3850: 20 20 20 20 20 20 20 20 3b 20 2f 2a 2a 3c 20 43 ; /**< C
3860: 75 73 74 6f 6d 20 65 76 65 6e 74 20 64 61 74 61 ustom event data
3870: 20 2a 2f 0a 20 20 20 28 73 79 73 77 6d 20 73 64 */. (syswm sd
3880: 6c 2d 73 79 73 2d 77 6d 2d 65 76 65 6e 74 2d 74 l-sys-wm-event-t
3890: 29 20 20 20 20 20 20 20 20 20 20 20 3b 20 2f 2a ) ; /*
38a0: 2a 3c 20 53 79 73 74 65 6d 20 64 65 70 65 6e 64 *< System depend
38b0: 65 6e 74 20 77 69 6e 64 6f 77 20 65 76 65 6e 74 ent window event
38c0: 20 64 61 74 61 20 2a 2f 0a 20 20 20 28 74 66 69 data */. (tfi
38d0: 6e 67 65 72 20 73 64 6c 2d 74 6f 75 63 68 2d 66 nger sdl-touch-f
38e0: 69 6e 67 65 72 2d 65 76 65 6e 74 2d 74 29 20 20 inger-event-t)
38f0: 20 3b 20 2f 2a 2a 3c 20 54 6f 75 63 68 20 66 69 ; /**< Touch fi
3900: 6e 67 65 72 20 65 76 65 6e 74 20 64 61 74 61 20 nger event data
3910: 2a 2f 0a 20 20 20 28 6d 67 65 73 74 75 72 65 20 */. (mgesture
3920: 73 64 6c 2d 6d 75 6c 74 69 2d 67 65 73 74 75 72 sdl-multi-gestur
3930: 65 2d 65 76 65 6e 74 2d 74 29 20 3b 20 2f 2a 2a e-event-t) ; /**
3940: 3c 20 47 65 73 74 75 72 65 20 65 76 65 6e 74 20 < Gesture event
3950: 64 61 74 61 20 2a 2f 0a 20 20 20 28 64 67 65 73 data */. (dges
3960: 74 75 72 65 20 73 64 6c 2d 64 6f 6c 6c 61 72 2d ture sdl-dollar-
3970: 67 65 73 74 75 72 65 2d 65 76 65 6e 74 2d 74 29 gesture-event-t)
3980: 20 3b 20 2f 2a 2a 3c 20 47 65 73 74 75 72 65 20 ; /**< Gesture
3990: 65 76 65 6e 74 20 64 61 74 61 20 2a 2f 0a 20 20 event data */.
39a0: 20 28 64 72 6f 70 20 73 64 6c 2d 64 72 6f 70 2d (drop sdl-drop-
39b0: 65 76 65 6e 74 2d 74 29 20 20 20 20 20 20 20 20 event-t)
39c0: 20 20 20 20 20 3b 20 2f 2a 2a 3c 20 44 72 61 67 ; /**< Drag
39d0: 20 61 6e 64 20 64 72 6f 70 20 65 76 65 6e 74 20 and drop event
39e0: 64 61 74 61 20 2a 2f 0a 0a 20 20 20 20 3b 3b 20 data */.. ;;
39f0: 2f 2a 20 54 68 69 73 20 69 73 20 6e 65 63 65 73 /* This is neces
3a00: 73 61 72 79 20 66 6f 72 20 41 42 49 20 63 6f 6d sary for ABI com
3a10: 70 61 74 69 62 69 6c 69 74 79 20 62 65 74 77 65 patibility betwe
3a20: 65 6e 20 56 69 73 75 61 6c 20 43 2b 2b 20 61 6e en Visual C++ an
3a30: 64 20 47 43 43 0a 20 20 20 20 3b 3b 20 20 20 20 d GCC. ;;
3a40: 56 69 73 75 61 6c 20 43 2b 2b 20 77 69 6c 6c 20 Visual C++ will
3a50: 72 65 73 70 65 63 74 20 74 68 65 20 70 75 73 68 respect the push
3a60: 20 70 61 63 6b 20 70 72 61 67 6d 61 20 61 6e 64 pack pragma and
3a70: 20 75 73 65 20 35 32 20 62 79 74 65 73 20 66 6f use 52 bytes fo
3a80: 72 0a 20 20 20 20 3b 3b 20 20 20 20 74 68 69 73 r. ;; this
3a90: 20 73 74 72 75 63 74 75 72 65 2c 20 61 6e 64 20 structure, and
3aa0: 47 43 43 20 77 69 6c 6c 20 75 73 65 20 74 68 65 GCC will use the
3ab0: 20 61 6c 69 67 6e 6d 65 6e 74 20 6f 66 20 74 68 alignment of th
3ac0: 65 20 6c 61 72 67 65 73 74 20 64 61 74 61 74 79 e largest dataty
3ad0: 70 65 0a 20 20 20 20 3b 3b 20 20 20 20 77 69 74 pe. ;; wit
3ae0: 68 69 6e 20 74 68 65 20 75 6e 69 6f 6e 2c 20 77 hin the union, w
3af0: 68 69 63 68 20 69 73 20 38 20 62 79 74 65 73 2e hich is 8 bytes.
3b00: 0a 0a 20 20 20 20 3b 3b 20 20 20 20 53 6f 2e 2e .. ;; So..
3b10: 2e 20 77 65 27 6c 6c 20 61 64 64 20 70 61 64 64 . we'll add padd
3b20: 69 6e 67 20 74 6f 20 66 6f 72 63 65 20 74 68 65 ing to force the
3b30: 20 73 69 7a 65 20 74 6f 20 62 65 20 35 36 20 62 size to be 56 b
3b40: 79 74 65 73 20 66 6f 72 20 62 6f 74 68 2e 0a 20 ytes for both..
3b50: 20 20 20 3b 3b 20 2a 2f 0a 20 20 20 28 70 61 64 ;; */. (pad
3b60: 64 69 6e 67 20 28 61 72 72 61 79 20 35 36 20 75 ding (array 56 u
3b70: 69 6e 74 38 29 29 29 29 0a 0a 28 64 65 66 69 6e int8))))..(defin
3b80: 65 2d 65 6e 75 6d 65 72 61 74 69 6f 6e 2a 20 73 e-enumeration* s
3b90: 64 6c 2d 65 76 65 6e 74 61 63 74 69 6f 6e 20 0a dl-eventaction .
3ba0: 20 20 28 61 64 64 20 70 65 65 6b 20 67 65 74 29 (add peek get)
3bb0: 29 0a 20 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 ). .(define-ftyp
3bc0: 65 20 73 64 6c 2d 65 76 65 6e 74 2d 66 69 6c 74 e sdl-event-filt
3bd0: 65 72 2d 74 20 76 6f 69 64 2a 29 20 3b 46 49 58 er-t void*) ;FIX
3be0: 4d 45 20 28 66 75 6e 63 74 69 6f 6e 20 28 76 6f ME (function (vo
3bf0: 69 64 2a 20 73 64 6c 2d 65 76 65 6e 74 2a 29 20 id* sdl-event*)
3c00: 69 6e 74 29 29 0a 0a 28 64 65 66 69 6e 65 20 73 int))..(define s
3c10: 64 6c 2d 71 75 65 72 79 20 2d 31 29 0a 28 64 65 dl-query -1).(de
3c20: 66 69 6e 65 20 73 64 6c 2d 69 67 6e 6f 72 65 20 fine sdl-ignore
3c30: 30 29 0a 28 64 65 66 69 6e 65 20 73 64 6c 2d 64 0).(define sdl-d
3c40: 69 73 61 62 6c 65 20 30 29 0a 28 64 65 66 69 6e isable 0).(defin
3c50: 65 20 73 64 6c 2d 65 6e 61 62 6c 65 20 31 29 0a e sdl-enable 1).