File: imports.patch

package info (click to toggle)
mu-cade 0.11.dfsg1-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 7,596 kB
  • sloc: xml: 403; makefile: 28
file content (1575 lines) | stat: -rw-r--r-- 49,781 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
Description: port import/ code to D language version 2
  With this patch the code is accepted by GDC 4.8 without triggering deprecation
  warnings/errors.
Author: Peter De Wachter <pdewacht@gmail.com>

--- a/import/SDL.d
+++ b/import/SDL.d
@@ -20,18 +20,28 @@
     slouken@devolution.com
 */
 
-import SDL_types;
-import SDL_getenv;
-import SDL_error;
-import SDL_rwops;
-import SDL_timer;
-import SDL_audio;
-import SDL_cdrom;
-import SDL_joystick;
-import SDL_events;
-import SDL_video;
-import SDL_byteorder;
-import SDL_Version;
+public import SDL_keysym_;
+public import SDL_version_;
+public import SDL_active;
+public import SDL_audio;
+public import SDL_byteorder;
+public import SDL_cdrom;
+public import SDL_copying;
+public import SDL_endian;
+public import SDL_error;
+public import SDL_events;
+public import SDL_getenv;
+public import SDL_joystick;
+public import SDL_keyboard;
+public import SDL_mouse;
+public import SDL_mutex;
+public import SDL_quit;
+public import SDL_rwops;
+public import SDL_syswm;
+public import SDL_thread;
+public import SDL_timer;
+public import SDL_types;
+public import SDL_video;
 
 extern(C):
 
@@ -73,20 +83,3 @@
  */
 void SDL_Quit();
 
-/+
-void SDL_SetModuleHandle(void *hInst);
-extern(Windows) void* GetModuleHandle(char*);
-
-static this()
-{
-	/* Load SDL dynamic link library */
-	if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0)
-		throw new Error("Error loading SDL");
-	SDL_SetModuleHandle(GetModuleHandle(null));
-}
-
-static ~this()
-{
-	SDL_Quit();
-}
-+/
--- a/import/SDL_Version.d
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-    SDL - Simple DirectMedia Layer
-    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public
-    License along with this library; if not, write to the Free
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    Sam Lantinga
-    slouken@devolution.com
-*/
-
-/* This header defines the current SDL version */
-
-import SDL_types;
-
-extern(C):
-
-/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
-*/
-const uint SDL_MAJOR_VERSION	= 1;
-const uint SDL_MINOR_VERSION	= 2;
-const uint SDL_PATCHLEVEL		= 6;
-
-struct SDL_version {
-	Uint8 major;
-	Uint8 minor;
-	Uint8 patch;
-}
-
-/* This macro can be used to fill a version structure with the compile-time
- * version of the SDL library.
- */
-void SDL_VERSION(SDL_version* X)
-{
-	X.major = SDL_MAJOR_VERSION;
-	X.minor = SDL_MINOR_VERSION;
-	X.patch = SDL_PATCHLEVEL;
-}
-
-/* This macro turns the version numbers into a numeric value:
-   (1,2,3) -> (1203)
-   This assumes that there will never be more than 100 patchlevels
-*/
-uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z)
-{
-	return X * 1000 + Y * 100 + Z;
-}
-
-/* This is the version number macro for the current SDL version */
-const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 +
-									SDL_MINOR_VERSION * 100 +
-									SDL_PATCHLEVEL;
-
-/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */
-bit SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z)
-{
-	return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z));
-}
-
-/* This function gets the version of the dynamically linked SDL library.
-   it should NOT be used to fill a version structure, instead you should
-   use the SDL_Version() macro.
- */
-SDL_version * SDL_Linked_Version();
--- a/import/SDL_audio.d
+++ b/import/SDL_audio.d
@@ -24,6 +24,7 @@
 import SDL_error;
 import SDL_rwops;
 import SDL_byteorder;
+import std.string;
 
 extern(C):
 
@@ -42,7 +43,7 @@
 	   Once the callback returns, the buffer will no longer be valid.
 	   Stereo samples are stored in a LRLRLR ordering.
 	*/
-	void (*callback)(void *userdata, Uint8 *stream, int len);
+	void function(void *userdata, Uint8 *stream, int len) callback;
 	void  *userdata;
 }
 
@@ -74,7 +75,7 @@
 	int    len_cvt;			/* Length of converted audio buffer */
 	int    len_mult;		/* buffer must be len*len_mult big */
 	double len_ratio; 	/* Given len, final size is len*len_ratio */
-	void (*filters[10])(SDL_AudioCVT *cvt, Uint16 format);
+	void function(SDL_AudioCVT *cvt, Uint16 format)[10] filters;
 	int filter_index;		/* Current audio conversion function */
 }
 
@@ -161,7 +162,7 @@
  * This function loads a WAVE from the data source, automatically freeing
  * that source if 'freesrc' is non-zero.  For example, to load a WAVE file,
  * you could do:
- *	SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
+ *	SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", toStringz("rb")), 1, ...);
  * 
  * If this function succeeds, it returns the given SDL_AudioSpec,
  * filled with the audio data format of the wave data, and sets
@@ -178,7 +179,7 @@
 		 SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
 
 /* Compatibility convenience function -- loads a WAV from a file */
