-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibsdl2_fortranwraping.f90
6244 lines (5479 loc) · 356 KB
/
libsdl2_fortranwraping.f90
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
!!! libsdl2_fortranwraping.f90
!!! A fortran library inteface all-in-one for SDL2
!!! Original Work :
!!! Author: Philipp Engel
!!! GitHub: https://github.com/interkosmos/fortran-sdl2/
!!! Licence: ISC
! Modified Work by: Vu Hoang Giang
! Date : Some day in 2021
! Mail :: [email protected]
! Website : https://www.cae1.ddns.net
! Github: https://github.com/v-h-giang/
!!! compile with this link option (MSYS2)
!!! -lSDL2 -lSDL2_image -lSDL2_ttf -lSDL2_mixer
MODULE sdl2
USE, intrinsic :: iso_c_binding
implicit none
INTEGER(kind=c_int), PARAMETER :: SDL_FIRSTEVENT = 0
INTEGER(kind=c_int), PARAMETER :: SDL_QUITEVENT = int(z'100')
INTEGER(kind=c_int), PARAMETER :: SDL_APP_TERMINATING = int(z'101')
INTEGER(kind=c_int), PARAMETER :: SDL_APP_LOWMEMORY = int(z'102')
INTEGER(kind=c_int), PARAMETER :: SDL_APP_WILLENTERBACKGROUND = int(z'103')
INTEGER(kind=c_int), PARAMETER :: SDL_APP_DIDENTERBACKGROUND = int(z'104')
INTEGER(kind=c_int), PARAMETER :: SDL_APP_WILLENTERFOREGROUND = int(z'105')
INTEGER(kind=c_int), PARAMETER :: SDL_APP_DIDENTERFOREGROUND = int(z'106')
INTEGER(kind=c_int), PARAMETER :: SDL_WINDOWEVENT = int(z'200')
INTEGER(kind=c_int), PARAMETER :: SDL_SYSWMEVENT = int(z'201')
INTEGER(kind=c_int), PARAMETER :: SDL_KEYDOWN = int(z'300')
INTEGER(kind=c_int), PARAMETER :: SDL_KEYUP = int(z'301')
INTEGER(kind=c_int), PARAMETER :: SDL_TEXTEDITING = int(z'302')
INTEGER(kind=c_int), PARAMETER :: SDL_TEXTINPUT = int(z'303')
INTEGER(kind=c_int), PARAMETER :: SDL_KEYMAPCHANGED = int(z'304')
INTEGER(kind=c_int), PARAMETER :: SDL_MOUSEMOTION = int(z'400')
INTEGER(kind=c_int), PARAMETER :: SDL_MOUSEBUTTONDOWN = int(z'401')
INTEGER(kind=c_int), PARAMETER :: SDL_MOUSEBUTTONUP = int(z'402')
INTEGER(kind=c_int), PARAMETER :: SDL_MOUSEWHEEL = int(z'403')
INTEGER(kind=c_int), PARAMETER :: SDL_JOYAXISMOTION = int(z'600')
INTEGER(kind=c_int), PARAMETER :: SDL_JOYBALLMOTION = int(z'601')
INTEGER(kind=c_int), PARAMETER :: SDL_JOYHATMOTION = int(z'602')
INTEGER(kind=c_int), PARAMETER :: SDL_JOYBUTTONDOWN = int(z'603')
INTEGER(kind=c_int), PARAMETER :: SDL_JOYBUTTONUP = int(z'604')
INTEGER(kind=c_int), PARAMETER :: SDL_JOYDEVICEADDED = int(z'605')
INTEGER(kind=c_int), PARAMETER :: SDL_JOYDEVICEREMOVED = int(z'606')
INTEGER(kind=c_int), PARAMETER :: SDL_CONTROLLERAXISMOTION = int(z'650')
INTEGER(kind=c_int), PARAMETER :: SDL_CONTROLLERBUTTONDOWN = int(z'651')
INTEGER(kind=c_int), PARAMETER :: SDL_CONTROLLERBUTTONUP = int(z'652')
INTEGER(kind=c_int), PARAMETER :: SDL_CONTROLLERDEVICEADDED = int(z'653')
INTEGER(kind=c_int), PARAMETER :: SDL_CONTROLLERDEVICEREMOVED = int(z'654')
INTEGER(kind=c_int), PARAMETER :: SDL_CONTROLLERDEVICEREMAPPED = int(z'655')
INTEGER(kind=c_int), PARAMETER :: SDL_FINGERDOWN = int(z'700')
INTEGER(kind=c_int), PARAMETER :: SDL_FINGERUP = int(z'701')
INTEGER(kind=c_int), PARAMETER :: SDL_FINGERMOTION = int(z'702')
INTEGER(kind=c_int), PARAMETER :: SDL_DOLLARGESTURE = int(z'800')
INTEGER(kind=c_int), PARAMETER :: SDL_DOLLARRECORD = int(z'801')
INTEGER(kind=c_int), PARAMETER :: SDL_MULTIGESTURE = int(z'802')
INTEGER(kind=c_int), PARAMETER :: SDL_CLIPBOARDUPDATE = int(z'900')
INTEGER(kind=c_int), PARAMETER :: SDL_DROPFILE = int(z'1000')
INTEGER(kind=c_int), PARAMETER :: SDL_DROPTEXT = int(z'1001')
INTEGER(kind=c_int), PARAMETER :: SDL_DROPBEGIN = int(z'1002')
INTEGER(kind=c_int), PARAMETER :: SDL_DROPCOMPLETE = int(z'1003')
INTEGER(kind=c_int), PARAMETER :: SDL_AUDIODEVICEADDED = int(z'1100')
INTEGER(kind=c_int), PARAMETER :: SDL_AUDIODEVICEREMOVED = int(z'1101')
INTEGER(kind=c_int), PARAMETER :: SDL_RENDERTARGETSRESET = int(z'2000')
INTEGER(kind=c_int), PARAMETER :: SDL_RENDERDEVICERESET = int(z'2001')
INTEGER(kind=c_int), PARAMETER :: SDL_USEREVENT = int(z'8000')
INTEGER(kind=c_int), PARAMETER :: SDL_LASTEVEMT = int(z'FFFF')
!!!! SDL_HINTS
character(kind=c_char, len=*), parameter :: SDL_HINT_FRAMEBUFFER_ACCELERATION = 'SDL_FRAMEBUFFER_ACCELERATION'
character(kind=c_char, len=*), parameter :: SDL_HINT_RENDER_DRIVER = 'SDL_RENDER_DRIVER'
character(kind=c_char, len=*), parameter :: SDL_HINT_RENDER_OPENGL_SHADERS = 'SDL_RENDER_OPENGL_SHADERS'
character(kind=c_char, len=*), parameter :: SDL_HINT_RENDER_DIRECT3D_THREADSAFE = 'SDL_RENDER_DIRECT3D_THREADSAFE'
character(kind=c_char, len=*), parameter :: SDL_HINT_RENDER_DIRECT3D11_DEBUG = 'SDL_RENDER_DIRECT3D11_DEBUG'
character(kind=c_char, len=*), parameter :: SDL_HINT_RENDER_LOGICAL_SIZE_MODE = 'SDL_RENDER_LOGICAL_SIZE_MODE'
character(kind=c_char, len=*), parameter :: SDL_HINT_RENDER_SCALE_QUALITY = 'SDL_RENDER_SCALE_QUALITY'
character(kind=c_char, len=*), parameter :: SDL_HINT_RENDER_VSYNC = 'SDL_RENDER_VSYNC'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_ALLOW_SCREENSAVER = 'SDL_VIDEO_ALLOW_SCREENSAVER'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_X11_XVIDMODE = 'SDL_VIDEO_X11_XVIDMODE'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_X11_XINERAMA = 'SDL_VIDEO_X11_XINERAMA'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_X11_XRANDR = 'SDL_VIDEO_X11_XRANDR'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_X11_NET_WM_PING = 'SDL_VIDEO_X11_NET_WM_PING'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = &
'SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINDOWS_INTRESOURCE_ICON = 'SDL_WINDOWS_INTRESOURCE_ICON'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL = 'SDL_WINDOWS_INTRESOURCE_ICON_SMALL'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP = 'SDL_WINDOWS_ENABLE_MESSAGELOOP'
character(kind=c_char, len=*), parameter :: SDL_HINT_GRAB_KEYBOARD = 'SDL_GRAB_KEYBOARD'
character(kind=c_char, len=*), parameter :: SDL_HINT_MOUSE_NORMAL_SPEED_SCALE = 'SDL_MOUSE_NORMAL_SPEED_SCALE'
character(kind=c_char, len=*), parameter :: SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE = 'SDL_MOUSE_RELATIVE_SPEED_SCALE'
character(kind=c_char, len=*), parameter :: SDL_HINT_MOUSE_RELATIVE_MODE_WARP = 'SDL_MOUSE_RELATIVE_MODE_WARP'
character(kind=c_char, len=*), parameter :: SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH = 'SDL_MOUSE_FOCUS_CLICKTHROUGH'
character(kind=c_char, len=*), parameter :: SDL_HINT_TOUCH_MOUSE_EVENTS = 'SDL_TOUCH_MOUSE_EVENTS'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = 'SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS'
character(kind=c_char, len=*), parameter :: SDL_HINT_IDLE_TIMER_DISABLED = 'SDL_IOS_IDLE_TIMER_DISABLED'
character(kind=c_char, len=*), parameter :: SDL_HINT_ORIENTATIONS = 'SDL_IOS_ORIENTATIONS'
character(kind=c_char, len=*), parameter :: SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS = 'SDL_APPLE_TV_CONTROLLER_UI_EVENTS'
character(kind=c_char, len=*), parameter :: SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = 'SDL_APPLE_TV_REMOTE_ALLOW_ROTATION'
character(kind=c_char, len=*), parameter :: SDL_HINT_ACCELEROMETER_AS_JOYSTICK = 'SDL_ACCELEROMETER_AS_JOYSTICK'
character(kind=c_char, len=*), parameter :: SDL_HINT_XINPUT_ENABLED = 'SDL_XINPUT_ENABLED'
character(kind=c_char, len=*), parameter :: SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING = &
'SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING'
character(kind=c_char, len=*), parameter :: SDL_HINT_GAMECONTROLLERCONFIG = 'SDL_GAMECONTROLLERCONFIG'
character(kind=c_char, len=*), parameter :: SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES = 'SDL_GAMECONTROLLER_IGNORE_DEVICES'
character(kind=c_char, len=*), parameter :: SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = &
'SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT'
character(kind=c_char, len=*), parameter :: SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = &
'SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS'
character(kind=c_char, len=*), parameter :: SDL_HINT_ALLOW_TOPMOST = 'SDL_ALLOW_TOPMOST'
character(kind=c_char, len=*), parameter :: SDL_HINT_TIMER_RESOLUTION = 'SDL_TIMER_RESOLUTION'
character(kind=c_char, len=*), parameter :: SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION = 'SDL_QTWAYLAND_CONTENT_ORIENTATION'
character(kind=c_char, len=*), parameter :: SDL_HINT_QTWAYLAND_WINDOW_FLAGS = 'SDL_QTWAYLAND_WINDOW_FLAGS'
character(kind=c_char, len=*), parameter :: SDL_HINT_THREAD_STACK_SIZE = 'SDL_THREAD_STACK_SIZE'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_HIGHDPI_DISABLED = 'SDL_VIDEO_HIGHDPI_DISABLED'
character(kind=c_char, len=*), parameter :: SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = &
'SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_WIN_D3DCOMPILER = 'SDL_VIDEO_WIN_D3DCOMPILER'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT = &
'SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINRT_PRIVACY_POLICY_URL = 'SDL_WINRT_PRIVACY_POLICY_URL'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINRT_PRIVACY_POLICY_LABEL = 'SDL_WINRT_PRIVACY_POLICY_LABEL'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINRT_HANDLE_BACK_BUTTON = 'SDL_WINRT_HANDLE_BACK_BUTTON'
character(kind=c_char, len=*), parameter :: SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = 'SDL_VIDEO_MAC_FULLSCREEN_SPACES'
character(kind=c_char, len=*), parameter :: SDL_HINT_MAC_BACKGROUND_APP = 'SDL_MAC_BACKGROUND_APP'
character(kind=c_char, len=*), parameter :: SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION = &
'SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION'
character(kind=c_char, len=*), parameter :: SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = &
'SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION'
character(kind=c_char, len=*), parameter :: SDL_HINT_IME_INTERNAL_EDITING = 'SDL_IME_INTERNAL_EDITING'
character(kind=c_char, len=*), parameter :: SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH = &
'SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH'
character(kind=c_char, len=*), parameter :: SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = 'SDL_EMSCRIPTEN_KEYBOARD_ELEMENT'
character(kind=c_char, len=*), parameter :: SDL_HINT_NO_SIGNAL_HANDLERS = 'SDL_NO_SIGNAL_HANDLERS'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 = 'SDL_WINDOWS_NO_CLOSE_ON_ALT_F4'
character(kind=c_char, len=*), parameter :: SDL_HINT_BMP_SAVE_LEGACY_FORMAT = 'SDL_BMP_SAVE_LEGACY_FORMAT'
character(kind=c_char, len=*), parameter :: SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING = 'SDL_WINDOWS_DISABLE_THREAD_NAMING'
character(kind=c_char, len=*), parameter :: SDL_HINT_RPI_VIDEO_LAYER = 'SDL_RPI_VIDEO_LAYER'
character(kind=c_char, len=*), parameter :: SDL_HINT_OPENGL_ES_DRIVER = 'SDL_OPENGL_ES_DRIVER'
character(kind=c_char, len=*), parameter :: SDL_HINT_AUDIO_RESAMPLING_MODE = 'SDL_AUDIO_RESAMPLING_MODE'
character(kind=c_char, len=*), parameter :: SDL_HINT_AUDIO_CATEGORY = 'SDL_AUDIO_CATEGORY'
CHARACTER(kind=c_char, len=*), PARAMETER :: SDL_HINT_IME_SHOW_UI = "SDL_IME_SHOW_UI"
CHARACTER(kind=c_char, len=*), PARAMETER :: SDL_HINT_IME_SUPPORT_EXTENDED_TEXT = "SDL_IME_SUPPORT_EXTENDED_TEXT"
!!!!! IMG
integer(kind=c_int), parameter, public :: IMG_INIT_JPG = int(z'00000001')
integer(kind=c_int), parameter, public :: IMG_INIT_PNG = int(z'00000002')
integer(kind=c_int), parameter, public :: IMG_INIT_TIF = int(z'00000004')
integer(kind=c_int), parameter, public :: IMG_INIT_WEBP = int(z'00000008')
INTEGER, PARAMETER :: c_uint8_t = c_int8_t
INTEGER, PARAMETER :: c_uint16_t = c_int16_t
INTEGER, PARAMETER :: c_uint32_t = c_int32_t
INTEGER, PARAMETER :: c_uint64_t = c_int64_t
INTEGER, PARAMETER :: c_unsigned = c_int
INTEGER, PARAMETER :: c_unsigned_char = c_signed_char
INTEGER, PARAMETER :: c_unsigned_long = c_long
INTEGER, PARAMETER :: c_unsigned_long_long = c_long_long
INTEGER, PARAMETER :: c_unsigned_short = c_short
integer, parameter :: sdl_bool = c_int
integer(kind=c_int), parameter :: SDL_BUTTON_LEFT = 1
integer(kind=c_int), parameter :: SDL_BUTTON_MIDDLE = 2
integer(kind=c_int), parameter :: SDL_BUTTON_RIGHT = 3
integer(kind=c_int), parameter :: SDL_BUTTON_X1 = 4
integer(kind=c_int), parameter :: SDL_BUTTON_X2 = 5
integer(kind=c_int), parameter :: SDL_BUTTON_LMASK = ishft(1, SDL_BUTTON_LEFT - 1)
integer(kind=c_int), parameter :: SDL_BUTTON_MMASK = ishft(1, SDL_BUTTON_MIDDLE - 1)
integer(kind=c_int), parameter :: SDL_BUTTON_RMASK = ishft(1, SDL_BUTTON_RIGHT - 1)
integer(kind=c_int), parameter :: SDL_BUTTON_X1MASK = ishft(1, SDL_BUTTON_X1 - 1)
integer(kind=c_int), parameter :: SDL_BUTTON_X2MASK = ishft(1, SDL_BUTTON_X2 - 1)
integer(kind=c_int), parameter :: SDL_WINDOWPOS_UNDEFINED_MASK = int(z'1FFF0000')
integer(kind=c_int), parameter :: SDL_WINDOWPOS_UNDEFINED = ior(SDL_WINDOWPOS_UNDEFINED_MASK, 0)
integer(kind=c_int), parameter :: SDL_INIT_TIMER = int(z'00000001')
integer(kind=c_int), parameter :: SDL_INIT_AUDIO = int(z'00000010')
integer(kind=c_int), parameter :: SDL_INIT_VIDEO = int(z'00000020')
integer(kind=c_int), parameter :: SDL_INIT_JOYSTICK = int(z'00000200')
integer(kind=c_int), parameter :: SDL_INIT_HAPTIC = int(z'00001000')
integer(kind=c_int), parameter :: SDL_INIT_GAMECONTROLLER = int(z'00002000')
integer(kind=c_int), parameter :: SDL_INIT_EVENTS = int(z'00004000')
integer(kind=c_int), parameter :: SDL_INIT_NOPARACHUTE = int(z'00010000')
integer(kind=c_int), parameter :: SDL_INIT_EVERYTHING = ior(SDL_INIT_TIMER, &
ior(SDL_INIT_VIDEO, &
ior(SDL_INIT_VIDEO, &
ior(SDL_INIT_JOYSTICK, &
ior(SDL_INIT_HAPTIC, &
ior(SDL_INIT_GAMECONTROLLER, &
ior(SDL_INIT_EVENTS, SDL_INIT_NOPARACHUTE)))))))
integer(kind=c_int), parameter :: SDL_WINDOW_FULLSCREEN = int(z'00000001')
integer(kind=c_int), parameter :: SDL_WINDOW_OPENGL = int(z'00000002')
integer(kind=c_int), parameter :: SDL_WINDOW_SHOWN = int(z'00000004')
integer(kind=c_int), parameter :: SDL_WINDOW_HIDDEN = int(z'00000008')
integer(kind=c_int), parameter :: SDL_WINDOW_BORDERLESS = int(z'00000010')
integer(kind=c_int), parameter :: SDL_WINDOW_RESIZABLE = int(z'00000020')
integer(kind=c_int), parameter :: SDL_WINDOW_MINIMIZED = int(z'00000040')
integer(kind=c_int), parameter :: SDL_WINDOW_MAXIMIZED = int(z'00000080')
integer(kind=c_int), parameter :: SDL_WINDOW_INPUT_GRABBED = int(z'00000100')
integer(kind=c_int), parameter :: SDL_WINDOW_INPUT_FOCUS = int(z'00000200')
integer(kind=c_int), parameter :: SDL_WINDOW_MOUSE_FOCUS = int(z'00000400')
integer(kind=c_int), parameter :: SDL_WINDOW_FULLSCREEN_DESKTOP = ior(SDL_WINDOW_FULLSCREEN, &
int(z'00001000'))
integer(kind=c_int), parameter :: SDL_WINDOW_FOREIGN = int(z'00000800')
integer(kind=c_int), parameter :: SDL_WINDOW_ALLOW_HIGHDPI = int(z'00002000')
integer(kind=c_int), parameter :: SDL_WINDOW_MOUSE_CAPTURE = int(z'00004000')
integer(kind=c_int), parameter :: SDL_WINDOW_ALWAYS_ON_TOP = int(z'00008000')
integer(kind=c_int), parameter :: SDL_WINDOW_SKIP_TASKBAR = int(z'00010000')
integer(kind=c_int), parameter :: SDL_WINDOW_UTILITY = int(z'00020000')
integer(kind=c_int), parameter :: SDL_WINDOW_TOOLTIP = int(z'00040000')
integer(kind=c_int), parameter :: SDL_WINDOW_POPUP_MENU = int(z'00080000')
integer(kind=c_int), parameter :: SDL_WINDOW_VULKAN = int(z'10000000')
!!!! ttf style
INTEGER , PARAMETER :: TTF_STYLE_NORMAL = 0
INTEGER , PARAMETER :: TTF_STYLE_BOLD = 1
INTEGER , PARAMETER :: TTF_STYLE_ITALIC = 2
INTEGER , PARAMETER :: TTF_STYLE_UNDERLINE = 3
INTEGER , PARAMETER :: TTF_STYLE_STRIKETHROUGH = 4
!!!! SDL pixel
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_UNKNOWN = int(z'0')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_INDEX1LSB = int(z'11100100')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_INDEX1MSB = int(z'11200100')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_INDEX4LSB = int(z'12100400')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_INDEX4MSB = int(z'12200400')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_INDEX8 = int(z'13000801')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGB332 = int(z'14110801')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGB444 = int(z'15120c02')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGB555 = int(z'15130f02')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGR555 = int(z'15530f02')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_ARGB4444 = int(z'15321002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGBA4444 = int(z'15421002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_ABGR4444 = int(z'15721002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGRA4444 = int(z'15821002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_ARGB1555 = int(z'15331002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGBA5551 = int(z'15441002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_ABGR1555 = int(z'15731002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGRA5551 = int(z'15841002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGB565 = int(z'15151002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGR565 = int(z'15551002')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGB24 = int(z'17101803')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGR24 = int(z'17401803')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGB888 = int(z'16161804')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGBX8888 = int(z'16261804')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGR888 = int(z'16561804')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGRX8888 = int(z'16661804')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_ARGB8888 = int(z'16362004')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_RGBA8888 = int(z'16462004')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_ABGR8888 = int(z'16762004')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_BGRA8888 = int(z'16862004')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_ARGB2101010 = int(z'16372004')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_YV12 = int(z'32315659')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_IYUV = int(z'56555949')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_YUY2 = int(z'32595559')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_UYVY = int(z'59565955')
integer(kind=c_int), parameter :: SDL_PIXELFORMAT_YVYU = int(z'55595659')
integer(kind=c_int), parameter :: SDL_ALPHA_OPAQUE = 255
integer(kind=c_int), parameter :: SDL_ALPHA_TRANSPARENT = 0
integer(kind=c_int), parameter :: SDL_RENDERER_SOFTWARE = int(z'00000001')
integer(kind=c_int), parameter :: SDL_RENDERER_ACCELERATED = int(z'00000002')
integer(kind=c_int), parameter :: SDL_RENDERER_PRESENTVSYNC = int(z'00000004')
integer(kind=c_int), parameter :: SDL_RENDERER_TARGETTEXTURE = int(z'00000008')
! SDL_RendererFlip
integer(kind=c_int), parameter :: SDL_FLIP_NONE = int(z'00000000')
integer(kind=c_int), parameter :: SDL_FLIP_HORIZONTAL = int(z'00000001')
integer(kind=c_int), parameter :: SDL_FLIP_VERTICAL = int(z'00000002')
integer(kind=c_int), parameter :: SDL_BLENDMODE_NONE = int(z'00000000')
integer(kind=c_int), parameter :: SDL_BLENDMODE_BLEND = int(z'00000001')
integer(kind=c_int), parameter :: SDL_BLENDMODE_ADD = int(z'00000002')
integer(kind=c_int), parameter :: SDL_BLENDMODE_MOD = int(z'00000004')
integer(kind=c_int), parameter :: SDL_BLENDMODE_INVALID = int(z'7FFFFFFF')
!!! scancode
integer(kind=c_int), parameter :: SDL_SCANCODE_UNKNOWN = 0
integer(kind=c_int), parameter :: SDL_SCANCODE_A = 4
integer(kind=c_int), parameter :: SDL_SCANCODE_B = 5
integer(kind=c_int), parameter :: SDL_SCANCODE_C = 6
integer(kind=c_int), parameter :: SDL_SCANCODE_D = 7
integer(kind=c_int), parameter :: SDL_SCANCODE_E = 8
integer(kind=c_int), parameter :: SDL_SCANCODE_F = 9
integer(kind=c_int), parameter :: SDL_SCANCODE_G = 10
integer(kind=c_int), parameter :: SDL_SCANCODE_H = 11
integer(kind=c_int), parameter :: SDL_SCANCODE_I = 12
integer(kind=c_int), parameter :: SDL_SCANCODE_J = 13
integer(kind=c_int), parameter :: SDL_SCANCODE_K = 14
integer(kind=c_int), parameter :: SDL_SCANCODE_L = 15
integer(kind=c_int), parameter :: SDL_SCANCODE_M = 16
integer(kind=c_int), parameter :: SDL_SCANCODE_N = 17
integer(kind=c_int), parameter :: SDL_SCANCODE_O = 18
integer(kind=c_int), parameter :: SDL_SCANCODE_P = 19
integer(kind=c_int), parameter :: SDL_SCANCODE_Q = 20
integer(kind=c_int), parameter :: SDL_SCANCODE_R = 21
integer(kind=c_int), parameter :: SDL_SCANCODE_S = 22
integer(kind=c_int), parameter :: SDL_SCANCODE_T = 23
integer(kind=c_int), parameter :: SDL_SCANCODE_U = 24
integer(kind=c_int), parameter :: SDL_SCANCODE_V = 25
integer(kind=c_int), parameter :: SDL_SCANCODE_W = 26
integer(kind=c_int), parameter :: SDL_SCANCODE_X = 27
integer(kind=c_int), parameter :: SDL_SCANCODE_Y = 28
integer(kind=c_int), parameter :: SDL_SCANCODE_Z = 29
integer(kind=c_int), parameter :: SDL_SCANCODE_1 = 30
integer(kind=c_int), parameter :: SDL_SCANCODE_2 = 31
integer(kind=c_int), parameter :: SDL_SCANCODE_3 = 32
integer(kind=c_int), parameter :: SDL_SCANCODE_4 = 33
integer(kind=c_int), parameter :: SDL_SCANCODE_5 = 34
integer(kind=c_int), parameter :: SDL_SCANCODE_6 = 35
integer(kind=c_int), parameter :: SDL_SCANCODE_7 = 36
integer(kind=c_int), parameter :: SDL_SCANCODE_8 = 37
integer(kind=c_int), parameter :: SDL_SCANCODE_9 = 38
integer(kind=c_int), parameter :: SDL_SCANCODE_0 = 39
integer(kind=c_int), parameter :: SDL_SCANCODE_RETURN = 40
integer(kind=c_int), parameter :: SDL_SCANCODE_ESCAPE = 41
integer(kind=c_int), parameter :: SDL_SCANCODE_BACKSPACE = 42
integer(kind=c_int), parameter :: SDL_SCANCODE_TAB = 43
integer(kind=c_int), parameter :: SDL_SCANCODE_SPACE = 44
integer(kind=c_int), parameter :: SDL_SCANCODE_MINUS = 45
integer(kind=c_int), parameter :: SDL_SCANCODE_EQUALS = 46
integer(kind=c_int), parameter :: SDL_SCANCODE_LEFTBRACKET = 47
integer(kind=c_int), parameter :: SDL_SCANCODE_RIGHTBRACKET = 48
integer(kind=c_int), parameter :: SDL_SCANCODE_BACKSLASH = 49
integer(kind=c_int), parameter :: SDL_SCANCODE_NONUSHASH = 50
integer(kind=c_int), parameter :: SDL_SCANCODE_SEMICOLON = 51
integer(kind=c_int), parameter :: SDL_SCANCODE_APOSTROPHE = 52
integer(kind=c_int), parameter :: SDL_SCANCODE_GRAVE = 53
integer(kind=c_int), parameter :: SDL_SCANCODE_COMMA = 54
integer(kind=c_int), parameter :: SDL_SCANCODE_PERIOD = 55
integer(kind=c_int), parameter :: SDL_SCANCODE_SLASH = 56
integer(kind=c_int), parameter :: SDL_SCANCODE_CAPSLOCK = 57
integer(kind=c_int), parameter :: SDL_SCANCODE_F1 = 58
integer(kind=c_int), parameter :: SDL_SCANCODE_F2 = 59
integer(kind=c_int), parameter :: SDL_SCANCODE_F3 = 60
integer(kind=c_int), parameter :: SDL_SCANCODE_F4 = 61
integer(kind=c_int), parameter :: SDL_SCANCODE_F5 = 62
integer(kind=c_int), parameter :: SDL_SCANCODE_F6 = 63
integer(kind=c_int), parameter :: SDL_SCANCODE_F7 = 64
integer(kind=c_int), parameter :: SDL_SCANCODE_F8 = 65
integer(kind=c_int), parameter :: SDL_SCANCODE_F9 = 66
integer(kind=c_int), parameter :: SDL_SCANCODE_F10 = 67
integer(kind=c_int), parameter :: SDL_SCANCODE_F11 = 68
integer(kind=c_int), parameter :: SDL_SCANCODE_F12 = 69
integer(kind=c_int), parameter :: SDL_SCANCODE_PRINTSCREEN = 70
integer(kind=c_int), parameter :: SDL_SCANCODE_SCROLLLOCK = 71
integer(kind=c_int), parameter :: SDL_SCANCODE_PAUSE = 72
integer(kind=c_int), parameter :: SDL_SCANCODE_INSERT = 73
integer(kind=c_int), parameter :: SDL_SCANCODE_HOME = 74
integer(kind=c_int), parameter :: SDL_SCANCODE_PAGEUP = 75
integer(kind=c_int), parameter :: SDL_SCANCODE_DELETE = 76
integer(kind=c_int), parameter :: SDL_SCANCODE_END = 77
integer(kind=c_int), parameter :: SDL_SCANCODE_PAGEDOWN = 78
integer(kind=c_int), parameter :: SDL_SCANCODE_RIGHT = 79
integer(kind=c_int), parameter :: SDL_SCANCODE_LEFT = 80
integer(kind=c_int), parameter :: SDL_SCANCODE_DOWN = 81
integer(kind=c_int), parameter :: SDL_SCANCODE_UP = 82
integer(kind=c_int), parameter :: SDL_SCANCODE_NUMLOCKCLEAR = 83
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_DIVIDE = 84
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MULTIPLY = 85
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MINUS = 86
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_PLUS = 87
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_ENTER = 88
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_1 = 89
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_2 = 90
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_3 = 91
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_4 = 92
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_5 = 93
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_6 = 94
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_7 = 95
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_8 = 96
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_9 = 97
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_0 = 98
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_PERIOD = 99
integer(kind=c_int), parameter :: SDL_SCANCODE_NONUSBACKSLASH = 100
integer(kind=c_int), parameter :: SDL_SCANCODE_APPLICATION = 101
integer(kind=c_int), parameter :: SDL_SCANCODE_POWER = 102
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_EQUALS = 103
integer(kind=c_int), parameter :: SDL_SCANCODE_F13 = 104
integer(kind=c_int), parameter :: SDL_SCANCODE_F14 = 105
integer(kind=c_int), parameter :: SDL_SCANCODE_F15 = 106
integer(kind=c_int), parameter :: SDL_SCANCODE_F16 = 107
integer(kind=c_int), parameter :: SDL_SCANCODE_F17 = 108
integer(kind=c_int), parameter :: SDL_SCANCODE_F18 = 109
integer(kind=c_int), parameter :: SDL_SCANCODE_F19 = 110
integer(kind=c_int), parameter :: SDL_SCANCODE_F20 = 111
integer(kind=c_int), parameter :: SDL_SCANCODE_F21 = 112
integer(kind=c_int), parameter :: SDL_SCANCODE_F22 = 113
integer(kind=c_int), parameter :: SDL_SCANCODE_F23 = 114
integer(kind=c_int), parameter :: SDL_SCANCODE_F24 = 115
integer(kind=c_int), parameter :: SDL_SCANCODE_EXECUTE = 116
integer(kind=c_int), parameter :: SDL_SCANCODE_HELP = 117
integer(kind=c_int), parameter :: SDL_SCANCODE_MENU = 118
integer(kind=c_int), parameter :: SDL_SCANCODE_SELECT = 119
integer(kind=c_int), parameter :: SDL_SCANCODE_STOP = 120
integer(kind=c_int), parameter :: SDL_SCANCODE_AGAIN = 121
integer(kind=c_int), parameter :: SDL_SCANCODE_UNDO = 122
integer(kind=c_int), parameter :: SDL_SCANCODE_CUT = 123
integer(kind=c_int), parameter :: SDL_SCANCODE_COPY = 124
integer(kind=c_int), parameter :: SDL_SCANCODE_PASTE = 125
integer(kind=c_int), parameter :: SDL_SCANCODE_FIND = 126
integer(kind=c_int), parameter :: SDL_SCANCODE_MUTE = 127
integer(kind=c_int), parameter :: SDL_SCANCODE_VOLUMEUP = 128
integer(kind=c_int), parameter :: SDL_SCANCODE_VOLUMEDOWN = 129
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_COMMA = 133
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_EQUALSAS400 = 134
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL1 = 135
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL2 = 136
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL3 = 137
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL4 = 138
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL5 = 139
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL6 = 140
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL7 = 141
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL8 = 142
integer(kind=c_int), parameter :: SDL_SCANCODE_INTERNATIONAL9 = 143
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG1 = 144
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG2 = 145
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG3 = 146
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG4 = 147
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG5 = 148
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG6 = 149
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG7 = 150
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG8 = 151
integer(kind=c_int), parameter :: SDL_SCANCODE_LANG9 = 152
integer(kind=c_int), parameter :: SDL_SCANCODE_ALTERASE = 153
integer(kind=c_int), parameter :: SDL_SCANCODE_SYSREQ = 154
integer(kind=c_int), parameter :: SDL_SCANCODE_CANCEL = 155
integer(kind=c_int), parameter :: SDL_SCANCODE_CLEAR = 156
integer(kind=c_int), parameter :: SDL_SCANCODE_PRIOR = 157
integer(kind=c_int), parameter :: SDL_SCANCODE_RETURN2 = 158
integer(kind=c_int), parameter :: SDL_SCANCODE_SEPARATOR = 159
integer(kind=c_int), parameter :: SDL_SCANCODE_OUT = 160
integer(kind=c_int), parameter :: SDL_SCANCODE_OPER = 161
integer(kind=c_int), parameter :: SDL_SCANCODE_CLEARAGAIN = 162
integer(kind=c_int), parameter :: SDL_SCANCODE_CRSEL = 163
integer(kind=c_int), parameter :: SDL_SCANCODE_EXSEL = 164
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_00 = 176
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_000 = 177
integer(kind=c_int), parameter :: SDL_SCANCODE_THOUSANDSSEPARATOR = 178
integer(kind=c_int), parameter :: SDL_SCANCODE_DECIMALSEPARATOR = 179
integer(kind=c_int), parameter :: SDL_SCANCODE_CURRENCYUNIT = 180
integer(kind=c_int), parameter :: SDL_SCANCODE_CURRENCYSUBUNIT = 181
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_LEFTPAREN = 182
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_RIGHTPAREN = 183
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_LEFTBRACE = 184
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_RIGHTBRACE = 185
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_TAB = 186
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_BACKSPACE = 187
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_A = 188
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_B = 189
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_C = 190
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_D = 191
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_E = 192
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_F = 193
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_XOR = 194
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_POWER = 195
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_PERCENT = 196
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_LESS = 197
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_GREATER = 198
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_AMPERSAND = 199
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_DBLAMPERSAND = 200
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_VERTICALBAR = 201
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_DBLVERTICALBAR = 202
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_COLON = 203
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_HASH = 204
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_SPACE = 205
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_AT = 206
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_EXCLAM = 207
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MEMSTORE = 208
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MEMRECALL = 209
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MEMCLEAR = 210
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MEMADD = 211
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MEMSUBTRACT = 212
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MEMMULTIPLY = 213
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_MEMDIVIDE = 214
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_PLUSMINUS = 215
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_CLEAR = 216
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_CLEARENTRY = 217
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_BINARY = 218
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_OCTAL = 219
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_DECIMAL = 220
integer(kind=c_int), parameter :: SDL_SCANCODE_KP_HEXADECIMAL = 221
integer(kind=c_int), parameter :: SDL_SCANCODE_LCTRL = 224
integer(kind=c_int), parameter :: SDL_SCANCODE_LSHIFT = 225
integer(kind=c_int), parameter :: SDL_SCANCODE_LALT = 226
integer(kind=c_int), parameter :: SDL_SCANCODE_LGUI = 227
integer(kind=c_int), parameter :: SDL_SCANCODE_RCTRL = 228
integer(kind=c_int), parameter :: SDL_SCANCODE_RSHIFT = 229
integer(kind=c_int), parameter :: SDL_SCANCODE_RALT = 230
integer(kind=c_int), parameter :: SDL_SCANCODE_RGUI = 231
integer(kind=c_int), parameter :: SDL_SCANCODE_MODE = 257
integer(kind=c_int), parameter :: SDL_SCANCODE_AUDIONEXT = 258
integer(kind=c_int), parameter :: SDL_SCANCODE_AUDIOPREV = 259
integer(kind=c_int), parameter :: SDL_SCANCODE_AUDIOSTOP = 260
integer(kind=c_int), parameter :: SDL_SCANCODE_AUDIOPLAY = 261
integer(kind=c_int), parameter :: SDL_SCANCODE_AUDIOMUTE = 262
integer(kind=c_int), parameter :: SDL_SCANCODE_MEDIASELECT = 263
integer(kind=c_int), parameter :: SDL_SCANCODE_WWW = 264
integer(kind=c_int), parameter :: SDL_SCANCODE_MAIL = 265
integer(kind=c_int), parameter :: SDL_SCANCODE_CALCULATOR = 266
integer(kind=c_int), parameter :: SDL_SCANCODE_COMPUTER = 267
integer(kind=c_int), parameter :: SDL_SCANCODE_AC_SEARCH = 268
integer(kind=c_int), parameter :: SDL_SCANCODE_AC_HOME = 269
integer(kind=c_int), parameter :: SDL_SCANCODE_AC_BACK = 270
integer(kind=c_int), parameter :: SDL_SCANCODE_AC_FORWARD = 271
integer(kind=c_int), parameter :: SDL_SCANCODE_AC_STOP = 272
integer(kind=c_int), parameter :: SDL_SCANCODE_AC_REFRESH = 273
integer(kind=c_int), parameter :: SDL_SCANCODE_AC_BOOKMARKS = 274
integer(kind=c_int), parameter :: SDL_SCANCODE_BRIGHTNESSDOWN = 275
integer(kind=c_int), parameter :: SDL_SCANCODE_BRIGHTNESSUP = 276
integer(kind=c_int), parameter :: SDL_SCANCODE_DISPLAYSWITCH = 277
integer(kind=c_int), parameter :: SDL_SCANCODE_KBDILLUMTOGGLE = 278
integer(kind=c_int), parameter :: SDL_SCANCODE_KBDILLUMDOWN = 279
integer(kind=c_int), parameter :: SDL_SCANCODE_KBDILLUMUP = 280
integer(kind=c_int), parameter :: SDL_SCANCODE_EJECT = 281
integer(kind=c_int), parameter :: SDL_SCANCODE_SLEEP = 282
integer(kind=c_int), parameter :: SDL_SCANCODE_APP1 = 283
integer(kind=c_int), parameter :: SDL_SCANCODE_APP2 = 284
integer(kind=c_int), parameter :: SDL_SCANCODE_AUDIOREWIND = 285
integer(kind=c_int), parameter :: SDL_SCANCODE_AUDIOFASTFORWARD = 286
integer(kind=c_int), parameter :: SDL_NUM_SCANCODES = 512
!!!!! keycode
integer(kind=c_int), parameter :: SDLK_SCANCODE_MASK = ishft(1, 30)
integer(kind=c_int), parameter :: SDLK_UNKNOWN = 0
integer(kind=c_int), parameter :: SDLK_RETURN = 13
integer(kind=c_int), parameter :: SDLK_ESCAPE = 27
integer(kind=c_int), parameter :: SDLK_BACKSPACE = 8
integer(kind=c_int), parameter :: SDLK_TAB = 9
integer(kind=c_int), parameter :: SDLK_SPACE = ichar(' ')
integer(kind=c_int), parameter :: SDLK_EXCLAIM = ichar('!')
integer(kind=c_int), parameter :: SDLK_QUOTEDBL = ichar('"')
integer(kind=c_int), parameter :: SDLK_HASH = ichar('#')
integer(kind=c_int), parameter :: SDLK_PERCENT = ichar('%')
integer(kind=c_int), parameter :: SDLK_DOLLAR = ichar('$')
integer(kind=c_int), parameter :: SDLK_AMPERSAND = ichar('&')
integer(kind=c_int), parameter :: SDLK_QUOTE = ichar("'")
integer(kind=c_int), parameter :: SDLK_LEFTPAREN = ichar('(')
integer(kind=c_int), parameter :: SDLK_RIGHTPAREN = ichar(')')
integer(kind=c_int), parameter :: SDLK_ASTERISK = ichar('*')
integer(kind=c_int), parameter :: SDLK_PLUS = ichar('+')
integer(kind=c_int), parameter :: SDLK_COMMA = ichar(',')
integer(kind=c_int), parameter :: SDLK_MINUS = ichar('-')
integer(kind=c_int), parameter :: SDLK_PERIOD = ichar('.')
integer(kind=c_int), parameter :: SDLK_SLASH = ichar('/')
integer(kind=c_int), parameter :: SDLK_0 = ichar('0')
integer(kind=c_int), parameter :: SDLK_1 = ichar('1')
integer(kind=c_int), parameter :: SDLK_2 = ichar('2')
integer(kind=c_int), parameter :: SDLK_3 = ichar('3')
integer(kind=c_int), parameter :: SDLK_4 = ichar('4')
integer(kind=c_int), parameter :: SDLK_5 = ichar('5')
integer(kind=c_int), parameter :: SDLK_6 = ichar('6')
integer(kind=c_int), parameter :: SDLK_7 = ichar('7')
integer(kind=c_int), parameter :: SDLK_8 = ichar('8')
integer(kind=c_int), parameter :: SDLK_9 = ichar('9')
integer(kind=c_int), parameter :: SDLK_COLON = ichar(':')
integer(kind=c_int), parameter :: SDLK_SEMICOLON = ichar(';')
integer(kind=c_int), parameter :: SDLK_LESS = ichar('<')
integer(kind=c_int), parameter :: SDLK_EQUALS = ichar('=')
integer(kind=c_int), parameter :: SDLK_GREATER = ichar('>')
integer(kind=c_int), parameter :: SDLK_QUESTION = ichar('?')
integer(kind=c_int), parameter :: SDLK_AT = ichar('@')
integer(kind=c_int), parameter :: SDLK_LEFTBRACKET = ichar('[')
integer(kind=c_int), parameter :: SDLK_BACKSLASH = ichar('\')
integer(kind=c_int), parameter :: SDLK_RIGHTBRACKET = ichar(']')
integer(kind=c_int), parameter :: SDLK_CARET = ichar('^')
integer(kind=c_int), parameter :: SDLK_UNDERSCORE = ichar('_')
integer(kind=c_int), parameter :: SDLK_BACKQUOTE = ichar('`')
integer(kind=c_int), parameter :: SDLK_a = ichar('a')
integer(kind=c_int), parameter :: SDLK_b = ichar('b')
integer(kind=c_int), parameter :: SDLK_c = ichar('c')
integer(kind=c_int), parameter :: SDLK_d = ichar('d')
integer(kind=c_int), parameter :: SDLK_e = ichar('e')
integer(kind=c_int), parameter :: SDLK_f = ichar('f')
integer(kind=c_int), parameter :: SDLK_g = ichar('g')
integer(kind=c_int), parameter :: SDLK_h = ichar('h')
integer(kind=c_int), parameter :: SDLK_i = ichar('i')
integer(kind=c_int), parameter :: SDLK_j = ichar('j')
integer(kind=c_int), parameter :: SDLK_k = ichar('k')
integer(kind=c_int), parameter :: SDLK_l = ichar('l')
integer(kind=c_int), parameter :: SDLK_m = ichar('m')
integer(kind=c_int), parameter :: SDLK_n = ichar('n')
integer(kind=c_int), parameter :: SDLK_o = ichar('o')
integer(kind=c_int), parameter :: SDLK_p = ichar('p')
integer(kind=c_int), parameter :: SDLK_q = ichar('q')
integer(kind=c_int), parameter :: SDLK_r = ichar('r')
integer(kind=c_int), parameter :: SDLK_s = ichar('s')
integer(kind=c_int), parameter :: SDLK_t = ichar('t')
integer(kind=c_int), parameter :: SDLK_u = ichar('u')
integer(kind=c_int), parameter :: SDLK_v = ichar('v')
integer(kind=c_int), parameter :: SDLK_w = ichar('w')
integer(kind=c_int), parameter :: SDLK_x = ichar('x')
integer(kind=c_int), parameter :: SDLK_y = ichar('y')
integer(kind=c_int), parameter :: SDLK_z = ichar('z')
integer(kind=c_int), parameter :: SDLK_CAPSLOCK = ior(SDL_SCANCODE_CAPSLOCK, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F1 = ior(SDL_SCANCODE_F1, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F2 = ior(SDL_SCANCODE_F2, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F3 = ior(SDL_SCANCODE_F3, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F4 = ior(SDL_SCANCODE_F4, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F5 = ior(SDL_SCANCODE_F5, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F6 = ior(SDL_SCANCODE_F6, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F7 = ior(SDL_SCANCODE_F7, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F8 = ior(SDL_SCANCODE_F8, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F9 = ior(SDL_SCANCODE_F9, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F10 = ior(SDL_SCANCODE_F10, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F11 = ior(SDL_SCANCODE_F11, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F12 = ior(SDL_SCANCODE_F12, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_PRINTSCREEN = ior(SDL_SCANCODE_PRINTSCREEN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_SCROLLLOCK = ior(SDL_SCANCODE_SCROLLLOCK, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_PAUSE = ior(SDL_SCANCODE_PAUSE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_INSERT = ior(SDL_SCANCODE_INSERT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_HOME = ior(SDL_SCANCODE_HOME, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_PAGEUP = ior(SDL_SCANCODE_PAGEUP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_DELETE = 127
integer(kind=c_int), parameter :: SDLK_END = ior(SDL_SCANCODE_END, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_PAGEDOWN = ior(SDL_SCANCODE_PAGEDOWN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_RIGHT = ior(SDL_SCANCODE_RIGHT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_LEFT = ior(SDL_SCANCODE_LEFT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_DOWN = ior(SDL_SCANCODE_DOWN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_UP = ior(SDL_SCANCODE_UP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_NUMLOCKCLEAR = ior(SDL_SCANCODE_NUMLOCKCLEAR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_DIVIDE = ior(SDL_SCANCODE_KP_DIVIDE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MULTIPLY = ior(SDL_SCANCODE_KP_MULTIPLY, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MINUS = ior(SDL_SCANCODE_KP_MINUS, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_PLUS = ior(SDL_SCANCODE_KP_PLUS, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_ENTER = ior(SDL_SCANCODE_KP_ENTER, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_1 = ior(SDL_SCANCODE_KP_1, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_2 = ior(SDL_SCANCODE_KP_2, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_3 = ior(SDL_SCANCODE_KP_3, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_4 = ior(SDL_SCANCODE_KP_4, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_5 = ior(SDL_SCANCODE_KP_5, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_6 = ior(SDL_SCANCODE_KP_6, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_7 = ior(SDL_SCANCODE_KP_7, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_8 = ior(SDL_SCANCODE_KP_8, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_9 = ior(SDL_SCANCODE_KP_9, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_0 = ior(SDL_SCANCODE_KP_0, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_PERIOD = ior(SDL_SCANCODE_KP_PERIOD, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_APPLICATION = ior(SDL_SCANCODE_APPLICATION, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_POWER = ior(SDL_SCANCODE_POWER, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_EQUALS = ior(SDL_SCANCODE_KP_EQUALS, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F13 = ior(SDL_SCANCODE_F13, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F14 = ior(SDL_SCANCODE_F14, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F15 = ior(SDL_SCANCODE_F15, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F16 = ior(SDL_SCANCODE_F16, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F17 = ior(SDL_SCANCODE_F17, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F18 = ior(SDL_SCANCODE_F18, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F19 = ior(SDL_SCANCODE_F19, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F20 = ior(SDL_SCANCODE_F20, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F21 = ior(SDL_SCANCODE_F21, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F22 = ior(SDL_SCANCODE_F22, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F23 = ior(SDL_SCANCODE_F23, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_F24 = ior(SDL_SCANCODE_F24, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_EXECUTE = ior(SDL_SCANCODE_EXECUTE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_HELP = ior(SDL_SCANCODE_HELP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_MENU = ior(SDL_SCANCODE_MENU, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_SELECT = ior(SDL_SCANCODE_SELECT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_STOP = ior(SDL_SCANCODE_STOP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AGAIN = ior(SDL_SCANCODE_AGAIN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_UNDO = ior(SDL_SCANCODE_UNDO, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CUT = ior(SDL_SCANCODE_CUT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_COPY = ior(SDL_SCANCODE_COPY, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_PASTE = ior(SDL_SCANCODE_PASTE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_FIND = ior(SDL_SCANCODE_FIND, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_MUTE = ior(SDL_SCANCODE_MUTE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_VOLUMEUP = ior(SDL_SCANCODE_VOLUMEUP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_VOLUMEDOWN = ior(SDL_SCANCODE_VOLUMEDOWN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_COMMA = ior(SDL_SCANCODE_KP_COMMA, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_EQUALSAS400 = ior(SDL_SCANCODE_KP_EQUALSAS400, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_ALTERASE = ior(SDL_SCANCODE_ALTERASE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_SYSREQ = ior(SDL_SCANCODE_SYSREQ, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CANCEL = ior(SDL_SCANCODE_CANCEL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CLEAR = ior(SDL_SCANCODE_CLEAR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_PRIOR = ior(SDL_SCANCODE_PRIOR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_RETURN2 = ior(SDL_SCANCODE_RETURN2, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_SEPARATOR = ior(SDL_SCANCODE_SEPARATOR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_OUT = ior(SDL_SCANCODE_OUT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_OPER = ior(SDL_SCANCODE_OPER, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CLEARAGAIN = ior(SDL_SCANCODE_CLEARAGAIN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CRSEL = ior(SDL_SCANCODE_CRSEL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_EXSEL = ior(SDL_SCANCODE_EXSEL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_00 = ior(SDL_SCANCODE_KP_00, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_000 = ior(SDL_SCANCODE_KP_000, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_THOUSANDSSEPARATOR = ior(SDL_SCANCODE_THOUSANDSSEPARATOR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_DECIMALSEPARATOR = ior(SDL_SCANCODE_DECIMALSEPARATOR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CURRENCYUNIT = ior(SDL_SCANCODE_CURRENCYUNIT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CURRENCYSUBUNIT = ior(SDL_SCANCODE_CURRENCYSUBUNIT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_LEFTPAREN = ior(SDL_SCANCODE_KP_LEFTPAREN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_RIGHTPAREN = ior(SDL_SCANCODE_KP_RIGHTPAREN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_LEFTBRACE = ior(SDL_SCANCODE_KP_LEFTBRACE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_RIGHTBRACE = ior(SDL_SCANCODE_KP_RIGHTBRACE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_TAB = ior(SDL_SCANCODE_KP_TAB, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_BACKSPACE = ior(SDL_SCANCODE_KP_BACKSPACE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_A = ior(SDL_SCANCODE_KP_A, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_B = ior(SDL_SCANCODE_KP_B, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_C = ior(SDL_SCANCODE_KP_C, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_D = ior(SDL_SCANCODE_KP_D, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_E = ior(SDL_SCANCODE_KP_E, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_F = ior(SDL_SCANCODE_KP_F, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_XOR = ior(SDL_SCANCODE_KP_XOR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_POWER = ior(SDL_SCANCODE_KP_POWER, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_PERCENT = ior(SDL_SCANCODE_KP_PERCENT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_LESS = ior(SDL_SCANCODE_KP_LESS, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_GREATER = ior(SDL_SCANCODE_KP_GREATER, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_AMPERSAND = ior(SDL_SCANCODE_KP_AMPERSAND, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_DBLAMPERSAND = ior(SDL_SCANCODE_KP_DBLAMPERSAND, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_VERTICALBAR = ior(SDL_SCANCODE_KP_VERTICALBAR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_DBLVERTICALBAR = ior(SDL_SCANCODE_KP_DBLVERTICALBAR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_COLON = ior(SDL_SCANCODE_KP_COLON, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_HASH = ior(SDL_SCANCODE_KP_HASH, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_SPACE = ior(SDL_SCANCODE_KP_SPACE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_AT = ior(SDL_SCANCODE_KP_AT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_EXCLAM = ior(SDL_SCANCODE_KP_EXCLAM, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MEMSTORE = ior(SDL_SCANCODE_KP_MEMSTORE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MEMRECALL = ior(SDL_SCANCODE_KP_MEMRECALL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MEMCLEAR = ior(SDL_SCANCODE_KP_MEMCLEAR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MEMADD = ior(SDL_SCANCODE_KP_MEMADD, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MEMSUBTRACT = ior(SDL_SCANCODE_KP_MEMSUBTRACT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MEMMULTIPLY = ior(SDL_SCANCODE_KP_MEMMULTIPLY, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_MEMDIVIDE = ior(SDL_SCANCODE_KP_MEMDIVIDE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_PLUSMINUS = ior(SDL_SCANCODE_KP_PLUSMINUS, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_CLEAR = ior(SDL_SCANCODE_KP_CLEAR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_CLEARENTRY = ior(SDL_SCANCODE_KP_CLEARENTRY, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_BINARY = ior(SDL_SCANCODE_KP_BINARY, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_OCTAL = ior(SDL_SCANCODE_KP_OCTAL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_DECIMAL = ior(SDL_SCANCODE_KP_DECIMAL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KP_HEXADECIMAL = ior(SDL_SCANCODE_KP_HEXADECIMAL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_LCTRL = ior(SDL_SCANCODE_LCTRL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_LSHIFT = ior(SDL_SCANCODE_LSHIFT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_LALT = ior(SDL_SCANCODE_LALT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_LGUI = ior(SDL_SCANCODE_LGUI, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_RCTRL = ior(SDL_SCANCODE_RCTRL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_RSHIFT = ior(SDL_SCANCODE_RSHIFT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_RALT = ior(SDL_SCANCODE_RALT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_RGUI = ior(SDL_SCANCODE_RGUI, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_MODE = ior(SDL_SCANCODE_MODE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AUDIONEXT = ior(SDL_SCANCODE_AUDIONEXT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AUDIOPREV = ior(SDL_SCANCODE_AUDIOPREV, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AUDIOSTOP = ior(SDL_SCANCODE_AUDIOSTOP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AUDIOPLAY = ior(SDL_SCANCODE_AUDIOPLAY, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AUDIOMUTE = ior(SDL_SCANCODE_AUDIOMUTE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_MEDIASELECT = ior(SDL_SCANCODE_MEDIASELECT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_WWW = ior(SDL_SCANCODE_WWW, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_MAIL = ior(SDL_SCANCODE_MAIL, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_CALCULATOR = ior(SDL_SCANCODE_CALCULATOR, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_COMPUTER = ior(SDL_SCANCODE_COMPUTER, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AC_SEARCH = ior(SDL_SCANCODE_AC_SEARCH, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AC_HOME = ior(SDL_SCANCODE_AC_HOME, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AC_BACK = ior(SDL_SCANCODE_AC_BACK, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AC_FORWARD = ior(SDL_SCANCODE_AC_FORWARD, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AC_STOP = ior(SDL_SCANCODE_AC_STOP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AC_REFRESH = ior(SDL_SCANCODE_AC_REFRESH, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AC_BOOKMARKS = ior(SDL_SCANCODE_AC_BOOKMARKS, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_BRIGHTNESSDOWN = ior(SDL_SCANCODE_BRIGHTNESSDOWN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_BRIGHTNESSUP = ior(SDL_SCANCODE_BRIGHTNESSUP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_DISPLAYSWITCH = ior(SDL_SCANCODE_DISPLAYSWITCH, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KBDILLUMTOGGLE = ior(SDL_SCANCODE_KBDILLUMTOGGLE, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KBDILLUMDOWN = ior(SDL_SCANCODE_KBDILLUMDOWN, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_KBDILLUMUP = ior(SDL_SCANCODE_KBDILLUMUP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_EJECT = ior(SDL_SCANCODE_EJECT, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_SLEEP = ior(SDL_SCANCODE_SLEEP, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_APP1 = ior(SDL_SCANCODE_APP1, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_APP2 = ior(SDL_SCANCODE_APP2, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AUDIOREWIND = ior(SDL_SCANCODE_AUDIOREWIND, SDLK_SCANCODE_MASK)
integer(kind=c_int), parameter :: SDLK_AUDIOFASTFORWARD = ior(SDL_SCANCODE_AUDIOFASTFORWARD, SDLK_SCANCODE_MASK)
!!!!!!!!!! mixer parameter
integer(kind=c_int), parameter :: AUDIO_U8 = int(z'0008')
integer(kind=c_int), parameter :: AUDIO_S8 = int(z'8008')
integer(kind=c_int), parameter :: AUDIO_U16LSB = int(z'0010')
integer(kind=c_int), parameter :: AUDIO_S16LSB = int(z'8010')
integer(kind=c_int), parameter :: AUDIO_U16MSB = int(z'1010')
integer(kind=c_int), parameter :: AUDIO_S16MSB = int(z'9010')
integer(kind=c_int), parameter :: AUDIO_U16 = AUDIO_U16LSB
integer(kind=c_int), parameter :: AUDIO_S16 = AUDIO_S16LSB
integer(kind=c_int), parameter :: AUDIO_S32LSB = int(z'8020')
integer(kind=c_int), parameter :: AUDIO_S32MSB = int(z'9020')
integer(kind=c_int), parameter :: AUDIO_S32 = AUDIO_S32LSB
integer(kind=c_int), parameter :: AUDIO_F32LSB = int(z'8120')
integer(kind=c_int), parameter :: AUDIO_F32MSB = int(z'9120')
integer(kind=c_int), parameter :: AUDIO_F32 = AUDIO_F32LSB
integer(kind=c_int), parameter :: SDL_AUDIO_ALLOW_FREQUENCY_CHANGE = int(z'00000001')
integer(kind=c_int), parameter :: SDL_AUDIO_ALLOW_FORMAT_CHANGE = int(z'00000002')
integer(kind=c_int), parameter :: SDL_AUDIO_ALLOW_CHANNELS_CHANGE = int(z'00000002')
integer(kind=c_int), parameter :: SDL_AUDIO_ALLOW_ANY_CHANGE = ior(SDL_AUDIO_ALLOW_FREQUENCY_CHANGE, &
ior(SDL_AUDIO_ALLOW_FORMAT_CHANGE, &
SDL_AUDIO_ALLOW_CHANNELS_CHANGE))
integer(kind=c_int), parameter :: MIX_CHANNELS = 8
integer(kind=c_int), parameter :: MIX_DEFAULT_FREQUENCY = 22050
integer(kind=c_int), parameter :: MIX_DEFAULT_CHANNELS = 2
integer(kind=c_int), parameter :: MIX_MAX_VOLUME = 128
!!!! message box
integer(kind=c_int), parameter :: SDL_MESSAGEBOX_ERROR = int(z'00000010')
integer(kind=c_int), parameter :: SDL_MESSAGEBOX_WARNING = int(z'00000020')
integer(kind=c_int), parameter :: SDL_MESSAGEBOX_INFORMATION = int(z'00000040')
integer(kind=c_int), parameter :: SDL_TRUE = 1
integer(kind=c_int), parameter :: SDL_FALSE = 0
!!!!!!!! SDL_opengl
integer, parameter, public :: GLenum = c_int
integer, parameter, public :: GLboolean = c_signed_char
integer, parameter, public :: GLbitfield = c_int
integer, parameter, public :: GLbyte = c_signed_char
integer, parameter, public :: GLshort = c_short
integer, parameter, public :: GLint = c_int
integer, parameter, public :: GLubyte = c_signed_char
integer, parameter, public :: GLushort = c_short
integer, parameter, public :: GLuint = c_int
integer, parameter, public :: GLsizei = c_int
integer, parameter, public :: GLfloat = c_float
integer, parameter, public :: GLclampf = c_float
integer, parameter, public :: GLdouble = c_double
integer, parameter, public :: GLclampd = c_double
! Boolean values
integer(kind=GLboolean), parameter :: GL_FALSE = 0
integer(kind=GLboolean), parameter :: GL_TRUE = 1
! Data types
integer(kind=c_int), parameter :: GL_BYTE = int(z'1400')
integer(kind=c_int), parameter :: GL_UNSIGNED_BYTE = int(z'1401')
integer(kind=c_int), parameter :: GL_SHORT = int(z'1402')
integer(kind=c_int), parameter :: GL_UNSIGNED_SHORT = int(z'1403')
integer(kind=c_int), parameter :: GL_INT = int(z'1404')
integer(kind=c_int), parameter :: GL_UNSIGNED_INT = int(z'1405')
integer(kind=c_int), parameter :: GL_FLOAT = int(z'1406')
integer(kind=c_int), parameter :: GL_2_BYTES = int(z'1407')
integer(kind=c_int), parameter :: GL_3_BYTES = int(z'1408')
integer(kind=c_int), parameter :: GL_4_BYTES = int(z'1409')
integer(kind=c_int), parameter :: GL_DOUBLE = int(z'140A')
! Primitives
integer(kind=c_int), parameter :: GL_POINTS = int(z'0000')
integer(kind=c_int), parameter :: GL_LINES = int(z'0001')
integer(kind=c_int), parameter :: GL_LINE_LOOP = int(z'0002')
integer(kind=c_int), parameter :: GL_LINE_STRIP = int(z'0003')
integer(kind=c_int), parameter :: GL_TRIANGLES = int(z'0004')
integer(kind=c_int), parameter :: GL_TRIANGLE_STRIP = int(z'0005')
integer(kind=c_int), parameter :: GL_TRIANGLE_FAN = int(z'0006')
integer(kind=c_int), parameter :: GL_QUADS = int(z'0007')
integer(kind=c_int), parameter :: GL_QUAD_STRIP = int(z'0008')
integer(kind=c_int), parameter :: GL_POLYGON = int(z'0009')
! Vertex Arrays
integer(kind=c_int), parameter :: GL_VERTEX_ARRAY = int(z'8074')
integer(kind=c_int), parameter :: GL_NORMAL_ARRAY = int(z'8075')
integer(kind=c_int), parameter :: GL_COLOR_ARRAY = int(z'8076')
integer(kind=c_int), parameter :: GL_INDEX_ARRAY = int(z'8077')
integer(kind=c_int), parameter :: GL_TEXTURE_COORD_ARRAY = int(z'8078')
integer(kind=c_int), parameter :: GL_EDGE_FLAG_ARRAY = int(z'8079')
integer(kind=c_int), parameter :: GL_VERTEX_ARRAY_SIZE = int(z'807A')
integer(kind=c_int), parameter :: GL_VERTEX_ARRAY_TYPE = int(z'807B')
integer(kind=c_int), parameter :: GL_VERTEX_ARRAY_STRIDE = int(z'807C')
integer(kind=c_int), parameter :: GL_NORMAL_ARRAY_TYPE = int(z'807E')
integer(kind=c_int), parameter :: GL_NORMAL_ARRAY_STRIDE = int(z'807F')
integer(kind=c_int), parameter :: GL_COLOR_ARRAY_SIZE = int(z'8081')
integer(kind=c_int), parameter :: GL_COLOR_ARRAY_TYPE = int(z'8082')
integer(kind=c_int), parameter :: GL_COLOR_ARRAY_STRIDE = int(z'8083')
integer(kind=c_int), parameter :: GL_INDEX_ARRAY_TYPE = int(z'8085')
integer(kind=c_int), parameter :: GL_INDEX_ARRAY_STRIDE = int(z'8086')
integer(kind=c_int), parameter :: GL_TEXTURE_COORD_ARRAY_SIZE = int(z'8088')
integer(kind=c_int), parameter :: GL_TEXTURE_COORD_ARRAY_TYPE = int(z'8089')
integer(kind=c_int), parameter :: GL_TEXTURE_COORD_ARRAY_STRIDE = int(z'808A')
integer(kind=c_int), parameter :: GL_EDGE_FLAG_ARRAY_STRIDE = int(z'808C')
integer(kind=c_int), parameter :: GL_VERTEX_ARRAY_POINTER = int(z'808E')
integer(kind=c_int), parameter :: GL_NORMAL_ARRAY_POINTER = int(z'808F')
integer(kind=c_int), parameter :: GL_COLOR_ARRAY_POINTER = int(z'8090')
integer(kind=c_int), parameter :: GL_INDEX_ARRAY_POINTER = int(z'8091')
integer(kind=c_int), parameter :: GL_TEXTURE_COORD_ARRAY_POINTER = int(z'8092')
integer(kind=c_int), parameter :: GL_EDGE_FLAG_ARRAY_POINTER = int(z'8093')
integer(kind=c_int), parameter :: GL_V2F = int(z'2A20')
integer(kind=c_int), parameter :: GL_V3F = int(z'2A21')
integer(kind=c_int), parameter :: GL_C4UB_V2F = int(z'2A22')
integer(kind=c_int), parameter :: GL_C4UB_V3F = int(z'2A23')
integer(kind=c_int), parameter :: GL_C3F_V3F = int(z'2A24')
integer(kind=c_int), parameter :: GL_N3F_V3F = int(z'2A25')
integer(kind=c_int), parameter :: GL_C4F_N3F_V3F = int(z'2A26')
integer(kind=c_int), parameter :: GL_T2F_V3F = int(z'2A27')
integer(kind=c_int), parameter :: GL_T4F_V4F = int(z'2A28')
integer(kind=c_int), parameter :: GL_T2F_C4UB_V3F = int(z'2A29')
integer(kind=c_int), parameter :: GL_T2F_C3F_V3F = int(z'2A2A')
integer(kind=c_int), parameter :: GL_T2F_N3F_V3F = int(z'2A2B')
integer(kind=c_int), parameter :: GL_T2F_C4F_N3F_V3F = int(z'2A2C')
integer(kind=c_int), parameter :: GL_T4F_C4F_N3F_V4F = int(z'2A2D')
! Matrix Mode
integer(kind=c_int), parameter :: GL_MATRIX_MODE = int(z'0BA0')
integer(kind=c_int), parameter :: GL_MODELVIEW = int(z'1700')
integer(kind=c_int), parameter :: GL_PROJECTION = int(z'1701')
integer(kind=c_int), parameter :: GL_TEXTURE = int(z'1702')
! Points
integer(kind=c_int), parameter :: GL_POINT_SMOOTH = int(z'0B10')
integer(kind=c_int), parameter :: GL_POINT_SIZE = int(z'0B11')
integer(kind=c_int), parameter :: GL_POINT_SIZE_GRANULARITY = int(z'0B13')
integer(kind=c_int), parameter :: GL_POINT_SIZE_RANGE = int(z'0B12')
! Lines
integer(kind=c_int), parameter :: GL_LINE_SMOOTH = int(z'0B20')
integer(kind=c_int), parameter :: GL_LINE_STIPPLE = int(z'0B24')
integer(kind=c_int), parameter :: GL_LINE_STIPPLE_PATTERN = int(z'0B25')
integer(kind=c_int), parameter :: GL_LINE_STIPPLE_REPEAT = int(z'0B26')
integer(kind=c_int), parameter :: GL_LINE_WIDTH = int(z'0B21')
integer(kind=c_int), parameter :: GL_LINE_WIDTH_GRANULARITY = int(z'0B23')
integer(kind=c_int), parameter :: GL_LINE_WIDTH_RANGE = int(z'0B22')
! Polygons
integer(kind=c_int), parameter :: GL_POINT = int(z'1B00')
integer(kind=c_int), parameter :: GL_LINE = int(z'1B01')
integer(kind=c_int), parameter :: GL_FILL = int(z'1B02')
integer(kind=c_int), parameter :: GL_CW = int(z'0900')
integer(kind=c_int), parameter :: GL_CCW = int(z'0901')
integer(kind=c_int), parameter :: GL_FRONT = int(z'0404')
integer(kind=c_int), parameter :: GL_BACK = int(z'0405')
integer(kind=c_int), parameter :: GL_POLYGON_MODE = int(z'0B40')
integer(kind=c_int), parameter :: GL_POLYGON_SMOOTH = int(z'0B41')
integer(kind=c_int), parameter :: GL_POLYGON_STIPPLE = int(z'0B42')
integer(kind=c_int), parameter :: GL_EDGE_FLAG = int(z'0B43')
integer(kind=c_int), parameter :: GL_CULL_FACE = int(z'0B44')
integer(kind=c_int), parameter :: GL_CULL_FACE_MODE = int(z'0B45')
integer(kind=c_int), parameter :: GL_FRONT_FACE = int(z'0B46')
integer(kind=c_int), parameter :: GL_POLYGON_OFFSET_FACTOR = int(z'8038')
integer(kind=c_int), parameter :: GL_POLYGON_OFFSET_UNITS = int(z'2A00')
integer(kind=c_int), parameter :: GL_POLYGON_OFFSET_POINT = int(z'2A01')
integer(kind=c_int), parameter :: GL_POLYGON_OFFSET_LINE = int(z'2A02')
integer(kind=c_int), parameter :: GL_POLYGON_OFFSET_FILL = int(z'8037')
! Display Lists
integer(kind=c_int), parameter :: GL_COMPILE = int(z'1300')
integer(kind=c_int), parameter :: GL_COMPILE_AND_EXECUTE = int(z'1301')
integer(kind=c_int), parameter :: GL_LIST_BASE = int(z'0B32')
integer(kind=c_int), parameter :: GL_LIST_INDEX = int(z'0B33')
integer(kind=c_int), parameter :: GL_LIST_MODE = int(z'0B30')
! Depth buffer
integer(kind=c_int), parameter :: GL_NEVER = int(z'0200')
integer(kind=c_int), parameter :: GL_LESS = int(z'0201')
integer(kind=c_int), parameter :: GL_EQUAL = int(z'0202')
integer(kind=c_int), parameter :: GL_LEQUAL = int(z'0203')
integer(kind=c_int), parameter :: GL_GREATER = int(z'0204')
integer(kind=c_int), parameter :: GL_NOTEQUAL = int(z'0205')
integer(kind=c_int), parameter :: GL_GEQUAL = int(z'0206')
integer(kind=c_int), parameter :: GL_ALWAYS = int(z'0207')
integer(kind=c_int), parameter :: GL_DEPTH_TEST = int(z'0B71')
integer(kind=c_int), parameter :: GL_DEPTH_BITS = int(z'0D56')
integer(kind=c_int), parameter :: GL_DEPTH_CLEAR_VALUE = int(z'0B73')
integer(kind=c_int), parameter :: GL_DEPTH_FUNC = int(z'0B74')
integer(kind=c_int), parameter :: GL_DEPTH_RANGE = int(z'0B70')
integer(kind=c_int), parameter :: GL_DEPTH_WRITEMASK = int(z'0B72')