Artifact
59607b9be202081477a2907ebb9beb0356067541:
- File
sdl2/messagebox-types.ss
— part of check-in
[b358a80757]
at
2016-09-04 14:50:46
on branch trunk
— added missing file changes
(user:
aldo
size: 1603)
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 6c 61 67 73 20 73 64 6c 2d 6d 65 73 73 61 67 flags sdl-messag
0270: 65 2d 62 6f 78 20 28 65 72 72 6f 72 20 20 23 78 e-box (error #x
0280: 31 30 29 20 28 77 61 72 6e 69 6e 67 20 23 78 32 10) (warning #x2
0290: 30 29 20 28 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 0) (information
02a0: 23 78 34 30 29 29 0a 20 20 20 20 20 20 20 20 20 #x40)).
02b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
02c0: 20 20 20 20 20 20 20 20 20 20 20 20 0a 20 28 64 . (d
02d0: 65 66 69 6e 65 2d 66 6c 61 67 73 20 73 64 6c 2d efine-flags sdl-
02e0: 6d 65 73 73 61 67 65 2d 62 6f 78 2d 62 75 74 74 message-box-butt
02f0: 6f 6e 0a 20 20 20 28 72 65 74 75 72 6e 6b 65 79 on. (returnkey
0300: 2d 64 65 66 61 75 6c 74 20 31 29 20 28 65 73 63 -default 1) (esc
0310: 61 70 65 6b 65 79 2d 64 65 66 61 75 6c 74 20 32 apekey-default 2
0320: 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 )).
0330: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0340: 20 20 20 20 20 20 20 20 20 20 0a 20 28 64 65 66 . (def
0350: 69 6e 65 2d 65 6e 75 6d 65 72 61 74 69 6f 6e 2a ine-enumeration*
0360: 20 73 64 6c 2d 6d 65 73 73 61 67 65 2d 62 6f 78 sdl-message-box
0370: 2d 63 6f 6c 6f 72 2d 74 79 70 65 2d 74 0a 20 20 -color-type-t.
0380: 20 28 62 61 63 6b 67 72 6f 75 6e 64 20 74 65 78 (background tex
0390: 74 20 62 75 74 74 6f 6e 2d 62 6f 72 64 65 72 20 t button-border
03a0: 62 75 74 74 6f 6e 2d 62 61 63 6b 67 72 6f 6e 64 button-backgrond
03b0: 0a 09 20 20 20 20 20 20 20 62 75 74 74 6f 6e 2d .. button-
03c0: 73 65 6c 65 63 74 65 64 20 63 6f 6c 6f 72 2d 6d selected color-m
03d0: 61 78 29 29 0a 0a 0a 20 28 64 65 66 69 6e 65 2d ax))... (define-
03e0: 66 74 79 70 65 20 73 64 6c 2d 6d 65 73 73 61 67 ftype sdl-messag
03f0: 65 2d 62 6f 78 2d 62 75 74 74 6f 6e 2d 64 61 74 e-box-button-dat
0400: 61 2d 74 20 28 73 74 72 75 63 74 20 28 66 6c 61 a-t (struct (fla
0410: 67 73 20 75 69 6e 74 33 32 29 20 28 62 75 74 74 gs uint32) (butt
0420: 6f 6e 69 64 20 69 6e 74 29 20 28 74 65 78 74 20 onid int) (text
0430: 28 2a 20 63 68 61 72 29 29 29 29 0a 20 28 64 65 (* char)))). (de
0440: 66 69 6e 65 2d 66 74 79 70 65 20 73 64 6c 2d 6d fine-ftype sdl-m
0450: 65 73 73 61 67 65 2d 62 6f 78 2d 63 6f 6c 6f 72 essage-box-color
0460: 2d 74 20 28 73 74 72 75 63 74 20 28 72 20 75 69 -t (struct (r ui
0470: 6e 74 38 29 20 28 67 20 75 69 6e 74 38 29 20 28 nt8) (g uint8) (
0480: 62 20 75 69 6e 74 38 29 29 29 0a 20 3b 3b 46 49 b uint8))). ;;FI
0490: 58 4d 45 20 55 53 45 20 54 48 45 20 56 41 4c 55 XME USE THE VALU
04a0: 45 20 4f 46 20 53 44 4c 5f 4d 45 53 53 41 47 45 E OF SDL_MESSAGE
04b0: 42 4f 58 5f 43 4f 4c 4f 52 5f 4d 41 58 20 28 3d BOX_COLOR_MAX (=
04c0: 36 29 20 3f 0a 20 28 64 65 66 69 6e 65 2d 66 74 6) ?. (define-ft
04d0: 79 70 65 20 73 64 6c 2d 6d 65 73 73 61 67 65 2d ype sdl-message-
04e0: 62 6f 78 2d 63 6f 6c 6f 72 2d 73 63 68 65 6d 65 box-color-scheme
04f0: 2d 74 20 28 73 74 72 75 63 74 20 28 63 6f 6c 6f -t (struct (colo
0500: 72 73 20 28 61 72 72 61 79 20 36 20 73 64 6c 2d rs (array 6 sdl-
0510: 6d 65 73 73 61 67 65 2d 62 6f 78 2d 63 6f 6c 6f message-box-colo
0520: 72 2d 74 29 29 29 29 0a 0a 20 28 64 65 66 69 6e r-t)))).. (defin
0530: 65 2d 66 74 79 70 65 20 73 64 6c 2d 6d 65 73 73 e-ftype sdl-mess
0540: 61 67 65 2d 62 6f 78 2d 64 61 74 61 2d 74 0a 20 age-box-data-t.
0550: 20 20 28 73 74 72 75 63 74 0a 20 20 20 20 20 20 (struct.
0560: 20 28 66 6c 61 67 73 20 75 6e 73 69 67 6e 65 64 (flags unsigned
0570: 2d 33 32 29 0a 20 20 20 20 20 28 77 69 6e 64 6f -32). (windo
0580: 77 20 28 2a 20 73 64 6c 2d 77 69 6e 64 6f 77 2d w (* sdl-window-
0590: 74 29 29 0a 20 20 20 20 20 28 74 69 74 6c 65 20 t)). (title
05a0: 28 2a 20 63 68 61 72 29 29 0a 20 20 20 20 20 28 (* char)). (
05b0: 6d 65 73 73 61 67 65 20 28 2a 20 63 68 61 72 29 message (* char)
05c0: 29 0a 20 20 20 20 20 28 6e 75 6d 62 75 74 74 6f ). (numbutto
05d0: 6e 73 20 69 6e 74 29 0a 20 20 20 20 20 28 62 75 ns int). (bu
05e0: 74 74 6f 6e 73 20 28 2a 20 73 64 6c 2d 6d 65 73 ttons (* sdl-mes
05f0: 73 61 67 65 2d 62 6f 78 2d 62 75 74 74 6f 6e 2d sage-box-button-
0600: 64 61 74 61 2d 74 29 29 0a 20 20 20 20 20 28 63 data-t)). (c
0610: 6f 6c 6f 72 2d 73 63 68 65 6d 65 20 28 2a 20 73 olor-scheme (* s
0620: 64 6c 2d 6d 65 73 73 61 67 65 2d 62 6f 78 2d 63 dl-message-box-c
0630: 6f 6c 6f 72 2d 73 63 68 65 6d 65 2d 74 29 29 29 olor-scheme-t)))
0640: 29 0a 0a )..