| 1 |
/* |
| 2 |
|
| 3 |
Boost Software License - Version 1.0 - August 17th, 2003 |
| 4 |
|
| 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: |
| 11 |
|
| 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. |
| 18 |
|
| 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. |
| 26 |
|
| 27 |
*/ |
| 28 |
module derelict.sdl2.internal.sdl_dynload; |
| 29 |
|
| 30 |
public { |
| 31 |
import derelict.sdl2.internal.sdl_dynamic, |
| 32 |
derelict.sdl2.internal.sdl_types; |
| 33 |
import derelict.util.loader; |
| 34 |
} |
| 35 |
|
| 36 |
import derelict.util.exception, |
| 37 |
derelict.util.system; |
| 38 |
|
| 39 |
/* |
| 40 |
This function is not part of the public interface, but SDL expects it to be called before any subsystems have been intiailized. |
| 41 |
Normally, this happens via linking with libSDLmain, but since that doesn't happen when using Derelict, then the loader must |
| 42 |
load this function and call it before the load method returns. Otherwise, bad things can happen. |
| 43 |
*/ |
| 44 |
private extern(C) nothrow alias da_SDL_SetMainReady = void function(); |
| 45 |
|
| 46 |
class DerelictSDL2Loader : SharedLibLoader { |
| 47 |
this() { |
| 48 |
super(libNames); |
| 49 |
} |
| 50 |
|
| 51 |
protected: |
| 52 |
override void configureMinimumVersion(SharedLibVersion minVersion) |
| 53 |
{ |
| 54 |
if(minVersion.major == 2 && minVersion.minor == 0) { |
| 55 |
if(minVersion.patch == 4) { |
| 56 |
missingSymbolCallback = &allowSDL_2_0_4; |
| 57 |
} |
| 58 |
else if(minVersion.patch == 3) { |
| 59 |
missingSymbolCallback = &allowSDL_2_0_3; |
| 60 |
} |
| 61 |
else if(minVersion.patch == 2) { |
| 62 |
missingSymbolCallback = &allowSDL_2_0_2; |
| 63 |
} |
| 64 |
else if(minVersion.patch == 1) { |
| 65 |
missingSymbolCallback = &allowSDL_2_0_1; |
| 66 |
} |
| 67 |
else if(minVersion.patch == 0) { |
| 68 |
missingSymbolCallback = &allowSDL_2_0_0; |
| 69 |
} |
| 70 |
} |
| 71 |
} |
| 72 |
|
| 73 |
override void loadSymbols() |
| 74 |
{ |
| 75 |
bindFunc(cast(void**)&SDL_Init, "SDL_Init"); |
| 76 |
bindFunc(cast(void**)&SDL_InitSubSystem, "SDL_InitSubSystem"); |
| 77 |
bindFunc(cast(void**)&SDL_QuitSubSystem, "SDL_QuitSubSystem"); |
| 78 |
bindFunc(cast(void**)&SDL_WasInit, "SDL_WasInit"); |
| 79 |
bindFunc(cast(void**)&SDL_Quit, "SDL_Quit"); |
| 80 |
bindFunc(cast(void**)&SDL_free, "SDL_free"); |
| 81 |
bindFunc(cast(void**)&SDL_SetAssertionHandler, "SDL_SetAssertionHandler"); |
| 82 |
bindFunc(cast(void**)&SDL_GetDefaultAssertionHandler, "SDL_GetDefaultAssertionHandler"); |
| 83 |
bindFunc(cast(void**)&SDL_GetAssertionHandler, "SDL_GetAssertionHandler"); |
| 84 |
bindFunc(cast(void**)&SDL_GetAssertionReport, "SDL_GetAssertionReport"); |
| 85 |
bindFunc(cast(void**)&SDL_ResetAssertionReport, "SDL_ResetAssertionReport"); |
| 86 |
bindFunc(cast(void**)&SDL_GetNumAudioDrivers, "SDL_GetNumAudioDrivers"); |
| 87 |
bindFunc(cast(void**)&SDL_GetAudioDriver, "SDL_GetAudioDriver"); |
| 88 |
bindFunc(cast(void**)&SDL_AudioInit, "SDL_AudioInit"); |
| 89 |
bindFunc(cast(void**)&SDL_AudioQuit, "SDL_AudioQuit"); |
| 90 |
bindFunc(cast(void**)&SDL_GetCurrentAudioDriver, "SDL_GetCurrentAudioDriver"); |
| 91 |
bindFunc(cast(void**)&SDL_OpenAudio, "SDL_OpenAudio"); |
| 92 |
bindFunc(cast(void**)&SDL_GetNumAudioDevices, "SDL_GetNumAudioDevices"); |
| 93 |
bindFunc(cast(void**)&SDL_GetAudioDeviceName, "SDL_GetAudioDeviceName"); |
| 94 |
bindFunc(cast(void**)&SDL_OpenAudioDevice, "SDL_OpenAudioDevice"); |
| 95 |
bindFunc(cast(void**)&SDL_GetAudioStatus, "SDL_GetAudioStatus"); |
| 96 |
bindFunc(cast(void**)&SDL_GetAudioDeviceStatus, "SDL_GetAudioDeviceStatus"); |
| 97 |
bindFunc(cast(void**)&SDL_PauseAudio, "SDL_PauseAudio"); |
| 98 |
bindFunc(cast(void**)&SDL_PauseAudioDevice, "SDL_PauseAudioDevice"); |
| 99 |
bindFunc(cast(void**)&SDL_LoadWAV_RW, "SDL_LoadWAV_RW"); |
| 100 |
bindFunc(cast(void**)&SDL_FreeWAV, "SDL_FreeWAV"); |
| 101 |
bindFunc(cast(void**)&SDL_BuildAudioCVT, "SDL_BuildAudioCVT"); |
| 102 |
bindFunc(cast(void**)&SDL_ConvertAudio, "SDL_ConvertAudio"); |
| 103 |
bindFunc(cast(void**)&SDL_MixAudio, "SDL_MixAudio"); |
| 104 |
bindFunc(cast(void**)&SDL_MixAudioFormat, "SDL_MixAudioFormat"); |
| 105 |
bindFunc(cast(void**)&SDL_QueueAudio, "SDL_QueueAudio"); |
| 106 |
bindFunc(cast(void**)&SDL_DequeueAudio, "SDL_DequeueAudio"); |
| 107 |
bindFunc(cast(void**)&SDL_GetQueuedAudioSize, "SDL_GetQueuedAudioSize"); |
| 108 |
bindFunc(cast(void**)&SDL_ClearQueuedAudio, "SDL_ClearQueuedAudio"); |
| 109 |
bindFunc(cast(void**)&SDL_LockAudio, "SDL_LockAudio"); |
| 110 |
bindFunc(cast(void**)&SDL_LockAudioDevice, "SDL_LockAudioDevice"); |
| 111 |
bindFunc(cast(void**)&SDL_UnlockAudio, "SDL_UnlockAudio"); |
| 112 |
bindFunc(cast(void**)&SDL_UnlockAudioDevice, "SDL_UnlockAudioDevice"); |
| 113 |
bindFunc(cast(void**)&SDL_CloseAudio, "SDL_CloseAudio"); |
| 114 |
bindFunc(cast(void**)&SDL_CloseAudioDevice, "SDL_CloseAudioDevice"); |
| 115 |
//bindFunc(cast(void**)&SDL_AudioDeviceConnected, "SDL_AudioDeviceConnected"); |
| 116 |
bindFunc(cast(void**)&SDL_SetClipboardText, "SDL_SetClipboardText"); |
| 117 |
bindFunc(cast(void**)&SDL_GetClipboardText, "SDL_GetClipboardText"); |
| 118 |
bindFunc(cast(void**)&SDL_HasClipboardText, "SDL_HasClipboardText"); |
| 119 |
bindFunc(cast(void**)&SDL_GetCPUCount, "SDL_GetCPUCount"); |
| 120 |
bindFunc(cast(void**)&SDL_GetCPUCacheLineSize, "SDL_GetCPUCacheLineSize"); |
| 121 |
bindFunc(cast(void**)&SDL_HasRDTSC, "SDL_HasRDTSC"); |
| 122 |
bindFunc(cast(void**)&SDL_HasAltiVec, "SDL_HasAltiVec"); |
| 123 |
bindFunc(cast(void**)&SDL_HasMMX, "SDL_HasMMX"); |
| 124 |
bindFunc(cast(void**)&SDL_Has3DNow, "SDL_Has3DNow"); |
| 125 |
bindFunc(cast(void**)&SDL_HasSSE, "SDL_HasSSE"); |
| 126 |
bindFunc(cast(void**)&SDL_HasSSE2, "SDL_HasSSE2"); |
| 127 |
bindFunc(cast(void**)&SDL_HasSSE3, "SDL_HasSSE3"); |
| 128 |
bindFunc(cast(void**)&SDL_HasSSE41, "SDL_HasSSE41"); |
| 129 |
bindFunc(cast(void**)&SDL_HasSSE42, "SDL_HasSSE42"); |
| 130 |
bindFunc(cast(void**)&SDL_HasAVX, "SDL_HasAVX"); |
| 131 |
bindFunc(cast(void**)&SDL_HasAVX2, "SDL_HasAVX2"); |
| 132 |
bindFunc(cast(void**)&SDL_GetSystemRAM, "SDL_GetSystemRAM"); |
| 133 |
bindFunc(cast(void**)&SDL_SetError, "SDL_SetError"); |
| 134 |
bindFunc(cast(void**)&SDL_GetError, "SDL_GetError"); |
| 135 |
bindFunc(cast(void**)&SDL_ClearError, "SDL_ClearError"); |
| 136 |
bindFunc(cast(void**)&SDL_PumpEvents, "SDL_PumpEvents"); |
| 137 |
bindFunc(cast(void**)&SDL_PeepEvents, "SDL_PeepEvents"); |
| 138 |
bindFunc(cast(void**)&SDL_HasEvent, "SDL_HasEvent"); |
| 139 |
bindFunc(cast(void**)&SDL_HasEvents, "SDL_HasEvents"); |
| 140 |
bindFunc(cast(void**)&SDL_FlushEvent, "SDL_FlushEvent"); |
| 141 |
bindFunc(cast(void**)&SDL_FlushEvents, "SDL_FlushEvents"); |
| 142 |
bindFunc(cast(void**)&SDL_PollEvent, "SDL_PollEvent"); |
| 143 |
bindFunc(cast(void**)&SDL_WaitEvent, "SDL_WaitEvent"); |
| 144 |
bindFunc(cast(void**)&SDL_WaitEventTimeout, "SDL_WaitEventTimeout"); |
| 145 |
bindFunc(cast(void**)&SDL_PushEvent, "SDL_PushEvent"); |
| 146 |
bindFunc(cast(void**)&SDL_SetEventFilter, "SDL_SetEventFilter"); |
| 147 |
bindFunc(cast(void**)&SDL_GetEventFilter, "SDL_GetEventFilter"); |
| 148 |
bindFunc(cast(void**)&SDL_AddEventWatch, "SDL_AddEventWatch"); |
| 149 |
bindFunc(cast(void**)&SDL_DelEventWatch, "SDL_DelEventWatch"); |
| 150 |
bindFunc(cast(void**)&SDL_FilterEvents, "SDL_FilterEvents"); |
| 151 |
bindFunc(cast(void**)&SDL_EventState, "SDL_EventState"); |
| 152 |
bindFunc(cast(void**)&SDL_RegisterEvents, "SDL_RegisterEvents"); |
| 153 |
bindFunc(cast(void**)&SDL_GetBasePath, "SDL_GetBasePath"); |
| 154 |
bindFunc(cast(void**)&SDL_GetPrefPath, "SDL_GetPrefPath"); |
| 155 |
bindFunc(cast(void**)&SDL_GameControllerAddMappingsFromRW, "SDL_GameControllerAddMappingsFromRW"); |
| 156 |
bindFunc(cast(void**)&SDL_GameControllerAddMapping, "SDL_GameControllerAddMapping"); |
| 157 |
bindFunc(cast(void**)&SDL_GameControllerMappingForGUID, "SDL_GameControllerMappingForGUID"); |
| 158 |
bindFunc(cast(void**)&SDL_GameControllerMapping, "SDL_GameControllerMapping"); |
| 159 |
bindFunc(cast(void**)&SDL_IsGameController, "SDL_IsGameController"); |
| 160 |
bindFunc(cast(void**)&SDL_GameControllerNameForIndex, "SDL_GameControllerNameForIndex"); |
| 161 |
bindFunc(cast(void**)&SDL_GameControllerOpen, "SDL_GameControllerOpen"); |
| 162 |
bindFunc(cast(void**)&SDL_GameControllerFromInstanceID, "SDL_GameControllerFromInstanceID"); |
| 163 |
bindFunc(cast(void**)&SDL_GameControllerName, "SDL_GameControllerName"); |
| 164 |
bindFunc(cast(void**)&SDL_GameControllerGetAttached, "SDL_GameControllerGetAttached"); |
| 165 |
bindFunc(cast(void**)&SDL_GameControllerGetJoystick, "SDL_GameControllerGetJoystick"); |
| 166 |
bindFunc(cast(void**)&SDL_GameControllerEventState, "SDL_GameControllerEventState"); |
| 167 |
bindFunc(cast(void**)&SDL_GameControllerUpdate, "SDL_GameControllerUpdate"); |
| 168 |
bindFunc(cast(void**)&SDL_GameControllerGetAxisFromString, "SDL_GameControllerGetAxisFromString"); |
| 169 |
bindFunc(cast(void**)&SDL_GameControllerGetStringForAxis, "SDL_GameControllerGetStringForAxis"); |
| 170 |
bindFunc(cast(void**)&SDL_GameControllerGetBindForAxis, "SDL_GameControllerGetBindForAxis"); |
| 171 |
bindFunc(cast(void**)&SDL_GameControllerGetAxis, "SDL_GameControllerGetAxis"); |
| 172 |
bindFunc(cast(void**)&SDL_GameControllerGetButtonFromString, "SDL_GameControllerGetButtonFromString"); |
| 173 |
bindFunc(cast(void**)&SDL_GameControllerGetStringForButton, "SDL_GameControllerGetStringForButton"); |
| 174 |
bindFunc(cast(void**)&SDL_GameControllerGetBindForButton, "SDL_GameControllerGetBindForButton"); |
| 175 |
bindFunc(cast(void**)&SDL_GameControllerGetButton, "SDL_GameControllerGetButton"); |
| 176 |
bindFunc(cast(void**)&SDL_GameControllerClose, "SDL_GameControllerClose"); |
| 177 |
bindFunc(cast(void**)&SDL_RecordGesture, "SDL_RecordGesture"); |
| 178 |
bindFunc(cast(void**)&SDL_SaveAllDollarTemplates, "SDL_SaveAllDollarTemplates"); |
| 179 |
bindFunc(cast(void**)&SDL_SaveDollarTemplate, "SDL_SaveDollarTemplate"); |
| 180 |
bindFunc(cast(void**)&SDL_LoadDollarTemplates, "SDL_LoadDollarTemplates"); |
| 181 |
bindFunc(cast(void**)&SDL_NumHaptics, "SDL_NumHaptics"); |
| 182 |
bindFunc(cast(void**)&SDL_HapticName, "SDL_HapticName"); |
| 183 |
bindFunc(cast(void**)&SDL_HapticOpen, "SDL_HapticOpen"); |
| 184 |
bindFunc(cast(void**)&SDL_HapticOpened, "SDL_HapticOpened"); |
| 185 |
bindFunc(cast(void**)&SDL_HapticIndex, "SDL_HapticIndex"); |
| 186 |
bindFunc(cast(void**)&SDL_MouseIsHaptic, "SDL_MouseIsHaptic"); |
| 187 |
bindFunc(cast(void**)&SDL_HapticOpenFromMouse, "SDL_HapticOpenFromMouse"); |
| 188 |
bindFunc(cast(void**)&SDL_JoystickIsHaptic, "SDL_JoystickIsHaptic"); |
| 189 |
bindFunc(cast(void**)&SDL_HapticOpenFromJoystick, "SDL_HapticOpenFromJoystick"); |
| 190 |
bindFunc(cast(void**)&SDL_HapticClose, "SDL_HapticClose"); |
| 191 |
bindFunc(cast(void**)&SDL_HapticNumEffects, "SDL_HapticNumEffects"); |
| 192 |
bindFunc(cast(void**)&SDL_HapticNumEffectsPlaying, "SDL_HapticNumEffectsPlaying"); |
| 193 |
bindFunc(cast(void**)&SDL_HapticQuery, "SDL_HapticQuery"); |
| 194 |
bindFunc(cast(void**)&SDL_HapticNumAxes, "SDL_HapticNumAxes"); |
| 195 |
bindFunc(cast(void**)&SDL_HapticEffectSupported, "SDL_HapticEffectSupported"); |
| 196 |
bindFunc(cast(void**)&SDL_HapticNewEffect, "SDL_HapticNewEffect"); |
| 197 |
bindFunc(cast(void**)&SDL_HapticUpdateEffect, "SDL_HapticUpdateEffect"); |
| 198 |
bindFunc(cast(void**)&SDL_HapticRunEffect, "SDL_HapticRunEffect"); |
| 199 |
bindFunc(cast(void**)&SDL_HapticStopEffect, "SDL_HapticStopEffect"); |
| 200 |
bindFunc(cast(void**)&SDL_HapticDestroyEffect, "SDL_HapticDestroyEffect"); |
| 201 |
bindFunc(cast(void**)&SDL_HapticGetEffectStatus, "SDL_HapticGetEffectStatus"); |
| 202 |
bindFunc(cast(void**)&SDL_HapticSetGain, "SDL_HapticSetGain"); |
| 203 |
bindFunc(cast(void**)&SDL_HapticSetAutocenter, "SDL_HapticSetAutocenter"); |
| 204 |
bindFunc(cast(void**)&SDL_HapticPause, "SDL_HapticPause"); |
| 205 |
bindFunc(cast(void**)&SDL_HapticUnpause, "SDL_HapticUnpause"); |
| 206 |
bindFunc(cast(void**)&SDL_HapticStopAll, "SDL_HapticStopAll"); |
| 207 |
bindFunc(cast(void**)&SDL_HapticRumbleSupported, "SDL_HapticRumbleSupported"); |
| 208 |
bindFunc(cast(void**)&SDL_HapticRumbleInit, "SDL_HapticRumbleInit"); |
| 209 |
bindFunc(cast(void**)&SDL_HapticRumblePlay, "SDL_HapticRumblePlay"); |
| 210 |
bindFunc(cast(void**)&SDL_HapticRumbleStop, "SDL_HapticRumbleStop"); |
| 211 |
bindFunc(cast(void**)&SDL_SetHintWithPriority, "SDL_SetHintWithPriority"); |
| 212 |
bindFunc(cast(void**)&SDL_SetHint, "SDL_SetHint"); |
| 213 |
bindFunc(cast(void**)&SDL_GetHint, "SDL_GetHint"); |
| 214 |
bindFunc(cast(void**)&SDL_GetHintBoolean, "SDL_GetHintBoolean"); |
| 215 |
bindFunc(cast(void**)&SDL_AddHintCallback, "SDL_AddHintCallback"); |
| 216 |
bindFunc(cast(void**)&SDL_DelHintCallback, "SDL_DelHintCallback"); |
| 217 |
bindFunc(cast(void**)&SDL_ClearHints, "SDL_ClearHints"); |
| 218 |
bindFunc(cast(void**)&SDL_NumJoysticks, "SDL_NumJoysticks"); |
| 219 |
bindFunc(cast(void**)&SDL_JoystickNameForIndex, "SDL_JoystickNameForIndex"); |
| 220 |
bindFunc(cast(void**)&SDL_JoystickOpen, "SDL_JoystickOpen"); |
| 221 |
bindFunc(cast(void**)&SDL_JoystickName, "SDL_JoystickName"); |
| 222 |
bindFunc(cast(void**)&SDL_JoystickFromInstanceID, "SDL_JoystickFromInstanceID"); |
| 223 |
bindFunc(cast(void**)&SDL_JoystickGetDeviceGUID, "SDL_JoystickGetDeviceGUID"); |
| 224 |
bindFunc(cast(void**)&SDL_JoystickGetGUID, "SDL_JoystickGetGUID"); |
| 225 |
bindFunc(cast(void**)&SDL_JoystickGetGUIDString, "SDL_JoystickGetGUIDString"); |
| 226 |
bindFunc(cast(void**)&SDL_JoystickGetGUIDFromString, "SDL_JoystickGetGUIDFromString"); |
| 227 |
bindFunc(cast(void**)&SDL_JoystickGetAttached, "SDL_JoystickGetAttached"); |
| 228 |
bindFunc(cast(void**)&SDL_JoystickInstanceID, "SDL_JoystickInstanceID"); |
| 229 |
bindFunc(cast(void**)&SDL_JoystickNumAxes, "SDL_JoystickNumAxes"); |
| 230 |
bindFunc(cast(void**)&SDL_JoystickNumBalls, "SDL_JoystickNumBalls"); |
| 231 |
bindFunc(cast(void**)&SDL_JoystickNumHats, "SDL_JoystickNumHats"); |
| 232 |
bindFunc(cast(void**)&SDL_JoystickNumButtons, "SDL_JoystickNumButtons"); |
| 233 |
bindFunc(cast(void**)&SDL_JoystickUpdate, "SDL_JoystickUpdate"); |
| 234 |
bindFunc(cast(void**)&SDL_JoystickEventState, "SDL_JoystickEventState"); |
| 235 |
bindFunc(cast(void**)&SDL_JoystickGetAxis, "SDL_JoystickGetAxis"); |
| 236 |
bindFunc(cast(void**)&SDL_JoystickGetHat, "SDL_JoystickGetHat"); |
| 237 |
bindFunc(cast(void**)&SDL_JoystickGetBall, "SDL_JoystickGetBall"); |
| 238 |
bindFunc(cast(void**)&SDL_JoystickGetButton, "SDL_JoystickGetButton"); |
| 239 |
bindFunc(cast(void**)&SDL_JoystickClose, "SDL_JoystickClose"); |
| 240 |
bindFunc(cast(void**)&SDL_JoystickCurrentPowerLevel, "SDL_JoystickCurrentPowerLevel"); |
| 241 |
bindFunc(cast(void**)&SDL_GetKeyboardFocus, "SDL_GetKeyboardFocus"); |
| 242 |
bindFunc(cast(void**)&SDL_GetKeyboardState, "SDL_GetKeyboardState"); |
| 243 |
bindFunc(cast(void**)&SDL_GetModState, "SDL_GetModState"); |
| 244 |
bindFunc(cast(void**)&SDL_SetModState, "SDL_SetModState"); |
| 245 |
bindFunc(cast(void**)&SDL_GetKeyFromScancode, "SDL_GetKeyFromScancode"); |
| 246 |
bindFunc(cast(void**)&SDL_GetScancodeFromKey, "SDL_GetScancodeFromKey"); |
| 247 |
bindFunc(cast(void**)&SDL_GetScancodeName, "SDL_GetScancodeName"); |
| 248 |
bindFunc(cast(void**)&SDL_GetScancodeFromName, "SDL_GetScancodeFromName"); |
| 249 |
bindFunc(cast(void**)&SDL_GetKeyName, "SDL_GetKeyName"); |
| 250 |
bindFunc(cast(void**)&SDL_GetKeyFromName, "SDL_GetKeyFromName"); |
| 251 |
bindFunc(cast(void**)&SDL_StartTextInput, "SDL_StartTextInput"); |
| 252 |
bindFunc(cast(void**)&SDL_IsTextInputActive, "SDL_IsTextInputActive"); |
| 253 |
bindFunc(cast(void**)&SDL_StopTextInput, "SDL_StopTextInput"); |
| 254 |
bindFunc(cast(void**)&SDL_SetTextInputRect, "SDL_SetTextInputRect"); |
| 255 |
bindFunc(cast(void**)&SDL_HasScreenKeyboardSupport, "SDL_HasScreenKeyboardSupport"); |
| 256 |
bindFunc(cast(void**)&SDL_IsScreenKeyboardShown, "SDL_IsScreenKeyboardShown"); |
| 257 |
bindFunc(cast(void**)&SDL_LoadObject, "SDL_LoadObject"); |
| 258 |
bindFunc(cast(void**)&SDL_LoadFunction, "SDL_LoadFunction"); |
| 259 |
bindFunc(cast(void**)&SDL_UnloadObject, "SDL_UnloadObject"); |
| 260 |
bindFunc(cast(void**)&SDL_LogSetAllPriority, "SDL_LogSetAllPriority"); |
| 261 |
bindFunc(cast(void**)&SDL_LogSetPriority, "SDL_LogSetPriority"); |
| 262 |
bindFunc(cast(void**)&SDL_LogGetPriority, "SDL_LogGetPriority"); |
| 263 |
bindFunc(cast(void**)&SDL_LogResetPriorities, "SDL_LogResetPriorities"); |
| 264 |
bindFunc(cast(void**)&SDL_Log, "SDL_Log"); |
| 265 |
bindFunc(cast(void**)&SDL_LogVerbose, "SDL_LogVerbose"); |
| 266 |
bindFunc(cast(void**)&SDL_LogDebug, "SDL_LogDebug"); |
| 267 |
bindFunc(cast(void**)&SDL_LogInfo, "SDL_LogInfo"); |
| 268 |
bindFunc(cast(void**)&SDL_LogWarn, "SDL_LogWarn"); |
| 269 |
bindFunc(cast(void**)&SDL_LogError, "SDL_LogError"); |
| 270 |
bindFunc(cast(void**)&SDL_LogCritical, "SDL_LogCritical"); |
| 271 |
bindFunc(cast(void**)&SDL_LogMessage, "SDL_LogMessage"); |
| 272 |
bindFunc(cast(void**)&SDL_LogMessageV, "SDL_LogMessageV"); |
| 273 |
bindFunc(cast(void**)&SDL_LogGetOutputFunction, "SDL_LogGetOutputFunction"); |
| 274 |
bindFunc(cast(void**)&SDL_LogSetOutputFunction, "SDL_LogSetOutputFunction"); |
| 275 |
bindFunc(cast(void**)&SDL_ShowMessageBox, "SDL_ShowMessageBox"); |
| 276 |
bindFunc(cast(void**)&SDL_ShowSimpleMessageBox, "SDL_ShowSimpleMessageBox"); |
| 277 |
bindFunc(cast(void**)&SDL_GetMouseFocus, "SDL_GetMouseFocus"); |
| 278 |
bindFunc(cast(void**)&SDL_GetMouseState, "SDL_GetMouseState"); |
| 279 |
bindFunc(cast(void**)&SDL_GetGlobalMouseState, "SDL_GetGlobalMouseState"); |
| 280 |
bindFunc(cast(void**)&SDL_GetRelativeMouseState, "SDL_GetRelativeMouseState"); |
| 281 |
bindFunc(cast(void**)&SDL_WarpMouseInWindow, "SDL_WarpMouseInWindow"); |
| 282 |
bindFunc(cast(void**)&SDL_WarpMouseGlobal, "SDL_WarpMouseGlobal"); |
| 283 |
bindFunc(cast(void**)&SDL_SetRelativeMouseMode, "SDL_SetRelativeMouseMode"); |
| 284 |
bindFunc(cast(void**)&SDL_CaptureMouse, "SDL_CaptureMouse"); |
| 285 |
bindFunc(cast(void**)&SDL_GetRelativeMouseMode, "SDL_GetRelativeMouseMode"); |
| 286 |
bindFunc(cast(void**)&SDL_CreateCursor, "SDL_CreateCursor"); |
| 287 |
bindFunc(cast(void**)&SDL_CreateColorCursor, "SDL_CreateColorCursor"); |
| 288 |
bindFunc(cast(void**)&SDL_CreateSystemCursor, "SDL_CreateSystemCursor"); |
| 289 |
bindFunc(cast(void**)&SDL_SetCursor, "SDL_SetCursor"); |
| 290 |
bindFunc(cast(void**)&SDL_GetCursor, "SDL_GetCursor"); |
| 291 |
bindFunc(cast(void**)&SDL_GetDefaultCursor, "SDL_GetDefaultCursor"); |
| 292 |
bindFunc(cast(void**)&SDL_FreeCursor, "SDL_FreeCursor"); |
| 293 |
bindFunc(cast(void**)&SDL_ShowCursor, "SDL_ShowCursor"); |
| 294 |
bindFunc(cast(void**)&SDL_GetPixelFormatName, "SDL_GetPixelFormatName"); |
| 295 |
bindFunc(cast(void**)&SDL_PixelFormatEnumToMasks, "SDL_PixelFormatEnumToMasks"); |
| 296 |
bindFunc(cast(void**)&SDL_MasksToPixelFormatEnum, "SDL_MasksToPixelFormatEnum"); |
| 297 |
bindFunc(cast(void**)&SDL_AllocFormat, "SDL_AllocFormat"); |
| 298 |
bindFunc(cast(void**)&SDL_FreeFormat, "SDL_FreeFormat"); |
| 299 |
bindFunc(cast(void**)&SDL_AllocPalette, "SDL_AllocPalette"); |
| 300 |
bindFunc(cast(void**)&SDL_SetPixelFormatPalette, "SDL_SetPixelFormatPalette"); |
| 301 |
bindFunc(cast(void**)&SDL_SetPaletteColors, "SDL_SetPaletteColors"); |
| 302 |
bindFunc(cast(void**)&SDL_FreePalette, "SDL_FreePalette"); |
| 303 |
bindFunc(cast(void**)&SDL_MapRGB, "SDL_MapRGB"); |
| 304 |
bindFunc(cast(void**)&SDL_MapRGBA, "SDL_MapRGBA"); |
| 305 |
bindFunc(cast(void**)&SDL_GetRGB, "SDL_GetRGB"); |
| 306 |
bindFunc(cast(void**)&SDL_GetRGBA, "SDL_GetRGBA"); |
| 307 |
bindFunc(cast(void**)&SDL_CalculateGammaRamp, "SDL_CalculateGammaRamp"); |
| 308 |
bindFunc(cast(void**)&SDL_GetPlatform, "SDL_GetPlatform"); |
| 309 |
bindFunc(cast(void**)&SDL_GetPowerInfo, "SDL_GetPowerInfo"); |
| 310 |
bindFunc(cast(void**)&SDL_HasIntersection, "SDL_HasIntersection"); |
| 311 |
bindFunc(cast(void**)&SDL_IntersectRect, "SDL_IntersectRect"); |
| 312 |
bindFunc(cast(void**)&SDL_UnionRect, "SDL_UnionRect"); |
| 313 |
bindFunc(cast(void**)&SDL_EnclosePoints, "SDL_EnclosePoints"); |
| 314 |
bindFunc(cast(void**)&SDL_IntersectRectAndLine, "SDL_IntersectRectAndLine"); |
| 315 |
bindFunc(cast(void**)&SDL_GetNumRenderDrivers, "SDL_GetNumRenderDrivers"); |
| 316 |
bindFunc(cast(void**)&SDL_GetRenderDriverInfo, "SDL_GetRenderDriverInfo"); |
| 317 |
bindFunc(cast(void**)&SDL_CreateWindowAndRenderer, "SDL_CreateWindowAndRenderer"); |
| 318 |
bindFunc(cast(void**)&SDL_CreateRenderer, "SDL_CreateRenderer"); |
| 319 |
bindFunc(cast(void**)&SDL_CreateSoftwareRenderer, "SDL_CreateSoftwareRenderer"); |
| 320 |
bindFunc(cast(void**)&SDL_GetRenderer, "SDL_GetRenderer"); |
| 321 |
bindFunc(cast(void**)&SDL_GetRendererInfo, "SDL_GetRendererInfo"); |
| 322 |
bindFunc(cast(void**)&SDL_GetRendererOutputSize, "SDL_GetRendererOutputSize"); |
| 323 |
bindFunc(cast(void**)&SDL_CreateTexture, "SDL_CreateTexture"); |
| 324 |
bindFunc(cast(void**)&SDL_CreateTextureFromSurface, "SDL_CreateTextureFromSurface"); |
| 325 |
bindFunc(cast(void**)&SDL_QueryTexture, "SDL_QueryTexture"); |
| 326 |
bindFunc(cast(void**)&SDL_SetTextureColorMod, "SDL_SetTextureColorMod"); |
| 327 |
bindFunc(cast(void**)&SDL_GetTextureColorMod, "SDL_GetTextureColorMod"); |
| 328 |
bindFunc(cast(void**)&SDL_SetTextureAlphaMod, "SDL_SetTextureAlphaMod"); |
| 329 |
bindFunc(cast(void**)&SDL_GetTextureAlphaMod, "SDL_GetTextureAlphaMod"); |
| 330 |
bindFunc(cast(void**)&SDL_SetTextureBlendMode, "SDL_SetTextureBlendMode"); |
| 331 |
bindFunc(cast(void**)&SDL_GetTextureBlendMode, "SDL_GetTextureBlendMode"); |
| 332 |
bindFunc(cast(void**)&SDL_UpdateTexture, "SDL_UpdateTexture"); |
| 333 |
bindFunc(cast(void**)&SDL_UpdateYUVTexture, "SDL_UpdateYUVTexture"); |
| 334 |
bindFunc(cast(void**)&SDL_LockTexture, "SDL_LockTexture"); |
| 335 |
bindFunc(cast(void**)&SDL_UnlockTexture, "SDL_UnlockTexture"); |
| 336 |
bindFunc(cast(void**)&SDL_RenderTargetSupported, "SDL_RenderTargetSupported"); |
| 337 |
bindFunc(cast(void**)&SDL_SetRenderTarget, "SDL_SetRenderTarget"); |
| 338 |
bindFunc(cast(void**)&SDL_GetRenderTarget, "SDL_GetRenderTarget"); |
| 339 |
bindFunc(cast(void**)&SDL_RenderSetClipRect, "SDL_RenderSetClipRect"); |
| 340 |
bindFunc(cast(void**)&SDL_RenderGetClipRect, "SDL_RenderGetClipRect"); |
| 341 |
bindFunc(cast(void**)&SDL_RenderSetLogicalSize, "SDL_RenderSetLogicalSize"); |
| 342 |
bindFunc(cast(void**)&SDL_RenderGetLogicalSize, "SDL_RenderGetLogicalSize"); |
| 343 |
bindFunc(cast(void**)&SDL_RenderSetIntegerScale, "SDL_RenderSetIntegerScale"); |
| 344 |
bindFunc(cast(void**)&SDL_RenderGetIntegerScale, "SDL_RenderGetIntegerScale"); |
| 345 |
bindFunc(cast(void**)&SDL_RenderSetViewport, "SDL_RenderSetViewport"); |
| 346 |
bindFunc(cast(void**)&SDL_RenderGetViewport, "SDL_RenderGetViewport"); |
| 347 |
bindFunc(cast(void**)&SDL_RenderIsClipEnabled, "SDL_RenderIsClipEnabled"); |
| 348 |
bindFunc(cast(void**)&SDL_RenderSetScale, "SDL_RenderSetScale"); |
| 349 |
bindFunc(cast(void**)&SDL_RenderGetScale, "SDL_RenderGetScale"); |
| 350 |
bindFunc(cast(void**)&SDL_SetRenderDrawColor, "SDL_SetRenderDrawColor"); |
| 351 |
bindFunc(cast(void**)&SDL_GetRenderDrawColor, "SDL_GetRenderDrawColor"); |
| 352 |
bindFunc(cast(void**)&SDL_SetRenderDrawBlendMode, "SDL_SetRenderDrawBlendMode"); |
| 353 |
bindFunc(cast(void**)&SDL_GetRenderDrawBlendMode, "SDL_GetRenderDrawBlendMode"); |
| 354 |
bindFunc(cast(void**)&SDL_RenderClear, "SDL_RenderClear"); |
| 355 |
bindFunc(cast(void**)&SDL_RenderDrawPoint, "SDL_RenderDrawPoint"); |
| 356 |
bindFunc(cast(void**)&SDL_RenderDrawPoints, "SDL_RenderDrawPoints"); |
| 357 |
bindFunc(cast(void**)&SDL_RenderDrawLine, "SDL_RenderDrawLine"); |
| 358 |
bindFunc(cast(void**)&SDL_RenderDrawLines, "SDL_RenderDrawLines"); |
| 359 |
bindFunc(cast(void**)&SDL_RenderDrawRect, "SDL_RenderDrawRect"); |
| 360 |
bindFunc(cast(void**)&SDL_RenderDrawRects, "SDL_RenderDrawRects"); |
| 361 |
bindFunc(cast(void**)&SDL_RenderFillRect, "SDL_RenderFillRect"); |
| 362 |
bindFunc(cast(void**)&SDL_RenderFillRects, "SDL_RenderFillRects"); |
| 363 |
bindFunc(cast(void**)&SDL_RenderCopy, "SDL_RenderCopy"); |
| 364 |
bindFunc(cast(void**)&SDL_RenderCopyEx, "SDL_RenderCopyEx"); |
| 365 |
bindFunc(cast(void**)&SDL_RenderReadPixels, "SDL_RenderReadPixels"); |
| 366 |
bindFunc(cast(void**)&SDL_RenderPresent, "SDL_RenderPresent"); |
| 367 |
bindFunc(cast(void**)&SDL_DestroyTexture, "SDL_DestroyTexture"); |
| 368 |
bindFunc(cast(void**)&SDL_DestroyRenderer, "SDL_DestroyRenderer"); |
| 369 |
bindFunc(cast(void**)&SDL_GL_BindTexture, "SDL_GL_BindTexture"); |
| 370 |
bindFunc(cast(void**)&SDL_GL_UnbindTexture, "SDL_GL_UnbindTexture"); |
| 371 |
bindFunc(cast(void**)&SDL_RWFromFile, "SDL_RWFromFile"); |
| 372 |
bindFunc(cast(void**)&SDL_RWFromFP, "SDL_RWFromFP"); |
| 373 |
bindFunc(cast(void**)&SDL_RWFromMem, "SDL_RWFromMem"); |
| 374 |
bindFunc(cast(void**)&SDL_RWFromConstMem, "SDL_RWFromConstMem"); |
| 375 |
bindFunc(cast(void**)&SDL_AllocRW, "SDL_AllocRW"); |
| 376 |
bindFunc(cast(void**)&SDL_FreeRW, "SDL_FreeRW"); |
| 377 |
bindFunc(cast(void**)&SDL_ReadU8, "SDL_ReadU8"); |
| 378 |
bindFunc(cast(void**)&SDL_ReadLE16, "SDL_ReadLE16"); |
| 379 |
bindFunc(cast(void**)&SDL_ReadBE16, "SDL_ReadBE16"); |
| 380 |
bindFunc(cast(void**)&SDL_ReadLE32, "SDL_ReadLE32"); |
| 381 |
bindFunc(cast(void**)&SDL_ReadBE32, "SDL_ReadBE32"); |
| 382 |
bindFunc(cast(void**)&SDL_ReadLE64, "SDL_ReadLE64"); |
| 383 |
bindFunc(cast(void**)&SDL_ReadBE64, "SDL_ReadBE64"); |
| 384 |
bindFunc(cast(void**)&SDL_WriteU8, "SDL_WriteU8"); |
| 385 |
bindFunc(cast(void**)&SDL_WriteLE16, "SDL_WriteLE16"); |
| 386 |
bindFunc(cast(void**)&SDL_WriteBE16, "SDL_WriteBE16"); |
| 387 |
bindFunc(cast(void**)&SDL_WriteLE32, "SDL_WriteLE32"); |
| 388 |
bindFunc(cast(void**)&SDL_WriteBE32, "SDL_WriteBE32"); |
| 389 |
bindFunc(cast(void**)&SDL_WriteLE64, "SDL_WriteLE64"); |
| 390 |
bindFunc(cast(void**)&SDL_WriteBE64, "SDL_WriteBE64"); |
| 391 |
bindFunc(cast(void**)&SDL_CreateShapedWindow, "SDL_CreateShapedWindow"); |
| 392 |
bindFunc(cast(void**)&SDL_IsShapedWindow, "SDL_IsShapedWindow"); |
| 393 |
bindFunc(cast(void**)&SDL_SetWindowShape, "SDL_SetWindowShape"); |
| 394 |
bindFunc(cast(void**)&SDL_GetShapedWindowMode, "SDL_GetShapedWindowMode"); |
| 395 |
bindFunc(cast(void**)&SDL_CreateRGBSurface, "SDL_CreateRGBSurface"); |
| 396 |
bindFunc(cast(void**)&SDL_CreateRGBSurfaceWithFormat, "SDL_CreateRGBSurfaceWithFormat"); |
| 397 |
bindFunc(cast(void**)&SDL_CreateRGBSurfaceFrom, "SDL_CreateRGBSurfaceFrom"); |
| 398 |
bindFunc(cast(void**)&SDL_CreateRGBSurfaceWithFormatFrom, "SDL_CreateRGBSurfaceWithFormatFrom"); |
| 399 |
bindFunc(cast(void**)&SDL_FreeSurface, "SDL_FreeSurface"); |
| 400 |
bindFunc(cast(void**)&SDL_SetSurfacePalette, "SDL_SetSurfacePalette"); |
| 401 |
bindFunc(cast(void**)&SDL_LockSurface, "SDL_LockSurface"); |
| 402 |
bindFunc(cast(void**)&SDL_UnlockSurface, "SDL_UnlockSurface"); |
| 403 |
bindFunc(cast(void**)&SDL_LoadBMP_RW, "SDL_LoadBMP_RW"); |
| 404 |
bindFunc(cast(void**)&SDL_SaveBMP_RW, "SDL_SaveBMP_RW"); |
| 405 |
bindFunc(cast(void**)&SDL_SetSurfaceRLE, "SDL_SetSurfaceRLE"); |
| 406 |
bindFunc(cast(void**)&SDL_SetColorKey, "SDL_SetColorKey"); |
| 407 |
bindFunc(cast(void**)&SDL_GetColorKey, "SDL_GetColorKey"); |
| 408 |
bindFunc(cast(void**)&SDL_SetSurfaceColorMod, "SDL_SetSurfaceColorMod"); |
| 409 |
bindFunc(cast(void**)&SDL_GetSurfaceColorMod, "SDL_GetSurfaceColorMod"); |
| 410 |
bindFunc(cast(void**)&SDL_SetSurfaceAlphaMod, "SDL_SetSurfaceAlphaMod"); |
| 411 |
bindFunc(cast(void**)&SDL_GetSurfaceAlphaMod, "SDL_GetSurfaceAlphaMod"); |
| 412 |
bindFunc(cast(void**)&SDL_SetSurfaceBlendMode, "SDL_SetSurfaceBlendMode"); |
| 413 |
bindFunc(cast(void**)&SDL_GetSurfaceBlendMode, "SDL_GetSurfaceBlendMode"); |
| 414 |
bindFunc(cast(void**)&SDL_SetClipRect, "SDL_SetClipRect"); |
| 415 |
bindFunc(cast(void**)&SDL_GetClipRect, "SDL_GetClipRect"); |
| 416 |
bindFunc(cast(void**)&SDL_ConvertSurface, "SDL_ConvertSurface"); |
| 417 |
bindFunc(cast(void**)&SDL_ConvertSurfaceFormat, "SDL_ConvertSurfaceFormat"); |
| 418 |
bindFunc(cast(void**)&SDL_ConvertPixels, "SDL_ConvertPixels"); |
| 419 |
bindFunc(cast(void**)&SDL_FillRect, "SDL_FillRect"); |
| 420 |
bindFunc(cast(void**)&SDL_FillRects, "SDL_FillRects"); |
| 421 |
bindFunc(cast(void**)&SDL_UpperBlit, "SDL_UpperBlit"); |
| 422 |
bindFunc(cast(void**)&SDL_LowerBlit, "SDL_LowerBlit"); |
| 423 |
bindFunc(cast(void**)&SDL_SoftStretch, "SDL_SoftStretch"); |
| 424 |
bindFunc(cast(void**)&SDL_UpperBlitScaled, "SDL_UpperBlitScaled"); |
| 425 |
bindFunc(cast(void**)&SDL_LowerBlitScaled, "SDL_LowerBlitScaled"); |
| 426 |
static if(Derelict_OS_Windows) { |
| 427 |
bindFunc(cast(void**)&SDL_Direct3D9GetAdapterIndex, "SDL_Direct3D9GetAdapterIndex") ; |
| 428 |
bindFunc(cast(void**)&SDL_RenderGetD3D9Device, "SDL_RenderGetD3D9Device"); |
| 429 |
bindFunc(cast(void**)&SDL_DXGIGetOutputInfo, "SDL_DXGIGetOutputInfo"); |
| 430 |
} |
| 431 |
static if(Derelict_OS_iOS) { |
| 432 |
bindFunc(cast(void**)&SDL_iPhoneSetAnimationCallback, "SDL_iPhoneSetAnimationCallback"); |
| 433 |
bindFunc(cast(void**)&SDL_iPhoneSetEventPump, "SDL_iPhoneSetEventPump"); |
| 434 |
} |
| 435 |
static if(Derelict_OS_Android) { |
| 436 |
bindFunc(cast(void**)&SDL_AndroidGetJNIEnv, "SDL_AndroidGetJNIEnv"); |
| 437 |
bindFunc(cast(void**)&SDL_AndroidGetActivity, "SDL_AndroidGetActivity"); |
| 438 |
|
| 439 |
bindFunc(cast(void**)&SDL_AndroidGetInternalStoragePath, "SDL_AndroidGetInternalStoragePath"); |
| 440 |
bindFunc(cast(void**)&SDL_AndroidGetInternalStorageState, "SDL_AndroidGetInternalStorageState"); |
| 441 |
bindFunc(cast(void**)&SDL_AndroidGetExternalStoragePath, "SDL_AndroidGetExternalStoragePath"); |
| 442 |
} |
| 443 |
static if(Derelict_OS_WinRT) { |
| 444 |
bindFunc(cast(void**)&SDL_WinRTGetFSPathUNICODE, "SDL_WinRTGetFSPathUNICODE"); |
| 445 |
bindFunc(cast(void**)&SDL_WinRTGetFSPathUTF8, "SDL_WinRTGetFSPathUTF8"); |
| 446 |
bindFunc(cast(void**)&SDL_WinRTRunApp, "SDL_WinRTRunApp"); |
| 447 |
} |
| 448 |
|
| 449 |
bindFunc(cast(void**)&SDL_GetWindowWMInfo, "SDL_GetWindowWMInfo"); |
| 450 |
bindFunc(cast(void**)&SDL_GetTicks, "SDL_GetTicks"); |
| 451 |
bindFunc(cast(void**)&SDL_GetPerformanceCounter, "SDL_GetPerformanceCounter"); |
| 452 |
bindFunc(cast(void**)&SDL_GetPerformanceFrequency, "SDL_GetPerformanceFrequency"); |
| 453 |
bindFunc(cast(void**)&SDL_Delay, "SDL_Delay"); |
| 454 |
bindFunc(cast(void**)&SDL_AddTimer, "SDL_AddTimer"); |
| 455 |
bindFunc(cast(void**)&SDL_RemoveTimer, "SDL_RemoveTimer"); |
| 456 |
bindFunc(cast(void**)&SDL_GetNumTouchDevices, "SDL_GetNumTouchDevices"); |
| 457 |
bindFunc(cast(void**)&SDL_GetTouchDevice, "SDL_GetTouchDevice"); |
| 458 |
bindFunc(cast(void**)&SDL_GetNumTouchFingers, "SDL_GetNumTouchFingers"); |
| 459 |
bindFunc(cast(void**)&SDL_GetTouchFinger, "SDL_GetTouchFinger"); |
| 460 |
bindFunc(cast(void**)&SDL_GetVersion, "SDL_GetVersion"); |
| 461 |
bindFunc(cast(void**)&SDL_GetRevision, "SDL_GetRevision"); |
| 462 |
bindFunc(cast(void**)&SDL_GetRevisionNumber, "SDL_GetRevisionNumber"); |
| 463 |
bindFunc(cast(void**)&SDL_GetNumVideoDrivers, "SDL_GetNumVideoDrivers"); |
| 464 |
bindFunc(cast(void**)&SDL_GetVideoDriver, "SDL_GetVideoDriver"); |
| 465 |
bindFunc(cast(void**)&SDL_VideoInit, "SDL_VideoInit"); |
| 466 |
bindFunc(cast(void**)&SDL_VideoQuit, "SDL_VideoQuit"); |
| 467 |
bindFunc(cast(void**)&SDL_GetCurrentVideoDriver, "SDL_GetCurrentVideoDriver"); |
| 468 |
bindFunc(cast(void**)&SDL_GetNumVideoDisplays, "SDL_GetNumVideoDisplays"); |
| 469 |
bindFunc(cast(void**)&SDL_GetDisplayName, "SDL_GetDisplayName"); |
| 470 |
bindFunc(cast(void**)&SDL_GetDisplayBounds, "SDL_GetDisplayBounds"); |
| 471 |
bindFunc(cast(void**)&SDL_GetDisplayDPI, "SDL_GetDisplayDPI"); |
| 472 |
bindFunc(cast(void**)&SDL_GetDisplayUsableBounds, "SDL_GetDisplayUsableBounds"); |
| 473 |
bindFunc(cast(void**)&SDL_GetNumDisplayModes, "SDL_GetNumDisplayModes"); |
| 474 |
bindFunc(cast(void**)&SDL_GetDisplayMode, "SDL_GetDisplayMode"); |
| 475 |
bindFunc(cast(void**)&SDL_GetDesktopDisplayMode, "SDL_GetDesktopDisplayMode"); |
| 476 |
bindFunc(cast(void**)&SDL_GetCurrentDisplayMode, "SDL_GetCurrentDisplayMode"); |
| 477 |
bindFunc(cast(void**)&SDL_GetClosestDisplayMode, "SDL_GetClosestDisplayMode"); |
| 478 |
bindFunc(cast(void**)&SDL_GetWindowDisplayIndex, "SDL_GetWindowDisplayIndex"); |
| 479 |
bindFunc(cast(void**)&SDL_SetWindowDisplayMode, "SDL_SetWindowDisplayMode"); |
| 480 |
bindFunc(cast(void**)&SDL_GetWindowDisplayMode, "SDL_GetWindowDisplayMode"); |
| 481 |
bindFunc(cast(void**)&SDL_GetWindowPixelFormat, "SDL_GetWindowPixelFormat"); |
| 482 |
bindFunc(cast(void**)&SDL_CreateWindow, "SDL_CreateWindow"); |
| 483 |
bindFunc(cast(void**)&SDL_CreateWindowFrom, "SDL_CreateWindowFrom"); |
| 484 |
bindFunc(cast(void**)&SDL_GetWindowID, "SDL_GetWindowID"); |
| 485 |
bindFunc(cast(void**)&SDL_GetWindowFromID, "SDL_GetWindowFromID"); |
| 486 |
bindFunc(cast(void**)&SDL_GetWindowFlags, "SDL_GetWindowFlags"); |
| 487 |
bindFunc(cast(void**)&SDL_SetWindowTitle, "SDL_SetWindowTitle"); |
| 488 |
bindFunc(cast(void**)&SDL_GetWindowTitle, "SDL_GetWindowTitle"); |
| 489 |
bindFunc(cast(void**)&SDL_SetWindowIcon, "SDL_SetWindowIcon"); |
| 490 |
bindFunc(cast(void**)&SDL_SetWindowData, "SDL_SetWindowData"); |
| 491 |
bindFunc(cast(void**)&SDL_GetWindowData, "SDL_GetWindowData"); |
| 492 |
bindFunc(cast(void**)&SDL_SetWindowPosition, "SDL_SetWindowPosition"); |
| 493 |
bindFunc(cast(void**)&SDL_GetWindowPosition, "SDL_GetWindowPosition"); |
| 494 |
bindFunc(cast(void**)&SDL_SetWindowSize, "SDL_SetWindowSize"); |
| 495 |
bindFunc(cast(void**)&SDL_GetWindowSize, "SDL_GetWindowSize"); |
| 496 |
bindFunc(cast(void**)&SDL_GetWindowBordersSize, "SDL_GetWindowBordersSize"); |
| 497 |
bindFunc(cast(void**)&SDL_SetWindowMinimumSize, "SDL_SetWindowMinimumSize"); |
| 498 |
bindFunc(cast(void**)&SDL_GetWindowMinimumSize, "SDL_GetWindowMinimumSize"); |
| 499 |
bindFunc(cast(void**)&SDL_SetWindowMaximumSize, "SDL_SetWindowMaximumSize"); |
| 500 |
bindFunc(cast(void**)&SDL_GetWindowMaximumSize, "SDL_GetWindowMaximumSize"); |
| 501 |
bindFunc(cast(void**)&SDL_SetWindowBordered, "SDL_SetWindowBordered"); |
| 502 |
bindFunc(cast(void**)&SDL_SetWindowResizable, "SDL_SetWindowResizable"); |
| 503 |
bindFunc(cast(void**)&SDL_ShowWindow, "SDL_ShowWindow"); |
| 504 |
bindFunc(cast(void**)&SDL_HideWindow, "SDL_HideWindow"); |
| 505 |
bindFunc(cast(void**)&SDL_RaiseWindow, "SDL_RaiseWindow"); |
| 506 |
bindFunc(cast(void**)&SDL_MaximizeWindow, "SDL_MaximizeWindow"); |
| 507 |
bindFunc(cast(void**)&SDL_MinimizeWindow, "SDL_MinimizeWindow"); |
| 508 |
bindFunc(cast(void**)&SDL_RestoreWindow, "SDL_RestoreWindow"); |
| 509 |
bindFunc(cast(void**)&SDL_SetWindowFullscreen, "SDL_SetWindowFullscreen"); |
| 510 |
bindFunc(cast(void**)&SDL_GetWindowSurface, "SDL_GetWindowSurface"); |
| 511 |
bindFunc(cast(void**)&SDL_UpdateWindowSurface, "SDL_UpdateWindowSurface"); |
| 512 |
bindFunc(cast(void**)&SDL_UpdateWindowSurfaceRects, "SDL_UpdateWindowSurfaceRects"); |
| 513 |
bindFunc(cast(void**)&SDL_SetWindowGrab, "SDL_SetWindowGrab"); |
| 514 |
bindFunc(cast(void**)&SDL_GetWindowGrab, "SDL_GetWindowGrab"); |
| 515 |
bindFunc(cast(void**)&SDL_GetGrabbedWindow, "SDL_GetGrabbedWindow"); |
| 516 |
bindFunc(cast(void**)&SDL_SetWindowBrightness, "SDL_SetWindowBrightness"); |
| 517 |
bindFunc(cast(void**)&SDL_GetWindowBrightness, "SDL_GetWindowBrightness"); |
| 518 |
bindFunc(cast(void**)&SDL_SetWindowOpacity, "SDL_SetWindowOpacity"); |
| 519 |
bindFunc(cast(void**)&SDL_GetWindowOpacity, "SDL_GetWindowOpacity"); |
| 520 |
bindFunc(cast(void**)&SDL_SetWindowModalFor, "SDL_SetWindowModalFor"); |
| 521 |
bindFunc(cast(void**)&SDL_SetWindowInputFocus, "SDL_SetWindowInputFocus"); |
| 522 |
bindFunc(cast(void**)&SDL_SetWindowGammaRamp, "SDL_SetWindowGammaRamp"); |
| 523 |
bindFunc(cast(void**)&SDL_GetWindowGammaRamp, "SDL_GetWindowGammaRamp"); |
| 524 |
bindFunc(cast(void**)&SDL_SetWindowHitTest, "SDL_SetWindowHitTest"); |
| 525 |
bindFunc(cast(void**)&SDL_DestroyWindow, "SDL_DestroyWindow"); |
| 526 |
bindFunc(cast(void**)&SDL_IsScreenSaverEnabled, "SDL_IsScreenSaverEnabled"); |
| 527 |
bindFunc(cast(void**)&SDL_EnableScreenSaver, "SDL_EnableScreenSaver"); |
| 528 |
bindFunc(cast(void**)&SDL_DisableScreenSaver, "SDL_DisableScreenSaver"); |
| 529 |
bindFunc(cast(void**)&SDL_GL_LoadLibrary, "SDL_GL_LoadLibrary"); |
| 530 |
bindFunc(cast(void**)&SDL_GL_GetProcAddress, "SDL_GL_GetProcAddress"); |
| 531 |
bindFunc(cast(void**)&SDL_GL_UnloadLibrary, "SDL_GL_UnloadLibrary"); |
| 532 |
bindFunc(cast(void**)&SDL_GL_ExtensionSupported, "SDL_GL_ExtensionSupported"); |
| 533 |
bindFunc(cast(void**)&SDL_GL_ResetAttributes, "SDL_GL_ResetAttributes"); |
| 534 |
bindFunc(cast(void**)&SDL_GL_SetAttribute, "SDL_GL_SetAttribute"); |
| 535 |
bindFunc(cast(void**)&SDL_GL_GetAttribute, "SDL_GL_GetAttribute"); |
| 536 |
bindFunc(cast(void**)&SDL_GL_CreateContext, "SDL_GL_CreateContext"); |
| 537 |
bindFunc(cast(void**)&SDL_GL_MakeCurrent, "SDL_GL_MakeCurrent"); |
| 538 |
bindFunc(cast(void**)&SDL_GL_GetCurrentWindow, "SDL_GL_GetCurrentWindow"); |
| 539 |
bindFunc(cast(void**)&SDL_GL_GetCurrentContext, "SDL_GL_GetCurrentContext"); |
| 540 |
bindFunc(cast(void**)&SDL_GL_SetSwapInterval, "SDL_GL_SetSwapInterval"); |
| 541 |
bindFunc(cast(void**)&SDL_GL_GetSwapInterval, "SDL_GL_GetSwapInterval"); |
| 542 |
bindFunc(cast(void**)&SDL_GL_SwapWindow, "SDL_GL_SwapWindow"); |
| 543 |
bindFunc(cast(void**)&SDL_GL_DeleteContext, "SDL_GL_DeleteContext"); |
| 544 |
bindFunc(cast(void**)&SDL_GL_GetDrawableSize, "SDL_GL_GetDrawableSize"); |
| 545 |
|
| 546 |
// SDL_init will fail if SDL_SetMainReady has not been called. |
| 547 |
// Since there's no SDL_main on the D side, it needs to be handled |
| 548 |
// manually. My understanding that this is fine on the platforms |
| 549 |
// that D is currently available on. If we ever get on to Android |
| 550 |
// or iPhone, though, this will need to be versioned. |
| 551 |
// I've wrapped it in a try/catch because it seem the function is |
| 552 |
// not always exported on Linux. See issue #153 |
| 553 |
// https://github.com/aldacron/Derelict3/issues/153 |
| 554 |
try { |
| 555 |
da_SDL_SetMainReady setReady; |
| 556 |
bindFunc(cast(void**)&setReady, "SDL_SetMainReady"); |
| 557 |
setReady(); |
| 558 |
} catch( DerelictException de ) {} |
| 559 |
} |
| 560 |
|
| 561 |
private: |
| 562 |
ShouldThrow allowSDL_2_0_0(string symbolName) { |
| 563 |
switch(symbolName) { |
| 564 |
// Functions added in 2.0.1 |
| 565 |
case "SDL_free": break; |
| 566 |
case "SDL_SetAssertionHandler": break; |
| 567 |
case "SDL_GetAssertionReport": break; |
| 568 |
case "SDL_ResetAssertionReport": break; |
| 569 |
case "SDL_GetSystemRAM": break; |
| 570 |
case "SDL_UpdateYUVTexture": break; |
| 571 |
case "SDL_GL_GetDrawableSize": break; |
| 572 |
case "SDL_GetBasePath": break; |
| 573 |
case "SDL_GetPrefPath": break; |
| 574 |
default: return allowSDL_2_0_1(symbolName); |
| 575 |
} |
| 576 |
return ShouldThrow.No; |
| 577 |
} |
| 578 |
|
| 579 |
ShouldThrow allowSDL_2_0_1(string symbolName) |
| 580 |
{ |
| 581 |
switch(symbolName) { |
| 582 |
// Functions added in 2.0.2 |
| 583 |
case "SDL_HasAVX": break; |
| 584 |
case "SDL_GameControllerAddMappingsFromRW": break; |
| 585 |
case "SDL_GetDefaultAssertionHandler": break; |
| 586 |
case "SDL_GetAssertionHandler": break; |
| 587 |
case "SDL_GL_ResetAttributes": break; |
| 588 |
|
| 589 |
static if(Derelict_OS_Windows) { |
| 590 |
case "SDL_Direct3D9GetAdapterIndex": break; |
| 591 |
case "SDL_RenderGetD3D9Device": break; |
| 592 |
case "SDL_DXGIGetOutputInfo": break; |
| 593 |
} else static if(Derelict_OS_iOS) { |
| 594 |
case "SDL_iPhoneSetAnimationCallback": break; |
| 595 |
case "SDL_iPhoneSetEventPump": break; |
| 596 |
} else static if(Derelict_OS_Android) { |
| 597 |
case "SDL_AndroidGetJNIEnv": break; |
| 598 |
case "SDL_AndroidGetActivity": break; |
| 599 |
case "SDL_AndroidGetInternalStoragePath": break; |
| 600 |
case "SDL_AndroidGetInternalStorageState": break; |
| 601 |
case "SDL_AndroidGetExternalStoragePath": break; |
| 602 |
} |
| 603 |
default: return allowSDL_2_0_2(symbolName); |
| 604 |
} |
| 605 |
return ShouldThrow.No; |
| 606 |
} |
| 607 |
|
| 608 |
ShouldThrow allowSDL_2_0_2(string symbolName) |
| 609 |
{ |
| 610 |
static if(Derelict_OS_WinRT) { |
| 611 |
switch(symbolName) { |
| 612 |
// Functions added in 2.0.3 |
| 613 |
static if(Derelict_OS_WinRT) { |
| 614 |
case "SDL_WinRTGetFSPathUNICODE": break; |
| 615 |
case "SDL_WinRTGetFSPathUTF8": break; |
| 616 |
case "SDL_WinRTRunApp": break; |
| 617 |
} |
| 618 |
default: return allowSDL_2_0_3(symbolName); |
| 619 |
} |
| 620 |
} |
| 621 |
return ShouldThrow.No; |
| 622 |
} |
| 623 |
|
| 624 |
ShouldThrow allowSDL_2_0_3(string symbolName) |
| 625 |
{ |
| 626 |
switch(symbolName) { |
| 627 |
// Functions added in 2.0.4 |
| 628 |
case "SDL_CaptureMouse": break; |
| 629 |
case "SDL_ClearQueuedAudio": break; |
| 630 |
case "SDL_GameControllerFromInstanceID": break; |
| 631 |
case "SDL_GetDisplayDPI": break; |
| 632 |
case "SDL_GetGlobalMouseState": break; |
| 633 |
case "SDL_GetGrabbedWindow": break; |
| 634 |
case "SDL_GetQueuedAudioSize": break; |
| 635 |
case "SDL_HasAVX2": break; |
| 636 |
case "SDL_JoystickCurrentPowerLevel": break; |
| 637 |
case "SDL_JoystickFromInstanceID": break; |
| 638 |
case "SDL_QueueAudio": break; |
| 639 |
case "SDL_RenderIsClipEnabled": break; |
| 640 |
case "SDL_SetWindowHitTest": break; |
| 641 |
case "SDL_WarpMouseGlobal": break; |
| 642 |
default: return allowSDL_2_0_4(symbolName); |
| 643 |
} |
| 644 |
return ShouldThrow.No; |
| 645 |
} |
| 646 |
|
| 647 |
ShouldThrow allowSDL_2_0_4(string symbolName) |
| 648 |
{ |
| 649 |
switch(symbolName) { |
| 650 |
// Functions added in 2.0.5 |
| 651 |
case "SDL_DequeueAudio": break; |
| 652 |
case "SDL_GetHintBoolean": break; |
| 653 |
case "SDL_RenderSetIntegerScale": break; |
| 654 |
case "SDL_RenderGetIntegerScale": break; |
| 655 |
case "SDL_CreateRGBSurfaceWithFormat": break; |
| 656 |
case "SDL_CreateRGBSurfaceWithFormatFrom": break; |
| 657 |
case "SDL_GetDisplayUsableBounds": break; |
| 658 |
case "SDL_GetWindowBordersSize": break; |
| 659 |
case "SDL_SetWindowResizable": break; |
| 660 |
case "SDL_SetWindowOpacity": break; |
| 661 |
case "SDL_GetWindowOpacity": break; |
| 662 |
case "SDL_SetWindowModalFor": break; |
| 663 |
case "SDL_SetWindowInputFocus": break; |
| 664 |
default: return ShouldThrow.Yes; |
| 665 |
} |
| 666 |
return ShouldThrow.No; |
| 667 |
} |
| 668 |
} |
| 669 |
|
| 670 |
__gshared DerelictSDL2Loader DerelictSDL2; |
| 671 |
|
| 672 |
shared static this() |
| 673 |
{ |
| 674 |
DerelictSDL2 = new DerelictSDL2Loader(); |
| 675 |
} |
| 676 |
|
| 677 |
private: |
| 678 |
static if(Derelict_OS_Windows) |
| 679 |
enum libNames = "SDL2.dll"; |
| 680 |
else static if(Derelict_OS_Mac) |
| 681 |
enum libNames = "libSDL2.dylib, /usr/local/lib/libSDL2.dylib, /usr/local/lib/libSDL2/libSDL2.dylib, ../Frameworks/SDL2.framework/SDL2, /Library/Frameworks/SDL2.framework/SDL2, /System/Library/Frameworks/SDL2.framework/SDL2, /opt/local/lib/libSDL2.dylib"; |
| 682 |
else static if(Derelict_OS_Posix) |
| 683 |
enum libNames = "libSDL2.so, libSDL2-2.0.so, libSDL2-2.0.so.0, /usr/local/lib/libSDL2.so, /usr/local/lib/libSDL2-2.0.so, /usr/local/lib/libSDL2-2.0.so.0"; |
| 684 |
else |
| 685 |
static assert(0, "Need to implement SDL2 libNames for this operating system."); |