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