3 Boost Software License - Version 1.0 - August 17th, 2003
5 Permission is hereby granted, free of charge, to any person or organization
6 obtaining a copy of the software and accompanying documentation covered by
7 this license (the "Software") to use, reproduce, display, distribute,
8 execute, and transmit the Software, and to prepare derivative works of the
9 Software, and to permit third-parties to whom the Software is furnished to
10 do so, all subject to the following:
12 The copyright notices in the Software and this entire statement, including
13 the above license grant, this restriction and the following disclaimer,
14 must be included in all copies of the Software, in whole or in part, and
15 all derivative works of the Software, unless such copies or derivative
16 works are solely in the form of machine-executable object code generated by
17 a source language processor.
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 DEALINGS IN THE SOFTWARE.
28 module iv
.sdl2
.sdl
/*is aliced*/;
31 import core
.stdc
.stdio
; // FILE
32 import core
.stdc
.stdarg
; // va_list
44 SDL_MAJOR_VERSION
= 2,
45 SDL_MINOR_VERSION
= 0,
49 void SDL_VERSION (ref SDL_version x
) @safe pure {
50 x
.major
= SDL_MAJOR_VERSION
;
51 x
.minor
= SDL_MINOR_VERSION
;
52 x
.patch
= SDL_PATCHLEVEL
;
55 uint SDL_VERSIONNUM() (ubyte X
, ubyte Y
, ubyte Z
) { return X
*1000+Y
*100+Z
; }
57 uint SDL_COMPILEDVERSION() () { return SDL_VERSIONNUM(SDL_MAJOR_VERSION
, SDL_MINOR_VERSION
, SDL_PATCHLEVEL
); }
59 bool SDL_VERSION_ATLEAST() (ubyte X
, ubyte Y
, ubyte Z
) { return (SDL_COMPILEDVERSION() >= SDL_VERSIONNUM(X
, Y
, Z
)); }
69 uint SDL_FOURCC() (char A
, char B
, char C
, char D
) { return (A|
(B
<<8)|
(C
<<16)|
(D
<<24)); }
73 SDL_INIT_TIMER
= 0x00000001,
74 SDL_INIT_AUDIO
= 0x00000010,
75 SDL_INIT_VIDEO
= 0x00000020,
76 SDL_INIT_JOYSTICK
= 0x00000200,
77 SDL_INIT_HAPTIC
= 0x00001000,
78 SDL_INIT_GAMECONTROLLER
= 0x00002000,
79 SDL_INIT_EVENTS
= 0x00004000,
80 SDL_INIT_NOPARACHUTE
= 0x00100000,
82 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO |
83 SDL_INIT_EVENTS | SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC |
84 SDL_INIT_GAMECONTROLLER
88 alias SDL_assert_state
= uint;
90 enum : SDL_assert_state
{
91 SDL_ASSERTION_RETRY
= 0,
92 SDL_ASSERTION_BREAK
= 1,
93 SDL_ASSERTION_ABORT
= 2,
94 SDL_ASSERTION_IGNORE
= 3,
95 SDL_ASSERTION_ALWAYS_IGNORE
= 4
98 struct SDL_assert_data
{
101 const(char)* condition
;
102 const(char)* filename
;
104 const(char)* function_
;
105 const(SDL_assert_data
)* next
;
108 extern(C
) nothrow alias SDL_AssertionHandler
= SDL_assert_state
function (const(SDL_assert_data
)* data
, void* userdata
);
111 alias SDL_AudioFormat
= ushort;
113 enum : SDL_AudioFormat
{
114 SDL_AUDIO_MASK_BITSIZE
= 0xFF,
115 SDL_AUDIO_MASK_DATATYPE
= 1<<8,
116 SDL_AUDIO_MASK_ENDIAN
= 1<<12,
117 SDL_AUDIO_MASK_SIGNED
= 1<<15,
120 ubyte SDL_AUDIO_BITSIZE() (SDL_AudioFormat x
) { return cast(ubyte)(x
&SDL_AUDIO_MASK_BITSIZE
); }
121 bool SDL_AUDIO_ISFLOAT() (SDL_AudioFormat x
) { return !!(x
&SDL_AUDIO_MASK_DATATYPE
); }
122 bool SDL_AUDIO_ISBIGENDIAN() (SDL_AudioFormat x
) { return !!(x
&SDL_AUDIO_MASK_ENDIAN
); }
123 bool SDL_AUDIO_ISSIGNED() (SDL_AudioFormat x
) { return !!(x
&SDL_AUDIO_MASK_SIGNED
); }
124 bool SDL_AUDIO_ISINT() (SDL_AudioFormat x
) { return !SDL_AUDIO_ISFLOAT
!(x
); }
125 bool SDL_AUDIO_ISLITTLEENDIAN() (SDL_AudioFormat x
) { return !SDL_AUDIO_ISBIGENDIAN
!(x
); }
126 bool SDL_AUDIO_ISUNSIGNED() (SDL_AudioFormat x
) { return !SDL_AUDIO_ISSIGNED
!(x
); }
128 enum : SDL_AudioFormat
{
131 AUDIO_U16LSB
= 0x0010,
132 AUDIO_S16LSB
= 0x8010,
133 AUDIO_U16MSB
= 0x1010,
134 AUDIO_S16MSB
= 0x9010,
135 AUDIO_U16
= AUDIO_U16LSB
,
136 AUDIO_S16
= AUDIO_S16LSB
,
137 AUDIO_S32LSB
= 0x8020,
138 AUDIO_S32MSB
= 0x9020,
139 AUDIO_S32
= AUDIO_S32LSB
,
140 AUDIO_F32LSB
= 0x8120,
141 AUDIO_F32MSB
= 0x9120,
142 AUDIO_F32
= AUDIO_F32LSB
,
145 version (LittleEndian
) {
146 alias AUDIO_U16LSB AUDIO_U16SYS
;
147 alias AUDIO_S16LSB AUDIO_S16SYS
;
148 alias AUDIO_S32LSB AUDIO_S32SYS
;
149 alias AUDIO_F32LSB AUDIO_F32SYS
;
151 alias AUDIO_U16MSB AUDIO_U16SYS
;
152 alias AUDIO_S16MSB AUDIO_S16SYS
;
153 alias AUDIO_S32MSB AUDIO_S32SYS
;
154 alias AUDIO_F32MSB AUDIO_F32SYS
;
158 SDL_AUDIO_ALLOW_FREQUENCY_CHANGE
= 0x00000001,
159 SDL_AUDIO_ALLOW_FORMAT_CHANGE
= 0x00000002,
160 SDL_AUDIO_ALLOW_CHANNELS_CHANGE
= 0x00000004,
161 SDL_AUDIO_ALLOW_ANY_CHANGE
=
162 SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|
163 SDL_AUDIO_ALLOW_FORMAT_CHANGE|
164 SDL_AUDIO_ALLOW_CHANNELS_CHANGE
,
167 extern(C
) nothrow @nogc alias SDL_AudioCallback
= void function (void* userdata
, ubyte* stream
, int len
);
169 struct SDL_AudioSpec
{
171 SDL_AudioFormat format
;
177 SDL_AudioCallback callback
;
181 extern(C
) nothrow alias SDL_AudioFilter
= void function (SDL_AudioCVT
* cvt
, SDL_AudioFormat format
);
183 struct SDL_AudioCVT
{
185 SDL_AudioFormat src_format
;
186 SDL_AudioFormat dst_format
;
193 SDL_AudioFilter
[10] filters
;
197 alias uint SDL_AudioDeviceID
;
199 alias SDL_AudioStatus
= int;
202 SDL_AUDIO_STOPPED
= 0,
207 enum SDL_MIX_MAXVOLUME
= 128;
210 alias SDL_BlendMode
= int;
213 SDL_BLENDMODE_NONE
= 0x00000000,
214 SDL_BLENDMODE_BLEND
= 0x00000001,
215 SDL_BLENDMODE_ADD
= 0x00000002,
216 SDL_BLENDMODE_MOD
= 0x00000004
220 enum SDL_CACHELINE_SIZE
= 128;
228 alias SDL_EventType
= int;
235 SDL_APP_WILLENTERBACKGROUND
,
236 SDL_APP_DIDENTERBACKGROUND
,
237 SDL_APP_WILLENTERFOREGROUND
,
238 SDL_APP_DIDENTERFOREGROUND
,
239 SDL_WINDOWEVENT
= 0x200,
245 SDL_MOUSEMOTION
= 0x400,
249 SDL_JOYAXISMOTION
= 0x600,
255 SDL_JOYDEVICEREMOVED
,
256 SDL_CONTROLLERAXISMOTION
= 0x650,
257 SDL_CONTROLLERBUTTONDOWN
,
258 SDL_CONTROLLERBUTTONUP
,
259 SDL_CONTROLLERDEVICEADDED
,
260 SDL_CONTROLLERDEVICEREMOVED
,
261 SDL_CONTROLLERDEVICEREMAPPED
,
262 SDL_FINGERDOWN
= 0x700,
265 SDL_DOLLARGESTURE
= 0x800,
268 SDL_CLIPBOARDUPDATE
= 0x900,
269 SDL_DROPFILE
= 0x1000,
270 SDL_RENDER_TARGETS_RESET
= 0x2000,
271 SDL_USEREVENT
= 0x8000,
272 SDL_LASTEVENT
= 0xFFFF
275 struct SDL_CommonEvent
{
280 struct SDL_WindowEvent
{
292 struct SDL_KeyboardEvent
{
303 enum SDL_TEXTEDITINGEVENT_TEXT_SIZE
= 32;
305 struct SDL_TextEditingEvent
{
309 char[SDL_TEXTEDITINGEVENT_TEXT_SIZE
] text
;
314 enum SDL_TEXTINPUTEVENT_TEXT_SIZE
= 32;
316 struct SDL_TextInputEvent
{
320 char[SDL_TEXTINPUTEVENT_TEXT_SIZE
] text
;
323 struct SDL_MouseMotionEvent
{
335 struct SDL_MouseButtonEvent
{
348 struct SDL_MouseWheelEvent
{
357 struct SDL_JoyAxisEvent
{
360 SDL_JoystickID which
;
369 struct SDL_JoyBallEvent
{
372 SDL_JoystickID which
;
381 struct SDL_JoyHatEvent
{
384 SDL_JoystickID which
;
391 struct SDL_JoyButtonEvent
{
394 SDL_JoystickID which
;
401 struct SDL_JoyDeviceEvent
{
407 struct SDL_ControllerAxisEvent
{
410 SDL_JoystickID which
;
419 struct SDL_ControllerButtonEvent
{
422 SDL_JoystickID which
;
429 struct SDL_ControllerDeviceEvent
{
435 struct SDL_TouchFingerEvent
{
439 SDL_FingerID fingerId
;
447 struct SDL_MultiGestureEvent
{
459 struct SDL_DollarGestureEvent
{
463 SDL_GestureID gestureId
;
470 struct SDL_DropEvent
{
476 struct SDL_QuitEvent
{
486 struct SDL_UserEvent
{
495 struct SDL_SysWMEvent
{
503 SDL_CommonEvent common
;
504 SDL_WindowEvent window
;
505 SDL_KeyboardEvent key
;
506 SDL_TextEditingEvent edit
;
507 SDL_TextInputEvent text
;
508 SDL_MouseMotionEvent motion
;
509 SDL_MouseButtonEvent button
;
510 SDL_MouseWheelEvent wheel
;
511 SDL_JoyAxisEvent jaxis
;
512 SDL_JoyBallEvent jball
;
513 SDL_JoyHatEvent jhat
;
514 SDL_JoyButtonEvent jbutton
;
515 SDL_JoyDeviceEvent jdevice
;
516 SDL_ControllerAxisEvent caxis
;
517 SDL_ControllerButtonEvent cbutton
;
518 SDL_ControllerDeviceEvent cdevice
;
521 SDL_SysWMEvent syswm
;
522 SDL_TouchFingerEvent tfinger
;
523 SDL_MultiGestureEvent mgesture
;
524 SDL_DollarGestureEvent dgesture
;
530 alias SDL_eventaction
= int;
537 extern(C
) nothrow alias SDL_EventFilter
= int function (void* userdata
, SDL_Event
* event
);
546 // SDL_gamecontroller.h
547 struct SDL_GameController
;
548 alias int SDL_GameControllerBindType
;
551 SDL_CONTROLLER_BINDTYPE_NONE
= 0,
552 SDL_CONTROLLER_BINDTYPE_BUTTON
,
553 SDL_CONTROLLER_BINDTYPE_AXIS
,
554 SDL_CONTROLLER_BINDTYPE_HAT
,
557 struct SDL_GameControllerButtonBind
{
558 SDL_GameControllerBindType bindType
;
567 alias button
= value
.button
;
568 alias axis
= value
.axis
;
569 alias hat
= value
.hat
;
572 alias SDL_GameControllerAxis
= int;
575 SDL_CONTROLLER_AXIS_INVALID
= -1,
576 SDL_CONTROLLER_AXIS_LEFTX
,
577 SDL_CONTROLLER_AXIS_LEFTY
,
578 SDL_CONTROLLER_AXIS_RIGHTX
,
579 SDL_CONTROLLER_AXIS_RIGHTY
,
580 SDL_CONTROLLER_AXIS_TRIGGERLEFT
,
581 SDL_CONTROLLER_AXIS_TRIGGERRIGHT
,
582 SDL_CONTROLLER_AXIS_MAX
585 alias SDL_GameControllerButton
= int;
588 SDL_CONTROLLER_BUTTON_INVALID
= -1,
589 SDL_CONTROLLER_BUTTON_A
,
590 SDL_CONTROLLER_BUTTON_B
,
591 SDL_CONTROLLER_BUTTON_X
,
592 SDL_CONTROLLER_BUTTON_Y
,
593 SDL_CONTROLLER_BUTTON_BACK
,
594 SDL_CONTROLLER_BUTTON_GUIDE
,
595 SDL_CONTROLLER_BUTTON_START
,
596 SDL_CONTROLLER_BUTTON_LEFTSTICK
,
597 SDL_CONTROLLER_BUTTON_RIGHTSTICK
,
598 SDL_CONTROLLER_BUTTON_LEFTSHOULDER
,
599 SDL_CONTROLLER_BUTTON_RIGHTSHOULDER
,
600 SDL_CONTROLLER_BUTTON_DPAD_UP
,
601 SDL_CONTROLLER_BUTTON_DPAD_DOWN
,
602 SDL_CONTROLLER_BUTTON_DPAD_LEFT
,
603 SDL_CONTROLLER_BUTTON_DPAD_RIGHT
,
604 SDL_CONTROLLER_BUTTON_MAX
608 alias SDL_GestureID
= long;
614 SDL_HAPTIC_CONSTANT
= 1<<0,
615 SDL_HAPTIC_SINE
= 1<<1,
616 SDL_HAPTIC_LEFTRIGHT
= 1<<2,
617 SDL_HAPTIC_TRIANGLE
= 1<<3,
618 SDL_HAPTIC_SAWTOOTHUP
= 1<<4,
619 SDL_HAPTIC_SAWTOOTHDOWN
= 1<<5,
620 SDL_HAPTIC_RAMP
= 1<<6,
621 SDL_HAPTIC_SPRING
= 1<<7,
622 SDL_HAPTIC_DAMPER
= 1<<8,
623 SDL_HAPTIC_INERTIA
= 1<<9,
624 SDL_HAPTIC_FRICTION
= 1<<10,
625 SDL_HAPTIC_CUSTOM
= 1<<11,
626 SDL_HAPTIC_GAIN
= 1<<12,
627 SDL_HAPTIC_AUTOCENTER
= 1<<13,
628 SDL_HAPTIC_STATUS
= 1<<14,
629 SDL_HAPTIC_PAUSE
= 1<<15,
630 SDL_HAPTIC_POLAR
= 0,
631 SDL_HAPTIC_CARTESIAN
= 1,
632 SDL_HAPTIC_SPHERICAL
= 2,
635 enum SDL_HAPTIC_INFINITY
= 4294967295U;
637 struct SDL_HapticDirection
{
642 struct SDL_HapticConstant
{
644 SDL_HapticDirection direction
;
650 ushort attack_length
;
656 struct SDL_HapticPeriodic
{
658 SDL_HapticDirection direction
;
667 ushort attack_length
;
673 struct SDL_HapticCondition
{
675 SDL_HapticDirection direciton
;
682 short[3] right_coeff
;
688 struct SDL_HapticRamp
{
690 SDL_HapticDirection direction
;
697 ushort attack_length
;
703 struct SDL_HapticLeftRight
{
706 ushort large_magnitude
;
707 ushort small_magnitude
;
710 struct SDL_HapticCustom
{
712 SDL_HapticDirection direction
;
721 ushort attack_length
;
727 union SDL_HapticEffect
{
729 SDL_HapticConstant constant
;
730 SDL_HapticPeriodic periodic
;
731 SDL_HapticCondition condition
;
733 SDL_HapticLeftRight leftright
;
734 SDL_HapticCustom custom
;
739 SDL_HINT_FRAMEBUFFER_ACCELERATION
= "SDL_FRAMEBUFFER_ACCELERATION",
740 SDL_HINT_RENDER_DRIVER
= "SDL_RENDER_DRIVER",
741 SDL_HINT_RENDER_OPENGL_SHADERS
= "SDL_RENDER_OPENGL_SHADERS",
742 SDL_HINT_RENDER_DIRECT3D_THREADSAFE
= "SDL_RENDER_DIRECT3D_THREADSAFE",
743 SDL_HINT_RENDER_SCALE_QUALITY
= "SDL_RENDER_SCALE_QUALITY",
744 SDL_HINT_RENDER_VSYNC
= "SDL_RENDER_VSYNC",
745 SDL_HINT_VIDEO_ALLOW_SCREENSAVER
= "SDL_VIDEO_ALLOW_SCREENSAVER",
746 SDL_HINT_VIDEO_X11_XVIDMODE
= "SDL_VIDEO_X11_XVIDMODE",
747 SDL_HINT_VIDEO_X11_XINERAMA
= "SDL_VIDEO_X11_XINERAMA",
748 SDL_HINT_VIDEO_X11_XRANDR
= "SDL_VIDEO_X11_XRANDR",
749 SDL_HINT_GRAB_KEYBOARD
= "SDL_GRAB_KEYBOARD",
750 SDL_HINT_MOUSE_RELATIVE_MODE_WARP
= "SDL_MOUSE_RELATIVE_MODE_WARP",
751 SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS
= "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS",
752 SDL_HINT_IDLE_TIMER_DISABLED
= "SDL_IOS_IDLE_TIMER_DISABLED",
753 SDL_HINT_ORIENTATIONS
= "SDL_IOS_ORIENTATIONS",
754 SDL_HINT_ACCELEROMETER_AS_JOYSTICK
= "SDL_ACCELEROMETER_AS_JOYSTICK",
755 SDL_HINT_XINPUT_ENABLED
= "SDL_XINPUT_ENABLED",
756 SDL_HINT_GAMECONTROLLERCONFIG
= "SDL_GAMECONTROLLERCONFIG",
757 SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
= "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS",
758 SDL_HINT_ALLOW_TOPMOST
= "SDL_ALLOW_TOPMOST",
759 SDL_HINT_TIMER_RESOLUTION
= "SDL_TIMER_RESOLUTION",
760 SDL_HINT_VIDEO_HIGHDPI_DISABLED
= "SDL_VIDEO_HIGHDPI_DISABLED",
761 SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK
= "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK",
762 SDL_HINT_VIDEO_WIN_D3DCOMPILER
= "SDL_VIDEO_WIN_D3DCOMPILER",
763 SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT
= "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT",
764 SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES
= "SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES",
767 alias SDL_HintPriority
= int;
775 extern(C
) nothrow alias SDL_HintCallback
= void function (void*, const (char)*, const (char)*);
780 struct JoystickGUID
{
784 struct SDL_JoystickGUID
{
788 alias SDL_JoystickID
= int;
791 SDL_HAT_CENTERED
= 0x00,
793 SDL_HAT_RIGHT
= 0x02,
796 SDL_HAT_RIGHTUP
= SDL_HAT_RIGHT|SDL_HAT_UP
,
797 SDL_HAT_RIGHTDOWN
= SDL_HAT_RIGHT|SDL_HAT_DOWN
,
798 SDL_HAT_LEFTUP
= SDL_HAT_LEFT|SDL_HAT_UP
,
799 SDL_HAT_LEFTDOWN
= SDL_HAT_LEFT|SDL_HAT_DOWN
,
804 SDL_Scancode scancode
;
811 alias SDL_MessageBoxFlags
= int;
814 SDL_MESSAGEBOX_ERROR
= 0x00000010,
815 SDL_MESSAGEBOX_WARNING
= 0x00000020,
816 SDL_MESSAGEBOX_INFORMATION
= 0x00000040,
819 alias SDL_MessageBoxButtonFlags
= int;
822 SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT
= 0x00000001,
823 SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT
= 0x00000002,
826 struct SDL_MessageBoxButtonData
{
832 struct SDL_MessageBoxColor
{
836 alias SDL_MessageBoxColorType
= int;
839 SDL_MESSAGEBOX_COLOR_BACKGROUND
,
840 SDL_MESSAGEBOX_COLOR_TEXT
,
841 SDL_MESSAGEBOX_COLOR_BUTTON_BORDER
,
842 SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND
,
843 SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED
,
844 SDL_MESSAGEBOX_COLOR_MAX
,
847 struct SDL_MessageBoxColorScheme
{
848 SDL_MessageBoxColor
[SDL_MESSAGEBOX_COLOR_MAX
] colors
;
851 struct SDL_MessageBoxData
{
855 const (char)* message
;
857 const (SDL_MessageBoxButtonData
)* buttons
;
858 const (SDL_MessageBoxColorScheme
)* colorScheme
;
862 alias SDL_Scancode
= int;
865 SDL_SCANCODE_UNKNOWN
= 0,
905 SDL_SCANCODE_RETURN
= 40,
906 SDL_SCANCODE_ESCAPE
= 41,
907 SDL_SCANCODE_BACKSPACE
= 42,
908 SDL_SCANCODE_TAB
= 43,
909 SDL_SCANCODE_SPACE
= 44,
911 SDL_SCANCODE_MINUS
= 45,
912 SDL_SCANCODE_EQUALS
= 46,
913 SDL_SCANCODE_LEFTBRACKET
= 47,
914 SDL_SCANCODE_RIGHTBRACKET
= 48,
915 SDL_SCANCODE_BACKSLASH
= 49,
916 SDL_SCANCODE_NONUSHASH
= 50,
917 SDL_SCANCODE_SEMICOLON
= 51,
918 SDL_SCANCODE_APOSTROPHE
= 52,
919 SDL_SCANCODE_GRAVE
= 53,
920 SDL_SCANCODE_COMMA
= 54,
921 SDL_SCANCODE_PERIOD
= 55,
922 SDL_SCANCODE_SLASH
= 56,
924 SDL_SCANCODE_CAPSLOCK
= 57,
926 SDL_SCANCODE_F1
= 58,
927 SDL_SCANCODE_F2
= 59,
928 SDL_SCANCODE_F3
= 60,
929 SDL_SCANCODE_F4
= 61,
930 SDL_SCANCODE_F5
= 62,
931 SDL_SCANCODE_F6
= 63,
932 SDL_SCANCODE_F7
= 64,
933 SDL_SCANCODE_F8
= 65,
934 SDL_SCANCODE_F9
= 66,
935 SDL_SCANCODE_F10
= 67,
936 SDL_SCANCODE_F11
= 68,
937 SDL_SCANCODE_F12
= 69,
939 SDL_SCANCODE_PRINTSCREEN
= 70,
940 SDL_SCANCODE_SCROLLLOCK
= 71,
941 SDL_SCANCODE_PAUSE
= 72,
942 SDL_SCANCODE_INSERT
= 73,
943 SDL_SCANCODE_HOME
= 74,
944 SDL_SCANCODE_PAGEUP
= 75,
945 SDL_SCANCODE_DELETE
= 76,
946 SDL_SCANCODE_END
= 77,
947 SDL_SCANCODE_PAGEDOWN
= 78,
948 SDL_SCANCODE_RIGHT
= 79,
949 SDL_SCANCODE_LEFT
= 80,
950 SDL_SCANCODE_DOWN
= 81,
951 SDL_SCANCODE_UP
= 82,
953 SDL_SCANCODE_NUMLOCKCLEAR
= 83,
954 SDL_SCANCODE_KP_DIVIDE
= 84,
955 SDL_SCANCODE_KP_MULTIPLY
= 85,
956 SDL_SCANCODE_KP_MINUS
= 86,
957 SDL_SCANCODE_KP_PLUS
= 87,
958 SDL_SCANCODE_KP_ENTER
= 88,
959 SDL_SCANCODE_KP_1
= 89,
960 SDL_SCANCODE_KP_2
= 90,
961 SDL_SCANCODE_KP_3
= 91,
962 SDL_SCANCODE_KP_4
= 92,
963 SDL_SCANCODE_KP_5
= 93,
964 SDL_SCANCODE_KP_6
= 94,
965 SDL_SCANCODE_KP_7
= 95,
966 SDL_SCANCODE_KP_8
= 96,
967 SDL_SCANCODE_KP_9
= 97,
968 SDL_SCANCODE_KP_0
= 98,
969 SDL_SCANCODE_KP_PERIOD
= 99,
971 SDL_SCANCODE_NONUSBACKSLASH
= 100,
972 SDL_SCANCODE_APPLICATION
= 101,
973 SDL_SCANCODE_POWER
= 102,
974 SDL_SCANCODE_KP_EQUALS
= 103,
975 SDL_SCANCODE_F13
= 104,
976 SDL_SCANCODE_F14
= 105,
977 SDL_SCANCODE_F15
= 106,
978 SDL_SCANCODE_F16
= 107,
979 SDL_SCANCODE_F17
= 108,
980 SDL_SCANCODE_F18
= 109,
981 SDL_SCANCODE_F19
= 110,
982 SDL_SCANCODE_F20
= 111,
983 SDL_SCANCODE_F21
= 112,
984 SDL_SCANCODE_F22
= 113,
985 SDL_SCANCODE_F23
= 114,
986 SDL_SCANCODE_F24
= 115,
987 SDL_SCANCODE_EXECUTE
= 116,
988 SDL_SCANCODE_HELP
= 117,
989 SDL_SCANCODE_MENU
= 118,
990 SDL_SCANCODE_SELECT
= 119,
991 SDL_SCANCODE_STOP
= 120,
992 SDL_SCANCODE_AGAIN
= 121,
993 SDL_SCANCODE_UNDO
= 122,
994 SDL_SCANCODE_CUT
= 123,
995 SDL_SCANCODE_COPY
= 124,
996 SDL_SCANCODE_PASTE
= 125,
997 SDL_SCANCODE_FIND
= 126,
998 SDL_SCANCODE_MUTE
= 127,
999 SDL_SCANCODE_VOLUMEUP
= 128,
1000 SDL_SCANCODE_VOLUMEDOWN
= 129,
1001 SDL_SCANCODE_KP_COMMA
= 133,
1002 SDL_SCANCODE_KP_EQUALSAS400
= 134,
1004 SDL_SCANCODE_INTERNATIONAL1
= 135,
1005 SDL_SCANCODE_INTERNATIONAL2
= 136,
1006 SDL_SCANCODE_INTERNATIONAL3
= 137,
1007 SDL_SCANCODE_INTERNATIONAL4
= 138,
1008 SDL_SCANCODE_INTERNATIONAL5
= 139,
1009 SDL_SCANCODE_INTERNATIONAL6
= 140,
1010 SDL_SCANCODE_INTERNATIONAL7
= 141,
1011 SDL_SCANCODE_INTERNATIONAL8
= 142,
1012 SDL_SCANCODE_INTERNATIONAL9
= 143,
1013 SDL_SCANCODE_LANG1
= 144,
1014 SDL_SCANCODE_LANG2
= 145,
1015 SDL_SCANCODE_LANG3
= 146,
1016 SDL_SCANCODE_LANG4
= 147,
1017 SDL_SCANCODE_LANG5
= 148,
1018 SDL_SCANCODE_LANG6
= 149,
1019 SDL_SCANCODE_LANG7
= 150,
1020 SDL_SCANCODE_LANG8
= 151,
1021 SDL_SCANCODE_LANG9
= 152,
1023 SDL_SCANCODE_ALTERASE
= 153,
1024 SDL_SCANCODE_SYSREQ
= 154,
1025 SDL_SCANCODE_CANCEL
= 155,
1026 SDL_SCANCODE_CLEAR
= 156,
1027 SDL_SCANCODE_PRIOR
= 157,
1028 SDL_SCANCODE_RETURN2
= 158,
1029 SDL_SCANCODE_SEPARATOR
= 159,
1030 SDL_SCANCODE_OUT
= 160,
1031 SDL_SCANCODE_OPER
= 161,
1032 SDL_SCANCODE_CLEARAGAIN
= 162,
1033 SDL_SCANCODE_CRSEL
= 163,
1034 SDL_SCANCODE_EXSEL
= 164,
1036 SDL_SCANCODE_KP_00
= 176,
1037 SDL_SCANCODE_KP_000
= 177,
1038 SDL_SCANCODE_THOUSANDSSEPARATOR
= 178,
1039 SDL_SCANCODE_DECIMALSEPARATOR
= 179,
1040 SDL_SCANCODE_CURRENCYUNIT
= 180,
1041 SDL_SCANCODE_CURRENCYSUBUNIT
= 181,
1042 SDL_SCANCODE_KP_LEFTPAREN
= 182,
1043 SDL_SCANCODE_KP_RIGHTPAREN
= 183,
1044 SDL_SCANCODE_KP_LEFTBRACE
= 184,
1045 SDL_SCANCODE_KP_RIGHTBRACE
= 185,
1046 SDL_SCANCODE_KP_TAB
= 186,
1047 SDL_SCANCODE_KP_BACKSPACE
= 187,
1048 SDL_SCANCODE_KP_A
= 188,
1049 SDL_SCANCODE_KP_B
= 189,
1050 SDL_SCANCODE_KP_C
= 190,
1051 SDL_SCANCODE_KP_D
= 191,
1052 SDL_SCANCODE_KP_E
= 192,
1053 SDL_SCANCODE_KP_F
= 193,
1054 SDL_SCANCODE_KP_XOR
= 194,
1055 SDL_SCANCODE_KP_POWER
= 195,
1056 SDL_SCANCODE_KP_PERCENT
= 196,
1057 SDL_SCANCODE_KP_LESS
= 197,
1058 SDL_SCANCODE_KP_GREATER
= 198,
1059 SDL_SCANCODE_KP_AMPERSAND
= 199,
1060 SDL_SCANCODE_KP_DBLAMPERSAND
= 200,
1061 SDL_SCANCODE_KP_VERTICALBAR
= 201,
1062 SDL_SCANCODE_KP_DBLVERTICALBAR
= 202,
1063 SDL_SCANCODE_KP_COLON
= 203,
1064 SDL_SCANCODE_KP_HASH
= 204,
1065 SDL_SCANCODE_KP_SPACE
= 205,
1066 SDL_SCANCODE_KP_AT
= 206,
1067 SDL_SCANCODE_KP_EXCLAM
= 207,
1068 SDL_SCANCODE_KP_MEMSTORE
= 208,
1069 SDL_SCANCODE_KP_MEMRECALL
= 209,
1070 SDL_SCANCODE_KP_MEMCLEAR
= 210,
1071 SDL_SCANCODE_KP_MEMADD
= 211,
1072 SDL_SCANCODE_KP_MEMSUBTRACT
= 212,
1073 SDL_SCANCODE_KP_MEMMULTIPLY
= 213,
1074 SDL_SCANCODE_KP_MEMDIVIDE
= 214,
1075 SDL_SCANCODE_KP_PLUSMINUS
= 215,
1076 SDL_SCANCODE_KP_CLEAR
= 216,
1077 SDL_SCANCODE_KP_CLEARENTRY
= 217,
1078 SDL_SCANCODE_KP_BINARY
= 218,
1079 SDL_SCANCODE_KP_OCTAL
= 219,
1080 SDL_SCANCODE_KP_DECIMAL
= 220,
1081 SDL_SCANCODE_KP_HEXADECIMAL
= 221,
1083 SDL_SCANCODE_LCTRL
= 224,
1084 SDL_SCANCODE_LSHIFT
= 225,
1085 SDL_SCANCODE_LALT
= 226,
1086 SDL_SCANCODE_LGUI
= 227,
1087 SDL_SCANCODE_RCTRL
= 228,
1088 SDL_SCANCODE_RSHIFT
= 229,
1089 SDL_SCANCODE_RALT
= 230,
1090 SDL_SCANCODE_RGUI
= 231,
1092 SDL_SCANCODE_MODE
= 257,
1094 SDL_SCANCODE_AUDIONEXT
= 258,
1095 SDL_SCANCODE_AUDIOPREV
= 259,
1096 SDL_SCANCODE_AUDIOSTOP
= 260,
1097 SDL_SCANCODE_AUDIOPLAY
= 261,
1098 SDL_SCANCODE_AUDIOMUTE
= 262,
1099 SDL_SCANCODE_MEDIASELECT
= 263,
1100 SDL_SCANCODE_WWW
= 264,
1101 SDL_SCANCODE_MAIL
= 265,
1102 SDL_SCANCODE_CALCULATOR
= 266,
1103 SDL_SCANCODE_COMPUTER
= 267,
1104 SDL_SCANCODE_AC_SEARCH
= 268,
1105 SDL_SCANCODE_AC_HOME
= 269,
1106 SDL_SCANCODE_AC_BACK
= 270,
1107 SDL_SCANCODE_AC_FORWARD
= 271,
1108 SDL_SCANCODE_AC_STOP
= 272,
1109 SDL_SCANCODE_AC_REFRESH
= 273,
1110 SDL_SCANCODE_AC_BOOKMARKS
= 274,
1112 SDL_SCANCODE_BRIGHTNESSDOWN
= 275,
1113 SDL_SCANCODE_BRIGHTNESSUP
= 276,
1114 SDL_SCANCODE_DISPLAYSWITCH
= 277,
1115 SDL_SCANCODE_KBDILLUMTOGGLE
= 278,
1116 SDL_SCANCODE_KBDILLUMDOWN
= 279,
1117 SDL_SCANCODE_KBDILLUMUP
= 280,
1118 SDL_SCANCODE_EJECT
= 281,
1119 SDL_SCANCODE_SLEEP
= 282,
1121 SDL_SCANCODE_APP1
= 283,
1122 SDL_SCANCODE_APP2
= 284,
1124 SDL_NUM_SCANCODES
= 512
1128 alias SDL_Keycode
= int;
1130 enum SDLK_SCANCODE_MASK
= 1<<30;
1132 T
SDL_SCANCODE_TO_KEYCODE(T
) (T x
) if (isIntegral
!T
) { return (x|SDLK_SCANCODE_MASK
); }
1137 SDLK_ESCAPE
= '\033',
1138 SDLK_BACKSPACE
= '\b',
1142 SDLK_QUOTEDBL
= '"',
1146 SDLK_AMPERSAND
= '&',
1148 SDLK_LEFTPAREN
= '(',
1149 SDLK_RIGHTPAREN
= ')',
1150 SDLK_ASTERISK
= '*',
1167 SDLK_SEMICOLON
= ';',
1171 SDLK_QUESTION
= '?',
1174 SDLK_LEFTBRACKET
= '[',
1175 SDLK_BACKSLASH
= '\\',
1176 SDLK_RIGHTBRACKET
= ']',
1178 SDLK_UNDERSCORE
= '_',
1179 SDLK_BACKQUOTE
= '`',
1207 SDLK_CAPSLOCK
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CAPSLOCK
),
1209 SDLK_F1
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F1
),
1210 SDLK_F2
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F2
),
1211 SDLK_F3
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F3
),
1212 SDLK_F4
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F4
),
1213 SDLK_F5
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F5
),
1214 SDLK_F6
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F6
),
1215 SDLK_F7
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F7
),
1216 SDLK_F8
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F8
),
1217 SDLK_F9
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F9
),
1218 SDLK_F10
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F10
),
1219 SDLK_F11
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F11
),
1220 SDLK_F12
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F12
),
1222 SDLK_PRINTSCREEN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_PRINTSCREEN
),
1223 SDLK_SCROLLLOCK
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_SCROLLLOCK
),
1224 SDLK_PAUSE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_PAUSE
),
1225 SDLK_INSERT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_INSERT
),
1226 SDLK_HOME
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_HOME
),
1227 SDLK_PAGEUP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_PAGEUP
),
1228 SDLK_DELETE
= '\177',
1229 SDLK_END
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_END
),
1230 SDLK_PAGEDOWN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_PAGEDOWN
),
1231 SDLK_RIGHT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_RIGHT
),
1232 SDLK_LEFT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_LEFT
),
1233 SDLK_DOWN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_DOWN
),
1234 SDLK_UP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_UP
),
1236 SDLK_NUMLOCKCLEAR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_NUMLOCKCLEAR
),
1237 SDLK_KP_DIVIDE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_DIVIDE
),
1238 SDLK_KP_MULTIPLY
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MULTIPLY
),
1239 SDLK_KP_MINUS
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MINUS
),
1240 SDLK_KP_PLUS
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_PLUS
),
1241 SDLK_KP_ENTER
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_ENTER
),
1242 SDLK_KP_1
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_1
),
1243 SDLK_KP_2
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_2
),
1244 SDLK_KP_3
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_3
),
1245 SDLK_KP_4
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_4
),
1246 SDLK_KP_5
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_5
),
1247 SDLK_KP_6
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_6
),
1248 SDLK_KP_7
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_7
),
1249 SDLK_KP_8
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_8
),
1250 SDLK_KP_9
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_9
),
1251 SDLK_KP_0
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_0
),
1252 SDLK_KP_PERIOD
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_PERIOD
),
1254 SDLK_APPLICATION
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_APPLICATION
),
1255 SDLK_POWER
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_POWER
),
1256 SDLK_KP_EQUALS
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_EQUALS
),
1257 SDLK_F13
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F13
),
1258 SDLK_F14
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F14
),
1259 SDLK_F15
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F15
),
1260 SDLK_F16
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F16
),
1261 SDLK_F17
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F17
),
1262 SDLK_F18
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F18
),
1263 SDLK_F19
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F19
),
1264 SDLK_F20
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F20
),
1265 SDLK_F21
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F21
),
1266 SDLK_F22
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F22
),
1267 SDLK_F23
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F23
),
1268 SDLK_F24
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_F24
),
1269 SDLK_EXECUTE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_EXECUTE
),
1270 SDLK_HELP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_HELP
),
1271 SDLK_MENU
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_MENU
),
1272 SDLK_SELECT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_SELECT
),
1273 SDLK_STOP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_STOP
),
1274 SDLK_AGAIN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AGAIN
),
1275 SDLK_UNDO
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_UNDO
),
1276 SDLK_CUT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CUT
),
1277 SDLK_COPY
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_COPY
),
1278 SDLK_PASTE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_PASTE
),
1279 SDLK_FIND
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_FIND
),
1280 SDLK_MUTE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_MUTE
),
1281 SDLK_VOLUMEUP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_VOLUMEUP
),
1282 SDLK_VOLUMEDOWN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_VOLUMEDOWN
),
1283 SDLK_KP_COMMA
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_COMMA
),
1284 SDLK_KP_EQUALSAS400
=
1285 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_EQUALSAS400
),
1287 SDLK_ALTERASE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_ALTERASE
),
1288 SDLK_SYSREQ
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_SYSREQ
),
1289 SDLK_CANCEL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CANCEL
),
1290 SDLK_CLEAR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CLEAR
),
1291 SDLK_PRIOR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_PRIOR
),
1292 SDLK_RETURN2
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_RETURN2
),
1293 SDLK_SEPARATOR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_SEPARATOR
),
1294 SDLK_OUT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_OUT
),
1295 SDLK_OPER
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_OPER
),
1296 SDLK_CLEARAGAIN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CLEARAGAIN
),
1297 SDLK_CRSEL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CRSEL
),
1298 SDLK_EXSEL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_EXSEL
),
1300 SDLK_KP_00
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_00
),
1301 SDLK_KP_000
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_000
),
1302 SDLK_THOUSANDSSEPARATOR
=
1303 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_THOUSANDSSEPARATOR
),
1304 SDLK_DECIMALSEPARATOR
=
1305 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_DECIMALSEPARATOR
),
1306 SDLK_CURRENCYUNIT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CURRENCYUNIT
),
1307 SDLK_CURRENCYSUBUNIT
=
1308 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CURRENCYSUBUNIT
),
1309 SDLK_KP_LEFTPAREN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_LEFTPAREN
),
1310 SDLK_KP_RIGHTPAREN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_RIGHTPAREN
),
1311 SDLK_KP_LEFTBRACE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_LEFTBRACE
),
1312 SDLK_KP_RIGHTBRACE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_RIGHTBRACE
),
1313 SDLK_KP_TAB
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_TAB
),
1314 SDLK_KP_BACKSPACE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_BACKSPACE
),
1315 SDLK_KP_A
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_A
),
1316 SDLK_KP_B
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_B
),
1317 SDLK_KP_C
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_C
),
1318 SDLK_KP_D
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_D
),
1319 SDLK_KP_E
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_E
),
1320 SDLK_KP_F
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_F
),
1321 SDLK_KP_XOR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_XOR
),
1322 SDLK_KP_POWER
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_POWER
),
1323 SDLK_KP_PERCENT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_PERCENT
),
1324 SDLK_KP_LESS
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_LESS
),
1325 SDLK_KP_GREATER
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_GREATER
),
1326 SDLK_KP_AMPERSAND
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_AMPERSAND
),
1327 SDLK_KP_DBLAMPERSAND
=
1328 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_DBLAMPERSAND
),
1329 SDLK_KP_VERTICALBAR
=
1330 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_VERTICALBAR
),
1331 SDLK_KP_DBLVERTICALBAR
=
1332 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_DBLVERTICALBAR
),
1333 SDLK_KP_COLON
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_COLON
),
1334 SDLK_KP_HASH
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_HASH
),
1335 SDLK_KP_SPACE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_SPACE
),
1336 SDLK_KP_AT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_AT
),
1337 SDLK_KP_EXCLAM
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_EXCLAM
),
1338 SDLK_KP_MEMSTORE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MEMSTORE
),
1339 SDLK_KP_MEMRECALL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MEMRECALL
),
1340 SDLK_KP_MEMCLEAR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MEMCLEAR
),
1341 SDLK_KP_MEMADD
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MEMADD
),
1342 SDLK_KP_MEMSUBTRACT
=
1343 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MEMSUBTRACT
),
1344 SDLK_KP_MEMMULTIPLY
=
1345 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MEMMULTIPLY
),
1346 SDLK_KP_MEMDIVIDE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_MEMDIVIDE
),
1347 SDLK_KP_PLUSMINUS
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_PLUSMINUS
),
1348 SDLK_KP_CLEAR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_CLEAR
),
1349 SDLK_KP_CLEARENTRY
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_CLEARENTRY
),
1350 SDLK_KP_BINARY
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_BINARY
),
1351 SDLK_KP_OCTAL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_OCTAL
),
1352 SDLK_KP_DECIMAL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_DECIMAL
),
1353 SDLK_KP_HEXADECIMAL
=
1354 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KP_HEXADECIMAL
),
1356 SDLK_LCTRL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_LCTRL
),
1357 SDLK_LSHIFT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_LSHIFT
),
1358 SDLK_LALT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_LALT
),
1359 SDLK_LGUI
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_LGUI
),
1360 SDLK_RCTRL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_RCTRL
),
1361 SDLK_RSHIFT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_RSHIFT
),
1362 SDLK_RALT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_RALT
),
1363 SDLK_RGUI
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_RGUI
),
1365 SDLK_MODE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_MODE
),
1367 SDLK_AUDIONEXT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AUDIONEXT
),
1368 SDLK_AUDIOPREV
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AUDIOPREV
),
1369 SDLK_AUDIOSTOP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AUDIOSTOP
),
1370 SDLK_AUDIOPLAY
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AUDIOPLAY
),
1371 SDLK_AUDIOMUTE
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AUDIOMUTE
),
1372 SDLK_MEDIASELECT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_MEDIASELECT
),
1373 SDLK_WWW
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_WWW
),
1374 SDLK_MAIL
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_MAIL
),
1375 SDLK_CALCULATOR
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CALCULATOR
),
1376 SDLK_COMPUTER
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_COMPUTER
),
1377 SDLK_AC_SEARCH
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AC_SEARCH
),
1378 SDLK_AC_HOME
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AC_HOME
),
1379 SDLK_AC_BACK
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AC_BACK
),
1380 SDLK_AC_FORWARD
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AC_FORWARD
),
1381 SDLK_AC_STOP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AC_STOP
),
1382 SDLK_AC_REFRESH
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AC_REFRESH
),
1383 SDLK_AC_BOOKMARKS
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_AC_BOOKMARKS
),
1385 SDLK_BRIGHTNESSDOWN
=
1386 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_BRIGHTNESSDOWN
),
1387 SDLK_BRIGHTNESSUP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_BRIGHTNESSUP
),
1388 SDLK_DISPLAYSWITCH
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_DISPLAYSWITCH
),
1389 SDLK_KBDILLUMTOGGLE
=
1390 SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KBDILLUMTOGGLE
),
1391 SDLK_KBDILLUMDOWN
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KBDILLUMDOWN
),
1392 SDLK_KBDILLUMUP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_KBDILLUMUP
),
1393 SDLK_EJECT
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_EJECT
),
1394 SDLK_SLEEP
= SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_SLEEP
)
1397 alias SDL_Keymod
= int;
1401 KMOD_LSHIFT
= 0x0001,
1402 KMOD_RSHIFT
= 0x0002,
1403 KMOD_LCTRL
= 0x0040,
1404 KMOD_RCTRL
= 0x0080,
1412 KMOD_RESERVED
= 0x8000,
1414 KMOD_CTRL
= ( KMOD_LCTRL|KMOD_RCTRL
),
1415 KMOD_SHIFT
= ( KMOD_LSHIFT|KMOD_RSHIFT
),
1416 KMOD_ALT
= ( KMOD_LALT|KMOD_RALT
),
1417 KMOD_GUI
= ( KMOD_LGUI|KMOD_RGUI
),
1421 enum SDL_MAX_LOG_MESSAGE
= 4096;
1424 SDL_LOG_CATEGORY_APPLICATION
,
1425 SDL_LOG_CATEGORY_ERROR
,
1426 SDL_LOG_CATEGORY_ASSERT
,
1427 SDL_LOG_CATEGORY_SYSTEM
,
1428 SDL_LOG_CATEGORY_AUDIO
,
1429 SDL_LOG_CATEGORY_VIDEO
,
1430 SDL_LOG_CATEGORY_RENDER
,
1431 SDL_LOG_CATEGORY_INPUT
,
1433 SDL_LOG_CATEGORY_RESERVED1
,
1434 SDL_LOG_CATEGORY_RESERVED2
,
1435 SDL_LOG_CATEGORY_RESERVED3
,
1436 SDL_LOG_CATEGORY_RESERVED4
,
1437 SDL_LOG_CATEGORY_RESERVED5
,
1438 SDL_LOG_CATEGORY_RESERVED6
,
1439 SDL_LOG_CATEGORY_RESERVED7
,
1440 SDL_LOG_CATEGORY_RESERVED8
,
1441 SDL_LOG_CATEGORY_RESERVED9
,
1442 SDL_LOG_CATEGORY_RESERVED10
,
1444 SDL_LOG_CATEGORY_CUSTOM
1447 alias SDL_LogPriority
= int;
1450 SDL_LOG_PRIORITY_VERBOSE
= 1,
1451 SDL_LOG_PRIORITY_DEBUG
,
1452 SDL_LOG_PRIORITY_INFO
,
1453 SDL_LOG_PRIORITY_WARN
,
1454 SDL_LOG_PRIORITY_ERROR
,
1455 SDL_LOG_PRIORITY_CRITICAL
,
1456 SDL_NUM_LOG_PRIORITIES
1459 extern(C
) nothrow alias SDL_LogOutputFunction
= void function (void*, int, SDL_LogPriority
, const (char)*);
1464 ubyte SDL_BUTTON(T
) (T x
) if (isIntegral
!T
) { return cast(ubyte)(1<<(x
-1)); }
1466 alias SDL_SystemCursor
= int;
1469 SDL_SYSTEM_CURSOR_ARROW
,
1470 SDL_SYSTEM_CURSOR_IBEAM
,
1471 SDL_SYSTEM_CURSOR_WAIT
,
1472 SDL_SYSTEM_CURSOR_CROSSHAIR
,
1473 SDL_SYSTEM_CURSOR_WAITARROW
,
1474 SDL_SYSTEM_CURSOR_SIZENWSE
,
1475 SDL_SYSTEM_CURSOR_SIZENESW
,
1476 SDL_SYSTEM_CURSOR_SIZEWE
,
1477 SDL_SYSTEM_CURSOR_SIZENS
,
1478 SDL_SYSTEM_CURSOR_SIZEALL
,
1479 SDL_SYSTEM_CURSOR_NO
,
1480 SDL_SYSTEM_CURSOR_HAND
,
1481 SDL_NUM_SYSTEM_CURSORS
1485 SDL_BUTTON_LEFT
= 1,
1486 SDL_BUTTON_MIDDLE
= 2,
1487 SDL_BUTTON_RIGHT
= 3,
1490 SDL_BUTTON_LMASK
= SDL_BUTTON (SDL_BUTTON_LEFT
),
1491 SDL_BUTTON_MMASK
= SDL_BUTTON (SDL_BUTTON_MIDDLE
),
1492 SDL_BUTTON_RMASK
= SDL_BUTTON (SDL_BUTTON_RIGHT
),
1493 SDL_BUTTON_X1MASK
= SDL_BUTTON (SDL_BUTTON_X1
),
1494 SDL_BUTTON_X2MASK
= SDL_BUTTON (SDL_BUTTON_X2
),
1498 enum SDL_ALPHA_OPAQUE
= 255;
1499 enum SDL_ALPHA_TRANSPARENT
= 0;
1502 SDL_PIXELTYPE_UNKNOWN
,
1503 SDL_PIXELTYPE_INDEX1
,
1504 SDL_PIXELTYPE_INDEX4
,
1505 SDL_PIXELTYPE_INDEX8
,
1506 SDL_PIXELTYPE_PACKED8
,
1507 SDL_PIXELTYPE_PACKED16
,
1508 SDL_PIXELTYPE_PACKED32
,
1509 SDL_PIXELTYPE_ARRAYU8
,
1510 SDL_PIXELTYPE_ARRAYU16
,
1511 SDL_PIXELTYPE_ARRAYU32
,
1512 SDL_PIXELTYPE_ARRAYF16
,
1513 SDL_PIXELTYPE_ARRAYF32
1517 SDL_BITMAPORDER_NONE
,
1518 SDL_BITMAPORDER_4321
,
1519 SDL_BITMAPORDER_1234
1523 SDL_PACKEDORDER_NONE
,
1524 SDL_PACKEDORDER_XRGB
,
1525 SDL_PACKEDORDER_RGBX
,
1526 SDL_PACKEDORDER_ARGB
,
1527 SDL_PACKEDORDER_RGBA
,
1528 SDL_PACKEDORDER_XBGR
,
1529 SDL_PACKEDORDER_BGRX
,
1530 SDL_PACKEDORDER_ABGR
,
1531 SDL_PACKEDORDER_BGRA
1535 SDL_ARRAYORDER_NONE
,
1537 SDL_ARRAYORDER_RGBA
,
1538 SDL_ARRAYORDER_ARGB
,
1540 SDL_ARRAYORDER_BGRA
,
1545 SDL_PACKEDLAYOUT_NONE
,
1546 SDL_PACKEDLAYOUT_332
,
1547 SDL_PACKEDLAYOUT_4444
,
1548 SDL_PACKEDLAYOUT_1555
,
1549 SDL_PACKEDLAYOUT_5551
,
1550 SDL_PACKEDLAYOUT_565
,
1551 SDL_PACKEDLAYOUT_8888
,
1552 SDL_PACKEDLAYOUT_2101010
,
1553 SDL_PACKEDLAYOUT_1010102
1556 alias SDL_DEFINE_PIXELFOURCC
= SDL_FOURCC
;
1558 uint SDL_DEFINE_PIXELFORMAT(T0
, T1
, T2
, T3
, T4
) (T0 type
, T1 order
, T2 layout
, T3 bits
, T4 bytes
)
1559 if (isIntegral
!T0
&& isIntegral
!T1
&& isIntegral
!T2
&& isIntegral
!T3
&& isIntegral
!T4
)
1561 return cast(uint)((1<<28)|
(type
<<24)|
(order
<<20)|
(layout
<<16)|
(bits
<<8)|bytes
);
1564 uint SDL_PIXELFLAG(T
) (T X
) if (isIntegral
!T
) { return (X
>>28)&0x0F; }
1565 uint SDL_PIXELTYPE(T
) (T X
) if (isIntegral
!T
) { return (X
>>24)&0x0F; }
1566 uint SDL_PIXELORDER(T
) (T X
) if (isIntegral
!T
) { return (X
>>20)&0x0F; }
1567 uint SDL_PIXELLAYOUT(T
) (T X
) if (isIntegral
!T
) { return (X
>>16)&0x0F; }
1568 uint SDL_BITSPERPIXEL(T
) (T X
) if (isIntegral
!T
) { return (X
>>8)&0xFF; }
1569 uint SDL_BYTESPERPIXEL(T
) (T X
) if (isIntegral
!T
) {
1570 if (SDL_ISPIXELFORMAT_FOURCC(X
)) {
1571 return (X
== SDL_PIXELFORMAT_YUY2 || X
== SDL_PIXELFORMAT_UYVY || X
== SDL_PIXELFORMAT_YVYU ?
2 : 1);
1577 bool SDL_ISPIXELFORMAT_INDEXED(T
) (T format
) if (isIntegral
!T
) {
1578 if (!SDL_ISPIXELFORMAT_FOURCC(format
)) {
1579 immutable auto pixelType
= SDL_PIXELTYPE(format
);
1580 return (pixelType
== SDL_PIXELTYPE_INDEX1 || pixelType
== SDL_PIXELTYPE_INDEX4 || pixelType
== SDL_PIXELTYPE_INDEX8
);
1586 bool SDL_ISPIXELFORMAT_ALPHA(T
) (T format
) if (isIntegral
!T
) {
1587 if (!SDL_ISPIXELFORMAT_FOURCC(format
)) {
1588 immutable auto pixelOrder
= SDL_PIXELORDER (format
);
1589 return (pixelOrder
== SDL_PACKEDORDER_ARGB || pixelOrder
== SDL_PACKEDORDER_RGBA || pixelOrder
== SDL_PACKEDORDER_ABGR || pixelOrder
== SDL_PACKEDORDER_BGRA
);
1595 bool SDL_ISPIXELFORMAT_FOURCC(T
) (T format
) if (isIntegral
!T
) { return format
&& !(format
&0x80000000); }
1598 SDL_PIXELFORMAT_UNKNOWN
,
1599 SDL_PIXELFORMAT_INDEX1LSB
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1
, SDL_BITMAPORDER_4321
, 0, 1, 0),
1600 SDL_PIXELFORMAT_INDEX1MSB
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX1
, SDL_BITMAPORDER_1234
, 0, 1, 0),
1601 SDL_PIXELFORMAT_INDEX4LSB
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4
, SDL_BITMAPORDER_4321
, 0, 4, 0),
1602 SDL_PIXELFORMAT_INDEX4MSB
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX4
, SDL_BITMAPORDER_1234
, 0, 4, 0),
1603 SDL_PIXELFORMAT_INDEX8
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_INDEX8
, 0, 0, 8, 1),
1604 SDL_PIXELFORMAT_RGB332
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8
, SDL_PACKEDORDER_XRGB
, SDL_PACKEDLAYOUT_332
, 8, 1),
1605 SDL_PIXELFORMAT_RGB444
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_XRGB
, SDL_PACKEDLAYOUT_4444
, 12, 2),
1606 SDL_PIXELFORMAT_RGB555
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_XRGB
, SDL_PACKEDLAYOUT_1555
, 15, 2),
1607 SDL_PIXELFORMAT_BGR555
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_XBGR
, SDL_PACKEDLAYOUT_1555
, 15, 2),
1608 SDL_PIXELFORMAT_ARGB4444
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_ARGB
, SDL_PACKEDLAYOUT_4444
, 16, 2),
1609 SDL_PIXELFORMAT_RGBA4444
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_RGBA
, SDL_PACKEDLAYOUT_4444
, 16, 2),
1610 SDL_PIXELFORMAT_ABGR4444
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_ABGR
, SDL_PACKEDLAYOUT_4444
, 16, 2),
1611 SDL_PIXELFORMAT_BGRA4444
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_BGRA
, SDL_PACKEDLAYOUT_4444
, 16, 2),
1612 SDL_PIXELFORMAT_ARGB1555
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_ARGB
, SDL_PACKEDLAYOUT_1555
, 16, 2),
1613 SDL_PIXELFORMAT_RGBA5551
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_RGBA
, SDL_PACKEDLAYOUT_5551
, 16, 2),
1614 SDL_PIXELFORMAT_ABGR1555
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_ABGR
, SDL_PACKEDLAYOUT_1555
, 16, 2),
1615 SDL_PIXELFORMAT_BGRA5551
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_BGRA
, SDL_PACKEDLAYOUT_5551
, 16, 2),
1616 SDL_PIXELFORMAT_RGB565
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_XRGB
, SDL_PACKEDLAYOUT_565
, 16, 2),
1617 SDL_PIXELFORMAT_BGR565
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16
, SDL_PACKEDORDER_XBGR
, SDL_PACKEDLAYOUT_565
, 16, 2),
1618 SDL_PIXELFORMAT_RGB24
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8
, SDL_ARRAYORDER_RGB
, 0, 24, 3),
1619 SDL_PIXELFORMAT_BGR24
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8
, SDL_ARRAYORDER_BGR
, 0, 24, 3),
1620 SDL_PIXELFORMAT_RGB888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_XRGB
, SDL_PACKEDLAYOUT_8888
, 24, 4),
1621 SDL_PIXELFORMAT_RGBX8888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_RGBX
, SDL_PACKEDLAYOUT_8888
, 24, 4),
1622 SDL_PIXELFORMAT_BGR888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_XBGR
, SDL_PACKEDLAYOUT_8888
, 24, 4),
1623 SDL_PIXELFORMAT_BGRX8888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_BGRX
, SDL_PACKEDLAYOUT_8888
, 24, 4),
1624 SDL_PIXELFORMAT_ARGB8888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_ARGB
, SDL_PACKEDLAYOUT_8888
, 32, 4),
1625 SDL_PIXELFORMAT_RGBA8888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_RGBA
, SDL_PACKEDLAYOUT_8888
, 32, 4),
1626 SDL_PIXELFORMAT_ABGR8888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_ABGR
, SDL_PACKEDLAYOUT_8888
, 32, 4),
1627 SDL_PIXELFORMAT_BGRA8888
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_BGRA
, SDL_PACKEDLAYOUT_8888
, 32, 4),
1628 SDL_PIXELFORMAT_ARGB2101010
= SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32
, SDL_PACKEDORDER_ARGB
, SDL_PACKEDLAYOUT_2101010
, 32, 4),
1630 SDL_PIXELFORMAT_YV12
= SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
1631 SDL_PIXELFORMAT_IYUV
= SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
1632 SDL_PIXELFORMAT_YUY2
= SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
1633 SDL_PIXELFORMAT_UYVY
= SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
1634 SDL_PIXELFORMAT_YVYU
= SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
1637 static assert (SDL_PIXELFORMAT_BGRX8888
== 0x16661804);
1646 struct SDL_Palette
{
1649 // NOTE: original was named 'version'
1654 struct SDL_PixelFormat
{
1656 SDL_Palette
*palette
;
1658 ubyte BytesPerPixel
;
1673 SDL_PixelFormat
* next
;
1677 alias SDL_PowerState
= int;
1679 SDL_POWERSTATE_UNKNOWN
,
1680 SDL_POWERSTATE_ON_BATTERY
,
1681 SDL_POWERSTATE_NO_BATTERY
,
1682 SDL_POWERSTATE_CHARGING
,
1683 SDL_POWERSTATE_CHARGED
1697 bool SDL_RectEmpty() (const(SDL_Rect
)* X
) { return !X ||
( X
.w
<= 0) ||
( X
.h
<= 0); }
1698 bool SDL_RectEquals() (const(SDL_Rect
)* A
, const(SDL_Rect
)* B
) { return (A
&& B
&& A
.x
== B
.x
&& A
.y
== B
.y
&& A
.w
== B
.w
&& A
.h
== B
.h
); }
1701 alias SDL_RendererFlags
= uint;
1704 SDL_RENDERER_SOFTWARE
= 0x00000001,
1705 SDL_RENDERER_ACCELERATED
= 0x00000002,
1706 SDL_RENDERER_PRESENTVSYNC
= 0x00000004,
1707 SDL_RENDERER_TARGETTEXTURE
= 0x00000008,
1710 struct SDL_RendererInfo
{
1713 uint num_texture_formats
;
1714 uint[16] texture_formats
;
1715 int max_texture_width
;
1716 int max_texture_height
;
1719 alias SDL_TextureAccess
= int;
1722 SDL_TEXTUREACCESS_STATIC
,
1723 SDL_TEXTUREACCESS_STREAMING
,
1724 SDL_TEXTUREACCESS_TARGET
,
1727 alias SDL_TextureModulate
= int;
1730 SDL_TEXTUREMODULATE_NONE
= 0x00000000,
1731 SDL_TEXTUREMODULATE_COLOR
= 0x00000001,
1732 SDL_TEXTUREMODULATE_ALPHA
= 0x00000002
1735 alias SDL_RendererFlip
= int;
1738 SDL_FLIP_NONE
= 0x00000000,
1739 SDL_FLIP_HORIZONTAL
= 0x00000001,
1740 SDL_FLIP_VERTICAL
= 0x00000002,
1743 struct SDL_Renderer
;
1748 SDL_RWOPS_UNKNOWN
= 0,
1749 SDL_RWOPS_WINFILE
= 1,
1750 SDL_RWOPS_STDFILE
= 2,
1751 SDL_RWOPS_JNIFILE
= 3,
1752 SDL_RWOPS_MEMORY
= 4,
1753 SDL_RWOPS_MEMORY_RO
= 5,
1758 long function (SDL_RWops
*) size
;
1759 long function (SDL_RWops
*, long, int) seek
;
1760 usize
function (SDL_RWops
*, void*, usize
, usize
) read
;
1761 usize
function (SDL_RWops
*, const (void)*, usize
, usize
) write
;
1762 int function (SDL_RWops
*) close
;
1777 Windowsio windowsio
;
1808 long SDL_RWsize (SDL_RWops
* ctx
) { return ctx
.size (ctx
); }
1809 long SDL_RWseek (SDL_RWops
* ctx
, long offset
, int whence
) { return ctx
.seek (ctx
, offset
, whence
); }
1810 long SDL_RWtell (SDL_RWops
* ctx
) { return ctx
.seek (ctx
, 0, RW_SEEK_CUR
); }
1811 usize
SDL_RWread (SDL_RWops
* ctx
, void* ptr
, usize size
, usize n
) { return ctx
.read (ctx
, ptr
, size
, n
); }
1812 usize
SDL_RWwrite (SDL_RWops
* ctx
, const (void)* ptr
, usize size
, usize n
) { return ctx
.write (ctx
, ptr
, size
, n
); }
1813 int SDL_RWclose (SDL_RWops
* ctx
) { return ctx
.close (ctx
); }
1818 SDL_NONSHAPEABLE_WINDOW
= -1,
1819 SDL_INVALID_SHAPE_ARGUMENT
= -2,
1820 SDL_WINDOW_LACKS_SHAPE
= -3,
1823 alias WindowShapeMode
= int;
1827 ShapeModeBinarizeAlpha
,
1828 ShapeModeReverseBinarizeAlpha
,
1832 bool SDL_SHAPEMODEALPHA() (WindowShapeMode mode
) {
1833 return (mode
== ShapeModeDefault || mode
== ShapeModeBinarizeAlpha || mode
== ShapeModeReverseBinarizeAlpha
);
1836 union SDL_WindowShapeParams
{
1837 ubyte binarizationCutoff
;
1841 struct SDL_WindowShapeMode
{
1842 WindowShapeMode mode
;
1843 SDL_WindowShapeParams parameters
;
1849 SDL_PREALLOC
= 0x00000001,
1850 SDL_RLEACCEL
= 0x00000002,
1851 SDL_DONTFREE
= 0x00000004,
1854 bool SDL_MUSTLOCK() (const SDL_Surface
* S
) { return ((S
.flags
&SDL_RLEACCEL
) != 0); }
1858 struct SDL_Surface
{
1860 SDL_PixelFormat
* format
;
1872 extern(C
) nothrow alias SDL_blit
= int function (SDL_Surface
* src
, SDL_Rect
* srcrect
, SDL_Surface
* dst
, SDL_Rect
* dstrect
);
1875 alias SDL_SYSWM_TYPE
= int;
1889 // SDL_SysWMmsg might have a different size that in SDL
1890 struct SDL_SysWMmsg
{
1891 SDL_version version_
;
1892 SDL_SYSWM_TYPE subsystem
;
1893 // other data i don't care for now
1896 struct SDL_SysWMinfo
{
1897 SDL_version version_
; // version is reserved in D
1898 SDL_SYSWM_TYPE subsystem
;
1900 static union info_
{
1909 /*Display*/void* display
;
1910 /*Window*/uint window
;
1919 extern(C
) nothrow alias SDL_TimerCallback
= uint function (uint interval
, void* param
);
1921 alias SDL_TimerID
= int;
1923 bool SDL_TICKS_PASSED() (uint A
, uint B
) { return cast(int)(B
-A
) <= 0; }
1926 alias SDL_TouchID
= long;
1927 alias SDL_FingerID
= long;
1936 enum uint SDL_TOUCH_MOUSEID
= cast(uint)-1;
1939 struct SDL_DisplayMode
{
1949 alias SDL_WindowFlags
= int;
1952 SDL_WINDOW_FULLSCREEN
= 0x00000001,
1953 SDL_WINDOW_OPENGL
= 0x00000002,
1954 SDL_WINDOW_SHOWN
= 0x00000004,
1955 SDL_WINDOW_HIDDEN
= 0x00000008,
1956 SDL_WINDOW_BORDERLESS
= 0x00000010,
1957 SDL_WINDOW_RESIZABLE
= 0x00000020,
1958 SDL_WINDOW_MINIMIZED
= 0x00000040,
1959 SDL_WINDOW_MAXIMIZED
= 0x00000080,
1960 SDL_WINDOW_INPUT_GRABBED
= 0x00000100,
1961 SDL_WINDOW_INPUT_FOCUS
= 0x00000200,
1962 SDL_WINDOW_MOUSE_FOCUS
= 0x00000400,
1963 SDL_WINDOW_FULLSCREEN_DESKTOP
= SDL_WINDOW_FULLSCREEN|
0x00001000,
1964 SDL_WINDOW_FOREIGN
= 0x00000800,
1965 SDL_WINDOW_ALLOW_HIGHDPI
= 0x00002000,
1968 enum SDL_WINDOWPOS_UNDEFINED_MASK
= 0x1FFF0000;
1969 uint SDL_WINDOWPOS_UNDEFINED_DISPLAY(T
) (T X
) if (isIntegral
!T
) { return cast(uint)(SDL_WINDOWPOS_UNDEFINED_MASK|X
); }
1970 enum SDL_WINDOWPOS_UNDEFINED
= SDL_WINDOWPOS_UNDEFINED_DISPLAY(0);
1971 bool SDL_WINDOWPOS_ISUNDEFINED(T
) (T X
) if (isIntegral
!T
) { return ((X
&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK
); }
1973 enum SDL_WINDOWPOS_CENTERED_MASK
= 0x2FFF0000;
1974 uint SDL_WINDOWPOS_CENTERED_DISPLAY(T
) (T X
) if (isIntegral
!T
) { return cast(uint)(SDL_WINDOWPOS_CENTERED_MASK|X
); }
1975 enum SDL_WINDOWPOS_CENTERED
= SDL_WINDOWPOS_CENTERED_DISPLAY (0);
1976 bool SDL_WINDOWPOS_ISCENTERED(T
) (T X
) if (isIntegral
!T
) { return ((X
&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK
); }
1978 alias SDL_WindowEventID
= int;
1981 SDL_WINDOWEVENT_NONE
,
1982 SDL_WINDOWEVENT_SHOWN
,
1983 SDL_WINDOWEVENT_HIDDEN
,
1984 SDL_WINDOWEVENT_EXPOSED
,
1985 SDL_WINDOWEVENT_MOVED
,
1986 SDL_WINDOWEVENT_RESIZED
,
1987 SDL_WINDOWEVENT_SIZE_CHANGED
,
1988 SDL_WINDOWEVENT_MINIMIZED
,
1989 SDL_WINDOWEVENT_MAXIMIZED
,
1990 SDL_WINDOWEVENT_RESTORED
,
1991 SDL_WINDOWEVENT_ENTER
,
1992 SDL_WINDOWEVENT_LEAVE
,
1993 SDL_WINDOWEVENT_FOCUS_GAINED
,
1994 SDL_WINDOWEVENT_FOCUS_LOST
,
1995 SDL_WINDOWEVENT_CLOSE
1998 alias SDL_GLContext
= void*;
2000 alias SDL_GLattr
= int;
2008 SDL_GL_DOUBLEBUFFER
,
2010 SDL_GL_STENCIL_SIZE
,
2011 SDL_GL_ACCUM_RED_SIZE
,
2012 SDL_GL_ACCUM_GREEN_SIZE
,
2013 SDL_GL_ACCUM_BLUE_SIZE
,
2014 SDL_GL_ACCUM_ALPHA_SIZE
,
2016 SDL_GL_MULTISAMPLEBUFFERS
,
2017 SDL_GL_MULTISAMPLESAMPLES
,
2018 SDL_GL_ACCELERATED_VISUAL
,
2019 SDL_GL_RETAINED_BACKING
,
2020 SDL_GL_CONTEXT_MAJOR_VERSION
,
2021 SDL_GL_CONTEXT_MINOR_VERSION
,
2023 SDL_GL_CONTEXT_FLAGS
,
2024 SDL_GL_CONTEXT_PROFILE_MASK
,
2025 SDL_GL_SHARE_WITH_CURRENT_CONTEXT
,
2026 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
,
2029 alias SDL_GLprofile
= int;
2032 SDL_GL_CONTEXT_PROFILE_CORE
= 0x0001,
2033 SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
= 0x0002,
2034 SDL_GL_CONTEXT_PROFILE_ES
= 0x0004,
2037 alias SDL_GLcontextFlag
= int;
2040 SDL_GL_CONTEXT_DEBUG_FLAG
= 0x0001,
2041 SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
= 0x0002,
2042 SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG
= 0x0004,
2043 SDL_GL_CONTEXT_RESET_ISOLATION_FLAG
= 0x0008,
2047 extern(C
) @nogc nothrow {
2049 int SDL_Init (uint);
2050 int SDL_InitSubSystem (uint);
2051 void SDL_QuitSubSystem (uint);
2052 uint SDL_WasInit (uint);
2054 void SDL_free (void* mem
);
2057 void SDL_SetAssertionHandler (SDL_AssertionHandler
, void*);
2058 const(SDL_assert_data
)* SDL_GetAssertionReport ();
2059 void SDL_ResetAssertionReport ();
2062 int SDL_GetNumAudioDrivers ();
2063 const(char)* SDL_GetAudioDriver (int);
2064 int SDL_AudioInit (const(char)*);
2065 void SDL_AudioQuit ();
2066 const(char)* SDL_GetCurrentAudioDriver ();
2067 int SDL_OpenAudio (SDL_AudioSpec
*, SDL_AudioSpec
*);
2068 int SDL_GetNumAudioDevices (int);
2069 const(char)* SDL_GetAudioDeviceName (int, int);
2070 SDL_AudioDeviceID
SDL_OpenAudioDevice (const(char)*, int, const(SDL_AudioSpec
)*, SDL_AudioSpec
*, int);
2071 SDL_AudioStatus
SDL_GetAudioStatus ();
2072 SDL_AudioStatus
SDL_GetAudioDeviceStatus (SDL_AudioDeviceID
);
2073 void SDL_PauseAudio (int);
2074 void SDL_PauseAudioDevice (SDL_AudioDeviceID
, int);
2075 SDL_AudioSpec
* SDL_LoadWAV_RW (SDL_RWops
*, int, SDL_AudioSpec
*, ubyte**, uint*);
2076 void SDL_FreeWAV (ubyte*);
2077 int SDL_BuildAudioCVT (SDL_AudioCVT
*, SDL_AudioFormat
, ubyte, int, SDL_AudioFormat
, ubyte, int);
2078 int SDL_ConvertAudio (SDL_AudioCVT
*);
2079 void SDL_MixAudio (ubyte*, const(ubyte)*, uint, int);
2080 void SDL_MixAudioFormat (ubyte*, const(ubyte)*, SDL_AudioFormat
, uint, int);
2081 void SDL_LockAudio ();
2082 void SDL_LockAudioDevice (SDL_AudioDeviceID
);
2083 void SDL_UnlockAudio ();
2084 void SDL_UnlockAudioDevice (SDL_AudioDeviceID
);
2085 void SDL_CloseAudio ();
2086 void SDL_CloseAudioDevice (SDL_AudioDeviceID
);
2087 int SDL_AudioDeviceConnected (SDL_AudioDeviceID
);
2090 int SDL_SetClipboardText (const(char)*);
2091 char* SDL_GetClipboardText ();
2092 SDL_bool
SDL_HasClipboardText ();
2095 int SDL_GetCPUCount ();
2096 int SDL_GetCPUCacheLineSize ();
2097 SDL_bool
SDL_HasRDTSC ();
2098 SDL_bool
SDL_HasAltiVec ();
2099 SDL_bool
SDL_HasMMX ();
2100 SDL_bool
SDL_Has3DNow ();
2101 SDL_bool
SDL_HasSSE ();
2102 SDL_bool
SDL_HasSSE2 ();
2103 SDL_bool
SDL_HasSSE3 ();
2104 SDL_bool
SDL_HasSSE41 ();
2105 SDL_bool
SDL_HasSSE42 ();
2106 SDL_bool
SDL_HasAVX ();
2107 int SDL_GetSystemRAM ();
2110 void SDL_SetError (const(char)*, ...);
2111 const(char)* SDL_GetError ();
2112 void SDL_ClearError ();
2115 void SDL_PumpEvents ();
2116 int SDL_PeepEvents (SDL_Event
*, int, SDL_eventaction
, uint, uint);
2117 SDL_bool
SDL_HasEvent (uint);
2118 SDL_bool
SDL_HasEvents (uint, uint);
2119 void SDL_FlushEvent (uint);
2120 void SDL_FlushEvents (uint, uint);
2121 int SDL_PollEvent (SDL_Event
*);
2122 int SDL_WaitEvent (SDL_Event
*);
2123 int SDL_WaitEventTimeout (SDL_Event
*, int);
2124 int SDL_PushEvent (SDL_Event
*);
2125 void SDL_SetEventFilter (SDL_EventFilter
, void*);
2126 void SDL_GetEventFilter (SDL_EventFilter
*, void**);
2127 void SDL_AddEventWatch (SDL_EventFilter
, void*);
2128 void SDL_DelEventWatch (SDL_EventFilter
, void*);
2129 void SDL_FilterEvents (SDL_EventFilter
, void*);
2130 ubyte SDL_EventState (uint, int);
2131 uint SDL_RegisterEvents (int);
2133 // SDL_gamecontroller.h
2134 int SDL_GameControllerAddMappingsFromRW (SDL_RWops
*, int);
2135 int SDL_GameControllerAddMapping (const(char)*);
2136 char* SDL_GameControllerMappingForGUID (SDL_JoystickGUID
);
2137 char* SDL_GameControllerMapping (SDL_GameController
*);
2138 SDL_bool
SDL_IsGameController (int);
2139 const(char)* SDL_GameControllerNameForIndex (int);
2140 SDL_GameController
* SDL_GameControllerOpen (int);
2141 const(char)* SDL_GameControllerName (SDL_GameController
*);
2142 SDL_bool
SDL_GameControllerGetAttached (SDL_GameController
*);
2143 SDL_Joystick
* SDL_GameControllerGetJoystick (SDL_GameController
*);
2144 int SDL_GameControllerEventState (int);
2145 void SDL_GameControllerUpdate ();
2146 SDL_GameControllerAxis
SDL_GameControllerGetAxisFromString (const(char)*);
2147 const(char)* SDL_GameControllerGetStringForAxis (SDL_GameControllerAxis
);
2148 SDL_GameControllerButtonBind
SDL_GameControllerGetBindForAxis (SDL_GameController
*, SDL_GameControllerAxis
);
2149 short SDL_GameControllerGetAxis (SDL_GameController
*, SDL_GameControllerAxis
);
2150 SDL_GameControllerButton
SDL_GameControllerGetButtonFromString (const(char*));
2151 const(char)* SDL_GameControllerGetStringForButton (SDL_GameControllerButton
);
2152 SDL_GameControllerButtonBind
SDL_GameControllerGetBindForButton (SDL_GameController
*, SDL_GameControllerButton
);
2153 ubyte SDL_GameControllerGetButton (SDL_GameController
*, SDL_GameControllerButton
);
2154 void SDL_GameControllerClose (SDL_GameController
*);
2157 int SDL_RecordGesture (SDL_TouchID
);
2158 int SDL_SaveAllDollarTemplates (SDL_RWops
*);
2159 int SDL_SaveDollarTemplate (SDL_GestureID
, SDL_RWops
*);
2160 int SDL_LoadDollarTemplates (SDL_TouchID
, SDL_RWops
*);
2163 int SDL_NumHaptics ();
2164 const(char)* SDL_HapticName (int);
2165 SDL_Haptic
* SDL_HapticOpen (int);
2166 int SDL_HapticOpened (int);
2167 int SDL_HapticIndex (SDL_Haptic
*);
2168 int SDL_MouseIsHaptic ();
2169 SDL_Haptic
* SDL_HapticOpenFromMouse ();
2170 int SDL_JoystickIsHaptic (SDL_Joystick
*);
2171 SDL_Haptic
* SDL_HapticOpenFromJoystick (SDL_Joystick
*);
2172 int SDL_HapticClose (SDL_Haptic
*);
2173 int SDL_HapticNumEffects (SDL_Haptic
*);
2174 int SDL_HapticNumEffectsPlaying (SDL_Haptic
*);
2175 uint SDL_HapticQuery (SDL_Haptic
*);
2176 int SDL_HapticNumAxes (SDL_Haptic
*);
2177 int SDL_HapticEffectSupported (SDL_Haptic
*, SDL_HapticEffect
*);
2178 int SDL_HapticNewEffect (SDL_Haptic
*, SDL_HapticEffect
*);
2179 int SDL_HapticUpdateEffect (SDL_Haptic
*, int, SDL_HapticEffect
*);
2180 int SDL_HapticRunEffect (SDL_Haptic
*, int, SDL_HapticEffect
*);
2181 int SDL_HapticStopEffect (SDL_Haptic
*, int);
2182 int SDL_HapticDestroyEffect (SDL_Haptic
*, int);
2183 int SDL_HapticGetEffectStatus (SDL_Haptic
*, int);
2184 int SDL_HapticSetGain (SDL_Haptic
*, int);
2185 int SDL_HapticSetAutocenter (SDL_Haptic
*, int);
2186 int SDL_HapticPause (SDL_Haptic
*);
2187 int SDL_HapticUnpause (SDL_Haptic
*);
2188 int SDL_HapticStopAll (SDL_Haptic
*);
2189 int SDL_HapticRumbleSupported (SDL_Haptic
*);
2190 int SDL_HapticRumbleInit (SDL_Haptic
*);
2191 int SDL_HapticRumblePlay (SDL_Haptic
*, float, uint);
2192 int SDL_HapticRumbleStop (SDL_Haptic
*);
2195 SDL_bool
SDL_SetHintWithPriority (const(char)*, const(char)*, SDL_HintPriority
);
2196 SDL_bool
SDL_SetHint (const(char)*, const(char)*);
2197 const(char)* SDL_GetHint (const(char)*);
2198 void SDL_AddHintCallback (const(char)*, SDL_HintCallback
, void*);
2199 void SDL_DelHintCallback (const(char)*, SDL_HintCallback
, void*);
2200 void SDL_ClearHints ();
2203 int SDL_RedetectInputDevices ();
2204 int SDL_GetNumInputDevices ();
2205 const(char)* SDL_GetInputDeviceName (int);
2206 int SDL_IsDeviceDisconnected (int);
2209 int SDL_NumJoysticks ();
2210 const(char)* SDL_JoystickNameForIndex (int);
2211 SDL_Joystick
* SDL_JoystickOpen (int);
2212 const(char)* SDL_JoystickName (SDL_Joystick
*);
2213 JoystickGUID
SDL_JoystickGetDeviceGUID (int);
2214 JoystickGUID
SDL_JoystickGetGUID (SDL_Joystick
*);
2215 char* SDL_JoystickGetGUIDString (JoystickGUID
);
2216 JoystickGUID
SDL_JoystickGetGUIDFromString (const(char)*);
2217 SDL_bool
SDL_JoystickGetAttached (SDL_Joystick
*);
2218 SDL_JoystickID
SDL_JoystickInstanceID (SDL_Joystick
*);
2219 int SDL_JoystickNumAxes (SDL_Joystick
*);
2220 int SDL_JoystickNumBalls (SDL_Joystick
*);
2221 int SDL_JoystickNumHats (SDL_Joystick
*);
2222 int SDL_JoystickNumButtons (SDL_Joystick
*);
2223 int SDL_JoystickUpdate (SDL_Joystick
*);
2224 int SDL_JoystickEventState (int);
2225 short SDL_JoystickGetAxis (SDL_Joystick
*, int);
2226 ubyte SDL_JoystickGetHat (SDL_Joystick
*, int);
2227 int SDL_JoystickGetBall (SDL_Joystick
*, int, int*, int*);
2228 ubyte SDL_JoystickGetButton (SDL_Joystick
*, int);
2229 void SDL_JoystickClose (SDL_Joystick
*);
2232 SDL_Window
* SDL_GetKeyboardFocus ();
2233 ubyte* SDL_GetKeyboardState (int*);
2234 SDL_Keymod
SDL_GetModState ();
2235 void SDL_SetModState (SDL_Keymod
);
2236 SDL_Keycode
SDL_GetKeyFromScancode (SDL_Scancode
);
2237 SDL_Scancode
SDL_GetScancodeFromKey (SDL_Keycode
);
2238 const(char)* SDL_GetScancodeName (SDL_Scancode
);
2239 SDL_Scancode
SDL_GetScancodeFromName (const(char)*);
2240 const(char)* SDL_GetKeyName (SDL_Keycode
);
2241 SDL_Keycode
SDL_GetKeyFromName (const(char)*);
2242 void SDL_StartTextInput ();
2243 SDL_bool
SDL_IsTextInputActive ();
2244 void SDL_StopTextInput ();
2245 void SDL_SetTextInputRect (SDL_Rect
*);
2246 SDL_bool
SDL_HasScreenKeyboardSupport ();
2247 SDL_bool
SDL_IsScreenKeyboardShown (SDL_Window
*);
2250 void* SDL_LoadObject (const(char)*);
2251 void* SDL_LoadFunction (void*, const(char*));
2252 void SDL_UnloadObject (void*);
2255 void SDL_LogSetAllPriority (SDL_LogPriority
);
2256 void SDL_LogSetPriority (int, SDL_LogPriority
);
2257 SDL_LogPriority
SDL_LogGetPriority (int);
2258 void SDL_LogResetPriorities ();
2259 void SDL_Log (const(char)*, ...);
2260 void SDL_LogVerbose (int, const(char)*, ...);
2261 void SDL_LogDebug (int, const(char)*, ...);
2262 void SDL_LogInfo (int, const(char)*, ...);
2263 void SDL_LogWarn (int, const(char)*, ...);
2264 void SDL_LogError (int, const(char)*, ...);
2265 void SDL_LogCritical (int, const(char)*, ...);
2266 void SDL_LogMessage (int, SDL_LogPriority
, const(char)*, ...);
2267 void SDL_LogMessageV (int, SDL_LogPriority
, const(char)*, va_list
);
2268 void SDL_LogGetOutputFunction (SDL_LogOutputFunction
, void**);
2269 void SDL_LogSetOutputFunction (SDL_LogOutputFunction
, void*);
2272 int SDL_ShowMessageBox (const(SDL_MessageBoxData
)*, int*);
2273 int SDL_ShowSimpleMessageBox (uint, const(char)*, const(char)*, SDL_Window
*);
2276 SDL_Window
* SDL_GetMouseFocus ();
2277 uint SDL_GetMouseState (int*, int*);
2278 uint SDL_GetRelativeMouseState (int*, int*);
2279 void SDL_WarpMouseInWindow (SDL_Window
*, int, int);
2280 int SDL_SetRelativeMouseMode (SDL_bool
);
2281 SDL_bool
SDL_GetRelativeMouseMode ();
2282 SDL_Cursor
* SDL_CreateCursor (const(ubyte)*, const(ubyte)*, int, int, int, int);
2283 SDL_Cursor
* SDL_CreateColorCursor (SDL_Surface
*, int, int);
2284 SDL_Cursor
* SDL_CreateSystemCursor (SDL_SystemCursor
);
2285 void SDL_SetCursor (SDL_Cursor
*);
2286 SDL_Cursor
* SDL_GetCursor ();
2287 SDL_Cursor
* SDL_GetDefaultCursor ();
2288 void SDL_FreeCursor (SDL_Cursor
*);
2289 int SDL_ShowCursor (int);
2292 const(char)* SDL_GetPixelFormatName (uint);
2293 SDL_bool
SDL_PixelFormatEnumToMasks (uint, int*, uint*, uint*, uint*, uint*);
2294 uint SDL_MasksToPixelFormatEnum (int, uint, uint, uint, uint);
2295 SDL_PixelFormat
* SDL_AllocFormat (uint);
2296 void SDL_FreeFormat (SDL_PixelFormat
*);
2297 SDL_Palette
* SDL_AllocPalette (int);
2298 int SDL_SetPixelFormatPalette (SDL_PixelFormat
*, SDL_Palette
*);
2299 int SDL_SetPaletteColors (SDL_Palette
*, const(SDL_Color
)*, int, int);
2300 void SDL_FreePalette (SDL_Palette
*);
2301 uint SDL_MapRGB (const(SDL_PixelFormat
)*, ubyte, ubyte, ubyte);
2302 uint SDL_MapRGBA (const(SDL_PixelFormat
)*, ubyte, ubyte, ubyte, ubyte);
2303 void SDL_GetRGB (uint, const(SDL_PixelFormat
)*, ubyte*, ubyte*, ubyte*);
2304 void SDL_GetRGBA (uint, const(SDL_PixelFormat
)*, ubyte*, ubyte*, ubyte*, ubyte*);
2305 void SDL_CalculateGammaRamp (float, ushort*);
2308 const(char)* SDL_GetPlatform ();
2311 SDL_PowerState
SDL_GetPowerInfo (int*, int*);
2314 SDL_bool
SDL_HasIntersection (const(SDL_Rect
)*, const(SDL_Rect
)*);
2315 SDL_bool
SDL_IntersectRect (const(SDL_Rect
)*, const(SDL_Rect
)*, SDL_Rect
*);
2316 void SDL_UnionRect (const(SDL_Rect
)*, const(SDL_Rect
)*, SDL_Rect
*);
2317 void SDL_EnclosePoints (const(SDL_Point
)*, int, const(SDL_Rect
)*, SDL_Rect
*);
2318 SDL_bool
SDL_IntersectRectAndLine (const(SDL_Rect
)*, int*, int*, int*, int*);
2321 int SDL_GetNumRenderDrivers ();
2322 int SDL_GetRenderDriverInfo (int, SDL_RendererInfo
*);
2323 int SDL_CreateWindowAndRenderer (int, int, uint, SDL_Window
**, SDL_Renderer
**);
2324 SDL_Renderer
* SDL_CreateRenderer (SDL_Window
*, int, uint);
2325 SDL_Renderer
* SDL_CreateSoftwareRenderer (SDL_Surface
*);
2326 SDL_Renderer
* SDL_GetRenderer (SDL_Window
*);
2327 int SDL_GetRendererInfo (SDL_Renderer
*, SDL_RendererInfo
*);
2328 SDL_Texture
* SDL_CreateTexture (SDL_Renderer
*, uint, int, int, int);
2329 SDL_Texture
* SDL_CreateTextureFromSurface (SDL_Renderer
*, SDL_Surface
*);
2330 int SDL_QueryTexture (SDL_Texture
*, uint*, int*, int*, int*);
2331 int SDL_SetTextureColorMod (SDL_Texture
*, ubyte, ubyte, ubyte);
2332 int SDL_GetTextureColorMod (SDL_Texture
*, ubyte*, ubyte*, ubyte*);
2333 int SDL_SetTextureAlphaMod (SDL_Texture
*, ubyte);
2334 int SDL_GetTextureAlphaMod (SDL_Texture
*, ubyte*);
2335 int SDL_SetTextureBlendMode (SDL_Texture
*, SDL_BlendMode
);
2336 int SDL_GetTextureBlendMode (SDL_Texture
*, SDL_BlendMode
*);
2337 int SDL_UpdateTexture (SDL_Texture
*, const(SDL_Rect
)*, const(void)*, int);
2338 int SDL_UpdateYUVTexture (SDL_Texture
*, const(SDL_Rect
)*, const(ubyte)*, int, const(ubyte)*, int, const(ubyte)*, int);
2339 int SDL_LockTexture (SDL_Texture
*, const(SDL_Rect
)*, void**, int*);
2340 int SDL_UnlockTexture (SDL_Texture
*);
2341 SDL_bool
SDL_RenderTargetSupported (SDL_Renderer
*);
2342 int SDL_SetRenderTarget (SDL_Renderer
*, SDL_Texture
*);
2343 SDL_Texture
* SDL_GetRenderTarget (SDL_Renderer
*);
2344 int SDL_RenderSetClipRect (SDL_Renderer
*, const(SDL_Rect
)*);
2345 void SDL_RenderGetClipRect (SDL_Renderer
* renderer
, SDL_Rect
*);
2346 int SDL_RenderSetLogicalSize (SDL_Renderer
*, int, int);
2347 void SDL_RenderGetLogicalSize (SDL_Renderer
*, int*, int*);
2348 int SDL_RenderSetViewport (SDL_Renderer
*, const(SDL_Rect
)*);
2349 void SDL_RenderGetViewport (SDL_Renderer
*, SDL_Rect
*);
2350 int SDL_RenderSetScale (SDL_Renderer
*, float, float);
2351 int SDL_RenderGetScale (SDL_Renderer
*, float*, float*);
2352 int SDL_SetRenderDrawColor (SDL_Renderer
*, ubyte, ubyte, ubyte, ubyte);
2353 int SDL_GetRenderDrawColor (SDL_Renderer
*, ubyte*, ubyte*, ubyte*, ubyte*);
2354 int SDL_SetRenderDrawBlendMode (SDL_Renderer
*, SDL_BlendMode
);
2355 int SDL_GetRenderDrawBlendMode (SDL_Renderer
*, SDL_BlendMode
*);
2356 int SDL_RenderClear (SDL_Renderer
*);
2357 int SDL_RenderDrawPoint (SDL_Renderer
*, int, int);
2358 int SDL_RenderDrawPoints (SDL_Renderer
*, const(SDL_Point
)*, int);
2359 int SDL_RenderDrawLine (SDL_Renderer
*, int, int, int, int);
2360 int SDL_RenderDrawLines (SDL_Renderer
*, const(SDL_Point
)*, int);
2361 int SDL_RenderDrawRect (SDL_Renderer
*, const(SDL_Rect
)*);
2362 int SDL_RenderDrawRects (SDL_Renderer
*, const(SDL_Rect
)*, int);
2363 int SDL_RenderFillRect (SDL_Renderer
*, const(SDL_Rect
)*);
2364 int SDL_RenderFillRects (SDL_Renderer
*, const(SDL_Rect
)*, int);
2365 int SDL_RenderCopy (SDL_Renderer
*, SDL_Texture
*, const(SDL_Rect
)*, const(SDL_Rect
*));
2366 int SDL_RenderCopyEx (SDL_Renderer
*, SDL_Texture
*, const(SDL_Rect
)*, const(SDL_Rect
)*, const(double), const(SDL_Point
)*, const(SDL_RendererFlip
));
2367 int SDL_RenderReadPixels (SDL_Renderer
*, const(SDL_Rect
)*, uint, void*, int);
2368 void SDL_RenderPresent (SDL_Renderer
*);
2369 void SDL_DestroyTexture (SDL_Texture
*);
2370 void SDL_DestroyRenderer (SDL_Renderer
*);
2371 int SDL_GL_BindTexture (SDL_Texture
*, float*, float*);
2372 int SDL_GL_UnbindTexture (SDL_Texture
*);
2375 SDL_RWops
* SDL_RWFromFile (const(char)*, const(char)*);
2376 SDL_RWops
* SDL_RWFromFP (FILE
*, SDL_bool
);
2377 SDL_RWops
* SDL_RWFromMem (void*, int);
2378 SDL_RWops
* SDL_RWFromConstMem (const(void)*, int);
2379 SDL_RWops
* SDL_AllocRW ();
2380 void SDL_FreeRW (SDL_RWops
*);
2381 ubyte SDL_ReadU8 (SDL_RWops
*);
2382 ushort SDL_ReadLE16 (SDL_RWops
*);
2383 ushort SDL_ReadBE16 (SDL_RWops
*);
2384 uint SDL_ReadLE32 (SDL_RWops
*);
2385 uint SDL_ReadBE32 (SDL_RWops
*);
2386 ulong SDL_ReadLE64 (SDL_RWops
*);
2387 ulong SDL_ReadBE64 (SDL_RWops
*);
2388 usize
SDL_WriteU8 (SDL_RWops
*, ubyte);
2389 usize
SDL_WriteLE16 (SDL_RWops
*, ushort);
2390 usize
SDL_WriteBE16 (SDL_RWops
*, ushort);
2391 usize
SDL_WriteLE32 (SDL_RWops
*, uint);
2392 usize
SDL_WriteBE32 (SDL_RWops
*, uint);
2393 usize
SDL_WriteLE64 (SDL_RWops
*, ulong);
2394 usize
SDL_WriteBE64 (SDL_RWops
*, ulong);
2397 SDL_Window
* SDL_CreateShapedWindow (const(char)*, uint, uint, uint, uint, uint);
2398 SDL_bool
SDL_IsShapedWindow (const(SDL_Window
)*);
2399 int SDL_SetWindowShape (SDL_Window
*, SDL_Surface
*, SDL_WindowShapeMode
*);
2400 int SDL_GetShapedWindowMode (SDL_Window
*, SDL_WindowShapeMode
*);
2403 SDL_Surface
* SDL_CreateRGBSurface (uint, int, int, int, uint, uint, uint, uint);
2404 SDL_Surface
* SDL_CreateRGBSurfaceFrom (void*, int, int, int, int, uint, uint, uint, uint);
2405 void SDL_FreeSurface (SDL_Surface
*);
2406 int SDL_SetSurfacePalette (SDL_Surface
*, SDL_Palette
*);
2407 int SDL_LockSurface (SDL_Surface
*);
2408 int SDL_UnlockSurface (SDL_Surface
*);
2409 SDL_Surface
* SDL_LoadBMP_RW (SDL_RWops
*, int);
2410 int SDL_SaveBMP_RW (SDL_Surface
*, SDL_RWops
*, int);
2411 int SDL_SetSurfaceRLE (SDL_Surface
*, int);
2412 int SDL_SetColorKey (SDL_Surface
*, int, uint);
2413 int SDL_GetColorKey (SDL_Surface
*, uint*);
2414 int SDL_SetSurfaceColorMod (SDL_Surface
*, ubyte, ubyte, ubyte);
2415 int SDL_GetSurfaceColorMod (SDL_Surface
*, ubyte*, ubyte*, ubyte*);
2416 int SDL_SetSurfaceAlphaMod (SDL_Surface
*, ubyte);
2417 int SDL_GetSurfaceAlphaMod (SDL_Surface
*, ubyte*);
2418 int SDL_SetSurfaceBlendMode (SDL_Surface
*, SDL_BlendMode
);
2419 int SDL_GetSurfaceBlendMode (SDL_Surface
*, SDL_BlendMode
*);
2420 SDL_bool
SDL_SetClipRect (SDL_Surface
*, const(SDL_Rect
)*);
2421 void SDL_GetClipRect (SDL_Surface
*, SDL_Rect
*);
2422 SDL_Surface
* SDL_ConvertSurface (SDL_Surface
*, const(SDL_PixelFormat
)*, uint);
2423 SDL_Surface
* SDL_ConvertSurfaceFormat (SDL_Surface
*, uint, uint);
2424 int SDL_ConvertPixels (int, int, uint, const(void)*, int, uint, void*, int);
2425 int SDL_FillRect (SDL_Surface
*, const(SDL_Rect
)*, uint);
2426 int SDL_FillRects (SDL_Surface
*, const(SDL_Rect
)*, int, uint);
2427 int SDL_UpperBlit (SDL_Surface
*, const(SDL_Rect
)*, SDL_Surface
*, SDL_Rect
*);
2428 int SDL_LowerBlit (SDL_Surface
*, SDL_Rect
*, SDL_Surface
*, SDL_Rect
*);
2429 int SDL_SoftStretch (SDL_Surface
*, const(SDL_Rect
)*, SDL_Surface
*, const(SDL_Rect
)*);
2430 int SDL_UpperBlitScaled (SDL_Surface
*, const(SDL_Rect
)*, SDL_Surface
*, SDL_Rect
*);
2431 int SDL_LowerBlitScaled (SDL_Surface
*, SDL_Rect
*, SDL_Surface
*, SDL_Rect
*);
2433 alias SDL_BlitSurface
= SDL_UpperBlit
;
2434 alias SDL_BlitScaled
= SDL_UpperBlitScaled
;
2437 SDL_bool
SDL_GetWindowWMInfo (SDL_Window
* window
, SDL_SysWMinfo
* info
);
2440 uint SDL_GetTicks ();
2441 ulong SDL_GetPerformanceCounter ();
2442 ulong SDL_GetPerformanceFrequency ();
2443 void SDL_Delay (uint);
2444 SDL_TimerID
SDL_AddTimer (uint, SDL_TimerCallback
, void*);
2445 SDL_bool
SDL_RemoveTimer (SDL_TimerID
);
2448 int SDL_GetNumTouchDevices ();
2449 SDL_TouchID
SDL_GetTouchDevice (int);
2450 int SDL_GetNumTouchFingers (SDL_TouchID
);
2451 SDL_Finger
* SDL_GetTouchFinger (SDL_TouchID
, int);
2454 void SDL_GetVersion (SDL_version
*);
2455 const(char)* SDL_GetRevision ();
2456 int SDL_GetRevisionNumber ();
2459 int SDL_GetNumVideoDrivers ();
2460 const(char)* SDL_GetVideoDriver (int);
2461 int SDL_VideoInit (const(char)*);
2462 void SDL_VideoQuit ();
2463 const(char)* SDL_GetCurrentVideoDriver ();
2464 int SDL_GetNumVideoDisplays ();
2465 const(char)* SDL_GetDisplayName (int);
2466 int SDL_GetDisplayBounds (int, SDL_Rect
*);
2467 int SDL_GetNumDisplayModes (int);
2468 int SDL_GetDisplayMode (int, int, SDL_DisplayMode
*);
2469 int SDL_GetDesktopDisplayMode (int, SDL_DisplayMode
*);
2470 int SDL_GetCurrentDisplayMode (int, SDL_DisplayMode
*);
2471 SDL_DisplayMode
* SDL_GetClosestDisplayMode (int, const(SDL_DisplayMode
)*, SDL_DisplayMode
*);
2472 int SDL_GetWindowDisplayIndex (SDL_Window
*);
2473 int SDL_SetWindowDisplayMode (SDL_Window
*, const(SDL_DisplayMode
)*);
2474 int SDL_GetWindowDisplayMode (SDL_Window
*, SDL_DisplayMode
*);
2475 uint SDL_GetWindowPixelFormat (SDL_Window
*);
2476 SDL_Window
* SDL_CreateWindow (const(char)*, int, int, int, int, uint);
2477 SDL_Window
* SDL_CreateWindowFrom (const(void)*);
2478 uint SDL_GetWindowID (SDL_Window
*);
2479 SDL_Window
* SDL_GetWindowFromID (uint);
2480 uint SDL_GetWindowFlags (SDL_Window
*);
2481 void SDL_SetWindowTitle (SDL_Window
*, const(char)*);
2482 const(char)* SDL_GetWindowTitle (SDL_Window
*);
2483 void SDL_SetWindowIcon (SDL_Window
*, SDL_Surface
*);
2484 void* SDL_SetWindowData (SDL_Window
*, const(char)*, void*);
2485 void* SDL_GetWindowData (SDL_Window
*, const(char)*);
2486 void SDL_SetWindowPosition (SDL_Window
*, int, int);
2487 void SDL_GetWindowPosition (SDL_Window
*, int*, int*);
2488 void SDL_SetWindowSize (SDL_Window
*, int, int);
2489 void SDL_GetWindowSize (SDL_Window
*, int*, int*);
2490 void SDL_SetWindowMinimumSize (SDL_Window
*, int, int);
2491 void SDL_GetWindowMinimumSize (SDL_Window
*, int*, int*);
2492 void SDL_SetWindowMaximumSize (SDL_Window
*, int, int);
2493 void SDL_GetWindowMaximumSize (SDL_Window
*, int*, int*);
2494 void SDL_SetWindowBordered (SDL_Window
*, SDL_bool
);
2495 void SDL_ShowWindow (SDL_Window
*);
2496 void SDL_HideWindow (SDL_Window
*);
2497 void SDL_RaiseWindow (SDL_Window
*);
2498 void SDL_MaximizeWindow (SDL_Window
*);
2499 void SDL_MinimizeWindow (SDL_Window
*);
2500 void SDL_RestoreWindow (SDL_Window
*);
2501 int SDL_SetWindowFullscreen (SDL_Window
*, uint);
2502 SDL_Surface
* SDL_GetWindowSurface (SDL_Window
*);
2503 int SDL_UpdateWindowSurface (SDL_Window
*);
2504 int SDL_UpdateWindowSurfaceRects (SDL_Window
*, SDL_Rect
*, int);
2505 void SDL_SetWindowGrab (SDL_Window
*, SDL_bool
);
2506 SDL_bool
SDL_GetWindowGrab (SDL_Window
*);
2507 int SDL_SetWindowBrightness (SDL_Window
*, float);
2508 float SDL_GetWindowBrightness (SDL_Window
*);
2509 int SDL_SetWindowGammaRamp (SDL_Window
*, const(ushort)*, const(ushort)*, const(ushort)*, const(ushort)*);
2510 int SDL_GetWindowGammaRamp (SDL_Window
*, ushort*, ushort*, ushort*, ushort*);
2511 void SDL_DestroyWindow (SDL_Window
*);
2512 SDL_bool
SDL_IsScreenSaverEnabled ();
2513 void SDL_EnableScreenSaver ();
2514 void SDL_DisableScreenSaver ();
2515 int SDL_GL_LoadLibrary (const(char)*);
2516 void* SDL_GL_GetProcAddress (const(char)*);
2517 void SDL_GL_UnloadLibrary ();
2518 SDL_bool
SDL_GL_ExtensionSupported (const(char)*);
2519 void SDL_GL_ResetAttributes ();
2520 int SDL_GL_SetAttribute (SDL_GLattr
, int);
2521 int SDL_GL_GetAttribute (SDL_GLattr
, int*);
2522 SDL_GLContext
SDL_GL_CreateContext (SDL_Window
*);
2523 int SDL_GL_MakeCurrent (SDL_Window
*, SDL_GLContext
);
2524 SDL_Window
* SDL_GL_GetCurrentWindow ();
2525 SDL_GLContext
SDL_GL_GetCurrentContext ();
2526 void SDL_GL_GetDrawableSize (SDL_Window
*, int*, int*);
2527 int SDL_GL_SetSwapInterval (int);
2528 int SDL_GL_GetSwapInterval ();
2529 void SDL_GL_SwapWindow (SDL_Window
*);
2530 void SDL_GL_DeleteContext (SDL_GLContext
);
2533 char* SDL_GetBasePath ();
2534 char* SDL_GetPrefPath (const(char)* org
, const(char)* app
);
2536 // This function is not part of the public interface, but SDL expects it to
2537 // be called before any subsystems have been intiailized.
2539 // Normally, this happens via linking with libSDLmain, but since that
2540 // doesn't happen when using Derelict, then the loader must load this
2541 // function and call it before the load method returns. Otherwise, bad
2542 // things can happen.
2543 //private extern(C) nothrow @nogc alias da_SDL_SetMainReady = void function ();
2544 void SDL_SetMainReady ();
2550 SDL_AudioSpec
* SDL_LoadWAV (const(char)* file
, SDL_AudioSpec
* spec
, ubyte** audio_buf
, uint* len
) {
2551 return SDL_LoadWAV_RW(SDL_RWFromFile(file
, "rb"), 1, spec
, audio_buf
, len
);
2555 ubyte SDL_GetEventState (uint type
) {
2556 return SDL_EventState(type
, SDL_QUERY
);
2559 // SDL_GameController.h
2560 int SDL_GameControllerAddMappingsFromFile (const(char)* file
) {
2561 return SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile (file
, "rb"), 1);
2565 bool SDL_QuitRequested() {
2567 return SDL_PeepEvents(null, 0, SDL_PEEKEVENT
, SDL_QUIT
, SDL_QUIT
) > 0;
2571 SDL_Surface
* SDL_LoadBMP (const(char)* file
) {
2572 return SDL_LoadBMP_RW(SDL_RWFromFile (file
, "rb"), 1);
2575 int SDL_SaveBMP (SDL_Surface
* surface
, const(char)* file
) {
2576 return SDL_SaveBMP_RW(surface
, SDL_RWFromFile (file
, "wb"), 1);
2580 // SDL_init will fail if SDL_SetMainReady has not been called.
2581 // Since there's no SDL_main on the D side, it needs to be handled
2582 // manually. My understanding that this is fine on the platforms
2583 // that D is currently available on. If we ever get on to Android
2584 // or iPhone, though, this will need to be versioned.
2585 // I've wrapped it in a try/catch because it seem the function is
2586 // not always exported on Linux. See issue #153
2587 // https://github.com/aldacron/Derelict3/issues/153
2588 shared static this () {