include/SDL.h
author Sam Lantinga <slouken@libsdl.org>
Wed, 12 Jan 2011 15:42:26 -0800
changeset 4986 8431f59485d0
parent 4863 cfe6336d7e60
child 5006 8e8876e4aec6
permissions -rw-r--r--
Renderer didn't advertise texture format SDL_PIXELFORMAT_ABGR8888
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"
bob@3180
    79
#include "SDL_atomic.h"
slouken@0
    80
#include "SDL_audio.h"
slouken@4493
    81
#include "SDL_clipboard.h"
slouken@1358
    82
#include "SDL_cpuinfo.h"
slouken@1358
    83
#include "SDL_endian.h"
slouken@1358
    84
#include "SDL_error.h"
slouken@0
    85
#include "SDL_events.h"
slouken@1358
    86
#include "SDL_loadso.h"
slouken@1358
    87
#include "SDL_mutex.h"
icculus@3170
    88
#include "SDL_power.h"
slouken@1358
    89
#include "SDL_rwops.h"
slouken@1358
    90
#include "SDL_thread.h"
slouken@1358
    91
#include "SDL_timer.h"
slouken@3647
    92
#include "SDL_version.h"
slouken@0
    93
#include "SDL_video.h"
slouken@1895
    94
#include "SDL_compat.h"
slouken@0
    95
slouken@0
    96
#include "begin_code.h"
slouken@0
    97
/* Set up for C function definitions, even when using C++ */
slouken@0
    98
#ifdef __cplusplus
slouken@1895
    99
/* *INDENT-OFF* */
slouken@0
   100
extern "C" {
slouken@1895
   101
/* *INDENT-ON* */
slouken@0
   102
#endif
slouken@0
   103
slouken@0
   104
/* As of version 0.5, SDL is loaded dynamically into the application */
slouken@0
   105
slouken@3407
   106
/**
slouken@3407
   107
 *  \name SDL_INIT_*
slouken@3407
   108
 *  
slouken@3407
   109
 *  These are the flags which may be passed to SDL_Init().  You should
slouken@3407
   110
 *  specify the subsystems which you will be using in your application.
slouken@3407
   111
 */
slouken@3407
   112
/*@{*/
slouken@2713
   113
#define SDL_INIT_TIMER          0x00000001
slouken@2713
   114
#define SDL_INIT_AUDIO          0x00000010
slouken@2713
   115
#define SDL_INIT_VIDEO          0x00000020
slouken@2713
   116
#define SDL_INIT_JOYSTICK       0x00000200
slouken@2713
   117
#define SDL_INIT_HAPTIC         0x00001000
slouken@3407
   118
#define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
slouken@3407
   119
#define SDL_INIT_EVENTTHREAD    0x01000000      /**< Not supported on all OS's */
slouken@2713
   120
#define SDL_INIT_EVERYTHING     0x0000FFFF
slouken@3407
   121
/*@}*/
slouken@0
   122
slouken@3348
   123
/**
slouken@4863
   124
 *  This function initializes  the subsystems specified by \c flags
slouken@3407
   125
 *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
slouken@3407
   126
 *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
slouken@0
   127
 */
slouken@337
   128
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
slouken@0
   129
slouken@3348
   130
/**
slouken@3407
   131
 *  This function initializes specific SDL subsystems
slouken@3348
   132
 */
slouken@337
   133
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
   134
slouken@3407
   135
/**
slouken@3407
   136
 *  This function cleans up specific SDL subsystems
slouken@3407
   137
 */
slouken@337
   138
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
   139
slouken@3348
   140
/**
slouken@4627
   141
 *  This function returns a mask of the specified subsystems which have
slouken@4627
   142
 *  previously been initialized.
slouken@3407
   143
 *  
slouken@3407
   144
 *  If \c flags is 0, it returns a mask of all initialized subsystems.
slouken@3407
   145
 */
slouken@337
   146
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
   147
slouken@3348
   148
/**
slouken@4627
   149
 *  This function cleans up all initialized subsystems. You should
slouken@4627
   150
 *  call it upon all exit conditions.
slouken@0
   151
 */
slouken@337
   152
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
   153
slouken@0
   154
/* Ends C function definitions when using C++ */
slouken@0
   155
#ifdef __cplusplus
slouken@1895
   156
/* *INDENT-OFF* */
slouken@0
   157
}
slouken@1895
   158
/* *INDENT-ON* */
slouken@0
   159
#endif
slouken@0
   160
#include "close_code.h"
slouken@0
   161
slouken@0
   162
#endif /* _SDL_H */
slouken@1895
   163
slouken@1895
   164
/* vi: set ts=4 sw=4 expandtab: */