osx/SDL2.framework/Versions/A/Headers/SDL.h
@@ -32,18 +32,20 @@ * * \section intro_sec Introduction * * This is the Simple DirectMedia Layer, a general API that provides low * level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, * and 2D framebuffer across multiple platforms. * 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 is written in C, but works with C++ natively, and has bindings to * several other languages, including Ada, C#, Eiffel, Erlang, Euphoria, * Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP, * Pike, Pliant, Python, Ruby, and Smalltalk. * SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. * Support for other platforms may be found in the source code. * * This library is distributed under the zlib license, which can be * found in the file "COPYING". This license allows you to use SDL * freely for any purpose as long as you retain the copyright notice. * 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. @@ -106,13 +108,14 @@ /*@{*/ #define SDL_INIT_TIMER 0x00000001 #define SDL_INIT_AUDIO 0x00000010 #define SDL_INIT_VIDEO 0x00000020 #define SDL_INIT_JOYSTICK 0x00000200 #define SDL_INIT_VIDEO 0x00000020 /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */ #define SDL_INIT_JOYSTICK 0x00000200 /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */ #define SDL_INIT_HAPTIC 0x00001000 #define SDL_INIT_GAMECONTROLLER 0x00002000 /**< turn on game controller also implicitly does JOYSTICK */ #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */ #define SDL_INIT_GAMECONTROLLER 0x00002000 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */ #define SDL_INIT_EVENTS 0x00004000 #define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */ #define SDL_INIT_EVERYTHING ( \ SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | \ SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \ SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \ ) /*@}*/ osx/SDL2.framework/Versions/A/Headers/SDL_atomic.h
@@ -45,6 +45,7 @@ * * There's also lots of good information here: * http://www.1024cores.net/home/lock-free-algorithms * http://preshing.com/ * * These operations may or may not actually be implemented using * processor specific atomic operations. When possible they are @@ -135,6 +136,52 @@ { SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); } #endif /** * Memory barriers are designed to prevent reads and writes from being * reordered by the compiler and being seen out of order on multi-core CPUs. * * A typical pattern would be for thread A to write some data and a flag, * and for thread B to read the flag and get the data. In this case you * would insert a release barrier between writing the data and the flag, * guaranteeing that the data write completes no later than the flag is * written, and you would insert an acquire barrier between reading the * flag and reading the data, to ensure that all the reads associated * with the flag have completed. * * In this pattern you should always see a release barrier paired with * an acquire barrier and you should gate the data reads/writes with a * single flag variable. * * For more information on these semantics, take a look at the blog post: * http://preshing.com/20120913/acquire-and-release-semantics */ #if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__)) #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory") #elif defined(__GNUC__) && defined(__arm__) #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory") #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) #ifdef __thumb__ /* The mcr instruction isn't available in thumb mode, use real functions */ extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease(); extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire(); #else #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory") #endif /* __thumb__ */ #else #define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory") #define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory") #endif /* __GNUC__ && __arm__ */ #else /* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */ #define SDL_MemoryBarrierRelease() SDL_CompilerBarrier() #define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier() #endif /* Platform specific optimized versions of the atomic functions, * you can disable these by defining SDL_DISABLE_ATOMIC_INLINE */ osx/SDL2.framework/Versions/A/Headers/SDL_audio.h
@@ -183,6 +183,17 @@ /** * A structure to hold a set of audio conversion filters and buffers. */ #ifdef __GNUC__ /* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't pad it out to 88 bytes to guarantee ABI compatibility between compilers. vvv The next time we rev the ABI, make sure to size the ints and add padding. */ #define SDL_AUDIOCVT_PACKED __attribute__((packed)) #else #define SDL_AUDIOCVT_PACKED #endif /* */ typedef struct SDL_AudioCVT { int needed; /**< Set to 1 if conversion possible */ @@ -196,7 +207,7 @@ double len_ratio; /**< Given len, final size is len*len_ratio */ SDL_AudioFilter filters[10]; /**< Filter list */ int filter_index; /**< Current audio conversion function */ } SDL_AudioCVT; } SDL_AUDIOCVT_PACKED SDL_AudioCVT; /* Function prototypes */ @@ -483,12 +494,6 @@ */ extern DECLSPEC void SDLCALL SDL_CloseAudio(void); extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev); /** * \return 1 if audio device is still functioning, zero if not, -1 on error. */ extern DECLSPEC int SDLCALL SDL_AudioDeviceConnected(SDL_AudioDeviceID dev); /* Ends C function definitions when using C++ */ #ifdef __cplusplus osx/SDL2.framework/Versions/A/Headers/SDL_bits.h
New file @@ -0,0 +1,97 @@ /* Simple DirectMedia Layer Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ /** * \file SDL_bits.h * * Functions for fiddling with bits and bitmasks. */ #ifndef _SDL_bits_h #define _SDL_bits_h #include "SDL_stdinc.h" #include "begin_code.h" /* Set up for C function definitions, even when using C++ */ #ifdef __cplusplus extern "C" { #endif /** * \file SDL_bits.h */ /** * Get the index of the most significant bit. Result is undefined when called * with 0. This operation can also be stated as "count leading zeroes" and * "log base 2". * * \return Index of the most significant bit, or -1 if the value is 0. */ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x) { #if defined(__GNUC__) && __GNUC__ >= 4 /* Count Leading Zeroes builtin in GCC. * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html */ if (x == 0) { return -1; } return 31 - __builtin_clz(x); #else /* Based off of Bit Twiddling Hacks by Sean Eron Anderson * <seander@cs.stanford.edu>, released in the public domain. * http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog */ const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000}; const int S[] = {1, 2, 4, 8, 16}; int msbIndex = 0; int i; if (x == 0) { return -1; } for (i = 4; i >= 0; i--) { if (x & b[i]) { x >>= S[i]; msbIndex |= S[i]; } } return msbIndex; #endif } /* Ends C function definitions when using C++ */ #ifdef __cplusplus } #endif #include "close_code.h" #endif /* _SDL_bits_h */ /* vi: set ts=4 sw=4 expandtab: */ osx/SDL2.framework/Versions/A/Headers/SDL_blendmode.h
@@ -39,10 +39,17 @@ */ typedef enum { SDL_BLENDMODE_NONE = 0x00000000, /**< No blending */ SDL_BLENDMODE_BLEND = 0x00000001, /**< dst = (src * A) + (dst * (1-A)) */ SDL_BLENDMODE_ADD = 0x00000002, /**< dst = (src * A) + dst */ SDL_BLENDMODE_MOD = 0x00000004 /**< dst = src * dst */ SDL_BLENDMODE_NONE = 0x00000000, /**< no blending dstRGBA = srcRGBA */ SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) dstA = srcA + (dstA * (1-srcA)) */ SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending dstRGB = (srcRGB * srcA) + dstRGB dstA = dstA */ SDL_BLENDMODE_MOD = 0x00000004 /**< color modulate dstRGB = srcRGB * dstRGB dstA = dstA */ } SDL_BlendMode; /* Ends C function definitions when using C++ */ osx/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h
@@ -36,10 +36,7 @@ #endif /* Useful headers */ /* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */ #if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) ) #define HAVE_ALLOCA_H 1 #endif #define HAVE_SYS_TYPES_H 1 #define HAVE_STDIO_H 1 #define STDC_HEADERS 1 osx/SDL2.framework/Versions/A/Headers/SDL_events.h
@@ -59,7 +59,7 @@ /* Application events */ SDL_QUIT = 0x100, /**< User-requested quit */ /* These application events have special meaning on iOS, see README.iOS for details */ /* These application events have special meaning on iOS, see README-ios.txt for details */ SDL_APP_TERMINATING, /**< The application is being terminated by the OS Called on iOS in applicationWillTerminate() Called on Android in onDestroy() @@ -412,7 +412,9 @@ } SDL_MultiGestureEvent; /* (event.dgesture.*) */ /** * \brief Dollar Gesture Event (event.dgesture.*) */ typedef struct SDL_DollarGestureEvent { Uint32 type; /**< ::SDL_DOLLARGESTURE */ @@ -462,7 +464,7 @@ */ typedef struct SDL_UserEvent { Uint32 type; /**< ::SDL_USEREVENT through ::SDL_NUMEVENTS-1 */ Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */ Uint32 timestamp; Uint32 windowID; /**< The associated window if any */ Sint32 code; /**< User defined event code */ @@ -642,7 +644,7 @@ * \warning Be very careful of what you do in the event filter function, as * it may run in a different thread! * * There is one caveat when dealing with the ::SDL_QUITEVENT event type. The * There is one caveat when dealing with the ::SDL_QuitEvent event type. The * event filter is only called when the window manager desires to close the * application window. If the event filter returns 1, then the window will * be closed, otherwise the window will remain open if possible. osx/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h
@@ -44,6 +44,10 @@ * 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 * for game controllers, and load appropriate drivers. * * If you would like to receive controller updates while the application * is in the background, you should set the following hint before calling * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS */ /* The gamecontroller structure used to identify an SDL game controller */ osx/SDL2.framework/Versions/A/Headers/SDL_haptic.h
@@ -166,13 +166,18 @@ #define SDL_HAPTIC_SINE (1<<1) /** * \brief Square wave effect supported. * \brief Left/Right effect supported. * * Periodic haptic effect that simulates square waves. * Haptic effect for direct control over high/low frequency motors. * * \sa SDL_HapticPeriodic * \sa SDL_HapticLeftRight * \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry, * we ran out of bits, and this is important for XInput devices. */ #define SDL_HAPTIC_SQUARE (1<<2) #define SDL_HAPTIC_LEFTRIGHT (1<<2) /* !!! FIXME: put this back when we have more bits in 2.1 */ /*#define SDL_HAPTIC_SQUARE (1<<2)*/ /** * \brief Triangle wave effect supported. @@ -478,7 +483,7 @@ * * The struct handles the following effects: * - ::SDL_HAPTIC_SINE * - ::SDL_HAPTIC_SQUARE * - ::SDL_HAPTIC_LEFTRIGHT * - ::SDL_HAPTIC_TRIANGLE * - ::SDL_HAPTIC_SAWTOOTHUP * - ::SDL_HAPTIC_SAWTOOTHDOWN @@ -524,7 +529,7 @@ \endverbatim * * \sa SDL_HAPTIC_SINE * \sa SDL_HAPTIC_SQUARE * \sa SDL_HAPTIC_LEFTRIGHT * \sa SDL_HAPTIC_TRIANGLE * \sa SDL_HAPTIC_SAWTOOTHUP * \sa SDL_HAPTIC_SAWTOOTHDOWN @@ -533,7 +538,7 @@ typedef struct SDL_HapticPeriodic { /* Header */ Uint16 type; /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_SQUARE, Uint16 type; /**< ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT, ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or ::SDL_HAPTIC_SAWTOOTHDOWN */ SDL_HapticDirection direction; /**< Direction of the effect. */ @@ -646,6 +651,31 @@ } SDL_HapticRamp; /** * \brief A structure containing a template for a Left/Right effect. * * This struct is exclusively for the ::SDL_HAPTIC_LEFTRIGHT effect. * * The Left/Right effect is used to explicitly control the large and small * motors, commonly found in modern game controllers. One motor is high * frequency, the other is low frequency. * * \sa SDL_HAPTIC_LEFTRIGHT * \sa SDL_HapticEffect */ typedef struct SDL_HapticLeftRight { /* Header */ Uint16 type; /**< ::SDL_HAPTIC_LEFTRIGHT */ /* Replay */ Uint32 length; /**< Duration of the effect. */ /* Rumble */ Uint16 large_magnitude; /**< Control of the large controller motor. */ Uint16 small_magnitude; /**< Control of the small controller motor. */ } SDL_HapticLeftRight; /** * \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect. * * A custom force feedback effect is much like a periodic effect, where the @@ -751,6 +781,7 @@ * \sa SDL_HapticPeriodic * \sa SDL_HapticCondition * \sa SDL_HapticRamp * \sa SDL_HapticLeftRight * \sa SDL_HapticCustom */ typedef union SDL_HapticEffect @@ -761,6 +792,7 @@ SDL_HapticPeriodic periodic; /**< Periodic effect. */ SDL_HapticCondition condition; /**< Condition effect. */ SDL_HapticRamp ramp; /**< Ramp effect. */ SDL_HapticLeftRight leftright; /**< Left/Right effect. */ SDL_HapticCustom custom; /**< Custom effect. */ } SDL_HapticEffect; @@ -926,7 +958,7 @@ * * Example: * \code * if (SDL_HapticQueryEffects(haptic) & SDL_HAPTIC_CONSTANT) { * if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) { * printf("We have constant haptic effect!"); * } * \endcode @@ -986,7 +1018,7 @@ * \param haptic Haptic device that has the effect. * \param effect Effect to update. * \param data New effect properties to use. * \return The id of the effect on success or -1 on error. * \return 0 on success or -1 on error. * * \sa SDL_HapticNewEffect * \sa SDL_HapticRunEffect @@ -1052,8 +1084,7 @@ * * \param haptic Haptic device to query the effect status on. * \param effect Identifier of the effect to query its status. * \return 0 if it isn't playing, ::SDL_HAPTIC_PLAYING if it is playing * or -1 on error. * \return 0 if it isn't playing, 1 if it is playing or -1 on error. * * \sa SDL_HapticRunEffect * \sa SDL_HapticStopEffect @@ -1067,8 +1098,8 @@ * Device must support the ::SDL_HAPTIC_GAIN feature. * * The user may specify the maximum gain by setting the environment variable * ::SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to * SDL_HapticSetGain() will scale linearly using ::SDL_HAPTIC_GAIN_MAX as the * SDL_HAPTIC_GAIN_MAX which should be between 0 and 100. All calls to * SDL_HapticSetGain() will scale linearly using SDL_HAPTIC_GAIN_MAX as the * maximum. * * \param haptic Haptic device to set the gain on. @@ -1133,7 +1164,7 @@ extern DECLSPEC int SDLCALL SDL_HapticStopAll(SDL_Haptic * haptic); /** * \brief Checks to see if rumble is supported on a haptic device.. * \brief Checks to see if rumble is supported on a haptic device. * * \param haptic Haptic device to check to see if it supports rumble. * \return SDL_TRUE if effect is supported, SDL_FALSE if it isn't or -1 on error. @@ -1182,8 +1213,6 @@ * \sa SDL_HapticRumblePlay */ extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic); /* Ends C function definitions when using C++ */ #ifdef __cplusplus osx/SDL2.framework/Versions/A/Headers/SDL_hints.h
@@ -48,9 +48,9 @@ #endif /** * \brief A variable controlling how 3D acceleration is used to accelerate the SDL 1.2 screen surface. * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface. * * SDL can try to accelerate the SDL 1.2 screen surface by using streaming * SDL can try to accelerate the SDL screen surface by using streaming * textures with a 3D rendering engine. This variable controls whether and * how this is done. * @@ -100,14 +100,14 @@ * This variable can be set to the following values: * "0" or "nearest" - Nearest pixel sampling * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D) * "2" or "best" - Anisotropic filtering (supported by Direct3D) * "2" or "best" - Currently this is the same as "linear" * * By default nearest pixel sampling is used */ #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY" /** * \brief A variable controlling whether updates to the SDL 1.2 screen surface should be synchronized with the vertical refresh, to avoid tearing. * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing. * * This variable can be set to the following values: * "0" - Disable vsync @@ -216,6 +216,20 @@ /** * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background. * * The variable can be set to the following values: * "0" - Disable joystick & gamecontroller input events when the * application is in the background. * "1" - Enable joystick & gamecontroller input events when the * application is in the backgroumd. * * The default value is "0". This hint may be set at any time. */ #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" /** * \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" * @@ -224,6 +238,23 @@ * "1" - allow topmost */ #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST" /** * \brief A variable that controls the timer resolution, in milliseconds. * * The higher resolution the timer, the more frequently the CPU services * timer interrupts, and the more precise delays are, but this takes up * power and CPU time. This hint is only used on Windows 7 and earlier. * * See this blog post for more information: * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/ * * If this variable is set to "0", the system timer resolution is not set. * * The default value is "1". This hint may be set at any time. */ #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION" @@ -259,7 +290,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, const char *value); /** * \brief Get a hint * @@ -268,6 +298,29 @@ extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name); /** * \brief Add a function to watch a particular hint * * \param name The hint to watch * \param callback The function to call when the hint value changes * \param userdata A pointer to pass to the callback function */ typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue); extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata); /** * \brief Remove a function watching a particular hint * * \param name The hint being watched * \param callback The function being called when the hint value changes * \param userdata A pointer being passed to the callback function */ extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata); /** * \brief Clear all hints * * This function is called during SDL_Quit() to free stored hints. osx/SDL2.framework/Versions/A/Headers/SDL_joystick.h
@@ -54,6 +54,10 @@ * 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 * for joysticks, and load appropriate drivers. * * If you would like to receive joystick updates while the application * is in the background, you should set the following hint before calling * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS */ /* The joystick structure used to identify an SDL joystick */ osx/SDL2.framework/Versions/A/Headers/SDL_keyboard.h
@@ -41,13 +41,15 @@ /** * \brief The SDL keysym structure, used in key events. * * \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event. */ typedef struct SDL_Keysym { SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */ SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */ Uint16 mod; /**< current key modifiers */ Uint32 unicode; /**< \deprecated use SDL_TextInputEvent instead */ Uint32 unused; } SDL_Keysym; /* Function prototypes */ @@ -66,13 +68,13 @@ * * \b Example: * \code * Uint8 *state = SDL_GetKeyboardState(NULL); * const Uint8 *state = SDL_GetKeyboardState(NULL); * if ( state[SDL_SCANCODE_RETURN] ) { * printf("<RETURN> is pressed.\n"); * } * \endcode */ extern DECLSPEC Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); /** * \brief Get the current key modifier state for the keyboard. osx/SDL2.framework/Versions/A/Headers/SDL_main.h
@@ -30,11 +30,33 @@ * Redefine main() on some platforms so that it is called by SDL. */ #if defined(__WIN32__) || defined(__IPHONEOS__) || defined(__ANDROID__) #ifndef SDL_MAIN_HANDLED #if defined(__WIN32__) /* On Windows SDL provides WinMain(), which parses the command line and passes the arguments to your main function. If you provide your own WinMain(), you may define SDL_MAIN_HANDLED */ #define SDL_MAIN_AVAILABLE #elif defined(__IPHONEOS__) /* On iOS SDL provides a main function that creates an application delegate and starts the iOS application run loop. See src/video/uikit/SDL_uikitappdelegate.m for more details. */ #define SDL_MAIN_NEEDED #elif defined(__ANDROID__) /* On Android SDL provides a Java class in SDLActivity.java that is the main activity entry point. See README-android.txt for more details on extending that class. */ #define SDL_MAIN_NEEDED #endif #endif #endif /* SDL_MAIN_HANDLED */ #ifdef __cplusplus #define C_LINKAGE "C" @@ -57,7 +79,7 @@ * \endcode */ #ifdef SDL_MAIN_NEEDED #if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) #define main SDL_main #endif @@ -72,6 +94,15 @@ extern "C" { #endif /** * This is called by the real SDL main function to let the rest of the * library know that initialization was done properly. * * Calling this yourself without knowing what you're doing can cause * crashes and hard to diagnose problems with your application. */ extern DECLSPEC void SDL_SetMainReady(void); #ifdef __WIN32__ /** osx/SDL2.framework/Versions/A/Headers/SDL_mutex.h
@@ -54,7 +54,7 @@ */ /*@{*/ /* The SDL mutex structure, defined in SDL_mutex.c */ /* The SDL mutex structure, defined in SDL_sysmutex.c */ struct SDL_mutex; typedef struct SDL_mutex SDL_mutex; @@ -102,7 +102,7 @@ */ /*@{*/ /* The SDL semaphore structure, defined in SDL_sem.c */ /* The SDL semaphore structure, defined in SDL_syssem.c */ struct SDL_semaphore; typedef struct SDL_semaphore SDL_sem; @@ -162,7 +162,7 @@ */ /*@{*/ /* The SDL condition variable structure, defined in SDL_cond.c */ /* The SDL condition variable structure, defined in SDL_syscond.c */ struct SDL_cond; typedef struct SDL_cond SDL_cond; osx/SDL2.framework/Versions/A/Headers/SDL_platform.h
@@ -83,6 +83,12 @@ /* if not compiling for iPhone */ #undef __MACOSX__ #define __MACOSX__ 1 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1050 # error SDL for Mac OS X only supports deploying on 10.5 and above. #endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */ #if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 # error SDL for Mac OS X must be built with a 10.6 SDK or above. #endif /* MAC_OS_X_VERSION_MAX_ALLOWED < 1060 */ #endif /* TARGET_OS_IPHONE */ #endif /* defined(__APPLE__) */ @@ -114,7 +120,7 @@ #undef __SOLARIS__ #define __SOLARIS__ 1 #endif #if defined(WIN32) || defined(_WIN32) #if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) #undef __WIN32__ #define __WIN32__ 1 #endif osx/SDL2.framework/Versions/A/Headers/SDL_render.h
@@ -37,9 +37,12 @@ * them, and may also be stretched with linear interpolation. * * This API is designed to accelerate simple 2D operations. You may * want more functionality such as rotation and particle effects and * want more functionality such as polygons and particle effects and * in that case you should use SDL's OpenGL/Direct3D support or one * of the many good 3D engines. * * These functions must be called from the main thread. * See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995 */ #ifndef _SDL_render_h osx/SDL2.framework/Versions/A/Headers/SDL_shape.h
@@ -55,7 +55,7 @@ * \param h The height of the window. * \param flags The flags for the window, a mask of SDL_WINDOW_BORDERLESS with any of the following: * ::SDL_WINDOW_OPENGL, ::SDL_WINDOW_INPUT_GRABBED, * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_RESIZABLE, * ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_RESIZABLE, * ::SDL_WINDOW_MAXIMIZED, ::SDL_WINDOW_MINIMIZED, * ::SDL_WINDOW_BORDERLESS is always set, and ::SDL_WINDOW_FULLSCREEN is always unset. * osx/SDL2.framework/Versions/A/Headers/SDL_stdinc.h
@@ -227,71 +227,17 @@ #define SDL_stack_free(data) SDL_free(data) #endif /* SDL stdinc inline functions: The theory here is that by default we forcibly inline what we can, and your app will use the inline version by default. However we expose a non-inline version too, so the symbol is always available in the library even if your app bypassed the inline version. The SDL_*_inline versions aren't guaranteed to exist, so never call them directly; use SDL_* instead, and trust the system to give you the right thing. The benefit here is that you can dlsym() these functions, which you couldn't if you had macros, you can link against a foreign build of SDL even if you configured differently, and you can drop the unconfigured SDL headers into a project without #defining HAVE_MALLOC (etc) and still link. */ extern DECLSPEC void *SDLCALL SDL_malloc(size_t size); #ifdef HAVE_MALLOC SDL_FORCE_INLINE void *SDL_malloc_inline(size_t size) { return malloc(size); } #define SDL_malloc SDL_malloc_inline #endif extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size); #ifdef HAVE_CALLOC SDL_FORCE_INLINE void *SDL_calloc_inline(size_t nmemb, size_t size) { return calloc(nmemb, size); } #define SDL_calloc SDL_calloc_inline #endif extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size); #ifdef HAVE_REALLOC SDL_FORCE_INLINE void *SDL_realloc_inline(void *mem, size_t size) { return realloc(mem, size); } #define SDL_realloc SDL_realloc_inline #endif extern DECLSPEC void SDLCALL SDL_free(void *mem); #ifdef HAVE_FREE SDL_FORCE_INLINE void SDL_free_inline(void *mem) { free(mem); } #define SDL_free SDL_free_inline #endif extern DECLSPEC char *SDLCALL SDL_getenv(const char *name); #ifdef HAVE_GETENV SDL_FORCE_INLINE char *SDL_getenv_inline(const char *name) { return getenv(name); } #define SDL_getenv SDL_getenv_inline #endif extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite); #ifdef HAVE_SETENV SDL_FORCE_INLINE int SDL_setenv_inline(const char *name, const char *value, int overwrite) { return setenv(name, value, overwrite); } #define SDL_setenv SDL_setenv_inline #endif extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)); #ifdef HAVE_QSORT SDL_FORCE_INLINE void SDL_qsort_inline(void *base, size_t nmemb, size_t size, int (*compare) (const void *, const void *)) { qsort(base, nmemb, size, compare); } #define SDL_qsort SDL_qsort_inline #endif extern DECLSPEC int SDLCALL SDL_abs(int x); #ifdef HAVE_ABS SDL_FORCE_INLINE int SDL_abs_inline(int x) { return abs(x); } #else SDL_FORCE_INLINE int SDL_abs_inline(int x) { return ((x) < 0 ? -(x) : (x)); } #endif #define SDL_abs SDL_abs_inline /* !!! FIXME: these have side effects. You probably shouldn't use them. */ /* !!! FIXME: Maybe we do forceinline functions of SDL_mini, SDL_minf, etc? */ @@ -302,33 +248,14 @@ extern DECLSPEC int SDLCALL SDL_isspace(int x); extern DECLSPEC int SDLCALL SDL_toupper(int x); extern DECLSPEC int SDLCALL SDL_tolower(int x); #ifdef HAVE_CTYPE_H SDL_FORCE_INLINE int SDL_isdigit_inline(int x) { return isdigit(x); } SDL_FORCE_INLINE int SDL_isspace_inline(int x) { return isspace(x); } SDL_FORCE_INLINE int SDL_toupper_inline(int x) { return toupper(x); } SDL_FORCE_INLINE int SDL_tolower_inline(int x) { return tolower(x); } #else SDL_FORCE_INLINE int SDL_isdigit_inline(int x) { return ((x) >= '0') && ((x) <= '9'); } SDL_FORCE_INLINE int SDL_isspace_inline(int x) { return ((x) == ' ') || ((x) == '\t') || ((x) == '\r') || ((x) == '\n'); } SDL_FORCE_INLINE int SDL_toupper_inline(int x) { return ((x) >= 'a') && ((x) <= 'z') ? ('A'+((x)-'a')) : (x); } SDL_FORCE_INLINE int SDL_tolower_inline(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) : (x); } #endif #define SDL_isdigit SDL_isdigit_inline #define SDL_isspace SDL_isspace_inline #define SDL_toupper SDL_toupper_inline #define SDL_tolower SDL_tolower_inline extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len); #ifdef HAVE_MEMSET SDL_FORCE_INLINE void *SDL_memset_inline(void *dst, int c, size_t len) { return memset(dst, c, len); } #define SDL_memset SDL_memset_inline #endif #define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x))) #define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x))) /* !!! FIXME: does this _really_ beat memset() on any modern platform? */ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t len) /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ SDL_FORCE_INLINE void SDL_memset4(void *dst, int val, size_t dwords) { #if defined(__GNUC__) && defined(i386) int u0, u1, u2; @@ -336,17 +263,16 @@ "cld \n\t" "rep ; stosl \n\t" : "=&D" (u0), "=&a" (u1), "=&c" (u2) : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, len)) : "0" (dst), "1" (val), "2" (SDL_static_cast(Uint32, dwords)) : "memory" ); /* !!! FIXME: amd64? */ #else size_t _n = (len + 3) / 4; size_t _n = (dwords + 3) / 4; Uint32 *_p = SDL_static_cast(Uint32 *, dst); Uint32 _val = (val); if (len == 0) if (dwords == 0) return; switch (len % 4) switch (dwords % 4) { case 0: do { *_p++ = _val; case 3: *_p++ = _val; @@ -359,305 +285,54 @@ extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len); #if defined(__MACOSX__) SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len) { /* We can count on memcpy existing on Mac OS X and being well-tuned. */ return memcpy(dst, src, len); } #define SDL_memcpy SDL_memcpy_inline #elif defined(__GNUC__) && defined(i386) && !defined(__WIN32__) SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len) { /* !!! FIXME: does this _really_ beat memcpy() on any modern platform? */ /* !!! FIXME: shouldn't we just force the inputs to ecx/edi/esi instead of this tapdance with outputs? */ /* !!! FIXME: amd64? */ int u0, u1, u2; __asm__ __volatile__ ( "cld \n\t" "rep ; movsl \n\t" "testb $2,%b4 \n\t" "je 1f \n\t" "movsw \n" "1:\ttestb $1,%b4 \n\t" "je 2f \n\t" "movsb \n" "2:" : "=&c" (u0), "=&D" (u1), "=&S" (u2) : "0" (SDL_static_cast(unsigned, len)/4), "q" (len), "1" (dst), "2" (src) : "memory" ); return dst; } #define SDL_memcpy SDL_memcpy_inline #elif defined(HAVE_MEMCPY) SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len) { return memcpy(dst, src, len); } #define SDL_memcpy SDL_memcpy_inline #elif defined(HAVE_BCOPY) /* !!! FIXME: is there _really_ ever a time where you have bcopy and not memcpy? */ SDL_FORCE_INLINE void *SDL_memcpy_inline(void *dst, const void *src, size_t len) { bcopy(src, dst, len); return dst; } #define SDL_memcpy SDL_memcpy_inline #endif SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords) { #if defined(__GNUC__) && defined(i386) /* !!! FIXME: does this _really_ beat memcpy() on any modern platform? */ /* !!! FIXME: shouldn't we just force the inputs to ecx/edi/esi instead of this tapdance with outputs? */ int ecx, edi, esi; __asm__ __volatile__ ( "cld \n\t" "rep ; movsl \n\t" : "=&c" (ecx), "=&D" (edi), "=&S" (esi) : "0" (SDL_static_cast(unsigned, dwords)), "1" (dst), "2" (src) : "memory" ); return dst; #else return SDL_memcpy(dst, src, dwords * 4); #endif } extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, size_t len); #ifdef HAVE_MEMMOVE SDL_FORCE_INLINE void *SDL_memmove_inline(void *dst, const void *src, size_t len) { return memmove(dst, src, len); } #define SDL_memmove SDL_memmove_inline #endif extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len); #ifdef HAVE_MEMCMP SDL_FORCE_INLINE int SDL_memcmp_inline(const void *s1, const void *s2, size_t len) { return memcmp(s1, s2, len); } #define SDL_memcmp SDL_memcmp_inline #endif extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str); #ifdef HAVE_STRLEN SDL_FORCE_INLINE size_t SDL_strlen_inline(const char *str) { return strlen(str); } #define SDL_strlen SDL_strlen_inline #endif extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr); #ifdef HAVE_WCSLEN SDL_FORCE_INLINE size_t SDL_wcslen_inline(const wchar_t *wstr) { return wcslen(wstr); } #define SDL_wcslen SDL_wcslen_inline #endif extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen); #ifdef HAVE_WCSLCPY SDL_FORCE_INLINE size_t SDL_wcslcpy_inline(wchar_t *dst, const wchar_t *src, size_t maxlen) { return wcslcpy(dst, src, maxlen); } #define SDL_wcslcpy SDL_wcslcpy_inline #endif extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen); #ifdef HAVE_WCSLCAT SDL_FORCE_INLINE size_t SDL_wcslcat_inline(wchar_t *dst, const wchar_t *src, size_t maxlen) { return wcslcat(dst, src, maxlen); } #define SDL_wcslcat SDL_wcslcat_inline #endif 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); #ifdef HAVE_STRLCPY SDL_FORCE_INLINE size_t SDL_strlcpy_inline(char *dst, const char *src, size_t maxlen) { return strlcpy(dst, src, maxlen); } #define SDL_strlcpy SDL_strlcpy_inline #else #endif extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes); extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen); #ifdef HAVE_STRLCAT SDL_FORCE_INLINE size_t SDL_strlcat_inline(char *dst, const char *src, size_t maxlen) { return strlcat(dst, src, maxlen); } #define SDL_strlcat SDL_strlcat_inline #endif extern DECLSPEC char *SDLCALL SDL_strdup(const char *str); #ifdef HAVE_STRDUP SDL_FORCE_INLINE char *SDL_strdup_inline(const char *str) { return strdup(str); } #define SDL_strdup SDL_strdup_inline #endif extern DECLSPEC char *SDLCALL SDL_strrev(char *str); #ifdef HAVE__STRREV SDL_FORCE_INLINE char *SDL_strrev_inline(char *str) { return _strrev(str); } #define SDL_strrev SDL_strrev_inline #endif extern DECLSPEC char *SDLCALL SDL_strupr(char *str); #ifdef HAVE__STRUPR SDL_FORCE_INLINE char *SDL_strupr_inline(char *str) { return _strupr(str); } #define SDL_strupr SDL_strupr_inline #endif extern DECLSPEC char *SDLCALL SDL_strlwr(char *str); #ifdef HAVE__STRLWR SDL_FORCE_INLINE char *SDL_strlwr_inline(char *str) { return _strlwr(str); } #define SDL_strlwr SDL_strlwr_inline #endif extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c); #ifdef HAVE_STRCHR SDL_FORCE_INLINE char *SDL_strchr_inline(const char *str, int c) { return SDL_const_cast(char*,strchr(str, c)); } #define SDL_strchr SDL_strchr_inline #elif defined(HAVE_INDEX) /* !!! FIXME: is there anywhere that has this but not strchr? */ SDL_FORCE_INLINE char *SDL_strchr_inline(const char *str, int c) { return SDL_const_cast(char*,index(str, c)); } #define SDL_strchr SDL_strchr_inline #endif extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c); #ifdef HAVE_STRRCHR SDL_FORCE_INLINE char *SDL_strrchr_inline(const char *str, int c) { return SDL_const_cast(char*,strrchr(str, c)); } #define SDL_strrchr SDL_strrchr_inline #elif defined(HAVE_RINDEX) /* !!! FIXME: is there anywhere that has this but not strrchr? */ SDL_FORCE_INLINE char *SDL_strrchr_inline(const char *str, int c) { return SDL_const_cast(char*,rindex(str, c)); } #define SDL_strrchr SDL_strrchr_inline #endif extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle); #ifdef HAVE_STRSTR SDL_FORCE_INLINE char *SDL_strstr_inline(const char *haystack, const char *needle) { return SDL_const_cast(char*,strstr(haystack, needle)); } #define SDL_strstr SDL_strstr_inline #endif extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix); #ifdef HAVE__LTOA SDL_FORCE_INLINE char *SDL_ltoa_inline(long value, char *str, int radix) { return _ltoa(value, str, radix); } #define SDL_ltoa SDL_ltoa_inline #endif extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix); #ifdef HAVE_ITOA SDL_FORCE_INLINE char *SDL_itoa_inline(int value, char *str, int radix) { return itoa(value, str, radix); } #else SDL_FORCE_INLINE char *SDL_itoa_inline(int value, char *str, int radix) { return SDL_ltoa((long)value, str, radix); } #endif #define SDL_itoa SDL_itoa_inline extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix); #ifdef HAVE__ULTOA SDL_FORCE_INLINE char *SDL_ultoa_inline(unsigned long value, char *str, int radix) { return _ultoa(value, str, radix); } #define SDL_ultoa SDL_ultoa_inline #endif extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix); #ifdef HAVE__UITOA SDL_FORCE_INLINE char *SDL_uitoa_inline(unsigned int value, char *str, int radix) { return _uitoa(value, str, radix); } #else SDL_FORCE_INLINE char *SDL_uitoa_inline(unsigned int value, char *str, int radix) { return SDL_ultoa((unsigned long)value, str, radix); } #endif #define SDL_uitoa SDL_uitoa_inline extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base); #ifdef HAVE_STRTOL SDL_FORCE_INLINE long SDL_strtol_inline(const char *str, char **endp, int base) { return strtol(str, endp, base); } #define SDL_strtol SDL_strtol_inline #endif extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base); #ifdef HAVE_STRTOUL SDL_FORCE_INLINE unsigned long SDLCALL SDL_strtoul_inline(const char *str, char **endp, int base) { return strtoul(str, endp, base); } #define SDL_strtoul SDL_strtoul_inline #endif extern DECLSPEC char *SDLCALL SDL_ltoa(long value, char *str, int radix); extern DECLSPEC char *SDLCALL SDL_ultoa(unsigned long value, char *str, int radix); extern DECLSPEC char *SDLCALL SDL_lltoa(Sint64 value, char *str, int radix); #ifdef HAVE__I64TOA SDL_FORCE_INLINE char *SDL_lltoa_inline(Sint64 value, char *str, int radix) { return _i64toa(value, str, radix); } #define SDL_lltoa SDL_lltoa_inline #endif extern DECLSPEC char *SDLCALL SDL_ulltoa(Uint64 value, char *str, int radix); #ifdef HAVE__UI64TOA SDL_FORCE_INLINE char *SDL_ulltoa_inline(Uint64 value, char *str, int radix) { return _ui64toa(value, str, radix); } #define SDL_ulltoa SDL_ulltoa_inline #endif extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base); #ifdef HAVE_STRTOLL SDL_FORCE_INLINE Sint64 SDL_strtoll_inline(const char *str, char **endp, int base) { return strtoll(str, endp, base); } #define SDL_strtoll SDL_strtoll_inline #endif extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base); #ifdef HAVE_STRTOULL SDL_FORCE_INLINE Uint64 SDL_strtoull_inline(const char *str, char **endp, int base) { return strtoull(str, endp, base); } #define SDL_strtoull SDL_strtoull_inline #endif extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp); #ifdef HAVE_STRTOD SDL_FORCE_INLINE double SDL_strtod_inline(const char *str, char **endp) { return strtod(str, endp); } #define SDL_strtod SDL_strtod_inline #endif extern DECLSPEC int SDLCALL SDL_atoi(const char *str); #ifdef HAVE_ATOI SDL_FORCE_INLINE int SDL_atoi_inline(const char *str) { return atoi(str); } #else SDL_FORCE_INLINE int SDL_atoi_inline(const char *str) { return SDL_strtol(str, NULL, 0); } #endif #define SDL_atoi SDL_atoi_inline extern DECLSPEC double SDLCALL SDL_atof(const char *str); #ifdef HAVE_ATOF SDL_FORCE_INLINE double SDL_atof_inline(const char *str) { return (double) atof(str); } #else SDL_FORCE_INLINE double SDL_atof_inline(const char *str) { return SDL_strtod(str, NULL); } #endif #define SDL_atof SDL_atof_inline extern DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int base); extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base); extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *str, char **endp, int base); extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *str, char **endp, int base); extern DECLSPEC double SDLCALL SDL_strtod(const char *str, char **endp); extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2); #ifdef HAVE_STRCMP SDL_FORCE_INLINE int SDL_strcmp_inline(const char *str1, const char *str2) { return strcmp(str1, str2); } #define SDL_strcmp SDL_strcmp_inline #endif extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen); #ifdef HAVE_STRNCMP SDL_FORCE_INLINE int SDL_strncmp_inline(const char *str1, const char *str2, size_t maxlen) { return strncmp(str1, str2, maxlen); } #define SDL_strncmp SDL_strncmp_inline #endif extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2); #ifdef HAVE_STRCASECMP SDL_FORCE_INLINE int SDL_strcasecmp_inline(const char *str1, const char *str2) { return strcasecmp(str1, str2); } #define SDL_strcasecmp SDL_strcasecmp_inline #elif defined(HAVE__STRICMP) SDL_FORCE_INLINE int SDL_strcasecmp_inline(const char *str1, const char *str2) { return _stricmp(str1, str2); } #define SDL_strcasecmp SDL_strcasecmp_inline #endif extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len); #ifdef HAVE_STRNCASECMP SDL_FORCE_INLINE int SDL_strncasecmp_inline(const char *str1, const char *str2, size_t len) { return strncasecmp(str1, str2, len); } #define SDL_strncasecmp SDL_strncasecmp_inline #elif defined(HAVE__STRNICMP) SDL_FORCE_INLINE int SDL_strncasecmp_inline(const char *str1, const char *str2, size_t len) { return _strnicmp(str1, str2, len); } #define SDL_strncasecmp SDL_strncasecmp_inline #endif /* Not doing SDL_*_inline functions for these, because of the varargs. */ extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...); #ifdef HAVE_SSCANF #define SDL_sscanf sscanf #endif extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...); #ifdef HAVE_SNPRINTF #define SDL_snprintf snprintf #endif extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap); #ifdef HAVE_VSNPRINTF SDL_FORCE_INLINE int SDL_vsnprintf_inline(char *text, size_t maxlen, const char *fmt, va_list ap) { return vsnprintf(text, maxlen, fmt, ap); } #define SDL_vsnprintf SDL_vsnprintf_inline #endif #ifndef HAVE_M_PI #ifndef M_PI @@ -666,94 +341,19 @@ #endif extern DECLSPEC double SDLCALL SDL_atan(double x); #ifdef HAVE_ATAN SDL_FORCE_INLINE double SDL_atan_inline(double x) { return atan(x); } #define SDL_atan SDL_atan_inline #endif extern DECLSPEC double SDLCALL SDL_atan2(double x, double y); #ifdef HAVE_ATAN2 SDL_FORCE_INLINE double SDL_atan2_inline(double x, double y) { return atan2(x, y); } #define SDL_atan2 SDL_atan2_inline #endif extern DECLSPEC double SDLCALL SDL_ceil(double x); #ifdef HAVE_CEIL SDL_FORCE_INLINE double SDL_ceil_inline(double x) { return ceil(x); } #else SDL_FORCE_INLINE double SDL_ceil_inline(double x) { return (double)(int)((x)+0.5); } #endif #define SDL_ceil SDL_ceil_inline extern DECLSPEC double SDLCALL SDL_copysign(double x, double y); #ifdef HAVE_COPYSIGN SDL_FORCE_INLINE double SDL_copysign_inline(double x, double y) { return copysign(x, y); } #define SDL_copysign SDL_copysign_inline #endif extern DECLSPEC double SDLCALL SDL_cos(double x); #ifdef HAVE_COS SDL_FORCE_INLINE double SDL_cos_inline(double x) { return cos(x); } #define SDL_cos SDL_cos_inline #endif extern DECLSPEC float SDLCALL SDL_cosf(float x); #ifdef HAVE_COSF SDL_FORCE_INLINE float SDL_cosf_inline(float x) { return cosf(x); } #else SDL_FORCE_INLINE float SDL_cosf_inline(float x) { return (float)SDL_cos((double)x); } #endif #define SDL_cosf SDL_cosf_inline extern DECLSPEC double SDLCALL SDL_fabs(double x); #ifdef HAVE_FABS SDL_FORCE_INLINE double SDL_fabs_inline(double x) { return fabs(x); } #define SDL_fabs SDL_fabs_inline #endif extern DECLSPEC double SDLCALL SDL_floor(double x); #ifdef HAVE_FLOOR SDL_FORCE_INLINE double SDL_floor_inline(double x) { return floor(x); } #define SDL_floor SDL_floor_inline #endif extern DECLSPEC double SDLCALL SDL_log(double x); #ifdef HAVE_LOG SDL_FORCE_INLINE double SDL_log_inline(double x) { return log(x); } #define SDL_log SDL_log_inline #endif extern DECLSPEC double SDLCALL SDL_pow(double x, double y); #ifdef HAVE_POW SDL_FORCE_INLINE double SDL_pow_inline(double x, double y) { return pow(x, y); } #define SDL_pow SDL_pow_inline #endif extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n); #ifdef HAVE_SCALBN SDL_FORCE_INLINE double SDL_scalbn_inline(double x, int n) { return scalbn(x, n); } #define SDL_scalbn SDL_scalbn_inline #endif extern DECLSPEC double SDLCALL SDL_sin(double x); #ifdef HAVE_SIN SDL_FORCE_INLINE double SDL_sin_inline(double x) { return sin(x); } #define SDL_sin SDL_sin_inline #endif extern DECLSPEC float SDLCALL SDL_sinf(float x); #ifdef HAVE_SINF SDL_FORCE_INLINE float SDL_sinf_inline(float x) { return sinf(x); } #else SDL_FORCE_INLINE float SDL_sinf_inline(float x) { return (float)SDL_sin((double)x); } #endif #define SDL_sinf SDL_sinf_inline extern DECLSPEC double SDLCALL SDL_sqrt(double x); #ifdef HAVE_SQRT SDL_FORCE_INLINE double SDL_sqrt_inline(double x) { return sqrt(x); } #define SDL_sqrt SDL_sqrt_inline #endif /* The SDL implementation of iconv() returns these error codes */ #define SDL_ICONV_ERROR (size_t)-1 osx/SDL2.framework/Versions/A/Headers/SDL_surface.h
@@ -22,7 +22,7 @@ /** * \file SDL_surface.h * * Header file for ::SDL_surface definition and management functions. * Header file for ::SDL_Surface definition and management functions. */ #ifndef _SDL_surface_h @@ -43,7 +43,7 @@ /** * \name Surface flags * * These are the currently supported flags for the ::SDL_surface. * These are the currently supported flags for the ::SDL_Surface. * * \internal * Used internally (read-only). @@ -399,44 +399,42 @@ * * The blit function should not be called on a locked surface. * * The blit semantics for surfaces with and without alpha and colorkey * The blit semantics for surfaces with and without blending and colorkey * are defined as follows: * \verbatim RGBA->RGB: SDL_SRCALPHA set: alpha-blend (using alpha-channel). Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source alpha-channel and per-surface alpha) SDL_SRCCOLORKEY ignored. SDL_SRCALPHA not set: Source surface blend mode set to SDL_BLENDMODE_NONE: copy RGB. if SDL_SRCCOLORKEY set, only copy the pixels matching the RGB values of the source color key, ignoring alpha in the comparison. RGB->RGBA: SDL_SRCALPHA set: alpha-blend (using the source per-surface alpha value); set destination alpha to opaque. SDL_SRCALPHA not set: Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source per-surface alpha) Source surface blend mode set to SDL_BLENDMODE_NONE: copy RGB, set destination alpha to source per-surface alpha value. both: if SDL_SRCCOLORKEY set, only copy the pixels matching the source color key. RGBA->RGBA: SDL_SRCALPHA set: alpha-blend (using the source alpha channel) the RGB values; leave destination alpha untouched. [Note: is this correct?] Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source alpha-channel and per-surface alpha) SDL_SRCCOLORKEY ignored. SDL_SRCALPHA not set: Source surface blend mode set to SDL_BLENDMODE_NONE: copy all of RGBA to the destination. if SDL_SRCCOLORKEY set, only copy the pixels matching the RGB values of the source color key, ignoring alpha in the comparison. comparison. RGB->RGB: SDL_SRCALPHA set: alpha-blend (using the source per-surface alpha value). SDL_SRCALPHA not set: Source surface blend mode set to SDL_BLENDMODE_BLEND: alpha-blend (using the source per-surface alpha) Source surface blend mode set to SDL_BLENDMODE_NONE: copy RGB. both: if SDL_SRCCOLORKEY set, only copy the pixels matching the osx/SDL2.framework/Versions/A/Headers/SDL_system.h
@@ -62,7 +62,7 @@ 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. It is the caller's responsibility to properly release it (using LocalReferenceHolder or manually with env->DeleteLocalRef) (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef) */ extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(); osx/SDL2.framework/Versions/A/Headers/SDL_syswm.h
@@ -82,7 +82,6 @@ #include <Cocoa/Cocoa.h> #else typedef struct _NSWindow NSWindow; typedef struct _NSView NSView; #endif #endif @@ -188,7 +187,6 @@ struct { NSWindow *window; /* The Cocoa window */ NSView *view; /* The Cocoa view */ } cocoa; #endif #if defined(SDL_VIDEO_DRIVER_UIKIT) @@ -221,7 +219,7 @@ * \code * SDL_SysWMinfo info; * SDL_VERSION(&info.version); * if ( SDL_GetWindowWMInfo(&info) ) { ... } * if ( SDL_GetWindowWMInfo(window, &info) ) { ... } * \endcode */ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window, osx/SDL2.framework/Versions/A/Headers/SDL_thread.h
@@ -32,6 +32,7 @@ #include "SDL_error.h" /* Thread synchronization primitives */ #include "SDL_atomic.h" #include "SDL_mutex.h" #include "begin_code.h" @@ -47,9 +48,13 @@ /* The SDL thread ID */ typedef unsigned long SDL_threadID; /* The SDL thread priority /* Thread local storage ID, 0 is the invalid ID */ typedef unsigned int SDL_TLSID; /** * The SDL thread priority. * * Note: On many systems you require special privileges to set high priority. * \note On many systems you require special privileges to set high priority. */ typedef enum { SDL_THREAD_PRIORITY_LOW, @@ -57,8 +62,9 @@ SDL_THREAD_PRIORITY_HIGH } SDL_ThreadPriority; /* The function passed to SDL_CreateThread() It is passed a void* user context parameter and returns an int. /** * The function passed to SDL_CreateThread(). * It is passed a void* user context parameter and returns an int. */ typedef int (SDLCALL * SDL_ThreadFunction) (void *data); @@ -105,7 +111,7 @@ /** * Create a thread. */ #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, _beginthreadex, _endthreadex) #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) #else @@ -166,6 +172,64 @@ */ extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status); /** * \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific. * * \return The newly created thread local storage identifier, or 0 on error * * \code * static SDL_SpinLock tls_lock; * static SDL_TLSID thread_local_storage; * * void SetMyThreadData(void *value) * { * if (!thread_local_storage) { * SDL_AtomicLock(&tls_lock); * if (!thread_local_storage) { * thread_local_storage = SDL_TLSCreate(); * } * SDL_AtomicUnLock(&tls_lock); * } * SDL_TLSSet(thread_local_storage, value); * } * * void *GetMyThreadData(void) * { * return SDL_TLSGet(thread_local_storage); * } * \endcode * * \sa SDL_TLSGet() * \sa SDL_TLSSet() */ extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void); /** * \brief Get the value associated with a thread local storage ID for the current thread. * * \param id The thread local storage ID * * \return The value associated with the ID for the current thread, or NULL if no value has been set. * * \sa SDL_TLSCreate() * \sa SDL_TLSSet() */ extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id); /** * \brief Set the value associated with a thread local storage ID for the current thread. * * \param id The thread local storage ID * \param value The value to associate with the ID for the current thread * \param destructor A function called when the thread exits, to free the value. * * \return 0 on success, -1 on error * * \sa SDL_TLSCreate() * \sa SDL_TLSGet() */ extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void*)); /* Ends C function definitions when using C++ */ #ifdef __cplusplus osx/SDL2.framework/Versions/A/Headers/SDL_video.h
@@ -193,7 +193,7 @@ { SDL_GL_CONTEXT_PROFILE_CORE = 0x0001, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002, SDL_GL_CONTEXT_PROFILE_ES = 0x0004 SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /* GLX_CONTEXT_ES2_PROFILE_BIT_EXT */ } SDL_GLprofile; typedef enum @@ -394,7 +394,7 @@ * \param h The height of the window. * \param flags The flags for the window, a mask of any of the following: * ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL, * ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_BORDERLESS, * ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS, * ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED, * ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED. * @@ -890,6 +890,16 @@ SDL_GLContext context); /** * \brief Get the currently active OpenGL window. */ extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void); /** * \brief Get the currently active OpenGL context. */ extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void); /** * \brief Set the swap interval for the current OpenGL context. * * \param interval 0 for immediate updates, 1 for updates synchronized with the osx/SDL2.framework/Versions/A/Headers/begin_code.h
@@ -35,13 +35,7 @@ /* Some compilers use a special export keyword */ #ifndef DECLSPEC # if defined(__BEOS__) || defined(__HAIKU__) # if defined(__GNUC__) # define DECLSPEC __declspec(dllexport) # else # define DECLSPEC __declspec(export) # endif # elif defined(__WIN32__) # if defined(__WIN32__) # ifdef __BORLANDC__ # ifdef BUILD_SDL # define DECLSPEC @@ -54,6 +48,8 @@ # else # if defined(__GNUC__) && __GNUC__ >= 4 # define DECLSPEC __attribute__ ((visibility("default"))) # elif defined(__GNUC__) && __GNUC__ >= 2 # define DECLSPEC __declspec(dllexport) # else # define DECLSPEC # endif osx/SDL2.framework/Versions/A/Resources/Info.plist
@@ -6,6 +6,8 @@ <string>10K549</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>SDL2</string> <key>CFBundleGetInfoString</key> <string>http://www.libsdl.org</string> <key>CFBundleIdentifier</key> osx/SDL2.framework/Versions/A/SDL2Binary files differ