|
|
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: int (*FillRect) (SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
23: int (*SetColors) (SDL_Surface *surface, SDL_Color *colors, int firstcolor, int ncolors);
24: int (*BlitSurface) (SDL_Surface *src, SDL_Rect *srcrect,
25: SDL_Surface *dst, SDL_Rect *dstrect);
26: void (*UpdateRects) (SDL_Surface *screen, int numrects, SDL_Rect *rects);
27: SDL_sem *(*SDL_CreateSemaphore) (Uint32 initial_value);
28: void (*SDL_DestroySemaphore) (SDL_sem *semaphore);
29: SDL_mutex *(*SDL_CreateMutex) (void);
30: struct SDL_Thread *(*CreateThread) (int (*fn)(void *), void *data);
31: void (*KillThread) (SDL_Thread *thread);
32: void (*WaitThread) (SDL_Thread *thread, int *status);
33: int (*WaitEvent) (SDL_Event *event);
34: SDL_Surface *(*SetVideoMode) (int width, int height, int bpp, Uint32 flags);
35: void (*FreeSurface) (SDL_Surface *surface);
36: void (*WM_SetCaption) (const char *title, const char *icon);
37: int (*ShowCursor) (int toggle);
38: Uint32 (*WasInit) (Uint32 flags);
39: int (*EnableUNICODE) (int enable);
40: int (*EnableKeyRepeat) (int delay, int interval);
41: int (*GetWMInfo) (SDL_SysWMinfo *info);
42: char *(*GetError) (void);
43: int (*InitSubSystem)(Uint32 flags);
44: void (*QuitSubSystem)(Uint32 flags);
45: int (*OpenAudio)(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
46: void (*CloseAudio)(void);
47: void (*LockAudio)(void);
48: void (*UnlockAudio)(void);
49: void (*PauseAudio)(int pause_on);
50: SDL_audiostatus (*GetAudioStatus)(void);
51: int gotfuncs;
52: };
53:
54: /* Defined in SDL_win32_main.c for Win32 */
55: extern struct sdlfuncs sdl;
56: extern SDL_sem *sdl_exit_sem;
57:
58: #ifdef __cplusplus
59: extern "C" {
60: #endif
61: int load_sdl_funcs(struct sdlfuncs *sdlf);
62: int init_sdl_audio(void);
63: int init_sdl_video(void);
64: int SDL_main_env(int argc, char *argv[], char **env);
65: void run_sdl_drawing_thread(int (*drawing_thread)(void *data), void (*exit_drawing_thread)(void));
66: #ifdef __cplusplus
67: }
68: #endif
69:
70: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.