-SDL_AudioSpec *SDL_LoadWAV(char* file, SDL_AudioSpec* spec,
+SDL_AudioSpec *SDL_LoadWAV(const(char)* file, SDL_AudioSpec* spec,
 		Uint8 **audio_buf, Uint32 *audio_len)
 {		
 	return SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1, spec,
--- a/import/SDL_cdrom.d
+++ b/import/SDL_cdrom.d
@@ -49,7 +49,7 @@
 }
 
 /* Given a status, returns true if there's a disk in the drive */
-bit CD_INDRIVE(int status) { return status > 0; }
+bool CD_INDRIVE(int status) { return status > 0; }
 
 struct SDL_CDtrack {
 	Uint8 id;		/* Track number */
@@ -68,7 +68,7 @@
 	int numtracks;		/* Number of tracks on disk */
 	int cur_track;		/* Current track position */
 	int cur_frame;		/* Current frame offset within current track */
-	SDL_CDtrack track[SDL_MAX_TRACKS+1];
+	SDL_CDtrack[SDL_MAX_TRACKS+1] track;
 }
 
 /* Conversion functions from frames to Minute/Second/Frames and vice versa */
--- a/import/SDL_endian.d
+++ b/import/SDL_endian.d
@@ -47,7 +47,7 @@
 */
 
 Uint16 SDL_Swap16(Uint16 D) {
-	return((D<<8)|(D>>8));
+	return cast(Uint16)((D<<8)|(D>>8));
 }
 
 Uint32 SDL_Swap32(Uint32 D) {
--- a/import/SDL_events.d
+++ b/import/SDL_events.d
@@ -271,7 +271,7 @@
 
   The filter is protypted as:
 */
-alias int (*SDL_EventFilter)(SDL_Event *event);
+alias int function(SDL_Event *event) SDL_EventFilter;
 /*
   If the filter returns 1, then the event will be added to the internal queue.
   If it returns 0, then the event will be dropped from the queue, but the 
@@ -304,8 +304,8 @@
   If 'state' is set to SDL_QUERY, SDL_EventState() will return the 
   current processing state of the specified event.
 */
-const uint SDL_QUERY	= cast(uint) -1;
-const uint SDL_IGNORE	= 0;
-const uint SDL_DISABLE	= 0;
-const uint SDL_ENABLE	= 1;
+const int SDL_QUERY	= -1;
+const int SDL_IGNORE	= 0;
+const int SDL_DISABLE	= 0;
+const int SDL_ENABLE	= 1;
 Uint8 SDL_EventState(Uint8 type, int state);
--- a/import/SDL_keyboard.d
+++ b/import/SDL_keyboard.d
@@ -26,7 +26,7 @@
 // !!! A hack! struct SDL_keysym is defined in this module,
 // !!! so we need to resolve the nameclash...
 // !!! Definitely won't work on *NIX but for now will do.
-import SDL_Keysym;
+import SDL_keysym_;
 
 extern(C):
 
--- a/import/SDL_mixer.d
+++ b/import/SDL_mixer.d
@@ -22,7 +22,7 @@
 
 // convert to D by shinichiro.h
 
-/* $Id: SDL_mixer.d,v 1.1.1.1 2006/02/19 04:57:25 kenta Exp $ */
+/* $Id: SDL_mixer.d,v 1.1.1.1 2006/11/19 07:54:54 kenta Exp $ */
 
 import SDL;
 
@@ -104,10 +104,10 @@
 
 /* Load a wave file or a music (.mod .s3m .it .xm) file */
 	Mix_Chunk * Mix_LoadWAV_RW(SDL_RWops *src, int freesrc);
-	Mix_Chunk * Mix_LoadWAV(char *file) {
+	Mix_Chunk * Mix_LoadWAV(const(char) *file) {
 		return Mix_LoadWAV_RW(SDL_RWFromFile(file, "rb"), 1);
 	}
-	Mix_Music * Mix_LoadMUS(char *file);
+	Mix_Music * Mix_LoadMUS(const(char) *file);
 
 /* Load a wave file of the mixer format from a memory buffer */
 	Mix_Chunk * Mix_QuickLoad_WAV(Uint8 *mem);
@@ -128,19 +128,17 @@
    This can be used to provide real-time visual display of the audio stream
    or add a custom mixer filter for the stream data.
 */
-	void Mix_SetPostMix(void (*mix_func)
-						(void *udata, Uint8 *stream, int len), void *arg);
+	void Mix_SetPostMix(void function(void *udata, Uint8 *stream, int len) mix_func, void *arg);
 
 /* Add your own music player or additional mixer function.
    If 'mix_func' is NULL, the default music player is re-enabled.
 */
-	void Mix_HookMusic(void (*mix_func)
-					   (void *udata, Uint8 *stream, int len), void *arg);
+	void Mix_HookMusic(void function(void *udata, Uint8 *stream, int len) mix_func, void *arg);
 
 /* Add your own callback when the music has finished playing.
    This callback is only called if the music finishes naturally.
 */
-	void Mix_HookMusicFinished(void (*music_finished)());
+	void Mix_HookMusicFinished(void function() music_finished);
 
 /* Get a pointer to the user data for the current music hook */
 	void * Mix_GetMusicHookData();
@@ -153,7 +151,7 @@
  *  inside the audio callback, or SDL_mixer will explicitly lock the audio
  *  before calling your callback.
  */
-	void Mix_ChannelFinished(void (*channel_finished)(int channel));
+	void Mix_ChannelFinished(void function(int channel) channel_finished);
 
 
 /* Special Effects API by ryan c. gordon. (icculus@linuxgames.com) */
@@ -177,7 +175,7 @@
  *
  * DO NOT EVER call SDL_LockAudio() from your callback function!
  */
-	typedef void (*Mix_EffectFunc_t)(int chan, void *stream, int len, void *udata);
+	alias void function(int chan, void *stream, int len, void *udata) Mix_EffectFunc_t;
 
 /*
  * This is a callback that signifies that a channel has finished all its
@@ -188,7 +186,7 @@
  *
  * DO NOT EVER call SDL_LockAudio() from your callback function!
  */
-	typedef void (*Mix_EffectDone_t)(int chan, void *udata);
+	alias void function(int chan, void *udata) Mix_EffectDone_t;
 
 
 /* Register a special effect function. At mixing time, the channel data is
@@ -510,7 +508,7 @@
 	int Mix_PlayingMusic();
 
 /* Stop music and set external music playback command */
-	int Mix_SetMusicCMD(char *command);
+	int Mix_SetMusicCMD(const(char) *command);
 
 /* Synchro value is set by MikMod from modules while playing */
 	int Mix_SetSynchroValue(int value);
--- a/import/SDL_quit.d
+++ b/import/SDL_quit.d
@@ -40,8 +40,8 @@
 */
 
 /* There are no functions directly affecting the quit event */
-bit SDL_QuitRequested()
+bool SDL_QuitRequested()
 {
 	SDL_PumpEvents();
-	return cast(bit)SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK);
+	return 0 != SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK);
 }
--- a/import/SDL_rwops.d
+++ b/import/SDL_rwops.d
@@ -28,11 +28,6 @@
 
 extern(C):
 
-typedef int (*_seek_func_t)(SDL_RWops *context, int offset, int whence);
-typedef int (*_read_func_t)(SDL_RWops *context, void *ptr, int size, int maxnum);
-typedef int (*_write_func_t)(SDL_RWops *context, void *ptr, int size, int num);
-typedef int (*_close_func_t)(SDL_RWops *context);
-
 /* This is the read/write operation structure -- very basic */
 
 struct SDL_RWops {
@@ -40,26 +35,22 @@
 		SEEK_SET, SEEK_CUR, SEEK_END
 	   Returns the final offset in the data source.
 	 */
-	_seek_func_t seek;
-//	int (*seek)(SDL_RWops *context, int offset, int whence);
+	int function(SDL_RWops *context, int offset, int whence) seek;
 
 	/* Read up to 'num' objects each of size 'objsize' from the data
 	   source to the area pointed at by 'ptr'.
 	   Returns the number of objects read, or -1 if the read failed.
 	 */
-	_read_func_t read;
-//	int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum);
+	int function(SDL_RWops *context, void *ptr, int size, int maxnum) read;
 
 	/* Write exactly 'num' objects each of size 'objsize' from the area
 	   pointed at by 'ptr' to data source.
 	   Returns 'num', or -1 if the write failed.
 	 */
-	_write_func_t write;
-//	int (*write)(SDL_RWops *context, void *ptr, int size, int num);
+	int function(SDL_RWops *context, void *ptr, int size, int num) write;
 
 	/* Close and free an allocated SDL_FSops structure */
-	_close_func_t close;
-//	int (*close)(SDL_RWops *context);
+	int function(SDL_RWops *context) close;
 
 	Uint32 type;
 	union {
@@ -81,7 +72,7 @@
 
 /* Functions to create SDL_RWops structures from various data sources */
 
-SDL_RWops * SDL_RWFromFile(char *file, char *mode);
+SDL_RWops * SDL_RWFromFile(const(char)* file, const(char)* mode);
 
 SDL_RWops * SDL_RWFromFP(void *fp, int autoclose);
 
@@ -93,40 +84,25 @@
 /* Macros to easily read and write from an SDL_RWops structure */
 int SDL_RWseek(SDL_RWops *ctx, int offset, int whence)
 {
-	_seek_func_t seek;
-//	int (*seek)(SDL_RWops *context, int offset, int whence);
-	seek = ctx.seek;
-	return (*seek)(ctx, offset, whence);
+	return ctx.seek(ctx, offset, whence);
 }
 
 int SDL_RWtell(SDL_RWops *ctx)
 {
-	_seek_func_t seek;
-//	int (*seek)(SDL_RWops *context, int offset, int whence);
-	seek = ctx.seek;
-	return (*seek)(ctx, 0, 1);
+	return ctx.seek(ctx, 0, 1);
 }
 
 int SDL_RWread(SDL_RWops *ctx, void* ptr, int size, int n)
 {
-	_read_func_t read;
-//	int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum);
-	read = ctx.read;
-	return (*read)(ctx, ptr, size, n);
+	return ctx.read(ctx, ptr, size, n);
 }
 
 int SDL_RWwrite(SDL_RWops *ctx, void* ptr, int size, int n)
 {
-	_write_func_t write;
-//	int (*write)(SDL_RWops *context, void *ptr, int size, int num);
-	write = ctx.write;
-	return (*write)(ctx, ptr, size, n);
+	return ctx.write(ctx, ptr, size, n);
 }
 
 int SDL_RWclose(SDL_RWops *ctx)
 {
-	_close_func_t close;
-//	int (*close)(SDL_RWops *context);
-	close = ctx.close;
-	return (*close)(ctx);
+	return ctx.close(ctx);
 }
--- a/import/SDL_syswm.d
+++ b/import/SDL_syswm.d
@@ -22,7 +22,7 @@
 
 /* Include file for SDL custom system window manager hooks */
 
-import SDL_Version;
+import SDL_version_;
 
 extern(C):
 
--- a/import/SDL_thread.d
+++ b/import/SDL_thread.d
@@ -34,7 +34,7 @@
 struct SDL_Thread { }
 
 /* Create a thread */
-SDL_Thread * SDL_CreateThread(int (*fn)(void *), void *data);
+SDL_Thread * SDL_CreateThread(int function(void *) fn, void *data);
 
 /* Get the 32-bit thread identifier for the current thread */
 Uint32 SDL_ThreadID();
--- a/import/SDL_timer.d
+++ b/import/SDL_timer.d
@@ -39,7 +39,7 @@
 void SDL_Delay(Uint32 ms);
 
 /* Function prototype for the timer callback function */
-alias Uint32 (*SDL_TimerCallback)(Uint32 interval);
+alias Uint32 function(Uint32 interval) SDL_TimerCallback;
 
 /* Set a callback to run after the specified number of milliseconds has
  * elapsed. The callback function is passed the current timer interval
@@ -79,7 +79,7 @@
  * passed in, the periodic alarm continues, otherwise a new alarm is
  * scheduled.  If the callback returns 0, the periodic alarm is cancelled.
  */
-alias Uint32 (*SDL_NewTimerCallback)(Uint32 interval, void *param);
+alias Uint32 function(Uint32 interval, void *param) SDL_NewTimerCallback;
 
 /* Definition of the timer ID type */
 alias void *SDL_TimerID;
--- a/import/SDL_types.d
+++ b/import/SDL_types.d
@@ -33,7 +33,7 @@
 alias ushort	Uint16;
 alias short	Sint16;
 alias uint	Uint32;
-alias int		Sint32;
+alias int	Sint32;
 
 alias ulong	Uint64;
 alias long	Sint64;
--- a/import/SDL_video.d
+++ b/import/SDL_video.d
@@ -74,9 +74,9 @@
 	Uint8  alpha;
 }
 
-/* typedef for private surface blitting functions */
-typedef int (*SDL_blit)(SDL_Surface *src, SDL_Rect *srcrect,
-			SDL_Surface *dst, SDL_Rect *dstrect);
+/* alias for private surface blitting functions */
+alias int function(SDL_Surface *src, SDL_Rect *srcrect,
+			SDL_Surface *dst, SDL_Rect *dstrect) SDL_blit;
 
 /* This structure should be treated as read-only, except for 'pixels',
    which, if not NULL, contains the raw pixel data for the surface.
@@ -132,7 +132,7 @@
 const uint SDL_PREALLOC	= 0x01000000;	/* Surface uses preallocated memory */
 
 /* Evaluates to true if the surface needs to be locked before access */
-bit SDL_MUSTLOCK(SDL_Surface *surface)
+bool SDL_MUSTLOCK(SDL_Surface *surface)
 {
 	return surface.offset || ((surface.flags &
 		(SDL_HWSURFACE | SDL_ASYNCBLIT | SDL_RLEACCEL)) != 0);
@@ -186,7 +186,7 @@
 	/* Special flags */
 	union
 	{
-		bit hw_overlay;
+		bool hw_overlay;
 		Uint32 _dummy;
 	}
 //		Uint32 hw_overlay :1;	/* Flag: This overlay hardware accelerated? */
@@ -540,7 +540,7 @@
 SDL_Surface * SDL_LoadBMP_RW(SDL_RWops *src, int freesrc);
 
 /* Convenience macro -- load a surface from a file */
-SDL_Surface * SDL_LoadBMP(char* file)
+SDL_Surface * SDL_LoadBMP(const(char)* file)
 {
 	return SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1);
 }
@@ -554,7 +554,7 @@
 		(SDL_Surface *surface, SDL_RWops *dst, int freedst);
 
 /* Convenience macro -- save a surface to a file */
-int SDL_SaveBMP(SDL_Surface *surface, char* file)
+int SDL_SaveBMP(SDL_Surface *surface, const(char)* file)
 {
 	return SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1);
 }
@@ -837,7 +837,7 @@
 /*
  * Sets/Gets the title and icon text of the display window
  */
-void SDL_WM_SetCaption(char *title, char *icon);
+void SDL_WM_SetCaption(const(char) *title, char *icon);
 void SDL_WM_GetCaption(char **title, char **icon);
 
 /*
--- a/import/bulletml.d
+++ b/import/bulletml.d
@@ -1,7 +1,7 @@
 extern (C) {
 alias int BulletMLParserTinyXML;
-int* BulletMLParserTinyXML_new(char*);
-void BulletMLParserTinyXML_parse(int* );
+int* BulletMLParserTinyXML_new(const(char)*);
+void BulletMLParserTinyXML_parse(int*);
 void BulletMLParserTinyXML_delete(int*);
 alias int BulletMLParser;
 alias int BulletMLState;
@@ -10,22 +10,22 @@
 int* BulletMLRunner_new_parser(BulletMLParser*);
 int* BulletMLRunner_new_state(BulletMLState*);
 void BulletMLRunner_delete(int*);
-void BulletMLRunner_run(int* );
-bool BulletMLRunner_isEnd(int* );
-void BulletMLRunner_set_getBulletDirection(int*, double (*fp) (int* )); 
-void BulletMLRunner_set_getAimDirection(int*, double (*fp) (int* )); 
-void BulletMLRunner_set_getBulletSpeed(int*, double (*fp) (int* )); 
-void BulletMLRunner_set_getDefaultSpeed(int*, double (*fp) (int* )); 
-void BulletMLRunner_set_getRank(int*, double (*fp) (int* )); 
-void BulletMLRunner_set_createSimpleBullet(int*, void (*fp) (int* , double, double)); 
-void BulletMLRunner_set_createBullet(int*, void (*fp) (int* , BulletMLState*, double, double)); 
-void BulletMLRunner_set_getTurn(int*, int (*fp) (int* )); 
-void BulletMLRunner_set_doVanish(int*, void (*fp) (int* )); 
-void BulletMLRunner_set_doChangeDirection(int*, void (*fp) (int* , double)); 
-void BulletMLRunner_set_doChangeSpeed(int*, void (*fp) (int* , double)); 
-void BulletMLRunner_set_doAccelX(int*, void (*fp) (int* , double)); 
-void BulletMLRunner_set_doAccelY(int*, void (*fp) (int* , double)); 
-void BulletMLRunner_set_getBulletSpeedX(int*, double (*fp) (int* )); 
-void BulletMLRunner_set_getBulletSpeedY(int*, double (*fp) (int* )); 
-void BulletMLRunner_set_getRand(int*, double (*fp) (int* )); 
+void BulletMLRunner_run(int*);
+bool BulletMLRunner_isEnd(int*);
+void BulletMLRunner_set_getBulletDirection(int*, double function(int*) fp); 
+void BulletMLRunner_set_getAimDirection(int*, double function(int*) fp); 
+void BulletMLRunner_set_getBulletSpeed(int*, double function(int*) fp); 
+void BulletMLRunner_set_getDefaultSpeed(int*, double function(int*) fp); 
+void BulletMLRunner_set_getRank(int*, double function(int*) fp); 
+void BulletMLRunner_set_createSimpleBullet(int*, void function(int*, double, double) fp); 
+void BulletMLRunner_set_createBullet(int*, void function(int*, BulletMLState*, double, double) fp); 
+void BulletMLRunner_set_getTurn(int*, int function(int*) fp); 
+void BulletMLRunner_set_doVanish(int*, void function(int*) fp); 
+void BulletMLRunner_set_doChangeDirection(int*, void function(int*, double) fp); 
+void BulletMLRunner_set_doChangeSpeed(int*, void function(int*, double) fp); 
+void BulletMLRunner_set_doAccelX(int*, void function(int*, double) fp); 
+void BulletMLRunner_set_doAccelY(int*, void function(int*, double) fp); 
+void BulletMLRunner_set_getBulletSpeedX(int*, double function(int*) fp); 
+void BulletMLRunner_set_getBulletSpeedY(int*, double function(int*) fp); 
+void BulletMLRunner_set_getRand(int*, double function(int*) fp); 
 }
--- a/import/opengl.d
+++ b/import/opengl.d
@@ -1,10 +1,4 @@
-version (Win32) {
-	private import std.c.windows.windows;
-	extern(Windows):
-}
-version (linux) {
-	extern(C):
-}
+extern(System):
 
 alias uint GLenum;
 alias ubyte GLboolean;
@@ -165,6 +159,7 @@
 const uint GL_3_BYTES                    = 0x1408;
 const uint GL_4_BYTES                    = 0x1409;
 const uint GL_DOUBLE                     = 0x140A;
+const uint GL_UNSIGNED_INT_8_8_8_8_REV   = 0x8367;
 
 /* DepthFunction */
 /*      GL_NEVER */
@@ -1116,7 +1111,7 @@
 /*************************************************************/
 
 void /*APIENTRY*/glAccum (GLenum op, GLfloat value);
-void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref);
+void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref_);
 GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences);
 void /*APIENTRY*/glArrayElement (GLint i);
 void /*APIENTRY*/glBegin (GLenum mode);
