include/SDL.h
author Sam Lantinga <slouken@libsdl.org>
Sun, 06 Oct 2002 20:31:34 +0000
changeset 515 230b156829ed
parent 337 9154ec9ca3d2
child 769 b8d311d90021
permissions -rw-r--r--
*** empty log message ***
slouken@0
     1
/*
slouken@0
     2
    SDL - Simple DirectMedia Layer
slouken@297
     3
    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002  Sam Lantinga
slouken@0
     4
slouken@0
     5
    This library is free software; you can redistribute it and/or
slouken@0
     6
    modify it under the terms of the GNU Library General Public
slouken@0
     7
    License as published by the Free Software Foundation; either
slouken@0
     8
    version 2 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@0
    13
    Library General Public License for more details.
slouken@0
    14
slouken@0
    15
    You should have received a copy of the GNU Library General Public
slouken@0
    16
    License along with this library; if not, write to the Free
slouken@0
    17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
slouken@0
    18
slouken@0
    19
    Sam Lantinga
slouken@251
    20
    slouken@libsdl.org
slouken@0
    21
*/
slouken@0
    22
slouken@0
    23
#ifdef SAVE_RCSID
slouken@0
    24
static char rcsid =
slouken@0
    25
 "@(#) $Id$";
slouken@0
    26
#endif
slouken@0
    27
slouken@0
    28
/* Main include header for the SDL library */
slouken@0
    29
slouken@0
    30
#ifndef _SDL_H
slouken@0
    31
#define _SDL_H
slouken@0
    32
slouken@0
    33
#include "SDL_main.h"
slouken@0
    34
#include "SDL_types.h"
slouken@0
    35
#include "SDL_getenv.h"
slouken@0
    36
#include "SDL_error.h"
slouken@0
    37
#include "SDL_rwops.h"
slouken@0
    38
#include "SDL_timer.h"
slouken@0
    39
#include "SDL_audio.h"
slouken@0
    40
#include "SDL_cdrom.h"
slouken@0
    41
#include "SDL_joystick.h"
slouken@0
    42
#include "SDL_events.h"
slouken@0
    43
#include "SDL_video.h"
slouken@0
    44
#include "SDL_byteorder.h"
slouken@0
    45
#include "SDL_version.h"
slouken@0
    46
slouken@0
    47
#include "begin_code.h"
slouken@0
    48
/* Set up for C function definitions, even when using C++ */
slouken@0
    49
#ifdef __cplusplus
slouken@0
    50
extern "C" {
slouken@0
    51
#endif
slouken@0
    52
slouken@0
    53
/* As of version 0.5, SDL is loaded dynamically into the application */
slouken@0
    54
slouken@0
    55
/* These are the flags which may be passed to SDL_Init() -- you should
slouken@0
    56
   specify the subsystems which you will be using in your application.
slouken@0
    57
*/
slouken@0
    58
#define	SDL_INIT_TIMER		0x00000001
slouken@0
    59
#define SDL_INIT_AUDIO		0x00000010
slouken@0
    60
#define SDL_INIT_VIDEO		0x00000020
slouken@0
    61
#define SDL_INIT_CDROM		0x00000100
slouken@0
    62
#define SDL_INIT_JOYSTICK	0x00000200
slouken@0
    63
#define SDL_INIT_NOPARACHUTE	0x00100000	/* Don't catch fatal signals */
slouken@0
    64
#define SDL_INIT_EVENTTHREAD	0x01000000	/* Not supported on all OS's */
slouken@0
    65
#define SDL_INIT_EVERYTHING	0x0000FFFF
slouken@0
    66
slouken@0
    67
/* This function loads the SDL dynamically linked library and initializes 
slouken@0
    68
 * the subsystems specified by 'flags' (and those satisfying dependencies)
slouken@0
    69
 * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
slouken@0
    70
 * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
slouken@0
    71
 */
slouken@337
    72
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
slouken@0
    73
slouken@0
    74
/* This function initializes specific SDL subsystems */
slouken@337
    75
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
    76
slouken@0
    77
/* This function cleans up specific SDL subsystems */
slouken@337
    78
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
    79
slouken@0
    80
/* This function returns mask of the specified subsystems which have
slouken@0
    81
   been initialized.
slouken@0
    82
   If 'flags' is 0, it returns a mask of all initialized subsystems.
slouken@0
    83
*/
slouken@337
    84
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
    85
slouken@0
    86
/* This function cleans up all initialized subsystems and unloads the
slouken@0
    87
 * dynamically linked library.  You should call it upon all exit conditions.
slouken@0
    88
 */
slouken@337
    89
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
    90
slouken@0
    91
/* Ends C function definitions when using C++ */
slouken@0
    92
#ifdef __cplusplus
slouken@0
    93
}
slouken@0
    94
#endif
slouken@0
    95
#include "close_code.h"
slouken@0
    96
slouken@0
    97
#endif /* _SDL_H */