include/SDL.h
author Sam Lantinga <slouken@libsdl.org>
Thu, 23 May 2019 14:19:00 -0700
changeset 12756 4116bf232fe7
parent 12503 806492103856
permissions -rw-r--r--
Added a function to get the current Android SDK version at runtime
slouken@0
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@12503
     3
  Copyright (C) 1997-2019 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@0
    28
slouken@10638
    29
#ifndef SDL_h_
slouken@10638
    30
#define SDL_h_
slouken@0
    31
slouken@1423
    32
#include "SDL_main.h"
slouken@1353
    33
#include "SDL_stdinc.h"
slouken@5347
    34
#include "SDL_assert.h"
slouken@5017
    35
#include "SDL_atomic.h"
slouken@0
    36
#include "SDL_audio.h"
slouken@4493
    37
#include "SDL_clipboard.h"
slouken@1358
    38
#include "SDL_cpuinfo.h"
slouken@1358
    39
#include "SDL_endian.h"
slouken@1358
    40
#include "SDL_error.h"
slouken@0
    41
#include "SDL_events.h"
icculus@7667
    42
#include "SDL_filesystem.h"
slouken@6690
    43
#include "SDL_gamecontroller.h"
icculus@6918
    44
#include "SDL_haptic.h"
slouken@5189
    45
#include "SDL_hints.h"
slouken@11376
    46
#include "SDL_joystick.h"
slouken@1358
    47
#include "SDL_loadso.h"
slouken@5221
    48
#include "SDL_log.h"
slouken@6602
    49
#include "SDL_messagebox.h"
slouken@1358
    50
#include "SDL_mutex.h"
icculus@3170
    51
#include "SDL_power.h"
slouken@5145
    52
#include "SDL_render.h"
slouken@1358
    53
#include "SDL_rwops.h"
slouken@12130
    54
#include "SDL_sensor.h"
slouken@11376
    55
#include "SDL_shape.h"
slouken@6342
    56
#include "SDL_system.h"
slouken@1358
    57
#include "SDL_thread.h"
slouken@1358
    58
#include "SDL_timer.h"
slouken@3647
    59
#include "SDL_version.h"
slouken@0
    60
#include "SDL_video.h"
slouken@0
    61
slouken@0
    62
#include "begin_code.h"
slouken@0
    63
/* Set up for C function definitions, even when using C++ */
slouken@0
    64
#ifdef __cplusplus
slouken@0
    65
extern "C" {
slouken@0
    66
#endif
slouken@0
    67
slouken@0
    68
/* As of version 0.5, SDL is loaded dynamically into the application */
slouken@0
    69
slouken@3407
    70
/**
slouken@3407
    71
 *  \name SDL_INIT_*
slouken@7191
    72
 *
slouken@3407
    73
 *  These are the flags which may be passed to SDL_Init().  You should
slouken@3407
    74
 *  specify the subsystems which you will be using in your application.
slouken@3407
    75
 */
gabomdq@7678
    76
/* @{ */
slouken@10430
    77
#define SDL_INIT_TIMER          0x00000001u
slouken@10430
    78
#define SDL_INIT_AUDIO          0x00000010u
slouken@10430
    79
#define SDL_INIT_VIDEO          0x00000020u  /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
slouken@10430
    80
#define SDL_INIT_JOYSTICK       0x00000200u  /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
slouken@10430
    81
#define SDL_INIT_HAPTIC         0x00001000u
slouken@10430
    82
#define SDL_INIT_GAMECONTROLLER 0x00002000u  /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
slouken@10430
    83
#define SDL_INIT_EVENTS         0x00004000u
slouken@12130
    84
#define SDL_INIT_SENSOR         0x00008000u
slouken@10430
    85
#define SDL_INIT_NOPARACHUTE    0x00100000u  /**< compatibility; this flag is ignored. */
icculus@6981
    86
#define SDL_INIT_EVERYTHING ( \
slouken@7360
    87
                SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
slouken@12130
    88
                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
icculus@6981
    89
            )
gabomdq@7678
    90
/* @} */
slouken@0
    91
slouken@3348
    92
/**
slouken@4863
    93
 *  This function initializes  the subsystems specified by \c flags
slouken@0
    94
 */
slouken@337
    95
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
slouken@0
    96
slouken@3348
    97
/**
slouken@3407
    98
 *  This function initializes specific SDL subsystems
alfred@8970
    99
 *
alfred@8970
   100
 *  Subsystem initialization is ref-counted, you must call
philipp@10213
   101
 *  SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly
philipp@10213
   102
 *  shutdown a subsystem manually (or call SDL_Quit() to force shutdown).
alfred@8970
   103
 *  If a subsystem is already loaded then this call will
alfred@8970
   104
 *  increase the ref-count and return.
slouken@3348
   105
 */
slouken@337
   106
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
slouken@0
   107
slouken@3407
   108
/**
slouken@3407
   109
 *  This function cleans up specific SDL subsystems
slouken@3407
   110
 */
slouken@337
   111
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
slouken@0
   112
slouken@3348
   113
/**
slouken@4627
   114
 *  This function returns a mask of the specified subsystems which have
slouken@4627
   115
 *  previously been initialized.
slouken@7191
   116
 *
slouken@3407
   117
 *  If \c flags is 0, it returns a mask of all initialized subsystems.
slouken@3407
   118
 */
slouken@337
   119
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
slouken@0
   120
slouken@3348
   121
/**
slouken@4627
   122
 *  This function cleans up all initialized subsystems. You should
slouken@4627
   123
 *  call it upon all exit conditions.
slouken@0
   124
 */
slouken@337
   125
extern DECLSPEC void SDLCALL SDL_Quit(void);
slouken@0
   126
slouken@0
   127
/* Ends C function definitions when using C++ */
slouken@0
   128
#ifdef __cplusplus
slouken@0
   129
}
slouken@0
   130
#endif
slouken@0
   131
#include "close_code.h"
slouken@0
   132
slouken@10638
   133
#endif /* SDL_h_ */
slouken@1895
   134
slouken@1895
   135
/* vi: set ts=4 sw=4 expandtab: */