@@ -1369,7 +1364,7 @@
 void /*APIENTRY*/glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
 void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer);
 void /*APIENTRY*/glShadeModel (GLenum mode);
-void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref, GLuint mask);
+void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref_, GLuint mask);
 void /*APIENTRY*/glStencilMask (GLuint mask);
 void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
 void /*APIENTRY*/glTexCoord1d (GLdouble s);
@@ -1454,35 +1449,30 @@
 
 
 /* EXT_vertex_array */
-typedef void (* PFNGLARRAYELEMENTEXTPROC) (GLint i);
-typedef void (* PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
-typedef void (* PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer);
-typedef void (* PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer);
-typedef void (* PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer);
-typedef void (* PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer);
-typedef void (* PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer);
-typedef void (* PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, GLboolean *pointer);
-typedef void (* PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
-typedef void (* PFNGLARRAYELEMENTARRAYEXTPROC)(GLenum mode, GLsizei count, GLvoid* pi);
+alias void function(GLint i) PFNGLARRAYELEMENTEXTPROC;
+alias void function(GLenum mode, GLint first, GLsizei count) PFNGLDRAWARRAYSEXTPROC;
+alias void function(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLVERTEXPOINTEREXTPROC;
+alias void function(GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLNORMALPOINTEREXTPROC;
+alias void function(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLCOLORPOINTEREXTPROC;
+alias void function(GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLINDEXPOINTEREXTPROC;
+alias void function(GLint size, GLenum type, GLsizei stride, GLsizei count, GLvoid *pointer) PFNGLTEXCOORDPOINTEREXTPROC;
+alias void function(GLsizei stride, GLsizei count, GLboolean *pointer) PFNGLEDGEFLAGPOINTEREXTPROC;
+alias void function(GLenum pname, GLvoid* *params) PFNGLGETPOINTERVEXTPROC;
+alias void function(GLenum mode, GLsizei count, GLvoid* pi) PFNGLARRAYELEMENTARRAYEXTPROC;
 
 /* WIN_draw_range_elements */
-typedef void (* PFNGLDRAWRANGEELEMENTSWINPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices);
+alias void function(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices) PFNGLDRAWRANGEELEMENTSWINPROC;
 
 /* WIN_swap_hint */
-typedef void (* PFNGLADDSWAPHINTRECTWINPROC)  (GLint x, GLint y, GLsizei width, GLsizei height);
+alias void function(GLint x, GLint y, GLsizei width, GLsizei height) PFNGLADDSWAPHINTRECTWINPROC;
 
 /* EXT_paletted_texture */
-typedef void (* PFNGLCOLORTABLEEXTPROC)
-    (GLenum target, GLenum internalFormat, GLsizei width, GLenum format,
-     GLenum type, GLvoid *data);
-typedef void (* PFNGLCOLORSUBTABLEEXTPROC)
-    (GLenum target, GLsizei start, GLsizei count, GLenum format,
-     GLenum type, GLvoid *data);
-typedef void (* PFNGLGETCOLORTABLEEXTPROC)
-    (GLenum target, GLenum format, GLenum type, GLvoid *data);
-typedef void (* PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)
-    (GLenum target, GLenum pname, GLint *params);
-typedef void (* PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)
-    (GLenum target, GLenum pname, GLfloat *params);
+alias void function(GLenum target, GLenum internalFormat, GLsizei width, GLenum format,
+     GLenum type, GLvoid *data) PFNGLCOLORTABLEEXTPROC;
+alias void function(GLenum target, GLsizei start, GLsizei count, GLenum format,
+     GLenum type, GLvoid *data) PFNGLCOLORSUBTABLEEXTPROC;
+alias void function(GLenum target, GLenum format, GLenum type, GLvoid *data) PFNGLGETCOLORTABLEEXTPROC;
+alias void function(GLenum target, GLenum pname, GLint *params) PFNGLGETCOLORTABLEPARAMETERIVEXTPROC;
+alias void function(GLenum target, GLenum pname, GLfloat *params) PFNGLGETCOLORTABLEPARAMETERFVEXTPROC;
 
 //import openglu;
--- a/import/openglu.d
+++ b/import/openglu.d
@@ -1,11 +1,6 @@
 import opengl;
 
-version (Win32) {
-	extern(Windows):
-}
-version (linux) {
-	extern(C):
-}
+extern(System):
 
 GLubyte* gluErrorString (
     GLenum   errCode);
@@ -33,7 +28,7 @@
     GLdouble y, 
     GLdouble width, 
     GLdouble height, 
-    GLint[4]    viewport);
+    ref GLint[4] viewport);
 
 void gluLookAt (
     GLdouble eyex, 
@@ -50,9 +45,9 @@
     GLdouble        objx, 
     GLdouble        objy, 
     GLdouble        objz,  
-    GLdouble[16]    modelMatrix, 
-    GLdouble[16]    projMatrix, 
-    GLint[4]        viewport, 
+    ref GLdouble[16] modelMatrix, 
+    ref GLdouble[16] projMatrix, 
+    ref GLint[4]    viewport, 
     GLdouble        *winx, 
     GLdouble        *winy, 
     GLdouble        *winz);
@@ -61,8 +56,8 @@
     GLdouble       winx, 
     GLdouble       winy, 
     GLdouble       winz, 
-    GLdouble[16]   modelMatrix, 
-    GLdouble[16]   projMatrix, 
+    ref GLdouble[16] modelMatrix, 
+    ref GLdouble[16] projMatrix, 
     GLint[4]       viewport, 
     GLdouble       *objx, 
     GLdouble       *objy, 
@@ -162,7 +157,7 @@
 void gluQuadricCallback (
     GLUquadric          *qobj, 
     GLenum              which, 
-    void                (* fn)());
+    void                function() fn);
 
 GLUtesselator*  gluNewTess(          
     );
@@ -179,7 +174,7 @@
 
 void  gluTessVertex(       
     GLUtesselator       *tess,
-    GLdouble[3]         coords, 
+    ref GLdouble[3]     coords, 
     void                *data );
 
 void  gluTessEndContour(   
@@ -202,7 +197,7 @@
 void  gluTessCallback(     
     GLUtesselator       *tess,
     GLenum              which, 
-    void                ( *fn)());
+    void                function() fn);
 
 void  gluGetTessProperty(  
     GLUtesselator       *tess,
@@ -265,9 +260,9 @@
 void 
 gluLoadSamplingMatrices (
     GLUnurbs            *nobj, 
-    GLfloat[16]     modelMatrix, 
-    GLfloat[16]     projMatrix, 
-    GLint[4]        viewport );
+    ref GLfloat[16]     modelMatrix, 
+    ref GLfloat[16]     projMatrix, 
+    ref GLint[4]        viewport );
 
 void 
 gluNurbsProperty (
@@ -285,37 +280,37 @@
 gluNurbsCallback (
     GLUnurbs            *nobj, 
     GLenum              which, 
-    void                (* fn)() );
+    void                function() fn );
 
 
 /****            function prototypes    ****/
 
 /* gluQuadricCallback */
-typedef void (* GLUquadricErrorProc) (GLenum);
+alias void function(GLenum) GLUquadricErrorProc;
 
 /* gluTessCallback */
-typedef void (* GLUtessBeginProc)        (GLenum);
-typedef void (* GLUtessEdgeFlagProc)     (GLboolean);
-typedef void (* GLUtessVertexProc)       (void *);
-typedef void (* GLUtessEndProc)          ();
-typedef void (* GLUtessErrorProc)        (GLenum);
-typedef void (* GLUtessCombineProc)      (GLdouble[3],
-                                                  void*[4], 
-                                                  GLfloat[4],
-                                                  void** );
-typedef void (* GLUtessBeginDataProc)    (GLenum, void *);
-typedef void (* GLUtessEdgeFlagDataProc) (GLboolean, void *);
-typedef void (* GLUtessVertexDataProc)   (void *, void *);
-typedef void (* GLUtessEndDataProc)      (void *);
-typedef void (* GLUtessErrorDataProc)    (GLenum, void *);
-typedef void (* GLUtessCombineDataProc)  (GLdouble[3],
-                                                  void*[4], 
-                                                  GLfloat[4],
-                                                  void**,
-                                                  void* );
+alias void function(GLenum) GLUtessBeginProc;
+alias void function(GLboolean) GLUtessEdgeFlagProc;
+alias void function(void *) GLUtessVertexProc;
+alias void function() GLUtessEndProc;
+alias void function(GLenum) GLUtessErrorProc;
+alias void function(ref GLdouble[3],
+                    ref void*[4], 
+                    ref GLfloat[4],
+                    void**) GLUtessCombineProc;
+alias void function(GLenum, void *) GLUtessBeginDataProc;
+alias void function(GLboolean, void *) GLUtessEdgeFlagDataProc;
+alias void function(void *, void *) GLUtessVertexDataProc;
+alias void function(void *) GLUtessEndDataProc;
+alias void function(GLenum, void *) GLUtessErrorDataProc;
+alias void function(ref GLdouble[3],
+                    ref void*[4], 
+                    ref GLfloat[4],
+                    void**,
+                    void*) GLUtessCombineDataProc;
 
 /* gluNurbsCallback */
-typedef void (* GLUnurbsErrorProc)   (GLenum);
+alias void function(GLenum) GLUnurbsErrorProc;
 
 
 /****           Generic constants               ****/
--- /dev/null
+++ b/import/SDL_keysym_.d
@@ -0,0 +1,308 @@
+/*
+    SDL - Simple DirectMedia Layer
+    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the Free
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+    Sam Lantinga
+    slouken@devolution.com
+*/
+
+/* What we really want is a mapping of every raw key on the keyboard.
+   To support international keyboards, we use the range 0xA1 - 0xFF
+   as international virtual keycodes.  We'll follow in the footsteps of X11...
+   The names of the keys
+ */
+ 
+alias int SDLKey;
+enum {
+	/* The keyboard syms have been cleverly chosen to map to ASCII */
+	SDLK_UNKNOWN		= 0,
+	SDLK_FIRST		= 0,
+	SDLK_BACKSPACE		= 8,
+	SDLK_TAB		= 9,
+	SDLK_CLEAR		= 12,
+	SDLK_RETURN		= 13,
+	SDLK_PAUSE		= 19,
+	SDLK_ESCAPE		= 27,
+	SDLK_SPACE		= 32,
+	SDLK_EXCLAIM		= 33,
+	SDLK_QUOTEDBL		= 34,
+	SDLK_HASH		= 35,
+	SDLK_DOLLAR		= 36,
+	SDLK_AMPERSAND		= 38,
+	SDLK_QUOTE		= 39,
+	SDLK_LEFTPAREN		= 40,
+	SDLK_RIGHTPAREN		= 41,
+	SDLK_ASTERISK		= 42,
+	SDLK_PLUS		= 43,
+	SDLK_COMMA		= 44,
+	SDLK_MINUS		= 45,
+	SDLK_PERIOD		= 46,
+	SDLK_SLASH		= 47,
+	SDLK_0			= 48,
+	SDLK_1			= 49,
+	SDLK_2			= 50,
+	SDLK_3			= 51,
+	SDLK_4			= 52,
+	SDLK_5			= 53,
+	SDLK_6			= 54,
+	SDLK_7			= 55,
+	SDLK_8			= 56,
+	SDLK_9			= 57,
+	SDLK_COLON		= 58,
+	SDLK_SEMICOLON		= 59,
+	SDLK_LESS		= 60,
+	SDLK_EQUALS		= 61,
+	SDLK_GREATER		= 62,
+	SDLK_QUESTION		= 63,
+	SDLK_AT			= 64,
+	/* 
+	   Skip uppercase letters
+	 */
+	SDLK_LEFTBRACKET	= 91,
+	SDLK_BACKSLASH		= 92,
+	SDLK_RIGHTBRACKET	= 93,
+	SDLK_CARET		= 94,
+	SDLK_UNDERSCORE		= 95,
+	SDLK_BACKQUOTE		= 96,
+	SDLK_a			= 97,
+	SDLK_b			= 98,
+	SDLK_c			= 99,
+	SDLK_d			= 100,
+	SDLK_e			= 101,
+	SDLK_f			= 102,
+	SDLK_g			= 103,
+	SDLK_h			= 104,
+	SDLK_i			= 105,
+	SDLK_j			= 106,
+	SDLK_k			= 107,
+	SDLK_l			= 108,
+	SDLK_m			= 109,
+	SDLK_n			= 110,
+	SDLK_o			= 111,
+	SDLK_p			= 112,
+	SDLK_q			= 113,
+	SDLK_r			= 114,
+	SDLK_s			= 115,
+	SDLK_t			= 116,
+	SDLK_u			= 117,
+	SDLK_v			= 118,
+	SDLK_w			= 119,
+	SDLK_x			= 120,
+	SDLK_y			= 121,
+	SDLK_z			= 122,
+	SDLK_DELETE		= 127,
+	/* End of ASCII mapped keysyms */
+
+	/* International keyboard syms */
+	SDLK_WORLD_0		= 160,		/* 0xA0 */
+	SDLK_WORLD_1		= 161,
+	SDLK_WORLD_2		= 162,
+	SDLK_WORLD_3		= 163,
+	SDLK_WORLD_4		= 164,
+	SDLK_WORLD_5		= 165,
+	SDLK_WORLD_6		= 166,
+	SDLK_WORLD_7		= 167,
+	SDLK_WORLD_8		= 168,
+	SDLK_WORLD_9		= 169,
+	SDLK_WORLD_10		= 170,
+	SDLK_WORLD_11		= 171,
+	SDLK_WORLD_12		= 172,
+	SDLK_WORLD_13		= 173,
+	SDLK_WORLD_14		= 174,
+	SDLK_WORLD_15		= 175,
+	SDLK_WORLD_16		= 176,
+	SDLK_WORLD_17		= 177,
+	SDLK_WORLD_18		= 178,
+	SDLK_WORLD_19		= 179,
+	SDLK_WORLD_20		= 180,
+	SDLK_WORLD_21		= 181,
+	SDLK_WORLD_22		= 182,
+	SDLK_WORLD_23		= 183,
+	SDLK_WORLD_24		= 184,
+	SDLK_WORLD_25		= 185,
+	SDLK_WORLD_26		= 186,
+	SDLK_WORLD_27		= 187,
+	SDLK_WORLD_28		= 188,
+	SDLK_WORLD_29		= 189,
+	SDLK_WORLD_30		= 190,
+	SDLK_WORLD_31		= 191,
+	SDLK_WORLD_32		= 192,
+	SDLK_WORLD_33		= 193,
+	SDLK_WORLD_34		= 194,
+	SDLK_WORLD_35		= 195,
+	SDLK_WORLD_36		= 196,
+	SDLK_WORLD_37		= 197,
+	SDLK_WORLD_38		= 198,
+	SDLK_WORLD_39		= 199,
+	SDLK_WORLD_40		= 200,
+	SDLK_WORLD_41		= 201,
+	SDLK_WORLD_42		= 202,
+	SDLK_WORLD_43		= 203,
+	SDLK_WORLD_44		= 204,
+	SDLK_WORLD_45		= 205,
+	SDLK_WORLD_46		= 206,
+	SDLK_WORLD_47		= 207,
+	SDLK_WORLD_48		= 208,
+	SDLK_WORLD_49		= 209,
+	SDLK_WORLD_50		= 210,
+	SDLK_WORLD_51		= 211,
+	SDLK_WORLD_52		= 212,
+	SDLK_WORLD_53		= 213,
+	SDLK_WORLD_54		= 214,
+	SDLK_WORLD_55		= 215,
+	SDLK_WORLD_56		= 216,
+	SDLK_WORLD_57		= 217,
+	SDLK_WORLD_58		= 218,
+	SDLK_WORLD_59		= 219,
+	SDLK_WORLD_60		= 220,
+	SDLK_WORLD_61		= 221,
+	SDLK_WORLD_62		= 222,
+	SDLK_WORLD_63		= 223,
+	SDLK_WORLD_64		= 224,
+	SDLK_WORLD_65		= 225,
+	SDLK_WORLD_66		= 226,
+	SDLK_WORLD_67		= 227,
+	SDLK_WORLD_68		= 228,
+	SDLK_WORLD_69		= 229,
+	SDLK_WORLD_70		= 230,
+	SDLK_WORLD_71		= 231,
+	SDLK_WORLD_72		= 232,
+	SDLK_WORLD_73		= 233,
+	SDLK_WORLD_74		= 234,
+	SDLK_WORLD_75		= 235,
+	SDLK_WORLD_76		= 236,
+	SDLK_WORLD_77		= 237,
+	SDLK_WORLD_78		= 238,
+	SDLK_WORLD_79		= 239,
+	SDLK_WORLD_80		= 240,
+	SDLK_WORLD_81		= 241,
+	SDLK_WORLD_82		= 242,
+	SDLK_WORLD_83		= 243,
+	SDLK_WORLD_84		= 244,
+	SDLK_WORLD_85		= 245,
+	SDLK_WORLD_86		= 246,
+	SDLK_WORLD_87		= 247,
+	SDLK_WORLD_88		= 248,
+	SDLK_WORLD_89		= 249,
+	SDLK_WORLD_90		= 250,
+	SDLK_WORLD_91		= 251,
+	SDLK_WORLD_92		= 252,
+	SDLK_WORLD_93		= 253,
+	SDLK_WORLD_94		= 254,
+	SDLK_WORLD_95		= 255,		/* 0xFF */
+
+	/* Numeric keypad */
+	SDLK_KP0		= 256,
+	SDLK_KP1		= 257,
+	SDLK_KP2		= 258,
+	SDLK_KP3		= 259,
+	SDLK_KP4		= 260,
+	SDLK_KP5		= 261,
+	SDLK_KP6		= 262,
+	SDLK_KP7		= 263,
+	SDLK_KP8		= 264,
+	SDLK_KP9		= 265,
+	SDLK_KP_PERIOD		= 266,
+	SDLK_KP_DIVIDE		= 267,
+	SDLK_KP_MULTIPLY	= 268,
+	SDLK_KP_MINUS		= 269,
+	SDLK_KP_PLUS		= 270,
+	SDLK_KP_ENTER		= 271,
+	SDLK_KP_EQUALS		= 272,
+
+	/* Arrows + Home/End pad */
+	SDLK_UP			= 273,
+	SDLK_DOWN		= 274,
+	SDLK_RIGHT		= 275,
+	SDLK_LEFT		= 276,
+	SDLK_INSERT		= 277,
+	SDLK_HOME		= 278,
+	SDLK_END		= 279,
+	SDLK_PAGEUP		= 280,
+	SDLK_PAGEDOWN		= 281,
+
+	/* Function keys */
+	SDLK_F1			= 282,
+	SDLK_F2			= 283,
+	SDLK_F3			= 284,
+	SDLK_F4			= 285,
+	SDLK_F5			= 286,
+	SDLK_F6			= 287,
+	SDLK_F7			= 288,
+	SDLK_F8			= 289,
+	SDLK_F9			= 290,
+	SDLK_F10		= 291,
+	SDLK_F11		= 292,
+	SDLK_F12		= 293,
+	SDLK_F13		= 294,
+	SDLK_F14		= 295,
+	SDLK_F15		= 296,
+
+	/* Key state modifier keys */
+	SDLK_NUMLOCK		= 300,
+	SDLK_CAPSLOCK		= 301,
+	SDLK_SCROLLOCK		= 302,
+	SDLK_RSHIFT		= 303,
+	SDLK_LSHIFT		= 304,
+	SDLK_RCTRL		= 305,
+	SDLK_LCTRL		= 306,
+	SDLK_RALT		= 307,
+	SDLK_LALT		= 308,
+	SDLK_RMETA		= 309,
+	SDLK_LMETA		= 310,
+	SDLK_LSUPER		= 311,		/* Left "Windows" key */
+	SDLK_RSUPER		= 312,		/* Right "Windows" key */
+	SDLK_MODE		= 313,		/* "Alt Gr" key */
+	SDLK_COMPOSE		= 314,		/* Multi-key compose key */
+
+	/* Miscellaneous function keys */
+	SDLK_HELP		= 315,
+	SDLK_PRINT		= 316,
+	SDLK_SYSREQ		= 317,
+	SDLK_BREAK		= 318,
+	SDLK_MENU		= 319,
+	SDLK_POWER		= 320,		/* Power Macintosh power key */
+	SDLK_EURO		= 321,		/* Some european keyboards */
+	SDLK_UNDO		= 322,		/* Atari keyboard has Undo */
+
+	/* Add any other keys here */
+
+	SDLK_LAST
+}
+
+/* Enumeration of valid key mods (possibly OR'd together) */
+alias int SDLMod;
+enum {
+	KMOD_NONE  = 0x0000,
+	KMOD_LSHIFT= 0x0001,
+	KMOD_RSHIFT= 0x0002,
+	KMOD_LCTRL = 0x0040,
+	KMOD_RCTRL = 0x0080,
+	KMOD_LALT  = 0x0100,
+	KMOD_RALT  = 0x0200,
+	KMOD_LMETA = 0x0400,
+	KMOD_RMETA = 0x0800,
+	KMOD_NUM   = 0x1000,
+	KMOD_CAPS  = 0x2000,
+	KMOD_MODE  = 0x4000,
+	KMOD_RESERVED = 0x8000
+}
+
+const uint KMOD_CTRL	= (KMOD_LCTRL|KMOD_RCTRL);
+const uint KMOD_SHIFT	= (KMOD_LSHIFT|KMOD_RSHIFT);
+const uint KMOD_ALT		= (KMOD_LALT|KMOD_RALT);
+const uint KMOD_META	= (KMOD_LMETA|KMOD_RMETA);
--- /dev/null
+++ b/import/SDL_version_.d
@@ -0,0 +1,75 @@
+/*
+    SDL - Simple DirectMedia Layer
+    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public
+    License along with this library; if not, write to the Free
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+    Sam Lantinga
+    slouken@devolution.com
+*/
+
+/* This header defines the current SDL version */
+
+import SDL_types;
+
+extern(C):
+
+/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
+*/
+const uint SDL_MAJOR_VERSION	= 1;
+const uint SDL_MINOR_VERSION	= 2;
+const uint SDL_PATCHLEVEL		= 6;
+
+struct SDL_version {
+	Uint8 major;
+	Uint8 minor;
+	Uint8 patch;
+}
+
+/* This macro can be used to fill a version structure with the compile-time
+ * version of the SDL library.
+ */
+void SDL_VERSION(SDL_version* X)
+{
+	X.major = SDL_MAJOR_VERSION;
+	X.minor = SDL_MINOR_VERSION;
+	X.patch = SDL_PATCHLEVEL;
+}
+
+/* This macro turns the version numbers into a numeric value:
+   (1,2,3) -> (1203)
+   This assumes that there will never be more than 100 patchlevels
+*/
+uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z)
+{
+	return X * 1000 + Y * 100 + Z;
+}
+
+/* This is the version number macro for the current SDL version */
+const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 +
+									SDL_MINOR_VERSION * 100 +
+									SDL_PATCHLEVEL;
+
+/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */
+bool SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z)
+{
+	return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z));
+}
+
+/* This function gets the version of the dynamically linked SDL library.
+   it should NOT be used to fill a version structure, instead you should
+   use the SDL_Version() macro.
+ */
+SDL_version * SDL_Linked_Version();
--- a/import/SDL_Keysym.d
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
-    SDL - Simple DirectMedia Layer
-    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public
-    License along with this library; if not, write to the Free
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-    Sam Lantinga
-    slouken@devolution.com
-*/
-
-/* What we really want is a mapping of every raw key on the keyboard.
-   To support international keyboards, we use the range 0xA1 - 0xFF
-   as international virtual keycodes.  We'll follow in the footsteps of X11...
-   The names of the keys
- */
- 
-alias int SDLKey;
-enum {
-	/* The keyboard syms have been cleverly chosen to map to ASCII */
-	SDLK_UNKNOWN		= 0,
-	SDLK_FIRST		= 0,
-	SDLK_BACKSPACE		= 8,
-	SDLK_TAB		= 9,
-	SDLK_CLEAR		= 12,
-	SDLK_RETURN		= 13,
-	SDLK_PAUSE		= 19,
-	SDLK_ESCAPE		= 27,
-	SDLK_SPACE		= 32,
-	SDLK_EXCLAIM		= 33,
-	SDLK_QUOTEDBL		= 34,
-	SDLK_HASH		= 35,
-	SDLK_DOLLAR		= 36,
-	SDLK_AMPERSAND		= 38,
-	SDLK_QUOTE		= 39,
-	SDLK_LEFTPAREN		= 40,
-	SDLK_RIGHTPAREN		= 41,
-	SDLK_ASTERISK		= 42,
-	SDLK_PLUS		= 43,
-	SDLK_COMMA		= 44,
-	SDLK_MINUS		= 45,
-	SDLK_PERIOD		= 46,
-	SDLK_SLASH		= 47,
-	SDLK_0			= 48,
-	SDLK_1			= 49,
-	SDLK_2			= 50,
-	SDLK_3			= 51,
-	SDLK_4			= 52,
-	SDLK_5			= 53,
-	SDLK_6			= 54,
-	SDLK_7			= 55,
-	SDLK_8			= 56,
-	SDLK_9			= 57,
-	SDLK_COLON		= 58,
-	SDLK_SEMICOLON		= 59,
-	SDLK_LESS		= 60,
-	SDLK_EQUALS		= 61,
-	SDLK_GREATER		= 62,
-	SDLK_QUESTION		= 63,
-	SDLK_AT			= 64,
-	/* 
-	   Skip uppercase letters
-	 */
-	SDLK_LEFTBRACKET	= 91,
-	SDLK_BACKSLASH		= 92,
-	SDLK_RIGHTBRACKET	= 93,
-	SDLK_CARET		= 94,
-	SDLK_UNDERSCORE		= 95,
-	SDLK_BACKQUOTE		= 96,
-	SDLK_a			= 97,
-	SDLK_b			= 98,
-	SDLK_c			= 99,
-	SDLK_d			= 100,
-	SDLK_e			= 101,
-	SDLK_f			= 102,
-	SDLK_g			= 103,
-	SDLK_h			= 104,
-	SDLK_i			= 105,
-	SDLK_j			= 106,
-	SDLK_k			= 107,
-	SDLK_l			= 108,
-	SDLK_m			= 109,
-	SDLK_n			= 110,
-	SDLK_o			= 111,
-	SDLK_p			= 112,
-	SDLK_q			= 113,
-	SDLK_r			= 114,
-	SDLK_s			= 115,
-	SDLK_t			= 116,
-	SDLK_u			= 117,
-	SDLK_v			= 118,
-	SDLK_w			= 119,
-	SDLK_x			= 120,
-	SDLK_y			= 121,
-	SDLK_z			= 122,
-	SDLK_DELETE		= 127,
-	/* End of ASCII mapped keysyms */
-
-	/* International keyboard syms */
-	SDLK_WORLD_0		= 160,		/* 0xA0 */
-	SDLK_WORLD_1		= 161,
-	SDLK_WORLD_2		= 162,
-	SDLK_WORLD_3		= 163,
-	SDLK_WORLD_4		= 164,
-	SDLK_WORLD_5		= 165,
-	SDLK_WORLD_6		= 166,
-	SDLK_WORLD_7		= 167,
-	SDLK_WORLD_8		= 168,
-	SDLK_WORLD_9		= 169,
-	SDLK_WORLD_10		= 170,
-	SDLK_WORLD_11		= 171,
-	SDLK_WORLD_12		= 172,
-	SDLK_WORLD_13		= 173,
-	SDLK_WORLD_14		= 174,
-	SDLK_WORLD_15		= 175,
-	SDLK_WORLD_16		= 176,
-	SDLK_WORLD_17		= 177,
-	SDLK_WORLD_18		= 178,
-	SDLK_WORLD_19		= 179,
-	SDLK_WORLD_20		= 180,
-	SDLK_WORLD_21		= 181,
-	SDLK_WORLD_22		= 182,
-	SDLK_WORLD_23		= 183,
-	SDLK_WORLD_24		= 184,
-	SDLK_WORLD_25		= 185,
-	SDLK_WORLD_26		= 186,
-	SDLK_WORLD_27		= 187,
-	SDLK_WORLD_28		= 188,
-	SDLK_WORLD_29		= 189,
-	SDLK_WORLD_30		= 190,
-	SDLK_WORLD_31		= 191,
-	SDLK_WORLD_32		= 192,
-	SDLK_WORLD_33		= 193,
-	SDLK_WORLD_34		= 194,
-	SDLK_WORLD_35		= 195,
-	SDLK_WORLD_36		= 196,
-	SDLK_WORLD_37		= 197,
-	SDLK_WORLD_38		= 198,
-	SDLK_WORLD_39		= 199,
-	SDLK_WORLD_40		= 200,
-	SDLK_WORLD_41		= 201,
-	SDLK_WORLD_42		= 202,
-	SDLK_WORLD_43		= 203,
-	SDLK_WORLD_44		= 204,
-	SDLK_WORLD_45		= 205,
-	SDLK_WORLD_46		= 206,
-	SDLK_WORLD_47		= 207,
-	SDLK_WORLD_48		= 208,
-	SDLK_WORLD_49		= 209,
-	SDLK_WORLD_50		= 210,
-	SDLK_WORLD_51		= 211,
-	SDLK_WORLD_52		= 212,
-	SDLK_WORLD_53		= 213,
-	SDLK_WORLD_54		= 214,
-	SDLK_WORLD_55		= 215,
-	SDLK_WORLD_56		= 216,
-	SDLK_WORLD_57		= 217,
-	SDLK_WORLD_58		= 218,
-	SDLK_WORLD_59		= 219,
-	SDLK_WORLD_60		= 220,
-	SDLK_WORLD_61		= 221,
-	SDLK_WORLD_62		= 222,
-	SDLK_WORLD_63		= 223,
-	SDLK_WORLD_64		= 224,
-	SDLK_WORLD_65		= 225,
-	SDLK_WORLD_66		= 226,
-	SDLK_WORLD_67		= 227,
-	SDLK_WORLD_68		= 228,
-	SDLK_WORLD_69		= 229,
-	SDLK_WORLD_70		= 230,
-	SDLK_WORLD_71		= 231,
-	SDLK_WORLD_72		= 232,
-	SDLK_WORLD_73		= 233,
-	SDLK_WORLD_74		= 234,
-	SDLK_WORLD_75		= 235,
-	SDLK_WORLD_76		= 236,
-	SDLK_WORLD_77		= 237,
-	SDLK_WORLD_78		= 238,
-	SDLK_WORLD_79		= 239,
-	SDLK_WORLD_80		= 240,
-	SDLK_WORLD_81		= 241,
-	SDLK_WORLD_82		= 242,
-	SDLK_WORLD_83		= 243,
-	SDLK_WORLD_84		= 244,
-	SDLK_WORLD_85		= 245,
-	SDLK_WORLD_86		= 246,
-	SDLK_WORLD_87		= 247,
-	SDLK_WORLD_88		= 248,
-	SDLK_WORLD_89		= 249,
-	SDLK_WORLD_90		= 250,
-	SDLK_WORLD_91		= 251,
-	SDLK_WORLD_92		= 252,
-	SDLK_WORLD_93		= 253,
-	SDLK_WORLD_94		= 254,
-	SDLK_WORLD_95		= 255,		/* 0xFF */
-
-	/* Numeric keypad */
-	SDLK_KP0		= 256,
-	SDLK_KP1		= 257,
-	SDLK_KP2		= 258,
-	SDLK_KP3		= 259,
-	SDLK_KP4		= 260,
-	SDLK_KP5		= 261,
-	SDLK_KP6		= 262,
-	SDLK_KP7		= 263,
-	SDLK_KP8		= 264,
-	SDLK_KP9		= 265,
-	SDLK_KP_PERIOD		= 266,
-	SDLK_KP_DIVIDE		= 267,
-	SDLK_KP_MULTIPLY	= 268,
-	SDLK_KP_MINUS		= 269,
-	SDLK_KP_PLUS		= 270,
-	SDLK_KP_ENTER		= 271,
-	SDLK_KP_EQUALS		= 272,
-
-	/* Arrows + Home/End pad */
-	SDLK_UP			= 273,
-	SDLK_DOWN		= 274,
-	SDLK_RIGHT		= 275,
-	SDLK_LEFT		= 276,
-	SDLK_INSERT		= 277,
-	SDLK_HOME		= 278,
-	SDLK_END		= 279,
-	SDLK_PAGEUP		= 280,
-	SDLK_PAGEDOWN		= 281,
-
-	/* Function keys */
-	SDLK_F1			= 282,
-	SDLK_F2			= 283,
-	SDLK_F3			= 284,
-	SDLK_F4			= 285,
-	SDLK_F5			= 286,
-	SDLK_F6			= 287,
-	SDLK_F7			= 288,
-	SDLK_F8			= 289,
-	SDLK_F9			= 290,
-	SDLK_F10		= 291,
-	SDLK_F11		= 292,
-	SDLK_F12		= 293,
-	SDLK_F13		= 294,
-	SDLK_F14		= 295,
-	SDLK_F15		= 296,
-
-	/* Key state modifier keys */
-	SDLK_NUMLOCK		= 300,
-	SDLK_CAPSLOCK		= 301,
-	SDLK_SCROLLOCK		= 302,
-	SDLK_RSHIFT		= 303,
-	SDLK_LSHIFT		= 304,
-	SDLK_RCTRL		= 305,
-	SDLK_LCTRL		= 306,
-	SDLK_RALT		= 307,
-	SDLK_LALT		= 308,
-	SDLK_RMETA		= 309,
-	SDLK_LMETA		= 310,
-	SDLK_LSUPER		= 311,		/* Left "Windows" key */
-	SDLK_RSUPER		= 312,		/* Right "Windows" key */
-	SDLK_MODE		= 313,		/* "Alt Gr" key */
-	SDLK_COMPOSE		= 314,		/* Multi-key compose key */
-
-	/* Miscellaneous function keys */
-	SDLK_HELP		= 315,
-	SDLK_PRINT		= 316,
-	SDLK_SYSREQ		= 317,
-	SDLK_BREAK		= 318,
-	SDLK_MENU		= 319,
-	SDLK_POWER		= 320,		/* Power Macintosh power key */
-	SDLK_EURO		= 321,		/* Some european keyboards */
-	SDLK_UNDO		= 322,		/* Atari keyboard has Undo */
-
-	/* Add any other keys here */
-
-	SDLK_LAST
-}
-
-/* Enumeration of valid key mods (possibly OR'd together) */
-alias int SDLMod;
-enum {
-	KMOD_NONE  = 0x0000,
-	KMOD_LSHIFT= 0x0001,
-	KMOD_RSHIFT= 0x0002,
-	KMOD_LCTRL = 0x0040,
-	KMOD_RCTRL = 0x0080,
-	KMOD_LALT  = 0x0100,
-	KMOD_RALT  = 0x0200,
-	KMOD_LMETA = 0x0400,
-	KMOD_RMETA = 0x0800,
-	KMOD_NUM   = 0x1000,
-	KMOD_CAPS  = 0x2000,
-	KMOD_MODE  = 0x4000,
-	KMOD_RESERVED = 0x8000
-}
-
-const uint KMOD_CTRL	= (KMOD_LCTRL|KMOD_RCTRL);
-const uint KMOD_SHIFT	= (KMOD_LSHIFT|KMOD_RSHIFT);
-const uint KMOD_ALT		= (KMOD_LALT|KMOD_RALT);
-const uint KMOD_META	= (KMOD_LMETA|KMOD_RMETA);
--- a/import/SDL_mouse.d
+++ b/import/SDL_mouse.d
@@ -32,7 +32,7 @@
 	Sint16 hot_x, hot_y;		/* The "tip" of the cursor */
 	Uint8 *data;			/* B/W cursor data */
 	Uint8 *mask;			/* B/W cursor mask */
-	Uint8 *save[2];			/* Place to save cursor area */
+	Uint8 *[2] save;			/* Place to save cursor area */
 	void /*WMcursor*/ *wm_cursor;		/* Window-manager cursor */
 }