include/SDL.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 16 Jan 2011 17:45:42 -0800
changeset 5006 8e8876e4aec6
parent 4863 cfe6336d7e60
child 5017 a9a3b9852a4a
permissions -rw-r--r--
Include windows.h in SDL_atomic.h by default, but don't include the atomic API in SDL.h
This allows all SDL code to take advantage of the atomic intrinsics on Windows, but doesn't cause applications just including SDL.h to pull in windows.h
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@3697
     3
    Copyright (C) 1997-2010 Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@1312
     6
    modify it under the terms of the GNU Lesser General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@1312
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@0
     9
slouken@0
    10
    This library is distributed in the hope that it will be useful,
slouken@0
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1312
    13
    Lesser General Public License for more details.
slouken@0
    14
slouken@1312
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1312
    16
    License along with this library; if not, write to the Free Software
slouken@1312
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@251
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@0
    22
slouken@1895
    23
/**
slouken@3407
    24
 *  \file SDL.h
slouken@3407
    25
 *  
slouken@3407
    26
 *  Main include header for the SDL library
slouken@1895
    27
 */
slouken@3407
    28
slouken@1895
    29
/**
slouken@3407
    30
 *  \mainpage Simple DirectMedia Layer (SDL)
slouken@3407
    31
 *  
slouken@3407
    32
 *  http://www.libsdl.org/
slouken@3407
    33
 *  
slouken@3407
    34
 *  \section intro_sec Introduction
slouken@3407
    35
 *  
slouken@3407
    36
 *  This is the Simple DirectMedia Layer, a general API that provides low
slouken@3407
    37
 *  level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
slouken@3407
    38
 *  and 2D framebuffer across multiple platforms.
slouken@3407
    39
 *  
slouken@4453
    40
 *  The current version supports Windows, Windows CE, Mac OS X, Linux,
slouken@4453
    41
 *  FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, and QNX. The code contains
slouken@4453
    42
 *  support for other operating systems but those are not officially supported. 
slouken@3407
    43
 *  
slouken@3407
    44
 *  SDL is written in C, but works with C++ natively, and has bindings to
slouken@3407
    45
 *  several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
slouken@3407
    46
 *  Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
slouken@3407
    47
 *  Pike, Pliant, Python, Ruby, and Smalltalk.
slouken@3407
    48
 *  
slouken@3407
    49
 *  This library is distributed under GNU LGPL version 2, which can be
slouken@3407
    50
 *  found in the file  "COPYING".  This license allows you to use SDL
slouken@3407
    51
 *  freely in commercial programs as long as you link with the dynamic
slouken@3407
    52
 *  library.
slouken@3407
    53
 *  
slouken@3407
    54
 *  The best way to learn how to use SDL is to check out the header files in
slouken@3407
    55
 *  the "include" subdirectory and the programs in the "test" subdirectory.
slouken@3407
    56
 *  The header files and test programs are well commented and always up to date.
slouken@3407
    57
 *  More documentation is available in HTML format in "docs/index.html", and
slouken@3407
    58
 *  a documentation wiki is available online at:
slouken@3407
    59
 *  	http://www.libsdl.org/cgi/docwiki.cgi
slouken@3407
    60
 *  
slouken@3407
    61
 *  The test programs in the "test" subdirectory are in the public domain.
slouken@3407
    62
 *  
slouken@3407
    63
 *  Frequently asked questions are answered online:
slouken@3407
    64
 *  	http://www.libsdl.org/faq.php
slouken@3407
    65
 *  
slouken@3407
    66
 *  If you need help with the library, or just want to discuss SDL related
slouken@3407
    67
 *  issues, you can join the developers mailing list:
slouken@3407
    68
 *  	http://www.libsdl.org/mailing-list.php
slouken@3407
    69
 *  
slouken@3407
    70
 *  Enjoy!
slouken@3407
    71
 *  	Sam Lantinga				(slouken@libsdl.org)
slouken@1895
    72
 */
slouken@0
    73
slouken@0
    74
#ifndef _SDL_H
slouken@0
    75
#define _SDL_H
slouken@0
    76
slouken@1423
    77
#include "SDL_main.h"
slouken@1353
    78
#include "SDL_stdinc.h"
slouken@0
    79
