include/SDL.h
author Ryan C. Gordon <icculus@icculus.org>
Sun, 07 Jun 2009 06:06:35 +0000
changeset 3170 b7a48f533966
parent 2859 99210400e8b9
child 3180 77d6336711fc
permissions -rw-r--r--
Initial work on power subsystem for SDL 1.3.
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@2859
     3
    Copyright (C) 1997-2009 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@1895
    24
 * \file SDL.h
slouken@1895
    25
 *
slouken@1895
    26
 * Main include header for the SDL library
slouken@1895
    27
 */
slouken@1895
    28
/**
slouken@1895
    29
 * \mainpage Simple DirectMedia Layer (SDL)
slouken@1895
    30
slouken@1895
    31
http://www.libsdl.org/
slouken@1895
    32
slouken@1895
    33
* \section intro_sec Introduction
slouken@1895
    34
slouken@1895
    35
This is the Simple DirectMedia Layer, a general API that provides low
slouken@1895
    36
level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
slouken@1895
    37
and 2D framebuffer across multiple platforms.
slouken@1895
    38
slouken@1895
    39
The current version supports Linux, Windows, Windows CE, BeOS, MacOS,
slouken@1895
    40
Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
icculus@2062
    41
The code contains support for Dreamcast, Atari, AIX, OSF/Tru64,
slouken@1895
    42
RISC OS, SymbianOS, and OS/2, but these are not officially supported.
slouken@1895
    43
slouken@1895
    44
SDL is written in C, but works with C++ natively, and has bindings to
slouken@1895
    45
several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
slouken@1895
    46
Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
slouken@1895
    47
Pike, Pliant, Python, Ruby, and Smalltalk.
slouken@1895
    48
slouken@1895
    49
This library is distributed under GNU LGPL version 2, which can be
slouken@1895
    50
found in the file  "COPYING".  This license allows you to use SDL
slouken@1895
    51
freely in commercial programs as long as you link with the dynamic
slouken@1895
    52
library.
slouken@1895
    53
slouken@1895
    54
The best way to learn how to use SDL is to check out the header files in
slouken@1895
    55
the "include" subdirectory and the programs in the "test" subdirectory.
slouken@1895
    56
The header files and test programs are well commented and always up to date.
slouken@1895
    57
More documentation is available in HTML format in "docs/index.html", and
slouken@1895
    58
a documentation wiki is available online at:
slouken@1895
    59
	http://www.libsdl.org/cgi/docwiki.cgi
slouken@1895
    60
slouken@1895
    61
The test programs in the "test" subdirectory are in the public domain.
slouken@1895
    62
slouken@1895
    63
Frequently asked questions are answered online:
slouken@1895
    64
	http://www.libsdl.org/faq.php
slouken@1895
    65
slouken@1895
    66
If you need help with the library, or just want to discuss SDL related
slouken@1895
    67
issues, you can join the developers mailing list:
slouken@1895
    68
	http://www.libsdl.org/mailing-list.php
slouken@1895
    69
slouken@1895
    70
Enjoy!
slouken@1895
    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@0
    80
#include "SDL_cdrom.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@0
    91
#include "SDL_video.h"
slouken@0
    92
#include "SDL_version.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@0
   105
/* These are the flags which may be passed to SDL_Init() -- you should
slouken@0
   106
   specify the subsystems which you will be using in your application.
slouken@0
   107
*/
slouken@2713
   108
#define SDL_INIT_TIMER          0x00000001
slouken@2713
   109
#define SDL_INIT_AUDIO          0x00000010
slouken@2713
   110
#define SDL_INIT_VIDEO          0x00000020
slouken@2713
   111
#define SDL_INIT_CDROM          0x00000100
slouken@2713
   112
#define SDL_INIT_JOYSTICK       0x00000200
slouken@2713
   113
#define SDL_INIT_HAPTIC         0x00001000
slouken@2713
   114
#define SDL_INIT_NOPARACHUTE    0x00100000      /* Don't catch fatal signals */
slouken@2713
   115
#define SDL_INIT_EVENTTHREAD    0x01000000      /* Not supported on all OS's */
slouken@2713
   116
#define SDL_INIT_EVERYTHING     0x0000FFFF
slouken@0
   117
slouken@0
   118
/* This function loads the SDL dynamically linked library and initializes 
slouken@0
   119
 * the subsystems specified by 'flags' (and those satisfying dependencies)
slouken@0
   120
 * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
slouken@0
   121
 * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
slouken@0
   122
 */
slouken@337
   123
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
slouken@0
   124
slouken@0
   125
/* This function initializes specific SDL subsystems */
slouken@337
   126
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
   127
slouken@0
   128
/* This function cleans up specific SDL subsystems */
slouken@337
   129
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
   130
slouken@0
   131
/* This function returns mask of the specified subsystems which have
slouken@0
   132
   been initialized.
slouken@0
   133
   If 'flags' is 0, it returns a mask of all initialized subsystems.
slouken@0
   134
*/
slouken@337
   135
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
   136
slouken@0
   137
/* This function cleans up all initialized subsystems and unloads the
slouken@0
   138
 * dynamically linked library.  You should call it upon all exit conditions.
slouken@0
   139
 */
slouken@337
   140
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
   141
slouken@0
   142
/* Ends C function definitions when using C++ */
slouken@0
   143
#ifdef __cplusplus
slouken@1895
   144
/* *INDENT-OFF* */
slouken@0
   145
}
slouken@1895
   146
/* *INDENT-ON* */
slouken@0
   147
#endif
slouken@0
   148
#include "close_code.h"
slouken@0
   149
slouken@0
   150
#endif /* _SDL_H */
slouken@1895
   151
slouken@1895
   152
/* vi: set ts=4 sw=4 expandtab: */