45 /* Set up for C function definitions, even when using C++ */ |
47 /* Set up for C function definitions, even when using C++ */ |
46 #ifdef __cplusplus |
48 #ifdef __cplusplus |
47 extern "C" { |
49 extern "C" { |
48 #endif |
50 #endif |
49 |
51 |
50 /* As of version 0.5, SDL is loaded dynamically into the application */ |
52 /** @file SDL.h |
|
53 * @note As of version 0.5, SDL is loaded dynamically into the application |
|
54 */ |
51 |
55 |
52 /* These are the flags which may be passed to SDL_Init() -- you should |
56 /** @name SDL_INIT Flags |
53 specify the subsystems which you will be using in your application. |
57 * These are the flags which may be passed to SDL_Init() -- you should |
54 */ |
58 * specify the subsystems which you will be using in your application. |
|
59 */ |
|
60 /*@{*/ |
55 #define SDL_INIT_TIMER 0x00000001 |
61 #define SDL_INIT_TIMER 0x00000001 |
56 #define SDL_INIT_AUDIO 0x00000010 |
62 #define SDL_INIT_AUDIO 0x00000010 |
57 #define SDL_INIT_VIDEO 0x00000020 |
63 #define SDL_INIT_VIDEO 0x00000020 |
58 #define SDL_INIT_CDROM 0x00000100 |
64 #define SDL_INIT_CDROM 0x00000100 |
59 #define SDL_INIT_JOYSTICK 0x00000200 |
65 #define SDL_INIT_JOYSTICK 0x00000200 |
60 #define SDL_INIT_NOPARACHUTE 0x00100000 /* Don't catch fatal signals */ |
66 #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */ |
61 #define SDL_INIT_EVENTTHREAD 0x01000000 /* Not supported on all OS's */ |
67 #define SDL_INIT_EVENTTHREAD 0x01000000 /**< Not supported on all OS's */ |
62 #define SDL_INIT_EVERYTHING 0x0000FFFF |
68 #define SDL_INIT_EVERYTHING 0x0000FFFF |
|
69 /*@}*/ |
63 |
70 |
64 /* This function loads the SDL dynamically linked library and initializes |
71 /** This function loads the SDL dynamically linked library and initializes |
65 * the subsystems specified by 'flags' (and those satisfying dependencies) |
72 * the subsystems specified by 'flags' (and those satisfying dependencies) |
66 * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup |
73 * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup |
67 * signal handlers for some commonly ignored fatal signals (like SIGSEGV) |
74 * signal handlers for some commonly ignored fatal signals (like SIGSEGV) |
68 */ |
75 */ |
69 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); |
76 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); |
70 |
77 |
71 /* This function initializes specific SDL subsystems */ |
78 /** This function initializes specific SDL subsystems */ |
72 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); |
79 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); |
73 |
80 |
74 /* This function cleans up specific SDL subsystems */ |
81 /** This function cleans up specific SDL subsystems */ |
75 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); |
82 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); |
76 |
83 |
77 /* This function returns mask of the specified subsystems which have |
84 /** This function returns mask of the specified subsystems which have |
78 been initialized. |
85 * been initialized. |
79 If 'flags' is 0, it returns a mask of all initialized subsystems. |
86 * If 'flags' is 0, it returns a mask of all initialized subsystems. |
80 */ |
87 */ |
81 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); |
88 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); |
82 |
89 |
83 /* This function cleans up all initialized subsystems and unloads the |
90 /** This function cleans up all initialized subsystems and unloads the |
84 * dynamically linked library. You should call it upon all exit conditions. |
91 * dynamically linked library. You should call it upon all exit conditions. |
85 */ |
92 */ |
86 extern DECLSPEC void SDLCALL SDL_Quit(void); |
93 extern DECLSPEC void SDLCALL SDL_Quit(void); |
87 |
94 |
88 /* Ends C function definitions when using C++ */ |
95 /* Ends C function definitions when using C++ */ |
89 #ifdef __cplusplus |
96 #ifdef __cplusplus |