include/SDL.h
author Sam Lantinga <slouken@libsdl.org>
Thu, 09 Feb 2006 09:07:13 +0000
changeset 1353 7ba544e2888d
parent 1335 c39265384763
child 1356 67114343400d
permissions -rw-r--r--
Started the process of improving configure support, and merging C types
and library support into a single header.
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@0
    23
/* Main include header for the SDL library */
slouken@0
    24
slouken@0
    25
#ifndef _SDL_H
slouken@0
    26
#define _SDL_H
slouken@0
    27
slouken@1353
    28
#include "SDL_stdinc.h"
slouken@0
    29
#include "SDL_main.h"
slouken@0
    30
#include "SDL_error.h"
slouken@0
    31
#include "SDL_rwops.h"
slouken@0
    32
#include "SDL_timer.h"
slouken@0
    33
#include "SDL_audio.h"
slouken@0
    34
#include "SDL_cdrom.h"
slouken@0
    35
#include "SDL_joystick.h"
slouken@0
    36
#include "SDL_events.h"
slouken@0
    37
#include "SDL_video.h"
slouken@1353
    38
#include "SDL_loadso.h"
slouken@0
    39
#include "SDL_byteorder.h"
slouken@0
    40
#include "SDL_version.h"
slouken@0
    41
slouken@0
    42
#include "begin_code.h"
slouken@0
    43
/* Set up for C function definitions, even when using C++ */
slouken@0
    44
#ifdef __cplusplus
slouken@0
    45
extern "C" {
slouken@0
    46
#endif
slouken@0
    47
slouken@0
    48
/* As of version 0.5, SDL is loaded dynamically into the application */
slouken@0
    49
slouken@0
    50
/* These are the flags which may be passed to SDL_Init() -- you should
slouken@0
    51
   specify the subsystems which you will be using in your application.
slouken@0
    52
*/
slouken@0
    53
#define	SDL_INIT_TIMER		0x00000001
slouken@0
    54
#define SDL_INIT_AUDIO		0x00000010
slouken@0
    55
#define SDL_INIT_VIDEO		0x00000020
slouken@0
    56
#define SDL_INIT_CDROM		0x00000100
slouken@0
    57
#define SDL_INIT_JOYSTICK	0x00000200
slouken@0
    58
#define SDL_INIT_NOPARACHUTE	0x00100000	/* Don't catch fatal signals */
slouken@0
    59
#define SDL_INIT_EVENTTHREAD	0x01000000	/* Not supported on all OS's */
slouken@0
    60
#define SDL_INIT_EVERYTHING	0x0000FFFF
slouken@0
    61
slouken@0
    62
/* This function loads the SDL dynamically linked library and initializes 
slouken@0
    63
 * the subsystems specified by 'flags' (and those satisfying dependencies)
slouken@0
    64
 * Unless the SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
slouken@0
    65
 * signal handlers for some commonly ignored fatal signals (like SIGSEGV)
slouken@0
    66
 */
slouken@337
    67
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
slouken@0
    68
slouken@0
    69
/* This function initializes specific SDL subsystems */
slouken@337
    70
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
    71
slouken@0
    72
/* This function cleans up specific SDL subsystems */
slouken@337
    73
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
    74
slouken@0
    75
/* This function returns mask of the specified subsystems which have
slouken@0
    76
   been initialized.
slouken@0
    77
   If 'flags' is 0, it returns a mask of all initialized subsystems.
slouken@0
    78
*/
slouken@337
    79
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
    80
slouken@0
    81
/* This function cleans up all initialized subsystems and unloads the
slouken@0
    82
 * dynamically linked library.  You should call it upon all exit conditions.
slouken@0
    83
 */
slouken@337
    84
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
    85
slouken@0
    86
/* Ends C function definitions when using C++ */
slouken@0
    87
#ifdef __cplusplus
slouken@0
    88
}
slouken@0
    89
#endif
slouken@0
    90
#include "close_code.h"
slouken@0
    91
slouken@0
    92
#endif /* _SDL_H */