00001 /* 00002 SDL - Simple DirectMedia Layer 00003 Copyright (C) 1997-2009 Sam Lantinga 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 Sam Lantinga 00020 slouken@libsdl.org 00021 */ 00022 00074 #ifndef _SDL_H 00075 #define _SDL_H 00076 00077 #include "SDL_main.h" 00078 #include "SDL_stdinc.h" 00079 #include "SDL_atomic.h" 00080 #include "SDL_audio.h" 00081 #include "SDL_cpuinfo.h" 00082 #include "SDL_endian.h" 00083 #include "SDL_error.h" 00084 #include "SDL_events.h" 00085 #include "SDL_loadso.h" 00086 #include "SDL_mutex.h" 00087 #include "SDL_power.h" 00088 #include "SDL_rwops.h" 00089 #include "SDL_thread.h" 00090 #include "SDL_timer.h" 00091 #include "SDL_video.h" 00092 #include "SDL_version.h" 00093 #include "SDL_compat.h" 00094 00095 #include "begin_code.h" 00096 /* Set up for C function definitions, even when using C++ */ 00097 #ifdef __cplusplus 00098 /* *INDENT-OFF* */ 00099 extern "C" { 00100 /* *INDENT-ON* */ 00101 #endif 00102 00103 /* As of version 0.5, SDL is loaded dynamically into the application */ 00104 00105 /* These are the flags which may be passed to SDL_Init() -- you should 00106 specify the subsystems which you will be using in your application. 00107 */ 00108 #define SDL_INIT_TIMER 0x00000001 00109 #define SDL_INIT_AUDIO 0x00000010 00110 #define SDL_INIT_VIDEO 0x00000020 00111 #define SDL_INIT_JOYSTICK 0x00000200 00112 #define SDL_INIT_HAPTIC 0x00001000 00113 #define SDL_INIT_NOPARACHUTE 0x00100000 /* Don't catch fatal signals */ 00114 #define SDL_INIT_EVENTTHREAD 0x01000000 /* Not supported on all OS's */ 00115 #define SDL_INIT_EVERYTHING 0x0000FFFF 00116 00117 /* This function loads the SDL dynamically linked library and initializes 00118 * the subsystems specified by 'flags' (and those satisfying dependencies) 00119 * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup 00120 * signal handlers for some commonly ignored fatal signals (like SIGSEGV) 00121 */ 00122 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); 00123 00124 /* This function initializes specific SDL subsystems */ 00125 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); 00126 00127 /* This function cleans up specific SDL subsystems */ 00128 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); 00129 00130 /* This function returns mask of the specified subsystems which have 00131 been initialized. 00132 If 'flags' is 0, it returns a mask of all initialized subsystems. 00133 */ 00134 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); 00135 00136 /* This function cleans up all initialized subsystems and unloads the 00137 * dynamically linked library. You should call it upon all exit conditions. 00138 */ 00139 extern DECLSPEC void SDLCALL SDL_Quit(void); 00140 00141 /* Ends C function definitions when using C++ */ 00142 #ifdef __cplusplus 00143 /* *INDENT-OFF* */ 00144 } 00145 /* *INDENT-ON* */ 00146 #endif 00147 #include "close_code.h" 00148 00149 #endif /* _SDL_H */ 00150 00151 /* vi: set ts=4 sw=4 expandtab: */