include/SDL.h
author David Ludwig <dludwig@pobox.com>
Mon, 01 Apr 2013 21:33:06 -0400
changeset 8453 499aa167ea79
parent 6885 700f1b25f77f
child 6918 6f4bf9b784f2
permissions -rw-r--r--
WinRT: made WinRT path retrieval be available in both UCS-2 and UTF-8 flavors
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@3407
    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@3407
    30
 *  
slouken@3407
    31
 *  http://www.libsdl.org/
slouken@3407
    32
 *  
slouken@3407
    33
 *  \section intro_sec Introduction
slouken@3407
    34
 *  
slouken@3407
    35
 *  This is the Simple DirectMedia Layer, a general API that provides low
slouken@3407
    36
 *  level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
slouken@3407
    37
 *  and 2D framebuffer across multiple platforms.
slouken@3407
    38
 *  
slouken@3407
    39
 *  SDL is written in C, but works with C++ natively, and has bindings to
slouken@3407
    40
 *  several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
slouken@3407
    41
 *  Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
slouken@3407
    42
 *  Pike, Pliant, Python, Ruby, and Smalltalk.
slouken@3407
    43
 *  
slouken@3407
    44
 *  This library is distributed under GNU LGPL version 2, which can be
slouken@3407
    45
 *  found in the file  "COPYING".  This license allows you to use SDL
slouken@3407
    46
 *  freely in commercial programs as long as you link with the dynamic
slouken@3407
    47
 *  library.
slouken@3407
    48
 *  
slouken@3407
    49
 *  The best way to learn how to use SDL is to check out the header files in
slouken@3407
    50
 *  the "include" subdirectory and the programs in the "test" subdirectory.
slouken@3407
    51
 *  The header files and test programs are well commented and always up to date.
slouken@6878
    52
 *  More documentation and FAQs are available online at:
slouken@6878
    53
 *  	http://wiki.libsdl.org/
slouken@3407
    54
 *  
slouken@3407
    55
 *  If you need help with the library, or just want to discuss SDL related
slouken@3407
    56
 *  issues, you can join the developers mailing list:
slouken@3407
    57
 *  	http://www.libsdl.org/mailing-list.php
slouken@3407
    58
 *  
slouken@3407
    59
 *  Enjoy!
slouken@3407
    60
 *  	Sam Lantinga				(slouken@libsdl.org)
slouken@1895
    61
 */
slouken@0
    62
slouken@0
    63
#ifndef _SDL_H
slouken@0
    64
#define _SDL_H
slouken@0
    65
slouken@1423
    66
#include "SDL_main.h"
slouken@1353
    67
#include "SDL_stdinc.h"
slouken@5347
    68
#include "SDL_assert.h"
slouken@5017
    69
#include "SDL_atomic.h"
slouken@0
    70
#include "SDL_audio.h"
slouken@4493
    71
#include "SDL_clipboard.h"
slouken@1358
    72
#include "SDL_cpuinfo.h"
slouken@1358
    73
#include "SDL_endian.h"
slouken@1358
    74
#include "SDL_error.h"
slouken@0
    75
#include "SDL_events.h"
slouken@6690
    76
#include "SDL_gamecontroller.h"
slouken@5189
    77
#include "SDL_hints.h"
slouken@1358
    78
#include "SDL_loadso.h"
slouken@5221
    79
#include "SDL_log.h"
slouken@6602
    80
#include "SDL_messagebox.h"
slouken@1358
    81
#include "SDL_mutex.h"
icculus@3170
    82
#include "SDL_power.h"
slouken@5145
    83
#include "SDL_render.h"
slouken@1358
    84
#include "SDL_rwops.h"
slouken@6342
    85
#include "SDL_system.h"
slouken@1358
    86
#include "SDL_thread.h"
slouken@1358
    87
#include "SDL_timer.h"
slouken@3647
    88
#include "SDL_version.h"
slouken@0
    89
#include "SDL_video.h"
slouken@0
    90
slouken@0
    91
#include "begin_code.h"
slouken@0
    92
/* Set up for C function definitions, even when using C++ */
slouken@0
    93
#ifdef __cplusplus
slouken@1895
    94
/* *INDENT-OFF* */
slouken@0
    95
extern "C" {
slouken@1895
    96
/* *INDENT-ON* */
slouken@0
    97
#endif
slouken@0
    98
slouken@0
    99
/* As of version 0.5, SDL is loaded dynamically into the application */
slouken@0
   100
slouken@3407
   101
/**
slouken@3407
   102
 *  \name SDL_INIT_*
slouken@3407
   103
 *  
slouken@3407
   104
 *  These are the flags which may be passed to SDL_Init().  You should
slouken@3407
   105
 *  specify the subsystems which you will be using in your application.
slouken@3407
   106
 */
slouken@3407
   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_JOYSTICK       0x00000200
slouken@2713
   112
#define SDL_INIT_HAPTIC         0x00001000
slouken@6690
   113
#define SDL_INIT_GAMECONTROLLER 0x00002000		/**< turn on game controller also implicitly does JOYSTICK */
slouken@3407
   114
#define SDL_INIT_NOPARACHUTE    0x00100000      /**< Don't catch fatal signals */
slouken@2713
   115
#define SDL_INIT_EVERYTHING     0x0000FFFF
slouken@3407
   116
/*@}*/
slouken@0
   117
slouken@3348
   118
/**
slouken@4863
   119
 *  This function initializes  the subsystems specified by \c flags
slouken@3407
   120
 *  Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
slouken@3407
   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@3348
   125
/**
slouken@3407
   126
 *  This function initializes specific SDL subsystems
slouken@3348
   127
 */
slouken@337
   128
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
   129
slouken@3407
   130
/**
slouken@3407
   131
 *  This function cleans up specific SDL subsystems
slouken@3407
   132
 */
slouken@337
   133
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
   134
slouken@3348
   135
/**
slouken@4627
   136
 *  This function returns a mask of the specified subsystems which have
slouken@4627
   137
 *  previously been initialized.
slouken@3407
   138
 *  
slouken@3407
   139
 *  If \c flags is 0, it returns a mask of all initialized subsystems.
slouken@3407
   140
 */
slouken@337
   141
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
   142
slouken@3348
   143
/**
slouken@4627
   144
 *  This function cleans up all initialized subsystems. You should
slouken@4627
   145
 *  call it upon all exit conditions.
slouken@0
   146
 */
slouken@337
   147
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
   148
slouken@0
   149
/* Ends C function definitions when using C++ */
slouken@0
   150
#ifdef __cplusplus
slouken@1895
   151
/* *INDENT-OFF* */
slouken@0
   152
}
slouken@1895
   153
/* *INDENT-ON* */
slouken@0
   154
#endif
slouken@0
   155
#include "close_code.h"
slouken@0
   156
slouken@0
   157
#endif /* _SDL_H */
slouken@1895
   158
slouken@1895
   159
/* vi: set ts=4 sw=4 expandtab: */