src/SDL20_syms.h
author Ryan C. Gordon <icculus@icculus.org>
Wed, 10 Apr 2013 15:49:41 -0400
changeset 22 fc1fad22e997
parent 21 acd0dd6933f3
child 23 171a5eadaca3
permissions -rw-r--r--
A couple SDL20 passthrough function cleanups.
     1 /*
     2   Simple DirectMedia Layer
     3   Copyright (C) 1997-2013 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 SDL20_SYM(int,Init,(Uint32 a),(a),return)
    25 SDL20_SYM(int,InitSubSystem,(Uint32 a),(a),return)
    26 SDL20_SYM(char*,GetError,(void),(),return)
    27 SDL20_SYM_PASSTHROUGH(void,Error,(SDL_errorcode a),(a),)
    28 /*SDL20_SYM_PASSTHROUGH(void,SetError,(const char *fmt, ...);*/
    29 SDL20_SYM_PASSTHROUGH(void,ClearError,(void),(),)
    30 SDL20_SYM(void,Quit,(void),(),)
    31 SDL20_SYM(void,QuitSubSystem,(Uint32 a),(a),)
    32 SDL20_SYM_PASSTHROUGH(int,VideoInit,(const char *a),(a),return)
    33 SDL20_SYM_PASSTHROUGH(void,VideoQuit,(void),(),)
    34 SDL20_SYM_PASSTHROUGH(int,AudioInit,(const char *a),(a),return)
    35 SDL20_SYM_PASSTHROUGH(void,AudioQuit,(void),(),)
    36 
    37 SDL20_SYM_PASSTHROUGH(void,PumpEvents,(void),(),)
    38 
    39 SDL20_SYM(SDL_PixelFormat *,AllocFormat,(Uint32 a),(a),return)
    40 SDL20_SYM(void,FreeFormat,(SDL_PixelFormat *a),(a),)
    41 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)
    42 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)
    43 SDL20_SYM(void,FreeSurface,(SDL_Surface *a),(a),)
    44 SDL20_SYM(SDL_Surface*,LoadBMP_RW,(SDL_RWops *a, int b),(a,b),return)
    45 SDL20_SYM(int,SaveBMP_RW,(SDL_Surface *a, SDL_RWops *b, int c),(a,b,c),return)
    46 SDL20_SYM_PASSTHROUGH(int,GL_LoadLibrary,(const char *a),(a),return)
    47 SDL20_SYM_PASSTHROUGH(void *,GL_GetProcAddress,(const char *a),(a),return)
    48 SDL20_SYM_PASSTHROUGH(int,ShowCursor,(int a),(a),return)
    49 
    50 SDL20_SYM_PASSTHROUGH(Uint32,GetThreadID,(SDL_Thread *a),(a),return)
    51 SDL20_SYM_PASSTHROUGH(Uint32,ThreadID,(void),(),return)
    52 SDL20_SYM_PASSTHROUGH(void,WaitThread,(SDL_Thread *a, int *b),(a,b),)
    53 SDL20_SYM_PASSTHROUGH(SDL_mutex*,CreateMutex,(void),(),return)
    54 SDL20_SYM_PASSTHROUGH(int,mutexP,(SDL_mutex *a),(a),return)
    55 SDL20_SYM_PASSTHROUGH(int,mutexV,(SDL_mutex *a),(a),return)
    56 SDL20_SYM_PASSTHROUGH(void,DestroyMutex,(SDL_mutex *a),(a),)
    57 SDL20_SYM_PASSTHROUGH(SDL_sem*,CreateSemaphore,(Uint32 a),(a),return)
    58 SDL20_SYM_PASSTHROUGH(void,DestroySemaphore,(SDL_sem *a),(a),)
    59 SDL20_SYM_PASSTHROUGH(int,SemWait,(SDL_sem *a),(a),return)
    60 SDL20_SYM_PASSTHROUGH(int,SemTryWait,(SDL_sem *a),(a),return)
    61 SDL20_SYM_PASSTHROUGH(int,SemWaitTimeout,(SDL_sem *a, Uint32 b),(a,b),return)
    62 SDL20_SYM_PASSTHROUGH(int,SemPost,(SDL_sem *a),(a),return)
    63 SDL20_SYM_PASSTHROUGH(Uint32,SemValue,(SDL_sem *a),(a),return)
    64 SDL20_SYM_PASSTHROUGH(SDL_cond*,CreateCond,(void),(),return)
    65 SDL20_SYM_PASSTHROUGH(void,DestroyCond,(SDL_cond *a),(a),)
    66 SDL20_SYM_PASSTHROUGH(int,CondSignal,(SDL_cond *a),(a),return)
    67 SDL20_SYM_PASSTHROUGH(int,CondBroadcast,(SDL_cond *a),(a),return)
    68 SDL20_SYM_PASSTHROUGH(int,CondWait,(SDL_cond *a, SDL_mutex *b),(a,b),return)
    69 SDL20_SYM_PASSTHROUGH(int,CondWaitTimeout,(SDL_cond *a, SDL_mutex *b, Uint32 c),(a,b,c),return)
    70 
    71 SDL20_SYM(SDL_AudioSpec *,LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
    72 SDL20_SYM_PASSTHROUGH(int,OpenAudio,(SDL_AudioSpec *a, SDL_AudioSpec *b),(a,b),return)
    73 SDL20_SYM_PASSTHROUGH(SDL_AudioStatus,GetAudioStatus,(void),(),return)
    74 SDL20_SYM_PASSTHROUGH(void,PauseAudio,(int a),(a),)
    75 SDL20_SYM_PASSTHROUGH(void,FreeWAV,(Uint8 *a),(a),)
    76 SDL20_SYM_PASSTHROUGH(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)
    77 SDL20_SYM_PASSTHROUGH(int,ConvertAudio,(SDL_AudioCVT *a),(a),return)
    78 SDL20_SYM_PASSTHROUGH(void,MixAudio,(Uint8 *a, const Uint8 *b, Uint32 c, int d),(a,b,c,d),)
    79 SDL20_SYM_PASSTHROUGH(void,LockAudio,(void),(),)
    80 SDL20_SYM_PASSTHROUGH(void,UnlockAudio,(void),(),)
    81 SDL20_SYM_PASSTHROUGH(void,CloseAudio,(void),(),)
    82 
    83 SDL20_SYM_PASSTHROUGH(void*,LoadObject,(const char *a),(a),return)
    84 SDL20_SYM_PASSTHROUGH(void*,LoadFunction,(void *a, const char *b),(a,b),return)
    85 SDL20_SYM_PASSTHROUGH(void,UnloadObject,(void *a),(a),)
    86 
    87 SDL20_SYM_PASSTHROUGH(SDL_bool,HasRDTSC,(void),(),return)
    88 SDL20_SYM_PASSTHROUGH(SDL_bool,HasMMX,(void),(),return)
    89 SDL20_SYM_PASSTHROUGH(SDL_bool,HasMMXExt,(void),(),return)
    90 SDL20_SYM_PASSTHROUGH(SDL_bool,Has3DNow,(void),(),return)
    91 SDL20_SYM_PASSTHROUGH(SDL_bool,Has3DNowExt,(void),(),return)
    92 SDL20_SYM_PASSTHROUGH(SDL_bool,HasSSE,(void),(),return)
    93 SDL20_SYM_PASSTHROUGH(SDL_bool,HasSSE2,(void),(),return)
    94 SDL20_SYM_PASSTHROUGH(SDL_bool,HasAltiVec,(void),(),return)
    95 
    96 SDL20_SYM(SDL_TimerID,AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return)
    97 SDL20_SYM(SDL_bool,RemoveTimer,(SDL_TimerID a),(a),return)
    98 SDL20_SYM_PASSTHROUGH(Uint32,GetTicks,(void),(),return)
    99 SDL20_SYM_PASSTHROUGH(void,Delay,(Uint32 a),(a),)
   100 
   101 SDL20_SYM_PASSTHROUGH(int,NumJoysticks,(void),(),return)
   102 SDL20_SYM_PASSTHROUGH(const char *,JoystickName,(int a),(a),return)
   103 SDL20_SYM_PASSTHROUGH(SDL_Joystick *,JoystickOpen,(int a),(a),return)
   104 SDL20_SYM_PASSTHROUGH(int,JoystickOpened,(int a),(a),return)
   105 SDL20_SYM_PASSTHROUGH(int,JoystickIndex,(SDL_Joystick *a),(a),return)
   106 SDL20_SYM_PASSTHROUGH(int,JoystickNumAxes,(SDL_Joystick *a),(a),return)
   107 SDL20_SYM_PASSTHROUGH(int,JoystickNumBalls,(SDL_Joystick *a),(a),return)
   108 SDL20_SYM_PASSTHROUGH(int,JoystickNumHats,(SDL_Joystick *a),(a),return)
   109 SDL20_SYM_PASSTHROUGH(int,JoystickNumButtons,(SDL_Joystick *a),(a),return)
   110 SDL20_SYM_PASSTHROUGH(void,JoystickUpdate,(void),(),)
   111 SDL20_SYM_PASSTHROUGH(int,JoystickEventState,(int a),(a),return)
   112 SDL20_SYM_PASSTHROUGH(Sint16,JoystickGetAxis,(SDL_Joystick *a, int b),(a,b),return)
   113 SDL20_SYM_PASSTHROUGH(Uint8,JoystickGetHat,(SDL_Joystick *a, int b),(a,b),return)
   114 SDL20_SYM_PASSTHROUGH(int,JoystickGetBall,(SDL_Joystick *a, int b, int *c, int *d),(a,b,c,d),return)
   115 SDL20_SYM_PASSTHROUGH(Uint8,JoystickGetButton,(SDL_Joystick *a, int b),(a,b),return)
   116 SDL20_SYM_PASSTHROUGH(void,JoystickClose,(SDL_Joystick *a),(a),return)
   117 
   118 /* We don't call most things that use 2.0 RWops, so most aren't listed here. */
   119 SDL20_SYM(SDL_RWops *,SDL_RWFromFile,(const char *a, const char *b),(a,b),return)
   120 SDL20_SYM(SDL_RWops *,SDL_RWFromFP,(FILE *a, int b),(a,b),return)
   121 SDL20_SYM(SDL_RWops *,SDL_RWFromMem,(void *a, int b),(a,b),return)
   122 SDL20_SYM(SDL_RWops *,SDL_RWFromConstMem,(const void *a, int b),(a,b),return)
   123 
   124 SDL20_SYM_PASSTHROUGH(void *,malloc,(size_t a),(a),return)
   125 SDL20_SYM_PASSTHROUGH(void *,calloc,(size_t a, size_t b),(a,b),return)
   126 SDL20_SYM_PASSTHROUGH(void *,realloc,(void *a, size_t b),(a,b),return)
   127 SDL20_SYM_PASSTHROUGH(void,free,(void *a),(a),)
   128 SDL20_SYM_PASSTHROUGH(char *,getenv,(const char *a),(a),return)
   129 SDL20_SYM_PASSTHROUGH(void,qsort,(void *a, size_t b, size_t c, int (*d)(const void *, const void *)),(a,b,c,d),)
   130 SDL20_SYM_PASSTHROUGH(void *,memset,(void *a, int b, size_t c),(a,b,c),return)
   131 SDL20_SYM_PASSTHROUGH(void *,memcpy,(void *a, const void *b, size_t c),(a,b,c),return)
   132 SDL20_SYM_PASSTHROUGH(void *,revcpy,(void *a, const void *b, size_t c),(a,b,c),return)
   133 SDL20_SYM_PASSTHROUGH(int,memcmp,(const void *a, const void *b, size_t c),(a,b,c),return)
   134 SDL20_SYM_PASSTHROUGH(size_t,strlen,(const char *a),(a),return)
   135 SDL20_SYM_PASSTHROUGH(size_t,strlcpy,(char *a, const char *b, size_t c),(a,b,c),return)
   136 SDL20_SYM_PASSTHROUGH(size_t,strlcat,(char *a, const char *b, size_t c),(a,b,c),return)
   137 SDL20_SYM_PASSTHROUGH(char *,strdup,(const char *a),(a),return)
   138 SDL20_SYM_PASSTHROUGH(char *,strrev,(char *a),(a),return)
   139 SDL20_SYM_PASSTHROUGH(char *,strupr,(char *a),(a),return)
   140 SDL20_SYM_PASSTHROUGH(char *,strlwr,(char *a),(a),return)
   141 SDL20_SYM_PASSTHROUGH(char *,strchr,(const char *a, int b),(a,b),return)
   142 SDL20_SYM_PASSTHROUGH(char *,strrchr,(const char *a, int b),(a,b),return)
   143 SDL20_SYM_PASSTHROUGH(char *,strstr,(const char *a, const char *b),(a,b),return)
   144 SDL20_SYM_PASSTHROUGH(char *,ltoa,(long a, char *b, int c),(a,b,c),return)
   145 SDL20_SYM_PASSTHROUGH(char *,ultoa,(unsigned long a, char *b, int c),(a,b,c),return)
   146 SDL20_SYM_PASSTHROUGH(long,strtol,(const char *a, char **b, int c),(a,b,c),return)
   147 SDL20_SYM_PASSTHROUGH(unsigned long,strtoul,(const char *a, char **b, int c),(a,b,c),return)
   148 SDL20_SYM_PASSTHROUGH(char*,lltoa,(Sint64 a, char *b, int c),(a,b,c),return)
   149 SDL20_SYM_PASSTHROUGH(char*,ulltoa,(Uint64 a, char *b, int c),(a,b,c),return)
   150 SDL20_SYM_PASSTHROUGH(Sint64,strtoll,(const char *a, char **b, int c),(a,b,c),return)
   151 SDL20_SYM_PASSTHROUGH(Uint64,strtoull,(const char *a, char **b, int c),(a,b,c),return)
   152 SDL20_SYM_PASSTHROUGH(double,strtod,(const char *a, char **b),(a,b),return)
   153 SDL20_SYM_PASSTHROUGH(int,strcmp,(const char *a, const char *b),(a,b),return)
   154 SDL20_SYM_PASSTHROUGH(int,strncmp,(const char *a, const char *b, size_t c),(a,b,c),return)
   155 SDL20_SYM_PASSTHROUGH(int,strcasecmp,(const char *a, const char *b),(a,b),return)
   156 SDL20_SYM_PASSTHROUGH(int,strncasecmp,(const char *a, const char *b, size_t c),(a,b,c),return)
   157 //SDL20_SYM_PASSTHROUGH(int,sscanf,(const char *text, const char *fmt, ...);
   158 //SDL20_SYM_PASSTHROUGH(int,snprintf,(char *text, size_t maxlen, const char *fmt, ...);
   159 SDL20_SYM_PASSTHROUGH(int,vsnprintf,(char *a, size_t b, const char *c, va_list d),(a,b,c,d),return)
   160 SDL20_SYM_PASSTHROUGH(SDL_iconv_t,iconv_open,(const char *a, const char *b),(a,b),return)
   161 SDL20_SYM_PASSTHROUGH(int,iconv_close,(SDL_iconv_t a),(a),return)
   162 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)
   163 SDL20_SYM_PASSTHROUGH(char *,iconv_string,(const char *a, const char *b, const char *c, size_t d),(a,b,c,d),return)
   164 
   165 /* vi: set ts=4 sw=4 expandtab: */
   166