home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / SDL / include / clib / SDL_protos.h
Encoding:
C/C++ Source or Header  |  2002-10-27  |  7.5 KB  |  211 lines

  1. #ifndef SDL_PROTOS
  2.  
  3. #include "SDL_types.h"
  4.  
  5. #define SDL_PROTOS
  6.  
  7. #if 0
  8. typedef void * SDL_RWops;
  9. typedef void * FILE;
  10. typedef void * SDL_Surface;
  11. typedef void * SDL_Rect;
  12. typedef void * SDL_Event;
  13. typedef void * SDL_PixelFormat;
  14. typedef void * SDL_VideoInfo;
  15. typedef long SDL_eventaction;
  16. #endif
  17.  
  18. /* General */
  19. int SDL_Init(Uint32 flags);
  20. void SDL_Quit(void);
  21. int SDL_InitSubSystem(Uint32 flags);
  22. void SDL_QuitSubSystem(Uint32 flags);
  23. Uint32 SDL_WasInit(Uint32 flags);
  24.  
  25.  
  26. /* RWOps */
  27. SDL_RWops * SDL_RWFromFile(const char *file, const char *mode);
  28. SDL_RWops * SDL_RWFromFP(FILE *fp, int autoclose);
  29. SDL_RWops * SDL_RWFromMem(void *mem, int size);
  30. SDL_RWops * SDL_AllocRW(void);
  31. void SDL_FreeRW(SDL_RWops *area);
  32.  
  33.  
  34. /* Gfx */
  35. SDL_Surface * SDL_LoadBMP_RW(SDL_RWops *src, int freesrc);
  36. SDL_Surface * SDL_DisplayFormat(SDL_Surface *surface);
  37. void SDL_FreeSurface(SDL_Surface *surface);
  38. int SDL_FillRect
  39.         (SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
  40. int SDL_UpperBlit
  41.             (SDL_Surface *src, SDL_Rect *srcrect,
  42.              SDL_Surface *dst, SDL_Rect *dstrect);
  43. int SDL_Flip(SDL_Surface *screen);
  44. void SDL_UpdateRects
  45.         (SDL_Surface *screen, int numrects, SDL_Rect *rects);
  46. void SDL_UpdateRect
  47.         (SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h);
  48. const SDL_VideoInfo * SDL_GetVideoInfo(void);
  49. SDL_Surface *SDL_SetVideoMode
  50.             (int width, int height, int bpp, Uint32 flags);
  51. Uint32 SDL_MapRGB
  52.             (SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b);
  53. Uint32 SDL_MapRGBA(SDL_PixelFormat *format,
  54.                    Uint8 r, Uint8 g, Uint8 b, Uint8 a);
  55.  
  56. char *SDL_VideoDriverName(char *namebuf, int maxlen);
  57. SDL_Surface * SDL_GetVideoSurface(void);
  58. int SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags);
  59. SDL_Rect ** SDL_ListModes(SDL_PixelFormat *format, Uint32 flags);
  60. int SDL_SetGamma(float red, float green, float blue);
  61. int SDL_SetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue);
  62. int SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue);
  63. int SDL_SetColors(SDL_Surface *surface, 
  64.             SDL_Color *colors, int firstcolor, int ncolors);
  65. int SDL_SetPalette(SDL_Surface *surface, int flags,
  66.                    SDL_Color *colors, int firstcolor,
  67.                    int ncolors);
  68. void SDL_GetRGB(Uint32 pixel, SDL_PixelFormat *fmt,
  69.                 Uint8 *r, Uint8 *g, Uint8 *b);
  70. void SDL_GetRGBA(Uint32 pixel, SDL_PixelFormat *fmt,
  71.                  Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);
  72. SDL_Surface *SDL_CreateRGBSurface
  73.             (Uint32 flags, int width, int height, int depth, 
  74.             Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
  75. SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels,
  76.             int width, int height, int depth, int pitch,
  77.             Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
  78. int SDL_LockSurface(SDL_Surface *surface);
  79. void SDL_UnlockSurface(SDL_Surface *surface);
  80. int SDL_SaveBMP_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst);
  81. int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key);
  82. int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
  83. SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect);
  84. void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect);
  85. SDL_Surface *SDL_ConvertSurface
  86.             (SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags);
  87. SDL_Surface * SDL_DisplayFormatAlpha(SDL_Surface *surface);
  88.  
  89. /* Overlay */
  90. SDL_Overlay *SDL_CreateYUVOverlay(int width, int height,
  91.                 Uint32 format, SDL_Surface *display);
  92. int SDL_LockYUVOverlay(SDL_Overlay *overlay);
  93. void SDL_UnlockYUVOverlay(SDL_Overlay *overlay);
  94. int SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect);
  95. void SDL_FreeYUVOverlay(SDL_Overlay *overlay);
  96.  
  97. /* GL */
  98. int SDL_GL_LoadLibrary(const char *path);
  99. void *SDL_GL_GetProcAddress(const char* proc);
  100. int SDL_GL_SetAttribute(SDL_GLattr attr, int value);
  101. int SDL_GL_GetAttribute(SDL_GLattr attr, int* value);
  102. void SDL_GL_SwapBuffers(void);
  103. void SDL_GL_UpdateRects(int numrects, SDL_Rect* rects);
  104. void SDL_GL_Lock(void);
  105. void SDL_GL_Unlock(void);
  106.  
  107. /* WM */
  108. void SDL_WM_SetCaption(const char *title, const char *icon);
  109. void SDL_WM_GetCaption(char **title, char **icon);
  110. void SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);
  111. int SDL_WM_IconifyWindow(void);
  112. int SDL_WM_ToggleFullScreen(SDL_Surface *surface);
  113. SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
  114.  
  115. /* timer */
  116.  
  117. Uint32 SDL_GetTicks(void);
  118. void SDL_Delay(Uint32 ms);
  119. int SDL_SetTimer(Uint32 interval, SDL_TimerCallback callback);
  120. SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_NewTimerCallback callback, void *param);
  121. SDL_bool SDL_RemoveTimer(SDL_TimerID t);
  122.  
  123. /* events */
  124. void SDL_PumpEvents(void);
  125. int SDL_PollEvent(SDL_Event *event);
  126. int SDL_WaitEvent(SDL_Event *event);
  127. int SDL_PeepEvents(SDL_Event *events, int numevents,
  128.                 SDL_eventaction action, Uint32 mask);
  129. int SDL_PushEvent(SDL_Event *event);
  130. void SDL_SetEventFilter(SDL_EventFilter filter);
  131. SDL_EventFilter SDL_GetEventFilter(void);
  132. Uint8 SDL_EventState(Uint8 type, int state);
  133.  
  134. /* joystick */
  135. int SDL_NumJoysticks(void);
  136. const char *SDL_JoystickName(int device_index);
  137. SDL_Joystick *SDL_JoystickOpen(int device_index);
  138. int SDL_JoystickOpened(int device_index);
  139. int SDL_JoystickIndex(SDL_Joystick *joystick);
  140. int SDL_JoystickNumAxes(SDL_Joystick *joystick);
  141. int SDL_JoystickNumBalls(SDL_Joystick *joystick);
  142. int SDL_JoystickNumHats(SDL_Joystick *joystick);
  143. int SDL_JoystickNumButtons(SDL_Joystick *joystick);
  144. void SDL_JoystickUpdate(void);
  145. int SDL_JoystickEventState(int state);
  146. Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis);
  147. Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat);
  148. int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);
  149. Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button);
  150. void SDL_JoystickClose(SDL_Joystick *joystick);
  151.  
  152. /* keyboard */
  153. int SDL_EnableUNICODE(int enable);
  154. int SDL_EnableKeyRepeat(int delay, int interval);
  155. Uint8 * SDL_GetKeyState(int *numkeys);
  156. SDLMod SDL_GetModState(void);
  157. void SDL_SetModState(SDLMod modstate);
  158. char * SDL_GetKeyName(SDLKey key);
  159.  
  160. /* mouse */
  161. Uint8 SDL_GetMouseState(int *x, int *y);
  162. Uint8 SDL_GetRelativeMouseState(int *x, int *y);
  163. void SDL_WarpMouse(Uint16 x, Uint16 y);
  164. SDL_Cursor *SDL_CreateCursor(Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);
  165. void SDL_SetCursor(SDL_Cursor *cursor);
  166. SDL_Cursor * SDL_GetCursor(void);
  167. void SDL_FreeCursor(SDL_Cursor *cursor);
  168. int SDL_ShowCursor(int toggle);
  169.  
  170. /* application */
  171. Uint8 SDL_GetAppState(void);
  172.  
  173. /* error */
  174. void SDL_SetError(const char *fmt,args...);
  175. void SDL_SetErrorA(const char *fmt,unsigned long *arglist);
  176. char *SDL_GetError(void);
  177. void SDL_ClearError(void);
  178.  
  179. /* audio */
  180. int SDL_AudioInit(const char *driver_name);
  181. void SDL_AudioQuit(void);
  182. char *SDL_AudioDriverName(char *namebuf, int maxlen);
  183. int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
  184. SDL_audiostatus SDL_GetAudioStatus(void);
  185. void SDL_PauseAudio(int pause_on);
  186. SDL_AudioSpec *SDL_LoadWAV_RW(SDL_RWops *src, int freesrc,
  187.          SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);
  188. void SDL_FreeWAV(Uint8 *audio_buf);
  189. int SDL_BuildAudioCVT(SDL_AudioCVT *cvt,
  190.         Uint16 src_format, Uint8 src_channels, int src_rate,
  191.         Uint16 dst_format, Uint8 dst_channels, int dst_rate);
  192. int SDL_ConvertAudio(SDL_AudioCVT *cvt);
  193. void SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume);
  194. void SDL_LockAudio(void);
  195. void SDL_UnlockAudio(void);
  196. void SDL_CloseAudio(void);
  197.  
  198. /* thread */
  199. SDL_Thread * SDL_CreateThread(int (*fn)(void *), void *data);
  200. Uint32 SDL_ThreadID(void);
  201. Uint32 SDL_GetThreadID(SDL_Thread *thread);
  202. void SDL_WaitThread(SDL_Thread *thread, int *status);
  203. void SDL_KillThread(SDL_Thread *thread);
  204.  
  205. /* version */
  206. const SDL_version * SDL_Linked_Version(void);
  207.  
  208. /* extensions */
  209. int SDL_SoftStretch(SDL_Surface *, SDL_Rect *, SDL_Surface *, SDL_Rect *);
  210. #endif
  211.