include/SDL.h
author Sam Lantinga <slouken@libsdl.org>
Tue, 23 Oct 2012 17:11:22 -0700
changeset 6602 533131e24aeb
parent 6342 ac83b73f0edd
child 6690 9548c8a58103
permissions -rw-r--r--
Added API for simple messagebox, courtesy of Mike Sartain
     1 /*
     2   Simple DirectMedia Layer
     3   Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    21 
    22 /**
    23  *  \file SDL.h
    24  *  
    25  *  Main include header for the SDL library
    26  */
    27 
    28 /**
    29  *  \mainpage Simple DirectMedia Layer (SDL)
    30  *  
    31  *  http://www.libsdl.org/
    32  *  
    33  *  \section intro_sec Introduction
    34  *  
    35  *  This is the Simple DirectMedia Layer, a general API that provides low
    36  *  level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
    37  *  and 2D framebuffer across multiple platforms.
    38  *  
    39  *  SDL is written in C, but works with C++ natively, and has bindings to
    40  *  several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
    41  *  Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
    42  *  Pike, Pliant, Python, Ruby, and Smalltalk.
    43  *  
    44  *  This library is distributed under GNU LGPL version 2, which can be
    45  *  found in the file  "COPYING".  This license allows you to use SDL
    46  *  freely in commercial programs as long as you link with the dynamic
    47  *  library.
    48  *  
    49  *  The best way to learn how to use SDL is to check out the header files in
    50  *  the "include" subdirectory and the programs in the "test" subdirectory.
    51  *  The header files and test programs are well commented and always up to date.
    52  *  More documentation is available in HTML format in "docs/index.html", and
    53  *  a documentation wiki is available online at:
    54  *  	http://www.libsdl.org/cgi/docwiki.cgi
    55  *  
    56  *  The test programs in the "test" subdirectory are in the public domain.
    57  *  
    58  *  Frequently asked questions are answered online:
    59  *  	http://www.libsdl.org/faq.php
    60  *  
    61  *  If you need help with the library, or just want to discuss SDL related
    62  *  issues, you can join the developers mailing list:
    63  *  	http://www.libsdl.org/mailing-list.php
    64  *  
    65  *  Enjoy!
    66  *  	Sam Lantinga				(slouken@libsdl.org)
    67  */
    68 
    69 #ifndef _SDL_H
    70 #define _SDL_H
    71 
    72 #include "SDL_main.h"
    73 #include "SDL_stdinc.h"
    74 #include "SDL_assert.h"
    75 #include "SDL_atomic.h"
    76 #include "SDL_audio.h"
    77 #include "SDL_clipboard.h"
    78 #include "SDL_cpuinfo.h"
    79 #include "SDL_endian.h"
    80 #include "SDL_error.h"
    81 #include "SDL_events.h"
    82 #include "SDL_hints.h"
    83 #include "SDL_loadso.h"
    84 #include "SDL_log.h"
    85 #include "SDL_messagebox.h"
    86 #include "SDL_mutex.h"
    87 #include "SDL_power.h"
    88 #include "SDL_render.h"
    89 #include "SDL_rwops.h"
    90 #include "SDL_system.h"
    91 #include "SDL_thread.h"
    92 #include "SDL_timer.h"
    93 #include "SDL_version.h"
    94 #include "SDL_video.h"
    95 
    96 #include "begin_code.h"
    97 /* Set up for C function definitions, even when using C++ */
    98 #ifdef __cplusplus
    99 /* *INDENT-OFF* */
   100 extern "C" {
   101 /* *INDENT-ON* */
   102 #endif
   103 
   104 /* As of version 0.5, SDL is loaded dynamically into the application */
   105 
   106 /**
   107  *  \name SDL_INIT_*
   108  *  
   109  *  These are the flags which may be passed to SDL_Init().  You should
   110  *  specify the subsystems which you will be using in your application.
   111  */
   112 /*@{*/
   113 #define SDL_INIT_TIMER          0x00000001
   114 #define SDL_INIT_AUDIO          0x00000010
   115 #define SDL_INIT_VIDEO          0x00000020
   116 #define SDL_INIT_JOYSTICK       0x00000200
   117 #define SDL_INIT_HAPTIC         0x00001000
   118 #define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
   119 #define SDL_INIT_EVERYTHING     0x0000FFFF
   120 /*@}*/
   121 
   122 /**
   123  *  This function initializes  the subsystems specified by \c flags
   124  *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
   125  *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
   126  */
   127 extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
   128 
   129 /**
   130  *  This function initializes specific SDL subsystems
   131  */
   132 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
   133 
   134 /**
   135  *  This function cleans up specific SDL subsystems
   136  */
   137 extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
   138 
   139 /**
   140  *  This function returns a mask of the specified subsystems which have
   141  *  previously been initialized.
   142  *  
   143  *  If \c flags is 0, it returns a mask of all initialized subsystems.
   144  */
   145 extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
   146 
   147 /**
   148  *  This function cleans up all initialized subsystems. You should
   149  *  call it upon all exit conditions.
   150  */
   151 extern DECLSPEC void SDLCALL SDL_Quit(void);
   152 
   153 /* Ends C function definitions when using C++ */
   154 #ifdef __cplusplus
   155 /* *INDENT-OFF* */
   156 }
   157 /* *INDENT-ON* */
   158 #endif
   159 #include "close_code.h"
   160 
   161 #endif /* _SDL_H */
   162 
   163 /* vi: set ts=4 sw=4 expandtab: */