src/SDL20_syms.h
author Ryan C. Gordon <icculus@icculus.org>
Thu, 11 Apr 2013 00:20:35 -0400
changeset 24 13ff8808236a
parent 23 171a5eadaca3
child 25 2dfd8573dba0
permissions -rw-r--r--
Implemented ClipRect APIs.
     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(void,GetClipRect,(SDL_Surface *a, SDL_Rect *b),(a,b),)
    49 SDL20_SYM(SDL_bool,SetClipRect,(SDL_Surface *a, const SDL_Rect *b),(a,b),return)
    50 
    51 SDL20_SYM_PASSTHROUGH(int,ShowCursor,(int a),(a),return)
    52 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)
    53 SDL20_SYM(void,SetCursor,(SDL_Cursor *a),(a),)
    54 SDL20_SYM(SDL_Cursor *,GetCursor,(void),(),return)
    55 SDL20_SYM(void,FreeCursor,(SDL_Cursor *a),(a),)
    56 
    57 SDL20_SYM_PASSTHROUGH(Uint32,GetThreadID,(SDL_Thread *a),(a),return)
    58 SDL20_SYM_PASSTHROUGH(Uint32,ThreadID,(void),(),return)
    59 SDL20_SYM_PASSTHROUGH(void,WaitThread,(SDL_Thread *a, int *b),(a,b),)
    60 SDL20_SYM_PASSTHROUGH(SDL_mutex*,CreateMutex,(void),(),return)
    61 SDL20_SYM_PASSTHROUGH(int,mutexP,(SDL_mutex *a),(a),return)
    62 SDL20_SYM_PASSTHROUGH(int,mutexV,(SDL_mutex *a),(a),return)
    63 SDL20_SYM_PASSTHROUGH(void,DestroyMutex,(SDL_mutex *a),(a),)
    64 SDL20_SYM_PASSTHROUGH(SDL_sem*,CreateSemaphore,(Uint32 a),(a),return)
    65 SDL20_SYM_PASSTHROUGH(void,DestroySemaphore,(SDL_sem *a),(a),)
    66 SDL20_SYM_PASSTHROUGH(int,SemWait,(SDL_sem *a),(a),return)
    67 SDL20_SYM_PASSTHROUGH(int,SemTryWait,(SDL_sem *a),(a),return)
    68 SDL20_SYM_PASSTHROUGH(int,SemWaitTimeout,(SDL_sem *a, Uint32 b),(a,b),return)
    69 SDL20_SYM_PASSTHROUGH(int,SemPost,(SDL_sem *a),(a),return)
    70 SDL20_SYM_PASSTHROUGH(Uint32,SemValue,(SDL_sem *a),(a),return)
    71 SDL20_SYM_PASSTHROUGH(SDL_cond*,CreateCond,(void),(),return)
    72 SDL20_SYM_PASSTHROUGH(void,DestroyCond,(SDL_cond *a),(a),)
    73 SDL20_SYM_PASSTHROUGH(int,CondSignal,(SDL_cond *a),(a),return)
    74 SDL20_SYM_PASSTHROUGH(int,CondBroadcast,(SDL_cond *a),(a),return)
    75 SDL20_SYM_PASSTHROUGH(int,CondWait,(SDL_cond *a, SDL_mutex *b),(a,b),return)
    76 SDL20_SYM_PASSTHROUGH(int,CondWaitTimeout,(SDL_cond *a, SDL_mutex *b, Uint32 c),(a,b,c),return)
    77 
    78 SDL20_SYM(SDL_AudioSpec *,LoadWAV_RW,(SDL_RWops *a, int b, SDL_AudioSpec *c, Uint8 **d, Uint32 *e),(a,b,c,d,e),return)
    79 SDL20_SYM_PASSTHROUGH(int,OpenAudio,(SDL_AudioSpec *a, SDL_AudioSpec *b),(a,b),return)
    80 SDL20_SYM_PASSTHROUGH(SDL_AudioStatus,GetAudioStatus,(void),(),return)
    81 SDL20_SYM_PASSTHROUGH(void,PauseAudio,(int a),(a),)
    82 SDL20_SYM_PASSTHROUGH(void,FreeWAV,(Uint8 *a),(a),)
    83 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)
    84 SDL20_SYM_PASSTHROUGH(int,ConvertAudio,(SDL_AudioCVT *a),(a),return)
    85 SDL20_SYM_PASSTHROUGH(void,MixAudio,(Uint8 *a, const Uint8 *b, Uint32 c, int d),(a,b,c,d),)
    86 SDL20_SYM_PASSTHROUGH(void,LockAudio,(void),(),)
    87 SDL20_SYM_PASSTHROUGH(void,UnlockAudio,(void),(),)
    88 SDL20_SYM_PASSTHROUGH(void,CloseAudio,(void),(),)
    89 
    90 SDL20_SYM_PASSTHROUGH(void*,LoadObject,(const char *a),(a),return)
    91 SDL20_SYM_PASSTHROUGH(void*,LoadFunction,(void *a, const char *b),(a,b),return)
    92 SDL20_SYM_PASSTHROUGH(void,UnloadObject,(void *a),(a),)
    93 
    94 SDL20_SYM_PASSTHROUGH(SDL_bool,HasRDTSC,(void),(),return)
    95 SDL20_SYM_PASSTHROUGH(SDL_bool,HasMMX,(void),(),return)
    96 SDL20_SYM_PASSTHROUGH(SDL_bool,HasMMXExt,(void),(),return)
    97 SDL20_SYM_PASSTHROUGH(SDL_bool,Has3DNow,(void),(),return)
    98 SDL20_SYM_PASSTHROUGH(SDL_bool,Has3DNowExt,(void),(),return)
    99 SDL20_SYM_PASSTHROUGH(SDL_bool,HasSSE,(void),(),return)
   100 SDL20_SYM_PASSTHROUGH(SDL_bool,HasSSE2,(void),(),return)
   101 SDL20_SYM_PASSTHROUGH(SDL_bool,HasAltiVec,(void),(),return)
   102 
   103 SDL20_SYM(SDL_TimerID,AddTimer,(Uint32 a, SDL_TimerCallback b, void *c),(a,b,c),return)
   104 SDL20_SYM(SDL_bool,RemoveTimer,(SDL_TimerID a),(a),return)
   105 SDL20_SYM_PASSTHROUGH(Uint32,GetTicks,(void),(),return)
   106 SDL20_SYM_PASSTHROUGH(void,Delay,(Uint32 a),(a),)
   107 
   108 SDL20_SYM_PASSTHROUGH(int,NumJoysticks,(void),(),return)
   109 SDL20_SYM_PASSTHROUGH(const char *,JoystickName,(int a),(a),return)
   110 SDL20_SYM_PASSTHROUGH(SDL_Joystick *,JoystickOpen,(int a),(a),return)
   111 SDL20_SYM_PASSTHROUGH(int,JoystickOpened,(int a),(a),return)
   112 SDL20_SYM_PASSTHROUGH(int,JoystickIndex,(SDL_Joystick *a),(a),return)
   113 SDL20_SYM_PASSTHROUGH(int,JoystickNumAxes,(SDL_Joystick *a),(a),return)
   114 SDL20_SYM_PASSTHROUGH(int,JoystickNumBalls,(SDL_Joystick *a),(a),return)
   115 SDL20_SYM_PASSTHROUGH(int,JoystickNumHats,(SDL_Joystick *a),(a),return)
   116 SDL20_SYM_PASSTHROUGH(int,JoystickNumButtons,(SDL_Joystick *a),(a),return)
   117 SDL20_SYM_PASSTHROUGH(void,JoystickUpdate,(void),(),)
   118 SDL20_SYM_PASSTHROUGH(int,JoystickEventState,(int a),(a),return)
   119 SDL20_SYM_PASSTHROUGH(Sint16,JoystickGetAxis,(SDL_Joystick *a, int b),(a,b),return)
   120 SDL20_SYM_PASSTHROUGH(Uint8,JoystickGetHat,(SDL_Joystick *a, int b),(a,b),return)
   121 SDL20_SYM_PASSTHROUGH(int,JoystickGetBall,(SDL_Joystick *a, int b, int *c, int *d),(a,b,c,d),return)
   122 SDL20_SYM_PASSTHROUGH(Uint8,JoystickGetButton,(SDL_Joystick *a, int b),(a,b),return)
   123 SDL20_SYM_PASSTHROUGH(void,JoystickClose,(SDL_Joystick *a),(a),return)
   124 
   125 /* We don't call most things that use 2.0 RWops, so most aren't listed here. */
   126 SDL20_SYM(SDL_RWops *,SDL_RWFromFile,(const char *a, const char *b),(a,b),return)
   127 SDL20_SYM(SDL_RWops *,SDL_RWFromFP,(FILE *a, int b),(a,b),return)
   128 SDL20_SYM(SDL_RWops *,SDL_RWFromMem,(void *a, int b),(a,b),return)
   129 SDL20_SYM(SDL_RWops *,SDL_RWFromConstMem,(const void *a, int b),(a,b),return)
   130 
   131 SDL20_SYM_PASSTHROUGH(void *,malloc,(size_t a),(a),return)
   132 SDL20_SYM_PASSTHROUGH(void *,calloc,(size_t a, size_t b),(a,b),return)
   133 SDL20_SYM_PASSTHROUGH(void *,realloc,(void *a, size_t b),(a,b),return)
   134 SDL20_SYM_PASSTHROUGH(void,free,(void *a),(a),)
   135 SDL20_SYM_PASSTHROUGH(char *,getenv,(const char *a),(a),return)
   136 SDL20_SYM_PASSTHROUGH(void,qsort,(void *a, size_t b, size_t c, int (*d)(const void *, const void *)),(a,b,c,d),)
   137 SDL20_SYM_PASSTHROUGH(void *,memset,(void *a, int b, size_t c),(a,b,c),return)
   138 SDL20_SYM_PASSTHROUGH(void *,memcpy,(void *a, const void *b, size_t c),(a,b,c),return)
   139 SDL20_SYM_PASSTHROUGH(void *,revcpy,(void *a, const void *b, size_t c),(a,b,c),return)
   140 SDL20_SYM_PASSTHROUGH(int,memcmp,(const void *a, const void *b, size_t c),(a,b,c),return)
   141 SDL20_SYM_PASSTHROUGH(size_t,strlen,(const char *a),(a),return)
   142 SDL20_SYM_PASSTHROUGH(size_t,strlcpy,(char *a, const char *b, size_t c),(a,b,c),return)
   143 SDL20_SYM_PASSTHROUGH(size_t,strlcat,(char *a, const char *b, size_t c),(a,b,c),return)
   144 SDL20_SYM_PASSTHROUGH(char *,strdup,(const char *a),(a),return)
   145 SDL20_SYM_PASSTHROUGH(char *,strrev,(char *a),(a),return)
   146 SDL20_SYM_PASSTHROUGH(char *,strupr,(char *a),(a),return)
   147 SDL20_SYM_PASSTHROUGH(char *,strlwr,(char *a),(a),return)
   148 SDL20_SYM_PASSTHROUGH(char *,strchr,(const char *a, int b),(a,b),return)
   149 SDL20_SYM_PASSTHROUGH(char *,strrchr,(const char *a, int b),(a,b),return)
   150 SDL20_SYM_PASSTHROUGH(char *,strstr,(const char *a, const char *b),(a,b),return)
   151 SDL20_SYM_PASSTHROUGH(char *,ltoa,(long a, char *b, int c),(a,b,c),return)
   152 SDL20_SYM_PASSTHROUGH(char *,ultoa,(unsigned long a, char *b, int c),(a,b,c),return)
   153 SDL20_SYM_PASSTHROUGH(long,strtol,(const char *a, char **b, int c),(a,b,c),return)
   154 SDL20_SYM_PASSTHROUGH(unsigned long,strtoul,(const char *a, char **b, int c),(a,b,c),return)
   155 SDL20_SYM_PASSTHROUGH(char*,lltoa,(Sint64 a, char *b, int c),(a,b,c),return)
   156 SDL20_SYM_PASSTHROUGH(char*,ulltoa,(Uint64 a, char *b, int c),(a,b,c),return)
   157 SDL20_SYM_PASSTHROUGH(Sint64,strtoll,(const char *a, char **b, int c),(a,b,c),return)
   158 SDL20_SYM_PASSTHROUGH(Uint64,strtoull,(const char *a, char **b, int c),(a,b,c),return)
   159 SDL20_SYM_PASSTHROUGH(double,strtod,(const char *a, char **b),(a,b),return)
   160 SDL20_SYM_PASSTHROUGH(int,strcmp,(const char *a, const char *b),(a,b),return)
   161 SDL20_SYM_PASSTHROUGH(int,strncmp,(const char *a, const char *b, size_t c),(a,b,c),return)
   162 SDL20_SYM_PASSTHROUGH(int,strcasecmp,(const char *a, const char *b),(a,b),return)
   163 SDL20_SYM_PASSTHROUGH(int,strncasecmp,(const char *a, const char *b, size_t c),(a,b,c),return)
   164 //SDL20_SYM_PASSTHROUGH(int,sscanf,(const char *text, const char *fmt, ...);
   165 //SDL20_SYM_PASSTHROUGH(int,snprintf,(char *text, size_t maxlen, const char *fmt, ...);
   166 SDL20_SYM_PASSTHROUGH(int,vsnprintf,(char *a, size_t b, const char *c, va_list d),(a,b,c,d),return)
   167 SDL20_SYM_PASSTHROUGH(SDL_iconv_t,iconv_open,(const char *a, const char *b),(a,b),return)
   168 SDL20_SYM_PASSTHROUGH(int,iconv_close,(SDL_iconv_t a),(a),return)
   169 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)
   170 SDL20_SYM_PASSTHROUGH(char *,iconv_string,(const char *a, const char *b, const char *c, size_t d),(a,b,c,d),return)
   171 
   172 /* vi: set ts=4 sw=4 expandtab: */
   173