2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2010 Sam Lantinga
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 // 7/31/2010 Wei Mingzhi
23 // Removed everything unrated to Mac OS X Joystick support
28 * Main include header for the SDL library
32 * \mainpage Simple DirectMedia Layer (SDL)
34 * http://www.libsdl.org/
36 * \section intro_sec Introduction
38 * This is the Simple DirectMedia Layer, a general API that provides low
39 * level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
40 * and 2D framebuffer across multiple platforms.
42 * The current version supports Windows, Windows CE, Mac OS X, Linux,
43 * FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, and QNX. The code contains
44 * support for other operating systems but those are not officially supported.
46 * SDL is written in C, but works with C++ natively, and has bindings to
47 * several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
48 * Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
49 * Pike, Pliant, Python, Ruby, and Smalltalk.
51 * This library is distributed under GNU LGPL version 2, which can be
52 * found in the file "COPYING". This license allows you to use SDL
53 * freely in commercial programs as long as you link with the dynamic
56 * The best way to learn how to use SDL is to check out the header files in
57 * the "include" subdirectory and the programs in the "test" subdirectory.
58 * The header files and test programs are well commented and always up to date.
59 * More documentation is available in HTML format in "docs/index.html", and
60 * a documentation wiki is available online at:
61 * http://www.libsdl.org/cgi/docwiki.cgi
63 * The test programs in the "test" subdirectory are in the public domain.
65 * Frequently asked questions are answered online:
66 * http://www.libsdl.org/faq.php
68 * If you need help with the library, or just want to discuss SDL related
69 * issues, you can join the developers mailing list:
70 * http://www.libsdl.org/mailing-list.php
73 * Sam Lantinga (slouken@libsdl.org)
80 #include "SDL_stdinc.h"
81 #include "SDL_endian.h"
82 #include "SDL_error.h"
88 #include "begin_code.h"
89 /* Set up for C function definitions, even when using C++ */
96 /* As of version 0.5, SDL is loaded dynamically into the application */
101 * These are the flags which may be passed to SDL_Init(). You should
102 * specify the subsystems which you will be using in your application.
105 #define SDL_INIT_JOYSTICK 0x00000200
106 #define SDL_INIT_HAPTIC 0x00001000
107 #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
108 #define SDL_INIT_EVERYTHING 0x0000FFFF
112 * This function loads the SDL dynamically linked library and initializes
113 * the subsystems specified by \c flags (and those satisfying dependencies).
114 * Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
115 * signal handlers for some commonly ignored fatal signals (like SIGSEGV).
117 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
120 * This function initializes specific SDL subsystems
122 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
125 * This function cleans up specific SDL subsystems
127 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
130 * This function returns mask of the specified subsystems which have
133 * If \c flags is 0, it returns a mask of all initialized subsystems.
135 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
138 * This function cleans up all initialized subsystems and unloads the
139 * dynamically linked library. You should call it upon all exit conditions.
141 extern DECLSPEC void SDLCALL SDL_Quit(void);
143 /* Ends C function definitions when using C++ */
149 #include "close_code.h"