1 /*
2   Simple DirectMedia Layer
3   Copyright (C) 1997-2021 Sam Lantinga <slouken@libsdl.org>
4 
5   This software is provided 'as-is', without any express or implied
6   warranty.  In no event will the authors be held liable for any damages
7   arising from the use of this software.
8 
9   Permission is granted to anyone to use this software for any purpose,
10   including commercial applications, and to alter it and redistribute it
11   freely, subject to the following restrictions:
12 
13   1. The origin of this software must not be misrepresented; you must not
14      claim that you wrote the original software. If you use this software
15      in a product, an acknowledgment in the product documentation would be
16      appreciated but is not required.
17   2. Altered source versions must be plainly marked as such, and must not be
18      misrepresented as being the original software.
19   3. This notice may not be removed or altered from any source distribution.
20 */
21 
22 /* don't #pragma once this file, it gets #included multiple times! */
23 
24 #ifndef SDL20_SYM
25 #define SDL20_SYM(rc,fn,params,args,ret)
26 #endif
27 
28 #ifndef SDL20_SYM_PASSTHROUGH
29 #define SDL20_SYM_PASSTHROUGH(rc,fn,params,args,ret) SDL20_SYM(rc,fn,params,args,ret)
30 #endif
31 
32 #ifndef SDL20_SYM_VARARGS
33 #define SDL20_SYM_VARARGS(rc,fn,params) SDL20_SYM(rc,fn,params,unused,unused)
34 #endif
35 
36 #ifndef OPENGL_SYM
37 #define OPENGL_SYM(ext,rc,fn,params,args,ret)
38 #endif
39 
40 #ifndef OPENGL_EXT
41 #define OPENGL_EXT(name)
42 #endif
43 
44 SDL20_SYM(void,GetVersion,(SDL_version *a),(a),)
45 SDL20_SYM_VARARGS(void,Log,(const char *fmt, ...))
46 SDL20_SYM(int,Init,(Uint32 a),(a),return)
47 SDL20_SYM(int,InitSubSystem,(Uint32 a),(a),return)
48 SDL20_SYM(Uint32,WasInit,(Uint32 a),(a),return)
49 SDL20_SYM(char*,GetError,(void),(),return)
50 SDL20_SYM_VARARGS(int,SetError,(const char *fmt, ...))
51 
52 SDL20_SYM(const char *,GetHint,(const char *a),(a),return)
53 SDL20_SYM(SDL_bool,SetHint,(const char *a, const char *b),(a, b),return)
54 
55 SDL20_SYM(int,Error,(SDL_errorcode a),(a),return)
56 SDL20_SYM_PASSTHROUGH(void,ClearError,(void),(),)
57 SDL20_SYM(void,Quit,(void),(),)
58 SDL20_SYM(void,QuitSubSystem,(Uint32 a),(a),)
59 SDL20_SYM(int,VideoInit,(const char *a),(a),return)
60 SDL20_SYM_PASSTHROUGH(void,VideoQuit,(void),(),)
61 SDL20_SYM_PASSTHROUGH(int,AudioInit,(const char *a),(a),return)
62 SDL20_SYM_PASSTHROUGH(void,AudioQuit,(void),(),)
63 SDL20_SYM(const char *,GetCurrentAudioDriver,(void),(),return)
64 SDL20_SYM(const char *,GetCurrentVideoDriver,(void),(),return)
65 
66 SDL20_SYM(SDL_assert_state,ReportAssertion,(SDL_assert_data *a,const char *b,const char *c, int d),(a,b,c,d),return)
67 
68 SDL20_SYM(int,PollEvent,(SDL_Event *a),(a),return)
69 SDL20_SYM(void,PumpEvents,(void),(),)
70 SDL20_SYM(void,SetEventFilter,(SDL_EventFilter a, void *b),(a,b),)
71 SDL20_SYM(void,AddEventWatch,(SDL_EventFilter a, void *b),(a,b),)
72 SDL20_SYM(void,DelEventWatch,(SDL_EventFilter a, void *b),(a,b),)
73 SDL20_SYM(Uint8,EventState,(Uint32 a, int b),(a,b),return)
74 
75 SDL20_SYM(SDL_bool,GetWindowWMInfo,(SDL_Window *a, SDL_SysWMinfo *b),(a,b),)
76 
77 SDL20_SYM(int,GetNumVideoDisplays,(void),(),return)
78 SDL20_SYM(int,GetNumDisplayModes,(int a),(a),return)
79 SDL20_SYM(int,GetDisplayMode,(int a, int b, SDL_DisplayMode *c),(a,b,c),return)
80 SDL20_SYM(int,GetDesktopDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return)
81 SDL20_SYM(int,GetCurrentDisplayMode,(int a, SDL_DisplayMode *b),(a,b),return)
82 SDL20_SYM(int,GetWindowDisplayMode,(SDL_Window *a, SDL_DisplayMode *b),(a,b),return)
83 
84 SDL20_SYM(void,EnableScreenSaver,(void),(),)
85 SDL20_SYM(void,DisableScreenSaver,(void),(),)
86 
87 SDL20_SYM(SDL_Window *,CreateWindow,(const char *a, int b, int c, int d, int e, Uint32 f),(a,b,c,d,e,f),return)
88 SDL20_SYM(void,DestroyWindow,(SDL_Window *a),(a),)
89 SDL20_SYM(void,SetWindowIcon,(SDL_Window *a,SDL_Surface *b),(a,b),)
90 SDL20_SYM(int,UpdateWindowSurface,(SDL_Window *a),(a),return)
91 SDL20_SYM(SDL_Surface *,GetWindowSurface,(SDL_Window *a),(a),return)
92 SDL20_SYM(void,GetWindowPosition,(SDL_Window *a,int *b, int *c),(a,b,c),)
93 SDL20_SYM(void,SetWindowSize,(SDL_Window *a, int b, int c),(a,b,c),)
94 SDL20_SYM(void,GetWindowSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
95 SDL20_SYM(void,MinimizeWindow,(SDL_Window *a),(a),)
96 SDL20_SYM(void,RaiseWindow,(SDL_Window *a),(a),)
97 SDL20_SYM(int,SetWindowGammaRamp,(SDL_Window *a,const Uint16 *b,const Uint16 *c,const Uint16 *d),(a,b,c,d),return)
98 SDL20_SYM(int,GetWindowGammaRamp,(SDL_Window *a,Uint16 *b,Uint16 *c,Uint16 *d),(a,b,c,d),return)
99 SDL20_SYM(Uint32,GetWindowFlags,(SDL_Window *a),(a),return)
100 SDL20_SYM(void,SetWindowGrab,(SDL_Window *a,SDL_bool b),(a,b),)
101 SDL20_SYM(SDL_bool,GetWindowGrab,(SDL_Window *a),(a),return)
102 SDL20_SYM(void,SetWindowTitle,(SDL_Window *a,const char *b),(a,b),)
103 SDL20_SYM(int,SetWindowFullscreen,(SDL_Window *a, Uint32 b),(a,b),return)
104 SDL20_SYM(void,SetWindowBordered,(SDL_Window *a, SDL_bool b),(a,b),return)
105 SDL20_SYM(void,SetWindowResizable,(SDL_Window *a, SDL_bool b),(a,b),return)
106 
107 SDL20_SYM(SDL_PixelFormat *,AllocFormat,(Uint32 a),(a),return)
108 SDL20_SYM(void,FreeFormat,(SDL_PixelFormat *a),(a),)
109 SDL20_SYM(SDL_Surface *,CreateRGBSurface,(Uint32 a, int b, int c, int d, Uint32 e, Uint32 f, Uint32 g, Uint32 h),(a,b,c,d,e,f,g,h),return)
110 SDL20_SYM(SDL_Surface *,CreateRGBSurfaceFrom,(void *a, int b, int c, int d, int e, Uint32 f, Uint32 g, Uint32 h, Uint32 i),(a,b,c,d,e,f,g,h,i),return)
111 SDL20_SYM(SDL_Surface *,CreateRGBSurfaceWithFormat,(Uint32 a, int b, int c, int d, Uint32 e),(a,b,c,d,e),return)
112 SDL20_SYM(SDL_Surface *,ConvertSurface,(SDL_Surface *a, const SDL_PixelFormat *b, Uint32 c),(a,b,c),return)
113 SDL20_SYM(int,LockSurface,(SDL_Surface *a),(a),return)
114 SDL20_SYM(void,UnlockSurface,(SDL_Surface *a),(a),)
115 SDL20_SYM(int,UpperBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
116 SDL20_SYM(int,LowerBlit,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c, SDL_Rect *d),(a,b,c,d),return)
117 SDL20_SYM(int,SoftStretch,(SDL_Surface *a,const SDL_Rect *b,SDL_Surface *c,const SDL_Rect *d),(a,b,c,d),return)
118 SDL20_SYM(int,SetColorKey,(SDL_Surface *a, int b, Uint32 c),(a,b,c),return)
119 SDL20_SYM(int,GetColorKey,(SDL_Surface *a, Uint32 *b),(a,b),return)
120 SDL20_SYM(void,FreeSurface,(SDL_Surface *a),(a),)
121 SDL20_SYM(int,SetSurfaceAlphaMod,(SDL_Surface *a, Uint8 b),(a,b),return)
122 SDL20_SYM(int,GetSurfaceAlphaMod,(SDL_Surface *a, Uint8 *b),(a,b),return)
123 SDL20_SYM(int,SetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode b),(a,b),return)
124 SDL20_SYM(int,GetSurfaceBlendMode,(SDL_Surface *a, SDL_BlendMode *b),(a,b),return)
125 SDL20_SYM(SDL_Surface*,LoadBMP_RW,(SDL_RWops *a, int b),(a,b),return)
126 SDL20_SYM(int,SaveBMP_RW,(SDL_Surface *a, SDL_RWops *b, int c),(a,b,c),return)
127 SDL20_SYM(SDL_Palette*,AllocPalette,(int a),(a),return)
128 SDL20_SYM(void,FreePalette,(SDL_Palette *a),(a),)
129 SDL20_SYM(int,SetPaletteColors,(SDL_Palette *a, const SDL_Color *b, int c, int d),(a,b,c,d),return)
130 SDL20_SYM(SDL_bool,GL_ExtensionSupported,(const char *a),(a),return)
131 SDL20_SYM(int,GL_LoadLibrary,(const char *a),(a),return)
132 SDL20_SYM(void *,GL_GetProcAddress,(const char *a),(a),return)
133 SDL20_SYM(int,GL_SetAttribute,(SDL_GLattr a, int b),(a,b),return)
134 SDL20_SYM(int,GL_GetAttribute,(SDL_GLattr a, int *b),(a,b),return)
135 SDL20_SYM(int,GL_SetSwapInterval,(int a),(a),return)
136 SDL20_SYM(int,GL_GetSwapInterval,(void),(),return)
137 SDL20_SYM(SDL_GLContext,GL_CreateContext,(SDL_Window *a),(a),return)
138 SDL20_SYM(int,GL_MakeCurrent,(SDL_Window *a, SDL_GLContext b),(a,b),return)
139 SDL20_SYM(void,GL_SwapWindow,(SDL_Window *a),(a),)
140 SDL20_SYM(void,GL_DeleteContext,(SDL_GLContext a),(a),)
141 SDL20_SYM(void,GL_GetDrawableSize,(SDL_Window *a, int *b, int *c),(a,b,c),)
142 SDL20_SYM(void,GetClipRect,(SDL_Surface *a, SDL_Rect *b),(a,b),)
143 SDL20_SYM(SDL_bool,SetClipRect,(SDL_Surface *a, const SDL_Rect *b),(a,b),return)
144 SDL20_SYM(int,FillRect,(SDL_Surface *a,const SDL_Rect *b,Uint32 c),(a,b,c),return)
145 SDL20_SYM(SDL_bool,IntersectRect,(const SDL_Rect *a,const SDL_Rect *b,SDL_Rect *c),(a,b,c),return)
146 SDL20_SYM(void,GetRGB,(Uint32 a,const SDL_PixelFormat *b,Uint8 *c,Uint8 *d,Uint8 *e),(a,b,c,d,e),)
147 SDL20_SYM(void,GetRGBA,(Uint32 a,const SDL_PixelFormat *b,Uint8 *c,Uint8 *d,Uint8 *e,Uint8 *f),(a,b,c,d,e,f),)
148 SDL20_SYM(Uint32,MapRGB,(const SDL_PixelFormat *a,Uint8 b,Uint8 c,Uint8 d),(a,b,c,d),return)
149 SDL20_SYM(Uint32,MapRGBA,(const SDL_PixelFormat *a,Uint8 b,Uint8 c,Uint8 d,Uint8 e),(a,b,c,d,e),return)
150 SDL20_SYM(void,CalculateGammaRamp,(float a, Uint16 *b),(a,b),)
151 SDL20_SYM(Uint32,MasksToPixelFormatEnum,(int a,Uint32 b,Uint32 c,Uint32 d,Uint32 e),(a,b,c,d,e),return)
152 SDL20_SYM(SDL_bool,PixelFormatEnumToMasks,(Uint32 a,int *b,Uint32 *c,Uint32 *d,Uint32 *e,Uint32 *f),(a,b,c,d,e,f),return)
153 
154 SDL20_SYM_PASSTHROUGH(void,SetModState,(SDL_Keymod a),(a),)
155 SDL20_SYM_PASSTHROUGH(SDL_Keymod,GetModState,(void),(),return)
156 SDL20_SYM(void,StartTextInput,(void),(),)
157 SDL20_SYM(void,StopTextInput,(void),(),)
158 
159 SDL20_SYM(Uint32,GetMouseState,(int *a, int *b),(a,b),return)
160 SDL20_SYM(Uint32,GetRelativeMouseState,(int *a, int *b),(a,b),return)
161 SDL20_SYM(void,WarpMouseInWindow,(SDL_Window *a, int b, int c),(a,b,c),)
162 SDL20_SYM(int,SetRelativeMouseMode,(SDL_bool a),(a),return)
163 SDL20_SYM(int,ShowCursor,(int a),(a),return)
164 SDL20_SYM(SDL_Cursor *,CreateCursor,(const Uint8 *a,const Uint8 *b,int c,int d,int e,int f),(a,b,c,d,e,f),return)
165 SDL20_SYM(void,SetCursor,(SDL_Cursor *a),(a),)
166 SDL20_SYM(SDL_Cursor *,GetCursor,(void),(),return)
167 SDL20_SYM(void,FreeCursor,(SDL_Cursor *a),(a),)
168 
169 #ifdef SDL_PASSED_BEGINTHREAD_ENDTHREAD
170 SDL20_SYM(SDL_Thread *,CreateThread,(SDL_ThreadFunction a, const char *b, void *c, pfnSDL_CurrentBeginThread d, pfnSDL_CurrentEndThread e),(a,b,c,d,e),return)
171 #else
172 SDL20_SYM(SDL_Thread *,CreateThread,(SDL_ThreadFunction a, const char *b, void *c),(a,b,c),return)
173 #endif
174 SDL20_SYM(unsigned long,GetThreadID,(SDL_Thread *a),(a),return)
175 SDL20_SYM(unsigned long,ThreadID,(void),(),return)
176 SDL20_SYM_PASSTHROUGH(void,WaitThread,(SDL_Thread *a, int *b),(a,b),)
177 SDL20_SYM_PASSTHROUGH(SDL_mutex*,CreateMutex,(void),(),return)
178 SDL20_SYM(int,LockMutex,(SDL_mutex *a),(a),return)
179 SDL20_SYM(int,UnlockMutex,(SDL_mutex *a),(a),return)
180 SDL20_SYM_PASSTHROUGH(void,DestroyMutex,(SDL_mutex *a),(a),)
181 SDL20_SYM_PASSTHROUGH(SDL_sem*,CreateSemaphore,(Uint32 a),(a),return)
182 SDL20_SYM_PASSTHROUGH(void,DestroySemaphore,(SDL_sem *a),(a),)
183 SDL20_SYM_PASSTHROUGH(int,SemWait,(SDL_sem *a),(a),return)
184 SDL20_SYM_PASSTHROUGH(int,SemTryWait,(SDL_sem *a),(a),return)
185 SDL20_SYM_PASSTHROUGH(int,SemWaitTimeout,(SDL_sem *a, Uint32 b),(a,b),return)
186 SDL20_SYM_PASSTHROUGH(int,SemPost,(SDL_sem *a),(a),return)
187 SDL20_SYM_PASSTHROUGH(Uint32,SemValue,(SDL_sem *a),(a),return)
188 SDL20_SYM_PASSTHROUGH(SDL_cond*,CreateCond,(void),(),return)
189 SDL20_SYM_PASSTHROUGH(void,DestroyCond,(SDL_cond *a),(a),)
190 SDL20_SYM_PASSTHROUGH(int,CondSignal,(SDL_cond *a),(a),return)
191 SDL20_SYM_PASSTHROUGH(int,CondBroadcast,(SDL_cond *a),(a),return)
192 SDL20_SYM_PASSTHROUGH(int,CondWait,(SDL_cond *a, SDL_mutex *b),(a,b),return)
193 SDL20_SYM_PASSTHROUGH(int,CondWaitTimeout,(SDL_cond *a, SDL_mutex *b, Uint32 c),(a,b,c),return)
194 
195 SDL20_SYM(int,AtomicGet,(SDL_atomic_t *a),(a),return)
196 SDL20_SYM(void,AtomicSet,(SDL_atomic_t *a, int b),(a,b),)
197 
198 SDL20_SYM(SDL_AudioSpec *,LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
199 SDL20_SYM(int,OpenAudio,(SDL_AudioSpec *a, SDL_AudioSpec *b),(a,b),return)
200 SDL20_SYM(void,CloseAudio,(void),(),)
201 SDL20_SYM(SDL_AudioStatus,GetAudioStatus,(void),(),return)
202 SDL20_SYM(void,PauseAudio,(int a),(a),)
203 SDL20_SYM_PASSTHROUGH(void,FreeWAV,(Uint8 *a),(a),)
204 SDL20_SYM(int,BuildAudioCVT,(SDL_AudioCVT *a, Uint16 b, Uint8 c, int d, Uint16 e, Uint8 f, int g),(a,b,c,d,e,f,g),return)
205 SDL20_SYM(int,ConvertAudio,(SDL_AudioCVT *a),(a),return)
206 SDL20_SYM_PASSTHROUGH(void,MixAudio,(Uint8 *a, const Uint8 *b, Uint32 c, int d),(a,b,c,d),)
207 SDL20_SYM_PASSTHROUGH(void,LockAudio,(void),(),)
208 SDL20_SYM_PASSTHROUGH(void,UnlockAudio,(void),(),)
209 
210 SDL20_SYM(SDL_AudioStream *,NewAudioStream,(const SDL_AudioFormat a, const Uint8 b, const int c, const SDL_AudioFormat d, const Uint8 e, const int f),(a,b,c,d,e,f),return)
211 SDL20_SYM(int,AudioStreamPut,(SDL_AudioStream *a, const void *b, int c),(a,b,c),return)
212 SDL20_SYM(int,AudioStreamGet,(SDL_AudioStream *a, void *b, int c),(a,b,c),return)
213 SDL20_SYM(int,AudioStreamAvailable,(SDL_AudioStream *a),(a),return)
214 SDL20_SYM(int,AudioStreamFlush,(SDL_AudioStream *a),(a),return)
215 SDL20_SYM(void,AudioStreamClear,(SDL_AudioStream *a),(a),)
216 SDL20_SYM(void,FreeAudioStream,(SDL_AudioStream *a),(a),)
217 
218 SDL20_SYM_PASSTHROUGH(void*,LoadObject,(const char *a),(a),return)
219 SDL20_SYM_PASSTHROUGH(void*,LoadFunction,(void *a, const char *b),(a,b),return)
220 SDL20_SYM_PASSTHROUGH(void,UnloadObject,(void *a),(a),)
221 
222 SDL20_SYM_PASSTHROUGH(SDL_bool,HasRDTSC,(void),(),return)
223 SDL20_SYM_PASSTHROUGH(SDL_bool,HasMMX,(void),(),return)
224 SDL20_SYM_PASSTHROUGH(SDL_bool,Has3DNow,(void),(),return)
225 SDL20_SYM_PASSTHROUGH(SDL_bool,HasSSE,(void),(),return)
226 SDL20_SYM_PASSTHROUGH(SDL_bool,HasSSE2,(void),(),return)
227 SDL20_SYM_PASSTHROUGH(SDL_bool,HasAltiVec,(void),(),return)
228 
229 SDL20_SYM(SDL_TimerID,AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return)
230 SDL20_SYM(SDL_bool,RemoveTimer,(SDL_TimerID a),(a),return)
231 SDL20_SYM_PASSTHROUGH(Uint32,GetTicks,(void),(),return)
232 SDL20_SYM_PASSTHROUGH(void,Delay,(Uint32 a),(a),)
233 
234 SDL20_SYM_PASSTHROUGH(int,NumJoysticks,(void),(),return)
235 SDL20_SYM(const char *,JoystickNameForIndex,(int a),(a),return)
236 SDL20_SYM(SDL_Joystick *,JoystickOpen,(int a),(a),return)
237 SDL20_SYM_PASSTHROUGH(int,JoystickNumAxes,(SDL_Joystick *a),(a),return)
238 SDL20_SYM_PASSTHROUGH(int,JoystickNumBalls,(SDL_Joystick *a),(a),return)
239 SDL20_SYM_PASSTHROUGH(int,JoystickNumHats,(SDL_Joystick *a),(a),return)
240 SDL20_SYM_PASSTHROUGH(int,JoystickNumButtons,(SDL_Joystick *a),(a),return)
241 SDL20_SYM_PASSTHROUGH(void,JoystickUpdate,(void),(),)
242 SDL20_SYM_PASSTHROUGH(int,JoystickEventState,(int a),(a),return)
243 SDL20_SYM_PASSTHROUGH(Sint16,JoystickGetAxis,(SDL_Joystick *a, int b),(a,b),return)
244 SDL20_SYM_PASSTHROUGH(Uint8,JoystickGetHat,(SDL_Joystick *a, int b),(a,b),return)
245 SDL20_SYM_PASSTHROUGH(int,JoystickGetBall,(SDL_Joystick *a, int b, int *c, int *d),(a,b,c,d),return)
246 SDL20_SYM_PASSTHROUGH(Uint8,JoystickGetButton,(SDL_Joystick *a, int b),(a,b),return)
247 SDL20_SYM(void,JoystickClose,(SDL_Joystick *a),(a),return)
248 SDL20_SYM(void,LockJoysticks,(void),(),)
249 SDL20_SYM(void,UnlockJoysticks,(void),(),)
250 
251 SDL20_SYM(SDL_RWops *,RWFromFile,(const char *a, const char *b),(a,b),return)
252 SDL20_SYM(SDL_RWops *,RWFromFP,(void *a, int b),(a,b),return) /* FILE* */
253 SDL20_SYM(SDL_RWops *,RWFromMem,(void *a, int b),(a,b),return)
254 SDL20_SYM(SDL_RWops *,RWFromConstMem,(const void *a, int b),(a,b),return)
255 SDL20_SYM(SDL_RWops *,AllocRW,(void),(),return)
256 SDL20_SYM(void,FreeRW,(SDL_RWops *a),(a),)
257 
258 SDL20_SYM_PASSTHROUGH(void *,malloc,(size_t a),(a),return)
259 SDL20_SYM_PASSTHROUGH(void *,calloc,(size_t a, size_t b),(a,b),return)
260 SDL20_SYM_PASSTHROUGH(void *,realloc,(void *a, size_t b),(a,b),return)
261 SDL20_SYM_PASSTHROUGH(void,free,(void *a),(a),)
262 SDL20_SYM_PASSTHROUGH(char *,getenv,(const char *a),(a),return)
263 SDL20_SYM_PASSTHROUGH(void,qsort,(void *a, size_t b, size_t c, int (*d)(const void *, const void *)),(a,b,c,d),)
264 SDL20_SYM_PASSTHROUGH(void *,memset,(void *a, int b, size_t c),(a,b,c),return)
265 SDL20_SYM_PASSTHROUGH(void *,memcpy,(void *a, const void *b, size_t c),(a,b,c),return)
266 SDL20_SYM(void *,memmove,(void *a, const void *b, size_t c),(a,b,c),return)
267 
268 SDL20_SYM_PASSTHROUGH(int,memcmp,(const void *a, const void *b, size_t c),(a,b,c),return)
269 SDL20_SYM_PASSTHROUGH(size_t,strlen,(const char *a),(a),return)
270 SDL20_SYM_PASSTHROUGH(size_t,strlcpy,(char *a, const char *b, size_t c),(a,b,c),return)
271 SDL20_SYM_PASSTHROUGH(size_t,strlcat,(char *a, const char *b, size_t c),(a,b,c),return)
272 SDL20_SYM_PASSTHROUGH(char *,strdup,(const char *a),(a),return)
273 SDL20_SYM_PASSTHROUGH(char *,strrev,(char *a),(a),return)
274 SDL20_SYM_PASSTHROUGH(char *,strupr,(char *a),(a),return)
275 SDL20_SYM_PASSTHROUGH(char *,strlwr,(char *a),(a),return)
276 SDL20_SYM_PASSTHROUGH(char *,strchr,(const char *a, int b),(a,b),return)
277 SDL20_SYM_PASSTHROUGH(char *,strrchr,(const char *a, int b),(a,b),return)
278 SDL20_SYM_PASSTHROUGH(char *,strstr,(const char *a, const char *b),(a,b),return)
279 SDL20_SYM_PASSTHROUGH(char *,ltoa,(long a, char *b, int c),(a,b,c),return)
280 SDL20_SYM_PASSTHROUGH(char *,ultoa,(unsigned long a, char *b, int c),(a,b,c),return)
281 SDL20_SYM_PASSTHROUGH(long,strtol,(const char *a, char **b, int c),(a,b,c),return)
282 SDL20_SYM_PASSTHROUGH(unsigned long,strtoul,(const char *a, char **b, int c),(a,b,c),return)
283 SDL20_SYM_PASSTHROUGH(char*,lltoa,(Sint64 a, char *b, int c),(a,b,c),return)
284 SDL20_SYM_PASSTHROUGH(char*,ulltoa,(Uint64 a, char *b, int c),(a,b,c),return)
285 SDL20_SYM_PASSTHROUGH(Sint64,strtoll,(const char *a, char **b, int c),(a,b,c),return)
286 SDL20_SYM_PASSTHROUGH(Uint64,strtoull,(const char *a, char **b, int c),(a,b,c),return)
287 SDL20_SYM_PASSTHROUGH(double,strtod,(const char *a, char **b),(a,b),return)
288 SDL20_SYM_PASSTHROUGH(int,strcmp,(const char *a, const char *b),(a,b),return)
289 SDL20_SYM_PASSTHROUGH(int,strncmp,(const char *a, const char *b, size_t c),(a,b,c),return)
290 SDL20_SYM_PASSTHROUGH(int,strcasecmp,(const char *a, const char *b),(a,b),return)
291 SDL20_SYM_PASSTHROUGH(int,strncasecmp,(const char *a, const char *b, size_t c),(a,b,c),return)
292 SDL20_SYM_VARARGS(int,sscanf,(const char *text, const char *fmt, ...))
293 SDL20_SYM_VARARGS(int,snprintf,(char *text, size_t maxlen, const char *fmt, ...))
294 SDL20_SYM(int,vsscanf,(const char *a,const char *b,va_list c),(a,b,c),return)
295 SDL20_SYM_PASSTHROUGH(int,vsnprintf,(char *a, size_t b, const char *c, va_list d),(a,b,c,d),return)
296 SDL20_SYM_PASSTHROUGH(SDL_iconv_t,iconv_open,(const char *a, const char *b),(a,b),return)
297 SDL20_SYM_PASSTHROUGH(int,iconv_close,(SDL_iconv_t a),(a),return)
298 SDL20_SYM_PASSTHROUGH(size_t,iconv,(SDL_iconv_t a, const char **b, size_t *c, char **d, size_t *e),(a,b,c,d,e),return)
299 SDL20_SYM_PASSTHROUGH(char *,iconv_string,(const char *a, const char *b, const char *c, size_t d),(a,b,c,d),return)
300 SDL20_SYM(int,setenv,(const char *a, const char *b, int c),(a,b,c),return)
301 
302 #ifdef __WATCOMC__ /* Watcom builds are broken with SDL math functions. */
303 #ifndef SDL12_MATH
304 #include <math.h>
305 #define SDL20_fabs fabs
306 #define SDL20_ceil ceil
307 #define SDL20_floor floor
308 #define SDL12_MATH
309 #endif
310 #else
311 SDL20_SYM(double,fabs,(double a),(a),return)
312 SDL20_SYM(double,ceil,(double a),(a),return)
313 SDL20_SYM(double,floor,(double a),(a),return)
314 #endif
315 
316 SDL20_SYM(SDL_Renderer *,CreateRenderer,(SDL_Window *a, int b, Uint32 c),(a,b,c),return)
317 SDL20_SYM(int,GetRendererInfo,(SDL_Renderer *a, SDL_RendererInfo *b),(a,b),return)
318 SDL20_SYM(SDL_Texture *,CreateTexture,(SDL_Renderer *a, Uint32 b, int c, int d, int e),(a,b,c,d,e),return)
319 SDL20_SYM(int,LockTexture,(SDL_Texture *a, const SDL_Rect *b, void **c, int *d),(a,b,c,d),return)
320 SDL20_SYM(void,UnlockTexture,(SDL_Texture *a),(a),)
321 SDL20_SYM(int,UpdateTexture,(SDL_Texture *a, const SDL_Rect *b, const void *c, int d),(a,b,c,d),return)
322 SDL20_SYM(int,UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
323 SDL20_SYM(int,RenderSetLogicalSize,(SDL_Renderer *a, int b, int c),(a,b,c),return)
324 SDL20_SYM(int,SetRenderDrawColor,(SDL_Renderer *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return)
325 SDL20_SYM(int,RenderClear,(SDL_Renderer *a),(a),return)
326 SDL20_SYM(int,RenderCopy,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d),(a,b,c,d),return)
327 SDL20_SYM(void,DestroyTexture,(SDL_Texture *a),(a),)
328 SDL20_SYM(void,DestroyRenderer,(SDL_Renderer *a),(a),)
329 SDL20_SYM(void,RenderPresent,(SDL_Renderer *a),(a),)
330 
331 #ifdef _WIN32
332 SDL20_SYM_PASSTHROUGH(int,RegisterApp,(const char *a, Uint32 b, void *c),(a,b,c),return)
333 SDL20_SYM_PASSTHROUGH(void,UnregisterApp,(void),(),)
334 #endif
335 
336 /* These are optional OpenGL entry points for sdl12-compat's internal use. */
337 OPENGL_SYM(Core,const GLubyte *,glGetString,(GLenum a),(a),return)
338 OPENGL_SYM(Core,GLenum,glGetError,(),(),return)
339 OPENGL_SYM(Core,void,glClear,(GLbitfield a),(a),)
340 OPENGL_SYM(Core,GLboolean,glIsEnabled,(GLenum a),(a),return)
341 OPENGL_SYM(Core,void,glEnable,(GLenum a),(a),)
342 OPENGL_SYM(Core,void,glDisable,(GLenum a),(a),)
343 OPENGL_SYM(Core,void,glGetFloatv,(GLenum a, GLfloat *b),(a,b),)
344 OPENGL_SYM(Core,void,glGetIntegerv,(GLenum a, GLint *b),(a,b),)
345 OPENGL_SYM(Core,void,glClearColor,(GLfloat a,GLfloat b,GLfloat c,GLfloat d),(a,b,c,d),)
346 OPENGL_SYM(Core,void,glViewport,(GLint a, GLint b, GLsizei c, GLsizei d),(a,b,c,d),)
347 OPENGL_SYM(Core,void,glScissor,(GLint a, GLint b, GLsizei c, GLsizei d),(a,b,c,d),)
348 OPENGL_SYM(Core,void,glReadPixels,(GLint a, GLint b, GLsizei c, GLsizei d, GLenum e, GLenum f, void *g),(a,b,c,d,e,f,g,h,i),)
349 OPENGL_SYM(Core,void,glCopyPixels,(GLint a, GLint b, GLsizei c, GLsizei d, GLenum e),(a,b,c,d,e),)
350 OPENGL_SYM(Core,void,glCopyTexImage1D,(GLenum a, GLint b, GLenum c, GLint d, GLint e, GLsizei f, GLint g),(a,b,c,d,e,f,g),)
351 OPENGL_SYM(Core,void,glCopyTexSubImage1D,(GLenum a, GLint b, GLint c, GLint d, GLint e, GLsizei f),(a,b,c,d,e,f),)
352 OPENGL_SYM(Core,void,glCopyTexImage2D,(GLenum a, GLint b, GLenum c, GLint d, GLint e, GLsizei f, GLsizei g, GLint h),(a,b,c,d,e,f,g,h),)
353 OPENGL_SYM(Core,void,glCopyTexSubImage2D,(GLenum a, GLint b, GLint c, GLint d, GLint e, GLint f, GLsizei g, GLsizei h),(a,b,c,d,e,f,g,h),)
354 OPENGL_SYM(Core,void,glCopyTexSubImage3D,(GLenum a, GLint b, GLint c, GLint d, GLint e, GLint f, GLsizei g, GLsizei h, GLint i),(a,b,c,d,e,f,g,h,i),)
355 
356 OPENGL_SYM(Core,void,glDeleteTextures,(GLsizei a, const GLuint *b),(a,b),)
357 OPENGL_SYM(Core,void,glGenTextures,(GLsizei a, GLuint *b),(a,b),)
358 OPENGL_SYM(Core,void,glPopAttrib,(),(),)
359 OPENGL_SYM(Core,void,glPopClientAttrib,(),(),)
360 OPENGL_SYM(Core,void,glPopMatrix,(),(),)
361 OPENGL_SYM(Core,void,glBegin,(GLenum a),(a),)
362 OPENGL_SYM(Core,void,glPushAttrib,(GLbitfield a),(a),)
363 OPENGL_SYM(Core,void,glPushClientAttrib,(GLbitfield a),(a),)
364 OPENGL_SYM(Core,void,glBindTexture,(GLenum a, GLuint b),(a,b),)
365 OPENGL_SYM(Core,void,glEnd,(),(),)
366 OPENGL_SYM(Core,void,glTexEnvf,(GLenum a, GLenum b, GLfloat c),(a,b,c),)
367 OPENGL_SYM(Core,void,glTexParameteri,(GLenum a, GLenum b, GLint c),(a,b,c),)
368 OPENGL_SYM(Core,void,glPixelStorei,(GLenum a, GLint b),(a,b),)
369 OPENGL_SYM(Core,void,glBlendFunc,(GLenum a, GLenum b),(a,b),)
370 OPENGL_SYM(Core,void,glColor4f,(GLfloat a, GLfloat b, GLfloat c, GLfloat d),(a,b,c,d),)
371 OPENGL_SYM(Core,void,glMatrixMode,(GLenum a),(a),)
372 OPENGL_SYM(Core,void,glLoadIdentity,(),(),)
373 OPENGL_SYM(Core,void,glPushMatrix,(),(),)
374 OPENGL_SYM(Core,void,glOrtho,(GLdouble a, GLdouble b, GLdouble c, GLdouble d, GLdouble e, GLdouble f),(a,b,c,d,e,f),)
375 OPENGL_SYM(Core,void,glTexImage2D,(GLenum a, GLint b, GLint c, GLsizei d, GLsizei e, GLint f, GLenum g, GLenum h, const GLvoid *i),(a,b,c,d,e,f,g,h,i),)
376 OPENGL_SYM(Core,void,glTexSubImage2D,(GLenum a, GLint b, GLint c, GLint d, GLsizei e, GLsizei f, GLenum g, GLenum h, const GLvoid *i),(a,b,c,d,e,f,g,h,i),)
377 OPENGL_SYM(Core,void,glVertex2i,(GLint a, GLint b),(a,b),)
378 OPENGL_SYM(Core,void,glTexCoord2f,(GLfloat a, GLfloat b),(a,b),)
379 
380 
381 OPENGL_EXT(GL_ARB_framebuffer_object)
382 OPENGL_SYM(GL_ARB_framebuffer_object,void,glBindRenderbuffer,(GLenum a, GLuint b),(a,b),)
383 OPENGL_SYM(GL_ARB_framebuffer_object,void,glDeleteRenderbuffers,(GLsizei a, const GLuint *b),(a,b),)
384 OPENGL_SYM(GL_ARB_framebuffer_object,void,glGenRenderbuffers,(GLsizei a, GLuint *b),(a,b),)
385 OPENGL_SYM(GL_ARB_framebuffer_object,void,glRenderbufferStorage,(GLenum a, GLenum b, GLsizei c, GLsizei d),(a,b,c,d),)
386 OPENGL_SYM(GL_ARB_framebuffer_object,void,glRenderbufferStorageMultisample,(GLenum a, GLsizei b, GLenum c, GLsizei d, GLsizei e),(a,b,c,d,e),)
387 OPENGL_SYM(GL_ARB_framebuffer_object,void,glGetRenderbufferParameteriv,(GLenum a, GLenum b, GLint* c),(a,b,c),)
388 OPENGL_SYM(GL_ARB_framebuffer_object,GLboolean,glIsFramebuffer,(GLuint a),(a),return)
389 OPENGL_SYM(GL_ARB_framebuffer_object,void,glBindFramebuffer,(GLenum a, GLuint b),(a,b),)
390 OPENGL_SYM(GL_ARB_framebuffer_object,void,glDeleteFramebuffers,(GLsizei a, const GLuint *b),(a,b),)
391 OPENGL_SYM(GL_ARB_framebuffer_object,void,glGenFramebuffers,(GLsizei a, GLuint *b),(a,b),)
392 OPENGL_SYM(GL_ARB_framebuffer_object,GLenum,glCheckFramebufferStatus,(GLenum a),(a),return)
393 OPENGL_SYM(GL_ARB_framebuffer_object,void,glFramebufferRenderbuffer,(GLenum a, GLenum b, GLenum c, GLuint d),(a,b,c,d),)
394 OPENGL_SYM(GL_ARB_framebuffer_object,void,glBlitFramebuffer,(GLint a, GLint b, GLint c, GLint d, GLint e, GLint f, GLint g, GLint h, GLbitfield i, GLenum j),(a,b,c,d,e,f,g,h,i,j),)
395 
396 OPENGL_EXT(GL_ARB_texture_non_power_of_two)
397 
398 #undef SDL20_SYM
399 #undef SDL20_SYM_PASSTHROUGH
400 #undef SDL20_SYM_VARARGS
401 #undef OPENGL_SYM
402 #undef OPENGL_EXT
403 
404 /* vi: set ts=4 sw=4 expandtab: */
405 
406