pcsxr-1.9.92
[pcsx_rearmed.git] / macosx / plugins / DFInput / SDL / include / SDL.h
1 /*
2     SDL - Simple DirectMedia Layer
3     Copyright (C) 1997-2010 Sam Lantinga
4
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.
9
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.
14
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
18
19     Sam Lantinga
20     slouken@libsdl.org
21 */
22 // 7/31/2010 Wei Mingzhi
23 // Removed everything unrated to Mac OS X Joystick support
24
25 /**
26  *  \file SDL.h
27  *  
28  *  Main include header for the SDL library
29  */
30
31 /**
32  *  \mainpage Simple DirectMedia Layer (SDL)
33  *  
34  *  http://www.libsdl.org/
35  *  
36  *  \section intro_sec Introduction
37  *  
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.
41  *  
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. 
45  *  
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.
50  *  
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
54  *  library.
55  *  
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
62  *  
63  *  The test programs in the "test" subdirectory are in the public domain.
64  *  
65  *  Frequently asked questions are answered online:
66  *      http://www.libsdl.org/faq.php
67  *  
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
71  *  
72  *  Enjoy!
73  *      Sam Lantinga                            (slouken@libsdl.org)
74  */
75
76 #ifndef _SDL_H
77 #define _SDL_H
78
79 #include "SDL_main.h"
80 #include "SDL_stdinc.h"
81 #include "SDL_endian.h"
82 #include "SDL_error.h"
83
84 #ifndef SDL_IGNORE
85 #define SDL_IGNORE 0
86 #endif
87
88 #include "begin_code.h"
89 /* Set up for C function definitions, even when using C++ */
90 #ifdef __cplusplus
91 /* *INDENT-OFF* */
92 extern "C" {
93 /* *INDENT-ON* */
94 #endif
95
96 /* As of version 0.5, SDL is loaded dynamically into the application */
97
98 /**
99  *  \name SDL_INIT_*
100  *  
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.
103  */
104 /*@{*/
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
109 /*@}*/
110
111 /**
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).
116  */
117 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
118
119 /**
120  *  This function initializes specific SDL subsystems
121  */
122 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
123
124 /**
125  *  This function cleans up specific SDL subsystems
126  */
127 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
128
129 /**
130  *  This function returns mask of the specified subsystems which have
131  *  been initialized.
132  *  
133  *  If \c flags is 0, it returns a mask of all initialized subsystems.
134  */
135 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
136
137 /**
138  *  This function cleans up all initialized subsystems and unloads the
139  *  dynamically linked library.  You should call it upon all exit conditions.
140  */
141 extern DECLSPEC void SDLCALL SDL_Quit(void);
142
143 /* Ends C function definitions when using C++ */
144 #ifdef __cplusplus
145 /* *INDENT-OFF* */
146 }
147 /* *INDENT-ON* */
148 #endif
149 #include "close_code.h"
150
151 #endif /* _SDL_H */