Artifact
9c1fc33e44873fde4f514ba3d781f70e1945c3a4:
- File
sdl2/video-types.ss
— part of check-in
[6aa9c190e9]
at
2016-12-14 15:56:03
on branch trunk
— added take-focus and hit-test to sdl2 (>=2.0.5)
(user:
aldo
size: 4352)
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 20 28 64 65 66 69 6e 65 2d ense... (define-
0260: 66 74 79 70 65 20 73 64 6c 2d 64 69 73 70 6c 61 ftype sdl-displa
0270: 79 2d 6d 6f 64 65 2d 74 20 3b 20 2f 75 73 72 2f y-mode-t ; /usr/
0280: 69 6e 63 6c 75 64 65 2f 53 44 4c 32 2f 53 44 4c include/SDL2/SDL
0290: 5f 76 69 64 65 6f 2e 68 3a 35 33 3a 39 0a 20 20 _video.h:53:9.
02a0: 20 28 73 74 72 75 63 74 20 0a 20 20 20 20 28 66 (struct . (f
02b0: 6f 72 6d 61 74 20 75 69 6e 74 33 32 29 0a 20 20 ormat uint32).
02c0: 20 20 28 77 20 69 6e 74 29 0a 20 20 20 20 28 68 (w int). (h
02d0: 20 69 6e 74 29 0a 20 20 20 20 28 72 65 66 72 65 int). (refre
02e0: 73 68 2d 72 61 74 65 20 69 6e 74 29 0a 20 20 20 sh-rate int).
02f0: 20 28 64 72 69 76 65 72 64 61 74 61 20 76 6f 69 (driverdata voi
0300: 64 2a 29 29 29 0a 0a 20 28 64 65 66 69 6e 65 2d d*))).. (define-
0310: 66 74 79 70 65 20 73 64 6c 2d 77 69 6e 64 6f 77 ftype sdl-window
0320: 2d 74 20 28 73 74 72 75 63 74 29 29 0a 0a 20 28 -t (struct)).. (
0330: 64 65 66 69 6e 65 2d 66 6c 61 67 73 20 73 64 6c define-flags sdl
0340: 2d 77 69 6e 64 6f 77 2d 66 6c 61 67 73 0a 20 20 -window-flags.
0350: 20 20 20 28 66 75 6c 6c 73 63 72 65 65 6e 20 20 (fullscreen
0360: 20 23 78 30 30 30 30 30 30 30 31 29 20 20 20 20 #x00000001)
0370: 20 20 20 20 3b 20 66 75 6c 6c 73 63 72 65 65 6e ; fullscreen
0380: 20 77 69 6e 64 6f 77 20 2a 2f 0a 20 20 20 20 20 window */.
0390: 28 6f 70 65 6e 67 6c 20 20 20 23 78 30 30 30 30 (opengl #x0000
03a0: 30 30 30 32 29 20 20 20 20 20 20 20 20 20 20 20 0002)
03b0: 20 3b 20 77 69 6e 64 6f 77 20 75 73 61 62 6c 65 ; window usable
03c0: 20 77 69 74 68 20 6f 70 65 6e 67 6c 20 63 6f 6e with opengl con
03d0: 74 65 78 74 20 2a 2f 0a 20 20 20 20 20 28 73 68 text */. (sh
03e0: 6f 77 6e 20 20 20 23 78 30 30 30 30 30 30 30 34 own #x00000004
03f0: 29 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 ) ;
0400: 77 69 6e 64 6f 77 20 69 73 20 76 69 73 69 62 6c window is visibl
0410: 65 20 2a 2f 0a 20 20 20 20 20 28 68 69 64 64 65 e */. (hidde
0420: 6e 20 20 20 23 78 30 30 30 30 30 30 30 38 29 20 n #x00000008)
0430: 20 20 20 20 20 20 20 20 20 20 20 3b 20 77 69 6e ; win
0440: 64 6f 77 20 69 73 20 6e 6f 74 20 76 69 73 69 62 dow is not visib
0450: 6c 65 20 2a 2f 0a 20 20 20 20 20 28 62 6f 72 64 le */. (bord
0460: 65 72 6c 65 73 73 20 20 20 23 78 30 30 30 30 30 erless #x00000
0470: 30 31 30 29 20 20 20 20 20 20 20 20 3b 20 6e 6f 010) ; no
0480: 20 77 69 6e 64 6f 77 20 64 65 63 6f 72 61 74 69 window decorati
0490: 6f 6e 20 2a 2f 0a 20 20 20 20 20 28 72 65 73 69 on */. (resi
04a0: 7a 61 62 6c 65 20 20 20 23 78 30 30 30 30 30 30 zable #x000000
04b0: 32 30 29 20 20 20 20 20 20 20 20 20 3b 20 77 69 20) ; wi
04c0: 6e 64 6f 77 20 63 61 6e 20 62 65 20 72 65 73 69 ndow can be resi
04d0: 7a 65 64 20 2a 2f 0a 20 20 20 20 20 28 6d 69 6e zed */. (min
04e0: 69 6d 69 7a 65 64 20 20 20 23 78 30 30 30 30 30 imized #x00000
04f0: 30 34 30 29 20 20 20 20 20 20 20 20 20 3b 20 77 040) ; w
0500: 69 6e 64 6f 77 20 69 73 20 6d 69 6e 69 6d 69 7a indow is minimiz
0510: 65 64 20 2a 2f 0a 20 20 20 20 20 28 6d 61 78 69 ed */. (maxi
0520: 6d 69 7a 65 64 20 20 20 23 78 30 30 30 30 30 30 mized #x000000
0530: 38 30 29 20 20 20 20 20 20 20 20 20 3b 20 77 69 80) ; wi
0540: 6e 64 6f 77 20 69 73 20 6d 61 78 69 6d 69 7a 65 ndow is maximize
0550: 64 20 2a 2f 0a 20 20 20 20 20 28 69 6e 70 75 74 d */. (input
0560: 5f 67 72 61 62 62 65 64 20 20 20 23 78 30 30 30 _grabbed #x000
0570: 30 30 31 30 30 29 20 20 20 20 20 3b 20 77 69 6e 00100) ; win
0580: 64 6f 77 20 68 61 73 20 67 72 61 62 62 65 64 20 dow has grabbed
0590: 69 6e 70 75 74 20 66 6f 63 75 73 20 2a 2f 0a 20 input focus */.
05a0: 20 20 20 20 28 69 6e 70 75 74 2d 66 6f 63 75 73 (input-focus
05b0: 20 20 20 23 78 30 30 30 30 30 32 30 30 29 20 20 #x00000200)
05c0: 20 20 20 20 20 3b 20 77 69 6e 64 6f 77 20 68 61 ; window ha
05d0: 73 20 69 6e 70 75 74 20 66 6f 63 75 73 20 2a 2f s input focus */
05e0: 0a 20 20 20 20 20 28 6d 6f 75 73 65 2d 66 6f 63 . (mouse-foc
05f0: 75 73 20 20 20 23 78 30 30 30 30 30 34 30 30 29 us #x00000400)
0600: 20 20 20 20 20 20 20 3b 20 77 69 6e 64 6f 77 20 ; window
0610: 68 61 73 20 6d 6f 75 73 65 20 66 6f 63 75 73 20 has mouse focus
0620: 2a 2f 0a 20 20 20 20 20 28 66 75 6c 6c 73 63 72 */. (fullscr
0630: 65 65 6e 2d 64 65 73 6b 74 6f 70 20 20 20 23 78 een-desktop #x
0640: 30 30 30 30 31 30 30 31 29 0a 20 20 20 20 20 28 00001001). (
0650: 66 6f 72 65 69 67 6e 20 20 20 23 78 30 30 30 30 foreign #x0000
0660: 30 38 30 30 29 20 20 20 20 20 20 20 20 20 20 20 0800)
0670: 3b 20 77 69 6e 64 6f 77 20 6e 6f 74 20 63 72 65 ; window not cre
0680: 61 74 65 64 20 62 79 20 73 64 6c 20 2a 2f 0a 20 ated by sdl */.
0690: 20 20 20 20 28 61 6c 6c 6f 77 2d 68 69 67 68 64 (allow-highd
06a0: 70 69 20 20 20 23 78 30 30 30 30 32 30 30 30 29 pi #x00002000)
06b0: 29 20 20 20 20 3b 20 77 69 6e 64 6f 77 20 73 68 ) ; window sh
06c0: 6f 75 6c 64 20 62 65 20 63 72 65 61 74 65 64 20 ould be created
06d0: 69 6e 20 68 69 67 68 2d 64 70 69 20 6d 6f 64 65 in high-dpi mode
06e0: 20 69 66 20 73 75 70 70 6f 72 74 65 64 20 2a 2f if supported */
06f0: 0a 0a 0a 0a 20 28 64 65 66 69 6e 65 20 73 64 6c .... (define sdl
0700: 2d 77 69 6e 64 6f 77 2d 70 6f 73 2d 75 6e 64 65 -window-pos-unde
0710: 66 69 6e 65 64 20 23 78 31 66 66 66 30 30 30 30 fined #x1fff0000
0720: 29 0a 20 28 64 65 66 69 6e 65 20 28 73 64 6c 2d ). (define (sdl-
0730: 77 69 6e 64 6f 77 2d 70 6f 73 2d 75 6e 64 65 66 window-pos-undef
0740: 69 6e 65 64 3f 20 78 29 0a 20 20 20 28 3d 20 28 ined? x). (= (
0750: 6c 6f 67 61 6e 64 20 78 20 23 78 66 66 66 66 30 logand x #xffff0
0760: 30 30 30 29 20 73 64 6c 2d 77 69 6e 64 6f 77 2d 000) sdl-window-
0770: 70 6f 73 2d 75 6e 64 65 66 69 6e 65 64 29 29 0a pos-undefined)).
0780: 0a 20 28 64 65 66 69 6e 65 20 73 64 6c 2d 77 69 . (define sdl-wi
0790: 6e 64 6f 77 2d 70 6f 73 2d 63 65 6e 74 65 72 65 ndow-pos-centere
07a0: 64 20 23 78 32 66 66 66 30 30 30 30 29 0a 20 28 d #x2fff0000). (
07b0: 64 65 66 69 6e 65 20 28 73 64 6c 2d 77 69 6e 64 define (sdl-wind
07c0: 6f 77 2d 70 6f 73 2d 63 65 6e 74 65 72 65 64 3f ow-pos-centered?
07d0: 20 78 29 0a 20 20 20 28 3d 20 28 6c 6f 67 61 6e x). (= (logan
07e0: 64 20 78 20 23 78 66 66 66 66 30 30 30 30 29 20 d x #xffff0000)
07f0: 73 64 6c 2d 77 69 6e 64 6f 77 2d 70 6f 73 2d 63 sdl-window-pos-c
0800: 65 6e 74 65 72 65 64 29 29 0a 0a 20 28 64 65 66 entered)).. (def
0810: 69 6e 65 2d 65 6e 75 6d 65 72 61 74 69 6f 6e 2a ine-enumeration*
0820: 20 73 64 6c 2d 77 69 6e 64 6f 77 2d 65 76 65 6e sdl-window-even
0830: 74 2d 65 6e 75 6d 0a 20 20 20 20 28 6e 6f 6e 65 t-enum. (none
0840: 20 20 20 20 20 20 20 3b 20 6e 65 76 65 72 20 75 ; never u
0850: 73 65 64 20 2a 2f 0a 20 20 20 20 20 73 68 6f 77 sed */. show
0860: 6e 20 20 20 20 20 20 20 20 3b 20 77 69 6e 64 6f n ; windo
0870: 77 20 68 61 73 20 62 65 65 6e 20 73 68 6f 77 6e w has been shown
0880: 20 2a 2f 0a 20 20 20 20 20 68 69 64 64 65 6e 20 */. hidden
0890: 20 20 20 20 20 20 3b 20 77 69 6e 64 6f 77 20 68 ; window h
08a0: 61 73 20 62 65 65 6e 20 68 69 64 64 65 6e 20 2a as been hidden *
08b0: 2f 0a 20 20 20 20 20 65 78 70 6f 73 65 64 20 20 /. exposed
08c0: 20 20 20 20 3b 20 77 69 6e 64 6f 77 20 68 61 73 ; window has
08d0: 20 62 65 65 6e 20 65 78 70 6f 73 65 64 20 61 6e been exposed an
08e0: 64 20 73 68 6f 75 6c 64 20 62 65 72 65 64 72 61 d should beredra
08f0: 77 6e 20 2a 2f 0a 20 20 20 20 20 6d 6f 76 65 64 wn */. moved
0900: 20 20 20 20 20 20 20 20 3b 20 77 69 6e 64 6f 77 ; window
0910: 20 68 61 73 20 62 65 65 6e 20 6d 6f 76 65 64 20 has been moved
0920: 74 6f 20 64 61 74 61 31 2c 20 64 61 74 61 32 20 to data1, data2
0930: 2a 2f 0a 20 20 20 20 20 72 65 73 69 7a 65 64 20 */. resized
0940: 20 20 20 20 20 3b 20 77 69 6e 64 6f 77 20 68 61 ; window ha
0950: 73 20 62 65 65 6e 20 72 65 73 69 7a 65 64 20 74 s been resized t
0960: 6f 20 64 61 74 61 31 78 64 61 74 61 32 20 2a 2f o data1xdata2 */
0970: 0a 20 20 20 20 20 73 69 7a 65 2d 63 68 61 6e 67 . size-chang
0980: 65 64 20 3b 20 74 68 65 20 77 69 6e 64 6f 77 20 ed ; the window
0990: 73 69 7a 65 20 68 61 73 20 63 68 61 6e 67 65 64 size has changed
09a0: 2c 20 65 69 74 68 65 72 20 61 73 20 61 20 72 65 , either as a re
09b0: 73 75 6c 74 20 6f 66 20 61 6e 0a 20 20 20 20 20 sult of an.
09c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
09d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
09e0: 20 20 20 3b 20 61 70 69 20 63 61 6c 6c 20 6f 72 ; api call or
09f0: 20 74 68 72 6f 75 67 68 20 74 68 65 20 73 79 73 through the sys
0a00: 74 65 6d 20 6f 72 20 75 73 65 72 20 63 68 61 6e tem or user chan
0a10: 67 69 6e 67 20 74 68 65 20 77 69 6e 64 6f 77 20 ging the window
0a20: 73 69 7a 65 2e 20 2a 2f 0a 20 20 20 20 20 6d 69 size. */. mi
0a30: 6e 69 6d 69 7a 65 64 20 20 20 20 3b 20 77 69 6e nimized ; win
0a40: 64 6f 77 20 68 61 73 20 62 65 65 6e 20 6d 69 6e dow has been min
0a50: 69 6d 69 7a 65 64 20 2a 2f 0a 20 20 20 20 20 6d imized */. m
0a60: 61 78 69 6d 69 7a 65 64 20 20 20 20 3b 20 77 69 aximized ; wi
0a70: 6e 64 6f 77 20 68 61 73 20 62 65 65 6e 20 6d 61 ndow has been ma
0a80: 78 69 6d 69 7a 65 64 20 2a 2f 0a 20 20 20 20 20 ximized */.
0a90: 72 65 73 74 6f 72 65 64 20 20 20 20 20 3b 20 77 restored ; w
0aa0: 69 6e 64 6f 77 20 68 61 73 20 62 65 65 6e 20 72 indow has been r
0ab0: 65 73 74 6f 72 65 64 20 74 6f 20 6e 6f 72 6d 61 estored to norma
0ac0: 6c 20 73 69 7a 65 61 6e 64 20 70 6f 73 69 74 69 l sizeand positi
0ad0: 6f 6e 20 2a 2f 0a 20 20 20 20 20 65 6e 74 65 72 on */. enter
0ae0: 20 20 20 20 20 20 20 20 3b 20 77 69 6e 64 6f 77 ; window
0af0: 20 68 61 73 20 67 61 69 6e 65 64 20 6d 6f 75 73 has gained mous
0b00: 65 20 66 6f 63 75 73 20 2a 2f 0a 20 20 20 20 20 e focus */.
0b10: 6c 65 61 76 65 20 20 20 20 20 20 20 20 3b 20 77 leave ; w
0b20: 69 6e 64 6f 77 20 68 61 73 20 6c 6f 73 74 20 6d indow has lost m
0b30: 6f 75 73 65 20 66 6f 63 75 73 20 2a 2f 0a 20 20 ouse focus */.
0b40: 20 20 20 66 6f 63 75 73 2d 67 61 69 6e 65 64 20 focus-gained
0b50: 3b 20 77 69 6e 64 6f 77 20 68 61 73 20 67 61 69 ; window has gai
0b60: 6e 65 64 20 6b 65 79 62 6f 61 72 64 20 66 6f 63 ned keyboard foc
0b70: 75 73 20 2a 2f 0a 20 20 20 20 20 66 6f 63 75 73 us */. focus
0b80: 2d 6c 6f 73 74 20 20 20 3b 20 77 69 6e 64 6f 77 -lost ; window
0b90: 20 68 61 73 20 6c 6f 73 74 20 6b 65 79 62 6f 61 has lost keyboa
0ba0: 72 64 20 66 6f 63 75 73 20 2a 2f 0a 20 20 20 20 rd focus */.
0bb0: 20 63 6c 6f 73 65 20 20 20 20 20 20 20 20 3b 20 close ;
0bc0: 54 68 65 20 77 69 6e 64 6f 77 20 6d 61 6e 61 67 The window manag
0bd0: 65 72 20 72 65 71 75 65 73 74 73 20 74 68 61 74 er requests that
0be0: 20 74 68 65 77 69 6e 64 6f 77 20 62 65 20 63 6c thewindow be cl
0bf0: 6f 73 65 64 20 2a 2f 0a 20 20 20 20 20 3b 3b 3b osed */. ;;;
0c00: 20 74 68 65 73 65 20 61 72 65 20 69 6e 20 28 3e these are in (>
0c10: 3d 20 53 44 4c 20 32 2e 30 2e 35 29 0a 20 20 20 = SDL 2.0.5).
0c20: 20 20 74 61 6b 65 2d 66 6f 63 75 73 20 20 20 3b take-focus ;
0c30: 20 57 69 6e 64 6f 77 20 69 73 20 62 65 69 6e 67 Window is being
0c40: 20 6f 66 66 65 72 65 64 20 61 20 66 6f 63 75 73 offered a focus
0c50: 20 28 73 68 6f 75 6c 64 20 53 65 74 57 69 6e 64 (should SetWind
0c60: 6f 77 49 6e 70 75 74 46 6f 63 75 73 28 29 20 6f owInputFocus() o
0c70: 6e 20 69 74 73 65 6c 66 20 6f 72 20 61 20 73 75 n itself or a su
0c80: 62 77 69 6e 64 6f 77 2c 20 6f 72 20 69 67 6e 6f bwindow, or igno
0c90: 72 65 29 20 0a 20 20 20 20 20 68 69 74 2d 74 65 re) . hit-te
0ca0: 73 74 20 20 20 20 20 3b 20 57 69 6e 64 6f 77 20 st ; Window
0cb0: 68 61 64 20 61 20 68 69 74 20 74 65 73 74 20 74 had a hit test t
0cc0: 68 61 74 20 77 61 73 6e 27 74 20 53 44 4c 5f 48 hat wasn't SDL_H
0cd0: 49 54 54 45 53 54 5f 4e 4f 52 4d 41 4c 2e 0a 20 ITTEST_NORMAL..
0ce0: 20 20 20 20 29 29 0a 0a 20 28 64 65 66 69 6e 65 )).. (define
0cf0: 2d 65 6e 75 6d 65 72 61 74 69 6f 6e 2a 20 73 64 -enumeration* sd
0d00: 6c 2d 67 6c 2d 61 74 74 72 0a 20 20 20 28 72 65 l-gl-attr. (re
0d10: 64 2d 73 69 7a 65 20 67 72 65 65 6e 2d 73 69 7a d-size green-siz
0d20: 65 20 62 6c 75 65 2d 73 69 7a 65 0a 09 20 20 20 e blue-size..
0d30: 20 20 61 6c 70 68 61 2d 73 69 7a 65 20 62 75 66 alpha-size buf
0d40: 66 65 72 2d 73 69 7a 65 20 64 6f 75 62 6c 65 62 fer-size doubleb
0d50: 75 66 66 65 72 20 64 65 70 74 68 2d 73 69 7a 65 uffer depth-size
0d60: 20 73 74 65 6e 63 69 6c 2d 73 69 7a 65 0a 09 20 stencil-size..
0d70: 20 20 20 20 20 61 63 63 75 6d 2d 72 65 64 2d 73 accum-red-s
0d80: 69 7a 65 20 61 63 63 75 6d 2d 67 72 65 65 6e 2d ize accum-green-
0d90: 73 69 7a 65 20 61 63 63 75 6d 2d 62 6c 75 65 2d size accum-blue-
0da0: 73 69 7a 65 20 61 63 63 75 6d 2d 61 6c 70 68 61 size accum-alpha
0db0: 2d 73 69 7a 65 0a 09 20 20 20 20 20 20 73 74 65 -size.. ste
0dc0: 72 65 6f 20 6d 75 6c 74 69 73 61 6d 70 6c 65 62 reo multisampleb
0dd0: 75 66 66 65 72 73 20 6d 75 6c 74 69 73 61 6d 70 uffers multisamp
0de0: 6c 65 73 61 6d 70 6c 65 73 20 61 63 63 65 6c 65 lesamples accele
0df0: 72 61 74 65 64 2d 76 69 73 75 61 6c 0a 09 20 20 rated-visual..
0e00: 20 20 20 20 72 65 74 61 69 6e 65 64 2d 62 61 63 retained-bac
0e10: 6b 69 6e 67 20 63 6f 6e 74 65 78 74 2d 6d 61 6a king context-maj
0e20: 6f 72 2d 76 65 72 73 69 6f 6e 20 63 6f 6e 74 65 or-version conte
0e30: 78 74 2d 6d 69 6e 6f 72 2d 76 65 72 73 69 6f 6e xt-minor-version
0e40: 0a 09 20 20 20 20 20 20 63 6f 6e 74 65 78 74 2d .. context-
0e50: 65 67 6c 20 63 6f 6e 74 65 78 74 2d 66 6c 61 67 egl context-flag
0e60: 73 20 63 6f 6e 74 65 78 74 2d 70 72 6f 66 69 6c s context-profil
0e70: 65 2d 6d 61 73 6b 0a 09 20 20 20 20 20 20 73 68 e-mask.. sh
0e80: 61 72 65 2d 77 69 74 68 2d 63 75 72 72 65 6e 74 are-with-current
0e90: 2d 63 6f 6e 74 65 78 74 20 66 72 61 6d 65 62 75 -context framebu
0ea0: 66 66 65 72 2d 73 72 67 62 2d 63 61 70 61 62 6c ffer-srgb-capabl
0eb0: 65 29 29 0a 0a 20 28 64 65 66 69 6e 65 2d 66 6c e)).. (define-fl
0ec0: 61 67 73 20 73 64 6c 2d 67 6c 2d 70 72 6f 66 69 ags sdl-gl-profi
0ed0: 6c 65 20 28 63 6f 72 65 20 31 29 20 28 63 6f 6d le (core 1) (com
0ee0: 70 61 74 69 62 69 6c 69 74 79 20 32 29 20 28 65 patibility 2) (e
0ef0: 73 20 34 29 29 0a 0a 20 28 64 65 66 69 6e 65 2d s 4)).. (define-
0f00: 66 6c 61 67 73 20 73 64 6c 2d 67 6c 2d 63 6f 6e flags sdl-gl-con
0f10: 74 65 78 74 2d 66 6c 61 67 20 28 64 65 62 75 67 text-flag (debug
0f20: 20 31 29 20 28 66 6f 72 77 61 72 64 2d 63 6f 6d 1) (forward-com
0f30: 70 61 74 69 62 6c 65 20 32 29 20 28 72 6f 62 75 patible 2) (robu
0f40: 73 74 2d 61 63 63 65 73 73 20 34 29 20 28 72 65 st-access 4) (re
0f50: 73 65 74 2d 69 73 6f 6c 61 74 69 6f 6e 20 38 29 set-isolation 8)
0f60: 29 0a 0a 28 64 65 66 69 6e 65 2d 66 74 79 70 65 )..(define-ftype
0f70: 20 73 64 6c 2d 67 6c 2d 63 6f 6e 74 65 78 74 2d sdl-gl-context-
0f80: 74 20 76 6f 69 64 2a 29 0a 0a 28 64 65 66 69 6e t void*)..(defin
0f90: 65 2d 66 74 79 70 65 20 73 64 6c 2d 68 69 74 2d e-ftype sdl-hit-
0fa0: 74 65 73 74 2d 74 20 76 6f 69 64 2a 29 20 0a 20 test-t void*) .
0fb0: 3b 3b 20 74 79 70 65 64 65 66 20 53 44 4c 5f 48 ;; typedef SDL_H
0fc0: 69 74 54 65 73 74 52 65 73 75 6c 74 20 28 53 44 itTestResult (SD
0fd0: 4c 43 41 4c 4c 20 2a 53 44 4c 5f 48 69 74 54 65 LCALL *SDL_HitTe
0fe0: 73 74 29 28 53 44 4c 5f 57 69 6e 64 6f 77 20 2a st)(SDL_Window *
0ff0: 77 69 6e 2c 0a 20 3b 3b 20 20 20 20 20 20 20 20 win,. ;;
1000: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1010: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1020: 20 20 20 20 20 20 20 20 20 63 6f 6e 73 74 20 53 const S
1030: 44 4c 5f 50 6f 69 6e 74 20 2a 61 72 65 61 2c 0a DL_Point *area,.
1040: 20 3b 3b 20 20 20 20 20 20 20 20 20 20 20 20 20 ;;
1050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1060: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
1070: 20 20 20 20 76 6f 69 64 20 2a 64 61 74 61 29 3b void *data);
1080: 0a 20 28 64 65 66 69 6e 65 2d 65 6e 75 6d 65 72 . (define-enumer
1090: 61 74 69 6f 6e 2a 20 73 64 6c 2d 68 69 74 2d 74 ation* sdl-hit-t
10a0: 65 73 74 2d 72 65 73 75 6c 74 0a 20 20 20 28 6e est-result. (n
10b0: 6f 72 6d 61 6c 20 64 72 61 67 67 61 62 6c 65 20 ormal draggable
10c0: 74 6f 70 6c 65 66 74 20 74 6f 70 20 74 6f 70 72 topleft top topr
10d0: 69 67 68 74 20 72 69 67 68 74 20 62 6f 74 74 6f ight right botto
10e0: 6d 72 69 67 68 74 20 62 6f 74 74 6f 6d 20 62 6f mright bottom bo
10f0: 74 74 6f 6d 6c 65 66 74 20 6c 65 66 74 29 29 0a ttomleft left)).