include/SDL.h
author Ryan C. Gordon <icculus@icculus.org>
Tue, 20 Aug 2013 19:57:11 -0400
changeset 7667 be1cc6f55840
parent 7655 8f71b590aff6
child 7677 871d43c6968a
permissions -rw-r--r--
Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module.
slouken@0
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@6885
     3
  Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
slouken@0
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@0
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@0
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@0
    20
*/
slouken@0
    21
slouken@1895
    22
/**
slouken@3407
    23
 *  \file SDL.h
slouken@7191
    24
 *
slouken@3407
    25
 *  Main include header for the SDL library
slouken@1895
    26
 */
slouken@3407
    27
slouken@1895
    28
/**
slouken@3407
    29
 *  \mainpage Simple DirectMedia Layer (SDL)
slouken@7191
    30
 *
slouken@3407
    31
 *  http://www.libsdl.org/
slouken@7191
    32
 *
slouken@3407
    33
 *  \section intro_sec Introduction
slouken@7191
    34
 *
philipp@7655
    35
 *  Simple DirectMedia Layer is a cross-platform development library designed
philipp@7655
    36
 *  to provide low level access to audio, keyboard, mouse, joystick, and
philipp@7655
    37
 *  graphics hardware via OpenGL and Direct3D. It is used by video playback
philipp@7655
    38
 *  software, emulators, and popular games including Valve's award winning
philipp@7655
    39
 *  catalog and many Humble Bundle games.
slouken@7191
    40
 *
philipp@7655
    41
 *  SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
philipp@7655
    42
 *  Support for other platforms may be found in the source code.
slouken@7191
    43
 *
philipp@7655
    44
 *  SDL is written in C, works natively with C++, and there are bindings 
philipp@7655
    45
 *  available for several other languages, including C# and Python.
philipp@7655
    46
 *
philipp@7655
    47
 *  This library is distributed under the zlib license, which can be found
philipp@7655
    48
 *  in the file "COPYING.txt".
slouken@7191
    49
 *
slouken@3407
    50
 *  The best way to learn how to use SDL is to check out the header files in
slouken@3407
    51
 *  the "include" subdirectory and the programs in the "test" subdirectory.
slouken@3407
    52
 *  The header files and test programs are well commented and always up to date.
slouken@6878
    53
 *  More documentation and FAQs are available online at:
slouken@7191
    54
 *      http://wiki.libsdl.org/
slouken@7191
    55
 *
slouken@3407
    56
 *  If you need help with the library, or just want to discuss SDL related
slouken@3407
    57
 *  issues, you can join the developers mailing list:
slouken@7191
    58
 *      http://www.libsdl.org/mailing-list.php
slouken@7191
    59
 *
slouken@3407
    60
 *  Enjoy!
slouken@7191
    61
 *      Sam Lantinga                (slouken@libsdl.org)
slouken@1895
    62
 */
slouken@0
    63
slouken@0
    64
#ifndef _SDL_H
slouken@0
    65
#define _SDL_H
slouken@0
    66
slouken@1423
    67
#include "SDL_main.h"
slouken@1353
    68
#include "SDL_stdinc.h"
slouken@5347
    69
#include "SDL_assert.h"
slouken@5017
    70
#include "SDL_atomic.h"
slouken@0
    71
#include "SDL_audio.h"
slouken@4493
    72
#include "SDL_clipboard.h"
slouken@1358
    73
#include "SDL_cpuinfo.h"
slouken@1358
    74
#include "SDL_endian.h"
slouken@1358
    75
#include "SDL_error.h"
slouken@0
    76
#include "SDL_events.h"
icculus@7667
    77
#include "SDL_filesystem.h"
icculus@6918
    78
#include "SDL_joystick.h"
slouken@6690
    79
#include "SDL_gamecontroller.h"
icculus@6918
    80
#include "SDL_haptic.h"
slouken@5189
    81
#include "SDL_hints.h"
slouken@1358
    82
#include "SDL_loadso.h"
slouken@5221
    83
#include "SDL_log.h"
slouken@6602
    84
#include "SDL_messagebox.h"
slouken@1358
    85
#include "SDL_mutex.h"
icculus@3170
    86
#include "SDL_power.h"
slouken@5145
    87
#include "SDL_render.h"
slouken@1358
    88
#include "SDL_rwops.h"
slouken@6342
    89
#include "SDL_system.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@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@0
    98
extern "C" {
slouken@0
    99
#endif
slouken@0
   100
slouken@0
   101
/* As of version 0.5, SDL is loaded dynamically into the application */
slouken@0
   102
slouken@3407
   103
/**
slouken@3407
   104
 *  \name SDL_INIT_*
slouken@7191
   105
 *
slouken@3407
   106
 *  These are the flags which may be passed to SDL_Init().  You should
slouken@3407
   107
 *  specify the subsystems which you will be using in your application.
slouken@3407
   108
 */
slouken@3407
   109
/*@{*/
slouken@2713
   110
#define SDL_INIT_TIMER          0x00000001
slouken@2713
   111
#define SDL_INIT_AUDIO          0x00000010
slouken@7360
   112
#define SDL_INIT_VIDEO          0x00000020  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
slouken@7360
   113
#define SDL_INIT_JOYSTICK       0x00000200  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
slouken@2713
   114
#define SDL_INIT_HAPTIC         0x00001000
philipp@7370
   115
#define SDL_INIT_GAMECONTROLLER 0x00002000  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
slouken@7360
   116
#define SDL_INIT_EVENTS         0x00004000
slouken@7360
   117
#define SDL_INIT_NOPARACHUTE    0x00100000  /**< Don't catch fatal signals */
icculus@6981
   118
#define SDL_INIT_EVERYTHING ( \
slouken@7360
   119
                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
icculus@6981
   120
                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
icculus@6981
   121
            )
slouken@3407
   122
/*@}*/
slouken@0
   123
slouken@3348
   124
/**
slouken@4863
   125
 *  This function initializes  the subsystems specified by \c flags
slouken@3407
   126
 *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
slouken@3407
   127
 *  signal handlers for some commonly ignored fatal signals (like SIGSEGV).
slouken@0
   128
 */
slouken@337
   129
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
slouken@0
   130
slouken@3348
   131
/**
slouken@3407
   132
 *  This function initializes specific SDL subsystems
slouken@3348
   133
 */
slouken@337
   134
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
   135
slouken@3407
   136
/**
slouken@3407
   137
 *  This function cleans up specific SDL subsystems
slouken@3407
   138
 */
slouken@337
   139
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
   140
slouken@3348
   141
/**
slouken@4627
   142
 *  This function returns a mask of the specified subsystems which have
slouken@4627
   143
 *  previously been initialized.
slouken@7191
   144
 *
slouken@3407
   145
 *  If \c flags is 0, it returns a mask of all initialized subsystems.
slouken@3407
   146
 */
slouken@337
   147
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
   148
slouken@3348
   149
/**
slouken@4627
   150
 *  This function cleans up all initialized subsystems. You should
slouken@4627
   151
 *  call it upon all exit conditions.
slouken@0
   152
 */
slouken@337
   153
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
   154
slouken@0
   155
/* Ends C function definitions when using C++ */
slouken@0
   156
#ifdef __cplusplus
slouken@0
   157
}
slouken@0
   158
#endif
slouken@0
   159
#include "close_code.h"
slouken@0
   160
slouken@0
   161
#endif /* _SDL_H */
slouken@1895
   162
slouken@1895
   163
/* vi: set ts=4 sw=4 expandtab: */