#include "SDL_audio.h"
slouken@4493
    80
#include "SDL_clipboard.h"
slouken@1358
    81
#include "SDL_cpuinfo.h"
slouken@1358
    82
#include "SDL_endian.h"
slouken@1358
    83
#include "SDL_error.h"
slouken@0
    84
#include "SDL_events.h"
slouken@1358
    85
#include "SDL_loadso.h"
slouken@1358
    86
#include "SDL_mutex.h"
icculus@3170
    87
#include "SDL_power.h"
slouken@1358
    88
#include "SDL_rwops.h"
slouken@1358
    89
#include "SDL_thread.h"
slouken@1358
    90
#include "SDL_timer.h"
slouken@3647
    91
#include "SDL_version.h"
slouken@0
    92
#include "SDL_video.h"
slouken@1895
    93
#include "SDL_compat.h"
slouken@0
    94
slouken@0
    95
#include "begin_code.h"
slouken@0
    96
/* Set up for C function definitions, even when using C++ */
slouken@0
    97
#ifdef __cplusplus
slouken@1895
    98
/* *INDENT-OFF* */
slouken@0
    99
extern "C" {
slouken@1895
   100
/* *INDENT-ON* */
slouken@0
   101
#endif
slouken@0
   102
slouken@0
   103
/* As of version 0.5, SDL is loaded dynamically into the application */
slouken@0
   104
slouken@3407
   105
/**
slouken@3407
   106
 *  \name SDL_INIT_*
slouken@3407
   107
 *  
slouken@3407
   108
 *  These are the flags which may be passed to SDL_Init().  You should
slouken@3407
   109
 *  specify the subsystems which you will be using in your application.
slouken@3407
   110
 */
slouken@3407
   111
/*@{*/
slouken@2713
   112
#define SDL_INIT_TIMER          0x00000001
slouken@2713
   113
#define SDL_INIT_AUDIO          0x00000010
slouken@2713
   114
#define SDL_INIT_VIDEO          0x00000020
slouken@2713
   115
#define SDL_INIT_JOYSTICK       0x00000200
slouken@2713
   116
#define SDL_INIT_HAPTIC         0x00001000
slouken@3407
   117
#define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
slouken@3407
   118
#define SDL_INIT_EVENTTHREAD    0x01000000      /**< Not supported on all OS's */
slouken@2713
   119
#define SDL_INIT_EVERYTHING     0x0000FFFF
slouken@3407
   120
/*@}*/
slouken@0
   121
slouken@3348
   122
/**
slouken@4863
   123
 *  This function initializes  the subsystems specified by \c flags
slouken@3407
   124
 *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
slouken@3407
   125
 *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
slouken@0
   126
 */
slouken@337
   127
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
slouken@0
   128
slouken@3348
   129
/**
slouken@3407
   130
 *  This function initializes specific SDL subsystems
slouken@3348
   131
 */
slouken@337
   132
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
   133
slouken@3407
   134
/**
slouken@3407
   135
 *  This function cleans up specific SDL subsystems
slouken@3407
   136
 */
slouken@337
   137
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
   138
slouken@3348
   139
/**
slouken@4627
   140
 *  This function returns a mask of the specified subsystems which have
slouken@4627
   141
 *  previously been initialized.
slouken@3407
   142
 *  
slouken@3407
   143
 *  If \c flags is 0, it returns a mask of all initialized subsystems.
slouken@3407
   144
 */
slouken@337
   145
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
   146
slouken@3348
   147
/**
slouken@4627
   148
 *  This function cleans up all initialized subsystems. You should
slouken@4627
   149
 *  call it upon all exit conditions.
slouken@0
   150
 */
slouken@337
   151
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
   152
slouken@0
   153
/* Ends C function definitions when using C++ */
slouken@0
   154
#ifdef __cplusplus
slouken@1895
   155
/* *INDENT-OFF* */
slouken@0
   156
}
slouken@1895
   157
/* *INDENT-ON* */
slouken@0
   158
#endif
slouken@0
   159
#include "close_code.h"
slouken@0
   160
slouken@0
   161
#endif /* _SDL_H */
slouken@1895
   162
slouken@1895
   163
/* vi: set ts=4 sw=4 expandtab: */