mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-13 21:51:09 +00:00
commit
e8c5b3a535
91 changed files with 18549 additions and 16471 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -25,41 +25,6 @@
|
||||||
* Main include header for the SDL library
|
* Main include header for the SDL library
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* \mainpage Simple DirectMedia Layer (SDL)
|
|
||||||
*
|
|
||||||
* http://www.libsdl.org/
|
|
||||||
*
|
|
||||||
* \section intro_sec Introduction
|
|
||||||
*
|
|
||||||
* Simple DirectMedia Layer is a cross-platform development library designed
|
|
||||||
* to provide low level access to audio, keyboard, mouse, joystick, and
|
|
||||||
* graphics hardware via OpenGL and Direct3D. It is used by video playback
|
|
||||||
* software, emulators, and popular games including Valve's award winning
|
|
||||||
* catalog and many Humble Bundle games.
|
|
||||||
*
|
|
||||||
* SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
|
|
||||||
* Support for other platforms may be found in the source code.
|
|
||||||
*
|
|
||||||
* SDL is written in C, works natively with C++, and there are bindings
|
|
||||||
* available for several other languages, including C# and Python.
|
|
||||||
*
|
|
||||||
* This library is distributed under the zlib license, which can be found
|
|
||||||
* in the file "COPYING.txt".
|
|
||||||
*
|
|
||||||
* The best way to learn how to use SDL is to check out the header files in
|
|
||||||
* the "include" subdirectory and the programs in the "test" subdirectory.
|
|
||||||
* The header files and test programs are well commented and always up to date.
|
|
||||||
* More documentation and FAQs are available online at:
|
|
||||||
* http://wiki.libsdl.org/
|
|
||||||
*
|
|
||||||
* If you need help with the library, or just want to discuss SDL related
|
|
||||||
* issues, you can join the developers mailing list:
|
|
||||||
* http://www.libsdl.org/mailing-list.php
|
|
||||||
*
|
|
||||||
* Enjoy!
|
|
||||||
* Sam Lantinga (slouken@libsdl.org)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _SDL_H
|
#ifndef _SDL_H
|
||||||
#define _SDL_H
|
#define _SDL_H
|
||||||
|
@ -114,7 +79,7 @@ extern "C" {
|
||||||
#define SDL_INIT_HAPTIC 0x00001000
|
#define SDL_INIT_HAPTIC 0x00001000
|
||||||
#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||||
#define SDL_INIT_EVENTS 0x00004000
|
#define SDL_INIT_EVENTS 0x00004000
|
||||||
#define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
|
#define SDL_INIT_NOPARACHUTE 0x00100000 /**< compatibility; this flag is ignored. */
|
||||||
#define SDL_INIT_EVERYTHING ( \
|
#define SDL_INIT_EVERYTHING ( \
|
||||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
|
||||||
|
@ -123,13 +88,17 @@ extern "C" {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function initializes the subsystems specified by \c flags
|
* This function initializes the subsystems specified by \c flags
|
||||||
* Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
|
|
||||||
* signal handlers for some commonly ignored fatal signals (like SIGSEGV).
|
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function initializes specific SDL subsystems
|
* This function initializes specific SDL subsystems
|
||||||
|
*
|
||||||
|
* Subsystem initialization is ref-counted, you must call
|
||||||
|
* SDL_QuitSubSystem for each SDL_InitSubSystem to correctly
|
||||||
|
* shutdown a subsystem manually (or call SDL_Quit to force shutdown).
|
||||||
|
* If a subsystem is already loaded then this call will
|
||||||
|
* increase the ref-count and return.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -51,7 +51,7 @@ assert can have unique static variables associated with it.
|
||||||
/* Don't include intrin.h here because it contains C++ code */
|
/* Don't include intrin.h here because it contains C++ code */
|
||||||
extern void __cdecl __debugbreak(void);
|
extern void __cdecl __debugbreak(void);
|
||||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||||
#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
|
#elif (!defined(__NACL__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
|
||||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||||
#elif defined(HAVE_SIGNAL_H)
|
#elif defined(HAVE_SIGNAL_H)
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
@ -86,8 +86,10 @@ This also solves the problem of...
|
||||||
disable assertions.
|
disable assertions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||||
|
this condition isn't constant. And looks like an owl's face! */
|
||||||
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||||
#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__)
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||||
#else
|
#else
|
||||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||||
#endif
|
#endif
|
||||||
|
@ -102,9 +104,9 @@ typedef enum
|
||||||
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
||||||
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
||||||
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
||||||
} SDL_assert_state;
|
} SDL_AssertState;
|
||||||
|
|
||||||
typedef struct SDL_assert_data
|
typedef struct SDL_AssertData
|
||||||
{
|
{
|
||||||
int always_ignore;
|
int always_ignore;
|
||||||
unsigned int trigger_count;
|
unsigned int trigger_count;
|
||||||
|
@ -112,13 +114,13 @@ typedef struct SDL_assert_data
|
||||||
const char *filename;
|
const char *filename;
|
||||||
int linenum;
|
int linenum;
|
||||||
const char *function;
|
const char *function;
|
||||||
const struct SDL_assert_data *next;
|
const struct SDL_AssertData *next;
|
||||||
} SDL_assert_data;
|
} SDL_AssertData;
|
||||||
|
|
||||||
#if (SDL_ASSERT_LEVEL > 0)
|
#if (SDL_ASSERT_LEVEL > 0)
|
||||||
|
|
||||||
/* Never call this directly. Use the SDL_assert* macros. */
|
/* Never call this directly. Use the SDL_assert* macros. */
|
||||||
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||||
const char *,
|
const char *,
|
||||||
const char *, int)
|
const char *, int)
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
|
@ -141,16 +143,13 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
||||||
#define SDL_enabled_assert(condition) \
|
#define SDL_enabled_assert(condition) \
|
||||||
do { \
|
do { \
|
||||||
while ( !(condition) ) { \
|
while ( !(condition) ) { \
|
||||||
static struct SDL_assert_data assert_data = { \
|
static struct SDL_AssertData sdl_assert_data = { \
|
||||||
0, 0, #condition, 0, 0, 0, 0 \
|
0, 0, #condition, 0, 0, 0, 0 \
|
||||||
}; \
|
}; \
|
||||||
const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
|
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||||
SDL_FUNCTION, \
|
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||||
SDL_FILE, \
|
|
||||||
SDL_LINE); \
|
|
||||||
if (state == SDL_ASSERTION_RETRY) { \
|
|
||||||
continue; /* go again. */ \
|
continue; /* go again. */ \
|
||||||
} else if (state == SDL_ASSERTION_BREAK) { \
|
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
|
||||||
SDL_TriggerBreakpoint(); \
|
SDL_TriggerBreakpoint(); \
|
||||||
} \
|
} \
|
||||||
break; /* not retrying. */ \
|
break; /* not retrying. */ \
|
||||||
|
@ -184,8 +183,8 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
||||||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||||
|
|
||||||
|
|
||||||
typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
|
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||||
const SDL_assert_data* data, void* userdata);
|
const SDL_AssertData* data, void* userdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set an application-defined assertion handler.
|
* \brief Set an application-defined assertion handler.
|
||||||
|
@ -202,7 +201,7 @@ typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
|
||||||
*
|
*
|
||||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||||
*
|
*
|
||||||
* \return SDL_assert_state value of how to handle the assertion failure.
|
* \return SDL_AssertState value of how to handle the assertion failure.
|
||||||
*
|
*
|
||||||
* \param handler Callback function, called when an assertion fails.
|
* \param handler Callback function, called when an assertion fails.
|
||||||
* \param userdata A pointer passed to the callback as-is.
|
* \param userdata A pointer passed to the callback as-is.
|
||||||
|
@ -249,7 +248,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
|
||||||
* The proper way to examine this data looks something like this:
|
* The proper way to examine this data looks something like this:
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* const SDL_assert_data *item = SDL_GetAssertionReport();
|
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||||
* while (item) {
|
* while (item) {
|
||||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
|
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
|
||||||
* item->condition, item->function, item->filename,
|
* item->condition, item->function, item->filename,
|
||||||
|
@ -262,7 +261,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
|
||||||
* \return List of all assertions.
|
* \return List of all assertions.
|
||||||
* \sa SDL_ResetAssertionReport
|
* \sa SDL_ResetAssertionReport
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
|
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Reset the list of all assertion failures.
|
* \brief Reset the list of all assertion failures.
|
||||||
|
@ -273,6 +272,12 @@ extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* these had wrong naming conventions until 2.0.4. Please update your app! */
|
||||||
|
#define SDL_assert_state SDL_AssertState
|
||||||
|
#define SDL_assert_data SDL_AssertData
|
||||||
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -122,7 +122,8 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||||
void _ReadWriteBarrier(void);
|
void _ReadWriteBarrier(void);
|
||||||
#pragma intrinsic(_ReadWriteBarrier)
|
#pragma intrinsic(_ReadWriteBarrier)
|
||||||
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||||
#elif defined(__GNUC__)
|
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||||
|
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||||
#else
|
#else
|
||||||
#define SDL_CompilerBarrier() \
|
#define SDL_CompilerBarrier() \
|
||||||
|
@ -169,10 +170,17 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
|
||||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||||
#endif /* __GNUC__ && __arm__ */
|
#endif /* __GNUC__ && __arm__ */
|
||||||
#else
|
#else
|
||||||
|
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||||
|
/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
|
||||||
|
#include <mbarrier.h>
|
||||||
|
#define SDL_MemoryBarrierRelease() __machine_rel_barrier()
|
||||||
|
#define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
|
||||||
|
#else
|
||||||
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
||||||
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||||
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A type representing an atomic integer value. It is a struct
|
* \brief A type representing an atomic integer value. It is a struct
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -155,6 +155,9 @@ typedef Uint16 SDL_AudioFormat;
|
||||||
*
|
*
|
||||||
* Once the callback returns, the buffer will no longer be valid.
|
* Once the callback returns, the buffer will no longer be valid.
|
||||||
* Stereo samples are stored in a LRLRLR ordering.
|
* Stereo samples are stored in a LRLRLR ordering.
|
||||||
|
*
|
||||||
|
* You can choose to avoid callbacks and use SDL_QueueAudio() instead, if
|
||||||
|
* you like. Just open your audio device with a NULL callback.
|
||||||
*/
|
*/
|
||||||
typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
|
||||||
int len);
|
int len);
|
||||||
|
@ -171,8 +174,8 @@ typedef struct SDL_AudioSpec
|
||||||
Uint16 samples; /**< Audio buffer size in samples (power of 2) */
|
Uint16 samples; /**< Audio buffer size in samples (power of 2) */
|
||||||
Uint16 padding; /**< Necessary for some compile environments */
|
Uint16 padding; /**< Necessary for some compile environments */
|
||||||
Uint32 size; /**< Audio buffer size in bytes (calculated) */
|
Uint32 size; /**< Audio buffer size in bytes (calculated) */
|
||||||
SDL_AudioCallback callback;
|
SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */
|
||||||
void *userdata;
|
void *userdata; /**< Userdata passed to callback (ignored for NULL callbacks). */
|
||||||
} SDL_AudioSpec;
|
} SDL_AudioSpec;
|
||||||
|
|
||||||
|
|
||||||
|
@ -273,9 +276,11 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
|
||||||
* to the audio buffer, and the length in bytes of the audio buffer.
|
* to the audio buffer, and the length in bytes of the audio buffer.
|
||||||
* This function usually runs in a separate thread, and so you should
|
* This function usually runs in a separate thread, and so you should
|
||||||
* protect data structures that it accesses by calling SDL_LockAudio()
|
* protect data structures that it accesses by calling SDL_LockAudio()
|
||||||
* and SDL_UnlockAudio() in your code.
|
* and SDL_UnlockAudio() in your code. Alternately, you may pass a NULL
|
||||||
|
* pointer here, and call SDL_QueueAudio() with some frequency, to queue
|
||||||
|
* more audio samples to be played.
|
||||||
* - \c desired->userdata is passed as the first parameter to your callback
|
* - \c desired->userdata is passed as the first parameter to your callback
|
||||||
* function.
|
* function. If you passed a NULL callback, this value is ignored.
|
||||||
*
|
*
|
||||||
* The audio device starts out playing silence when it's opened, and should
|
* The audio device starts out playing silence when it's opened, and should
|
||||||
* be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready
|
* be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready
|
||||||
|
@ -474,6 +479,100 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
||||||
SDL_AudioFormat format,
|
SDL_AudioFormat format,
|
||||||
Uint32 len, int volume);
|
Uint32 len, int volume);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Queue more audio on non-callback devices.
|
||||||
|
*
|
||||||
|
* SDL offers two ways to feed audio to the device: you can either supply a
|
||||||
|
* callback that SDL triggers with some frequency to obtain more audio
|
||||||
|
* (pull method), or you can supply no callback, and then SDL will expect
|
||||||
|
* you to supply data at regular intervals (push method) with this function.
|
||||||
|
*
|
||||||
|
* There are no limits on the amount of data you can queue, short of
|
||||||
|
* exhaustion of address space. Queued data will drain to the device as
|
||||||
|
* necessary without further intervention from you. If the device needs
|
||||||
|
* audio but there is not enough queued, it will play silence to make up
|
||||||
|
* the difference. This means you will have skips in your audio playback
|
||||||
|
* if you aren't routinely queueing sufficient data.
|
||||||
|
*
|
||||||
|
* This function copies the supplied data, so you are safe to free it when
|
||||||
|
* the function returns. This function is thread-safe, but queueing to the
|
||||||
|
* same device from two threads at once does not promise which buffer will
|
||||||
|
* be queued first.
|
||||||
|
*
|
||||||
|
* You may not queue audio on a device that is using an application-supplied
|
||||||
|
* callback; doing so returns an error. You have to use the audio callback
|
||||||
|
* or queue audio with this function, but not both.
|
||||||
|
*
|
||||||
|
* You should not call SDL_LockAudio() on the device before queueing; SDL
|
||||||
|
* handles locking internally for this function.
|
||||||
|
*
|
||||||
|
* \param dev The device ID to which we will queue audio.
|
||||||
|
* \param data The data to queue to the device for later playback.
|
||||||
|
* \param len The number of bytes (not samples!) to which (data) points.
|
||||||
|
* \return zero on success, -1 on error.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetQueuedAudioSize
|
||||||
|
* \sa SDL_ClearQueuedAudio
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the number of bytes of still-queued audio.
|
||||||
|
*
|
||||||
|
* This is the number of bytes that have been queued for playback with
|
||||||
|
* SDL_QueueAudio(), but have not yet been sent to the hardware.
|
||||||
|
*
|
||||||
|
* Once we've sent it to the hardware, this function can not decide the exact
|
||||||
|
* byte boundary of what has been played. It's possible that we just gave the
|
||||||
|
* hardware several kilobytes right before you called this function, but it
|
||||||
|
* hasn't played any of it yet, or maybe half of it, etc.
|
||||||
|
*
|
||||||
|
* You may not queue audio on a device that is using an application-supplied
|
||||||
|
* callback; calling this function on such a device always returns 0.
|
||||||
|
* You have to use the audio callback or queue audio with SDL_QueueAudio(),
|
||||||
|
* but not both.
|
||||||
|
*
|
||||||
|
* You should not call SDL_LockAudio() on the device before querying; SDL
|
||||||
|
* handles locking internally for this function.
|
||||||
|
*
|
||||||
|
* \param dev The device ID of which we will query queued audio size.
|
||||||
|
* \return Number of bytes (not samples!) of queued audio.
|
||||||
|
*
|
||||||
|
* \sa SDL_QueueAudio
|
||||||
|
* \sa SDL_ClearQueuedAudio
|
||||||
|
*/
|
||||||
|
extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Drop any queued audio data waiting to be sent to the hardware.
|
||||||
|
*
|
||||||
|
* Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
|
||||||
|
* the hardware will start playing silence if more audio isn't queued.
|
||||||
|
*
|
||||||
|
* This will not prevent playback of queued audio that's already been sent
|
||||||
|
* to the hardware, as we can not undo that, so expect there to be some
|
||||||
|
* fraction of a second of audio that might still be heard. This can be
|
||||||
|
* useful if you want to, say, drop any pending music during a level change
|
||||||
|
* in your game.
|
||||||
|
*
|
||||||
|
* You may not queue audio on a device that is using an application-supplied
|
||||||
|
* callback; calling this function on such a device is always a no-op.
|
||||||
|
* You have to use the audio callback or queue audio with SDL_QueueAudio(),
|
||||||
|
* but not both.
|
||||||
|
*
|
||||||
|
* You should not call SDL_LockAudio() on the device before clearing the
|
||||||
|
* queue; SDL handles locking internally for this function.
|
||||||
|
*
|
||||||
|
* This function always succeeds and thus returns void.
|
||||||
|
*
|
||||||
|
* \param dev The device ID of which to clear the audio queue.
|
||||||
|
*
|
||||||
|
* \sa SDL_QueueAudio
|
||||||
|
* \sa SDL_GetQueuedAudioSize
|
||||||
|
*/
|
||||||
|
extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \name Audio lock functions
|
* \name Audio lock functions
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -58,6 +58,6 @@ typedef enum
|
||||||
#endif
|
#endif
|
||||||
#include "close_code.h"
|
#include "close_code.h"
|
||||||
|
|
||||||
#endif /* _SDL_video_h */
|
#endif /* _SDL_blendmode_h */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -46,7 +46,15 @@
|
||||||
|
|
||||||
#cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
|
#cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
|
||||||
#cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
|
#cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
|
||||||
#cmakedefine HAVE_PTHREAD_SPINLOCK @HAVE_PTHREAD_SPINLOCK@
|
|
||||||
|
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||||
|
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||||
|
#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
|
||||||
|
#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
|
||||||
|
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||||
|
#cmakedefine HAVE_XAUDIO2_H @HAVE_XAUDIO2_H@
|
||||||
|
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||||
|
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||||
|
|
||||||
/* Comment this if you want to build without any C library requirements */
|
/* Comment this if you want to build without any C library requirements */
|
||||||
#cmakedefine HAVE_LIBC 1
|
#cmakedefine HAVE_LIBC 1
|
||||||
|
@ -143,6 +151,9 @@
|
||||||
#cmakedefine HAVE_SIN 1
|
#cmakedefine HAVE_SIN 1
|
||||||
#cmakedefine HAVE_SINF 1
|
#cmakedefine HAVE_SINF 1
|
||||||
#cmakedefine HAVE_SQRT 1
|
#cmakedefine HAVE_SQRT 1
|
||||||
|
#cmakedefine HAVE_SQRTF 1
|
||||||
|
#cmakedefine HAVE_TAN 1
|
||||||
|
#cmakedefine HAVE_TANF 1
|
||||||
#cmakedefine HAVE_FSEEKO 1
|
#cmakedefine HAVE_FSEEKO 1
|
||||||
#cmakedefine HAVE_FSEEKO64 1
|
#cmakedefine HAVE_FSEEKO64 1
|
||||||
#cmakedefine HAVE_SIGACTION 1
|
#cmakedefine HAVE_SIGACTION 1
|
||||||
|
@ -186,6 +197,7 @@
|
||||||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||||
|
|
||||||
/* Enable various audio drivers */
|
/* Enable various audio drivers */
|
||||||
|
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
|
||||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
||||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
||||||
|
@ -213,23 +225,29 @@
|
||||||
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
||||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@
|
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@
|
||||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@
|
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@
|
||||||
|
#cmakedefine SDL_AUDIO_DRIVER_EMSCRIPTEN @SDL_AUDIO_DRIVER_EMSCRIPTEN@
|
||||||
|
|
||||||
/* Enable various input drivers */
|
/* Enable various input drivers */
|
||||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||||
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||||
|
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
|
||||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||||
|
#cmakedefine SDL_JOYSTICK_XINPUT @SDL_JOYSTICK_XINPUT@
|
||||||
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
||||||
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
||||||
|
#cmakedefine SDL_JOYSTICK_MFI @SDL_JOYSTICK_MFI@
|
||||||
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
||||||
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
|
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
|
||||||
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
|
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
|
||||||
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
|
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
|
||||||
|
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
|
||||||
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
||||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||||
|
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
|
#cmakedefine SDL_LOADSO_HAIKU @SDL_LOADSO_HAIKU@
|
||||||
|
@ -252,6 +270,7 @@
|
||||||
#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@
|
#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@
|
||||||
|
|
||||||
/* Enable various video drivers */
|
/* Enable various video drivers */
|
||||||
|
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
||||||
|
@ -259,19 +278,20 @@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||||
|
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
|
||||||
|
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
|
||||||
|
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@
|
||||||
|
|
||||||
#if 0
|
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH @SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH@
|
||||||
/* !!! FIXME: in configure script version, missing here: */
|
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC@
|
||||||
#undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
|
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL@
|
||||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
|
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
|
||||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
|
||||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
|
||||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
|
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
|
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
|
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
|
||||||
|
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
|
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
|
||||||
|
@ -282,6 +302,7 @@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@
|
||||||
|
#cmakedefine SDL_VIDEO_DRIVER_X11_XDBE @SDL_VIDEO_DRIVER_X11_XDBE@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
|
||||||
|
@ -290,7 +311,6 @@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32@
|
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@
|
||||||
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
||||||
|
|
||||||
|
@ -314,18 +334,22 @@
|
||||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
||||||
|
|
||||||
/* Enable system power support */
|
/* Enable system power support */
|
||||||
|
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||||
|
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
|
||||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||||
|
|
||||||
/* Enable system filesystem support */
|
/* Enable system filesystem support */
|
||||||
|
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
|
||||||
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
|
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
|
||||||
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
|
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
|
||||||
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
|
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
|
||||||
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@
|
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@
|
||||||
#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@
|
#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@
|
||||||
|
#cmakedefine SDL_FILESYSTEM_EMSCRIPTEN @SDL_FILESYSTEM_EMSCRIPTEN@
|
||||||
|
|
||||||
/* Enable assembly routines */
|
/* Enable assembly routines */
|
||||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -49,7 +49,12 @@
|
||||||
#endif
|
#endif
|
||||||
#undef HAVE_GCC_ATOMICS
|
#undef HAVE_GCC_ATOMICS
|
||||||
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
||||||
#undef HAVE_PTHREAD_SPINLOCK
|
|
||||||
|
#undef HAVE_DDRAW_H
|
||||||
|
#undef HAVE_DINPUT_H
|
||||||
|
#undef HAVE_DSOUND_H
|
||||||
|
#undef HAVE_DXGI_H
|
||||||
|
#undef HAVE_XINPUT_H
|
||||||
|
|
||||||
/* Comment this if you want to build without any C library requirements */
|
/* Comment this if you want to build without any C library requirements */
|
||||||
#undef HAVE_LIBC
|
#undef HAVE_LIBC
|
||||||
|
@ -76,6 +81,7 @@
|
||||||
#undef HAVE_PTHREAD_NP_H
|
#undef HAVE_PTHREAD_NP_H
|
||||||
#undef HAVE_LIBUDEV_H
|
#undef HAVE_LIBUDEV_H
|
||||||
#undef HAVE_DBUS_DBUS_H
|
#undef HAVE_DBUS_DBUS_H
|
||||||
|
#undef HAVE_IBUS_IBUS_H
|
||||||
|
|
||||||
/* C library functions */
|
/* C library functions */
|
||||||
#undef HAVE_MALLOC
|
#undef HAVE_MALLOC
|
||||||
|
@ -148,6 +154,9 @@
|
||||||
#undef HAVE_SIN
|
#undef HAVE_SIN
|
||||||
#undef HAVE_SINF
|
#undef HAVE_SINF
|
||||||
#undef HAVE_SQRT
|
#undef HAVE_SQRT
|
||||||
|
#undef HAVE_SQRTF
|
||||||
|
#undef HAVE_TAN
|
||||||
|
#undef HAVE_TANF
|
||||||
#undef HAVE_FSEEKO
|
#undef HAVE_FSEEKO
|
||||||
#undef HAVE_FSEEKO64
|
#undef HAVE_FSEEKO64
|
||||||
#undef HAVE_SIGACTION
|
#undef HAVE_SIGACTION
|
||||||
|
@ -201,10 +210,12 @@
|
||||||
#undef SDL_AUDIO_DRIVER_COREAUDIO
|
#undef SDL_AUDIO_DRIVER_COREAUDIO
|
||||||
#undef SDL_AUDIO_DRIVER_DISK
|
#undef SDL_AUDIO_DRIVER_DISK
|
||||||
#undef SDL_AUDIO_DRIVER_DUMMY
|
#undef SDL_AUDIO_DRIVER_DUMMY
|
||||||
|
#undef SDL_AUDIO_DRIVER_ANDROID
|
||||||
#undef SDL_AUDIO_DRIVER_XAUDIO2
|
#undef SDL_AUDIO_DRIVER_XAUDIO2
|
||||||
#undef SDL_AUDIO_DRIVER_DSOUND
|
#undef SDL_AUDIO_DRIVER_DSOUND
|
||||||
#undef SDL_AUDIO_DRIVER_ESD
|
#undef SDL_AUDIO_DRIVER_ESD
|
||||||
#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
|
#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
|
||||||
|
#undef SDL_AUDIO_DRIVER_NACL
|
||||||
#undef SDL_AUDIO_DRIVER_NAS
|
#undef SDL_AUDIO_DRIVER_NAS
|
||||||
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
|
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
|
||||||
#undef SDL_AUDIO_DRIVER_SNDIO
|
#undef SDL_AUDIO_DRIVER_SNDIO
|
||||||
|
@ -217,6 +228,7 @@
|
||||||
#undef SDL_AUDIO_DRIVER_WINMM
|
#undef SDL_AUDIO_DRIVER_WINMM
|
||||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
|
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
|
||||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
|
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
|
||||||
|
#undef SDL_AUDIO_DRIVER_EMSCRIPTEN
|
||||||
|
|
||||||
/* Enable various input drivers */
|
/* Enable various input drivers */
|
||||||
#undef SDL_INPUT_LINUXEV
|
#undef SDL_INPUT_LINUXEV
|
||||||
|
@ -224,16 +236,20 @@
|
||||||
#undef SDL_INPUT_TSLIB
|
#undef SDL_INPUT_TSLIB
|
||||||
#undef SDL_JOYSTICK_HAIKU
|
#undef SDL_JOYSTICK_HAIKU
|
||||||
#undef SDL_JOYSTICK_DINPUT
|
#undef SDL_JOYSTICK_DINPUT
|
||||||
|
#undef SDL_JOYSTICK_XINPUT
|
||||||
#undef SDL_JOYSTICK_DUMMY
|
#undef SDL_JOYSTICK_DUMMY
|
||||||
#undef SDL_JOYSTICK_IOKIT
|
#undef SDL_JOYSTICK_IOKIT
|
||||||
#undef SDL_JOYSTICK_LINUX
|
#undef SDL_JOYSTICK_LINUX
|
||||||
|
#undef SDL_JOYSTICK_ANDROID
|
||||||
#undef SDL_JOYSTICK_WINMM
|
#undef SDL_JOYSTICK_WINMM
|
||||||
#undef SDL_JOYSTICK_USBHID
|
#undef SDL_JOYSTICK_USBHID
|
||||||
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
||||||
|
#undef SDL_JOYSTICK_EMSCRIPTEN
|
||||||
#undef SDL_HAPTIC_DUMMY
|
#undef SDL_HAPTIC_DUMMY
|
||||||
#undef SDL_HAPTIC_LINUX
|
#undef SDL_HAPTIC_LINUX
|
||||||
#undef SDL_HAPTIC_IOKIT
|
#undef SDL_HAPTIC_IOKIT
|
||||||
#undef SDL_HAPTIC_DINPUT
|
#undef SDL_HAPTIC_DINPUT
|
||||||
|
#undef SDL_HAPTIC_XINPUT
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#undef SDL_LOADSO_HAIKU
|
#undef SDL_LOADSO_HAIKU
|
||||||
|
@ -272,6 +288,8 @@
|
||||||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
|
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
|
||||||
#undef SDL_VIDEO_DRIVER_X11
|
#undef SDL_VIDEO_DRIVER_X11
|
||||||
#undef SDL_VIDEO_DRIVER_RPI
|
#undef SDL_VIDEO_DRIVER_RPI
|
||||||
|
#undef SDL_VIDEO_DRIVER_ANDROID
|
||||||
|
#undef SDL_VIDEO_DRIVER_EMSCRIPTEN
|
||||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
||||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
|
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
|
||||||
|
@ -281,6 +299,7 @@
|
||||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
|
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
|
||||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
|
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
|
||||||
#undef SDL_VIDEO_DRIVER_X11_XCURSOR
|
#undef SDL_VIDEO_DRIVER_X11_XCURSOR
|
||||||
|
#undef SDL_VIDEO_DRIVER_X11_XDBE
|
||||||
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
|
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
|
||||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
|
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||||
|
@ -289,9 +308,11 @@
|
||||||
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
|
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
|
||||||
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
|
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
|
||||||
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||||
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
|
|
||||||
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY
|
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY
|
||||||
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||||
|
#undef SDL_VIDEO_DRIVER_NACL
|
||||||
|
#undef SDL_VIDEO_DRIVER_VIVANTE
|
||||||
|
#undef SDL_VIDEO_DRIVER_VIVANTE_VDK
|
||||||
|
|
||||||
#undef SDL_VIDEO_RENDER_D3D
|
#undef SDL_VIDEO_RENDER_D3D
|
||||||
#undef SDL_VIDEO_RENDER_D3D11
|
#undef SDL_VIDEO_RENDER_D3D11
|
||||||
|
@ -317,6 +338,8 @@
|
||||||
#undef SDL_POWER_WINDOWS
|
#undef SDL_POWER_WINDOWS
|
||||||
#undef SDL_POWER_MACOSX
|
#undef SDL_POWER_MACOSX
|
||||||
#undef SDL_POWER_HAIKU
|
#undef SDL_POWER_HAIKU
|
||||||
|
#undef SDL_POWER_ANDROID
|
||||||
|
#undef SDL_POWER_EMSCRIPTEN
|
||||||
#undef SDL_POWER_HARDWIRED
|
#undef SDL_POWER_HARDWIRED
|
||||||
|
|
||||||
/* Enable system filesystem support */
|
/* Enable system filesystem support */
|
||||||
|
@ -325,6 +348,9 @@
|
||||||
#undef SDL_FILESYSTEM_DUMMY
|
#undef SDL_FILESYSTEM_DUMMY
|
||||||
#undef SDL_FILESYSTEM_UNIX
|
#undef SDL_FILESYSTEM_UNIX
|
||||||
#undef SDL_FILESYSTEM_WINDOWS
|
#undef SDL_FILESYSTEM_WINDOWS
|
||||||
|
#undef SDL_FILESYSTEM_NACL
|
||||||
|
#undef SDL_FILESYSTEM_ANDROID
|
||||||
|
#undef SDL_FILESYSTEM_EMSCRIPTEN
|
||||||
|
|
||||||
/* Enable assembly routines */
|
/* Enable assembly routines */
|
||||||
#undef SDL_ASSEMBLY_ROUTINES
|
#undef SDL_ASSEMBLY_ROUTINES
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -43,7 +43,6 @@
|
||||||
#define HAVE_STDINT_H 1
|
#define HAVE_STDINT_H 1
|
||||||
#define HAVE_CTYPE_H 1
|
#define HAVE_CTYPE_H 1
|
||||||
#define HAVE_MATH_H 1
|
#define HAVE_MATH_H 1
|
||||||
#define HAVE_SIGNAL_H 1
|
|
||||||
|
|
||||||
/* C library functions */
|
/* C library functions */
|
||||||
#define HAVE_MALLOC 1
|
#define HAVE_MALLOC 1
|
||||||
|
@ -76,7 +75,6 @@
|
||||||
#define HAVE_STRTOULL 1
|
#define HAVE_STRTOULL 1
|
||||||
#define HAVE_STRTOD 1
|
#define HAVE_STRTOD 1
|
||||||
#define HAVE_ATOI 1
|
#define HAVE_ATOI 1
|
||||||
#define HAVE_ATOF 1
|
|
||||||
#define HAVE_STRCMP 1
|
#define HAVE_STRCMP 1
|
||||||
#define HAVE_STRNCMP 1
|
#define HAVE_STRNCMP 1
|
||||||
#define HAVE_STRCASECMP 1
|
#define HAVE_STRCASECMP 1
|
||||||
|
@ -100,10 +98,13 @@
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
#define HAVE_SIGACTION 1
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#define HAVE_SETJMP 1
|
#define HAVE_SETJMP 1
|
||||||
#define HAVE_NANOSLEEP 1
|
#define HAVE_NANOSLEEP 1
|
||||||
#define HAVE_SYSCONF 1
|
#define HAVE_SYSCONF 1
|
||||||
|
#define HAVE_CLOCK_GETTIME 1
|
||||||
|
|
||||||
#define SIZEOF_VOIDP 4
|
#define SIZEOF_VOIDP 4
|
||||||
|
|
||||||
|
@ -138,7 +139,7 @@
|
||||||
/* Enable system power support */
|
/* Enable system power support */
|
||||||
#define SDL_POWER_ANDROID 1
|
#define SDL_POWER_ANDROID 1
|
||||||
|
|
||||||
/* !!! FIXME: what does Android do for filesystem stuff? */
|
/* Enable the filesystem driver */
|
||||||
#define SDL_FILESYSTEM_DUMMY 1
|
#define SDL_FILESYSTEM_ANDROID 1
|
||||||
|
|
||||||
#endif /* _SDL_config_android_h */
|
#endif /* _SDL_config_android_h */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -98,6 +98,9 @@
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#define HAVE_SIGACTION 1
|
#define HAVE_SIGACTION 1
|
||||||
#define HAVE_SETJMP 1
|
#define HAVE_SETJMP 1
|
||||||
#define HAVE_NANOSLEEP 1
|
#define HAVE_NANOSLEEP 1
|
||||||
|
@ -110,10 +113,13 @@
|
||||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||||
|
|
||||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||||
#define SDL_HAPTIC_DISABLED 1
|
#define SDL_HAPTIC_DUMMY 1
|
||||||
|
|
||||||
|
/* Enable MFi joystick support */
|
||||||
|
#define SDL_JOYSTICK_MFI 1
|
||||||
|
|
||||||
/* Enable Unix style SO loading */
|
/* Enable Unix style SO loading */
|
||||||
/* Technically this works, but it violates the iPhone developer agreement */
|
/* Technically this works, but violates the iOS dev agreement prior to iOS 8 */
|
||||||
/* #define SDL_LOADSO_DLOPEN 1 */
|
/* #define SDL_LOADSO_DLOPEN 1 */
|
||||||
|
|
||||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||||
|
@ -131,6 +137,7 @@
|
||||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||||
|
|
||||||
/* enable OpenGL ES */
|
/* enable OpenGL ES */
|
||||||
|
#define SDL_VIDEO_OPENGL_ES2 1
|
||||||
#define SDL_VIDEO_OPENGL_ES 1
|
#define SDL_VIDEO_OPENGL_ES 1
|
||||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||||
|
@ -141,11 +148,11 @@
|
||||||
/* enable iPhone keyboard support */
|
/* enable iPhone keyboard support */
|
||||||
#define SDL_IPHONE_KEYBOARD 1
|
#define SDL_IPHONE_KEYBOARD 1
|
||||||
|
|
||||||
/* enable joystick subsystem */
|
/* enable iOS extended launch screen */
|
||||||
#define SDL_JOYSTICK_DISABLED 0
|
#define SDL_IPHONE_LAUNCHSCREEN 1
|
||||||
|
|
||||||
/* Set max recognized G-force from accelerometer
|
/* Set max recognized G-force from accelerometer
|
||||||
See src/joystick/uikit/SDLUIAccelerationDelegate.m for notes on why this is needed
|
See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
|
||||||
*/
|
*/
|
||||||
#define SDL_IPHONE_MAX_GFORCE 5.0
|
#define SDL_IPHONE_MAX_GFORCE 5.0
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -96,6 +96,9 @@
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#define HAVE_SIGACTION 1
|
#define HAVE_SIGACTION 1
|
||||||
#define HAVE_SETJMP 1
|
#define HAVE_SETJMP 1
|
||||||
#define HAVE_NANOSLEEP 1
|
#define HAVE_NANOSLEEP 1
|
||||||
|
@ -136,6 +139,7 @@
|
||||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
||||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
||||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
||||||
|
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -95,6 +95,9 @@
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#define HAVE_SIGACTION 1
|
#define HAVE_SIGACTION 1
|
||||||
#define HAVE_SETJMP 1
|
#define HAVE_SETJMP 1
|
||||||
#define HAVE_NANOSLEEP 1
|
#define HAVE_NANOSLEEP 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -98,6 +98,9 @@
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#define HAVE_SETJMP 1
|
#define HAVE_SETJMP 1
|
||||||
#define HAVE_NANOSLEEP 1
|
#define HAVE_NANOSLEEP 1
|
||||||
/* #define HAVE_SYSCONF 1 */
|
/* #define HAVE_SYSCONF 1 */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -76,6 +76,12 @@ typedef unsigned int uintptr_t;
|
||||||
# define SIZEOF_VOIDP 4
|
# define SIZEOF_VOIDP 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define HAVE_DDRAW_H 1
|
||||||
|
#define HAVE_DINPUT_H 1
|
||||||
|
#define HAVE_DSOUND_H 1
|
||||||
|
#define HAVE_DXGI_H 1
|
||||||
|
#define HAVE_XINPUT_H 1
|
||||||
|
|
||||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||||
#ifdef HAVE_LIBC
|
#ifdef HAVE_LIBC
|
||||||
/* Useful headers */
|
/* Useful headers */
|
||||||
|
@ -130,6 +136,9 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#if _MSC_VER >= 1800
|
#if _MSC_VER >= 1800
|
||||||
#define HAVE_STRTOLL 1
|
#define HAVE_STRTOLL 1
|
||||||
#define HAVE_VSSCANF 1
|
#define HAVE_VSSCANF 1
|
||||||
|
@ -153,7 +162,9 @@ typedef unsigned int uintptr_t;
|
||||||
|
|
||||||
/* Enable various input drivers */
|
/* Enable various input drivers */
|
||||||
#define SDL_JOYSTICK_DINPUT 1
|
#define SDL_JOYSTICK_DINPUT 1
|
||||||
|
#define SDL_JOYSTICK_XINPUT 1
|
||||||
#define SDL_HAPTIC_DINPUT 1
|
#define SDL_HAPTIC_DINPUT 1
|
||||||
|
#define SDL_HAPTIC_XINPUT 1
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#define SDL_LOADSO_WINDOWS 1
|
#define SDL_LOADSO_WINDOWS 1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -19,11 +19,26 @@
|
||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SDL_config_windows_h
|
#ifndef _SDL_config_winrt_h
|
||||||
#define _SDL_config_windows_h
|
#define _SDL_config_winrt_h
|
||||||
|
|
||||||
#include "SDL_platform.h"
|
#include "SDL_platform.h"
|
||||||
|
|
||||||
|
/* Make sure the Windows SDK's NTDDI_VERSION macro gets defined. This is used
|
||||||
|
by SDL to determine which version of the Windows SDK is being used.
|
||||||
|
*/
|
||||||
|
#include <sdkddkver.h>
|
||||||
|
|
||||||
|
/* Define possibly-undefined NTDDI values (used when compiling SDL against
|
||||||
|
older versions of the Windows SDK.
|
||||||
|
*/
|
||||||
|
#ifndef NTDDI_WINBLUE
|
||||||
|
#define NTDDI_WINBLUE 0x06030000
|
||||||
|
#endif
|
||||||
|
#ifndef NTDDI_WIN10
|
||||||
|
#define NTDDI_WIN10 0x0A000000
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is a set of defines to configure the SDL features */
|
/* This is a set of defines to configure the SDL features */
|
||||||
|
|
||||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||||
|
@ -77,6 +92,10 @@ typedef unsigned int uintptr_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Useful headers */
|
/* Useful headers */
|
||||||
|
#define HAVE_DXGI_H 1
|
||||||
|
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||||
|
#define HAVE_XINPUT_H 1
|
||||||
|
#endif
|
||||||
#define HAVE_LIBC 1
|
#define HAVE_LIBC 1
|
||||||
#define HAVE_STDIO_H 1
|
#define HAVE_STDIO_H 1
|
||||||
#define STDC_HEADERS 1
|
#define STDC_HEADERS 1
|
||||||
|
@ -136,6 +155,9 @@ typedef unsigned int uintptr_t;
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#define HAVE__FSEEKI64 1
|
#define HAVE__FSEEKI64 1
|
||||||
|
|
||||||
/* Enable various audio drivers */
|
/* Enable various audio drivers */
|
||||||
|
@ -144,20 +166,24 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||||
|
|
||||||
/* Enable various input drivers */
|
/* Enable various input drivers */
|
||||||
// TODO, WinRT: Get haptic support working
|
|
||||||
#define SDL_HAPTIC_DISABLED 1
|
|
||||||
|
|
||||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||||
#define SDL_JOYSTICK_DISABLED 1
|
#define SDL_JOYSTICK_DISABLED 1
|
||||||
|
#define SDL_HAPTIC_DISABLED 1
|
||||||
#else
|
#else
|
||||||
#define SDL_JOYSTICK_XINPUT 1
|
#define SDL_JOYSTICK_XINPUT 1
|
||||||
|
#define SDL_HAPTIC_XINPUT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable various shared object loading systems */
|
/* Enable various shared object loading systems */
|
||||||
#define SDL_LOADSO_WINDOWS 1
|
#define SDL_LOADSO_WINDOWS 1
|
||||||
|
|
||||||
/* Enable various threading systems */
|
/* Enable various threading systems */
|
||||||
|
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||||
|
#define SDL_THREAD_WINDOWS 1
|
||||||
|
#else
|
||||||
|
/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */
|
||||||
#define SDL_THREAD_STDCPP 1
|
#define SDL_THREAD_STDCPP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Enable various timer systems */
|
/* Enable various timer systems */
|
||||||
#define SDL_TIMER_WINDOWS 1
|
#define SDL_TIMER_WINDOWS 1
|
||||||
|
@ -167,10 +193,8 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||||
|
|
||||||
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
|
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
|
||||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP /* TODO, WinRT: try adding OpenGL ES 2 support for Windows Phone 8 */
|
|
||||||
#define SDL_VIDEO_OPENGL_ES2 1
|
#define SDL_VIDEO_OPENGL_ES2 1
|
||||||
#define SDL_VIDEO_OPENGL_EGL 1
|
#define SDL_VIDEO_OPENGL_EGL 1
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Enable appropriate renderer(s) */
|
/* Enable appropriate renderer(s) */
|
||||||
#define SDL_VIDEO_RENDER_D3D11 1
|
#define SDL_VIDEO_RENDER_D3D11 1
|
||||||
|
@ -187,4 +211,4 @@ typedef unsigned int uintptr_t;
|
||||||
#define SDL_ASSEMBLY_ROUTINES 1
|
#define SDL_ASSEMBLY_ROUTINES 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _SDL_config_windows_h */
|
#endif /* _SDL_config_winrt_h */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -89,12 +89,14 @@
|
||||||
#define HAVE_SIN 1
|
#define HAVE_SIN 1
|
||||||
#define HAVE_SINF 1
|
#define HAVE_SINF 1
|
||||||
#define HAVE_SQRT 1
|
#define HAVE_SQRT 1
|
||||||
|
#define HAVE_SQRTF 1
|
||||||
|
#define HAVE_TAN 1
|
||||||
|
#define HAVE_TANF 1
|
||||||
#define HAVE_SIGACTION 1
|
#define HAVE_SIGACTION 1
|
||||||
#define HAVE_SETJMP 1
|
#define HAVE_SETJMP 1
|
||||||
#define HAVE_NANOSLEEP 1
|
#define HAVE_NANOSLEEP 1
|
||||||
#define HAVE_POW 1
|
#define HAVE_POW 1
|
||||||
|
|
||||||
#define SDL_CDROM_DISABLED 1
|
|
||||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||||
#define SDL_AUDIO_DRIVER_OSS 1
|
#define SDL_AUDIO_DRIVER_OSS 1
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -139,6 +139,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns true if the CPU has AVX2 features.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function returns the amount of RAM configured in the system, in MB.
|
* This function returns the amount of RAM configured in the system, in MB.
|
||||||
*/
|
*/
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <endian.h>
|
#include <endian.h>
|
||||||
#define SDL_BYTEORDER __BYTE_ORDER
|
#define SDL_BYTEORDER __BYTE_ORDER
|
||||||
#else /* __linux __ */
|
#else /* __linux__ */
|
||||||
#if defined(__hppa__) || \
|
#if defined(__hppa__) || \
|
||||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||||
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
#else
|
#else
|
||||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||||
#endif
|
#endif
|
||||||
#endif /* __linux __ */
|
#endif /* __linux__ */
|
||||||
#endif /* !SDL_BYTEORDER */
|
#endif /* !SDL_BYTEORDER */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -38,7 +38,7 @@ extern "C" {
|
||||||
|
|
||||||
/* Public functions */
|
/* Public functions */
|
||||||
/* SDL_SetError() unconditionally returns -1. */
|
/* SDL_SetError() unconditionally returns -1. */
|
||||||
extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...);
|
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -59,7 +59,7 @@ typedef enum
|
||||||
/* Application events */
|
/* Application events */
|
||||||
SDL_QUIT = 0x100, /**< User-requested quit */
|
SDL_QUIT = 0x100, /**< User-requested quit */
|
||||||
|
|
||||||
/* These application events have special meaning on iOS, see README-ios.txt for details */
|
/* These application events have special meaning on iOS, see README-ios.md for details */
|
||||||
SDL_APP_TERMINATING, /**< The application is being terminated by the OS
|
SDL_APP_TERMINATING, /**< The application is being terminated by the OS
|
||||||
Called on iOS in applicationWillTerminate()
|
Called on iOS in applicationWillTerminate()
|
||||||
Called on Android in onDestroy()
|
Called on Android in onDestroy()
|
||||||
|
@ -94,6 +94,9 @@ typedef enum
|
||||||
SDL_KEYUP, /**< Key released */
|
SDL_KEYUP, /**< Key released */
|
||||||
SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
|
SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
|
||||||
SDL_TEXTINPUT, /**< Keyboard text input */
|
SDL_TEXTINPUT, /**< Keyboard text input */
|
||||||
|
SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
|
||||||
|
input language or keyboard layout change.
|
||||||
|
*/
|
||||||
|
|
||||||
/* Mouse events */
|
/* Mouse events */
|
||||||
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
|
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
|
||||||
|
@ -134,8 +137,13 @@ typedef enum
|
||||||
/* Drag and drop events */
|
/* Drag and drop events */
|
||||||
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
||||||
|
|
||||||
|
/* Audio hotplug events */
|
||||||
|
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
||||||
|
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
||||||
|
|
||||||
/* Render events */
|
/* Render events */
|
||||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset */
|
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||||
|
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||||
|
|
||||||
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
||||||
* and should be allocated with SDL_RegisterEvents()
|
* and should be allocated with SDL_RegisterEvents()
|
||||||
|
@ -259,6 +267,7 @@ typedef struct SDL_MouseWheelEvent
|
||||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||||
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
|
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
|
||||||
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
|
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
|
||||||
|
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
|
||||||
} SDL_MouseWheelEvent;
|
} SDL_MouseWheelEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -380,6 +389,20 @@ typedef struct SDL_ControllerDeviceEvent
|
||||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
||||||
} SDL_ControllerDeviceEvent;
|
} SDL_ControllerDeviceEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Audio device event structure (event.adevice.*)
|
||||||
|
*/
|
||||||
|
typedef struct SDL_AudioDeviceEvent
|
||||||
|
{
|
||||||
|
Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
|
||||||
|
Uint32 timestamp;
|
||||||
|
Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
|
||||||
|
Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
|
||||||
|
Uint8 padding1;
|
||||||
|
Uint8 padding2;
|
||||||
|
Uint8 padding3;
|
||||||
|
} SDL_AudioDeviceEvent;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Touch finger event structure (event.tfinger.*)
|
* \brief Touch finger event structure (event.tfinger.*)
|
||||||
|
@ -392,8 +415,8 @@ typedef struct SDL_TouchFingerEvent
|
||||||
SDL_FingerID fingerId;
|
SDL_FingerID fingerId;
|
||||||
float x; /**< Normalized in the range 0...1 */
|
float x; /**< Normalized in the range 0...1 */
|
||||||
float y; /**< Normalized in the range 0...1 */
|
float y; /**< Normalized in the range 0...1 */
|
||||||
float dx; /**< Normalized in the range 0...1 */
|
float dx; /**< Normalized in the range -1...1 */
|
||||||
float dy; /**< Normalized in the range 0...1 */
|
float dy; /**< Normalized in the range -1...1 */
|
||||||
float pressure; /**< Normalized in the range 0...1 */
|
float pressure; /**< Normalized in the range 0...1 */
|
||||||
} SDL_TouchFingerEvent;
|
} SDL_TouchFingerEvent;
|
||||||
|
|
||||||
|
@ -420,7 +443,7 @@ typedef struct SDL_MultiGestureEvent
|
||||||
*/
|
*/
|
||||||
typedef struct SDL_DollarGestureEvent
|
typedef struct SDL_DollarGestureEvent
|
||||||
{
|
{
|
||||||
Uint32 type; /**< ::SDL_DOLLARGESTURE */
|
Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
|
||||||
Uint32 timestamp;
|
Uint32 timestamp;
|
||||||
SDL_TouchID touchId; /**< The touch device id */
|
SDL_TouchID touchId; /**< The touch device id */
|
||||||
SDL_GestureID gestureId;
|
SDL_GestureID gestureId;
|
||||||
|
@ -433,8 +456,8 @@ typedef struct SDL_DollarGestureEvent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief An event used to request a file open by the system (event.drop.*)
|
* \brief An event used to request a file open by the system (event.drop.*)
|
||||||
* This event is disabled by default, you can enable it with SDL_EventState()
|
* This event is enabled by default, you can disable it with SDL_EventState().
|
||||||
* \note If you enable this event, you must free the filename in the event.
|
* \note If this event is enabled, you must free the filename in the event.
|
||||||
*/
|
*/
|
||||||
typedef struct SDL_DropEvent
|
typedef struct SDL_DropEvent
|
||||||
{
|
{
|
||||||
|
@ -514,6 +537,7 @@ typedef union SDL_Event
|
||||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||||
|
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||||
SDL_QuitEvent quit; /**< Quit request event data */
|
SDL_QuitEvent quit; /**< Quit request event data */
|
||||||
SDL_UserEvent user; /**< Custom event data */
|
SDL_UserEvent user; /**< Custom event data */
|
||||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||||
|
@ -583,6 +607,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function clears events from the event queue
|
* This function clears events from the event queue
|
||||||
|
* This function only affects currently queued events. If you want to make
|
||||||
|
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
|
||||||
|
* on the main thread immediately before the flush call.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
||||||
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -131,6 +131,6 @@ extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||||
#endif
|
#endif
|
||||||
#include "close_code.h"
|
#include "close_code.h"
|
||||||
|
|
||||||
#endif /* _SDL_system_h */
|
#endif /* _SDL_filesystem_h */
|
||||||
|
|
||||||
/* vi: set ts=4 sw=4 expandtab: */
|
/* vi: set ts=4 sw=4 expandtab: */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -43,7 +43,7 @@ extern "C" {
|
||||||
* \file SDL_gamecontroller.h
|
* \file SDL_gamecontroller.h
|
||||||
*
|
*
|
||||||
* In order to use these functions, SDL_Init() must have been called
|
* In order to use these functions, SDL_Init() must have been called
|
||||||
* with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system
|
* with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system
|
||||||
* for game controllers, and load appropriate drivers.
|
* for game controllers, and load appropriate drivers.
|
||||||
*
|
*
|
||||||
* If you would like to receive controller updates while the application
|
* If you would like to receive controller updates while the application
|
||||||
|
@ -163,13 +163,19 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_
|
||||||
/**
|
/**
|
||||||
* Open a game controller for use.
|
* Open a game controller for use.
|
||||||
* The index passed as an argument refers to the N'th game controller on the system.
|
* The index passed as an argument refers to the N'th game controller on the system.
|
||||||
* This index is the value which will identify this controller in future controller
|
* This index is not the value which will identify this controller in future
|
||||||
* events.
|
* controller events. The joystick's instance id (::SDL_JoystickID) will be
|
||||||
|
* used there instead.
|
||||||
*
|
*
|
||||||
* \return A controller identifier, or NULL if an error occurred.
|
* \return A controller identifier, or NULL if an error occurred.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
|
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the SDL_GameController associated with an instance id.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the name for this currently opened controller
|
* Return the name for this currently opened controller
|
||||||
*/
|
*/
|
||||||
|
@ -241,7 +247,8 @@ SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
|
||||||
/**
|
/**
|
||||||
* Get the current state of an axis control on a game controller.
|
* Get the current state of an axis control on a game controller.
|
||||||
*
|
*
|
||||||
* The state is a value ranging from -32768 to 32767.
|
* The state is a value ranging from -32768 to 32767 (except for the triggers,
|
||||||
|
* which range from 0 to 32767).
|
||||||
*
|
*
|
||||||
* The axis indices start at index 0.
|
* The axis indices start at index 0.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -102,11 +102,6 @@
|
||||||
* return 0; // Success
|
* return 0; // Success
|
||||||
* }
|
* }
|
||||||
* \endcode
|
* \endcode
|
||||||
*
|
|
||||||
* You can also find out more information on my blog:
|
|
||||||
* http://bobbens.dyndns.org/journal/2010/sdl_haptic/
|
|
||||||
*
|
|
||||||
* \author Edgar Simo Serra
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SDL_haptic_h
|
#ifndef _SDL_haptic_h
|
||||||
|
@ -347,6 +342,9 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||||
/**
|
/**
|
||||||
* \brief Structure that represents a haptic direction.
|
* \brief Structure that represents a haptic direction.
|
||||||
*
|
*
|
||||||
|
* This is the direction where the force comes from,
|
||||||
|
* instead of the direction in which the force is exerted.
|
||||||
|
*
|
||||||
* Directions can be specified by:
|
* Directions can be specified by:
|
||||||
* - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
|
* - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
|
||||||
* - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
|
* - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
|
||||||
|
@ -370,7 +368,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||||
^
|
^
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
(1,0) West <----[ HAPTIC ]----> East (-1,0)
|
(-1,0) West <----[ HAPTIC ]----> East (1,0)
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
v
|
v
|
||||||
|
@ -395,9 +393,9 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||||
* (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses
|
* (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses
|
||||||
* the first three \c dir parameters. The cardinal directions would be:
|
* the first three \c dir parameters. The cardinal directions would be:
|
||||||
* - North: 0,-1, 0
|
* - North: 0,-1, 0
|
||||||
* - East: -1, 0, 0
|
* - East: 1, 0, 0
|
||||||
* - South: 0, 1, 0
|
* - South: 0, 1, 0
|
||||||
* - West: 1, 0, 0
|
* - West: -1, 0, 0
|
||||||
*
|
*
|
||||||
* The Z axis represents the height of the effect if supported, otherwise
|
* The Z axis represents the height of the effect if supported, otherwise
|
||||||
* it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you
|
* it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you
|
||||||
|
@ -492,7 +490,7 @@ typedef struct SDL_HapticConstant
|
||||||
* over time. The type determines the shape of the wave and the parameters
|
* over time. The type determines the shape of the wave and the parameters
|
||||||
* determine the dimensions of the wave.
|
* determine the dimensions of the wave.
|
||||||
*
|
*
|
||||||
* Phase is given by hundredth of a cycle meaning that giving the phase a value
|
* Phase is given by hundredth of a degree meaning that giving the phase a value
|
||||||
* of 9000 will displace it 25% of its period. Here are sample values:
|
* of 9000 will displace it 25% of its period. Here are sample values:
|
||||||
* - 0: No phase displacement.
|
* - 0: No phase displacement.
|
||||||
* - 9000: Displaced 25% of its period.
|
* - 9000: Displaced 25% of its period.
|
||||||
|
@ -553,9 +551,9 @@ typedef struct SDL_HapticPeriodic
|
||||||
|
|
||||||
/* Periodic */
|
/* Periodic */
|
||||||
Uint16 period; /**< Period of the wave. */
|
Uint16 period; /**< Period of the wave. */
|
||||||
Sint16 magnitude; /**< Peak value. */
|
Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
|
||||||
Sint16 offset; /**< Mean value of the wave. */
|
Sint16 offset; /**< Mean value of the wave. */
|
||||||
Uint16 phase; /**< Horizontal shift given by hundredth of a cycle. */
|
Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */
|
||||||
|
|
||||||
/* Envelope */
|
/* Envelope */
|
||||||
Uint16 attack_length; /**< Duration of the attack. */
|
Uint16 attack_length; /**< Duration of the attack. */
|
||||||
|
@ -604,11 +602,11 @@ typedef struct SDL_HapticCondition
|
||||||
Uint16 interval; /**< How soon it can be triggered again after button. */
|
Uint16 interval; /**< How soon it can be triggered again after button. */
|
||||||
|
|
||||||
/* Condition */
|
/* Condition */
|
||||||
Uint16 right_sat[3]; /**< Level when joystick is to the positive side. */
|
Uint16 right_sat[3]; /**< Level when joystick is to the positive side; max 0xFFFF. */
|
||||||
Uint16 left_sat[3]; /**< Level when joystick is to the negative side. */
|
Uint16 left_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */
|
||||||
Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */
|
Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */
|
||||||
Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */
|
Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */
|
||||||
Uint16 deadband[3]; /**< Size of the dead zone. */
|
Uint16 deadband[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
|
||||||
Sint16 center[3]; /**< Position of the dead zone. */
|
Sint16 center[3]; /**< Position of the dead zone. */
|
||||||
} SDL_HapticCondition;
|
} SDL_HapticCondition;
|
||||||
|
|
||||||
|
@ -897,7 +895,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
|
||||||
/**
|
/**
|
||||||
* \brief Opens a Haptic device for usage from a Joystick device.
|
* \brief Opens a Haptic device for usage from a Joystick device.
|
||||||
*
|
*
|
||||||
* You must still close the haptic device seperately. It will not be closed
|
* You must still close the haptic device separately. It will not be closed
|
||||||
* with the joystick.
|
* with the joystick.
|
||||||
*
|
*
|
||||||
* When opening from a joystick you should first close the haptic device before
|
* When opening from a joystick you should first close the haptic device before
|
||||||
|
@ -954,7 +952,7 @@ extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
|
||||||
extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
|
extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Gets the haptic devices supported features in bitwise matter.
|
* \brief Gets the haptic device's supported features in bitwise manner.
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* \code
|
* \code
|
||||||
|
@ -1148,7 +1146,7 @@ extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
|
||||||
*
|
*
|
||||||
* Call to unpause after SDL_HapticPause().
|
* Call to unpause after SDL_HapticPause().
|
||||||
*
|
*
|
||||||
* \param haptic Haptic device to pause.
|
* \param haptic Haptic device to unpause.
|
||||||
* \return 0 on success or -1 on error.
|
* \return 0 on success or -1 on error.
|
||||||
*
|
*
|
||||||
* \sa SDL_HapticPause
|
* \sa SDL_HapticPause
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -116,7 +116,7 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* By default, SDL does not use Direct3D Debug Layer.
|
* By default, SDL does not use Direct3D Debug Layer.
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_HINT_RENDER_DIRECT3D11_DEBUG"
|
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling the scaling quality
|
* \brief A variable controlling the scaling quality
|
||||||
|
@ -185,6 +185,42 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - Disable _NET_WM_PING
|
||||||
|
* "1" - Enable _NET_WM_PING
|
||||||
|
*
|
||||||
|
* By default SDL will use _NET_WM_PING, but for applications that know they
|
||||||
|
* will not always be able to respond to ping requests in a timely manner they can
|
||||||
|
* turn it off to avoid the window manager thinking the app is hung.
|
||||||
|
* The hint is checked in CreateWindow.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
|
||||||
|
* "1" - The window frame is interactive when the cursor is hidden
|
||||||
|
*
|
||||||
|
* By default SDL will allow interaction with the window frame when the cursor is hidden
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable controlling whether the windows message loop is processed by SDL
|
||||||
|
*
|
||||||
|
* This variable can be set to the following values:
|
||||||
|
* "0" - The window message loop is not run
|
||||||
|
* "1" - The window message loop is processed in SDL_PumpEvents()
|
||||||
|
*
|
||||||
|
* By default SDL will process the windows message loop
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether grabbing input grabs the keyboard
|
* \brief A variable controlling whether grabbing input grabs the keyboard
|
||||||
*
|
*
|
||||||
|
@ -221,6 +257,9 @@ extern "C" {
|
||||||
* this is problematic. This functionality can be disabled by setting this
|
* this is problematic. This functionality can be disabled by setting this
|
||||||
* hint.
|
* hint.
|
||||||
*
|
*
|
||||||
|
* As of SDL 2.0.4, SDL_EnableScreenSaver and SDL_DisableScreenSaver accomplish
|
||||||
|
* the same thing on iOS. They should be preferred over this hint.
|
||||||
|
*
|
||||||
* This variable can be set to the following values:
|
* This variable can be set to the following values:
|
||||||
* "0" - Enable idle timer
|
* "0" - Enable idle timer
|
||||||
* "1" - Disable idle timer
|
* "1" - Disable idle timer
|
||||||
|
@ -239,8 +278,9 @@ extern "C" {
|
||||||
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
|
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable controlling whether an Android built-in accelerometer should be
|
* \brief A variable controlling whether the Android / iOS built-in
|
||||||
* listed as a joystick device, rather than listing actual joysticks only.
|
* accelerometer should be listed as a joystick device, rather than listing
|
||||||
|
* actual joysticks only.
|
||||||
*
|
*
|
||||||
* This variable can be set to the following values:
|
* This variable can be set to the following values:
|
||||||
* "0" - List only real joysticks and accept input from them
|
* "0" - List only real joysticks and accept input from them
|
||||||
|
@ -259,6 +299,16 @@ extern "C" {
|
||||||
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
|
#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
|
||||||
|
*
|
||||||
|
* This hint is for backwards compatibility only and will be removed in SDL 2.1
|
||||||
|
*
|
||||||
|
* The default value is "0". This hint must be set before SDL_Init()
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable that lets you manually hint extra gamecontroller db entries
|
* \brief A variable that lets you manually hint extra gamecontroller db entries
|
||||||
*
|
*
|
||||||
|
@ -285,7 +335,7 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief If set to 0 then never set the top most bit on a SDL Window, even if the video mode expects it.
|
* \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
|
||||||
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
* This is a debugging aid for developers and not expected to be used by end users. The default is "1"
|
||||||
*
|
*
|
||||||
* This variable can be set to the following values:
|
* This variable can be set to the following values:
|
||||||
|
@ -312,14 +362,25 @@ extern "C" {
|
||||||
#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
|
#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac)
|
* \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
|
||||||
|
*
|
||||||
|
* Use this hint in case you need to set SDL's threads stack size to other than the default.
|
||||||
|
* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
|
||||||
|
* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
|
||||||
|
* Support for this hint is currently available only in the pthread backend.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
|
#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
|
* \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
|
||||||
*
|
*
|
||||||
* If present, holding ctrl while left clicking will generate a right click
|
* If present, holding ctrl while left clicking will generate a right click
|
||||||
* event when on Mac.
|
* event when on Mac.
|
||||||
*/
|
*/
|
||||||
|
@ -360,7 +421,7 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
|
#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* \brief A URL to a WinRT app's privacy policy
|
* \brief A URL to a WinRT app's privacy policy
|
||||||
*
|
*
|
||||||
* All network-enabled WinRT apps must make a privacy policy available to its
|
* All network-enabled WinRT apps must make a privacy policy available to its
|
||||||
|
@ -384,13 +445,13 @@ extern "C" {
|
||||||
* will not get used on that platform. Network-enabled phone apps should display
|
* will not get used on that platform. Network-enabled phone apps should display
|
||||||
* their privacy policy through some other, in-app means.
|
* their privacy policy through some other, in-app means.
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_HINT_WINRT_PRIVACY_POLICY_URL"
|
#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
|
||||||
|
|
||||||
/** \brief Label text for a WinRT app's privacy policy link
|
/** \brief Label text for a WinRT app's privacy policy link
|
||||||
*
|
*
|
||||||
* Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
|
* Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
|
||||||
* Microsoft mandates that this policy be available via the Windows Settings charm.
|
* Microsoft mandates that this policy be available via the Windows Settings charm.
|
||||||
* SDL provides code to add a link there, with it's label text being set via the
|
* SDL provides code to add a link there, with its label text being set via the
|
||||||
* optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
|
* optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
|
||||||
*
|
*
|
||||||
* Please note that a privacy policy's contents are not set via this hint. A separate
|
* Please note that a privacy policy's contents are not set via this hint. A separate
|
||||||
|
@ -405,16 +466,59 @@ extern "C" {
|
||||||
* For additional information on linking to a privacy policy, see the documentation for
|
* For additional information on linking to a privacy policy, see the documentation for
|
||||||
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
|
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_HINT_WINRT_PRIVACY_POLICY_LABEL"
|
#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
|
||||||
|
|
||||||
/** \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
|
/** \brief Allows back-button-press events on Windows Phone to be marked as handled
|
||||||
*
|
*
|
||||||
* TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
|
* Windows Phone devices typically feature a Back button. When pressed,
|
||||||
* For now, more details on why this is needed can be found at the
|
* the OS will emit back-button-press events, which apps are expected to
|
||||||
* beginning of the following web page:
|
* handle in an appropriate manner. If apps do not explicitly mark these
|
||||||
|
* events as 'Handled', then the OS will invoke its default behavior for
|
||||||
|
* unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
|
||||||
|
* terminate the app (and attempt to switch to the previous app, or to the
|
||||||
|
* device's home screen).
|
||||||
|
*
|
||||||
|
* Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
|
||||||
|
* to mark back-button-press events as Handled, if and when one is sent to
|
||||||
|
* the app.
|
||||||
|
*
|
||||||
|
* Internally, Windows Phone sends back button events as parameters to
|
||||||
|
* special back-button-press callback functions. Apps that need to respond
|
||||||
|
* to back-button-press events are expected to register one or more
|
||||||
|
* callback functions for such, shortly after being launched (during the
|
||||||
|
* app's initialization phase). After the back button is pressed, the OS
|
||||||
|
* will invoke these callbacks. If the app's callback(s) do not explicitly
|
||||||
|
* mark the event as handled by the time they return, or if the app never
|
||||||
|
* registers one of these callback, the OS will consider the event
|
||||||
|
* un-handled, and it will apply its default back button behavior (terminate
|
||||||
|
* the app).
|
||||||
|
*
|
||||||
|
* SDL registers its own back-button-press callback with the Windows Phone
|
||||||
|
* OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
|
||||||
|
* and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
|
||||||
|
* it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
|
||||||
|
* If the hint's value is set to "1", the back button event's Handled
|
||||||
|
* property will get set to 'true'. If the hint's value is set to something
|
||||||
|
* else, or if it is unset, SDL will leave the event's Handled property
|
||||||
|
* alone. (By default, the OS sets this property to 'false', to note.)
|
||||||
|
*
|
||||||
|
* SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
|
||||||
|
* back button is pressed, or can set it in direct-response to a back button
|
||||||
|
* being pressed.
|
||||||
|
*
|
||||||
|
* In order to get notified when a back button is pressed, SDL apps should
|
||||||
|
* register a callback function with SDL_AddEventWatch(), and have it listen
|
||||||
|
* for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
|
||||||
|
* (Alternatively, SDL_KEYUP events can be listened-for. Listening for
|
||||||
|
* either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
|
||||||
|
* set by such a callback, will be applied to the OS' current
|
||||||
|
* back-button-press event.
|
||||||
|
*
|
||||||
|
* More details on back button behavior in Windows Phone apps can be found
|
||||||
|
* at the following page, on Microsoft's developer site:
|
||||||
* http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
|
* http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
|
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
|
* \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
|
||||||
|
@ -427,7 +531,7 @@ extern "C" {
|
||||||
* button on their titlebars).
|
* button on their titlebars).
|
||||||
* "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
|
* "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
|
||||||
* SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
|
* SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
|
||||||
* button on their titlebars.
|
* button on their titlebars).
|
||||||
*
|
*
|
||||||
* The default value is "1". Spaces are disabled regardless of this hint if
|
* The default value is "1". Spaces are disabled regardless of this hint if
|
||||||
* the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
|
* the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
|
||||||
|
@ -435,6 +539,96 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief When set don't force the SDL app to become a foreground process
|
||||||
|
*
|
||||||
|
* This hint only applies to Mac OS X.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Android APK expansion main file version. Should be a string number like "1", "2" etc.
|
||||||
|
*
|
||||||
|
* Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
|
||||||
|
*
|
||||||
|
* If both hints were set then SDL_RWFromFile() will look into expansion files
|
||||||
|
* after a given relative path was not found in the internal storage and assets.
|
||||||
|
*
|
||||||
|
* By default this hint is not set and the APK expansion files are not searched.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
|
||||||
|
*
|
||||||
|
* Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
|
||||||
|
*
|
||||||
|
* If both hints were set then SDL_RWFromFile() will look into expansion files
|
||||||
|
* after a given relative path was not found in the internal storage and assets.
|
||||||
|
*
|
||||||
|
* By default this hint is not set and the APK expansion files are not searched.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - SDL_TEXTEDITING events are sent, and it is the application's
|
||||||
|
* responsibility to render the text from these events and
|
||||||
|
* differentiate it somehow from committed text. (default)
|
||||||
|
* "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
|
||||||
|
* and text that is being composed will be rendered in its own UI.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A variable to control whether mouse and touch events are to be treated together or separately
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - Mouse events will be handled as touch events, and touch will raise fake mouse
|
||||||
|
* events. This is the behaviour of SDL <= 2.0.3. (default)
|
||||||
|
* "1" - Mouse events will be handled separately from pure touch events.
|
||||||
|
*
|
||||||
|
* The value of this hint is used at runtime, so it can be changed at any time.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief override the binding element for keyboard inputs for Emscripten builds
|
||||||
|
*
|
||||||
|
* This hint only applies to the emscripten platform
|
||||||
|
*
|
||||||
|
* The variable can be one of
|
||||||
|
* "#window" - The javascript window object (this is the default)
|
||||||
|
* "#document" - The javascript document object
|
||||||
|
* "#screen" - the javascript window.screen object
|
||||||
|
* "#canvas" - the WebGL canvas element
|
||||||
|
* any other string without a leading # sign applies to the element on the page with that ID.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
|
||||||
|
*
|
||||||
|
* This hint only applies to Unix-like platforms.
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - SDL will install a SIGINT and SIGTERM handler, and when it
|
||||||
|
* catches a signal, convert it into an SDL_QUIT event.
|
||||||
|
* "1" - SDL will not install a signal handler at all.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
|
||||||
|
*
|
||||||
|
* The variable can be set to the following values:
|
||||||
|
* "0" - SDL will generate a window-close event when it sees Alt+F4.
|
||||||
|
* "1" - SDL will only do normal key handling for Alt+F4.
|
||||||
|
*/
|
||||||
|
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief An enumeration of hint priorities
|
* \brief An enumeration of hint priorities
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -71,6 +71,16 @@ typedef struct {
|
||||||
|
|
||||||
typedef Sint32 SDL_JoystickID;
|
typedef Sint32 SDL_JoystickID;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_JOYSTICK_POWER_UNKNOWN = -1,
|
||||||
|
SDL_JOYSTICK_POWER_EMPTY,
|
||||||
|
SDL_JOYSTICK_POWER_LOW,
|
||||||
|
SDL_JOYSTICK_POWER_MEDIUM,
|
||||||
|
SDL_JOYSTICK_POWER_FULL,
|
||||||
|
SDL_JOYSTICK_POWER_WIRED,
|
||||||
|
SDL_JOYSTICK_POWER_MAX
|
||||||
|
} SDL_JoystickPowerLevel;
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
/**
|
/**
|
||||||
|
@ -87,14 +97,20 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open a joystick for use.
|
* Open a joystick for use.
|
||||||
* The index passed as an argument refers tothe N'th joystick on the system.
|
* The index passed as an argument refers to the N'th joystick on the system.
|
||||||
* This index is the value which will identify this joystick in future joystick
|
* This index is not the value which will identify this joystick in future
|
||||||
* events.
|
* joystick events. The joystick's instance id (::SDL_JoystickID) will be used
|
||||||
|
* there instead.
|
||||||
*
|
*
|
||||||
* \return A joystick identifier, or NULL if an error occurred.
|
* \return A joystick identifier, or NULL if an error occurred.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
|
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the SDL_Joystick associated with an instance id.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the name for this currently opened joystick.
|
* Return the name for this currently opened joystick.
|
||||||
* If no name can be found, this function returns NULL.
|
* If no name can be found, this function returns NULL.
|
||||||
|
@ -189,7 +205,7 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
|
||||||
*/
|
*/
|
||||||
/* @{ */
|
/* @{ */
|
||||||
#define SDL_HAT_CENTERED 0x00
|
#define SDL_HAT_CENTERED 0x00
|
||||||
#define SDL_HAT_UP 0x01
|
#define SDL_HAT_UP 0x01
|
||||||
#define SDL_HAT_RIGHT 0x02
|
#define SDL_HAT_RIGHT 0x02
|
||||||
#define SDL_HAT_DOWN 0x04
|
#define SDL_HAT_DOWN 0x04
|
||||||
#define SDL_HAT_LEFT 0x08
|
#define SDL_HAT_LEFT 0x08
|
||||||
|
@ -241,6 +257,10 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
|
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the battery level of this joystick
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick);
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -137,44 +137,44 @@ extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
|
* \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_Log(const char *fmt, ...);
|
extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
|
* \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, const char *fmt, ...);
|
extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with SDL_LOG_PRIORITY_DEBUG
|
* \brief Log a message with SDL_LOG_PRIORITY_DEBUG
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_LogDebug(int category, const char *fmt, ...);
|
extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with SDL_LOG_PRIORITY_INFO
|
* \brief Log a message with SDL_LOG_PRIORITY_INFO
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_LogInfo(int category, const char *fmt, ...);
|
extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with SDL_LOG_PRIORITY_WARN
|
* \brief Log a message with SDL_LOG_PRIORITY_WARN
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_LogWarn(int category, const char *fmt, ...);
|
extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with SDL_LOG_PRIORITY_ERROR
|
* \brief Log a message with SDL_LOG_PRIORITY_ERROR
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_LogError(int category, const char *fmt, ...);
|
extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
|
* \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_LogCritical(int category, const char *fmt, ...);
|
extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with the specified category and priority.
|
* \brief Log a message with the specified category and priority.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
|
extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
|
||||||
SDL_LogPriority priority,
|
SDL_LogPriority priority,
|
||||||
const char *fmt, ...);
|
SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Log a message with the specified category and priority.
|
* \brief Log a message with the specified category and priority.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -67,6 +67,15 @@
|
||||||
*/
|
*/
|
||||||
#define SDL_MAIN_NEEDED
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
|
#elif defined(__NACL__)
|
||||||
|
/* On NACL we use ppapi_simple to set up the application helper code,
|
||||||
|
then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before
|
||||||
|
starting the user main function.
|
||||||
|
All user code is run in a separate thread by ppapi_simple, thus
|
||||||
|
allowing for blocking io to take place via nacl_io
|
||||||
|
*/
|
||||||
|
#define SDL_MAIN_NEEDED
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif /* SDL_MAIN_HANDLED */
|
#endif /* SDL_MAIN_HANDLED */
|
||||||
|
|
||||||
|
@ -133,14 +142,11 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||||
* \brief Initializes and launches an SDL/WinRT application.
|
* \brief Initializes and launches an SDL/WinRT application.
|
||||||
*
|
*
|
||||||
* \param mainFunction The SDL app's C-style main().
|
* \param mainFunction The SDL app's C-style main().
|
||||||
* \param xamlBackgroundPanel An optional, XAML-based, background panel.
|
* \param reserved Reserved for future use; should be NULL
|
||||||
* For Non-XAML apps, this value must be set to NULL. For XAML apps,
|
* \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
|
||||||
* pass in a pointer to a SwapChainBackgroundPanel, casted to an
|
|
||||||
* IInspectable (via reinterpret_cast).
|
|
||||||
* \ret 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
|
|
||||||
* information on the failure.
|
* information on the failure.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * xamlBackgroundPanel);
|
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * reserved);
|
||||||
|
|
||||||
#endif /* __WINRT__ */
|
#endif /* __WINRT__ */
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -60,6 +60,15 @@ typedef enum
|
||||||
SDL_NUM_SYSTEM_CURSORS
|
SDL_NUM_SYSTEM_CURSORS
|
||||||
} SDL_SystemCursor;
|
} SDL_SystemCursor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Scroll direction types for the Scroll event
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */
|
||||||
|
SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */
|
||||||
|
} SDL_MouseWheelDirection;
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,6 +86,31 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
|
extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the current state of the mouse, in relation to the desktop
|
||||||
|
*
|
||||||
|
* This works just like SDL_GetMouseState(), but the coordinates will be
|
||||||
|
* reported relative to the top-left of the desktop. This can be useful if
|
||||||
|
* you need to track the mouse outside of a specific window and
|
||||||
|
* SDL_CaptureMouse() doesn't fit your needs. For example, it could be
|
||||||
|
* useful if you need to track the mouse while dragging a window, where
|
||||||
|
* coordinates relative to a window might not be in sync at all times.
|
||||||
|
*
|
||||||
|
* \note SDL_GetMouseState() returns the mouse position as SDL understands
|
||||||
|
* it from the last pump of the event queue. This function, however,
|
||||||
|
* queries the OS for the current mouse position, and as such, might
|
||||||
|
* be a slightly less efficient function. Unless you know what you're
|
||||||
|
* doing and have a good reason to use this function, you probably want
|
||||||
|
* SDL_GetMouseState() instead.
|
||||||
|
*
|
||||||
|
* \param x Returns the current X coord, relative to the desktop. Can be NULL.
|
||||||
|
* \param y Returns the current Y coord, relative to the desktop. Can be NULL.
|
||||||
|
* \return The current button state as a bitmask, which can be tested using the SDL_BUTTON(X) macros.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetMouseState
|
||||||
|
*/
|
||||||
|
extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retrieve the relative state of the mouse.
|
* \brief Retrieve the relative state of the mouse.
|
||||||
*
|
*
|
||||||
|
@ -98,6 +132,17 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
|
||||||
extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
|
extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
|
||||||
int x, int y);
|
int x, int y);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Moves the mouse to the given position in global screen space.
|
||||||
|
*
|
||||||
|
* \param x The x coordinate
|
||||||
|
* \param y The y coordinate
|
||||||
|
* \return 0 on success, -1 on error (usually: unsupported by a platform).
|
||||||
|
*
|
||||||
|
* \note This function generates a mouse motion event
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set relative mouse mode.
|
* \brief Set relative mouse mode.
|
||||||
*
|
*
|
||||||
|
@ -116,6 +161,37 @@ extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
|
extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Capture the mouse, to track input outside an SDL window.
|
||||||
|
*
|
||||||
|
* \param enabled Whether or not to enable capturing
|
||||||
|
*
|
||||||
|
* Capturing enables your app to obtain mouse events globally, instead of
|
||||||
|
* just within your window. Not all video targets support this function.
|
||||||
|
* When capturing is enabled, the current window will get all mouse events,
|
||||||
|
* but unlike relative mode, no change is made to the cursor and it is
|
||||||
|
* not restrained to your window.
|
||||||
|
*
|
||||||
|
* This function may also deny mouse input to other windows--both those in
|
||||||
|
* your application and others on the system--so you should use this
|
||||||
|
* function sparingly, and in small bursts. For example, you might want to
|
||||||
|
* track the mouse while the user is dragging something, until the user
|
||||||
|
* releases a mouse button. It is not recommended that you capture the mouse
|
||||||
|
* for long periods of time, such as the entire time your app is running.
|
||||||
|
*
|
||||||
|
* While captured, mouse events still report coordinates relative to the
|
||||||
|
* current (foreground) window, but those coordinates may be outside the
|
||||||
|
* bounds of the window (including negative values). Capturing is only
|
||||||
|
* allowed for the foreground window. If the window loses focus while
|
||||||
|
* capturing, the capture will be disabled automatically.
|
||||||
|
*
|
||||||
|
* While capturing is enabled, the current window will have the
|
||||||
|
* SDL_WINDOW_MOUSE_CAPTURE flag set.
|
||||||
|
*
|
||||||
|
* \return 0 on success, or -1 if not supported.
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Query whether relative mouse mode is enabled.
|
* \brief Query whether relative mouse mode is enabled.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
File diff suppressed because it is too large
Load diff
11177
code/SDL2/include/SDL_opengl_glext.h
Normal file
11177
code/SDL2/include/SDL_opengl_glext.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
File diff suppressed because it is too large
Load diff
621
code/SDL2/include/SDL_opengles2_gl2.h
Normal file
621
code/SDL2/include/SDL_opengles2_gl2.h
Normal file
|
@ -0,0 +1,621 @@
|
||||||
|
#ifndef __gl2_h_
|
||||||
|
#define __gl2_h_
|
||||||
|
|
||||||
|
/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
|
||||||
|
|
||||||
|
/*#include <GLES2/gl2platform.h>*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This document is licensed under the SGI Free Software B License Version
|
||||||
|
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Data type definitions
|
||||||
|
*-----------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
typedef void GLvoid;
|
||||||
|
typedef char GLchar;
|
||||||
|
typedef unsigned int GLenum;
|
||||||
|
typedef unsigned char GLboolean;
|
||||||
|
typedef unsigned int GLbitfield;
|
||||||
|
typedef khronos_int8_t GLbyte;
|
||||||
|
typedef short GLshort;
|
||||||
|
typedef int GLint;
|
||||||
|
typedef int GLsizei;
|
||||||
|
typedef khronos_uint8_t GLubyte;
|
||||||
|
typedef unsigned short GLushort;
|
||||||
|
typedef unsigned int GLuint;
|
||||||
|
typedef khronos_float_t GLfloat;
|
||||||
|
typedef khronos_float_t GLclampf;
|
||||||
|
typedef khronos_int32_t GLfixed;
|
||||||
|
|
||||||
|
/* GL types for handling large vertex buffer objects */
|
||||||
|
typedef khronos_intptr_t GLintptr;
|
||||||
|
typedef khronos_ssize_t GLsizeiptr;
|
||||||
|
|
||||||
|
/* OpenGL ES core versions */
|
||||||
|
#define GL_ES_VERSION_2_0 1
|
||||||
|
|
||||||
|
/* ClearBufferMask */
|
||||||
|
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||||
|
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||||
|
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||||
|
|
||||||
|
/* Boolean */
|
||||||
|
#define GL_FALSE 0
|
||||||
|
#define GL_TRUE 1
|
||||||
|
|
||||||
|
/* BeginMode */
|
||||||
|
#define GL_POINTS 0x0000
|
||||||
|
#define GL_LINES 0x0001
|
||||||
|
#define GL_LINE_LOOP 0x0002
|
||||||
|
#define GL_LINE_STRIP 0x0003
|
||||||
|
#define GL_TRIANGLES 0x0004
|
||||||
|
#define GL_TRIANGLE_STRIP 0x0005
|
||||||
|
#define GL_TRIANGLE_FAN 0x0006
|
||||||
|
|
||||||
|
/* AlphaFunction (not supported in ES20) */
|
||||||
|
/* GL_NEVER */
|
||||||
|
/* GL_LESS */
|
||||||
|
/* GL_EQUAL */
|
||||||
|
/* GL_LEQUAL */
|
||||||
|
/* GL_GREATER */
|
||||||
|
/* GL_NOTEQUAL */
|
||||||
|
/* GL_GEQUAL */
|
||||||
|
/* GL_ALWAYS */
|
||||||
|
|
||||||
|
/* BlendingFactorDest */
|
||||||
|
#define GL_ZERO 0
|
||||||
|
#define GL_ONE 1
|
||||||
|
#define GL_SRC_COLOR 0x0300
|
||||||
|
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||||
|
#define GL_SRC_ALPHA 0x0302
|
||||||
|
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||||
|
#define GL_DST_ALPHA 0x0304
|
||||||
|
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||||
|
|
||||||
|
/* BlendingFactorSrc */
|
||||||
|
/* GL_ZERO */
|
||||||
|
/* GL_ONE */
|
||||||
|
#define GL_DST_COLOR 0x0306
|
||||||
|
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||||
|
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||||
|
/* GL_SRC_ALPHA */
|
||||||
|
/* GL_ONE_MINUS_SRC_ALPHA */
|
||||||
|
/* GL_DST_ALPHA */
|
||||||
|
/* GL_ONE_MINUS_DST_ALPHA */
|
||||||
|
|
||||||
|
/* BlendEquationSeparate */
|
||||||
|
#define GL_FUNC_ADD 0x8006
|
||||||
|
#define GL_BLEND_EQUATION 0x8009
|
||||||
|
#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
|
||||||
|
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||||
|
|
||||||
|
/* BlendSubtract */
|
||||||
|
#define GL_FUNC_SUBTRACT 0x800A
|
||||||
|
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||||
|
|
||||||
|
/* Separate Blend Functions */
|
||||||
|
#define GL_BLEND_DST_RGB 0x80C8
|
||||||
|
#define GL_BLEND_SRC_RGB 0x80C9
|
||||||
|
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||||
|
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||||
|
#define GL_CONSTANT_COLOR 0x8001
|
||||||
|
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||||
|
#define GL_CONSTANT_ALPHA 0x8003
|
||||||
|
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||||
|
#define GL_BLEND_COLOR 0x8005
|
||||||
|
|
||||||
|
/* Buffer Objects */
|
||||||
|
#define GL_ARRAY_BUFFER 0x8892
|
||||||
|
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||||
|
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||||
|
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||||
|
|
||||||
|
#define GL_STREAM_DRAW 0x88E0
|
||||||
|
#define GL_STATIC_DRAW 0x88E4
|
||||||
|
#define GL_DYNAMIC_DRAW 0x88E8
|
||||||
|
|
||||||
|
#define GL_BUFFER_SIZE 0x8764
|
||||||
|
#define GL_BUFFER_USAGE 0x8765
|
||||||
|
|
||||||
|
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||||
|
|
||||||
|
/* CullFaceMode */
|
||||||
|
#define GL_FRONT 0x0404
|
||||||
|
#define GL_BACK 0x0405
|
||||||
|
#define GL_FRONT_AND_BACK 0x0408
|
||||||
|
|
||||||
|
/* DepthFunction */
|
||||||
|
/* GL_NEVER */
|
||||||
|
/* GL_LESS */
|
||||||
|
/* GL_EQUAL */
|
||||||
|
/* GL_LEQUAL */
|
||||||
|
/* GL_GREATER */
|
||||||
|
/* GL_NOTEQUAL */
|
||||||
|
/* GL_GEQUAL */
|
||||||
|
/* GL_ALWAYS */
|
||||||
|
|
||||||
|
/* EnableCap */
|
||||||
|
#define GL_TEXTURE_2D 0x0DE1
|
||||||
|
#define GL_CULL_FACE 0x0B44
|
||||||
|
#define GL_BLEND 0x0BE2
|
||||||
|
#define GL_DITHER 0x0BD0
|
||||||
|
#define GL_STENCIL_TEST 0x0B90
|
||||||
|
#define GL_DEPTH_TEST 0x0B71
|
||||||
|
#define GL_SCISSOR_TEST 0x0C11
|
||||||
|
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||||
|
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||||
|
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||||
|
|
||||||
|
/* ErrorCode */
|
||||||
|
#define GL_NO_ERROR 0
|
||||||
|
#define GL_INVALID_ENUM 0x0500
|
||||||
|
#define GL_INVALID_VALUE 0x0501
|
||||||
|
#define GL_INVALID_OPERATION 0x0502
|
||||||
|
#define GL_OUT_OF_MEMORY 0x0505
|
||||||
|
|
||||||
|
/* FrontFaceDirection */
|
||||||
|
#define GL_CW 0x0900
|
||||||
|
#define GL_CCW 0x0901
|
||||||
|
|
||||||
|
/* GetPName */
|
||||||
|
#define GL_LINE_WIDTH 0x0B21
|
||||||
|
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||||
|
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||||
|
#define GL_CULL_FACE_MODE 0x0B45
|
||||||
|
#define GL_FRONT_FACE 0x0B46
|
||||||
|
#define GL_DEPTH_RANGE 0x0B70
|
||||||
|
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||||
|
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||||
|
#define GL_DEPTH_FUNC 0x0B74
|
||||||
|
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||||
|
#define GL_STENCIL_FUNC 0x0B92
|
||||||
|
#define GL_STENCIL_FAIL 0x0B94
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||||
|
#define GL_STENCIL_REF 0x0B97
|
||||||
|
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||||
|
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||||
|
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||||
|
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||||
|
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||||
|
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||||
|
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||||
|
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||||
|
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||||
|
#define GL_VIEWPORT 0x0BA2
|
||||||
|
#define GL_SCISSOR_BOX 0x0C10
|
||||||
|
/* GL_SCISSOR_TEST */
|
||||||
|
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||||
|
#define GL_COLOR_WRITEMASK 0x0C23
|
||||||
|
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||||
|
#define GL_PACK_ALIGNMENT 0x0D05
|
||||||
|
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||||
|
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||||
|
#define GL_SUBPIXEL_BITS 0x0D50
|
||||||
|
#define GL_RED_BITS 0x0D52
|
||||||
|
#define GL_GREEN_BITS 0x0D53
|
||||||
|
#define GL_BLUE_BITS 0x0D54
|
||||||
|
#define GL_ALPHA_BITS 0x0D55
|
||||||
|
#define GL_DEPTH_BITS 0x0D56
|
||||||
|
#define GL_STENCIL_BITS 0x0D57
|
||||||
|
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||||
|
/* GL_POLYGON_OFFSET_FILL */
|
||||||
|
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||||
|
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||||
|
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||||
|
#define GL_SAMPLES 0x80A9
|
||||||
|
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||||
|
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||||
|
|
||||||
|
/* GetTextureParameter */
|
||||||
|
/* GL_TEXTURE_MAG_FILTER */
|
||||||
|
/* GL_TEXTURE_MIN_FILTER */
|
||||||
|
/* GL_TEXTURE_WRAP_S */
|
||||||
|
/* GL_TEXTURE_WRAP_T */
|
||||||
|
|
||||||
|
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||||
|
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||||
|
|
||||||
|
/* HintMode */
|
||||||
|
#define GL_DONT_CARE 0x1100
|
||||||
|
#define GL_FASTEST 0x1101
|
||||||
|
#define GL_NICEST 0x1102
|
||||||
|
|
||||||
|
/* HintTarget */
|
||||||
|
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||||
|
|
||||||
|
/* DataType */
|
||||||
|
#define GL_BYTE 0x1400
|
||||||
|
#define GL_UNSIGNED_BYTE 0x1401
|
||||||
|
#define GL_SHORT 0x1402
|
||||||
|
#define GL_UNSIGNED_SHORT 0x1403
|
||||||
|
#define GL_INT 0x1404
|
||||||
|
#define GL_UNSIGNED_INT 0x1405
|
||||||
|
#define GL_FLOAT 0x1406
|
||||||
|
#define GL_FIXED 0x140C
|
||||||
|
|
||||||
|
/* PixelFormat */
|
||||||
|
#define GL_DEPTH_COMPONENT 0x1902
|
||||||
|
#define GL_ALPHA 0x1906
|
||||||
|
#define GL_RGB 0x1907
|
||||||
|
#define GL_RGBA 0x1908
|
||||||
|
#define GL_LUMINANCE 0x1909
|
||||||
|
#define GL_LUMINANCE_ALPHA 0x190A
|
||||||
|
|
||||||
|
/* PixelType */
|
||||||
|
/* GL_UNSIGNED_BYTE */
|
||||||
|
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||||
|
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||||
|
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||||
|
|
||||||
|
/* Shaders */
|
||||||
|
#define GL_FRAGMENT_SHADER 0x8B30
|
||||||
|
#define GL_VERTEX_SHADER 0x8B31
|
||||||
|
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||||
|
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||||
|
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||||
|
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||||
|
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||||
|
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||||
|
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||||
|
#define GL_SHADER_TYPE 0x8B4F
|
||||||
|
#define GL_DELETE_STATUS 0x8B80
|
||||||
|
#define GL_LINK_STATUS 0x8B82
|
||||||
|
#define GL_VALIDATE_STATUS 0x8B83
|
||||||
|
#define GL_ATTACHED_SHADERS 0x8B85
|
||||||
|
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||||
|
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||||
|
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||||
|
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||||
|
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||||
|
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||||
|
|
||||||
|
/* StencilFunction */
|
||||||
|
#define GL_NEVER 0x0200
|
||||||
|
#define GL_LESS 0x0201
|
||||||
|
#define GL_EQUAL 0x0202
|
||||||
|
#define GL_LEQUAL 0x0203
|
||||||
|
#define GL_GREATER 0x0204
|
||||||
|
#define GL_NOTEQUAL 0x0205
|
||||||
|
#define GL_GEQUAL 0x0206
|
||||||
|
#define GL_ALWAYS 0x0207
|
||||||
|
|
||||||
|
/* StencilOp */
|
||||||
|
/* GL_ZERO */
|
||||||
|
#define GL_KEEP 0x1E00
|
||||||
|
#define GL_REPLACE 0x1E01
|
||||||
|
#define GL_INCR 0x1E02
|
||||||
|
#define GL_DECR 0x1E03
|
||||||
|
#define GL_INVERT 0x150A
|
||||||
|
#define GL_INCR_WRAP 0x8507
|
||||||
|
#define GL_DECR_WRAP 0x8508
|
||||||
|
|
||||||
|
/* StringName */
|
||||||
|
#define GL_VENDOR 0x1F00
|
||||||
|
#define GL_RENDERER 0x1F01
|
||||||
|
#define GL_VERSION 0x1F02
|
||||||
|
#define GL_EXTENSIONS 0x1F03
|
||||||
|
|
||||||
|
/* TextureMagFilter */
|
||||||
|
#define GL_NEAREST 0x2600
|
||||||
|
#define GL_LINEAR 0x2601
|
||||||
|
|
||||||
|
/* TextureMinFilter */
|
||||||
|
/* GL_NEAREST */
|
||||||
|
/* GL_LINEAR */
|
||||||
|
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||||
|
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||||
|
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||||
|
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||||
|
|
||||||
|
/* TextureParameterName */
|
||||||
|
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||||
|
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||||
|
#define GL_TEXTURE_WRAP_S 0x2802
|
||||||
|
#define GL_TEXTURE_WRAP_T 0x2803
|
||||||
|
|
||||||
|
/* TextureTarget */
|
||||||
|
/* GL_TEXTURE_2D */
|
||||||
|
#define GL_TEXTURE 0x1702
|
||||||
|
|
||||||
|
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||||
|
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||||
|
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||||
|
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||||
|
|
||||||
|
/* TextureUnit */
|
||||||
|
#define GL_TEXTURE0 0x84C0
|
||||||
|
#define GL_TEXTURE1 0x84C1
|
||||||
|
#define GL_TEXTURE2 0x84C2
|
||||||
|
#define GL_TEXTURE3 0x84C3
|
||||||
|
#define GL_TEXTURE4 0x84C4
|
||||||
|
#define GL_TEXTURE5 0x84C5
|
||||||
|
#define GL_TEXTURE6 0x84C6
|
||||||
|
#define GL_TEXTURE7 0x84C7
|
||||||
|
#define GL_TEXTURE8 0x84C8
|
||||||
|
#define GL_TEXTURE9 0x84C9
|
||||||
|
#define GL_TEXTURE10 0x84CA
|
||||||
|
#define GL_TEXTURE11 0x84CB
|
||||||
|
#define GL_TEXTURE12 0x84CC
|
||||||
|
#define GL_TEXTURE13 0x84CD
|
||||||
|
#define GL_TEXTURE14 0x84CE
|
||||||
|
#define GL_TEXTURE15 0x84CF
|
||||||
|
#define GL_TEXTURE16 0x84D0
|
||||||
|
#define GL_TEXTURE17 0x84D1
|
||||||
|
#define GL_TEXTURE18 0x84D2
|
||||||
|
#define GL_TEXTURE19 0x84D3
|
||||||
|
#define GL_TEXTURE20 0x84D4
|
||||||
|
#define GL_TEXTURE21 0x84D5
|
||||||
|
#define GL_TEXTURE22 0x84D6
|
||||||
|
#define GL_TEXTURE23 0x84D7
|
||||||
|
#define GL_TEXTURE24 0x84D8
|
||||||
|
#define GL_TEXTURE25 0x84D9
|
||||||
|
#define GL_TEXTURE26 0x84DA
|
||||||
|
#define GL_TEXTURE27 0x84DB
|
||||||
|
#define GL_TEXTURE28 0x84DC
|
||||||
|
#define GL_TEXTURE29 0x84DD
|
||||||
|
#define GL_TEXTURE30 0x84DE
|
||||||
|
#define GL_TEXTURE31 0x84DF
|
||||||
|
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||||
|
|
||||||
|
/* TextureWrapMode */
|
||||||
|
#define GL_REPEAT 0x2901
|
||||||
|
#define GL_CLAMP_TO_EDGE 0x812F
|
||||||
|
#define GL_MIRRORED_REPEAT 0x8370
|
||||||
|
|
||||||
|
/* Uniform Types */
|
||||||
|
#define GL_FLOAT_VEC2 0x8B50
|
||||||
|
#define GL_FLOAT_VEC3 0x8B51
|
||||||
|
#define GL_FLOAT_VEC4 0x8B52
|
||||||
|
#define GL_INT_VEC2 0x8B53
|
||||||
|
#define GL_INT_VEC3 0x8B54
|
||||||
|
#define GL_INT_VEC4 0x8B55
|
||||||
|
#define GL_BOOL 0x8B56
|
||||||
|
#define GL_BOOL_VEC2 0x8B57
|
||||||
|
#define GL_BOOL_VEC3 0x8B58
|
||||||
|
#define GL_BOOL_VEC4 0x8B59
|
||||||
|
#define GL_FLOAT_MAT2 0x8B5A
|
||||||
|
#define GL_FLOAT_MAT3 0x8B5B
|
||||||
|
#define GL_FLOAT_MAT4 0x8B5C
|
||||||
|
#define GL_SAMPLER_2D 0x8B5E
|
||||||
|
#define GL_SAMPLER_CUBE 0x8B60
|
||||||
|
|
||||||
|
/* Vertex Arrays */
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||||
|
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||||
|
|
||||||
|
/* Read Format */
|
||||||
|
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||||
|
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||||
|
|
||||||
|
/* Shader Source */
|
||||||
|
#define GL_COMPILE_STATUS 0x8B81
|
||||||
|
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||||
|
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||||
|
#define GL_SHADER_COMPILER 0x8DFA
|
||||||
|
|
||||||
|
/* Shader Binary */
|
||||||
|
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||||
|
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||||
|
|
||||||
|
/* Shader Precision-Specified Types */
|
||||||
|
#define GL_LOW_FLOAT 0x8DF0
|
||||||
|
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||||
|
#define GL_HIGH_FLOAT 0x8DF2
|
||||||
|
#define GL_LOW_INT 0x8DF3
|
||||||
|
#define GL_MEDIUM_INT 0x8DF4
|
||||||
|
#define GL_HIGH_INT 0x8DF5
|
||||||
|
|
||||||
|
/* Framebuffer Object. */
|
||||||
|
#define GL_FRAMEBUFFER 0x8D40
|
||||||
|
#define GL_RENDERBUFFER 0x8D41
|
||||||
|
|
||||||
|
#define GL_RGBA4 0x8056
|
||||||
|
#define GL_RGB5_A1 0x8057
|
||||||
|
#define GL_RGB565 0x8D62
|
||||||
|
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||||
|
#define GL_STENCIL_INDEX8 0x8D48
|
||||||
|
|
||||||
|
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||||
|
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||||
|
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||||
|
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||||
|
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||||
|
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||||
|
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||||
|
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||||
|
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||||
|
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||||
|
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||||
|
|
||||||
|
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||||
|
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||||
|
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||||
|
|
||||||
|
#define GL_NONE 0
|
||||||
|
|
||||||
|
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||||
|
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||||
|
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||||
|
|
||||||
|
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||||
|
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||||
|
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||||
|
|
||||||
|
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* GL core functions.
|
||||||
|
*-----------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||||
|
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||||
|
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
|
||||||
|
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
|
||||||
|
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||||
|
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
|
||||||
|
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||||
|
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
|
||||||
|
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
|
||||||
|
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||||
|
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||||
|
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||||
|
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
|
||||||
|
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||||
|
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||||
|
GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||||
|
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||||
|
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||||
|
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||||
|
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||||
|
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
|
||||||
|
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||||
|
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||||
|
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||||
|
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||||
|
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
|
||||||
|
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
|
||||||
|
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||||
|
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
|
||||||
|
GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
|
||||||
|
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
|
||||||
|
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||||
|
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||||
|
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||||
|
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||||
|
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||||
|
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||||
|
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||||
|
GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
|
||||||
|
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
|
||||||
|
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||||
|
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
|
||||||
|
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||||
|
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
|
||||||
|
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
|
||||||
|
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __gl2_h_ */
|
||||||
|
|
2050
code/SDL2/include/SDL_opengles2_gl2ext.h
Normal file
2050
code/SDL2/include/SDL_opengles2_gl2ext.h
Normal file
File diff suppressed because it is too large
Load diff
30
code/SDL2/include/SDL_opengles2_gl2platform.h
Normal file
30
code/SDL2/include/SDL_opengles2_gl2platform.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef __gl2platform_h_
|
||||||
|
#define __gl2platform_h_
|
||||||
|
|
||||||
|
/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This document is licensed under the SGI Free Software B License Version
|
||||||
|
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
|
||||||
|
*
|
||||||
|
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||||
|
* You are encouraged to submit all modifications to the Khronos group so that
|
||||||
|
* they can be included in future versions of this file. Please submit changes
|
||||||
|
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||||
|
* by filing a bug against product "OpenGL-ES" component "Registry".
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*#include <KHR/khrplatform.h>*/
|
||||||
|
|
||||||
|
#ifndef GL_APICALL
|
||||||
|
#define GL_APICALL KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef GL_APIENTRY
|
||||||
|
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __gl2platform_h_ */
|
282
code/SDL2/include/SDL_opengles2_khrplatform.h
Normal file
282
code/SDL2/include/SDL_opengles2_khrplatform.h
Normal file
|
@ -0,0 +1,282 @@
|
||||||
|
#ifndef __khrplatform_h_
|
||||||
|
#define __khrplatform_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||||
|
**
|
||||||
|
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
** copy of this software and/or associated documentation files (the
|
||||||
|
** "Materials"), to deal in the Materials without restriction, including
|
||||||
|
** without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||||
|
** permit persons to whom the Materials are furnished to do so, subject to
|
||||||
|
** the following conditions:
|
||||||
|
**
|
||||||
|
** The above copyright notice and this permission notice shall be included
|
||||||
|
** in all copies or substantial portions of the Materials.
|
||||||
|
**
|
||||||
|
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Khronos platform-specific types and definitions.
|
||||||
|
*
|
||||||
|
* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
|
||||||
|
*
|
||||||
|
* Adopters may modify this file to suit their platform. Adopters are
|
||||||
|
* encouraged to submit platform specific modifications to the Khronos
|
||||||
|
* group so that they can be included in future versions of this file.
|
||||||
|
* Please submit changes by sending them to the public Khronos Bugzilla
|
||||||
|
* (http://khronos.org/bugzilla) by filing a bug against product
|
||||||
|
* "Khronos (general)" component "Registry".
|
||||||
|
*
|
||||||
|
* A predefined template which fills in some of the bug fields can be
|
||||||
|
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
|
||||||
|
* must create a Bugzilla login first.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* See the Implementer's Guidelines for information about where this file
|
||||||
|
* should be located on your system and for more details of its use:
|
||||||
|
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||||
|
*
|
||||||
|
* This file should be included as
|
||||||
|
* #include <KHR/khrplatform.h>
|
||||||
|
* by Khronos client API header files that use its types and defines.
|
||||||
|
*
|
||||||
|
* The types in khrplatform.h should only be used to define API-specific types.
|
||||||
|
*
|
||||||
|
* Types defined in khrplatform.h:
|
||||||
|
* khronos_int8_t signed 8 bit
|
||||||
|
* khronos_uint8_t unsigned 8 bit
|
||||||
|
* khronos_int16_t signed 16 bit
|
||||||
|
* khronos_uint16_t unsigned 16 bit
|
||||||
|
* khronos_int32_t signed 32 bit
|
||||||
|
* khronos_uint32_t unsigned 32 bit
|
||||||
|
* khronos_int64_t signed 64 bit
|
||||||
|
* khronos_uint64_t unsigned 64 bit
|
||||||
|
* khronos_intptr_t signed same number of bits as a pointer
|
||||||
|
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||||
|
* khronos_ssize_t signed size
|
||||||
|
* khronos_usize_t unsigned size
|
||||||
|
* khronos_float_t signed 32 bit floating point
|
||||||
|
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||||
|
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||||
|
* nanoseconds
|
||||||
|
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||||
|
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||||
|
* only be used as a base type when a client API's boolean type is
|
||||||
|
* an enum. Client APIs which use an integer or other type for
|
||||||
|
* booleans cannot use this as the base type for their boolean.
|
||||||
|
*
|
||||||
|
* Tokens defined in khrplatform.h:
|
||||||
|
*
|
||||||
|
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||||
|
*
|
||||||
|
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||||
|
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||||
|
*
|
||||||
|
* Calling convention macros defined in this file:
|
||||||
|
* KHRONOS_APICALL
|
||||||
|
* KHRONOS_APIENTRY
|
||||||
|
* KHRONOS_APIATTRIBUTES
|
||||||
|
*
|
||||||
|
* These may be used in function prototypes as:
|
||||||
|
*
|
||||||
|
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||||
|
* int arg1,
|
||||||
|
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APICALL
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This precedes the return type of the function in the function prototype.
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||||
|
# define KHRONOS_APICALL __declspec(dllimport)
|
||||||
|
#elif defined (__SYMBIAN32__)
|
||||||
|
# define KHRONOS_APICALL IMPORT_C
|
||||||
|
#else
|
||||||
|
# define KHRONOS_APICALL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APIENTRY
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This follows the return type of the function and precedes the function
|
||||||
|
* name in the function prototype.
|
||||||
|
*/
|
||||||
|
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||||
|
/* Win32 but not WinCE */
|
||||||
|
# define KHRONOS_APIENTRY __stdcall
|
||||||
|
#else
|
||||||
|
# define KHRONOS_APIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* Definition of KHRONOS_APIATTRIBUTES
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
* This follows the closing parenthesis of the function prototype arguments.
|
||||||
|
*/
|
||||||
|
#if defined (__ARMCC_2__)
|
||||||
|
#define KHRONOS_APIATTRIBUTES __softfp
|
||||||
|
#else
|
||||||
|
#define KHRONOS_APIATTRIBUTES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
* basic type definitions
|
||||||
|
*-----------------------------------------------------------------------*/
|
||||||
|
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using <stdint.h>
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(__VMS ) || defined(__sgi)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Using <inttypes.h>
|
||||||
|
*/
|
||||||
|
#include <inttypes.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Win32
|
||||||
|
*/
|
||||||
|
typedef __int32 khronos_int32_t;
|
||||||
|
typedef unsigned __int32 khronos_uint32_t;
|
||||||
|
typedef __int64 khronos_int64_t;
|
||||||
|
typedef unsigned __int64 khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif defined(__sun__) || defined(__digital__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sun or Digital
|
||||||
|
*/
|
||||||
|
typedef int khronos_int32_t;
|
||||||
|
typedef unsigned int khronos_uint32_t;
|
||||||
|
#if defined(__arch64__) || defined(_LP64)
|
||||||
|
typedef long int khronos_int64_t;
|
||||||
|
typedef unsigned long int khronos_uint64_t;
|
||||||
|
#else
|
||||||
|
typedef long long int khronos_int64_t;
|
||||||
|
typedef unsigned long long int khronos_uint64_t;
|
||||||
|
#endif /* __arch64__ */
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#elif 0
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hypothetical platform with no float or int64 support
|
||||||
|
*/
|
||||||
|
typedef int khronos_int32_t;
|
||||||
|
typedef unsigned int khronos_uint32_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 0
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 0
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Generic fallback
|
||||||
|
*/
|
||||||
|
#include <stdint.h>
|
||||||
|
typedef int32_t khronos_int32_t;
|
||||||
|
typedef uint32_t khronos_uint32_t;
|
||||||
|
typedef int64_t khronos_int64_t;
|
||||||
|
typedef uint64_t khronos_uint64_t;
|
||||||
|
#define KHRONOS_SUPPORT_INT64 1
|
||||||
|
#define KHRONOS_SUPPORT_FLOAT 1
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Types that are (so far) the same on all platforms
|
||||||
|
*/
|
||||||
|
typedef signed char khronos_int8_t;
|
||||||
|
typedef unsigned char khronos_uint8_t;
|
||||||
|
typedef signed short int khronos_int16_t;
|
||||||
|
typedef unsigned short int khronos_uint16_t;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||||
|
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||||
|
* to be the only LLP64 architecture in current use.
|
||||||
|
*/
|
||||||
|
#ifdef _WIN64
|
||||||
|
typedef signed long long int khronos_intptr_t;
|
||||||
|
typedef unsigned long long int khronos_uintptr_t;
|
||||||
|
typedef signed long long int khronos_ssize_t;
|
||||||
|
typedef unsigned long long int khronos_usize_t;
|
||||||
|
#else
|
||||||
|
typedef signed long int khronos_intptr_t;
|
||||||
|
typedef unsigned long int khronos_uintptr_t;
|
||||||
|
typedef signed long int khronos_ssize_t;
|
||||||
|
typedef unsigned long int khronos_usize_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if KHRONOS_SUPPORT_FLOAT
|
||||||
|
/*
|
||||||
|
* Float type
|
||||||
|
*/
|
||||||
|
typedef float khronos_float_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if KHRONOS_SUPPORT_INT64
|
||||||
|
/* Time types
|
||||||
|
*
|
||||||
|
* These types can be used to represent a time interval in nanoseconds or
|
||||||
|
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||||
|
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||||
|
* time the system booted). The Unadjusted System Time is an unsigned
|
||||||
|
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||||
|
* may be either signed or unsigned.
|
||||||
|
*/
|
||||||
|
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||||
|
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dummy value used to pad enum types to 32 bits.
|
||||||
|
*/
|
||||||
|
#ifndef KHRONOS_MAX_ENUM
|
||||||
|
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Enumerated boolean type
|
||||||
|
*
|
||||||
|
* Values other than zero should be considered to be true. Therefore
|
||||||
|
* comparisons should not be made against KHRONOS_TRUE.
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
KHRONOS_FALSE = 0,
|
||||||
|
KHRONOS_TRUE = 1,
|
||||||
|
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||||
|
} khronos_boolean_enum_t;
|
||||||
|
|
||||||
|
#endif /* __khrplatform_h_ */
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -86,6 +86,8 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Array component order, low byte -> high byte. */
|
/** Array component order, low byte -> high byte. */
|
||||||
|
/* !!! FIXME: in 2.1, make these not overlap differently with
|
||||||
|
!!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SDL_ARRAYORDER_NONE,
|
SDL_ARRAYORDER_NONE,
|
||||||
|
@ -134,12 +136,31 @@ enum
|
||||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
|
||||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
|
||||||
|
|
||||||
#define SDL_ISPIXELFORMAT_ALPHA(format) \
|
#define SDL_ISPIXELFORMAT_PACKED(format) \
|
||||||
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
||||||
|
((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
|
||||||
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
|
||||||
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
|
||||||
|
|
||||||
|
#define SDL_ISPIXELFORMAT_ARRAY(format) \
|
||||||
|
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
||||||
|
((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \
|
||||||
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \
|
||||||
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \
|
||||||
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
|
||||||
|
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
|
||||||
|
|
||||||
|
#define SDL_ISPIXELFORMAT_ALPHA(format) \
|
||||||
|
((SDL_ISPIXELFORMAT_PACKED(format) && \
|
||||||
((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
|
((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
|
||||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
|
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
|
||||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
|
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
|
||||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA)))
|
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \
|
||||||
|
(SDL_ISPIXELFORMAT_ARRAY(format) && \
|
||||||
|
((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \
|
||||||
|
(SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \
|
||||||
|
(SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \
|
||||||
|
(SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
|
||||||
|
|
||||||
/* The flag is set to 1 because 0x1? is not in the printable ASCII range */
|
/* The flag is set to 1 because 0x1? is not in the printable ASCII range */
|
||||||
#define SDL_ISPIXELFORMAT_FOURCC(format) \
|
#define SDL_ISPIXELFORMAT_FOURCC(format) \
|
||||||
|
@ -248,7 +269,11 @@ enum
|
||||||
SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
|
SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
|
||||||
SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
|
SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
|
||||||
SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
|
SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
|
||||||
SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U')
|
SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
|
||||||
|
SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
|
||||||
|
SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
|
||||||
|
SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
|
||||||
|
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1')
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct SDL_Color
|
typedef struct SDL_Color
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
#undef __IRIX__
|
#undef __IRIX__
|
||||||
#define __IRIX__ 1
|
#define __IRIX__ 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(linux) || defined(__linux) || defined(__linux__)
|
#if (defined(linux) || defined(__linux) || defined(__linux__))
|
||||||
#undef __LINUX__
|
#undef __LINUX__
|
||||||
#define __LINUX__ 1
|
#define __LINUX__ 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -109,15 +109,15 @@
|
||||||
#undef __RISCOS__
|
#undef __RISCOS__
|
||||||
#define __RISCOS__ 1
|
#define __RISCOS__ 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(__SVR4)
|
#if defined(__sun) && defined(__SVR4)
|
||||||
#undef __SOLARIS__
|
#undef __SOLARIS__
|
||||||
#define __SOLARIS__ 1
|
#define __SOLARIS__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
|
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||||
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
|
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1700) && !(_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
#if (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
||||||
#include <winapifamily.h>
|
#include <winapifamily.h>
|
||||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||||
#undef __WINDOWS__
|
#undef __WINDOWS__
|
||||||
|
@ -142,6 +142,23 @@
|
||||||
#define __PSP__ 1
|
#define __PSP__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* The NACL compiler defines __native_client__ and __pnacl__
|
||||||
|
* Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
|
||||||
|
*/
|
||||||
|
#if defined(__native_client__)
|
||||||
|
#undef __LINUX__
|
||||||
|
#undef __NACL__
|
||||||
|
#define __NACL__ 1
|
||||||
|
#endif
|
||||||
|
#if defined(__pnacl__)
|
||||||
|
#undef __LINUX__
|
||||||
|
#undef __PNACL__
|
||||||
|
#define __PNACL__ 1
|
||||||
|
/* PNACL with newlib supports static linking only */
|
||||||
|
#define __SDL_NOGETPROCADDR__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "begin_code.h"
|
#include "begin_code.h"
|
||||||
/* Set up for C function definitions, even when using C++ */
|
/* Set up for C function definitions, even when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -43,6 +43,7 @@ extern "C" {
|
||||||
* \brief The structure that defines a point
|
* \brief The structure that defines a point
|
||||||
*
|
*
|
||||||
* \sa SDL_EnclosePoints
|
* \sa SDL_EnclosePoints
|
||||||
|
* \sa SDL_PointInRect
|
||||||
*/
|
*/
|
||||||
typedef struct SDL_Point
|
typedef struct SDL_Point
|
||||||
{
|
{
|
||||||
|
@ -66,6 +67,15 @@ typedef struct SDL_Rect
|
||||||
int w, h;
|
int w, h;
|
||||||
} SDL_Rect;
|
} SDL_Rect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Returns true if point resides inside a rectangle.
|
||||||
|
*/
|
||||||
|
SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r)
|
||||||
|
{
|
||||||
|
return ( (p->x >= r->x) && (p->x < (r->x + r->w)) &&
|
||||||
|
(p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Returns true if the rectangle has no area.
|
* \brief Returns true if the rectangle has no area.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -81,8 +81,8 @@ typedef struct SDL_RendererInfo
|
||||||
Uint32 flags; /**< Supported ::SDL_RendererFlags */
|
Uint32 flags; /**< Supported ::SDL_RendererFlags */
|
||||||
Uint32 num_texture_formats; /**< The number of available texture formats */
|
Uint32 num_texture_formats; /**< The number of available texture formats */
|
||||||
Uint32 texture_formats[16]; /**< The available texture formats */
|
Uint32 texture_formats[16]; /**< The available texture formats */
|
||||||
int max_texture_width; /**< The maximimum texture width */
|
int max_texture_width; /**< The maximum texture width */
|
||||||
int max_texture_height; /**< The maximimum texture height */
|
int max_texture_height; /**< The maximum texture height */
|
||||||
} SDL_RendererInfo;
|
} SDL_RendererInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -215,7 +215,7 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
|
||||||
SDL_RendererInfo * info);
|
SDL_RendererInfo * info);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the output size of a rendering context.
|
* \brief Get the output size in pixels of a rendering context.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
||||||
int *w, int *h);
|
int *w, int *h);
|
||||||
|
@ -229,7 +229,7 @@ extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
||||||
* \param w The width of the texture in pixels.
|
* \param w The width of the texture in pixels.
|
||||||
* \param h The height of the texture in pixels.
|
* \param h The height of the texture in pixels.
|
||||||
*
|
*
|
||||||
* \return The created texture is returned, or 0 if no rendering context was
|
* \return The created texture is returned, or NULL if no rendering context was
|
||||||
* active, the format was unsupported, or the width or height were out
|
* active, the format was unsupported, or the width or height were out
|
||||||
* of range.
|
* of range.
|
||||||
*
|
*
|
||||||
|
@ -248,7 +248,7 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
|
||||||
* \param renderer The renderer.
|
* \param renderer The renderer.
|
||||||
* \param surface The surface containing pixel data used to fill the texture.
|
* \param surface The surface containing pixel data used to fill the texture.
|
||||||
*
|
*
|
||||||
* \return The created texture is returned, or 0 on error.
|
* \return The created texture is returned, or NULL on error.
|
||||||
*
|
*
|
||||||
* \note The surface is not modified or freed by this function.
|
* \note The surface is not modified or freed by this function.
|
||||||
*
|
*
|
||||||
|
@ -371,7 +371,7 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
|
||||||
* \param rect A pointer to the rectangle of pixels to update, or NULL to
|
* \param rect A pointer to the rectangle of pixels to update, or NULL to
|
||||||
* update the entire texture.
|
* update the entire texture.
|
||||||
* \param pixels The raw pixel data.
|
* \param pixels The raw pixel data.
|
||||||
* \param pitch The number of bytes between rows of pixel data.
|
* \param pitch The number of bytes in a row of pixel data, including padding between lines.
|
||||||
*
|
*
|
||||||
* \return 0 on success, or -1 if the texture is not valid.
|
* \return 0 on success, or -1 if the texture is not valid.
|
||||||
*
|
*
|
||||||
|
@ -551,6 +551,16 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
|
||||||
extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
|
extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
|
||||||
SDL_Rect * rect);
|
SDL_Rect * rect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get whether clipping is enabled on the given renderer.
|
||||||
|
*
|
||||||
|
* \param renderer The renderer from which clip state should be queried.
|
||||||
|
*
|
||||||
|
* \sa SDL_RenderGetClipRect()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set the drawing scale for rendering on the current target.
|
* \brief Set the drawing scale for rendering on the current target.
|
||||||
*
|
*
|
||||||
|
@ -782,7 +792,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
|
||||||
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
||||||
* entire rendering target.
|
* entire rendering target.
|
||||||
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect
|
* \param angle An angle in degrees that indicates the rotation that will be applied to dstrect
|
||||||
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2)
|
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
|
||||||
* \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
|
* \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture
|
||||||
*
|
*
|
||||||
* \return 0 on success, or -1 on error
|
* \return 0 on success, or -1 on error
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#define SDL_REVISION "hg-8628:b558f99d48f0"
|
#define SDL_REVISION "hg-10001:e12c38730512"
|
||||||
#define SDL_REVISION_NUMBER 8628
|
#define SDL_REVISION_NUMBER 10001
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -93,7 +93,7 @@ typedef struct SDL_RWops
|
||||||
Uint32 type;
|
Uint32 type;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
#if defined(ANDROID)
|
#if defined(__ANDROID__)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void *fileNameRef;
|
void *fileNameRef;
|
||||||
|
@ -220,7 +220,6 @@ extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
|
extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
|
||||||
/* @} *//* Write endian functions */
|
/* @} *//* Write endian functions */
|
||||||
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -165,6 +165,97 @@ typedef uint64_t Uint64;
|
||||||
|
|
||||||
/* @} *//* Basic data types */
|
/* @} *//* Basic data types */
|
||||||
|
|
||||||
|
/* Make sure we have macros for printing 64 bit values.
|
||||||
|
* <stdint.h> should define these but this is not true all platforms.
|
||||||
|
* (for example win32) */
|
||||||
|
#ifndef SDL_PRIs64
|
||||||
|
#ifdef PRIs64
|
||||||
|
#define SDL_PRIs64 PRIs64
|
||||||
|
#elif defined(__WIN32__)
|
||||||
|
#define SDL_PRIs64 "I64d"
|
||||||
|
#elif defined(__LINUX__) && defined(__LP64__)
|
||||||
|
#define SDL_PRIs64 "ld"
|
||||||
|
#else
|
||||||
|
#define SDL_PRIs64 "lld"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_PRIu64
|
||||||
|
#ifdef PRIu64
|
||||||
|
#define SDL_PRIu64 PRIu64
|
||||||
|
#elif defined(__WIN32__)
|
||||||
|
#define SDL_PRIu64 "I64u"
|
||||||
|
#elif defined(__LINUX__) && defined(__LP64__)
|
||||||
|
#define SDL_PRIu64 "lu"
|
||||||
|
#else
|
||||||
|
#define SDL_PRIu64 "llu"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_PRIx64
|
||||||
|
#ifdef PRIx64
|
||||||
|
#define SDL_PRIx64 PRIx64
|
||||||
|
#elif defined(__WIN32__)
|
||||||
|
#define SDL_PRIx64 "I64x"
|
||||||
|
#elif defined(__LINUX__) && defined(__LP64__)
|
||||||
|
#define SDL_PRIx64 "lx"
|
||||||
|
#else
|
||||||
|
#define SDL_PRIx64 "llx"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifndef SDL_PRIX64
|
||||||
|
#ifdef PRIX64
|
||||||
|
#define SDL_PRIX64 PRIX64
|
||||||
|
#elif defined(__WIN32__)
|
||||||
|
#define SDL_PRIX64 "I64X"
|
||||||
|
#elif defined(__LINUX__) && defined(__LP64__)
|
||||||
|
#define SDL_PRIX64 "lX"
|
||||||
|
#else
|
||||||
|
#define SDL_PRIX64 "llX"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Annotations to help code analysis tools */
|
||||||
|
#ifdef SDL_DISABLE_ANALYZE_MACROS
|
||||||
|
#define SDL_IN_BYTECAP(x)
|
||||||
|
#define SDL_INOUT_Z_CAP(x)
|
||||||
|
#define SDL_OUT_Z_CAP(x)
|
||||||
|
#define SDL_OUT_CAP(x)
|
||||||
|
#define SDL_OUT_BYTECAP(x)
|
||||||
|
#define SDL_OUT_Z_BYTECAP(x)
|
||||||
|
#define SDL_PRINTF_FORMAT_STRING
|
||||||
|
#define SDL_SCANF_FORMAT_STRING
|
||||||
|
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
|
||||||
|
#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
|
||||||
|
#else
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
|
||||||
|
#include <sal.h>
|
||||||
|
|
||||||
|
#define SDL_IN_BYTECAP(x) _In_bytecount_(x)
|
||||||
|
#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
|
||||||
|
#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
|
||||||
|
#define SDL_OUT_CAP(x) _Out_cap_(x)
|
||||||
|
#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
|
||||||
|
#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
|
||||||
|
|
||||||
|
#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
|
||||||
|
#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
|
||||||
|
#else
|
||||||
|
#define SDL_IN_BYTECAP(x)
|
||||||
|
#define SDL_INOUT_Z_CAP(x)
|
||||||
|
#define SDL_OUT_Z_CAP(x)
|
||||||
|
#define SDL_OUT_CAP(x)
|
||||||
|
#define SDL_OUT_BYTECAP(x)
|
||||||
|
#define SDL_OUT_Z_BYTECAP(x)
|
||||||
|
#define SDL_PRINTF_FORMAT_STRING
|
||||||
|
#define SDL_SCANF_FORMAT_STRING
|
||||||
|
#endif
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
|
||||||
|
#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
|
||||||
|
#else
|
||||||
|
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
|
||||||
|
#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
|
||||||
|
#endif
|
||||||
|
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||||
|
|
||||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||||
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
|
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
|
||||||
|
@ -259,7 +350,7 @@ extern DECLSPEC int SDLCALL SDL_isspace(int x);
|
||||||
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
||||||
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
||||||
|
|
||||||
extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
|
extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
|
||||||
|
|
||||||
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
|
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
|
||||||
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
||||||
|
@ -294,24 +385,19 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
|
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||||
|
|
||||||
SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
|
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||||
{
|
|
||||||
return SDL_memcpy(dst, src, dwords * 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, size_t len);
|
|
||||||
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
||||||
|
|
||||||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen);
|
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen);
|
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||||
|
|
||||||
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
|
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
|
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes);
|
extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);
|
||||||
extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
|
extern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
|
||||||
extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
|
extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
|
||||||
extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
|
extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
|
||||||
extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
|
extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
|
||||||
|
@ -340,10 +426,10 @@ extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size
|
||||||
extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
|
extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
|
||||||
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
|
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
|
||||||
|
|
||||||
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
|
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
|
||||||
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
|
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
|
||||||
extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
|
extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);
|
||||||
extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
|
extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
|
||||||
|
|
||||||
#ifndef HAVE_M_PI
|
#ifndef HAVE_M_PI
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
|
@ -367,6 +453,9 @@ extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
||||||
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
||||||
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
||||||
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_sqrtf(float x);
|
||||||
|
extern DECLSPEC double SDLCALL SDL_tan(double x);
|
||||||
|
extern DECLSPEC float SDLCALL SDL_tanf(float x);
|
||||||
|
|
||||||
/* The SDL implementation of iconv() returns these error codes */
|
/* The SDL implementation of iconv() returns these error codes */
|
||||||
#define SDL_ICONV_ERROR (size_t)-1
|
#define SDL_ICONV_ERROR (size_t)-1
|
||||||
|
@ -394,6 +483,39 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
||||||
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||||
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||||
|
|
||||||
|
/* force builds using Clang's static analysis tools to use literal C runtime
|
||||||
|
here, since there are possibly tests that are ineffective otherwise. */
|
||||||
|
#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
|
||||||
|
#define SDL_malloc malloc
|
||||||
|
#define SDL_calloc calloc
|
||||||
|
#define SDL_realloc realloc
|
||||||
|
#define SDL_free free
|
||||||
|
#define SDL_memset memset
|
||||||
|
#define SDL_memcpy memcpy
|
||||||
|
#define SDL_memmove memmove
|
||||||
|
#define SDL_memcmp memcmp
|
||||||
|
#define SDL_strlen strlen
|
||||||
|
#define SDL_strlcpy strlcpy
|
||||||
|
#define SDL_strlcat strlcat
|
||||||
|
#define SDL_strdup strdup
|
||||||
|
#define SDL_strchr strchr
|
||||||
|
#define SDL_strrchr strrchr
|
||||||
|
#define SDL_strstr strstr
|
||||||
|
#define SDL_strcmp strcmp
|
||||||
|
#define SDL_strncmp strncmp
|
||||||
|
#define SDL_strcasecmp strcasecmp
|
||||||
|
#define SDL_strncasecmp strncasecmp
|
||||||
|
#define SDL_sscanf sscanf
|
||||||
|
#define SDL_vsscanf vsscanf
|
||||||
|
#define SDL_snprintf snprintf
|
||||||
|
#define SDL_vsnprintf vsnprintf
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
|
||||||
|
{
|
||||||
|
return SDL_memcpy(dst, src, dwords * 4);
|
||||||
|
}
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -42,24 +42,36 @@ extern "C" {
|
||||||
|
|
||||||
/* Platform specific functions for Windows */
|
/* Platform specific functions for Windows */
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Set a function that is called for every windows message, before TranslateMessage()
|
||||||
|
*/
|
||||||
|
typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam);
|
||||||
|
extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief Returns the D3D9 adapter index that matches the specified display index.
|
||||||
|
|
||||||
/* Returns the D3D9 adapter index that matches the specified display index.
|
|
||||||
This adapter index can be passed to IDirect3D9::CreateDevice and controls
|
This adapter index can be passed to IDirect3D9::CreateDevice and controls
|
||||||
on which monitor a full screen application will appear.
|
on which monitor a full screen application will appear.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
|
extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex );
|
||||||
|
|
||||||
/* Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
|
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||||
|
/**
|
||||||
|
\brief Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
|
||||||
|
|
||||||
Once you are done using the device, you should release it to avoid a resource leak.
|
Once you are done using the device, you should release it to avoid a resource leak.
|
||||||
*/
|
*/
|
||||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
|
||||||
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
|
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
|
||||||
|
|
||||||
/* Returns the DXGI Adapter and Output indices for the specified display index.
|
/**
|
||||||
|
\brief Returns the DXGI Adapter and Output indices for the specified display index.
|
||||||
|
|
||||||
These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
|
These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
|
||||||
required to create a DX10 or DX11 device and swap chain.
|
required to create a DX10 or DX11 device and swap chain.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
|
extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
|
||||||
|
|
||||||
#endif /* __WIN32__ */
|
#endif /* __WIN32__ */
|
||||||
|
|
||||||
|
@ -67,7 +79,10 @@ extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapt
|
||||||
/* Platform specific functions for iOS */
|
/* Platform specific functions for iOS */
|
||||||
#if defined(__IPHONEOS__) && __IPHONEOS__
|
#if defined(__IPHONEOS__) && __IPHONEOS__
|
||||||
|
|
||||||
|
#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
|
||||||
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
|
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
|
||||||
|
|
||||||
|
#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled)
|
||||||
extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
|
extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
|
||||||
|
|
||||||
#endif /* __IPHONEOS__ */
|
#endif /* __IPHONEOS__ */
|
||||||
|
@ -76,12 +91,16 @@ extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
|
||||||
/* Platform specific functions for Android */
|
/* Platform specific functions for Android */
|
||||||
#if defined(__ANDROID__) && __ANDROID__
|
#if defined(__ANDROID__) && __ANDROID__
|
||||||
|
|
||||||
/* Get the JNI environment for the current thread
|
/**
|
||||||
|
\brief Get the JNI environment for the current thread
|
||||||
|
|
||||||
This returns JNIEnv*, but the prototype is void* so we don't need jni.h
|
This returns JNIEnv*, but the prototype is void* so we don't need jni.h
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
|
extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
|
||||||
|
|
||||||
/* Get the SDL Activity object for the application
|
/**
|
||||||
|
\brief Get the SDL Activity object for the application
|
||||||
|
|
||||||
This returns jobject, but the prototype is void* so we don't need jni.h
|
This returns jobject, but the prototype is void* so we don't need jni.h
|
||||||
The jobject returned by SDL_AndroidGetActivity is a local reference.
|
The jobject returned by SDL_AndroidGetActivity is a local reference.
|
||||||
It is the caller's responsibility to properly release it
|
It is the caller's responsibility to properly release it
|
||||||
|
@ -89,26 +108,33 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
|
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity();
|
||||||
|
|
||||||
/* See the official Android developer guide for more information:
|
/**
|
||||||
|
See the official Android developer guide for more information:
|
||||||
http://developer.android.com/guide/topics/data/data-storage.html
|
http://developer.android.com/guide/topics/data/data-storage.html
|
||||||
*/
|
*/
|
||||||
#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
|
#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
|
||||||
#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
|
#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
|
||||||
|
|
||||||
/* Get the path used for internal storage for this application.
|
/**
|
||||||
|
\brief Get the path used for internal storage for this application.
|
||||||
|
|
||||||
This path is unique to your application and cannot be written to
|
This path is unique to your application and cannot be written to
|
||||||
by other applications.
|
by other applications.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
|
extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
|
||||||
|
|
||||||
/* Get the current state of external storage, a bitmask of these values:
|
/**
|
||||||
|
\brief Get the current state of external storage, a bitmask of these values:
|
||||||
SDL_ANDROID_EXTERNAL_STORAGE_READ
|
SDL_ANDROID_EXTERNAL_STORAGE_READ
|
||||||
SDL_ANDROID_EXTERNAL_STORAGE_WRITE
|
SDL_ANDROID_EXTERNAL_STORAGE_WRITE
|
||||||
|
|
||||||
If external storage is currently unavailable, this will return 0.
|
If external storage is currently unavailable, this will return 0.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
|
extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
|
||||||
|
|
||||||
/* Get the path used for external storage for this application.
|
/**
|
||||||
|
\brief Get the path used for external storage for this application.
|
||||||
|
|
||||||
This path is unique to your application, but is public and can be
|
This path is unique to your application, but is public and can be
|
||||||
written to by other applications.
|
written to by other applications.
|
||||||
*/
|
*/
|
||||||
|
@ -151,7 +177,7 @@ typedef enum
|
||||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||||
*
|
*
|
||||||
* \param pathType The type of path to retrieve.
|
* \param pathType The type of path to retrieve.
|
||||||
* \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
|
* \return A UCS-2 string (16-bit, wide-char) containing the path, or NULL
|
||||||
* if the path is not available for any reason. Not all paths are
|
* if the path is not available for any reason. Not all paths are
|
||||||
* available on all versions of Windows. This is especially true on
|
* available on all versions of Windows. This is especially true on
|
||||||
* Windows Phone. Check the documentation for the given
|
* Windows Phone. Check the documentation for the given
|
||||||
|
@ -168,7 +194,7 @@ extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path
|
||||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||||
*
|
*
|
||||||
* \param pathType The type of path to retrieve.
|
* \param pathType The type of path to retrieve.
|
||||||
* \ret A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
|
* \return A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
|
||||||
* if the path is not available for any reason. Not all paths are
|
* if the path is not available for any reason. Not all paths are
|
||||||
* available on all versions of Windows. This is especially true on
|
* available on all versions of Windows. This is especially true on
|
||||||
* Windows Phone. Check the documentation for the given
|
* Windows Phone. Check the documentation for the given
|
||||||
|
@ -179,7 +205,6 @@ extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathT
|
||||||
|
|
||||||
#endif /* __WINRT__ */
|
#endif /* __WINRT__ */
|
||||||
|
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -52,7 +52,9 @@ struct SDL_SysWMinfo;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -83,7 +85,7 @@ struct SDL_SysWMinfo;
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
#include <Cocoa/Cocoa.h>
|
@class NSWindow;
|
||||||
#else
|
#else
|
||||||
typedef struct _NSWindow NSWindow;
|
typedef struct _NSWindow NSWindow;
|
||||||
#endif
|
#endif
|
||||||
|
@ -96,13 +98,14 @@ typedef struct _NSWindow NSWindow;
|
||||||
typedef struct _UIWindow UIWindow;
|
typedef struct _UIWindow UIWindow;
|
||||||
typedef struct _UIViewController UIViewController;
|
typedef struct _UIViewController UIViewController;
|
||||||
#endif
|
#endif
|
||||||
|
typedef Uint32 GLuint;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_DRIVER_MIR)
|
#if defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||||
#include <mir_toolkit/mir_client_library.h>
|
typedef struct ANativeWindow ANativeWindow;
|
||||||
|
typedef void *EGLSurface;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are the various supported windowing subsystems
|
* These are the various supported windowing subsystems
|
||||||
*/
|
*/
|
||||||
|
@ -117,6 +120,7 @@ typedef enum
|
||||||
SDL_SYSWM_WAYLAND,
|
SDL_SYSWM_WAYLAND,
|
||||||
SDL_SYSWM_MIR,
|
SDL_SYSWM_MIR,
|
||||||
SDL_SYSWM_WINRT,
|
SDL_SYSWM_WINRT,
|
||||||
|
SDL_SYSWM_ANDROID
|
||||||
} SDL_SYSWM_TYPE;
|
} SDL_SYSWM_TYPE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -149,12 +153,17 @@ struct SDL_SysWMmsg
|
||||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
/* Latest version of Xcode clang complains about empty structs in C v. C++:
|
||||||
|
error: empty struct has size 0 in C, size 1 in C++
|
||||||
|
*/
|
||||||
|
int dummy;
|
||||||
/* No Cocoa window events yet */
|
/* No Cocoa window events yet */
|
||||||
} cocoa;
|
} cocoa;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
int dummy;
|
||||||
/* No UIKit window events yet */
|
/* No UIKit window events yet */
|
||||||
} uikit;
|
} uikit;
|
||||||
#endif
|
#endif
|
||||||
|
@ -179,6 +188,7 @@ struct SDL_SysWMinfo
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
HWND window; /**< The window handle */
|
HWND window; /**< The window handle */
|
||||||
|
HDC hdc; /**< The window device context */
|
||||||
} win;
|
} win;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
||||||
|
@ -205,13 +215,24 @@ struct SDL_SysWMinfo
|
||||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
NSWindow *window; /* The Cocoa window */
|
#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
|
||||||
|
NSWindow __unsafe_unretained *window; /* The Cocoa window */
|
||||||
|
#else
|
||||||
|
NSWindow *window; /* The Cocoa window */
|
||||||
|
#endif
|
||||||
} cocoa;
|
} cocoa;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
UIWindow *window; /* The UIKit window */
|
#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
|
||||||
|
UIWindow __unsafe_unretained *window; /* The UIKit window */
|
||||||
|
#else
|
||||||
|
UIWindow *window; /* The UIKit window */
|
||||||
|
#endif
|
||||||
|
GLuint framebuffer; /* The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */
|
||||||
|
GLuint colorbuffer; /* The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */
|
||||||
|
GLuint resolveFramebuffer; /* The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */
|
||||||
} uikit;
|
} uikit;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
||||||
|
@ -225,11 +246,19 @@ struct SDL_SysWMinfo
|
||||||
#if defined(SDL_VIDEO_DRIVER_MIR)
|
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
MirConnection *connection; /**< Mir display server connection */
|
struct MirConnection *connection; /**< Mir display server connection */
|
||||||
MirSurface *surface; /**< Mir surface */
|
struct MirSurface *surface; /**< Mir surface */
|
||||||
} mir;
|
} mir;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
ANativeWindow *window;
|
||||||
|
EGLSurface surface;
|
||||||
|
} android;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Can't have an empty union */
|
/* Can't have an empty union */
|
||||||
int dummy;
|
int dummy;
|
||||||
} info;
|
} info;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -52,7 +52,7 @@ extern "C" {
|
||||||
/* Global definitions */
|
/* Global definitions */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Note: Maximum size of SDLTest log message is less than SDLs limit
|
* Note: Maximum size of SDLTest log message is less than SDL's limit
|
||||||
* to ensure we can fit additional information such as the timestamp.
|
* to ensure we can fit additional information such as the timestamp.
|
||||||
*/
|
*/
|
||||||
#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584
|
#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -58,7 +58,7 @@ extern "C" {
|
||||||
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
|
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
|
||||||
* \param assertDescription Message to log with the assert describing it.
|
* \param assertDescription Message to log with the assert describing it.
|
||||||
*/
|
*/
|
||||||
void SDLTest_Assert(int assertCondition, const char *assertDescription, ...);
|
void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
|
* \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
|
||||||
|
@ -68,14 +68,14 @@ void SDLTest_Assert(int assertCondition, const char *assertDescription, ...);
|
||||||
*
|
*
|
||||||
* \returns Returns the assertCondition so it can be used to externally to break execution flow if desired.
|
* \returns Returns the assertCondition so it can be used to externally to break execution flow if desired.
|
||||||
*/
|
*/
|
||||||
int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...);
|
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Explicitely pass without checking an assertion condition. Updates assertion counter.
|
* \brief Explicitly pass without checking an assertion condition. Updates assertion counter.
|
||||||
*
|
*
|
||||||
* \param assertDescription Message to log with the assert describing it.
|
* \param assertDescription Message to log with the assert describing it.
|
||||||
*/
|
*/
|
||||||
void SDLTest_AssertPass(const char *assertDescription, ...);
|
void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Resets the assert summary counters to zero.
|
* \brief Resets the assert summary counters to zero.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -51,9 +51,9 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* \param surface Surface used in comparison
|
* \param surface Surface used in comparison
|
||||||
* \param referenceSurface Test Surface used in comparison
|
* \param referenceSurface Test Surface used in comparison
|
||||||
* \param allowable_error Allowable difference (squared) in blending accuracy.
|
* \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.
|
||||||
*
|
*
|
||||||
* \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
|
* \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
|
||||||
*/
|
*/
|
||||||
int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
|
int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -70,27 +70,27 @@ extern "C" {
|
||||||
/* ---------- Function Prototypes ------------- */
|
/* ---------- Function Prototypes ------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* /brief Initialize the CRC context
|
* \brief Initialize the CRC context
|
||||||
*
|
*
|
||||||
* Note: The function initializes the crc table required for all crc calculations.
|
* Note: The function initializes the crc table required for all crc calculations.
|
||||||
*
|
*
|
||||||
* /param crcContext pointer to context variable
|
* \param crcContext pointer to context variable
|
||||||
*
|
*
|
||||||
* /returns 0 for OK, -1 on error
|
* \returns 0 for OK, -1 on error
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
|
int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* /brief calculate a crc32 from a data block
|
* \brief calculate a crc32 from a data block
|
||||||
*
|
*
|
||||||
* /param crcContext pointer to context variable
|
* \param crcContext pointer to context variable
|
||||||
* /param inBuf input buffer to checksum
|
* \param inBuf input buffer to checksum
|
||||||
* /param inLen length of input buffer
|
* \param inLen length of input buffer
|
||||||
* /param crc32 pointer to Uint32 to store the final CRC into
|
* \param crc32 pointer to Uint32 to store the final CRC into
|
||||||
*
|
*
|
||||||
* /returns 0 for OK, -1 on error
|
* \returns 0 for OK, -1 on error
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
|
int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
|
||||||
|
@ -102,11 +102,11 @@ int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* /brief clean up CRC context
|
* \brief clean up CRC context
|
||||||
*
|
*
|
||||||
* /param crcContext pointer to context variable
|
* \param crcContext pointer to context variable
|
||||||
*
|
*
|
||||||
* /returns 0 for OK, -1 on error
|
* \returns 0 for OK, -1 on error
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -57,7 +57,7 @@ extern "C" {
|
||||||
/**
|
/**
|
||||||
* Initializes the fuzzer for a test
|
* Initializes the fuzzer for a test
|
||||||
*
|
*
|
||||||
* /param execKey Execution "Key" that initializes the random number generator uniquely for the test.
|
* \param execKey Execution "Key" that initializes the random number generator uniquely for the test.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void SDLTest_FuzzerInit(Uint64 execKey);
|
void SDLTest_FuzzerInit(Uint64 execKey);
|
||||||
|
@ -318,7 +318,7 @@ Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL
|
||||||
/**
|
/**
|
||||||
* Returns integer in range [min, max] (inclusive).
|
* Returns integer in range [min, max] (inclusive).
|
||||||
* Min and max values can be negative values.
|
* Min and max values can be negative values.
|
||||||
* If Max in smaller tham min, then the values are swapped.
|
* If Max in smaller than min, then the values are swapped.
|
||||||
* Min and max are the same value, that value will be returned.
|
* Min and max are the same value, that value will be returned.
|
||||||
*
|
*
|
||||||
* \param min Minimum inclusive value of returned random number
|
* \param min Minimum inclusive value of returned random number
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -47,14 +47,14 @@ extern "C" {
|
||||||
*
|
*
|
||||||
* \param fmt Message to be logged
|
* \param fmt Message to be logged
|
||||||
*/
|
*/
|
||||||
void SDLTest_Log(const char *fmt, ...);
|
void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
|
* \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
|
||||||
*
|
*
|
||||||
* \param fmt Message to be logged
|
* \param fmt Message to be logged
|
||||||
*/
|
*/
|
||||||
void SDLTest_LogError(const char *fmt, ...);
|
void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||||
|
|
||||||
/* Ends C function definitions when using C++ */
|
/* Ends C function definitions when using C++ */
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -78,9 +78,9 @@ extern "C" {
|
||||||
/* ---------- Function Prototypes ------------- */
|
/* ---------- Function Prototypes ------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* /brief initialize the context
|
* \brief initialize the context
|
||||||
*
|
*
|
||||||
* /param mdContext pointer to context variable
|
* \param mdContext pointer to context variable
|
||||||
*
|
*
|
||||||
* Note: The function initializes the message-digest context
|
* Note: The function initializes the message-digest context
|
||||||
* mdContext. Call before each new use of the context -
|
* mdContext. Call before each new use of the context -
|
||||||
|
@ -90,11 +90,11 @@ extern "C" {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* /brief update digest from variable length data
|
* \brief update digest from variable length data
|
||||||
*
|
*
|
||||||
* /param mdContext pointer to context variable
|
* \param mdContext pointer to context variable
|
||||||
* /param inBuf pointer to data array/string
|
* \param inBuf pointer to data array/string
|
||||||
* /param inLen length of data array/string
|
* \param inLen length of data array/string
|
||||||
*
|
*
|
||||||
* Note: The function updates the message-digest context to account
|
* Note: The function updates the message-digest context to account
|
||||||
* for the presence of each of the characters inBuf[0..inLen-1]
|
* for the presence of each of the characters inBuf[0..inLen-1]
|
||||||
|
@ -105,10 +105,10 @@ extern "C" {
|
||||||
unsigned int inLen);
|
unsigned int inLen);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* /brief complete digest computation
|
* \brief complete digest computation
|
||||||
*
|
*
|
||||||
* /param mdContext pointer to context variable
|
* \param mdContext pointer to context variable
|
||||||
*
|
*
|
||||||
* Note: The function terminates the message-digest computation and
|
* Note: The function terminates the message-digest computation and
|
||||||
* ends with the desired message digest in mdContext.digest[0..15].
|
* ends with the desired message digest in mdContext.digest[0..15].
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -233,9 +233,9 @@ extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
|
||||||
* if (!thread_local_storage) {
|
* if (!thread_local_storage) {
|
||||||
* thread_local_storage = SDL_TLSCreate();
|
* thread_local_storage = SDL_TLSCreate();
|
||||||
* }
|
* }
|
||||||
* SDL_AtomicUnLock(&tls_lock);
|
* SDL_AtomicUnlock(&tls_lock);
|
||||||
* }
|
* }
|
||||||
* SDL_TLSSet(thread_local_storage, value);
|
* SDL_TLSSet(thread_local_storage, value, 0);
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* void *GetMyThreadData(void)
|
* void *GetMyThreadData(void)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -88,7 +88,7 @@ typedef int SDL_TimerID;
|
||||||
/**
|
/**
|
||||||
* \brief Add a new timer to the pool of timers already running.
|
* \brief Add a new timer to the pool of timers already running.
|
||||||
*
|
*
|
||||||
* \return A timer ID, or NULL when an error occurs.
|
* \return A timer ID, or 0 when an error occurs.
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
|
extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
|
||||||
SDL_TimerCallback callback,
|
SDL_TimerCallback callback,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -59,7 +59,7 @@ typedef struct SDL_version
|
||||||
*/
|
*/
|
||||||
#define SDL_MAJOR_VERSION 2
|
#define SDL_MAJOR_VERSION 2
|
||||||
#define SDL_MINOR_VERSION 0
|
#define SDL_MINOR_VERSION 0
|
||||||
#define SDL_PATCHLEVEL 3
|
#define SDL_PATCHLEVEL 4
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Macro to determine SDL version program was compiled against.
|
* \brief Macro to determine SDL version program was compiled against.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -53,8 +53,8 @@ extern "C" {
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
Uint32 format; /**< pixel format */
|
Uint32 format; /**< pixel format */
|
||||||
int w; /**< width */
|
int w; /**< width, in screen coordinates */
|
||||||
int h; /**< height */
|
int h; /**< height, in screen coordinates */
|
||||||
int refresh_rate; /**< refresh rate (or zero for unspecified) */
|
int refresh_rate; /**< refresh rate (or zero for unspecified) */
|
||||||
void *driverdata; /**< driver-specific data, initialize to 0 */
|
void *driverdata; /**< driver-specific data, initialize to 0 */
|
||||||
} SDL_DisplayMode;
|
} SDL_DisplayMode;
|
||||||
|
@ -108,7 +108,8 @@ typedef enum
|
||||||
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
||||||
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
|
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
|
||||||
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
||||||
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000 /**< window should be created in high-DPI mode if supported */
|
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported */
|
||||||
|
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000 /**< window has mouse captured (unrelated to INPUT_GRABBED) */
|
||||||
} SDL_WindowFlags;
|
} SDL_WindowFlags;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -142,7 +143,9 @@ typedef enum
|
||||||
SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
|
SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
|
||||||
*/
|
*/
|
||||||
SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */
|
SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */
|
||||||
SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as a result of an API call or through the system or user changing the window size. */
|
SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as
|
||||||
|
a result of an API call or through the
|
||||||
|
system or user changing the window size. */
|
||||||
SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
|
SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
|
||||||
SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
|
SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
|
||||||
SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
|
SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
|
||||||
|
@ -188,7 +191,8 @@ typedef enum
|
||||||
SDL_GL_CONTEXT_FLAGS,
|
SDL_GL_CONTEXT_FLAGS,
|
||||||
SDL_GL_CONTEXT_PROFILE_MASK,
|
SDL_GL_CONTEXT_PROFILE_MASK,
|
||||||
SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
|
SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
|
||||||
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
|
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
|
||||||
|
SDL_GL_CONTEXT_RELEASE_BEHAVIOR
|
||||||
} SDL_GLattr;
|
} SDL_GLattr;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -206,6 +210,12 @@ typedef enum
|
||||||
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
|
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
|
||||||
} SDL_GLcontextFlag;
|
} SDL_GLcontextFlag;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000,
|
||||||
|
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001
|
||||||
|
} SDL_GLcontextReleaseFlag;
|
||||||
|
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
|
|
||||||
|
@ -288,6 +298,18 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
|
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the dots/pixels-per-inch for a display
|
||||||
|
*
|
||||||
|
* \note Diagonal, horizontal and vertical DPI can all be optionally
|
||||||
|
* returned if the parameter is non-NULL.
|
||||||
|
*
|
||||||
|
* \return 0 on success, or -1 if no DPI information is available or the index is out of range.
|
||||||
|
*
|
||||||
|
* \sa SDL_GetNumVideoDisplays()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Returns the number of available display modes.
|
* \brief Returns the number of available display modes.
|
||||||
*
|
*
|
||||||
|
@ -392,8 +414,8 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
||||||
* ::SDL_WINDOWPOS_UNDEFINED.
|
* ::SDL_WINDOWPOS_UNDEFINED.
|
||||||
* \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
* \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
||||||
* ::SDL_WINDOWPOS_UNDEFINED.
|
* ::SDL_WINDOWPOS_UNDEFINED.
|
||||||
* \param w The width of the window.
|
* \param w The width of the window, in screen coordinates.
|
||||||
* \param h The height of the window.
|
* \param h The height of the window, in screen coordinates.
|
||||||
* \param flags The flags for the window, a mask of any of the following:
|
* \param flags The flags for the window, a mask of any of the following:
|
||||||
* ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL,
|
* ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL,
|
||||||
* ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS,
|
* ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS,
|
||||||
|
@ -403,6 +425,12 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
||||||
*
|
*
|
||||||
* \return The id of the window created, or zero if window creation failed.
|
* \return The id of the window created, or zero if window creation failed.
|
||||||
*
|
*
|
||||||
|
* If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
|
||||||
|
* in pixels may differ from its size in screen coordinates on platforms with
|
||||||
|
* high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query
|
||||||
|
* the client area's size in screen coordinates, and SDL_GL_GetDrawableSize()
|
||||||
|
* or SDL_GetRendererOutputSize() to query the drawable size in pixels.
|
||||||
|
*
|
||||||
* \sa SDL_DestroyWindow()
|
* \sa SDL_DestroyWindow()
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
|
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
|
||||||
|
@ -493,10 +521,10 @@ extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
|
||||||
* \brief Set the position of a window.
|
* \brief Set the position of a window.
|
||||||
*
|
*
|
||||||
* \param window The window to reposition.
|
* \param window The window to reposition.
|
||||||
* \param x The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
|
* \param x The x coordinate of the window in screen coordinates, or
|
||||||
::SDL_WINDOWPOS_UNDEFINED.
|
* ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.
|
||||||
* \param y The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
|
* \param y The y coordinate of the window in screen coordinates, or
|
||||||
::SDL_WINDOWPOS_UNDEFINED.
|
* ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.
|
||||||
*
|
*
|
||||||
* \note The window coordinate origin is the upper left of the display.
|
* \note The window coordinate origin is the upper left of the display.
|
||||||
*
|
*
|
||||||
|
@ -509,8 +537,10 @@ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
|
||||||
* \brief Get the position of a window.
|
* \brief Get the position of a window.
|
||||||
*
|
*
|
||||||
* \param window The window to query.
|
* \param window The window to query.
|
||||||
* \param x Pointer to variable for storing the x position, may be NULL
|
* \param x Pointer to variable for storing the x position, in screen
|
||||||
* \param y Pointer to variable for storing the y position, may be NULL
|
* coordinates. May be NULL.
|
||||||
|
* \param y Pointer to variable for storing the y position, in screen
|
||||||
|
* coordinates. May be NULL.
|
||||||
*
|
*
|
||||||
* \sa SDL_SetWindowPosition()
|
* \sa SDL_SetWindowPosition()
|
||||||
*/
|
*/
|
||||||
|
@ -521,12 +551,17 @@ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
|
||||||
* \brief Set the size of a window's client area.
|
* \brief Set the size of a window's client area.
|
||||||
*
|
*
|
||||||
* \param window The window to resize.
|
* \param window The window to resize.
|
||||||
* \param w The width of the window, must be >0
|
* \param w The width of the window, in screen coordinates. Must be >0.
|
||||||
* \param h The height of the window, must be >0
|
* \param h The height of the window, in screen coordinates. Must be >0.
|
||||||
*
|
*
|
||||||
* \note You can't change the size of a fullscreen window, it automatically
|
* \note You can't change the size of a fullscreen window, it automatically
|
||||||
* matches the size of the display mode.
|
* matches the size of the display mode.
|
||||||
*
|
*
|
||||||
|
* The window size in screen coordinates may differ from the size in pixels, if
|
||||||
|
* the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with
|
||||||
|
* high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or
|
||||||
|
* SDL_GetRendererOutputSize() to get the real client area size in pixels.
|
||||||
|
*
|
||||||
* \sa SDL_GetWindowSize()
|
* \sa SDL_GetWindowSize()
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
||||||
|
@ -536,8 +571,15 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
||||||
* \brief Get the size of a window's client area.
|
* \brief Get the size of a window's client area.
|
||||||
*
|
*
|
||||||
* \param window The window to query.
|
* \param window The window to query.
|
||||||
* \param w Pointer to variable for storing the width, may be NULL
|
* \param w Pointer to variable for storing the width, in screen
|
||||||
* \param h Pointer to variable for storing the height, may be NULL
|
* coordinates. May be NULL.
|
||||||
|
* \param h Pointer to variable for storing the height, in screen
|
||||||
|
* coordinates. May be NULL.
|
||||||
|
*
|
||||||
|
* The window size in screen coordinates may differ from the size in pixels, if
|
||||||
|
* the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with
|
||||||
|
* high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or
|
||||||
|
* SDL_GetRendererOutputSize() to get the real client area size in pixels.
|
||||||
*
|
*
|
||||||
* \sa SDL_SetWindowSize()
|
* \sa SDL_SetWindowSize()
|
||||||
*/
|
*/
|
||||||
|
@ -714,6 +756,9 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
|
||||||
* \param window The window for which the input grab mode should be set.
|
* \param window The window for which the input grab mode should be set.
|
||||||
* \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.
|
* \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.
|
||||||
*
|
*
|
||||||
|
* If the caller enables a grab while another window is currently grabbed,
|
||||||
|
* the other window loses its grab in favor of the caller's window.
|
||||||
|
*
|
||||||
* \sa SDL_GetWindowGrab()
|
* \sa SDL_GetWindowGrab()
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
||||||
|
@ -728,6 +773,15 @@ extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
|
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Get the window that currently has an input grab enabled.
|
||||||
|
*
|
||||||
|
* \return This returns the window if input is grabbed, and NULL otherwise.
|
||||||
|
*
|
||||||
|
* \sa SDL_SetWindowGrab()
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Set the brightness (gamma correction) for a window.
|
* \brief Set the brightness (gamma correction) for a window.
|
||||||
*
|
*
|
||||||
|
@ -790,6 +844,75 @@ extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
|
||||||
Uint16 * green,
|
Uint16 * green,
|
||||||
Uint16 * blue);
|
Uint16 * blue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Possible return values from the SDL_HitTest callback.
|
||||||
|
*
|
||||||
|
* \sa SDL_HitTest
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SDL_HITTEST_NORMAL, /**< Region is normal. No special properties. */
|
||||||
|
SDL_HITTEST_DRAGGABLE, /**< Region can drag entire window. */
|
||||||
|
SDL_HITTEST_RESIZE_TOPLEFT,
|
||||||
|
SDL_HITTEST_RESIZE_TOP,
|
||||||
|
SDL_HITTEST_RESIZE_TOPRIGHT,
|
||||||
|
SDL_HITTEST_RESIZE_RIGHT,
|
||||||
|
SDL_HITTEST_RESIZE_BOTTOMRIGHT,
|
||||||
|
SDL_HITTEST_RESIZE_BOTTOM,
|
||||||
|
SDL_HITTEST_RESIZE_BOTTOMLEFT,
|
||||||
|
SDL_HITTEST_RESIZE_LEFT
|
||||||
|
} SDL_HitTestResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Callback used for hit-testing.
|
||||||
|
*
|
||||||
|
* \sa SDL_SetWindowHitTest
|
||||||
|
*/
|
||||||
|
typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
|
||||||
|
const SDL_Point *area,
|
||||||
|
void *data);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Provide a callback that decides if a window region has special properties.
|
||||||
|
*
|
||||||
|
* Normally windows are dragged and resized by decorations provided by the
|
||||||
|
* system window manager (a title bar, borders, etc), but for some apps, it
|
||||||
|
* makes sense to drag them from somewhere else inside the window itself; for
|
||||||
|
* example, one might have a borderless window that wants to be draggable
|
||||||
|
* from any part, or simulate its own title bar, etc.
|
||||||
|
*
|
||||||
|
* This function lets the app provide a callback that designates pieces of
|
||||||
|
* a given window as special. This callback is run during event processing
|
||||||
|
* if we need to tell the OS to treat a region of the window specially; the
|
||||||
|
* use of this callback is known as "hit testing."
|
||||||
|
*
|
||||||
|
* Mouse input may not be delivered to your application if it is within
|
||||||
|
* a special area; the OS will often apply that input to moving the window or
|
||||||
|
* resizing the window and not deliver it to the application.
|
||||||
|
*
|
||||||
|
* Specifying NULL for a callback disables hit-testing. Hit-testing is
|
||||||
|
* disabled by default.
|
||||||
|
*
|
||||||
|
* Platforms that don't support this functionality will return -1
|
||||||
|
* unconditionally, even if you're attempting to disable hit-testing.
|
||||||
|
*
|
||||||
|
* Your callback may fire at any time, and its firing does not indicate any
|
||||||
|
* specific behavior (for example, on Windows, this certainly might fire
|
||||||
|
* when the OS is deciding whether to drag your window, but it fires for lots
|
||||||
|
* of other reasons, too, some unrelated to anything you probably care about
|
||||||
|
* _and when the mouse isn't actually at the location it is testing_).
|
||||||
|
* Since this can fire at any time, you should try to keep your callback
|
||||||
|
* efficient, devoid of allocations, etc.
|
||||||
|
*
|
||||||
|
* \param window The window to set hit-testing on.
|
||||||
|
* \param callback The callback to call when doing a hit-test.
|
||||||
|
* \param callback_data An app-defined void pointer passed to the callback.
|
||||||
|
* \return 0 on success, -1 on error (including unsupported).
|
||||||
|
*/
|
||||||
|
extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
|
||||||
|
SDL_HitTest callback,
|
||||||
|
void *callback_data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Destroy a window.
|
* \brief Destroy a window.
|
||||||
*/
|
*/
|
||||||
|
@ -908,13 +1031,14 @@ extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
|
||||||
extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
|
extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get the size of a window's underlying drawable (for use with glViewport).
|
* \brief Get the size of a window's underlying drawable in pixels (for use
|
||||||
|
* with glViewport).
|
||||||
*
|
*
|
||||||
* \param window Window from which the drawable size should be queried
|
* \param window Window from which the drawable size should be queried
|
||||||
* \param w Pointer to variable for storing the width, may be NULL
|
* \param w Pointer to variable for storing the width in pixels, may be NULL
|
||||||
* \param h Pointer to variable for storing the height, may be NULL
|
* \param h Pointer to variable for storing the height in pixels, may be NULL
|
||||||
*
|
*
|
||||||
* This may differ from SDL_GetWindowSize if we're rendering to a high-DPI
|
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
||||||
* drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
|
* drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
|
||||||
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
||||||
* by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
* by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -41,6 +41,14 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SDL_UNUSED
|
||||||
|
# ifdef __GNUC__
|
||||||
|
# define SDL_UNUSED __attribute__((unused))
|
||||||
|
# else
|
||||||
|
# define SDL_UNUSED
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Some compilers use a special export keyword */
|
/* Some compilers use a special export keyword */
|
||||||
#ifndef DECLSPEC
|
#ifndef DECLSPEC
|
||||||
# if defined(__WIN32__) || defined(__WINRT__)
|
# if defined(__WIN32__) || defined(__WINRT__)
|
||||||
|
@ -56,8 +64,6 @@
|
||||||
# else
|
# else
|
||||||
# if defined(__GNUC__) && __GNUC__ >= 4
|
# if defined(__GNUC__) && __GNUC__ >= 4
|
||||||
# define DECLSPEC __attribute__ ((visibility("default")))
|
# define DECLSPEC __attribute__ ((visibility("default")))
|
||||||
# elif defined(__GNUC__) && __GNUC__ >= 2
|
|
||||||
# define DECLSPEC __declspec(dllexport)
|
|
||||||
# else
|
# else
|
||||||
# define DECLSPEC
|
# define DECLSPEC
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Simple DirectMedia Layer
|
Simple DirectMedia Layer
|
||||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
|
||||||
|
|
||||||
This software is provided 'as-is', without any express or implied
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue