|
|
1.1 ! root 1: #ifndef _SDLFUNCS_H_ ! 2: #define _SDLFUNCS_H_ ! 3: ! 4: #include "SDL.h" ! 5: #include "SDL_thread.h" ! 6: #include "SDL_syswm.h" ! 7: ! 8: struct sdlfuncs { ! 9: int (*Init) (Uint32 flags); ! 10: void (*Quit) (void); ! 11: void (*SetModuleHandle) (void *hInst); ! 12: int (*mutexP) (SDL_mutex *mutex); ! 13: int (*mutexV) (SDL_mutex *mutex); ! 14: int (*PeepEvents) (SDL_Event *events, int numevents, ! 15: SDL_eventaction action, Uint32 mask); ! 16: char *(*VideoDriverName) (char *namebuf, int maxlen); ! 17: int (*SemWait) (SDL_sem *sem); ! 18: int (*SemPost) (SDL_sem *sem); ! 19: Uint8 (*EventState) (Uint8 type, int state); ! 20: SDL_Surface *(*CreateRGBSurface) (Uint32 flags, int width, int height, int depth, ! 21: Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); ! 22: SDL_Surface *(*CreateRGBSurfaceFrom)(void *pixels, int width, int height, int depth, int pitch, ! 23: Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); ! 24: int (*FillRect) (SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color); ! 25: int (*SetColors) (SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors); ! 26: int (*BlitSurface) (SDL_Surface *src, SDL_Rect *srcrect, ! 27: SDL_Surface *dst, SDL_Rect *dstrect); ! 28: void (*UpdateRects) (SDL_Surface *screen, int numrects, SDL_Rect *rects); ! 29: void (*UpdateRect) (SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h); ! 30: SDL_sem *(*SDL_CreateSemaphore) (Uint32 initial_value); ! 31: void (*SDL_DestroySemaphore) (SDL_sem *semaphore); ! 32: SDL_mutex *(*SDL_CreateMutex) (void); ! 33: struct SDL_Thread *(*CreateThread) (int (*fn)(void *), void *data); ! 34: void (*KillThread) (SDL_Thread *thread); ! 35: void (*WaitThread) (SDL_Thread *thread, int *status); ! 36: int (*WaitEvent) (SDL_Event *event); ! 37: SDL_Surface *(*SetVideoMode) (int width, int height, int bpp, Uint32 flags); ! 38: void (*FreeSurface) (SDL_Surface *surface); ! 39: void (*WM_SetCaption) (const char *title, const char *icon); ! 40: void (*WM_SetIcon) (SDL_Surface *icon, Uint8 *mask); ! 41: int (*ShowCursor) (int toggle); ! 42: Uint32 (*WasInit) (Uint32 flags); ! 43: int (*EnableUNICODE) (int enable); ! 44: int (*EnableKeyRepeat) (int delay, int interval); ! 45: int (*GetWMInfo) (SDL_SysWMinfo *info); ! 46: char *(*GetError) (void); ! 47: int (*InitSubSystem)(Uint32 flags); ! 48: void (*QuitSubSystem)(Uint32 flags); ! 49: int (*OpenAudio)(SDL_AudioSpec *desired, SDL_AudioSpec *obtained); ! 50: void (*CloseAudio)(void); ! 51: void (*LockAudio)(void); ! 52: void (*UnlockAudio)(void); ! 53: void (*PauseAudio)(int pause_on); ! 54: SDL_audiostatus (*GetAudioStatus)(void); ! 55: Uint32 (*MapRGB) (SDL_PixelFormat *fmt, Uint8 r, Uint8 g, Uint8 b); ! 56: int (*LockSurface) (SDL_Surface *surface); ! 57: void (*UnlockSurface) (SDL_Surface *surface); ! 58: SDL_Surface *(*DisplayFormat)(SDL_Surface *surf); ! 59: int (*Flip) (SDL_Surface *surface); ! 60: SDL_Overlay *(*CreateYUVOverlay)(int width, int height, Uint32 format, SDL_Surface *display); ! 61: int (*DisplayYUVOverlay)(SDL_Overlay *overlay, SDL_Rect *dstrect); ! 62: void (*FreeYUVOverlay) (SDL_Overlay *overlay); ! 63: int (*LockYUVOverlay) (SDL_Overlay *overlay); ! 64: void (*UnlockYUVOverlay) (SDL_Overlay *overlay); ! 65: const SDL_VideoInfo *(*GetVideoInfo)(void); ! 66: const SDL_version *(*Linked_Version)(void); ! 67: SDL_VideoInfo initial_videoinfo; ! 68: int gotfuncs; ! 69: }; ! 70: ! 71: /* Defined in SDL_win32_main.c for Win32 */ ! 72: extern struct sdlfuncs sdl; ! 73: extern SDL_sem *sdl_exit_sem; ! 74: ! 75: #ifdef __cplusplus ! 76: extern "C" { ! 77: #endif ! 78: int load_sdl_funcs(struct sdlfuncs *sdlf); ! 79: int init_sdl_audio(void); ! 80: int init_sdl_video(void); ! 81: int SDL_main_env(int argc, char *argv[], char **env); ! 82: void run_sdl_drawing_thread(int (*drawing_thread)(void *data), void (*exit_drawing_thread)(void)); ! 83: #ifdef __cplusplus ! 84: } ! 85: #endif ! 86: ! 87: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.