echo $exec_prefix
;;
--version)
- echo 2.0.4
+ echo 2.0.5
;;
--cflags)
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
;;
-# --libs)
-# echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
-# ;;
-# --static-libs)
+# --libs)
+# echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
+# ;;
+# --static-libs)
--libs|--static-libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
;;
* specify the subsystems which you will be using in your application.
*/
/* @{ */
-#define SDL_INIT_TIMER 0x00000001
-#define SDL_INIT_AUDIO 0x00000010
-#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 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS 0x00004000
-#define SDL_INIT_NOPARACHUTE 0x00100000 /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER 0x00000001u
+#define SDL_INIT_AUDIO 0x00000010u
+#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC 0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS 0x00004000u
+#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
#define SDL_INIT_EVERYTHING ( \
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
* 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).
+ * 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.
*/
* protect data structures that it accesses by calling SDL_LockAudio()
* 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.
+ * more audio samples to be played (or for capture devices, call
+ * SDL_DequeueAudio() with some frequency, to obtain audio samples).
* - \c desired->userdata is passed as the first parameter to your callback
* function. If you passed a NULL callback, this value is ignored.
*
/**
* Queue more audio on non-callback devices.
*
+ * (If you are looking to retrieve queued audio from a non-callback capture
+ * device, you want SDL_DequeueAudio() instead. This will return -1 to
+ * signify an error if you use it with capture 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
*/
extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
+/**
+ * Dequeue more audio on non-callback devices.
+ *
+ * (If you are looking to queue audio for output on a non-callback playback
+ * device, you want SDL_QueueAudio() instead. This will always return 0
+ * if you use it with playback devices.)
+ *
+ * SDL offers two ways to retrieve audio from a capture device: you can
+ * either supply a callback that SDL triggers with some frequency as the
+ * device records more audio data, (push method), or you can supply no
+ * callback, and then SDL will expect you to retrieve data at regular
+ * intervals (pull method) with this function.
+ *
+ * There are no limits on the amount of data you can queue, short of
+ * exhaustion of address space. Data from the device will keep queuing as
+ * necessary without further intervention from you. This means you will
+ * eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ * Capture devices will not queue data when paused; if you are expecting
+ * to not need captured audio for some length of time, use
+ * SDL_PauseAudioDevice() to stop the capture device from queueing more
+ * data. This can be useful during, say, level loading times. When
+ * unpaused, capture devices will start queueing data from that point,
+ * having flushed any capturable data available while paused.
+ *
+ * This function is thread-safe, but dequeueing from the same device from
+ * two threads at once does not promise which thread will dequeued data
+ * first.
+ *
+ * You may not dequeue audio from a device that is using an
+ * application-supplied callback; doing so returns an error. You have to use
+ * the audio callback, or dequeue 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 from which we will dequeue audio.
+ * \param data A pointer into where audio data should be copied.
+ * \param len The number of bytes (not samples!) to which (data) points.
+ * \return number of bytes dequeued, which could be less than requested.
+ *
+ * \sa SDL_GetQueuedAudioSize
+ * \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, 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.
+ * For playback device:
+ *
+ * This is the number of bytes that have been queued for playback with
+ * SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ * number may shrink at any time, so this only informs of pending data.
+ *
+ * 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.
+ *
+ * For capture devices:
*
- * 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.
+ * This is the number of bytes that have been captured by the device and
+ * are waiting for you to dequeue. This number may grow at any time, so
+ * this only informs of the lower-bound of available data.
*
* 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 have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before querying; SDL
* handles locking internally for this function.
extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
/**
- * Drop any queued audio data waiting to be sent to the hardware.
+ * Drop any queued audio data. For playback devices, this is any queued data
+ * still waiting to be submitted to the hardware. For capture devices, this
+ * is any data that was queued by the device that hasn't yet been dequeued by
+ * the application.
*
- * Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- * the hardware will start playing silence if more audio isn't queued.
+ * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ * playback devices, the hardware will start playing silence if more audio
+ * isn't queued. Unpaused capture devices will start filling the queue again
+ * as soon as they have more data available (which, depending on the state
+ * of the hardware and the thread, could be before this function call
+ * returns!).
*
* 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
*
* 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 have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before clearing the
* queue; SDL handles locking internally for this function.
+/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */
/*
Simple DirectMedia Layer
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
3. This notice may not be removed or altered from any source distribution.
*/
-#ifndef _SDL_config_windows_h
-#define _SDL_config_windows_h
+#ifndef _SDL_config_h
+#define _SDL_config_h
+/**
+ * \file SDL_config.h.in
+ *
+ * This is a set of defines to configure the SDL features
+ */
+
+/* General platform specific identifiers */
#include "SDL_platform.h"
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H 1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
+/* Make sure that this isn't included by Visual C++ */
+#ifdef _MSC_VER
+#error You should run hg revert SDL_config.h
#endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
-#ifdef _WIN64
-# define SIZEOF_VOIDP 8
+/* C language features */
+/* #undef const */
+/* #undef inline */
+/* #undef volatile */
+
+/* C datatypes */
+#ifdef __LP64__
+#define SIZEOF_VOIDP 8
#else
-# define SIZEOF_VOIDP 4
+#define SIZEOF_VOIDP 4
#endif
+#define HAVE_GCC_ATOMICS 1
+/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
#define HAVE_DDRAW_H 1
#define HAVE_DINPUT_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 */
-#ifdef HAVE_LIBC
+/* Comment this if you want to build without any C library requirements */
+#define HAVE_LIBC 1
+#if HAVE_LIBC
+
/* Useful headers */
+/* #undef HAVE_ALLOCA_H */
+#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
+/* #undef HAVE_ICONV_H */
#define HAVE_SIGNAL_H 1
+/* #undef HAVE_ALTIVEC_H */
+/* #undef HAVE_PTHREAD_NP_H */
+/* #undef HAVE_LIBUDEV_H */
+/* #undef HAVE_DBUS_DBUS_H */
+/* #undef HAVE_IBUS_IBUS_H */
+/* #undef HAVE_FCITX_FRONTEND_H */
/* C library functions */
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
+/* #undef HAVE_ALLOCA */
+#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
+#define HAVE_GETENV 1
+/* #undef HAVE_SETENV */
+#define HAVE_PUTENV 1
+/* #undef HAVE_UNSETENV */
+#endif
#define HAVE_QSORT 1
#define HAVE_ABS 1
+/* #undef HAVE_BCOPY */
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
+/* #undef HAVE_STRLCPY */
+/* #undef HAVE_STRLCAT */
+#define HAVE_STRDUP 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
#define HAVE__STRLWR 1
+/* #undef HAVE_INDEX */
+/* #undef HAVE_RINDEX */
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
#define HAVE__LTOA 1
+/* #undef HAVE__UITOA */
#define HAVE__ULTOA 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
+#define HAVE__I64TOA 1
+#define HAVE__UI64TOA 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE__STRICMP 1
+#define HAVE_STRCASECMP 1
#define HAVE__STRNICMP 1
+#define HAVE_STRNCASECMP 1
+/* #undef HAVE_SSCANF */
+#define HAVE_VSSCANF 1
+/* #undef HAVE_SNPRINTF */
+#define HAVE_VSNPRINTF 1
+#define HAVE_M_PI /**/
#define HAVE_ATAN 1
#define HAVE_ATAN2 1
-#define HAVE_ACOS 1
-#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ASIN 1
#define HAVE_CEIL 1
+#define HAVE_COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_LOG 1
#define HAVE_POW 1
+#define HAVE_SCALBN 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_SCALBN 1
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
+#define HAVE_FSEEKO 1
+#define HAVE_FSEEKO64 1
+/* #undef HAVE_SIGACTION */
+/* #undef HAVE_SA_SIGACTION */
+/* #undef HAVE_SETJMP */
+#define HAVE_NANOSLEEP 1
+/* #undef HAVE_SYSCONF */
+/* #undef HAVE_SYSCTLBYNAME */
+/* #undef HAVE_CLOCK_GETTIME */
+/* #undef HAVE_GETPAGESIZE */
+/* #undef HAVE_MPROTECT */
+/* #undef HAVE_ICONV */
+/* #undef HAVE_PTHREAD_SETNAME_NP */
+/* #undef HAVE_PTHREAD_SET_NAME_NP */
+/* #undef HAVE_SEM_TIMEDWAIT */
+
#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#endif
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_STDINT_H 1
+#endif /* HAVE_LIBC */
+
+/* SDL internal assertion support */
+/* #undef SDL_DEFAULT_ASSERT_LEVEL */
+
+/* Allow disabling of core subsystems */
+/* #undef SDL_ATOMIC_DISABLED */
+/* #undef SDL_AUDIO_DISABLED */
+/* #undef SDL_CPUINFO_DISABLED */
+/* #undef SDL_EVENTS_DISABLED */
+/* #undef SDL_FILE_DISABLED */
+/* #undef SDL_JOYSTICK_DISABLED */
+/* #undef SDL_HAPTIC_DISABLED */
+/* #undef SDL_LOADSO_DISABLED */
+/* #undef SDL_RENDER_DISABLED */
+/* #undef SDL_THREADS_DISABLED */
+/* #undef SDL_TIMERS_DISABLED */
+/* #undef SDL_VIDEO_DISABLED */
+/* #undef SDL_POWER_DISABLED */
+/* #undef SDL_FILESYSTEM_DISABLED */
/* Enable various audio drivers */
+/* #undef SDL_AUDIO_DRIVER_ALSA */
+/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_ARTS */
+/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_HAIKU */
+/* #undef SDL_AUDIO_DRIVER_BSD */
+/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+/* #undef SDL_AUDIO_DRIVER_ANDROID */
+/* #undef SDL_AUDIO_DRIVER_XAUDIO2 */
#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_XAUDIO2 1
-#define SDL_AUDIO_DRIVER_WINMM 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
+/* #undef SDL_AUDIO_DRIVER_ESD */
+/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_NACL */
+/* #undef SDL_AUDIO_DRIVER_NAS */
+/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_SNDIO */
+/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_OSS */
+/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
+/* #undef SDL_AUDIO_DRIVER_PAUDIO */
+/* #undef SDL_AUDIO_DRIVER_QSA */
+/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
+#define SDL_AUDIO_DRIVER_WINMM 1
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
/* Enable various input drivers */
+/* #undef SDL_INPUT_LINUXEV */
+/* #undef SDL_INPUT_LINUXKD */
+/* #undef SDL_INPUT_TSLIB */
+/* #undef SDL_JOYSTICK_HAIKU */
#define SDL_JOYSTICK_DINPUT 1
#define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT 1
-#define SDL_HAPTIC_XINPUT 1
+/* #undef SDL_JOYSTICK_DUMMY */
+/* #undef SDL_JOYSTICK_IOKIT */
+/* #undef SDL_JOYSTICK_LINUX */
+/* #undef SDL_JOYSTICK_ANDROID */
+/* #undef SDL_JOYSTICK_WINMM */
+/* #undef SDL_JOYSTICK_USBHID */
+/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
+/* #undef SDL_JOYSTICK_EMSCRIPTEN */
+/* #undef SDL_HAPTIC_DUMMY */
+/* #undef SDL_HAPTIC_LINUX */
+/* #undef SDL_HAPTIC_IOKIT */
+#define SDL_HAPTIC_DINPUT 1
+#define SDL_HAPTIC_XINPUT 1
/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS 1
+/* #undef SDL_LOADSO_HAIKU */
+/* #undef SDL_LOADSO_DLOPEN */
+/* #undef SDL_LOADSO_DUMMY */
+/* #undef SDL_LOADSO_LDG */
+#define SDL_LOADSO_WINDOWS 1
/* Enable various threading systems */
-#define SDL_THREAD_WINDOWS 1
+/* #undef SDL_THREAD_PTHREAD */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
+#define SDL_THREAD_WINDOWS 1
/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS 1
+/* #undef SDL_TIMER_HAIKU */
+/* #undef SDL_TIMER_DUMMY */
+/* #undef SDL_TIMER_UNIX */
+#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
+/* #undef SDL_VIDEO_DRIVER_HAIKU */
+/* #undef SDL_VIDEO_DRIVER_COCOA */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDOWS 1
+/* #undef SDL_VIDEO_DRIVER_WAYLAND */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_MIR */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_X11 */
+/* #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_XEXT */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_XDBE */
+/* #undef SDL_VIDEO_DRIVER_X11_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
+/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
+/* #undef SDL_VIDEO_DRIVER_X11_XSHAPE */
+/* #undef SDL_VIDEO_DRIVER_X11_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
+/* #undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY */
+/* #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM */
+/* #undef SDL_VIDEO_DRIVER_NACL */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 1
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
+#define SDL_VIDEO_RENDER_D3D 1
+/* #undef SDL_VIDEO_RENDER_D3D11 */
+#define SDL_VIDEO_RENDER_OGL 1
+/* #undef SDL_VIDEO_RENDER_OGL_ES */
+/* #undef SDL_VIDEO_RENDER_OGL_ES2 */
+/* #undef SDL_VIDEO_RENDER_DIRECTFB */
/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 1
-#endif
-
+#define SDL_VIDEO_OPENGL 1
+/* #undef SDL_VIDEO_OPENGL_ES */
+/* #undef SDL_VIDEO_OPENGL_ES2 */
+/* #undef SDL_VIDEO_OPENGL_BGL */
+/* #undef SDL_VIDEO_OPENGL_CGL */
+/* #undef SDL_VIDEO_OPENGL_EGL */
+/* #undef SDL_VIDEO_OPENGL_GLX */
+#define SDL_VIDEO_OPENGL_WGL 1
+/* #undef SDL_VIDEO_OPENGL_OSMESA */
+/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
/* Enable system power support */
+/* #undef SDL_POWER_LINUX */
#define SDL_POWER_WINDOWS 1
+/* #undef SDL_POWER_MACOSX */
+/* #undef SDL_POWER_HAIKU */
+/* #undef SDL_POWER_ANDROID */
+/* #undef SDL_POWER_EMSCRIPTEN */
+/* #undef SDL_POWER_HARDWIRED */
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS 1
+/* Enable system filesystem support */
+/* #undef SDL_FILESYSTEM_HAIKU */
+/* #undef SDL_FILESYSTEM_COCOA */
+/* #undef SDL_FILESYSTEM_DUMMY */
+/* #undef SDL_FILESYSTEM_UNIX */
+#define SDL_FILESYSTEM_WINDOWS 1
+/* #undef SDL_FILESYSTEM_NACL */
+/* #undef SDL_FILESYSTEM_ANDROID */
+/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES 1
-#endif
+/* Enable assembly routines */
+#define SDL_ASSEMBLY_ROUTINES 1
+/* #undef SDL_ALTIVEC_BLITTERS */
+
+/* Enable ime support */
+/* #undef SDL_USE_IME */
-#endif /* _SDL_config_windows_h */
+#endif /* _SDL_config_h */
/* Drag and drop events */
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
+ SDL_DROPTEXT, /**< text/plain drag-and-drop event */
+ SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
+ SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
/* Audio hotplug events */
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
*/
typedef struct SDL_DropEvent
{
- Uint32 type; /**< ::SDL_DROPFILE */
+ Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
Uint32 timestamp;
- char *file; /**< The file name, which should be freed with SDL_free() */
+ char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+ Uint32 windowID; /**< The window that was dropped on, if any */
} SDL_DropEvent;
* }
* }
*
- * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
* guid,name,mappings
*
* Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
/**
* Get a mapping string for a GUID
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
/**
* Get a mapping string for an open GameController
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_CONSTANT (1<<0)
+#define SDL_HAPTIC_CONSTANT (1u<<0)
/**
* \brief Sine wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SINE (1<<1)
+#define SDL_HAPTIC_SINE (1u<<1)
/**
* \brief Left/Right effect supported.
* \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_LEFTRIGHT (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT (1u<<2)
/* !!! FIXME: put this back when we have more bits in 2.1 */
/* #define SDL_HAPTIC_SQUARE (1<<2) */
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_TRIANGLE (1<<3)
+#define SDL_HAPTIC_TRIANGLE (1u<<3)
/**
* \brief Sawtoothup wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
/**
* \brief Sawtoothdown wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
/**
* \brief Ramp effect supported.
*
* \sa SDL_HapticRamp
*/
-#define SDL_HAPTIC_RAMP (1<<6)
+#define SDL_HAPTIC_RAMP (1u<<6)
/**
* \brief Spring effect supported - uses axes position.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_SPRING (1<<7)
+#define SDL_HAPTIC_SPRING (1u<<7)
/**
* \brief Damper effect supported - uses axes velocity.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_DAMPER (1<<8)
+#define SDL_HAPTIC_DAMPER (1u<<8)
/**
* \brief Inertia effect supported - uses axes acceleration.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_INERTIA (1<<9)
+#define SDL_HAPTIC_INERTIA (1u<<9)
/**
* \brief Friction effect supported - uses axes movement.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_FRICTION (1<<10)
+#define SDL_HAPTIC_FRICTION (1u<<10)
/**
* \brief Custom effect is supported.
*
* User defined custom haptic effect.
*/
-#define SDL_HAPTIC_CUSTOM (1<<11)
+#define SDL_HAPTIC_CUSTOM (1u<<11)
/* @} *//* Haptic effects */
*
* \sa SDL_HapticSetGain
*/
-#define SDL_HAPTIC_GAIN (1<<12)
+#define SDL_HAPTIC_GAIN (1u<<12)
/**
* \brief Device can set autocenter.
*
* \sa SDL_HapticSetAutocenter
*/
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
/**
* \brief Device can be queried for effect status.
*
* \sa SDL_HapticGetEffectStatus
*/
-#define SDL_HAPTIC_STATUS (1<<14)
+#define SDL_HAPTIC_STATUS (1u<<14)
/**
* \brief Device can be paused.
* \sa SDL_HapticPause
* \sa SDL_HapticUnpause
*/
-#define SDL_HAPTIC_PAUSE (1<<15)
+#define SDL_HAPTIC_PAUSE (1u<<15)
/**
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
-* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-* This variable can be set to the following values:
-* "0" - Relative mouse mode uses raw input
-* "1" - Relative mouse mode uses mouse warping
-*
-* By default SDL will use raw input for relative mouse mode
-*/
+ * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ * This variable can be set to the following values:
+ * "0" - Relative mouse mode uses raw input
+ * "1" - Relative mouse mode uses mouse warping
+ *
+ * By default SDL will use raw input for relative mouse mode
+ */
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
+/**
+ * \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ * This variable can be set to the following values:
+ * "0" - Ignore mouse clicks that activate a window
+ * "1" - Generate events for mouse clicks that activate a window
+ *
+ * By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
/**
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
*
* this is problematic. This functionality can be disabled by setting this
* 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.
+ * 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:
* "0" - Enable idle timer
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
*/
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-
+
+/**
+ * \brief A variable controlling whether controllers used with the Apple TV
+ * generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ * This variable can be set to the following values:
+ * "0" - Controller input does not generate UI events (the default).
+ * "1" - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief A variable controlling whether the Apple TV remote's joystick axes
+ * will automatically match the rotation of the remote.
+ *
+ * This variable can be set to the following values:
+ * "0" - Remote orientation does not affect joystick axes (the default).
+ * "1" - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
/**
* \brief A variable controlling whether the Android / iOS built-in
* accelerometer should be listed as a joystick device, rather than listing
* 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.
+* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
*/
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
* privacy policy.
*
* To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- * before calling any SDL_Init functions. The contents of the hint should
+ * before calling any SDL_Init() functions. The contents of the hint should
* be a valid URL. For example, "http://www.example.com".
*
* The default value is "", which will prevent SDL from adding a privacy policy
* The contents of this hint should be encoded as a UTF8 string.
*
* The default value is "Privacy Policy". This hint should only be set during app
- * initialization, preferably before any calls to SDL_Init.
+ * initialization, preferably before any calls to SDL_Init().
*
* For additional information on linking to a privacy policy, see the documentation for
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
*/
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
+/**
+ * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ * "0" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file with an alpha mask. SDL will use the bitmap
+ * header version 4 and set the alpha mask accordingly.
+ * "1" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file without an alpha mask. The alpha channel data
+ * will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ * "0" - SDL will raise the 0x406D1388 Exception to name threads.
+ * This is the default behavior of SDL <= 2.0.4. (default)
+ * "1" - SDL will not raise this exception, and threads will be unnamed.
+ * For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
+
/**
* \brief An enumeration of hint priorities
*/
*/
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
+/**
+ * \brief Get a hint
+ *
+ * \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
/**
* \brief Add a function to watch a particular hint
*
*
* Include file for SDL joystick event handling
*
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
* behind a device_index changing as joysticks are plugged and unplugged.
*
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
* copy it. If the key doesn't have a name, this function returns an
* empty string ("").
*
- * \sa SDL_Key
+ * \sa SDL_Keycode
*/
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
/* 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.
+ See README-android.md for more details on extending that class.
*/
#define SDL_MAIN_NEEDED
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
/**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
*/
typedef enum
{
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
/**
- * \brief Frees a cursor created with SDL_CreateCursor().
+ * \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
*
* \sa SDL_CreateCursor()
+ * \sa SDL_CreateColorCursor()
+ * \sa SDL_CreateSystemCursor()
*/
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
*
* This is a simple file to encapsulate the OpenGL ES 1.X API headers.
*/
+#include "SDL_config.h"
#ifdef __IPHONEOS__
#include <OpenGLES/ES1/gl.h>
*
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
*/
+#include "SDL_config.h"
+
#ifndef _MSC_VER
#ifdef __IPHONEOS__
#define _SDL_pixels_h
#include "SDL_stdinc.h"
+#include "SDL_endian.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
SDL_PACKEDLAYOUT_2101010, 32, 4),
+ /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
/* lets us know what version of Mac OS X we're compiling on */
#include "AvailabilityMacros.h"
#include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
#if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
#undef __IPHONEOS__
#define __IPHONEOS__ 1
#undef __MACOSX__
#else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
#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_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
#endif /* TARGET_OS_IPHONE */
#endif /* defined(__APPLE__) */
*/
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
+/**
+ * \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ * \param renderer The renderer for which integer scaling should be set.
+ * \param enable Enable or disable integer scaling
+ *
+ * This function restricts the logical viewport to integer values - that is, when
+ * a resolution is between two multiples of a logical size, the viewport size is
+ * rounded down to the lower multiple.
+ *
+ * \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+ SDL_bool enable);
+
+/**
+ * \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ * \param renderer The renderer from which integer scaling should be queried.
+ *
+ * \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
/**
* \brief Set the drawing area for rendering on the current target.
*
/**
* \brief Clear the current rendering target with the drawing color
*
- * This function clears the entire rendering target, ignoring the viewport.
+ * This function clears the entire rendering target, ignoring the viewport and
+ * the clip rectangle.
*
* \return 0 on success, or -1 on error
*/
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
#endif
/* RWops Types */
-#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
-#define SDL_RWOPS_WINFILE 1 /* Win32 file */
-#define SDL_RWOPS_STDFILE 2 /* Stdio file */
-#define SDL_RWOPS_JNIFILE 3 /* Android asset */
-#define SDL_RWOPS_MEMORY 4 /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN 0U /* Unknown stream type */
+#define SDL_RWOPS_WINFILE 1U /* Win32 file */
+#define SDL_RWOPS_STDFILE 2U /* Stdio file */
+#define SDL_RWOPS_JNIFILE 3U /* Android asset */
+#define SDL_RWOPS_MEMORY 4U /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U /* Read-Only memory stream */
/**
* This is the read/write operation structure -- very basic.
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
/**
* The number of elements in an array.
#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
#define SDL_TABLESIZE(table) SDL_arraysize(table)
+/**
+ * Macro useful for building other macros with strings in them
+ *
+ * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg) #arg
+
/**
* \name Cast operators
*
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
(Uint32 flags, int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+ (Uint32 flags, int width, int height, int depth, Uint32 format);
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
int width,
int height,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+ (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
/**
/**
* Save a surface to a seekable SDL data stream (memory or file).
*
+ * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ * BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ * not supported.
+ *
* If \c freedst is non-zero, the stream will be closed after being written.
*
* \return 0 if successful or -1 if there was an error.
typedef void *EGLSurface;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
/**
* These are the various supported windowing subsystems
*/
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_WINRT,
- SDL_SYSWM_ANDROID
+ SDL_SYSWM_ANDROID,
+ SDL_SYSWM_VIVANTE
} SDL_SYSWM_TYPE;
/**
int dummy;
/* No UIKit window events yet */
} uikit;
+#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ int dummy;
+ /* No Vivante window events yet */
+ } vivante;
#endif
/* Can't have an empty union */
int dummy;
} android;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ EGLNativeDisplayType display;
+ EGLNativeWindowType window;
+ } vivante;
+#endif
+
/* Can't have an empty union */
int dummy;
} info;
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 0
-#define SDL_PATCHLEVEL 4
+#define SDL_PATCHLEVEL 5
/**
* \brief Macro to determine SDL version program was compiled against.
* \sa SDL_SetWindowPosition()
* \sa SDL_SetWindowSize()
* \sa SDL_SetWindowBordered()
+ * \sa SDL_SetWindowResizable()
* \sa SDL_SetWindowTitle()
* \sa SDL_ShowWindow()
*/
*/
typedef enum
{
+ /* !!! FIXME: change this to name = (1<<x). */
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
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_MOUSE_CAPTURE = 0x00004000 /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
+ SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
+ SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
+ SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
+ SDL_WINDOW_POPUP_MENU = 0x00080000 /**< window should be treated as a popup menu */
} SDL_WindowFlags;
/**
* \brief Used to indicate that you don't care what the window position is.
*/
-#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
/**
* \brief Used to indicate that the window position should be centered.
*/
-#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X) \
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
- SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the
- window be closed */
+ SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
+ SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+ SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
} SDL_WindowEventID;
/**
*/
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
+/**
+ * \brief Get the usable desktop area represented by a display, with the
+ * primary display located at 0,0
+ *
+ * This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ * reserved by the system removed. For example, on Mac OS X, this subtracts
+ * the area occupied by the menu bar and dock.
+ *
+ * Setting a window to be fullscreen generally bypasses these unusable areas,
+ * so these are good guidelines for the maximum space available to a
+ * non-fullscreen window.
+ *
+ * \return 0 on success, or -1 if the index is out of range.
+ *
+ * \sa SDL_GetDisplayBounds()
+ * \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
/**
* \brief Returns the number of available display modes.
*
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED,
* ::SDL_WINDOW_ALLOW_HIGHDPI.
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL 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
*
* \param data A pointer to driver-dependent window creation data
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL if window creation failed.
*
* \sa SDL_DestroyWindow()
*/
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
int *h);
+/**
+ * \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ * \param window The window to query.
+ * \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ * \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ * \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ * \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ * \return 0 on success, or -1 if getting this information is not supported.
+ *
+ * \note if this function fails (returns -1), the size values will be
+ * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ * if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+ int *top, int *left,
+ int *bottom, int *right);
+
/**
* \brief Set the minimum size of a window's client area.
*
extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
SDL_bool bordered);
+/**
+ * \brief Set the user-resizable state of a window.
+ *
+ * This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ * allow/disallow user resizing of the window. This is a no-op if the
+ * window's resizable state already matches the requested state.
+ *
+ * \param window The window of which to change the resizable state.
+ * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ * \note You can't change the resizable state of a fullscreen window.
+ *
+ * \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+ SDL_bool resizable);
+
/**
* \brief Show a window.
*
* \return 0 on success, or -1 on error.
*
* \sa SDL_GetWindowSurface()
- * \sa SDL_UpdateWindowSurfaceRect()
+ * \sa SDL_UpdateWindowSurface()
*/
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
const SDL_Rect * rects,
*/
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
+/**
+ * \brief Set the opacity for a window
+ *
+ * \param window The window which will be made transparent or opaque
+ * \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ * clamped internally between 0.0f and 1.0f.
+ *
+ * \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ * \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ * \brief Get the opacity of a window.
+ *
+ * If transparency isn't supported on this platform, opacity will be reported
+ * as 1.0f without error.
+ *
+ * \param window The window in question.
+ * \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ * \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ * \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ * \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ * \param modal_window The window that should be modal
+ * \param parent_window The parent window
+ *
+ * \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ * \brief Explicitly sets input focus to the window.
+ *
+ * You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ * this with caution, as you might give focus to a window that's completely
+ * obscured by other windows.
+ *
+ * \param window The window that should get the input focus
+ *
+ * \return 0 on success, or -1 otherwise.
+ * \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
/**
* \brief Set the gamma ramp for a window.
*
/**
- * \brief Returns whether the screensaver is currently enabled (default on).
+ * \brief Returns whether the screensaver is currently enabled (default off).
*
* \sa SDL_EnableScreenSaver()
* \sa SDL_DisableScreenSaver()
# sdl2 cmake project-config input for ./configure scripts
-set(prefix "/usr/local/cross-tools/i686-w64-mingw32")
+set(prefix "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32")
set(exec_prefix "${prefix}")
set(libdir "${exec_prefix}/lib")
-set(SDL2_PREFIX "/usr/local/cross-tools/i686-w64-mingw32")
-set(SDL2_EXEC_PREFIX "/usr/local/cross-tools/i686-w64-mingw32")
+set(SDL2_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32")
+set(SDL2_EXEC_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32")
set(SDL2_LIBDIR "${exec_prefix}/lib")
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} -lmingw32 -lSDL2main -lSDL2 -mwindows")
+string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
# It is necessary for linking the library.
# The name that we can dlopen(3).
-dlname='../bin/SDL2.dll'
+dlname=''
# Names of this library.
-library_names='libSDL2.dll.a'
+library_names=''
# The name of the static archive.
old_library='libSDL2.a'
# Version information for libSDL2.
current=4
age=4
-revision=0
+revision=1
# Is this an already installed library?
installed=yes
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/Users/slouken/release/SDL/SDL2-2.0.4/i686-w64-mingw32/lib'
+libdir='/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32/lib'
# sdl pkg-config source file
-prefix=/usr/local/cross-tools/i686-w64-mingw32
+prefix=/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../32
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: sdl2
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
-Version: 2.0.4
+Version: 2.0.5
Requires:
Conflicts:
Libs: -L${libdir} -lmingw32 -lSDL2main -lSDL2 -mwindows
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
+#
+# Changelog:
+# * also look for SDL2.framework under Mac OS X
# serial 1
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
+AC_ARG_ENABLE(sdlframework, [ --disable-sdlframework Do not search for SDL2.framework],
+ , search_sdl_framework=yes)
+
+AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
min_sdl_version=ifelse([$1], ,2.0.0,$1)
fi
AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
PATH="$as_save_PATH"
- AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
- if test "$SDL2_CONFIG" = "no" ; then
- no_sdl=yes
- else
- SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
- SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+ if test "$SDL2_CONFIG" = "no" -a "x$search_sdl_framework" = "xyes"; then
+ AC_MSG_CHECKING(for SDL2.framework)
+ if test "x$SDL2_FRAMEWORK" != x; then
+ sdl_framework=$SDL2_FRAMEWORK
+ else
+ for d in / ~/ /System/; do
+ if test -d "$dLibrary/Frameworks/SDL2.framework"; then
+ sdl_framework="$dLibrary/Frameworks/SDL2.framework"
+ fi
+ done
+ fi
+
+ if test -d $sdl_framework; then
+ AC_MSG_RESULT($sdl_framework)
+ sdl_framework_dir=`dirname $sdl_framework`
+ SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
+ SDL_LIBS="-F$sdl_framework_dir -Wl,-framework,SDL2"
+ else
+ no_sdl=yes
+ fi
+ fi
+
+ if test "$SDL2_CONFIG" != "no"; then
+ if test "x$sdl_pc" = "xno"; then
+ AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+ SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+ SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+ fi
sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
+
+ fi
+ if test "x$sdl_pc" = "xno"; then
+ if test "x$no_sdl" = "xyes"; then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ fi
fi
- fi
- if test "x$no_sdl" = x ; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
fi
fi
if test "x$no_sdl" = x ; then
echo $exec_prefix
;;
--version)
- echo 2.0.4
+ echo 2.0.5
;;
--cflags)
echo -I${prefix}/include/SDL2 -Dmain=SDL_main
;;
-# --libs)
-# echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
-# ;;
-# --static-libs)
+# --libs)
+# echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows
+# ;;
+# --static-libs)
--libs|--static-libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -static-libgcc
;;
* specify the subsystems which you will be using in your application.
*/
/* @{ */
-#define SDL_INIT_TIMER 0x00000001
-#define SDL_INIT_AUDIO 0x00000010
-#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 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS 0x00004000
-#define SDL_INIT_NOPARACHUTE 0x00100000 /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER 0x00000001u
+#define SDL_INIT_AUDIO 0x00000010u
+#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC 0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS 0x00004000u
+#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
#define SDL_INIT_EVERYTHING ( \
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
* 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).
+ * 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.
*/
* protect data structures that it accesses by calling SDL_LockAudio()
* 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.
+ * more audio samples to be played (or for capture devices, call
+ * SDL_DequeueAudio() with some frequency, to obtain audio samples).
* - \c desired->userdata is passed as the first parameter to your callback
* function. If you passed a NULL callback, this value is ignored.
*
/**
* Queue more audio on non-callback devices.
*
+ * (If you are looking to retrieve queued audio from a non-callback capture
+ * device, you want SDL_DequeueAudio() instead. This will return -1 to
+ * signify an error if you use it with capture 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
*/
extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
+/**
+ * Dequeue more audio on non-callback devices.
+ *
+ * (If you are looking to queue audio for output on a non-callback playback
+ * device, you want SDL_QueueAudio() instead. This will always return 0
+ * if you use it with playback devices.)
+ *
+ * SDL offers two ways to retrieve audio from a capture device: you can
+ * either supply a callback that SDL triggers with some frequency as the
+ * device records more audio data, (push method), or you can supply no
+ * callback, and then SDL will expect you to retrieve data at regular
+ * intervals (pull method) with this function.
+ *
+ * There are no limits on the amount of data you can queue, short of
+ * exhaustion of address space. Data from the device will keep queuing as
+ * necessary without further intervention from you. This means you will
+ * eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ * Capture devices will not queue data when paused; if you are expecting
+ * to not need captured audio for some length of time, use
+ * SDL_PauseAudioDevice() to stop the capture device from queueing more
+ * data. This can be useful during, say, level loading times. When
+ * unpaused, capture devices will start queueing data from that point,
+ * having flushed any capturable data available while paused.
+ *
+ * This function is thread-safe, but dequeueing from the same device from
+ * two threads at once does not promise which thread will dequeued data
+ * first.
+ *
+ * You may not dequeue audio from a device that is using an
+ * application-supplied callback; doing so returns an error. You have to use
+ * the audio callback, or dequeue 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 from which we will dequeue audio.
+ * \param data A pointer into where audio data should be copied.
+ * \param len The number of bytes (not samples!) to which (data) points.
+ * \return number of bytes dequeued, which could be less than requested.
+ *
+ * \sa SDL_GetQueuedAudioSize
+ * \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, 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.
+ * For playback device:
+ *
+ * This is the number of bytes that have been queued for playback with
+ * SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ * number may shrink at any time, so this only informs of pending data.
+ *
+ * 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.
+ *
+ * For capture devices:
*
- * 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.
+ * This is the number of bytes that have been captured by the device and
+ * are waiting for you to dequeue. This number may grow at any time, so
+ * this only informs of the lower-bound of available data.
*
* 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 have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before querying; SDL
* handles locking internally for this function.
extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
/**
- * Drop any queued audio data waiting to be sent to the hardware.
+ * Drop any queued audio data. For playback devices, this is any queued data
+ * still waiting to be submitted to the hardware. For capture devices, this
+ * is any data that was queued by the device that hasn't yet been dequeued by
+ * the application.
*
- * Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- * the hardware will start playing silence if more audio isn't queued.
+ * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ * playback devices, the hardware will start playing silence if more audio
+ * isn't queued. Unpaused capture devices will start filling the queue again
+ * as soon as they have more data available (which, depending on the state
+ * of the hardware and the thread, could be before this function call
+ * returns!).
*
* 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
*
* 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 have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before clearing the
* queue; SDL handles locking internally for this function.
+/* include/SDL_config.h. Generated from SDL_config.h.in by configure. */
/*
Simple DirectMedia Layer
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
3. This notice may not be removed or altered from any source distribution.
*/
-#ifndef _SDL_config_windows_h
-#define _SDL_config_windows_h
+#ifndef _SDL_config_h
+#define _SDL_config_h
+/**
+ * \file SDL_config.h.in
+ *
+ * This is a set of defines to configure the SDL features
+ */
+
+/* General platform specific identifiers */
#include "SDL_platform.h"
-/* This is a set of defines to configure the SDL features */
-
-#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
-#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
-#define HAVE_STDINT_H 1
-#elif defined(_MSC_VER)
-typedef signed __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-typedef signed __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef signed __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-#ifndef _UINTPTR_T_DEFINED
-#ifdef _WIN64
-typedef unsigned __int64 uintptr_t;
-#else
-typedef unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
-#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
-#define DWORD_PTR DWORD
-#endif
-#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
-#define LONG_PTR LONG
+/* Make sure that this isn't included by Visual C++ */
+#ifdef _MSC_VER
+#error You should run hg revert SDL_config.h
#endif
-#else /* !__GNUC__ && !_MSC_VER */
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-typedef unsigned int size_t;
-#endif
-typedef unsigned int uintptr_t;
-#endif /* __GNUC__ || _MSC_VER */
-#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
-#ifdef _WIN64
-# define SIZEOF_VOIDP 8
+/* C language features */
+/* #undef const */
+/* #undef inline */
+/* #undef volatile */
+
+/* C datatypes */
+#ifdef __LP64__
+#define SIZEOF_VOIDP 8
#else
-# define SIZEOF_VOIDP 4
+#define SIZEOF_VOIDP 4
#endif
+#define HAVE_GCC_ATOMICS 1
+/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
#define HAVE_DDRAW_H 1
#define HAVE_DINPUT_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 */
-#ifdef HAVE_LIBC
+/* Comment this if you want to build without any C library requirements */
+#define HAVE_LIBC 1
+#if HAVE_LIBC
+
/* Useful headers */
+/* #undef HAVE_ALLOCA_H */
+#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
+/* #undef HAVE_ICONV_H */
#define HAVE_SIGNAL_H 1
+/* #undef HAVE_ALTIVEC_H */
+/* #undef HAVE_PTHREAD_NP_H */
+/* #undef HAVE_LIBUDEV_H */
+/* #undef HAVE_DBUS_DBUS_H */
+/* #undef HAVE_IBUS_IBUS_H */
+/* #undef HAVE_FCITX_FRONTEND_H */
/* C library functions */
#define HAVE_MALLOC 1
#define HAVE_CALLOC 1
#define HAVE_REALLOC 1
#define HAVE_FREE 1
-#define HAVE_ALLOCA 1
+/* #undef HAVE_ALLOCA */
+#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
+#define HAVE_GETENV 1
+/* #undef HAVE_SETENV */
+#define HAVE_PUTENV 1
+/* #undef HAVE_UNSETENV */
+#endif
#define HAVE_QSORT 1
#define HAVE_ABS 1
+/* #undef HAVE_BCOPY */
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
+/* #undef HAVE_STRLCPY */
+/* #undef HAVE_STRLCAT */
+#define HAVE_STRDUP 1
#define HAVE__STRREV 1
#define HAVE__STRUPR 1
#define HAVE__STRLWR 1
+/* #undef HAVE_INDEX */
+/* #undef HAVE_RINDEX */
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
#define HAVE__LTOA 1
+/* #undef HAVE__UITOA */
#define HAVE__ULTOA 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
+#define HAVE__I64TOA 1
+#define HAVE__UI64TOA 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE__STRICMP 1
+#define HAVE_STRCASECMP 1
#define HAVE__STRNICMP 1
+#define HAVE_STRNCASECMP 1
+/* #undef HAVE_SSCANF */
+#define HAVE_VSSCANF 1
+/* #undef HAVE_SNPRINTF */
+#define HAVE_VSNPRINTF 1
+#define HAVE_M_PI /**/
#define HAVE_ATAN 1
#define HAVE_ATAN2 1
-#define HAVE_ACOS 1
-#define HAVE_ASIN 1
+#define HAVE_ACOS 1
+#define HAVE_ASIN 1
#define HAVE_CEIL 1
+#define HAVE_COPYSIGN 1
#define HAVE_COS 1
#define HAVE_COSF 1
#define HAVE_FABS 1
#define HAVE_FLOOR 1
#define HAVE_LOG 1
#define HAVE_POW 1
+#define HAVE_SCALBN 1
#define HAVE_SIN 1
#define HAVE_SINF 1
#define HAVE_SQRT 1
#define HAVE_SQRTF 1
#define HAVE_TAN 1
#define HAVE_TANF 1
-#if _MSC_VER >= 1800
-#define HAVE_STRTOLL 1
-#define HAVE_VSSCANF 1
-#define HAVE_COPYSIGN 1
-#define HAVE_SCALBN 1
-#endif
-#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
-#define HAVE_M_PI 1
-#endif
+#define HAVE_FSEEKO 1
+#define HAVE_FSEEKO64 1
+/* #undef HAVE_SIGACTION */
+/* #undef HAVE_SA_SIGACTION */
+#define HAVE_SETJMP 1
+#define HAVE_NANOSLEEP 1
+/* #undef HAVE_SYSCONF */
+/* #undef HAVE_SYSCTLBYNAME */
+/* #undef HAVE_CLOCK_GETTIME */
+/* #undef HAVE_GETPAGESIZE */
+/* #undef HAVE_MPROTECT */
+/* #undef HAVE_ICONV */
+/* #undef HAVE_PTHREAD_SETNAME_NP */
+/* #undef HAVE_PTHREAD_SET_NAME_NP */
+/* #undef HAVE_SEM_TIMEDWAIT */
+
#else
-#define HAVE_STDARG_H 1
-#define HAVE_STDDEF_H 1
-#endif
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#define HAVE_STDINT_H 1
+#endif /* HAVE_LIBC */
+
+/* SDL internal assertion support */
+/* #undef SDL_DEFAULT_ASSERT_LEVEL */
+
+/* Allow disabling of core subsystems */
+/* #undef SDL_ATOMIC_DISABLED */
+/* #undef SDL_AUDIO_DISABLED */
+/* #undef SDL_CPUINFO_DISABLED */
+/* #undef SDL_EVENTS_DISABLED */
+/* #undef SDL_FILE_DISABLED */
+/* #undef SDL_JOYSTICK_DISABLED */
+/* #undef SDL_HAPTIC_DISABLED */
+/* #undef SDL_LOADSO_DISABLED */
+/* #undef SDL_RENDER_DISABLED */
+/* #undef SDL_THREADS_DISABLED */
+/* #undef SDL_TIMERS_DISABLED */
+/* #undef SDL_VIDEO_DISABLED */
+/* #undef SDL_POWER_DISABLED */
+/* #undef SDL_FILESYSTEM_DISABLED */
/* Enable various audio drivers */
+/* #undef SDL_AUDIO_DRIVER_ALSA */
+/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_ARTS */
+/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
+/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_HAIKU */
+/* #undef SDL_AUDIO_DRIVER_BSD */
+/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+/* #undef SDL_AUDIO_DRIVER_ANDROID */
+/* #undef SDL_AUDIO_DRIVER_XAUDIO2 */
#define SDL_AUDIO_DRIVER_DSOUND 1
-#define SDL_AUDIO_DRIVER_XAUDIO2 1
-#define SDL_AUDIO_DRIVER_WINMM 1
-#define SDL_AUDIO_DRIVER_DISK 1
-#define SDL_AUDIO_DRIVER_DUMMY 1
+/* #undef SDL_AUDIO_DRIVER_ESD */
+/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_NACL */
+/* #undef SDL_AUDIO_DRIVER_NAS */
+/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_SNDIO */
+/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_OSS */
+/* #undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H */
+/* #undef SDL_AUDIO_DRIVER_PAUDIO */
+/* #undef SDL_AUDIO_DRIVER_QSA */
+/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
+#define SDL_AUDIO_DRIVER_WINMM 1
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
+/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
+/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
/* Enable various input drivers */
+/* #undef SDL_INPUT_LINUXEV */
+/* #undef SDL_INPUT_LINUXKD */
+/* #undef SDL_INPUT_TSLIB */
+/* #undef SDL_JOYSTICK_HAIKU */
#define SDL_JOYSTICK_DINPUT 1
#define SDL_JOYSTICK_XINPUT 1
-#define SDL_HAPTIC_DINPUT 1
-#define SDL_HAPTIC_XINPUT 1
+/* #undef SDL_JOYSTICK_DUMMY */
+/* #undef SDL_JOYSTICK_IOKIT */
+/* #undef SDL_JOYSTICK_LINUX */
+/* #undef SDL_JOYSTICK_ANDROID */
+/* #undef SDL_JOYSTICK_WINMM */
+/* #undef SDL_JOYSTICK_USBHID */
+/* #undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H */
+/* #undef SDL_JOYSTICK_EMSCRIPTEN */
+/* #undef SDL_HAPTIC_DUMMY */
+/* #undef SDL_HAPTIC_LINUX */
+/* #undef SDL_HAPTIC_IOKIT */
+#define SDL_HAPTIC_DINPUT 1
+#define SDL_HAPTIC_XINPUT 1
/* Enable various shared object loading systems */
-#define SDL_LOADSO_WINDOWS 1
+/* #undef SDL_LOADSO_HAIKU */
+/* #undef SDL_LOADSO_DLOPEN */
+/* #undef SDL_LOADSO_DUMMY */
+/* #undef SDL_LOADSO_LDG */
+#define SDL_LOADSO_WINDOWS 1
/* Enable various threading systems */
-#define SDL_THREAD_WINDOWS 1
+/* #undef SDL_THREAD_PTHREAD */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX */
+/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
+#define SDL_THREAD_WINDOWS 1
/* Enable various timer systems */
-#define SDL_TIMER_WINDOWS 1
+/* #undef SDL_TIMER_HAIKU */
+/* #undef SDL_TIMER_DUMMY */
+/* #undef SDL_TIMER_UNIX */
+#define SDL_TIMER_WINDOWS 1
/* Enable various video drivers */
-#define SDL_VIDEO_DRIVER_DUMMY 1
-#define SDL_VIDEO_DRIVER_WINDOWS 1
+/* #undef SDL_VIDEO_DRIVER_HAIKU */
+/* #undef SDL_VIDEO_DRIVER_COCOA */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
+/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDOWS 1
+/* #undef SDL_VIDEO_DRIVER_WAYLAND */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR */
+/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_MIR */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC */
+/* #undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON */
+/* #undef SDL_VIDEO_DRIVER_X11 */
+/* #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_XEXT */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
+/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
+/* #undef SDL_VIDEO_DRIVER_X11_XDBE */
+/* #undef SDL_VIDEO_DRIVER_X11_XINERAMA */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
+/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
+/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
+/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
+/* #undef SDL_VIDEO_DRIVER_X11_XSHAPE */
+/* #undef SDL_VIDEO_DRIVER_X11_XVIDMODE */
+/* #undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS */
+/* #undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY */
+/* #undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM */
+/* #undef SDL_VIDEO_DRIVER_NACL */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE */
+/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
-#ifndef SDL_VIDEO_RENDER_D3D
-#define SDL_VIDEO_RENDER_D3D 1
-#endif
-#ifndef SDL_VIDEO_RENDER_D3D11
-#define SDL_VIDEO_RENDER_D3D11 0
-#endif
+#define SDL_VIDEO_RENDER_D3D 1
+/* #undef SDL_VIDEO_RENDER_D3D11 */
+#define SDL_VIDEO_RENDER_OGL 1
+/* #undef SDL_VIDEO_RENDER_OGL_ES */
+/* #undef SDL_VIDEO_RENDER_OGL_ES2 */
+/* #undef SDL_VIDEO_RENDER_DIRECTFB */
/* Enable OpenGL support */
-#ifndef SDL_VIDEO_OPENGL
-#define SDL_VIDEO_OPENGL 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_WGL
-#define SDL_VIDEO_OPENGL_WGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL
-#define SDL_VIDEO_RENDER_OGL 1
-#endif
-#ifndef SDL_VIDEO_RENDER_OGL_ES2
-#define SDL_VIDEO_RENDER_OGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_ES2
-#define SDL_VIDEO_OPENGL_ES2 1
-#endif
-#ifndef SDL_VIDEO_OPENGL_EGL
-#define SDL_VIDEO_OPENGL_EGL 1
-#endif
-
+#define SDL_VIDEO_OPENGL 1
+/* #undef SDL_VIDEO_OPENGL_ES */
+/* #undef SDL_VIDEO_OPENGL_ES2 */
+/* #undef SDL_VIDEO_OPENGL_BGL */
+/* #undef SDL_VIDEO_OPENGL_CGL */
+/* #undef SDL_VIDEO_OPENGL_EGL */
+/* #undef SDL_VIDEO_OPENGL_GLX */
+#define SDL_VIDEO_OPENGL_WGL 1
+/* #undef SDL_VIDEO_OPENGL_OSMESA */
+/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
/* Enable system power support */
+/* #undef SDL_POWER_LINUX */
#define SDL_POWER_WINDOWS 1
+/* #undef SDL_POWER_MACOSX */
+/* #undef SDL_POWER_HAIKU */
+/* #undef SDL_POWER_ANDROID */
+/* #undef SDL_POWER_EMSCRIPTEN */
+/* #undef SDL_POWER_HARDWIRED */
-/* Enable filesystem support */
-#define SDL_FILESYSTEM_WINDOWS 1
+/* Enable system filesystem support */
+/* #undef SDL_FILESYSTEM_HAIKU */
+/* #undef SDL_FILESYSTEM_COCOA */
+/* #undef SDL_FILESYSTEM_DUMMY */
+/* #undef SDL_FILESYSTEM_UNIX */
+#define SDL_FILESYSTEM_WINDOWS 1
+/* #undef SDL_FILESYSTEM_NACL */
+/* #undef SDL_FILESYSTEM_ANDROID */
+/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
-/* Enable assembly routines (Win64 doesn't have inline asm) */
-#ifndef _WIN64
-#define SDL_ASSEMBLY_ROUTINES 1
-#endif
+/* Enable assembly routines */
+#define SDL_ASSEMBLY_ROUTINES 1
+/* #undef SDL_ALTIVEC_BLITTERS */
+
+/* Enable ime support */
+/* #undef SDL_USE_IME */
-#endif /* _SDL_config_windows_h */
+#endif /* _SDL_config_h */
/* Drag and drop events */
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
+ SDL_DROPTEXT, /**< text/plain drag-and-drop event */
+ SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
+ SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
/* Audio hotplug events */
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
*/
typedef struct SDL_DropEvent
{
- Uint32 type; /**< ::SDL_DROPFILE */
+ Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
Uint32 timestamp;
- char *file; /**< The file name, which should be freed with SDL_free() */
+ char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+ Uint32 windowID; /**< The window that was dropped on, if any */
} SDL_DropEvent;
* }
* }
*
- * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
* guid,name,mappings
*
* Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
/**
* Get a mapping string for a GUID
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
/**
* Get a mapping string for an open GameController
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_CONSTANT (1<<0)
+#define SDL_HAPTIC_CONSTANT (1u<<0)
/**
* \brief Sine wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SINE (1<<1)
+#define SDL_HAPTIC_SINE (1u<<1)
/**
* \brief Left/Right effect supported.
* \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_LEFTRIGHT (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT (1u<<2)
/* !!! FIXME: put this back when we have more bits in 2.1 */
/* #define SDL_HAPTIC_SQUARE (1<<2) */
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_TRIANGLE (1<<3)
+#define SDL_HAPTIC_TRIANGLE (1u<<3)
/**
* \brief Sawtoothup wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
/**
* \brief Sawtoothdown wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
/**
* \brief Ramp effect supported.
*
* \sa SDL_HapticRamp
*/
-#define SDL_HAPTIC_RAMP (1<<6)
+#define SDL_HAPTIC_RAMP (1u<<6)
/**
* \brief Spring effect supported - uses axes position.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_SPRING (1<<7)
+#define SDL_HAPTIC_SPRING (1u<<7)
/**
* \brief Damper effect supported - uses axes velocity.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_DAMPER (1<<8)
+#define SDL_HAPTIC_DAMPER (1u<<8)
/**
* \brief Inertia effect supported - uses axes acceleration.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_INERTIA (1<<9)
+#define SDL_HAPTIC_INERTIA (1u<<9)
/**
* \brief Friction effect supported - uses axes movement.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_FRICTION (1<<10)
+#define SDL_HAPTIC_FRICTION (1u<<10)
/**
* \brief Custom effect is supported.
*
* User defined custom haptic effect.
*/
-#define SDL_HAPTIC_CUSTOM (1<<11)
+#define SDL_HAPTIC_CUSTOM (1u<<11)
/* @} *//* Haptic effects */
*
* \sa SDL_HapticSetGain
*/
-#define SDL_HAPTIC_GAIN (1<<12)
+#define SDL_HAPTIC_GAIN (1u<<12)
/**
* \brief Device can set autocenter.
*
* \sa SDL_HapticSetAutocenter
*/
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
/**
* \brief Device can be queried for effect status.
*
* \sa SDL_HapticGetEffectStatus
*/
-#define SDL_HAPTIC_STATUS (1<<14)
+#define SDL_HAPTIC_STATUS (1u<<14)
/**
* \brief Device can be paused.
* \sa SDL_HapticPause
* \sa SDL_HapticUnpause
*/
-#define SDL_HAPTIC_PAUSE (1<<15)
+#define SDL_HAPTIC_PAUSE (1u<<15)
/**
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
-* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-* This variable can be set to the following values:
-* "0" - Relative mouse mode uses raw input
-* "1" - Relative mouse mode uses mouse warping
-*
-* By default SDL will use raw input for relative mouse mode
-*/
+ * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ * This variable can be set to the following values:
+ * "0" - Relative mouse mode uses raw input
+ * "1" - Relative mouse mode uses mouse warping
+ *
+ * By default SDL will use raw input for relative mouse mode
+ */
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
+/**
+ * \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ * This variable can be set to the following values:
+ * "0" - Ignore mouse clicks that activate a window
+ * "1" - Generate events for mouse clicks that activate a window
+ *
+ * By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
/**
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
*
* this is problematic. This functionality can be disabled by setting this
* 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.
+ * 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:
* "0" - Enable idle timer
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
*/
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-
+
+/**
+ * \brief A variable controlling whether controllers used with the Apple TV
+ * generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ * This variable can be set to the following values:
+ * "0" - Controller input does not generate UI events (the default).
+ * "1" - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief A variable controlling whether the Apple TV remote's joystick axes
+ * will automatically match the rotation of the remote.
+ *
+ * This variable can be set to the following values:
+ * "0" - Remote orientation does not affect joystick axes (the default).
+ * "1" - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
/**
* \brief A variable controlling whether the Android / iOS built-in
* accelerometer should be listed as a joystick device, rather than listing
* 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.
+* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
*/
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
* privacy policy.
*
* To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- * before calling any SDL_Init functions. The contents of the hint should
+ * before calling any SDL_Init() functions. The contents of the hint should
* be a valid URL. For example, "http://www.example.com".
*
* The default value is "", which will prevent SDL from adding a privacy policy
* The contents of this hint should be encoded as a UTF8 string.
*
* The default value is "Privacy Policy". This hint should only be set during app
- * initialization, preferably before any calls to SDL_Init.
+ * initialization, preferably before any calls to SDL_Init().
*
* For additional information on linking to a privacy policy, see the documentation for
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
*/
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
+/**
+ * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ * "0" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file with an alpha mask. SDL will use the bitmap
+ * header version 4 and set the alpha mask accordingly.
+ * "1" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file without an alpha mask. The alpha channel data
+ * will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ * "0" - SDL will raise the 0x406D1388 Exception to name threads.
+ * This is the default behavior of SDL <= 2.0.4. (default)
+ * "1" - SDL will not raise this exception, and threads will be unnamed.
+ * For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
+
/**
* \brief An enumeration of hint priorities
*/
*/
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
+/**
+ * \brief Get a hint
+ *
+ * \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
/**
* \brief Add a function to watch a particular hint
*
*
* Include file for SDL joystick event handling
*
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
* behind a device_index changing as joysticks are plugged and unplugged.
*
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
* copy it. If the key doesn't have a name, this function returns an
* empty string ("").
*
- * \sa SDL_Key
+ * \sa SDL_Keycode
*/
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
/* 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.
+ See README-android.md for more details on extending that class.
*/
#define SDL_MAIN_NEEDED
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
/**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
*/
typedef enum
{
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
/**
- * \brief Frees a cursor created with SDL_CreateCursor().
+ * \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
*
* \sa SDL_CreateCursor()
+ * \sa SDL_CreateColorCursor()
+ * \sa SDL_CreateSystemCursor()
*/
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
*
* This is a simple file to encapsulate the OpenGL ES 1.X API headers.
*/
+#include "SDL_config.h"
#ifdef __IPHONEOS__
#include <OpenGLES/ES1/gl.h>
*
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
*/
+#include "SDL_config.h"
+
#ifndef _MSC_VER
#ifdef __IPHONEOS__
#define _SDL_pixels_h
#include "SDL_stdinc.h"
+#include "SDL_endian.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
SDL_PACKEDLAYOUT_2101010, 32, 4),
+ /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
/* lets us know what version of Mac OS X we're compiling on */
#include "AvailabilityMacros.h"
#include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
#if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
#undef __IPHONEOS__
#define __IPHONEOS__ 1
#undef __MACOSX__
#else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
#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_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
#endif /* TARGET_OS_IPHONE */
#endif /* defined(__APPLE__) */
*/
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
+/**
+ * \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ * \param renderer The renderer for which integer scaling should be set.
+ * \param enable Enable or disable integer scaling
+ *
+ * This function restricts the logical viewport to integer values - that is, when
+ * a resolution is between two multiples of a logical size, the viewport size is
+ * rounded down to the lower multiple.
+ *
+ * \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+ SDL_bool enable);
+
+/**
+ * \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ * \param renderer The renderer from which integer scaling should be queried.
+ *
+ * \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
/**
* \brief Set the drawing area for rendering on the current target.
*
/**
* \brief Clear the current rendering target with the drawing color
*
- * This function clears the entire rendering target, ignoring the viewport.
+ * This function clears the entire rendering target, ignoring the viewport and
+ * the clip rectangle.
*
* \return 0 on success, or -1 on error
*/
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
#endif
/* RWops Types */
-#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
-#define SDL_RWOPS_WINFILE 1 /* Win32 file */
-#define SDL_RWOPS_STDFILE 2 /* Stdio file */
-#define SDL_RWOPS_JNIFILE 3 /* Android asset */
-#define SDL_RWOPS_MEMORY 4 /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN 0U /* Unknown stream type */
+#define SDL_RWOPS_WINFILE 1U /* Win32 file */
+#define SDL_RWOPS_STDFILE 2U /* Stdio file */
+#define SDL_RWOPS_JNIFILE 3U /* Android asset */
+#define SDL_RWOPS_MEMORY 4U /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U /* Read-Only memory stream */
/**
* This is the read/write operation structure -- very basic.
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
/**
* The number of elements in an array.
#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
#define SDL_TABLESIZE(table) SDL_arraysize(table)
+/**
+ * Macro useful for building other macros with strings in them
+ *
+ * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg) #arg
+
/**
* \name Cast operators
*
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
(Uint32 flags, int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+ (Uint32 flags, int width, int height, int depth, Uint32 format);
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
int width,
int height,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+ (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
/**
/**
* Save a surface to a seekable SDL data stream (memory or file).
*
+ * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ * BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ * not supported.
+ *
* If \c freedst is non-zero, the stream will be closed after being written.
*
* \return 0 if successful or -1 if there was an error.
typedef void *EGLSurface;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
/**
* These are the various supported windowing subsystems
*/
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_WINRT,
- SDL_SYSWM_ANDROID
+ SDL_SYSWM_ANDROID,
+ SDL_SYSWM_VIVANTE
} SDL_SYSWM_TYPE;
/**
int dummy;
/* No UIKit window events yet */
} uikit;
+#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ int dummy;
+ /* No Vivante window events yet */
+ } vivante;
#endif
/* Can't have an empty union */
int dummy;
} android;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ EGLNativeDisplayType display;
+ EGLNativeWindowType window;
+ } vivante;
+#endif
+
/* Can't have an empty union */
int dummy;
} info;
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 0
-#define SDL_PATCHLEVEL 4
+#define SDL_PATCHLEVEL 5
/**
* \brief Macro to determine SDL version program was compiled against.
* \sa SDL_SetWindowPosition()
* \sa SDL_SetWindowSize()
* \sa SDL_SetWindowBordered()
+ * \sa SDL_SetWindowResizable()
* \sa SDL_SetWindowTitle()
* \sa SDL_ShowWindow()
*/
*/
typedef enum
{
+ /* !!! FIXME: change this to name = (1<<x). */
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
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_MOUSE_CAPTURE = 0x00004000 /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
+ SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
+ SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
+ SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
+ SDL_WINDOW_POPUP_MENU = 0x00080000 /**< window should be treated as a popup menu */
} SDL_WindowFlags;
/**
* \brief Used to indicate that you don't care what the window position is.
*/
-#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
/**
* \brief Used to indicate that the window position should be centered.
*/
-#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X) \
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
- SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the
- window be closed */
+ SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
+ SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+ SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
} SDL_WindowEventID;
/**
*/
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
+/**
+ * \brief Get the usable desktop area represented by a display, with the
+ * primary display located at 0,0
+ *
+ * This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ * reserved by the system removed. For example, on Mac OS X, this subtracts
+ * the area occupied by the menu bar and dock.
+ *
+ * Setting a window to be fullscreen generally bypasses these unusable areas,
+ * so these are good guidelines for the maximum space available to a
+ * non-fullscreen window.
+ *
+ * \return 0 on success, or -1 if the index is out of range.
+ *
+ * \sa SDL_GetDisplayBounds()
+ * \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
/**
* \brief Returns the number of available display modes.
*
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED,
* ::SDL_WINDOW_ALLOW_HIGHDPI.
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL 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
*
* \param data A pointer to driver-dependent window creation data
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL if window creation failed.
*
* \sa SDL_DestroyWindow()
*/
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
int *h);
+/**
+ * \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ * \param window The window to query.
+ * \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ * \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ * \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ * \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ * \return 0 on success, or -1 if getting this information is not supported.
+ *
+ * \note if this function fails (returns -1), the size values will be
+ * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ * if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+ int *top, int *left,
+ int *bottom, int *right);
+
/**
* \brief Set the minimum size of a window's client area.
*
extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
SDL_bool bordered);
+/**
+ * \brief Set the user-resizable state of a window.
+ *
+ * This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ * allow/disallow user resizing of the window. This is a no-op if the
+ * window's resizable state already matches the requested state.
+ *
+ * \param window The window of which to change the resizable state.
+ * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ * \note You can't change the resizable state of a fullscreen window.
+ *
+ * \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+ SDL_bool resizable);
+
/**
* \brief Show a window.
*
* \return 0 on success, or -1 on error.
*
* \sa SDL_GetWindowSurface()
- * \sa SDL_UpdateWindowSurfaceRect()
+ * \sa SDL_UpdateWindowSurface()
*/
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
const SDL_Rect * rects,
*/
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
+/**
+ * \brief Set the opacity for a window
+ *
+ * \param window The window which will be made transparent or opaque
+ * \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ * clamped internally between 0.0f and 1.0f.
+ *
+ * \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ * \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ * \brief Get the opacity of a window.
+ *
+ * If transparency isn't supported on this platform, opacity will be reported
+ * as 1.0f without error.
+ *
+ * \param window The window in question.
+ * \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ * \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ * \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ * \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ * \param modal_window The window that should be modal
+ * \param parent_window The parent window
+ *
+ * \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ * \brief Explicitly sets input focus to the window.
+ *
+ * You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ * this with caution, as you might give focus to a window that's completely
+ * obscured by other windows.
+ *
+ * \param window The window that should get the input focus
+ *
+ * \return 0 on success, or -1 otherwise.
+ * \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
/**
* \brief Set the gamma ramp for a window.
*
/**
- * \brief Returns whether the screensaver is currently enabled (default on).
+ * \brief Returns whether the screensaver is currently enabled (default off).
*
* \sa SDL_EnableScreenSaver()
* \sa SDL_DisableScreenSaver()
# sdl2 cmake project-config input for ./configure scripts
-set(prefix "/usr/local/cross-tools/x86_64-w64-mingw32")
+set(prefix "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64")
set(exec_prefix "${prefix}")
set(libdir "${exec_prefix}/lib")
-set(SDL2_PREFIX "/usr/local/cross-tools/x86_64-w64-mingw32")
-set(SDL2_EXEC_PREFIX "/usr/local/cross-tools/x86_64-w64-mingw32")
+set(SDL2_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64")
+set(SDL2_EXEC_PREFIX "/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64")
set(SDL2_LIBDIR "${exec_prefix}/lib")
set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} -lmingw32 -lSDL2main -lSDL2 -mwindows")
+string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
# It is necessary for linking the library.
# The name that we can dlopen(3).
-dlname='../bin/SDL2.dll'
+dlname=''
# Names of this library.
-library_names='libSDL2.dll.a'
+library_names=''
# The name of the static archive.
old_library='libSDL2.a'
# Version information for libSDL2.
current=4
age=4
-revision=0
+revision=1
# Is this an already installed library?
installed=yes
dlpreopen=''
# Directory that this library needs to be installed in:
-libdir='/Users/slouken/release/SDL/SDL2-2.0.4/x86_64-w64-mingw32/lib'
+libdir='/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64/lib'
# sdl pkg-config source file
-prefix=/usr/local/cross-tools/x86_64-w64-mingw32
+prefix=/var/home/rpolzer/xonotic/misc/buildsrc/tmp/SDL2-2.0.5/../64
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: sdl2
Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer.
-Version: 2.0.4
+Version: 2.0.5
Requires:
Conflicts:
Libs: -L${libdir} -lmingw32 -lSDL2main -lSDL2 -mwindows
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
+#
+# Changelog:
+# * also look for SDL2.framework under Mac OS X
# serial 1
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
+AC_ARG_ENABLE(sdlframework, [ --disable-sdlframework Do not search for SDL2.framework],
+ , search_sdl_framework=yes)
+
+AC_ARG_VAR(SDL2_FRAMEWORK, [Path to SDL2.framework])
min_sdl_version=ifelse([$1], ,2.0.0,$1)
fi
AC_PATH_PROG(SDL2_CONFIG, sdl2-config, no, [$PATH])
PATH="$as_save_PATH"
- AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
- if test "$SDL2_CONFIG" = "no" ; then
- no_sdl=yes
- else
- SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
- SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+ if test "$SDL2_CONFIG" = "no" -a "x$search_sdl_framework" = "xyes"; then
+ AC_MSG_CHECKING(for SDL2.framework)
+ if test "x$SDL2_FRAMEWORK" != x; then
+ sdl_framework=$SDL2_FRAMEWORK
+ else
+ for d in / ~/ /System/; do
+ if test -d "$dLibrary/Frameworks/SDL2.framework"; then
+ sdl_framework="$dLibrary/Frameworks/SDL2.framework"
+ fi
+ done
+ fi
+
+ if test -d $sdl_framework; then
+ AC_MSG_RESULT($sdl_framework)
+ sdl_framework_dir=`dirname $sdl_framework`
+ SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
+ SDL_LIBS="-F$sdl_framework_dir -Wl,-framework,SDL2"
+ else
+ no_sdl=yes
+ fi
+ fi
+
+ if test "$SDL2_CONFIG" != "no"; then
+ if test "x$sdl_pc" = "xno"; then
+ AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
+ SDL_CFLAGS=`$SDL2_CONFIG $sdl_config_args --cflags`
+ SDL_LIBS=`$SDL2_CONFIG $sdl_config_args --libs`
+ fi
sdl_major_version=`$SDL2_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
+
+ fi
+ if test "x$sdl_pc" = "xno"; then
+ if test "x$no_sdl" = "xyes"; then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ fi
fi
- fi
- if test "x$no_sdl" = x ; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
fi
fi
if test "x$no_sdl" = x ; then
* specify the subsystems which you will be using in your application.
*/
/* @{ */
-#define SDL_INIT_TIMER 0x00000001
-#define SDL_INIT_AUDIO 0x00000010
-#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 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
-#define SDL_INIT_EVENTS 0x00004000
-#define SDL_INIT_NOPARACHUTE 0x00100000 /**< compatibility; this flag is ignored. */
+#define SDL_INIT_TIMER 0x00000001u
+#define SDL_INIT_AUDIO 0x00000010u
+#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
+#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
+#define SDL_INIT_HAPTIC 0x00001000u
+#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
+#define SDL_INIT_EVENTS 0x00004000u
+#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
#define SDL_INIT_EVERYTHING ( \
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER \
* 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).
+ * 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.
*/
* protect data structures that it accesses by calling SDL_LockAudio()
* 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.
+ * more audio samples to be played (or for capture devices, call
+ * SDL_DequeueAudio() with some frequency, to obtain audio samples).
* - \c desired->userdata is passed as the first parameter to your callback
* function. If you passed a NULL callback, this value is ignored.
*
/**
* Queue more audio on non-callback devices.
*
+ * (If you are looking to retrieve queued audio from a non-callback capture
+ * device, you want SDL_DequeueAudio() instead. This will return -1 to
+ * signify an error if you use it with capture 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
*/
extern DECLSPEC int SDLCALL SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
+/**
+ * Dequeue more audio on non-callback devices.
+ *
+ * (If you are looking to queue audio for output on a non-callback playback
+ * device, you want SDL_QueueAudio() instead. This will always return 0
+ * if you use it with playback devices.)
+ *
+ * SDL offers two ways to retrieve audio from a capture device: you can
+ * either supply a callback that SDL triggers with some frequency as the
+ * device records more audio data, (push method), or you can supply no
+ * callback, and then SDL will expect you to retrieve data at regular
+ * intervals (pull method) with this function.
+ *
+ * There are no limits on the amount of data you can queue, short of
+ * exhaustion of address space. Data from the device will keep queuing as
+ * necessary without further intervention from you. This means you will
+ * eventually run out of memory if you aren't routinely dequeueing data.
+ *
+ * Capture devices will not queue data when paused; if you are expecting
+ * to not need captured audio for some length of time, use
+ * SDL_PauseAudioDevice() to stop the capture device from queueing more
+ * data. This can be useful during, say, level loading times. When
+ * unpaused, capture devices will start queueing data from that point,
+ * having flushed any capturable data available while paused.
+ *
+ * This function is thread-safe, but dequeueing from the same device from
+ * two threads at once does not promise which thread will dequeued data
+ * first.
+ *
+ * You may not dequeue audio from a device that is using an
+ * application-supplied callback; doing so returns an error. You have to use
+ * the audio callback, or dequeue 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 from which we will dequeue audio.
+ * \param data A pointer into where audio data should be copied.
+ * \param len The number of bytes (not samples!) to which (data) points.
+ * \return number of bytes dequeued, which could be less than requested.
+ *
+ * \sa SDL_GetQueuedAudioSize
+ * \sa SDL_ClearQueuedAudio
+ */
+extern DECLSPEC Uint32 SDLCALL SDL_DequeueAudio(SDL_AudioDeviceID dev, 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.
+ * For playback device:
+ *
+ * This is the number of bytes that have been queued for playback with
+ * SDL_QueueAudio(), but have not yet been sent to the hardware. This
+ * number may shrink at any time, so this only informs of pending data.
+ *
+ * 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.
+ *
+ * For capture devices:
*
- * 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.
+ * This is the number of bytes that have been captured by the device and
+ * are waiting for you to dequeue. This number may grow at any time, so
+ * this only informs of the lower-bound of available data.
*
* 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 have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before querying; SDL
* handles locking internally for this function.
extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
/**
- * Drop any queued audio data waiting to be sent to the hardware.
+ * Drop any queued audio data. For playback devices, this is any queued data
+ * still waiting to be submitted to the hardware. For capture devices, this
+ * is any data that was queued by the device that hasn't yet been dequeued by
+ * the application.
*
- * Immediately after this call, SDL_GetQueuedAudioSize() will return 0 and
- * the hardware will start playing silence if more audio isn't queued.
+ * Immediately after this call, SDL_GetQueuedAudioSize() will return 0. For
+ * playback devices, the hardware will start playing silence if more audio
+ * isn't queued. Unpaused capture devices will start filling the queue again
+ * as soon as they have more data available (which, depending on the state
+ * of the hardware and the thread, could be before this function call
+ * returns!).
*
* 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
*
* 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 have to queue audio with SDL_QueueAudio()/SDL_DequeueAudio(), or use
+ * the audio callback, but not both.
*
* You should not call SDL_LockAudio() on the device before clearing the
* queue; SDL handles locking internally for this function.
/* Drag and drop events */
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
+ SDL_DROPTEXT, /**< text/plain drag-and-drop event */
+ SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
+ SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
/* Audio hotplug events */
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
*/
typedef struct SDL_DropEvent
{
- Uint32 type; /**< ::SDL_DROPFILE */
+ Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
Uint32 timestamp;
- char *file; /**< The file name, which should be freed with SDL_free() */
+ char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
+ Uint32 windowID; /**< The window that was dropped on, if any */
} SDL_DropEvent;
* }
* }
*
- * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
+ * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
* guid,name,mappings
*
* Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
/**
* Get a mapping string for a GUID
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID( SDL_JoystickGUID guid );
/**
* Get a mapping string for an open GameController
*
- * \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
+ * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
*/
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_CONSTANT (1<<0)
+#define SDL_HAPTIC_CONSTANT (1u<<0)
/**
* \brief Sine wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SINE (1<<1)
+#define SDL_HAPTIC_SINE (1u<<1)
/**
* \brief Left/Right effect supported.
* \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_LEFTRIGHT (1<<2)
+#define SDL_HAPTIC_LEFTRIGHT (1u<<2)
/* !!! FIXME: put this back when we have more bits in 2.1 */
/* #define SDL_HAPTIC_SQUARE (1<<2) */
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_TRIANGLE (1<<3)
+#define SDL_HAPTIC_TRIANGLE (1u<<3)
/**
* \brief Sawtoothup wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
+#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
/**
* \brief Sawtoothdown wave effect supported.
*
* \sa SDL_HapticPeriodic
*/
-#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
+#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
/**
* \brief Ramp effect supported.
*
* \sa SDL_HapticRamp
*/
-#define SDL_HAPTIC_RAMP (1<<6)
+#define SDL_HAPTIC_RAMP (1u<<6)
/**
* \brief Spring effect supported - uses axes position.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_SPRING (1<<7)
+#define SDL_HAPTIC_SPRING (1u<<7)
/**
* \brief Damper effect supported - uses axes velocity.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_DAMPER (1<<8)
+#define SDL_HAPTIC_DAMPER (1u<<8)
/**
* \brief Inertia effect supported - uses axes acceleration.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_INERTIA (1<<9)
+#define SDL_HAPTIC_INERTIA (1u<<9)
/**
* \brief Friction effect supported - uses axes movement.
*
* \sa SDL_HapticCondition
*/
-#define SDL_HAPTIC_FRICTION (1<<10)
+#define SDL_HAPTIC_FRICTION (1u<<10)
/**
* \brief Custom effect is supported.
*
* User defined custom haptic effect.
*/
-#define SDL_HAPTIC_CUSTOM (1<<11)
+#define SDL_HAPTIC_CUSTOM (1u<<11)
/* @} *//* Haptic effects */
*
* \sa SDL_HapticSetGain
*/
-#define SDL_HAPTIC_GAIN (1<<12)
+#define SDL_HAPTIC_GAIN (1u<<12)
/**
* \brief Device can set autocenter.
*
* \sa SDL_HapticSetAutocenter
*/
-#define SDL_HAPTIC_AUTOCENTER (1<<13)
+#define SDL_HAPTIC_AUTOCENTER (1u<<13)
/**
* \brief Device can be queried for effect status.
*
* \sa SDL_HapticGetEffectStatus
*/
-#define SDL_HAPTIC_STATUS (1<<14)
+#define SDL_HAPTIC_STATUS (1u<<14)
/**
* \brief Device can be paused.
* \sa SDL_HapticPause
* \sa SDL_HapticUnpause
*/
-#define SDL_HAPTIC_PAUSE (1<<15)
+#define SDL_HAPTIC_PAUSE (1u<<15)
/**
#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
/**
-* \brief A variable controlling whether relative mouse mode is implemented using mouse warping
-*
-* This variable can be set to the following values:
-* "0" - Relative mouse mode uses raw input
-* "1" - Relative mouse mode uses mouse warping
-*
-* By default SDL will use raw input for relative mouse mode
-*/
+ * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
+ *
+ * This variable can be set to the following values:
+ * "0" - Relative mouse mode uses raw input
+ * "1" - Relative mouse mode uses mouse warping
+ *
+ * By default SDL will use raw input for relative mouse mode
+ */
#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
+/**
+ * \brief Allow mouse click events when clicking to focus an SDL window
+ *
+ * This variable can be set to the following values:
+ * "0" - Ignore mouse clicks that activate a window
+ * "1" - Generate events for mouse clicks that activate a window
+ *
+ * By default SDL will ignore mouse clicks that activate a window
+ */
+#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
+
/**
* \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
*
* this is problematic. This functionality can be disabled by setting this
* 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.
+ * 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:
* "0" - Enable idle timer
* "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
*/
#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
-
+
+/**
+ * \brief A variable controlling whether controllers used with the Apple TV
+ * generate UI events.
+ *
+ * When UI events are generated by controller input, the app will be
+ * backgrounded when the Apple TV remote's menu button is pressed, and when the
+ * pause or B buttons on gamepads are pressed.
+ *
+ * More information about properly making use of controllers for the Apple TV
+ * can be found here:
+ * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
+ *
+ * This variable can be set to the following values:
+ * "0" - Controller input does not generate UI events (the default).
+ * "1" - Controller input generates UI events.
+ */
+#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
+
+/**
+ * \brief A variable controlling whether the Apple TV remote's joystick axes
+ * will automatically match the rotation of the remote.
+ *
+ * This variable can be set to the following values:
+ * "0" - Remote orientation does not affect joystick axes (the default).
+ * "1" - Joystick axes are based on the orientation of the remote.
+ */
+#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
+
/**
* \brief A variable controlling whether the Android / iOS built-in
* accelerometer should be listed as a joystick device, rather than listing
* 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.
+* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
*/
#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
* privacy policy.
*
* To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
- * before calling any SDL_Init functions. The contents of the hint should
+ * before calling any SDL_Init() functions. The contents of the hint should
* be a valid URL. For example, "http://www.example.com".
*
* The default value is "", which will prevent SDL from adding a privacy policy
* The contents of this hint should be encoded as a UTF8 string.
*
* The default value is "Privacy Policy". This hint should only be set during app
- * initialization, preferably before any calls to SDL_Init.
+ * initialization, preferably before any calls to SDL_Init().
*
* For additional information on linking to a privacy policy, see the documentation for
* SDL_HINT_WINRT_PRIVACY_POLICY_URL.
*/
#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
+/**
+ * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
+ *
+ * The bitmap header version 4 is required for proper alpha channel support and
+ * SDL will use it when required. Should this not be desired, this hint can
+ * force the use of the 40 byte header version which is supported everywhere.
+ *
+ * The variable can be set to the following values:
+ * "0" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file with an alpha mask. SDL will use the bitmap
+ * header version 4 and set the alpha mask accordingly.
+ * "1" - Surfaces with a colorkey or an alpha channel are saved to a
+ * 32-bit BMP file without an alpha mask. The alpha channel data
+ * will be in the file, but applications are going to ignore it.
+ *
+ * The default value is "0".
+ */
+#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
+
+/**
+ * \brief Tell SDL not to name threads on Windows.
+ *
+ * The variable can be set to the following values:
+ * "0" - SDL will raise the 0x406D1388 Exception to name threads.
+ * This is the default behavior of SDL <= 2.0.4. (default)
+ * "1" - SDL will not raise this exception, and threads will be unnamed.
+ * For .NET languages this is required when running under a debugger.
+ */
+#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
+
+/**
+ * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
+ *
+ * Also known as Z-order. The variable can take a negative or positive value.
+ * The default is 10000.
+ */
+#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
+
/**
* \brief An enumeration of hint priorities
*/
*/
extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
+/**
+ * \brief Get a hint
+ *
+ * \return The boolean value of a hint variable.
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
+
/**
* \brief Add a function to watch a particular hint
*
*
* Include file for SDL joystick event handling
*
- * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
+ * The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
* behind a device_index changing as joysticks are plugged and unplugged.
*
* The term "instance_id" is the current instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
* copy it. If the key doesn't have a name, this function returns an
* empty string ("").
*
- * \sa SDL_Key
+ * \sa SDL_Keycode
*/
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
/* 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.
+ See README-android.md for more details on extending that class.
*/
#define SDL_MAIN_NEEDED
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
/**
- * \brief Cursor types for SDL_CreateSystemCursor.
+ * \brief Cursor types for SDL_CreateSystemCursor().
*/
typedef enum
{
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
/**
- * \brief Frees a cursor created with SDL_CreateCursor().
+ * \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
*
* \sa SDL_CreateCursor()
+ * \sa SDL_CreateColorCursor()
+ * \sa SDL_CreateSystemCursor()
*/
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
*
* This is a simple file to encapsulate the OpenGL ES 1.X API headers.
*/
+#include "SDL_config.h"
#ifdef __IPHONEOS__
#include <OpenGLES/ES1/gl.h>
*
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
*/
+#include "SDL_config.h"
+
#ifndef _MSC_VER
#ifdef __IPHONEOS__
#define _SDL_pixels_h
#include "SDL_stdinc.h"
+#include "SDL_endian.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
SDL_PACKEDLAYOUT_2101010, 32, 4),
+ /* Aliases for RGBA byte arrays of color data, for the current platform */
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
+#else
+ SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
+ SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
+ SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
+ SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
+#endif
+
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
/* lets us know what version of Mac OS X we're compiling on */
#include "AvailabilityMacros.h"
#include "TargetConditionals.h"
+#if TARGET_OS_TV
+#undef __TVOS__
+#define __TVOS__ 1
+#endif
#if TARGET_OS_IPHONE
-/* if compiling for iPhone */
+/* if compiling for iOS */
#undef __IPHONEOS__
#define __IPHONEOS__ 1
#undef __MACOSX__
#else
-/* if not compiling for iPhone */
+/* if not compiling for iOS */
#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_MIN_REQUIRED < 1060
+# error SDL for Mac OS X only supports deploying on 10.6 and above.
+#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
#endif /* TARGET_OS_IPHONE */
#endif /* defined(__APPLE__) */
*/
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
+/**
+ * \brief Set whether to force integer scales for resolution-independent rendering
+ *
+ * \param renderer The renderer for which integer scaling should be set.
+ * \param enable Enable or disable integer scaling
+ *
+ * This function restricts the logical viewport to integer values - that is, when
+ * a resolution is between two multiples of a logical size, the viewport size is
+ * rounded down to the lower multiple.
+ *
+ * \sa SDL_RenderSetLogicalSize()
+ */
+extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
+ SDL_bool enable);
+
+/**
+ * \brief Get whether integer scales are forced for resolution-independent rendering
+ *
+ * \param renderer The renderer from which integer scaling should be queried.
+ *
+ * \sa SDL_RenderSetIntegerScale()
+ */
+extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer);
+
/**
* \brief Set the drawing area for rendering on the current target.
*
/**
* \brief Clear the current rendering target with the drawing color
*
- * This function clears the entire rendering target, ignoring the viewport.
+ * This function clears the entire rendering target, ignoring the viewport and
+ * the clip rectangle.
*
* \return 0 on success, or -1 on error
*/
-#define SDL_REVISION "hg-10001:e12c38730512"
-#define SDL_REVISION_NUMBER 10001
+#define SDL_REVISION "hg-10556:007dfe83abf8"
+#define SDL_REVISION_NUMBER 10556
#endif
/* RWops Types */
-#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
-#define SDL_RWOPS_WINFILE 1 /* Win32 file */
-#define SDL_RWOPS_STDFILE 2 /* Stdio file */
-#define SDL_RWOPS_JNIFILE 3 /* Android asset */
-#define SDL_RWOPS_MEMORY 4 /* Memory stream */
-#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
+#define SDL_RWOPS_UNKNOWN 0U /* Unknown stream type */
+#define SDL_RWOPS_WINFILE 1U /* Win32 file */
+#define SDL_RWOPS_STDFILE 2U /* Stdio file */
+#define SDL_RWOPS_JNIFILE 3U /* Android asset */
+#define SDL_RWOPS_MEMORY 4U /* Memory stream */
+#define SDL_RWOPS_MEMORY_RO 5U /* Read-Only memory stream */
/**
* This is the read/write operation structure -- very basic.
#ifdef HAVE_FLOAT_H
# include <float.h>
#endif
-#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
-# include <iconv.h>
-#endif
/**
* The number of elements in an array.
#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
#define SDL_TABLESIZE(table) SDL_arraysize(table)
+/**
+ * Macro useful for building other macros with strings in them
+ *
+ * e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
+ */
+#define SDL_STRINGIFY_ARG(arg) #arg
+
/**
* \name Cast operators
*
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface
(Uint32 flags, int width, int height, int depth,
Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormat
+ (Uint32 flags, int width, int height, int depth, Uint32 format);
extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
int width,
int height,
Uint32 Gmask,
Uint32 Bmask,
Uint32 Amask);
+extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceWithFormatFrom
+ (void *pixels, int width, int height, int depth, int pitch, Uint32 format);
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
/**
/**
* Save a surface to a seekable SDL data stream (memory or file).
*
+ * Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the
+ * BMP directly. Other RGB formats with 8-bit or higher get converted to a
+ * 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit
+ * surface before they are saved. YUV and paletted 1-bit and 4-bit formats are
+ * not supported.
+ *
* If \c freedst is non-zero, the stream will be closed after being written.
*
* \return 0 if successful or -1 if there was an error.
typedef void *EGLSurface;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+#include "SDL_egl.h"
+#endif
+
/**
* These are the various supported windowing subsystems
*/
SDL_SYSWM_WAYLAND,
SDL_SYSWM_MIR,
SDL_SYSWM_WINRT,
- SDL_SYSWM_ANDROID
+ SDL_SYSWM_ANDROID,
+ SDL_SYSWM_VIVANTE
} SDL_SYSWM_TYPE;
/**
int dummy;
/* No UIKit window events yet */
} uikit;
+#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ int dummy;
+ /* No Vivante window events yet */
+ } vivante;
#endif
/* Can't have an empty union */
int dummy;
} android;
#endif
+#if defined(SDL_VIDEO_DRIVER_VIVANTE)
+ struct
+ {
+ EGLNativeDisplayType display;
+ EGLNativeWindowType window;
+ } vivante;
+#endif
+
/* Can't have an empty union */
int dummy;
} info;
*/
#define SDL_MAJOR_VERSION 2
#define SDL_MINOR_VERSION 0
-#define SDL_PATCHLEVEL 4
+#define SDL_PATCHLEVEL 5
/**
* \brief Macro to determine SDL version program was compiled against.
* \sa SDL_SetWindowPosition()
* \sa SDL_SetWindowSize()
* \sa SDL_SetWindowBordered()
+ * \sa SDL_SetWindowResizable()
* \sa SDL_SetWindowTitle()
* \sa SDL_ShowWindow()
*/
*/
typedef enum
{
+ /* !!! FIXME: change this to name = (1<<x). */
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
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_MOUSE_CAPTURE = 0x00004000 /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
+ SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
+ SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
+ SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
+ SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
+ SDL_WINDOW_POPUP_MENU = 0x00080000 /**< window should be treated as a popup menu */
} SDL_WindowFlags;
/**
* \brief Used to indicate that you don't care what the window position is.
*/
-#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
+#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
/**
* \brief Used to indicate that the window position should be centered.
*/
-#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
+#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
#define SDL_WINDOWPOS_ISCENTERED(X) \
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
- SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the
- window be closed */
+ SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
+ SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
+ SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
} SDL_WindowEventID;
/**
*/
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
+/**
+ * \brief Get the usable desktop area represented by a display, with the
+ * primary display located at 0,0
+ *
+ * This is the same area as SDL_GetDisplayBounds() reports, but with portions
+ * reserved by the system removed. For example, on Mac OS X, this subtracts
+ * the area occupied by the menu bar and dock.
+ *
+ * Setting a window to be fullscreen generally bypasses these unusable areas,
+ * so these are good guidelines for the maximum space available to a
+ * non-fullscreen window.
+ *
+ * \return 0 on success, or -1 if the index is out of range.
+ *
+ * \sa SDL_GetDisplayBounds()
+ * \sa SDL_GetNumVideoDisplays()
+ */
+extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
+
/**
* \brief Returns the number of available display modes.
*
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED,
* ::SDL_WINDOW_ALLOW_HIGHDPI.
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL 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
*
* \param data A pointer to driver-dependent window creation data
*
- * \return The id of the window created, or zero if window creation failed.
+ * \return The created window, or NULL if window creation failed.
*
* \sa SDL_DestroyWindow()
*/
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
int *h);
+/**
+ * \brief Get the size of a window's borders (decorations) around the client area.
+ *
+ * \param window The window to query.
+ * \param top Pointer to variable for storing the size of the top border. NULL is permitted.
+ * \param left Pointer to variable for storing the size of the left border. NULL is permitted.
+ * \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
+ * \param right Pointer to variable for storing the size of the right border. NULL is permitted.
+ *
+ * \return 0 on success, or -1 if getting this information is not supported.
+ *
+ * \note if this function fails (returns -1), the size values will be
+ * initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
+ * if the window in question was borderless.
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
+ int *top, int *left,
+ int *bottom, int *right);
+
/**
* \brief Set the minimum size of a window's client area.
*
extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
SDL_bool bordered);
+/**
+ * \brief Set the user-resizable state of a window.
+ *
+ * This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
+ * allow/disallow user resizing of the window. This is a no-op if the
+ * window's resizable state already matches the requested state.
+ *
+ * \param window The window of which to change the resizable state.
+ * \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
+ *
+ * \note You can't change the resizable state of a fullscreen window.
+ *
+ * \sa SDL_GetWindowFlags()
+ */
+extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
+ SDL_bool resizable);
+
/**
* \brief Show a window.
*
* \return 0 on success, or -1 on error.
*
* \sa SDL_GetWindowSurface()
- * \sa SDL_UpdateWindowSurfaceRect()
+ * \sa SDL_UpdateWindowSurface()
*/
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
const SDL_Rect * rects,
*/
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
+/**
+ * \brief Set the opacity for a window
+ *
+ * \param window The window which will be made transparent or opaque
+ * \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
+ * clamped internally between 0.0f and 1.0f.
+ *
+ * \return 0 on success, or -1 if setting the opacity isn't supported.
+ *
+ * \sa SDL_GetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
+
+/**
+ * \brief Get the opacity of a window.
+ *
+ * If transparency isn't supported on this platform, opacity will be reported
+ * as 1.0f without error.
+ *
+ * \param window The window in question.
+ * \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
+ *
+ * \return 0 on success, or -1 on error (invalid window, etc).
+ *
+ * \sa SDL_SetWindowOpacity()
+ */
+extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
+
+/**
+ * \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
+ *
+ * \param modal_window The window that should be modal
+ * \param parent_window The parent window
+ *
+ * \return 0 on success, or -1 otherwise.
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
+
+/**
+ * \brief Explicitly sets input focus to the window.
+ *
+ * You almost certainly want SDL_RaiseWindow() instead of this function. Use
+ * this with caution, as you might give focus to a window that's completely
+ * obscured by other windows.
+ *
+ * \param window The window that should get the input focus
+ *
+ * \return 0 on success, or -1 otherwise.
+ * \sa SDL_RaiseWindow()
+ */
+extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
+
/**
* \brief Set the gamma ramp for a window.
*
/**
- * \brief Returns whether the screensaver is currently enabled (default on).
+ * \brief Returns whether the screensaver is currently enabled (default off).
*
* \sa SDL_EnableScreenSaver()
* \sa SDL_DisableScreenSaver()
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
- <string>15C50</string>
+ <string>15G1004</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>2.0.4</string>
+ <string>2.0.5</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleSupportedPlatforms</key>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
- <string>2.0.4</string>
+ <string>2.0.5</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
- <string>7C68</string>
+ <string>8A218a</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
- <string>15C43</string>
+ <string>16A300</string>
<key>DTSDKName</key>
- <string>macosx10.11</string>
+ <string>macosx10.12</string>
<key>DTXcode</key>
- <string>0720</string>
+ <string>0800</string>
<key>DTXcodeBuild</key>
- <string>7C68</string>
+ <string>8A218a</string>
</dict>
</plist>
<dict>
<key>Resources/Info.plist</key>
<data>
- p+Cz4Y64VH6pZL+sceQcjAJniME=
+ bZkANAXaqONeP7JKT7J8irtx1LQ=
</data>
</dict>
<key>files2</key>
<dict>
<key>Headers/SDL.h</key>
- <data>
- 7nrs8rqLHJbbjdCsBibxA6rEHdE=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ CdryRAbw52YsQuFdpj/qR06oaHo=
+ </data>
+ <key>hash2</key>
+ <data>
+ a4srnKbxf82ZmaXCq7fGtSIaNHcc15nwBQT5UZEacdg=
+ </data>
+ </dict>
<key>Headers/SDL_assert.h</key>
- <data>
- WAfvaSHAUBsbTpD1OW6bLIO3TDo=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ WAfvaSHAUBsbTpD1OW6bLIO3TDo=
+ </data>
+ <key>hash2</key>
+ <data>
+ 7h4T6jtDOHnLZ1roFa6aEyJAILLSrrhlWzgk6IzUtB4=
+ </data>
+ </dict>
<key>Headers/SDL_atomic.h</key>
- <data>
- 6ZfydfmWn0sHmKXyYj1gCJC9EdQ=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 6ZfydfmWn0sHmKXyYj1gCJC9EdQ=
+ </data>
+ <key>hash2</key>
+ <data>
+ qs0Y9jgGLKQ9yVStiLUB5aLJT2IMg5SySSiQ3MBEqN8=
+ </data>
+ </dict>
<key>Headers/SDL_audio.h</key>
- <data>
- QlFi0vrVOdDgVyOeeux8WYNfJtY=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ /MxxNRQLHaaeSVhIb0SlstG4ELE=
+ </data>
+ <key>hash2</key>
+ <data>
+ x1R/NAiKCKC/GtvQF3Cm4vo7YZvQFnJIRFOiNKb6J/Y=
+ </data>
+ </dict>
<key>Headers/SDL_bits.h</key>
- <data>
- bBKWsjJQnPdjedRePFr25fPkhrM=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ bBKWsjJQnPdjedRePFr25fPkhrM=
+ </data>
+ <key>hash2</key>
+ <data>
+ h6WjANhNEmQVIRbtG/HLujqwFn5p5/8OJ10HlnC3Oi4=
+ </data>
+ </dict>
<key>Headers/SDL_blendmode.h</key>
- <data>
- Qbv4ZV4rYaGKgwLfmRqpUXcfrzo=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ Qbv4ZV4rYaGKgwLfmRqpUXcfrzo=
+ </data>
+ <key>hash2</key>
+ <data>
+ Rs3ArXRSkg2zVRTE2a2W+UDeBrpbvQvyOgUOjAUPDsA=
+ </data>
+ </dict>
<key>Headers/SDL_clipboard.h</key>
- <data>
- E2B/Gj1/db5PjecKc2tjGLGnnEU=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ E2B/Gj1/db5PjecKc2tjGLGnnEU=
+ </data>
+ <key>hash2</key>
+ <data>
+ OUuHXrgGzo46jdpE1rSsVJh9BghlHsiT/hq31sJBTWQ=
+ </data>
+ </dict>
<key>Headers/SDL_config.h</key>
- <data>
- SICWRZVShJxQcjoldrByc8tKyiE=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ SICWRZVShJxQcjoldrByc8tKyiE=
+ </data>
+ <key>hash2</key>
+ <data>
+ zotmPP+Z3SWxdGhfKX7zwbhorxrqqGXTbeOX8YKu6MY=
+ </data>
+ </dict>
<key>Headers/SDL_config_macosx.h</key>
- <data>
- AXT1YfhBssV2mdMI7radyWtrnV4=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ AXT1YfhBssV2mdMI7radyWtrnV4=
+ </data>
+ <key>hash2</key>
+ <data>
+ +WkbuLwPgR9LP1fk6oE1nTlBcyy+rx2qpVDlOL1HVgk=
+ </data>
+ </dict>
<key>Headers/SDL_copying.h</key>
- <data>
- ksKqAB2l2GpnBa96oo8FhwfrjZs=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ ksKqAB2l2GpnBa96oo8FhwfrjZs=
+ </data>
+ <key>hash2</key>
+ <data>
+ 7nAZoUQ7ksvZg+awDU/oSMhHBe7+6WfRVxFAyQMqf2Q=
+ </data>
+ </dict>
<key>Headers/SDL_cpuinfo.h</key>
- <data>
- L1bug7VmDQNJDS/a2qhveSB41wg=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ L1bug7VmDQNJDS/a2qhveSB41wg=
+ </data>
+ <key>hash2</key>
+ <data>
+ uPNtKToklnAbu/isfW41BRIKdMUPkGQIjonH3+EoSqU=
+ </data>
+ </dict>
<key>Headers/SDL_endian.h</key>
- <data>
- yIPSROTHpa65o98kvhVPa5vJd20=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ yIPSROTHpa65o98kvhVPa5vJd20=
+ </data>
+ <key>hash2</key>
+ <data>
+ KrtyIfWm85EAqqRC1WvxEhDMd/mDlhpSM4cgsqtcBV4=
+ </data>
+ </dict>
<key>Headers/SDL_error.h</key>
- <data>
- EKMXAYytkozTsnGEetwJSWxDdXs=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ EKMXAYytkozTsnGEetwJSWxDdXs=
+ </data>
+ <key>hash2</key>
+ <data>
+ SPul/9qHvppNntwC882a/WBVajzYBT1+tYPQ6DSGxFY=
+ </data>
+ </dict>
<key>Headers/SDL_events.h</key>
- <data>
- ADO6YH92cpZr0xch44chc5jDoBk=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ CPSA6t0dYtnPX0aOYMp2yBKYCII=
+ </data>
+ <key>hash2</key>
+ <data>
+ iYBVsC4VTUXBruL7Z8GMlmSGqlXRS2265FofuNaPOYE=
+ </data>
+ </dict>
<key>Headers/SDL_filesystem.h</key>
- <data>
- z0ipNXSs0G+cMSE5xJ/1OLb0iww=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ z0ipNXSs0G+cMSE5xJ/1OLb0iww=
+ </data>
+ <key>hash2</key>
+ <data>
+ 170/Jgr1x08XVFMFP063CU5vq7J364U4FmkwKSoeouc=
+ </data>
+ </dict>
<key>Headers/SDL_gamecontroller.h</key>
- <data>
- +fEy8fr9o1eNqVcgZxdAGSB+fdg=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ iDeu/H14U1KryUM2D/Co453LtOU=
+ </data>
+ <key>hash2</key>
+ <data>
+ wM7f8ttYHiwr0RPC6Lt86Hl46ZIcopI7u/TDDsiUKqE=
+ </data>
+ </dict>
<key>Headers/SDL_gesture.h</key>
- <data>
- gL8Pe0KmmUmvy06MPiwcXLy1RPc=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ gL8Pe0KmmUmvy06MPiwcXLy1RPc=
+ </data>
+ <key>hash2</key>
+ <data>
+ uSiw21vM1GILKVz+FNJkrfXkTxSQ1xXDoYyYbLgxfpg=
+ </data>
+ </dict>
<key>Headers/SDL_haptic.h</key>
- <data>
- mZKe1lBgPwES+wjXj+NqIqG4D7g=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ Mq/rLF1FAkGpnwiQ1d54/wGZbcc=
+ </data>
+ <key>hash2</key>
+ <data>
+ OuNe6t85VCJZ2Qm6pVJkqFJCoQVvPHOXp2triOR+cS8=
+ </data>
+ </dict>
<key>Headers/SDL_hints.h</key>
- <data>
- 8ccADZ7c1T6VURxXmnucUptCjFE=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ ilKKw9O5YhM690t3JMdfnZWFK7A=
+ </data>
+ <key>hash2</key>
+ <data>
+ 9xxfD/BNMH9ZeZ6Vt+Awhdw31+6Ge4IJKLR7hJvQo4k=
+ </data>
+ </dict>
<key>Headers/SDL_joystick.h</key>
- <data>
- GQ1apgzllUcFXq08Wp6GXfaItxk=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ ClOTSR3VDFhV1hCfp17slV2L0nE=
+ </data>
+ <key>hash2</key>
+ <data>
+ UJGdVwyqOlVhITntWwC6mj8nWYdL6uRT09oiRo1GME4=
+ </data>
+ </dict>
<key>Headers/SDL_keyboard.h</key>
- <data>
- wqXTQaRIpfh2YsZOyej8AymHDh4=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 2yGANM2j3KDAl2neetk1d8OlxKU=
+ </data>
+ <key>hash2</key>
+ <data>
+ iTmNAG0t6x3v3EUQxgSU9UPgbNVBS3CluskwtTANO3U=
+ </data>
+ </dict>
<key>Headers/SDL_keycode.h</key>
- <data>
- 6bL7lbeGExj/h8aqaSdhpq23rJY=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 6bL7lbeGExj/h8aqaSdhpq23rJY=
+ </data>
+ <key>hash2</key>
+ <data>
+ Uh8oV1XZoVd2eDYWb+dR3Qa1TzIS1uAAHU7l7/rdJVc=
+ </data>
+ </dict>
<key>Headers/SDL_loadso.h</key>
- <data>
- NpMytx6UwU3pTsWYm9KbfrSeyBM=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ NpMytx6UwU3pTsWYm9KbfrSeyBM=
+ </data>
+ <key>hash2</key>
+ <data>
+ 5a3r50goTxzN3z+14C/VyW5w54z9e5DNTrN99aTuBP4=
+ </data>
+ </dict>
<key>Headers/SDL_log.h</key>
- <data>
- rghDDMt7l/53fcvzIf2ueASgru0=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ rghDDMt7l/53fcvzIf2ueASgru0=
+ </data>
+ <key>hash2</key>
+ <data>
+ kBXM+MFIZIBsGOetv1LFzOhYWqOlgM7T6rRamLrXXsY=
+ </data>
+ </dict>
<key>Headers/SDL_main.h</key>
- <data>
- S4r/E0n7XChUx09exG9MmT+wVC4=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ sCHgY3RQ9/Waq6RXfI3e5ko2tFI=
+ </data>
+ <key>hash2</key>
+ <data>
+ qQmapC5rQ+k4JPi6Klex07haM1HM+k7ddRKVRY7pVII=
+ </data>
+ </dict>
<key>Headers/SDL_messagebox.h</key>
- <data>
- AofMdqXibVh1eLBrQBaSJtT2TBA=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ AofMdqXibVh1eLBrQBaSJtT2TBA=
+ </data>
+ <key>hash2</key>
+ <data>
+ OA0hxIIn3zrMJmBpURqqHGpUdbdYXQm+8zWjN9HBK+Q=
+ </data>
+ </dict>
<key>Headers/SDL_mouse.h</key>
- <data>
- I0gCdZwctoT8UsPkCyQcev84wic=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 2DiwOaEv3eVUPQOp6eijF8klb7s=
+ </data>
+ <key>hash2</key>
+ <data>
+ lMp9UoCDXLUwWq7XXfhteZIKmurkNC7DSz90mqg8cm4=
+ </data>
+ </dict>
<key>Headers/SDL_mutex.h</key>
- <data>
- V9Eo8zGubHioHOR/zDh7vxX7Ot0=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ V9Eo8zGubHioHOR/zDh7vxX7Ot0=
+ </data>
+ <key>hash2</key>
+ <data>
+ 0+Jp5UYC5Q0gq0UA78HXeDS11cU7plXD2gdF9uEOj3Y=
+ </data>
+ </dict>
<key>Headers/SDL_name.h</key>
- <data>
- mEOy6xwQy0aKcghbHD2Gk8AiE2Y=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ mEOy6xwQy0aKcghbHD2Gk8AiE2Y=
+ </data>
+ <key>hash2</key>
+ <data>
+ SmgwrJXssEcacZFXRiDMX9xEKqMyDQroMzMk49993/A=
+ </data>
+ </dict>
<key>Headers/SDL_opengl.h</key>
- <data>
- uLy76O02VpeHP49lGqfyOJZVN98=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ uLy76O02VpeHP49lGqfyOJZVN98=
+ </data>
+ <key>hash2</key>
+ <data>
+ wLqChYCR7CJXuJJszyfgZ4bmWgBV/xts/XXDTDacqbg=
+ </data>
+ </dict>
<key>Headers/SDL_opengl_glext.h</key>
- <data>
- nqPX1ObCVYyVzW3VbD3C/1vaTRE=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ nqPX1ObCVYyVzW3VbD3C/1vaTRE=
+ </data>
+ <key>hash2</key>
+ <data>
+ IULBL/m+rBc3UQPqu68w6FDM/Mda58oybFnlyn3OkjE=
+ </data>
+ </dict>
<key>Headers/SDL_opengles.h</key>
- <data>
- Qe8Wo6WE/eFYjQpZNSkjrEdPH3k=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ gHnWXXRnsPIVHQherf5NBPICBEQ=
+ </data>
+ <key>hash2</key>
+ <data>
+ tmnzU6otAGtXyGNO3Rgm47RNBMUC9uvGJRnRigm+Ds0=
+ </data>
+ </dict>
<key>Headers/SDL_opengles2.h</key>
- <data>
- j2409OmIX5ZzPeAohEUZ9fTY0dA=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 1pbpsJhtHMiZ6LOkM1CFU88l7v4=
+ </data>
+ <key>hash2</key>
+ <data>
+ 59G3rOK0wqwYm1+uCwRZkyZcif9vFWHBYKJVIko9qx8=
+ </data>
+ </dict>
<key>Headers/SDL_opengles2_gl2.h</key>
- <data>
- g4y04zPFy1H/qujSNGRd0vB7ClQ=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ g4y04zPFy1H/qujSNGRd0vB7ClQ=
+ </data>
+ <key>hash2</key>
+ <data>
+ 9GAwK0cg8YPrZHWVqMGpyVwKFz3Ay9VHiyz70jzWltA=
+ </data>
+ </dict>
<key>Headers/SDL_opengles2_gl2ext.h</key>
- <data>
- bTlnL+42kbi+n/gH//X2p0pqeuM=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ bTlnL+42kbi+n/gH//X2p0pqeuM=
+ </data>
+ <key>hash2</key>
+ <data>
+ 5404JOHXH4pGO60gR/uLhz9zW6fKy9jvdMw5i1WTcpo=
+ </data>
+ </dict>
<key>Headers/SDL_opengles2_gl2platform.h</key>
- <data>
- ByFMXJFtjcRglS/e0+DujyjC3dM=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ ByFMXJFtjcRglS/e0+DujyjC3dM=
+ </data>
+ <key>hash2</key>
+ <data>
+ wlKRTsmTMrnniYqSvQklJfb9VF07J0MDpqzYOcfiDDY=
+ </data>
+ </dict>
<key>Headers/SDL_opengles2_khrplatform.h</key>
- <data>
- NLpJq9uBqjOpWhXISOQHPnTp/XQ=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ NLpJq9uBqjOpWhXISOQHPnTp/XQ=
+ </data>
+ <key>hash2</key>
+ <data>
+ djHeDyzmR0e/2JNIbqpBqgi56MXlxlAbgcBFxuvwSyo=
+ </data>
+ </dict>
<key>Headers/SDL_pixels.h</key>
- <data>
- SYKqjrlfx4WBrF/7RJJcebj022I=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ Xvgibsz62Xj6AnQTD3nXR1RdP7w=
+ </data>
+ <key>hash2</key>
+ <data>
+ 6UZnQSfbBzEihA8AYXGuWafY4Q2rGbOIIICEM6NYb30=
+ </data>
+ </dict>
<key>Headers/SDL_platform.h</key>
- <data>
- yEP4Wx6FLQvho00DCxY4qMLDnV0=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ wq9EnHSCm8XK4eJux1ZR519KOy0=
+ </data>
+ <key>hash2</key>
+ <data>
+ byh3kf3MVWzZVyLbsv+q4PyAVHFlQZsUb4cwrhtyKHM=
+ </data>
+ </dict>
<key>Headers/SDL_power.h</key>
- <data>
- Hht8UlX2Q+ZZYP4+TOUjRtFj+Ww=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ Hht8UlX2Q+ZZYP4+TOUjRtFj+Ww=
+ </data>
+ <key>hash2</key>
+ <data>
+ UvkPQHn6hdbaJLPQ5kzRe/e0gLOv1n3E+JulK0DjxKA=
+ </data>
+ </dict>
<key>Headers/SDL_quit.h</key>
- <data>
- 4gv2IjG2mCPLKUXLEgxBp+zQLuM=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 4gv2IjG2mCPLKUXLEgxBp+zQLuM=
+ </data>
+ <key>hash2</key>
+ <data>
+ arq8WYQJrksLt0eOsjijzO5xyBEllBSguXTQo71QmiI=
+ </data>
+ </dict>
<key>Headers/SDL_rect.h</key>
- <data>
- ArluDPEgeo4k7O85ALBoryFpGyk=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ ArluDPEgeo4k7O85ALBoryFpGyk=
+ </data>
+ <key>hash2</key>
+ <data>
+ gbazbfs1AzykEDJ4sFrAu0dmtzUbEwOQFafBS7eH7So=
+ </data>
+ </dict>
<key>Headers/SDL_render.h</key>
- <data>
- geL0fIDmDRM/s1nP1HdMh7Bn+KY=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ D0japjJ6ym/uoSUpQnbUHnNDu5s=
+ </data>
+ <key>hash2</key>
+ <data>
+ c/5XEiLTcWSdqD9fa3GuTGVH83qKriuarIX/6pdjuCs=
+ </data>
+ </dict>
<key>Headers/SDL_revision.h</key>
- <data>
- U25Cfa7DqslNn/mqxEnMfgLnA9I=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 8ncx+diMb2Vfefe3XxBT7tDjqQQ=
+ </data>
+ <key>hash2</key>
+ <data>
+ jfHrBzZLeEMPUigODAU3KGZP3UvwmZyO0gkuK1Jxi60=
+ </data>
+ </dict>
<key>Headers/SDL_rwops.h</key>
- <data>
- NLcf6LWtFIqQT/OcVl+KUtvGVIY=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ DaBBCXUHnuJqAswfBxrMjTGznLU=
+ </data>
+ <key>hash2</key>
+ <data>
+ 9Q1FoSoktxxFXBEkfND5aVYY2W2TOg5CaVnT7pUYFeE=
+ </data>
+ </dict>
<key>Headers/SDL_scancode.h</key>
- <data>
- cFbtc//t5wQjDoEFox2sb72ixzM=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ cFbtc//t5wQjDoEFox2sb72ixzM=
+ </data>
+ <key>hash2</key>
+ <data>
+ imcWyCJ20Xb2gxJjs3a2ArJas11FDAlB7sPHOwuoTLY=
+ </data>
+ </dict>
<key>Headers/SDL_shape.h</key>
- <data>
- uI7SsJKg+9VUi3Ol3HSjbrfJiuw=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ uI7SsJKg+9VUi3Ol3HSjbrfJiuw=
+ </data>
+ <key>hash2</key>
+ <data>
+ 2t551rTZEMPl0aLCmAjkDLSDEFigY96X6cqZvRWqbB4=
+ </data>
+ </dict>
<key>Headers/SDL_stdinc.h</key>
- <data>
- EqWdk11X5VFG5/gIaFSC2tThVN0=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ UKINkMUBmh6G37JGdhy4vm5nXqY=
+ </data>
+ <key>hash2</key>
+ <data>
+ Y3Ese7AsGxbczlpolRbaswp3Wc63deF3QggyuzGUaWg=
+ </data>
+ </dict>
<key>Headers/SDL_surface.h</key>
- <data>
- WoUDHhIvivPiGkT/PjIt7/Wag0k=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ Two0va+fVFaiXhlhgOY9/llpEZw=
+ </data>
+ <key>hash2</key>
+ <data>
+ D9hAM0KyWDPRXIsik3F+i601/aEFra/CbdgrhgwgseI=
+ </data>
+ </dict>
<key>Headers/SDL_system.h</key>
- <data>
- mTKo4PBIinn03uXfN1DJ/He9e9k=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ mTKo4PBIinn03uXfN1DJ/He9e9k=
+ </data>
+ <key>hash2</key>
+ <data>
+ b8MsbjBkpqYSflbHcYcGNfTvwCs6LkOTlfCroagtLPY=
+ </data>
+ </dict>
<key>Headers/SDL_syswm.h</key>
- <data>
- ZpNuqGdez02XRnDbUCnPQlvrpQg=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ enV9cJuGdUnZO1QlHW5sTuu7a6I=
+ </data>
+ <key>hash2</key>
+ <data>
+ 4xIVBafoNBEGMdBQoarbShg8lTmJzZtWFnOhemFCGq0=
+ </data>
+ </dict>
<key>Headers/SDL_thread.h</key>
- <data>
- 7j7DqnFpoS63qhuVR2Q0gSa/4ds=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 7j7DqnFpoS63qhuVR2Q0gSa/4ds=
+ </data>
+ <key>hash2</key>
+ <data>
+ G8Nrk6RRTWxDtQYJEn5Qo6wl+MZaTh/c6NzEgwwFd6E=
+ </data>
+ </dict>
<key>Headers/SDL_timer.h</key>
- <data>
- wTTvR/s4oORZCAHQrwGvEitdftg=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ wTTvR/s4oORZCAHQrwGvEitdftg=
+ </data>
+ <key>hash2</key>
+ <data>
+ XXlmOyzGaHB9cV+ExAECBNr75+tSUVXhKN+oXovGrqs=
+ </data>
+ </dict>
<key>Headers/SDL_touch.h</key>
- <data>
- iTKBLV0gnsn1y4RjFyKjss42FAw=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ iTKBLV0gnsn1y4RjFyKjss42FAw=
+ </data>
+ <key>hash2</key>
+ <data>
+ kt96CgBUHCsYb5bk8zIonTCA23GhM9HKsWpbOE5WuAk=
+ </data>
+ </dict>
<key>Headers/SDL_types.h</key>
- <data>
- sxzg0bkqO1atJAHHIFE6TMMWt+w=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ sxzg0bkqO1atJAHHIFE6TMMWt+w=
+ </data>
+ <key>hash2</key>
+ <data>
+ U+e5nUQUJ0kM7y4x93oe6JZVcWjsssOlHwitGh+Oxuc=
+ </data>
+ </dict>
<key>Headers/SDL_version.h</key>
- <data>
- H5m85H3BgpanqxVVrr8x27umKn0=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ Shb8tayezQvZheoYHG/w0dZ74RQ=
+ </data>
+ <key>hash2</key>
+ <data>
+ vp7z5LS6efRrPJHGCl33jorZuwWW/qusGbV/YS0V69k=
+ </data>
+ </dict>
<key>Headers/SDL_video.h</key>
- <data>
- vdRhnMIZssjdCJ72fNj04OTX3u0=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ 0VCISfUtCna3Dgz1lDJ/yzsXYRw=
+ </data>
+ <key>hash2</key>
+ <data>
+ hRR0gP6rfsCPS63Xb3iOXbtAq9J+w2K0n1EOcoF/sfQ=
+ </data>
+ </dict>
<key>Headers/begin_code.h</key>
- <data>
- WnMoGL8utnke7xWxpDeTFp+/QIA=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ WnMoGL8utnke7xWxpDeTFp+/QIA=
+ </data>
+ <key>hash2</key>
+ <data>
+ GCO8amg+TMHAV+gV/E1TKPR6Pm2i3UCWpCABk5f/zZs=
+ </data>
+ </dict>
<key>Headers/close_code.h</key>
- <data>
- nnSi+1tlfaAkwmjGng6tRmzXcnw=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ nnSi+1tlfaAkwmjGng6tRmzXcnw=
+ </data>
+ <key>hash2</key>
+ <data>
+ F1nVEPM19lh1dCbsk1yMBecmBYd0DrQb13nImbvdgBU=
+ </data>
+ </dict>
<key>Resources/Info.plist</key>
- <data>
- p+Cz4Y64VH6pZL+sceQcjAJniME=
- </data>
+ <dict>
+ <key>hash</key>
+ <data>
+ bZkANAXaqONeP7JKT7J8irtx1LQ=
+ </data>
+ <key>hash2</key>
+ <data>
+ KYKFeBKZJYQhDbO6O+et8ynCeQmtiB98QGh3JGyW3kY=
+ </data>
+ </dict>
</dict>
<key>rules</key>
<dict>