# sdl.h

Go to the documentation of this file.

    00001 /* $Id: sdl.h 15233 2009-01-23 17:32:01Z glx $ */
    00002
    00005 #ifndef SDL_H
    00006 #define SDL_H
    00007
    00008 const char *SdlOpen(uint32 x);
    00009 void SdlClose(uint32 x);
    00010
    00011 #ifdef WIN32
    00012   #define DYNAMICALLY_LOADED_SDL
    00013 #endif
    00014
    00015 #ifdef DYNAMICALLY_LOADED_SDL
    00016   #include <SDL.h>
    00017
    00018   struct SDLProcs {
    00019     int (SDLCALL *SDL_Init)(Uint32);
    00020     int (SDLCALL *SDL_InitSubSystem)(Uint32);
    00021     char *(SDLCALL *SDL_GetError)();
    00022     void (SDLCALL *SDL_QuitSubSystem)(Uint32);
    00023     void (SDLCALL *SDL_UpdateRect)(SDL_Surface *, Sint32, Sint32, Uint32, Uint32);
    00024     void (SDLCALL *SDL_UpdateRects)(SDL_Surface *, int, SDL_Rect *);
    00025     int (SDLCALL *SDL_SetColors)(SDL_Surface *, SDL_Color *, int, int);
    00026     void (SDLCALL *SDL_WM_SetCaption)(const char *, const char *);
    00027     int (SDLCALL *SDL_ShowCursor)(int);
    00028     void (SDLCALL *SDL_FreeSurface)(SDL_Surface *);
    00029     int (SDLCALL *SDL_PollEvent)(SDL_Event *);
    00030     void (SDLCALL *SDL_WarpMouse)(Uint16, Uint16);
    00031     uint32 (SDLCALL *SDL_GetTicks)();
    00032     int (SDLCALL *SDL_OpenAudio)(SDL_AudioSpec *, SDL_AudioSpec*);
    00033     void (SDLCALL *SDL_PauseAudio)(int);
    00034     void (SDLCALL *SDL_CloseAudio)();
    00035     int (SDLCALL *SDL_LockSurface)(SDL_Surface*);
    00036     void (SDLCALL *SDL_UnlockSurface)(SDL_Surface*);
    00037     SDLMod (SDLCALL *SDL_GetModState)();
    00038     void (SDLCALL *SDL_Delay)(Uint32);
    00039     void (SDLCALL *SDL_Quit)();
    00040     SDL_Surface *(SDLCALL *SDL_SetVideoMode)(int, int, int, Uint32);
    00041     int (SDLCALL *SDL_EnableKeyRepeat)(int, int);
    00042     void (SDLCALL *SDL_EnableUNICODE)(int);
    00043     void (SDLCALL *SDL_VideoDriverName)(char *, int);
    00044     SDL_Rect **(SDLCALL *SDL_ListModes)(void *, int);
    00045     Uint8 *(SDLCALL *SDL_GetKeyState)(int *);
    00046     SDL_Surface *(SDLCALL *SDL_LoadBMP_RW)(SDL_RWops *, int);
    00047     SDL_RWops *(SDLCALL *SDL_RWFromFile)(const char *, const char *);
    00048     int (SDLCALL *SDL_SetColorKey)(SDL_Surface *, Uint32, Uint32);
    00049     void (SDLCALL *SDL_WM_SetIcon)(SDL_Surface *, Uint8 *);
    00050     Uint32 (SDLCALL *SDL_MapRGB)(SDL_PixelFormat *, Uint8, Uint8, Uint8);
    00051     int (SDLCALL *SDL_VideoModeOK)(int, int, int, Uint32);
    00052   };
    00053
    00054   extern SDLProcs sdl_proc;
    00055
    00056   #define SDL_CALL sdl_proc.
    00057 #else
    00058   #define SDL_CALL
    00059 #endif
    00060
    00061 #endif /* SDL_H */