SDL Library

Dependents:   H261_decoder

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SDL.h Source File

SDL.h

Go to the documentation of this file.
00001 /*
00002   Simple DirectMedia Layer
00003   Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
00004 
00005   This software is provided 'as-is', without any express or implied
00006   warranty.  In no event will the authors be held liable for any damages
00007   arising from the use of this software.
00008 
00009   Permission is granted to anyone to use this software for any purpose,
00010   including commercial applications, and to alter it and redistribute it
00011   freely, subject to the following restrictions:
00012 
00013   1. The origin of this software must not be misrepresented; you must not
00014      claim that you wrote the original software. If you use this software
00015      in a product, an acknowledgment in the product documentation would be
00016      appreciated but is not required.
00017   2. Altered source versions must be plainly marked as such, and must not be
00018      misrepresented as being the original software.
00019   3. This notice may not be removed or altered from any source distribution.
00020 */
00021 
00022 /**
00023  *  \file SDL.h
00024  *
00025  *  Main include header for the SDL library
00026  */
00027 
00028 /**
00029  *  \mainpage Simple DirectMedia Layer (SDL)
00030  *
00031  *  http://www.libsdl.org/
00032  *
00033  *  \section intro_sec Introduction
00034  *
00035  *  Simple DirectMedia Layer is a cross-platform development library designed
00036  *  to provide low level access to audio, keyboard, mouse, joystick, and
00037  *  graphics hardware via OpenGL and Direct3D. It is used by video playback
00038  *  software, emulators, and popular games including Valve's award winning
00039  *  catalog and many Humble Bundle games.
00040  *
00041  *  SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
00042  *  Support for other platforms may be found in the source code.
00043  *
00044  *  SDL is written in C, works natively with C++, and there are bindings 
00045  *  available for several other languages, including C# and Python.
00046  *
00047  *  This library is distributed under the zlib license, which can be found
00048  *  in the file "COPYING.txt".
00049  *
00050  *  The best way to learn how to use SDL is to check out the header files in
00051  *  the "include" subdirectory and the programs in the "test" subdirectory.
00052  *  The header files and test programs are well commented and always up to date.
00053  *  More documentation and FAQs are available online at:
00054  *      http://wiki.libsdl.org/
00055  *
00056  *  If you need help with the library, or just want to discuss SDL related
00057  *  issues, you can join the developers mailing list:
00058  *      http://www.libsdl.org/mailing-list.php
00059  *
00060  *  Enjoy!
00061  *      Sam Lantinga                (slouken@libsdl.org)
00062  */
00063 
00064 #ifndef _SDL_H
00065 #define _SDL_H
00066 
00067 #include "SDL_main.h"
00068 #include "SDL_stdinc.h"
00069 #include "SDL_assert.h"
00070 #include "SDL_atomic.h"
00071 #include "SDL_audio.h"
00072 #include "SDL_clipboard.h"
00073 #include "SDL_cpuinfo.h"
00074 #include "SDL_endian.h"
00075 #include "SDL_error.h"
00076 #include "SDL_events.h"
00077 #include "SDL_filesystem.h"
00078 #include "SDL_joystick.h"
00079 #include "SDL_gamecontroller.h"
00080 #include "SDL_haptic.h"
00081 #include "SDL_hints.h"
00082 #include "SDL_loadso.h"
00083 #include "SDL_log.h"
00084 #include "SDL_messagebox.h"
00085 #include "SDL_mutex.h"
00086 #include "SDL_power.h"
00087 #include "SDL_render.h"
00088 #include "SDL_rwops.h"
00089 #include "SDL_system.h"
00090 #include "SDL_thread.h"
00091 #include "SDL_timer.h"
00092 #include "SDL_version.h"
00093 #include "SDL_video.h"
00094 
00095 #include "begin_code.h"
00096 /* Set up for C function definitions, even when using C++ */
00097 #ifdef __cplusplus
00098 extern "C" {
00099 #endif
00100 
00101 /* As of version 0.5, SDL is loaded dynamically into the application */
00102 
00103 /**
00104  *  \name SDL_INIT_*
00105  *
00106  *  These are the flags which may be passed to SDL_Init().  You should
00107  *  specify the subsystems which you will be using in your application.
00108  */
00109 /* @{ */
00110 #define SDL_INIT_TIMER          0x00000001
00111 #define SDL_INIT_AUDIO          0x00000010
00112 #define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
00113 #define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
00114 #define SDL_INIT_HAPTIC         0x00001000
00115 #define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
00116 #define SDL_INIT_EVENTS         0x00004000
00117 #define SDL_INIT_NOPARACHUTE    0x00100000  /**< Don't catch fatal signals */
00118 #define SDL_INIT_EVERYTHING ( \
00119                 SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
00120                 SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
00121             )
00122 /* @} */
00123 
00124 /**
00125  *  This function initializes  the subsystems specified by \c flags
00126  *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
00127  *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
00128  */
00129 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
00130 
00131 /**
00132  *  This function initializes specific SDL subsystems
00133  */
00134 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
00135 
00136 /**
00137  *  This function cleans up specific SDL subsystems
00138  */
00139 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
00140 
00141 /**
00142  *  This function returns a mask of the specified subsystems which have
00143  *  previously been initialized.
00144  *
00145  *  If \c flags is 0, it returns a mask of all initialized subsystems.
00146  */
00147 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
00148 
00149 /**
00150  *  This function cleans up all initialized subsystems. You should
00151  *  call it upon all exit conditions.
00152  */
00153 extern DECLSPEC void SDLCALL SDL_Quit(void);
00154 
00155 /* Ends C function definitions when using C++ */
00156 #ifdef __cplusplus
00157 }
00158 #endif
00159 #include "close_code.h"
00160 
00161 #endif /* _SDL_H */
00162 
00163 /* vi: set ts=4 sw=4 expandtab: */