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_static;
29 
30 import core.stdc.stdarg,
31        core.stdc.stdio;
32 import derelict.util.system;
33 import derelict.sdl2.internal.sdl_types;
34 
35 extern(C) @nogc nothrow {
36     // SDL.h
37     int SDL_Init(Uint32);
38     int SDL_InitSubSystem(Uint32);
39     void SDL_QuitSubSystem(Uint32);
40     Uint32 SDL_WasInit(Uint32);
41     void SDL_Quit();
42     void SDL_free(void* mem);
43 
44     // SDL_assert.h
45     void SDL_SetAssertionHandler(SDL_AssertionHandler,void*);
46     SDL_AssertionHandler SDL_GetDefaultAssertionHandler();
47     SDL_AssertionHandler SDL_GetAssertionHandler(void**);
48     const(SDL_assert_data)* SDL_GetAssertionReport();
49     void SDL_ResetAssertionReport();
50 
51     // SDL_audio.h
52     int SDL_GetNumAudioDrivers();
53     const(char)* SDL_GetAudioDriver(int);
54     int SDL_AudioInit(const(char)*);
55     void SDL_AudioQuit();
56     const(char)* SDL_GetCurrentAudioDriver();
57     int SDL_OpenAudio(SDL_AudioSpec*,SDL_AudioSpec*);
58     int SDL_GetNumAudioDevices(int);
59     const(char)* SDL_GetAudioDeviceName(int,int);
60     SDL_AudioDeviceID SDL_OpenAudioDevice(const(char)*,int,const(SDL_AudioSpec)*,SDL_AudioSpec*,int);
61     SDL_AudioStatus SDL_GetAudioStatus();
62     SDL_AudioStatus SDL_GetAudioDeviceStatus(SDL_AudioDeviceID);
63     void SDL_PauseAudio(int);
64     void SDL_PauseAudioDevice(SDL_AudioDeviceID,int);
65     SDL_AudioSpec* SDL_LoadWAV_RW(SDL_RWops*,int,SDL_AudioSpec*,Uint8**,Uint32*);
66     void SDL_FreeWAV(Uint8*);
67     int SDL_BuildAudioCVT(SDL_AudioCVT*,SDL_AudioFormat,Uint8,int,SDL_AudioFormat,Uint8,int);
68     int SDL_ConvertAudio(SDL_AudioCVT*);
69     void SDL_MixAudio(Uint8*,const(Uint8)*,Uint32,int);
70     void SDL_MixAudioFormat(Uint8*,const(Uint8)*,SDL_AudioFormat,Uint32,int);
71     int SDL_QueueAudio(SDL_AudioDeviceID,const(void)*,Uint32);
72     Uint32 SDL_DequeueAudio(SDL_AudioDeviceID,void*,Uint32);
73     int SDL_GetQueuedAudioSize(SDL_AudioDeviceID);
74     int SDL_ClearQueuedAudio(SDL_AudioDeviceID);
75     void SDL_LockAudio();
76     void SDL_LockAudioDevice(SDL_AudioDeviceID);
77     void SDL_UnlockAudio();
78     void SDL_UnlockAudioDevice(SDL_AudioDeviceID);
79     void SDL_CloseAudio();
80     void SDL_CloseAudioDevice(SDL_AudioDeviceID);
81     //int SDL_AudioDeviceConnected(SDL_AudioDeviceID);
82 
83     // SDL_blendmode.h
84     SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor,SDL_BlendFactor,SDL_BlendOperation,SDL_BlendFactor,SDL_BlendFactor,SDL_BlendOperation);
85 
86     // SDL_clipboard.h
87     int SDL_SetClipboardText(const(char)*);
88     char* SDL_GetClipboardText();
89     SDL_bool SDL_HasClipboardText();
90 
91     // SDL_cpuinfo.h
92     int SDL_GetCPUCount();
93     int SDL_GetCPUCacheLineSize();
94     SDL_bool SDL_HasRDTSC();
95     SDL_bool SDL_HasAltiVec();
96     SDL_bool SDL_HasMMX();
97     SDL_bool SDL_Has3DNow();
98     SDL_bool SDL_HasSSE();
99     SDL_bool SDL_HasSSE2();
100     SDL_bool SDL_HasSSE3();
101     SDL_bool SDL_HasSSE41();
102     SDL_bool SDL_HasSSE42();
103     SDL_bool SDL_HasAVX();
104     SDL_bool SDL_HasAVX2();
105     int SDL_GetSystemRAM();
106     SDL_bool SDL_HasNEON();
107 
108     // SDL_error.h
109     void SDL_SetError(const(char)*,...);
110     const(char)* SDL_GetError();
111     void SDL_ClearError();
112 
113     // SDL_events.h
114     void SDL_PumpEvents();
115     int SDL_PeepEvents(SDL_Event*,int,SDL_eventaction,Uint32,Uint32);
116     SDL_bool SDL_HasEvent(Uint32);
117     SDL_bool SDL_HasEvents(Uint32,Uint32);
118     void SDL_FlushEvent(Uint32);
119     void SDL_FlushEvents(Uint32,Uint32);
120     int SDL_PollEvent(SDL_Event*);
121     int SDL_WaitEvent(SDL_Event*);
122     int SDL_WaitEventTimeout(SDL_Event*,int);
123     int SDL_PushEvent(SDL_Event*);
124     void SDL_SetEventFilter(SDL_EventFilter,void*);
125     SDL_bool SDL_GetEventFilter(SDL_EventFilter*,void**);
126     void SDL_AddEventWatch(SDL_EventFilter,void*);
127     void SDL_DelEventWatch(SDL_EventFilter,void*);
128     void SDL_FilterEvents(SDL_EventFilter,void*);
129     Uint8 SDL_EventState(Uint32,int);
130     Uint32 SDL_RegisterEvents(int);
131 
132     // SDL_filesystem.h
133     char* SDL_GetBasePath();
134     char* SDL_GetPrefPath(const(char)* org,const(char)* app);
135 
136     // SDL_gamecontroller.h
137     int SDL_GameControllerAddMappingsFromRW(SDL_RWops*,int);
138     int SDL_GameControllerAddMapping(const(char)*);
139     int SDL_GameControllerNumMappings();
140     char* SDL_GameControllerMappingForIndex(int);
141     char* SDL_GameControllerMappingForGUID(SDL_JoystickGUID);
142     char* SDL_GameControllerMapping(SDL_GameController*);
143     SDL_bool SDL_IsGameController(int);
144     const(char)* SDL_GameControllerNameForIndex(int);
145     SDL_GameController* SDL_GameControllerOpen(int);
146     SDL_GameController* SDL_GameControllerFromInstanceID(SDL_JoystickID);
147     const(char)* SDL_GameControllerName(SDL_GameController*);
148     Uint16 GameControllerGetVendor(SDL_GameController*);
149     Uint16 SDL_GameControllerGetProduct(SDL_GameController*);
150     Uint16 SDL_GameControllerGetProductVersion(SDL_GameController*);
151     SDL_bool SDL_GameControllerGetAttached(SDL_GameController*);
152     SDL_Joystick* SDL_GameControllerGetJoystick(SDL_GameController*);
153     int SDL_GameControllerEventState(int);
154     void SDL_GameControllerUpdate();
155     SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(const(char)*);
156     const(char)* SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis);
157     SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController*,SDL_GameControllerAxis);
158     Sint16 SDL_GameControllerGetAxis(SDL_GameController*,SDL_GameControllerAxis);
159     SDL_GameControllerButton SDL_GameControllerGetButtonFromString(const(char*));
160     const(char)* SDL_GameControllerGetStringForButton(SDL_GameControllerButton);
161     SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController*,SDL_GameControllerButton);
162     Uint8 SDL_GameControllerGetButton(SDL_GameController*,SDL_GameControllerButton);
163     void SDL_GameControllerClose(SDL_GameController*);
164 
165     // SDL_gesture.h
166     int SDL_RecordGesture(SDL_TouchID);
167     int SDL_SaveAllDollarTemplates(SDL_RWops*);
168     int SDL_SaveDollarTemplate(SDL_GestureID,SDL_RWops*);
169     int SDL_LoadDollarTemplates(SDL_TouchID,SDL_RWops*);
170 
171     // SDL_haptic.h
172     int SDL_NumHaptics();
173     const(char)* SDL_HapticName(int);
174     SDL_Haptic* SDL_HapticOpen(int);
175     int SDL_HapticOpened(int);
176     int SDL_HapticIndex(SDL_Haptic*);
177     int SDL_MouseIsHaptic();
178     SDL_Haptic* SDL_HapticOpenFromMouse();
179     int SDL_JoystickIsHaptic(SDL_Joystick*);
180     SDL_Haptic* SDL_HapticOpenFromJoystick(SDL_Joystick*);
181     int SDL_HapticClose(SDL_Haptic*);
182     int SDL_HapticNumEffects(SDL_Haptic*);
183     int SDL_HapticNumEffectsPlaying(SDL_Haptic*);
184     uint SDL_HapticQuery(SDL_Haptic*);
185     int SDL_HapticNumAxes(SDL_Haptic*);
186     int SDL_HapticEffectSupported(SDL_Haptic*,SDL_HapticEffect*);
187     int SDL_HapticNewEffect(SDL_Haptic*,SDL_HapticEffect*);
188     int SDL_HapticUpdateEffect(SDL_Haptic*,int,SDL_HapticEffect*);
189     int SDL_HapticRunEffect(SDL_Haptic*,int,Uint32);
190     int SDL_HapticStopEffect(SDL_Haptic*,int);
191     int SDL_HapticDestroyEffect(SDL_Haptic*,int);
192     int SDL_HapticGetEffectStatus(SDL_Haptic*,int);
193     int SDL_HapticSetGain(SDL_Haptic*,int);
194     int SDL_HapticSetAutocenter(SDL_Haptic*,int);
195     int SDL_HapticPause(SDL_Haptic*);
196     int SDL_HapticUnpause(SDL_Haptic*);
197     int SDL_HapticStopAll(SDL_Haptic*);
198     int SDL_HapticRumbleSupported(SDL_Haptic*);
199     int SDL_HapticRumbleInit(SDL_Haptic*);
200     int SDL_HapticRumblePlay(SDL_Haptic*,float,Uint32);
201     int SDL_HapticRumbleStop(SDL_Haptic*);
202 
203     // SDL_hints.h
204     SDL_bool SDL_SetHintWithPriority(const(char)*,const(char)*,SDL_HintPriority);
205     SDL_bool SDL_SetHint(const(char)*,const(char)*);
206     const(char)* SDL_GetHint(const(char)*);
207     SDL_bool SDL_GetHintBoolean(const(char)*,SDL_bool);
208     void SDL_AddHintCallback(const(char)*,SDL_HintCallback,void*);
209     void SDL_DelHintCallback(const(char)*,SDL_HintCallback,void*);
210     void SDL_ClearHints();
211 
212     // SDL_joystick.h
213     int SDL_NumJoysticks();
214     const(char)* SDL_JoystickNameForIndex(int);
215     SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int);
216     Uint16 SDL_JoystickGetDeviceVendor(int);
217     Uint16 SDL_JoystickGetDeviceProduct(int);
218     Uint16 SDL_JoystickGetDeviceProductVersion(int);
219     SDL_JoystickType SDL_JoystickGetDeviceType(int);
220     SDL_JoystickID SDL_JoystickGetDeviceInstanceID(int);
221     SDL_Joystick* SDL_JoystickOpen(int);
222     SDL_Joystick* SDL_JoystickFromInstanceID(SDL_JoystickID);
223     const(char)* SDL_JoystickName(SDL_Joystick*);
224     SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick*);
225     Uint16 SDL_JoystickGetVendor(SDL_Joystick*);
226     Uint16 SDL_JoystickGetProduct(SDL_Joystick*);
227     Uint16 SDL_JoystickGetProductVersion(SDL_Joystick*);
228     SDL_JoystickType SDL_JoystickGetType(SDL_Joystick*);
229     char* SDL_JoystickGetGUIDString(SDL_JoystickGUID);
230     SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const(char)*);
231     SDL_bool SDL_JoystickGetAttached(SDL_Joystick*);
232     SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick*);
233     int SDL_JoystickNumAxes(SDL_Joystick*);
234     int SDL_JoystickNumBalls(SDL_Joystick*);
235     int SDL_JoystickNumHats(SDL_Joystick*);
236     int SDL_JoystickNumButtons(SDL_Joystick*);
237     void SDL_JoystickUpdate();
238     int SDL_JoystickEventState(int);
239     Sint16 SDL_JoystickGetAxis(SDL_Joystick*,int);
240     Uint8 SDL_JoystickGetHat(SDL_Joystick*,int);
241     int SDL_JoystickGetBall(SDL_Joystick*,int,int*,int*);
242     Uint8 SDL_JoystickGetButton(SDL_Joystick*,int);
243     void SDL_JoystickClose(SDL_Joystick*);
244     SDL_JoystickPowerLevel SDL_JoystickCurrentPowerLevel(SDL_Joystick*);
245 
246     // SDL_keyboard.h
247     SDL_Window* SDL_GetKeyboardFocus();
248     Uint8* SDL_GetKeyboardState(int*);
249     SDL_Keymod SDL_GetModState();
250     void SDL_SetModState(SDL_Keymod);
251     SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode);
252     SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode);
253     const(char)* SDL_GetScancodeName(SDL_Scancode);
254     SDL_Scancode SDL_GetScancodeFromName(const(char)*);
255     const(char)* SDL_GetKeyName(SDL_Keycode);
256     SDL_Keycode SDL_GetKeyFromName(const(char)*);
257     void SDL_StartTextInput();
258     SDL_bool SDL_IsTextInputActive();
259     void SDL_StopTextInput();
260     void SDL_SetTextInputRect(SDL_Rect*);
261     SDL_bool SDL_HasScreenKeyboardSupport();
262     SDL_bool SDL_IsScreenKeyboardShown(SDL_Window*);
263 
264     // SDL_loadso.h
265     void* SDL_LoadObject(const(char)*);
266     void* SDL_LoadFunction(void*,const(char*));
267     void SDL_UnloadObject(void*);
268 
269     // SDL_log.h
270     void SDL_LogSetAllPriority(SDL_LogPriority);
271     void SDL_LogSetPriority(int,SDL_LogPriority);
272     SDL_LogPriority SDL_LogGetPriority(int);
273     void SDL_LogResetPriorities();
274     void SDL_Log(const(char)*,...);
275     void SDL_LogVerbose(int,const(char)*,...);
276     void SDL_LogDebug(int,const(char)*,...);
277     void SDL_LogInfo(int,const(char)*,...);
278     void SDL_LogWarn(int,const(char)*,...);
279     void SDL_LogError(int,const(char)*,...);
280     void SDL_LogCritical(int,const(char)*,...);
281     void SDL_LogMessage(int,SDL_LogPriority,const(char)*,...);
282     void SDL_LogMessageV(int,SDL_LogPriority,const(char)*,va_list);
283     void SDL_LogGetOutputFunction(SDL_LogOutputFunction,void**);
284     void SDL_LogSetOutputFunction(SDL_LogOutputFunction,void*);
285 
286     // SDL_messagebox.h
287     int SDL_ShowMessageBox(const(SDL_MessageBoxData)*,int*);
288     int SDL_ShowSimpleMessageBox(Uint32,const(char)*,const(char)*,SDL_Window*);
289     
290     // SDL_mouse.h
291     SDL_Window* SDL_GetMouseFocus();
292     Uint32 SDL_GetMouseState(int*,int*);
293     Uint32 SDL_GetGlobalMouseState(int*,int*);
294     Uint32 SDL_GetRelativeMouseState(int*,int*);
295     void SDL_WarpMouseInWindow(SDL_Window*,int,int);
296     void SDL_WarpMouseGlobal(int,int);
297     int SDL_SetRelativeMouseMode(SDL_bool);
298     int SDL_CaptureMouse(SDL_bool);
299     SDL_bool SDL_GetRelativeMouseMode();
300     SDL_Cursor* SDL_CreateCursor(const(Uint8)*,const(Uint8)*,int,int,int,int);
301     SDL_Cursor* SDL_CreateColorCursor(SDL_Surface*,int,int);
302     SDL_Cursor* SDL_CreateSystemCursor(SDL_SystemCursor);
303     void SDL_SetCursor(SDL_Cursor*);
304     SDL_Cursor* SDL_GetCursor();
305     SDL_Cursor* SDL_GetDefaultCursor();
306     void SDL_FreeCursor(SDL_Cursor*);
307     int SDL_ShowCursor(int);
308 
309     // SDL_pixels.h
310     const(char)* SDL_GetPixelFormatName(Uint32);
311     SDL_bool SDL_PixelFormatEnumToMasks(Uint32,int*,Uint32*,Uint32*,Uint32*,Uint32*);
312     Uint32 SDL_MasksToPixelFormatEnum(int,Uint32,Uint32,Uint32,Uint32);
313     SDL_PixelFormat* SDL_AllocFormat(Uint32);
314     void SDL_FreeFormat(SDL_PixelFormat*);
315     SDL_Palette* SDL_AllocPalette(int);
316     int SDL_SetPixelFormatPalette(SDL_PixelFormat*,SDL_Palette*);
317     int SDL_SetPaletteColors(SDL_Palette*,const(SDL_Color)*,int,int);
318     void SDL_FreePalette(SDL_Palette*);
319     Uint32 SDL_MapRGB(const(SDL_PixelFormat)*,Uint8,Uint8,Uint8);
320     Uint32 SDL_MapRGBA(const(SDL_PixelFormat)*,Uint8,Uint8,Uint8,Uint8);
321     void SDL_GetRGB(Uint32,const(SDL_PixelFormat)*,Uint8*,Uint8*,Uint8*);
322     void SDL_GetRGBA(Uint32,const(SDL_PixelFormat)*,Uint8*,Uint8*,Uint8*,Uint8*);
323     void SDL_CalculateGammaRamp(float,Uint16*);
324 
325     // SDL_platform.h
326     const(char)* SDL_GetPlatform();
327 
328     // SDL_power.h
329     SDL_PowerState SDL_GetPowerInfo(int*,int*);
330 
331     // SDL_Rect.h
332     SDL_bool SDL_HasIntersection(const(SDL_Rect)*,const(SDL_Rect)*);
333     SDL_bool SDL_IntersectRect(const(SDL_Rect)*,const(SDL_Rect)*,SDL_Rect*);
334     void SDL_UnionRect(const(SDL_Rect)*,const(SDL_Rect)*,SDL_Rect*);
335     SDL_bool SDL_EnclosePoints(const(SDL_Point)*,int,const(SDL_Rect)*,SDL_Rect*);
336     SDL_bool SDL_IntersectRectAndLine(const(SDL_Rect)*,int*,int*,int*,int*);
337     
338     // SDL_Render.h
339     int SDL_GetNumRenderDrivers();
340     int SDL_GetRenderDriverInfo(int,SDL_RendererInfo*);
341     int SDL_CreateWindowAndRenderer(int,int,Uint32,SDL_Window**,SDL_Renderer**);
342     SDL_Renderer* SDL_CreateRenderer(SDL_Window*,int,SDL_RendererFlags);
343     SDL_Renderer* SDL_CreateSoftwareRenderer(SDL_Surface*);
344     SDL_Renderer* SDL_GetRenderer(SDL_Window*);
345     int SDL_GetRendererInfo(SDL_Renderer*,SDL_RendererInfo*);
346     int SDL_GetRendererOutputSize(SDL_Renderer*,int*,int*);
347     SDL_Texture* SDL_CreateTexture(SDL_Renderer*,Uint32,SDL_TextureAccess,int,int);
348     SDL_Texture* SDL_CreateTextureFromSurface(SDL_Renderer*,SDL_Surface*);
349     int SDL_QueryTexture(SDL_Texture*,Uint32*,int*,int*,int*);
350     int SDL_SetTextureColorMod(SDL_Texture*,Uint8,Uint8,Uint8);
351     int SDL_GetTextureColorMod(SDL_Texture*,Uint8*,Uint8*,Uint8*);
352     int SDL_SetTextureAlphaMod(SDL_Texture*,Uint8);
353     int SDL_GetTextureAlphaMod(SDL_Texture*,Uint8*);
354     int SDL_SetTextureBlendMode(SDL_Texture*,SDL_BlendMode);
355     int SDL_GetTextureBlendMode(SDL_Texture*,SDL_BlendMode*);
356     int SDL_UpdateTexture(SDL_Texture*,const(SDL_Rect)*,const(void)*,int);
357     int SDL_UpdateYUVTexture(SDL_Texture*,const(SDL_Rect)*,const(Uint8)*,int,const(Uint8)*,int,const(Uint8)*,int);
358     int SDL_LockTexture(SDL_Texture*,const(SDL_Rect)*,void**,int*);
359     void SDL_UnlockTexture(SDL_Texture*);
360     SDL_bool SDL_RenderTargetSupported(SDL_Renderer*);
361     int SDL_SetRenderTarget(SDL_Renderer*,SDL_Texture*);
362     SDL_Texture* SDL_GetRenderTarget(SDL_Renderer*);
363     int SDL_RenderSetClipRect(SDL_Renderer*,const(SDL_Rect)*);
364     void SDL_RenderGetClipRect(SDL_Renderer* renderer,SDL_Rect*);
365     int SDL_RenderSetLogicalSize(SDL_Renderer*,int,int);
366     void SDL_RenderGetLogicalSize(SDL_Renderer*,int*,int*);
367     int SDL_RenderSetIntegerScale(SDL_Renderer*,SDL_bool);
368     SDL_bool SDL_RenderGetIntegerScale(SDL_Renderer*);
369     int SDL_RenderSetViewport(SDL_Renderer*,const(SDL_Rect)*);
370     void SDL_RenderGetViewport(SDL_Renderer*,SDL_Rect*);
371     SDL_bool SDL_RenderIsClipEnabled(SDL_Renderer*);
372     int SDL_RenderSetScale(SDL_Renderer*,float,float);
373     int SDL_RenderGetScale(SDL_Renderer*,float*,float*);
374     int SDL_SetRenderDrawColor(SDL_Renderer*,Uint8,Uint8,Uint8,Uint8);
375     int SDL_GetRenderDrawColor(SDL_Renderer*,Uint8*,Uint8*,Uint8*,Uint8*);
376     int SDL_SetRenderDrawBlendMode(SDL_Renderer*,SDL_BlendMode);
377     int SDL_GetRenderDrawBlendMode(SDL_Renderer*,SDL_BlendMode*);
378     int SDL_RenderClear(SDL_Renderer*);
379     int SDL_RenderDrawPoint(SDL_Renderer*,int,int);
380     int SDL_RenderDrawPoints(SDL_Renderer*,const(SDL_Point)*,int);
381     int SDL_RenderDrawLine(SDL_Renderer*,int,int,int,int);
382     int SDL_RenderDrawLines(SDL_Renderer*,const(SDL_Point)*,int);
383     int SDL_RenderDrawRect(SDL_Renderer*,const(SDL_Rect)*);
384     int SDL_RenderDrawRects(SDL_Renderer*,const(SDL_Rect)*,int);
385     int SDL_RenderFillRect(SDL_Renderer*,const(SDL_Rect)*);
386     int SDL_RenderFillRects(SDL_Renderer*,const(SDL_Rect)*,int);
387     int SDL_RenderCopy(SDL_Renderer*,SDL_Texture*,const(SDL_Rect)*,const(SDL_Rect*));
388     int SDL_RenderCopyEx(SDL_Renderer*,SDL_Texture*,const(SDL_Rect)*,const(SDL_Rect)*,const(double),const(SDL_Point)*,const(SDL_RendererFlip));
389     int SDL_RenderReadPixels(SDL_Renderer*,const(SDL_Rect)*,Uint32,void*,int);
390     void SDL_RenderPresent(SDL_Renderer*);
391     void SDL_DestroyTexture(SDL_Texture*);
392     void SDL_DestroyRenderer(SDL_Renderer*);
393     int SDL_GL_BindTexture(SDL_Texture*,float*,float*);
394     int SDL_GL_UnbindTexture(SDL_Texture*);
395 
396     // SDL_rwops.h
397     SDL_RWops* SDL_RWFromFile(const(char)*,const(char)*);
398     SDL_RWops* SDL_RWFromFP(FILE*,SDL_bool);
399     SDL_RWops* SDL_RWFromMem(void*,int);
400     SDL_RWops* SDL_RWFromConstMem(const(void)*,int);
401     SDL_RWops* SDL_AllocRW();
402     void SDL_FreeRW(SDL_RWops*);
403     void* SDL_LoadFile_RW(SDL_RWops*,size_t,int);
404     Uint8 SDL_ReadU8(SDL_RWops*);
405     Uint16 SDL_ReadLE16(SDL_RWops*);
406     Uint16 SDL_ReadBE16(SDL_RWops*);
407     Uint32 SDL_ReadLE32(SDL_RWops*);
408     Uint32 SDL_ReadBE32(SDL_RWops*);
409     Uint64 SDL_ReadLE64(SDL_RWops*);
410     Uint64 SDL_ReadBE64(SDL_RWops*);
411     size_t SDL_WriteU8(SDL_RWops*,Uint8);
412     size_t SDL_WriteLE16(SDL_RWops*,Uint16);
413     size_t SDL_WriteBE16(SDL_RWops*,Uint16);
414     size_t SDL_WriteLE32(SDL_RWops*,Uint32);
415     size_t SDL_WriteBE32(SDL_RWops*,Uint32);
416     size_t SDL_WriteLE64(SDL_RWops*,Uint64);
417     size_t SDL_WriteBE64(SDL_RWops*,Uint64);
418 
419     // SDL_shape.h
420     SDL_Window* SDL_CreateShapedWindow(const(char)*,uint,uint,uint,uint,Uint32);
421     SDL_bool SDL_IsShapedWindow(const(SDL_Window)*);
422     int SDL_SetWindowShape(SDL_Window*,SDL_Surface*,SDL_WindowShapeMode*);
423     int SDL_GetShapedWindowMode(SDL_Window*,SDL_WindowShapeMode*);
424 
425     // SDL_surface.h
426     SDL_Surface* SDL_CreateRGBSurface(Uint32,int,int,int,Uint32,Uint32,Uint32,Uint32);
427     SDL_Surface* SDL_CreateRGBSurfaceWithFormat(Uint32,int,int,int,Uint32);
428     SDL_Surface* SDL_CreateRGBSurfaceFrom(void*,int,int,int,int,Uint32,Uint32,Uint32,Uint32);
429     SDL_Surface* SDL_CreateRGBSurfaceWithFormatFrom(void*,int,int,int,int,Uint32);
430     void SDL_FreeSurface(SDL_Surface*);
431     int SDL_SetSurfacePalette(SDL_Surface*,SDL_Palette*);
432     int SDL_LockSurface(SDL_Surface*);
433     int SDL_UnlockSurface(SDL_Surface*);
434     SDL_Surface* SDL_LoadBMP_RW(SDL_RWops*,int);
435     int SDL_SaveBMP_RW(SDL_Surface*,SDL_RWops*,int);
436     int SDL_SetSurfaceRLE(SDL_Surface*,int);
437     int SDL_SetColorKey(SDL_Surface*,int,Uint32);
438     int SDL_GetColorKey(SDL_Surface*,Uint32*);
439     int SDL_SetSurfaceColorMod(SDL_Surface*,Uint8,Uint8,Uint8);
440     int SDL_GetSurfaceColorMod(SDL_Surface*,Uint8*,Uint8*,Uint8*);
441     int SDL_SetSurfaceAlphaMod(SDL_Surface*,Uint8);
442     int SDL_GetSurfaceAlphaMod(SDL_Surface*,Uint8*);
443     int SDL_SetSurfaceBlendMode(SDL_Surface*,SDL_BlendMode);
444     int SDL_GetSurfaceBlendMode(SDL_Surface*,SDL_BlendMode*);
445     SDL_bool SDL_SetClipRect(SDL_Surface*,const(SDL_Rect)*);
446     void SDL_GetClipRect(SDL_Surface*,SDL_Rect*);
447     SDL_Surface* SDL_DuplicateSurface(SDL_Surface*);
448     SDL_Surface* SDL_ConvertSurface(SDL_Surface*,const(SDL_PixelFormat)*,Uint32);
449     SDL_Surface* SDL_ConvertSurfaceFormat(SDL_Surface*,Uint32,Uint32);
450     int SDL_ConvertPixels(int,int,Uint32,const(void)*,int,Uint32,void*,int);
451     int SDL_FillRect(SDL_Surface*,const(SDL_Rect)*,Uint32);
452     int SDL_FillRects(SDL_Surface*,const(SDL_Rect)*,int,Uint32);
453     int SDL_UpperBlit(SDL_Surface*,const(SDL_Rect)*,SDL_Surface*,SDL_Rect*);
454     int SDL_LowerBlit(SDL_Surface*,SDL_Rect*,SDL_Surface*,SDL_Rect*);
455     int SDL_SoftStretch(SDL_Surface*,const(SDL_Rect)*,SDL_Surface*,const(SDL_Rect)*);
456     int SDL_UpperBlitScaled(SDL_Surface*,const(SDL_Rect)*,SDL_Surface*,SDL_Rect*);
457     int SDL_LowerBlitScaled(SDL_Surface*,SDL_Rect*,SDL_Surface*,SDL_Rect*);
458 
459     // SDL_system.h
460     static if(Derelict_OS_Windows) {
461         int SDL_Direct3D9GetAdapterIndex(int);
462         IDirect3DDevice9* SDL_RenderGetD3D9Device(SDL_Renderer*);
463         SDL_bool SDL_DXGIGetOutputInfo(int,int*,int*);
464     }
465     static if(Derelict_OS_iOS) {
466         int SDL_iPhoneSetAnimationCallback(SDL_Window*,int,SDL_iPhoneAnimationCallback,void*);
467         void SDL_iPhoneSetEventPump(SDL_bool);
468     }
469     static if(Derelict_OS_Android) {
470         void* SDL_AndroidGetJNIEnv();
471         void* SDL_AndroidGetActivity();
472         const(char)* SDL_AndroidGetInternalStoragePath();
473         int SDL_AndroidGetInternalStorageState();
474         const(char)* SDL_AndroidGetExternalStoragePath();
475     }
476     static if(Derelict_OS_WinRT) {
477         const(wchar_t)* SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path);
478         const(char)* SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path);
479         int SDL_WinRTRunApp(int function(int,char**),void*);
480     }
481 
482     // SDL_syswm.h
483     SDL_bool SDL_GetWindowWMInfo(SDL_Window* window,SDL_SysWMinfo * info);
484 
485     // SDL_timer.h
486     Uint32 SDL_GetTicks();
487     Uint64 SDL_GetPerformanceCounter();
488     Uint64 SDL_GetPerformanceFrequency();
489     void SDL_Delay(Uint32);
490     SDL_TimerID SDL_AddTimer(Uint32,SDL_TimerCallback,void*);
491     SDL_bool SDL_RemoveTimer(SDL_TimerID);
492 
493     // SDL_touch.h
494     int SDL_GetNumTouchDevices();
495     SDL_TouchID SDL_GetTouchDevice(int);
496     int SDL_GetNumTouchFingers(SDL_TouchID);
497     SDL_Finger* SDL_GetTouchFinger(SDL_TouchID,int);
498 
499     // SDL_version.h
500     void SDL_GetVersion(SDL_version*);
501     const(char)* SDL_GetRevision();
502     int SDL_GetRevisionNumber();
503 
504     // SDL_video.h
505     int SDL_GetNumVideoDrivers();
506     const(char)* SDL_GetVideoDriver(int);
507     int SDL_VideoInit(const(char)*);
508     void SDL_VideoQuit();
509     const(char)* SDL_GetCurrentVideoDriver();
510     int SDL_GetNumVideoDisplays();
511     const(char)* SDL_GetDisplayName(int);
512     int SDL_GetDisplayBounds(int,SDL_Rect*);
513     int SDL_GetDisplayDPI(int,float*,float*,float*);
514     int SDL_GetDisplayUsableBounds(int,SDL_Rect*);
515     int SDL_GetNumDisplayModes(int);
516     int SDL_GetDisplayMode(int,int,SDL_DisplayMode*);
517     int SDL_GetDesktopDisplayMode(int,SDL_DisplayMode*);
518     int SDL_GetCurrentDisplayMode(int,SDL_DisplayMode*);
519     SDL_DisplayMode* SDL_GetClosestDisplayMode(int,const(SDL_DisplayMode)*,SDL_DisplayMode*);
520     int SDL_GetWindowDisplayIndex(SDL_Window*);
521     int SDL_SetWindowDisplayMode(SDL_Window*,const(SDL_DisplayMode)*);
522     int SDL_GetWindowDisplayMode(SDL_Window*,SDL_DisplayMode*);
523     Uint32 SDL_GetWindowPixelFormat(SDL_Window*);
524     SDL_Window* SDL_CreateWindow(const(char)*,int,int,int,int,SDL_WindowFlags);
525     SDL_Window* SDL_CreateWindowFrom(const(void)*);
526     Uint32 SDL_GetWindowID(SDL_Window*);
527     SDL_Window* SDL_GetWindowFromID(Uint32);
528     SDL_WindowFlags SDL_GetWindowFlags(SDL_Window*);
529     void SDL_SetWindowTitle(SDL_Window*,const(char)*);
530     const(char)* SDL_GetWindowTitle(SDL_Window*);
531     void SDL_SetWindowIcon(SDL_Window*,SDL_Surface*);
532     void* SDL_SetWindowData(SDL_Window*,const(char)*,void*);
533     void* SDL_GetWindowData(SDL_Window*,const(char)*);
534     void SDL_SetWindowPosition(SDL_Window*,int,int);
535     void SDL_GetWindowPosition(SDL_Window*,int*,int*);
536     void SDL_SetWindowSize(SDL_Window*,int,int);
537     void SDL_GetWindowSize(SDL_Window*,int*,int*);
538     int SDL_GetWindowBordersSize(SDL_Window*,int*,int*,int*,int*);
539     void SDL_SetWindowMinimumSize(SDL_Window*,int,int);
540     void SDL_GetWindowMinimumSize(SDL_Window*,int*,int*);
541     void SDL_SetWindowMaximumSize(SDL_Window*,int,int);
542     void SDL_GetWindowMaximumSize(SDL_Window*,int*,int*);
543     void SDL_SetWindowBordered(SDL_Window*,SDL_bool);
544     void SDL_SetWindowResizable(SDL_Window*,SDL_bool);
545     void SDL_ShowWindow(SDL_Window*);
546     void SDL_HideWindow(SDL_Window*);
547     void SDL_RaiseWindow(SDL_Window*);
548     void SDL_MaximizeWindow(SDL_Window*);
549     void SDL_MinimizeWindow(SDL_Window*);
550     void SDL_RestoreWindow(SDL_Window*);
551     int SDL_SetWindowFullscreen(SDL_Window*,Uint32);
552     SDL_Surface* SDL_GetWindowSurface(SDL_Window*);
553     int SDL_UpdateWindowSurface(SDL_Window*);
554     int SDL_UpdateWindowSurfaceRects(SDL_Window*,SDL_Rect*,int);
555     void SDL_SetWindowGrab(SDL_Window*,SDL_bool);
556     SDL_bool SDL_GetWindowGrab(SDL_Window*);
557     SDL_Window* SDL_GetGrabbedWindow();
558     int SDL_SetWindowBrightness(SDL_Window*,float);
559     float SDL_GetWindowBrightness(SDL_Window*);
560     int SDL_SetWindowOpacity(SDL_Window*,float);
561     int SDL_GetWindowOpacity(SDL_Window*,float*);
562     int SDL_SetWindowModalFor(SDL_Window*,SDL_Window*);
563     int SDL_SetWindowInputFocus(SDL_Window*);
564     int SDL_SetWindowGammaRamp(SDL_Window*,const(Uint16)*,const(Uint16)*,const(Uint16)*);
565     int SDL_GetWindowGammaRamp(SDL_Window*,Uint16*,Uint16*,Uint16*);
566     int SDL_SetWindowHitTest(SDL_Window*,SDL_HitTest,void*);
567     void SDL_DestroyWindow(SDL_Window*);
568     SDL_bool SDL_IsScreenSaverEnabled();
569     void SDL_EnableScreenSaver();
570     void SDL_DisableScreenSaver();
571     int SDL_GL_LoadLibrary(const(char)*);
572     void* SDL_GL_GetProcAddress(const(char)*);
573     void SDL_GL_UnloadLibrary();
574     SDL_bool SDL_GL_ExtensionSupported(const(char)*);
575     void SDL_GL_ResetAttributes();
576     int SDL_GL_SetAttribute(SDL_GLattr,int);
577     int SDL_GL_GetAttribute(SDL_GLattr,int*);
578     SDL_GLContext SDL_GL_CreateContext(SDL_Window*);
579     int SDL_GL_MakeCurrent(SDL_Window*,SDL_GLContext);
580     SDL_Window* SDL_GL_GetCurrentWindow();
581     SDL_GLContext SDL_GL_GetCurrentContext();
582     void SDL_GL_GetDrawableSize(SDL_Window*,int*,int*);
583     int SDL_GL_SetSwapInterval(int);
584     int SDL_GL_GetSwapInterval();
585     void SDL_GL_SwapWindow(SDL_Window*);
586     void SDL_GL_DeleteContext(SDL_GLContext);
587 
588     // SDL_vulkan.h
589     int SDL_Vulkan_LoadLibrary(const(char)*);
590     void* SDL_Vulkan_GetVkGetInstanceProcAddr();
591     void SDL_Vulkan_UnloadLibrary();
592     SDL_bool SDL_Vulkan_GetInstanceExtensions(SDL_Window*,uint,const(char)**);
593     SDL_bool SDL_Vulkan_CreateSurface(SDL_Window*,void*,void*);
594     void SDL_Vulkan_GetDrawableSize(SDL_Window*,int*,int*);
595 }