diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL.h b/bsp/simulator/SDL2-2.0.7/include/SDL.h deleted file mode 100644 index 366d50fa39095f0185247d490b31753351ef887c..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL.h +++ /dev/null @@ -1,133 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL.h - * - * Main include header for the SDL library - */ - - -#ifndef SDL_h_ -#define SDL_h_ - -#include "SDL_main.h" -#include "SDL_stdinc.h" -#include "SDL_assert.h" -#include "SDL_atomic.h" -#include "SDL_audio.h" -#include "SDL_clipboard.h" -#include "SDL_cpuinfo.h" -#include "SDL_endian.h" -#include "SDL_error.h" -#include "SDL_events.h" -#include "SDL_filesystem.h" -#include "SDL_gamecontroller.h" -#include "SDL_haptic.h" -#include "SDL_hints.h" -#include "SDL_joystick.h" -#include "SDL_loadso.h" -#include "SDL_log.h" -#include "SDL_messagebox.h" -#include "SDL_mutex.h" -#include "SDL_power.h" -#include "SDL_render.h" -#include "SDL_rwops.h" -#include "SDL_shape.h" -#include "SDL_system.h" -#include "SDL_thread.h" -#include "SDL_timer.h" -#include "SDL_version.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* As of version 0.5, SDL is loaded dynamically into the application */ - -/** - * \name SDL_INIT_* - * - * These are the flags which may be passed to SDL_Init(). You should - * specify the subsystems which you will be using in your application. - */ -/* @{ */ -#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 the subsystems specified by \c flags - */ -extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags); - -/** - * This function initializes specific SDL subsystems - * - * Subsystem initialization is ref-counted, you must call - * SDL_QuitSubSystem() for each SDL_InitSubSystem() to correctly - * shutdown a subsystem manually (or call SDL_Quit() to force shutdown). - * If a subsystem is already loaded then this call will - * increase the ref-count and return. - */ -extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags); - -/** - * This function cleans up specific SDL subsystems - */ -extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags); - -/** - * This function returns a mask of the specified subsystems which have - * previously been initialized. - * - * If \c flags is 0, it returns a mask of all initialized subsystems. - */ -extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags); - -/** - * This function cleans up all initialized subsystems. You should - * call it upon all exit conditions. - */ -extern DECLSPEC void SDLCALL SDL_Quit(void); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_audio.h b/bsp/simulator/SDL2-2.0.7/include/SDL_audio.h deleted file mode 100644 index f119c2b2678fc531efe1d3ecc8b1f1751169de53..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_audio.h +++ /dev/null @@ -1,825 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_audio.h - * - * Access to the raw audio mixing buffer for the SDL library. - */ - -#ifndef SDL_audio_h_ -#define SDL_audio_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_endian.h" -#include "SDL_mutex.h" -#include "SDL_thread.h" -#include "SDL_rwops.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Audio format flags. - * - * These are what the 16 bits in SDL_AudioFormat currently mean... - * (Unspecified bits are always zero). - * - * \verbatim - ++-----------------------sample is signed if set - || - || ++-----------sample is bigendian if set - || || - || || ++---sample is float if set - || || || - || || || +---sample bit size---+ - || || || | | - 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 - \endverbatim - * - * There are macros in SDL 2.0 and later to query these bits. - */ -typedef Uint16 SDL_AudioFormat; - -/** - * \name Audio flags - */ -/* @{ */ - -#define SDL_AUDIO_MASK_BITSIZE (0xFF) -#define SDL_AUDIO_MASK_DATATYPE (1<<8) -#define SDL_AUDIO_MASK_ENDIAN (1<<12) -#define SDL_AUDIO_MASK_SIGNED (1<<15) -#define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE) -#define SDL_AUDIO_ISFLOAT(x) (x & SDL_AUDIO_MASK_DATATYPE) -#define SDL_AUDIO_ISBIGENDIAN(x) (x & SDL_AUDIO_MASK_ENDIAN) -#define SDL_AUDIO_ISSIGNED(x) (x & SDL_AUDIO_MASK_SIGNED) -#define SDL_AUDIO_ISINT(x) (!SDL_AUDIO_ISFLOAT(x)) -#define SDL_AUDIO_ISLITTLEENDIAN(x) (!SDL_AUDIO_ISBIGENDIAN(x)) -#define SDL_AUDIO_ISUNSIGNED(x) (!SDL_AUDIO_ISSIGNED(x)) - -/** - * \name Audio format flags - * - * Defaults to LSB byte order. - */ -/* @{ */ -#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */ -#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */ -#define AUDIO_U16LSB 0x0010 /**< Unsigned 16-bit samples */ -#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */ -#define AUDIO_U16MSB 0x1010 /**< As above, but big-endian byte order */ -#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */ -#define AUDIO_U16 AUDIO_U16LSB -#define AUDIO_S16 AUDIO_S16LSB -/* @} */ - -/** - * \name int32 support - */ -/* @{ */ -#define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */ -#define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */ -#define AUDIO_S32 AUDIO_S32LSB -/* @} */ - -/** - * \name float32 support - */ -/* @{ */ -#define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */ -#define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */ -#define AUDIO_F32 AUDIO_F32LSB -/* @} */ - -/** - * \name Native audio byte ordering - */ -/* @{ */ -#if SDL_BYTEORDER == SDL_LIL_ENDIAN -#define AUDIO_U16SYS AUDIO_U16LSB -#define AUDIO_S16SYS AUDIO_S16LSB -#define AUDIO_S32SYS AUDIO_S32LSB -#define AUDIO_F32SYS AUDIO_F32LSB -#else -#define AUDIO_U16SYS AUDIO_U16MSB -#define AUDIO_S16SYS AUDIO_S16MSB -#define AUDIO_S32SYS AUDIO_S32MSB -#define AUDIO_F32SYS AUDIO_F32MSB -#endif -/* @} */ - -/** - * \name Allow change flags - * - * Which audio format changes are allowed when opening a device. - */ -/* @{ */ -#define SDL_AUDIO_ALLOW_FREQUENCY_CHANGE 0x00000001 -#define SDL_AUDIO_ALLOW_FORMAT_CHANGE 0x00000002 -#define SDL_AUDIO_ALLOW_CHANNELS_CHANGE 0x00000004 -#define SDL_AUDIO_ALLOW_ANY_CHANGE (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE) -/* @} */ - -/* @} *//* Audio flags */ - -/** - * This function is called when the audio device needs more data. - * - * \param userdata An application-specific parameter saved in - * the SDL_AudioSpec structure - * \param stream A pointer to the audio data buffer. - * \param len The length of that buffer in bytes. - * - * Once the callback returns, the buffer will no longer be valid. - * Stereo samples are stored in a LRLRLR ordering. - * - * You can choose to avoid callbacks and use SDL_QueueAudio() instead, if - * you like. Just open your audio device with a NULL callback. - */ -typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, - int len); - -/** - * The calculated values in this structure are calculated by SDL_OpenAudio(). - * - * For multi-channel audio, the default SDL channel mapping is: - * 2: FL FR (stereo) - * 3: FL FR LFE (2.1 surround) - * 4: FL FR BL BR (quad) - * 5: FL FR FC BL BR (quad + center) - * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR) - * 7: FL FR FC LFE BC SL SR (6.1 surround) - * 8: FL FR FC LFE BL BR SL SR (7.1 surround) - */ -typedef struct SDL_AudioSpec -{ - int freq; /**< DSP frequency -- samples per second */ - SDL_AudioFormat format; /**< Audio data format */ - Uint8 channels; /**< Number of channels: 1 mono, 2 stereo */ - Uint8 silence; /**< Audio buffer silence value (calculated) */ - Uint16 samples; /**< Audio buffer size in sample FRAMES (total samples divided by channel count) */ - Uint16 padding; /**< Necessary for some compile environments */ - Uint32 size; /**< Audio buffer size in bytes (calculated) */ - SDL_AudioCallback callback; /**< Callback that feeds the audio device (NULL to use SDL_QueueAudio()). */ - void *userdata; /**< Userdata passed to callback (ignored for NULL callbacks). */ -} SDL_AudioSpec; - - -struct SDL_AudioCVT; -typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt, - SDL_AudioFormat format); - -/** - * \brief Upper limit of filters in SDL_AudioCVT - * - * The maximum number of SDL_AudioFilter functions in SDL_AudioCVT is - * currently limited to 9. The SDL_AudioCVT.filters array has 10 pointers, - * one of which is the terminating NULL pointer. - */ -#define SDL_AUDIOCVT_MAX_FILTERS 9 - -/** - * \struct SDL_AudioCVT - * \brief A structure to hold a set of audio conversion filters and buffers. - * - * Note that various parts of the conversion pipeline can take advantage - * of SIMD operations (like SSE2, for example). SDL_AudioCVT doesn't require - * you to pass it aligned data, but can possibly run much faster if you - * set both its (buf) field to a pointer that is aligned to 16 bytes, and its - * (len) field to something that's a multiple of 16, if possible. - */ -#ifdef __GNUC__ -/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't - pad it out to 88 bytes to guarantee ABI compatibility between compilers. - vvv - The next time we rev the ABI, make sure to size the ints and add padding. -*/ -#define SDL_AUDIOCVT_PACKED __attribute__((packed)) -#else -#define SDL_AUDIOCVT_PACKED -#endif -/* */ -typedef struct SDL_AudioCVT -{ - int needed; /**< Set to 1 if conversion possible */ - SDL_AudioFormat src_format; /**< Source audio format */ - SDL_AudioFormat dst_format; /**< Target audio format */ - double rate_incr; /**< Rate conversion increment */ - Uint8 *buf; /**< Buffer to hold entire audio data */ - int len; /**< Length of original audio buffer */ - int len_cvt; /**< Length of converted audio buffer */ - int len_mult; /**< buffer must be len*len_mult big */ - double len_ratio; /**< Given len, final size is len*len_ratio */ - SDL_AudioFilter filters[SDL_AUDIOCVT_MAX_FILTERS + 1]; /**< NULL-terminated list of filter functions */ - int filter_index; /**< Current audio conversion function */ -} SDL_AUDIOCVT_PACKED SDL_AudioCVT; - - -/* Function prototypes */ - -/** - * \name Driver discovery functions - * - * These functions return the list of built in audio drivers, in the - * order that they are normally initialized by default. - */ -/* @{ */ -extern DECLSPEC int SDLCALL SDL_GetNumAudioDrivers(void); -extern DECLSPEC const char *SDLCALL SDL_GetAudioDriver(int index); -/* @} */ - -/** - * \name Initialization and cleanup - * - * \internal These functions are used internally, and should not be used unless - * you have a specific need to specify the audio driver you want to - * use. You should normally use SDL_Init() or SDL_InitSubSystem(). - */ -/* @{ */ -extern DECLSPEC int SDLCALL SDL_AudioInit(const char *driver_name); -extern DECLSPEC void SDLCALL SDL_AudioQuit(void); -/* @} */ - -/** - * This function returns the name of the current audio driver, or NULL - * if no driver has been initialized. - */ -extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void); - -/** - * This function opens the audio device with the desired parameters, and - * returns 0 if successful, placing the actual hardware parameters in the - * structure pointed to by \c obtained. If \c obtained is NULL, the audio - * data passed to the callback function will be guaranteed to be in the - * requested format, and will be automatically converted to the hardware - * audio format if necessary. This function returns -1 if it failed - * to open the audio device, or couldn't set up the audio thread. - * - * When filling in the desired audio spec structure, - * - \c desired->freq should be the desired audio frequency in samples-per- - * second. - * - \c desired->format should be the desired audio format. - * - \c desired->samples is the desired size of the audio buffer, in - * samples. This number should be a power of two, and may be adjusted by - * the audio driver to a value more suitable for the hardware. Good values - * seem to range between 512 and 8096 inclusive, depending on the - * application and CPU speed. Smaller values yield faster response time, - * but can lead to underflow if the application is doing heavy processing - * and cannot fill the audio buffer in time. A stereo sample consists of - * both right and left channels in LR ordering. - * Note that the number of samples is directly related to time by the - * following formula: \code ms = (samples*1000)/freq \endcode - * - \c desired->size is the size in bytes of the audio buffer, and is - * calculated by SDL_OpenAudio(). - * - \c desired->silence is the value used to set the buffer to silence, - * and is calculated by SDL_OpenAudio(). - * - \c desired->callback should be set to a function that will be called - * when the audio device is ready for more data. It is passed a pointer - * to the audio buffer, and the length in bytes of the audio buffer. - * This function usually runs in a separate thread, and so you should - * 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 (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. - * - * The audio device starts out playing silence when it's opened, and should - * be enabled for playing by calling \c SDL_PauseAudio(0) when you are ready - * for your audio callback function to be called. Since the audio driver - * may modify the requested size of the audio buffer, you should allocate - * any local mixing buffers after you open the audio device. - */ -extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired, - SDL_AudioSpec * obtained); - -/** - * SDL Audio Device IDs. - * - * A successful call to SDL_OpenAudio() is always device id 1, and legacy - * SDL audio APIs assume you want this device ID. SDL_OpenAudioDevice() calls - * always returns devices >= 2 on success. The legacy calls are good both - * for backwards compatibility and when you don't care about multiple, - * specific, or capture devices. - */ -typedef Uint32 SDL_AudioDeviceID; - -/** - * Get the number of available devices exposed by the current driver. - * Only valid after a successfully initializing the audio subsystem. - * Returns -1 if an explicit list of devices can't be determined; this is - * not an error. For example, if SDL is set up to talk to a remote audio - * server, it can't list every one available on the Internet, but it will - * still allow a specific host to be specified to SDL_OpenAudioDevice(). - * - * In many common cases, when this function returns a value <= 0, it can still - * successfully open the default device (NULL for first argument of - * SDL_OpenAudioDevice()). - */ -extern DECLSPEC int SDLCALL SDL_GetNumAudioDevices(int iscapture); - -/** - * Get the human-readable name of a specific audio device. - * Must be a value between 0 and (number of audio devices-1). - * Only valid after a successfully initializing the audio subsystem. - * The values returned by this function reflect the latest call to - * SDL_GetNumAudioDevices(); recall that function to redetect available - * hardware. - * - * The string returned by this function is UTF-8 encoded, read-only, and - * managed internally. You are not to free it. If you need to keep the - * string for any length of time, you should make your own copy of it, as it - * will be invalid next time any of several other SDL functions is called. - */ -extern DECLSPEC const char *SDLCALL SDL_GetAudioDeviceName(int index, - int iscapture); - - -/** - * Open a specific audio device. Passing in a device name of NULL requests - * the most reasonable default (and is equivalent to calling SDL_OpenAudio()). - * - * The device name is a UTF-8 string reported by SDL_GetAudioDeviceName(), but - * some drivers allow arbitrary and driver-specific strings, such as a - * hostname/IP address for a remote audio server, or a filename in the - * diskaudio driver. - * - * \return 0 on error, a valid device ID that is >= 2 on success. - * - * SDL_OpenAudio(), unlike this function, always acts on device ID 1. - */ -extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char - *device, - int iscapture, - const - SDL_AudioSpec * - desired, - SDL_AudioSpec * - obtained, - int - allowed_changes); - - - -/** - * \name Audio state - * - * Get the current audio state. - */ -/* @{ */ -typedef enum -{ - SDL_AUDIO_STOPPED = 0, - SDL_AUDIO_PLAYING, - SDL_AUDIO_PAUSED -} SDL_AudioStatus; -extern DECLSPEC SDL_AudioStatus SDLCALL SDL_GetAudioStatus(void); - -extern DECLSPEC SDL_AudioStatus SDLCALL -SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev); -/* @} *//* Audio State */ - -/** - * \name Pause audio functions - * - * These functions pause and unpause the audio callback processing. - * They should be called with a parameter of 0 after opening the audio - * device to start playing sound. This is so you can safely initialize - * data for your callback function after opening the audio device. - * Silence will be written to the audio device during the pause. - */ -/* @{ */ -extern DECLSPEC void SDLCALL SDL_PauseAudio(int pause_on); -extern DECLSPEC void SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev, - int pause_on); -/* @} *//* Pause audio functions */ - -/** - * This function loads a WAVE from the data source, automatically freeing - * that source if \c freesrc is non-zero. For example, to load a WAVE file, - * you could do: - * \code - * SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...); - * \endcode - * - * If this function succeeds, it returns the given SDL_AudioSpec, - * filled with the audio data format of the wave data, and sets - * \c *audio_buf to a malloc()'d buffer containing the audio data, - * and sets \c *audio_len to the length of that audio buffer, in bytes. - * You need to free the audio buffer with SDL_FreeWAV() when you are - * done with it. - * - * This function returns NULL and sets the SDL error message if the - * wave file cannot be opened, uses an unknown data format, or is - * corrupt. Currently raw and MS-ADPCM WAVE files are supported. - */ -extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src, - int freesrc, - SDL_AudioSpec * spec, - Uint8 ** audio_buf, - Uint32 * audio_len); - -/** - * Loads a WAV from a file. - * Compatibility convenience function. - */ -#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \ - SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len) - -/** - * This function frees data previously allocated with SDL_LoadWAV_RW() - */ -extern DECLSPEC void SDLCALL SDL_FreeWAV(Uint8 * audio_buf); - -/** - * This function takes a source format and rate and a destination format - * and rate, and initializes the \c cvt structure with information needed - * by SDL_ConvertAudio() to convert a buffer of audio data from one format - * to the other. An unsupported format causes an error and -1 will be returned. - * - * \return 0 if no conversion is needed, 1 if the audio filter is set up, - * or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt, - SDL_AudioFormat src_format, - Uint8 src_channels, - int src_rate, - SDL_AudioFormat dst_format, - Uint8 dst_channels, - int dst_rate); - -/** - * Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(), - * created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of - * audio data in the source format, this function will convert it in-place - * to the desired format. - * - * The data conversion may expand the size of the audio data, so the buffer - * \c cvt->buf should be allocated after the \c cvt structure is initialized by - * SDL_BuildAudioCVT(), and should be \c cvt->len*cvt->len_mult bytes long. - * - * \return 0 on success or -1 if \c cvt->buf is NULL. - */ -extern DECLSPEC int SDLCALL SDL_ConvertAudio(SDL_AudioCVT * cvt); - -/* SDL_AudioStream is a new audio conversion interface. - The benefits vs SDL_AudioCVT: - - it can handle resampling data in chunks without generating - artifacts, when it doesn't have the complete buffer available. - - it can handle incoming data in any variable size. - - You push data as you have it, and pull it when you need it - */ -/* this is opaque to the outside world. */ -struct _SDL_AudioStream; -typedef struct _SDL_AudioStream SDL_AudioStream; - -/** - * Create a new audio stream - * - * \param src_format The format of the source audio - * \param src_channels The number of channels of the source audio - * \param src_rate The sampling rate of the source audio - * \param dst_format The format of the desired audio output - * \param dst_channels The number of channels of the desired audio output - * \param dst_rate The sampling rate of the desired audio output - * \return 0 on success, or -1 on error. - * - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC SDL_AudioStream * SDLCALL SDL_NewAudioStream(const SDL_AudioFormat src_format, - const Uint8 src_channels, - const int src_rate, - const SDL_AudioFormat dst_format, - const Uint8 dst_channels, - const int dst_rate); - -/** - * Add data to be converted/resampled to the stream - * - * \param stream The stream the audio data is being added to - * \param buf A pointer to the audio data to add - * \param int The number of bytes to write to the stream - * \return 0 on success, or -1 on error. - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len); - -/** - * Get converted/resampled data from the stream - * - * \param stream The stream the audio is being requested from - * \param buf A buffer to fill with audio data - * \param len The maximum number of bytes to fill - * \return The number of bytes read from the stream, or -1 on error - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len); - -/** - * Get the number of converted/resampled bytes available. The stream may be - * buffering data behind the scenes until it has enough to resample - * correctly, so this number might be lower than what you expect, or even - * be zero. Add more data or flush the stream if you need the data now. - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamAvailable(SDL_AudioStream *stream); - -/** - * Tell the stream that you're done sending data, and anything being buffered - * should be converted/resampled and made available immediately. - * - * It is legal to add more data to a stream after flushing, but there will - * be audio gaps in the output. Generally this is intended to signal the - * end of input, so the complete output becomes available. - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamClear - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC int SDLCALL SDL_AudioStreamFlush(SDL_AudioStream *stream); - -/** - * Clear any pending data in the stream without converting it - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_FreeAudioStream - */ -extern DECLSPEC void SDLCALL SDL_AudioStreamClear(SDL_AudioStream *stream); - -/** - * Free an audio stream - * - * \sa SDL_NewAudioStream - * \sa SDL_AudioStreamPut - * \sa SDL_AudioStreamGet - * \sa SDL_AudioStreamAvailable - * \sa SDL_AudioStreamFlush - * \sa SDL_AudioStreamClear - */ -extern DECLSPEC void SDLCALL SDL_FreeAudioStream(SDL_AudioStream *stream); - -#define SDL_MIX_MAXVOLUME 128 -/** - * This takes two audio buffers of the playing audio format and mixes - * them, performing addition, volume adjustment, and overflow clipping. - * The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME - * for full audio volume. Note this does not change hardware volume. - * This is provided for convenience -- you can mix your own audio data. - */ -extern DECLSPEC void SDLCALL SDL_MixAudio(Uint8 * dst, const Uint8 * src, - Uint32 len, int volume); - -/** - * This works like SDL_MixAudio(), but you specify the audio format instead of - * using the format of audio device 1. Thus it can be used when no audio - * device is open at all. - */ -extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst, - const Uint8 * src, - SDL_AudioFormat format, - Uint32 len, int volume); - -/** - * 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 - * you to supply data at regular intervals (push method) with this function. - * - * There are no limits on the amount of data you can queue, short of - * exhaustion of address space. Queued data will drain to the device as - * necessary without further intervention from you. If the device needs - * audio but there is not enough queued, it will play silence to make up - * the difference. This means you will have skips in your audio playback - * if you aren't routinely queueing sufficient data. - * - * This function copies the supplied data, so you are safe to free it when - * the function returns. This function is thread-safe, but queueing to the - * same device from two threads at once does not promise which buffer will - * be queued first. - * - * You may not queue audio on a device that is using an application-supplied - * callback; doing so returns an error. You have to use the audio callback - * or queue audio with this function, but not both. - * - * You should not call SDL_LockAudio() on the device before queueing; SDL - * handles locking internally for this function. - * - * \param dev The device ID to which we will queue audio. - * \param data The data to queue to the device for later playback. - * \param len The number of bytes (not samples!) to which (data) points. - * \return 0 on success, or -1 on error. - * - * \sa SDL_GetQueuedAudioSize - * \sa SDL_ClearQueuedAudio - */ -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. - * - * 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: - * - * 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 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. - * - * \param dev The device ID of which we will query queued audio size. - * \return Number of bytes (not samples!) of queued audio. - * - * \sa SDL_QueueAudio - * \sa SDL_ClearQueuedAudio - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev); - -/** - * Drop any queued audio data. 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. 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 - * fraction of a second of audio that might still be heard. This can be - * useful if you want to, say, drop any pending music during a level change - * in your game. - * - * You may not queue audio on a device that is using an application-supplied - * callback; calling this function on such a device is always a no-op. - * You have to 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. - * - * This function always succeeds and thus returns void. - * - * \param dev The device ID of which to clear the audio queue. - * - * \sa SDL_QueueAudio - * \sa SDL_GetQueuedAudioSize - */ -extern DECLSPEC void SDLCALL SDL_ClearQueuedAudio(SDL_AudioDeviceID dev); - - -/** - * \name Audio lock functions - * - * The lock manipulated by these functions protects the callback function. - * During a SDL_LockAudio()/SDL_UnlockAudio() pair, you can be guaranteed that - * the callback function is not running. Do not call these from the callback - * function or you will cause deadlock. - */ -/* @{ */ -extern DECLSPEC void SDLCALL SDL_LockAudio(void); -extern DECLSPEC void SDLCALL SDL_LockAudioDevice(SDL_AudioDeviceID dev); -extern DECLSPEC void SDLCALL SDL_UnlockAudio(void); -extern DECLSPEC void SDLCALL SDL_UnlockAudioDevice(SDL_AudioDeviceID dev); -/* @} *//* Audio lock functions */ - -/** - * This function shuts down audio processing and closes the audio device. - */ -extern DECLSPEC void SDLCALL SDL_CloseAudio(void); -extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_audio_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_blendmode.h b/bsp/simulator/SDL2-2.0.7/include/SDL_blendmode.h deleted file mode 100644 index 9abd0bd4cf11c6d4d9931a20f21db32e2af0cdc6..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_blendmode.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_blendmode.h - * - * Header file declaring the SDL_BlendMode enumeration - */ - -#ifndef SDL_blendmode_h_ -#define SDL_blendmode_h_ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The blend mode used in SDL_RenderCopy() and drawing operations. - */ -typedef enum -{ - SDL_BLENDMODE_NONE = 0x00000000, /**< no blending - dstRGBA = srcRGBA */ - SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending - dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) - dstA = srcA + (dstA * (1-srcA)) */ - SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending - dstRGB = (srcRGB * srcA) + dstRGB - dstA = dstA */ - SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate - dstRGB = srcRGB * dstRGB - dstA = dstA */ - SDL_BLENDMODE_INVALID = 0x7FFFFFFF - - /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */ - -} SDL_BlendMode; - -/** - * \brief The blend operation used when combining source and destination pixel components - */ -typedef enum -{ - SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */ - SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */ - SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */ - SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D11 */ - SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D11 */ - -} SDL_BlendOperation; - -/** - * \brief The normalized factor used to multiply pixel components - */ -typedef enum -{ - SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */ - SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */ - SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */ - SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */ - SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */ - SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */ - SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */ - SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */ - SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */ - SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */ - -} SDL_BlendFactor; - -/** - * \brief Create a custom blend mode, which may or may not be supported by a given renderer - * - * \param srcColorFactor - * \param dstColorFactor - * \param colorOperation - * \param srcAlphaFactor - * \param dstAlphaFactor - * \param alphaOperation - * - * The result of the blend mode operation will be: - * dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor - * and - * dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor - */ -extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, - SDL_BlendFactor dstColorFactor, - SDL_BlendOperation colorOperation, - SDL_BlendFactor srcAlphaFactor, - SDL_BlendFactor dstAlphaFactor, - SDL_BlendOperation alphaOperation); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_blendmode_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_cpuinfo.h b/bsp/simulator/SDL2-2.0.7/include/SDL_cpuinfo.h deleted file mode 100644 index 94b64b03bc5dd394af7f2ccfc5968fb1c0e9dfc5..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_cpuinfo.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_cpuinfo.h - * - * CPU feature detection for SDL. - */ - -#ifndef SDL_cpuinfo_h_ -#define SDL_cpuinfo_h_ - -#include "SDL_stdinc.h" - -/* Need to do this here because intrin.h has C++ code in it */ -/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */ -#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64)) -#ifdef __clang__ -/* Many of the intrinsics SDL uses are not implemented by clang with Visual Studio */ -#undef __MMX__ -#undef __SSE__ -#undef __SSE2__ -#else -#include -#ifndef _WIN64 -#define __MMX__ -#define __3dNOW__ -#endif -#define __SSE__ -#define __SSE2__ -#endif /* __clang__ */ -#elif defined(__MINGW64_VERSION_MAJOR) -#include -#else -#ifdef __ALTIVEC__ -#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) -#include -#undef pixel -#endif -#endif -#ifdef __MMX__ -#include -#endif -#ifdef __3dNOW__ -#include -#endif -#ifdef __SSE__ -#include -#endif -#ifdef __SSE2__ -#include -#endif -#ifdef __SSE3__ -#include -#endif -#endif - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* This is a guess for the cacheline size used for padding. - * Most x86 processors have a 64 byte cache line. - * The 64-bit PowerPC processors have a 128 byte cache line. - * We'll use the larger value to be generally safe. - */ -#define SDL_CACHELINE_SIZE 128 - -/** - * This function returns the number of CPU cores available. - */ -extern DECLSPEC int SDLCALL SDL_GetCPUCount(void); - -/** - * This function returns the L1 cache line size of the CPU - * - * This is useful for determining multi-threaded structure padding - * or SIMD prefetch sizes. - */ -extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void); - -/** - * This function returns true if the CPU has the RDTSC instruction. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void); - -/** - * This function returns true if the CPU has AltiVec features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void); - -/** - * This function returns true if the CPU has MMX features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void); - -/** - * This function returns true if the CPU has 3DNow! features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void); - -/** - * This function returns true if the CPU has SSE features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void); - -/** - * This function returns true if the CPU has SSE2 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void); - -/** - * This function returns true if the CPU has SSE3 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void); - -/** - * This function returns true if the CPU has SSE4.1 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void); - -/** - * This function returns true if the CPU has SSE4.2 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void); - -/** - * This function returns true if the CPU has AVX features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void); - -/** - * This function returns true if the CPU has AVX2 features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void); - -/** - * This function returns true if the CPU has NEON (ARM SIMD) features. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void); - -/** - * This function returns the amount of RAM configured in the system, in MB. - */ -extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_cpuinfo_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_error.h b/bsp/simulator/SDL2-2.0.7/include/SDL_error.h deleted file mode 100644 index 49be9827e182ae56227e8dde300b7e8c03f8cfb8..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_error.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_error.h - * - * Simple error message routines for SDL. - */ - -#ifndef SDL_error_h_ -#define SDL_error_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Public functions */ -/* SDL_SetError() unconditionally returns -1. */ -extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); -extern DECLSPEC const char *SDLCALL SDL_GetError(void); -extern DECLSPEC void SDLCALL SDL_ClearError(void); - -/** - * \name Internal error functions - * - * \internal - * Private error reporting function - used internally. - */ -/* @{ */ -#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) -#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) -#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) -typedef enum -{ - SDL_ENOMEM, - SDL_EFREAD, - SDL_EFWRITE, - SDL_EFSEEK, - SDL_UNSUPPORTED, - SDL_LASTERROR -} SDL_errorcode; -/* SDL_Error() unconditionally returns -1. */ -extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); -/* @} *//* Internal error functions */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_error_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_filesystem.h b/bsp/simulator/SDL2-2.0.7/include/SDL_filesystem.h deleted file mode 100644 index a1c846ad0f07b71a61a60c147c709c2dc6e2c15f..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_filesystem.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_filesystem.h - * - * \brief Include file for filesystem SDL API functions - */ - -#ifndef SDL_filesystem_h_ -#define SDL_filesystem_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" - -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Get the path where the application resides. - * - * Get the "base path". This is the directory where the application was run - * from, which is probably the installation directory, and may or may not - * be the process's current working directory. - * - * This returns an absolute path in UTF-8 encoding, and is guaranteed to - * end with a path separator ('\\' on Windows, '/' most other places). - * - * The pointer returned by this function is owned by you. Please call - * SDL_free() on the pointer when you are done with it, or it will be a - * memory leak. This is not necessarily a fast call, though, so you should - * call this once near startup and save the string if you need it. - * - * Some platforms can't determine the application's path, and on other - * platforms, this might be meaningless. In such cases, this function will - * return NULL. - * - * \return String of base dir in UTF-8 encoding, or NULL on error. - * - * \sa SDL_GetPrefPath - */ -extern DECLSPEC char *SDLCALL SDL_GetBasePath(void); - -/** - * \brief Get the user-and-app-specific path where files can be written. - * - * Get the "pref dir". This is meant to be where users can write personal - * files (preferences and save games, etc) that are specific to your - * application. This directory is unique per user, per application. - * - * This function will decide the appropriate location in the native filesystem, - * create the directory if necessary, and return a string of the absolute - * path to the directory in UTF-8 encoding. - * - * On Windows, the string might look like: - * "C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\" - * - * On Linux, the string might look like: - * "/home/bob/.local/share/My Program Name/" - * - * On Mac OS X, the string might look like: - * "/Users/bob/Library/Application Support/My Program Name/" - * - * (etc.) - * - * You specify the name of your organization (if it's not a real organization, - * your name or an Internet domain you own might do) and the name of your - * application. These should be untranslated proper names. - * - * Both the org and app strings may become part of a directory name, so - * please follow these rules: - * - * - Try to use the same org string (including case-sensitivity) for - * all your applications that use this function. - * - Always use a unique app string for each one, and make sure it never - * changes for an app once you've decided on it. - * - Unicode characters are legal, as long as it's UTF-8 encoded, but... - * - ...only use letters, numbers, and spaces. Avoid punctuation like - * "Game Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient. - * - * This returns an absolute path in UTF-8 encoding, and is guaranteed to - * end with a path separator ('\\' on Windows, '/' most other places). - * - * The pointer returned by this function is owned by you. Please call - * SDL_free() on the pointer when you are done with it, or it will be a - * memory leak. This is not necessarily a fast call, though, so you should - * call this once near startup and save the string if you need it. - * - * You should assume the path returned by this function is the only safe - * place to write files (and that SDL_GetBasePath(), while it might be - * writable, or even the parent of the returned path, aren't where you - * should be writing things). - * - * Some platforms can't determine the pref path, and on other - * platforms, this might be meaningless. In such cases, this function will - * return NULL. - * - * \param org The name of your organization. - * \param app The name of your application. - * \return UTF-8 string of user dir in platform-dependent notation. NULL - * if there's a problem (creating directory failed, etc). - * - * \sa SDL_GetBasePath - */ -extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_filesystem_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_gamecontroller.h b/bsp/simulator/SDL2-2.0.7/include/SDL_gamecontroller.h deleted file mode 100644 index 406e77e91e972a4d3c00d1b3b71070b802f45e76..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_gamecontroller.h +++ /dev/null @@ -1,362 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_gamecontroller.h - * - * Include file for SDL game controller event handling - */ - -#ifndef SDL_gamecontroller_h_ -#define SDL_gamecontroller_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_rwops.h" -#include "SDL_joystick.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file SDL_gamecontroller.h - * - * In order to use these functions, SDL_Init() must have been called - * with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system - * for game controllers, and load appropriate drivers. - * - * If you would like to receive controller updates while the application - * is in the background, you should set the following hint before calling - * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS - */ - -/** - * The gamecontroller structure used to identify an SDL game controller - */ -struct _SDL_GameController; -typedef struct _SDL_GameController SDL_GameController; - - -typedef enum -{ - SDL_CONTROLLER_BINDTYPE_NONE = 0, - SDL_CONTROLLER_BINDTYPE_BUTTON, - SDL_CONTROLLER_BINDTYPE_AXIS, - SDL_CONTROLLER_BINDTYPE_HAT -} SDL_GameControllerBindType; - -/** - * Get the SDL joystick layer binding for this controller button/axis mapping - */ -typedef struct SDL_GameControllerButtonBind -{ - SDL_GameControllerBindType bindType; - union - { - int button; - int axis; - struct { - int hat; - int hat_mask; - } hat; - } value; - -} SDL_GameControllerButtonBind; - - -/** - * To count the number of game controllers in the system for the following: - * int nJoysticks = SDL_NumJoysticks(); - * int nGameControllers = 0; - * for (int i = 0; i < nJoysticks; i++) { - * if (SDL_IsGameController(i)) { - * nGameControllers++; - * } - * } - * - * 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. - * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices. - * The mapping format for joystick is: - * bX - a joystick button, index X - * hX.Y - hat X with value Y - * aX - axis X of the joystick - * Buttons can be used as a controller axis and vice versa. - * - * This string shows an example of a valid mapping for a controller - * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7", - * - */ - -/** - * Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform() - * A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt - * - * If \c freerw is non-zero, the stream will be closed after being read. - * - * \return number of mappings added, -1 on error - */ -extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw); - -/** - * Load a set of mappings from a file, filtered by the current SDL_GetPlatform() - * - * Convenience macro. - */ -#define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1) - -/** - * Add or update an existing mapping configuration - * - * \return 1 if mapping is added, 0 if updated, -1 on error - */ -extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString); - -/** - * Get the number of mappings installed - * - * \return the number of mappings - */ -extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void); - -/** - * Get the mapping at a particular index. - * - * \return the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range. - */ -extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index); - -/** - * Get a mapping string for a GUID - * - * \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 - */ -extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController * gamecontroller); - -/** - * Is the joystick on this index supported by the game controller interface? - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index); - -/** - * Get the implementation dependent name of a game controller. - * This can be called before any controllers are opened. - * If no name can be found, this function returns NULL. - */ -extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index); - -/** - * Open a game controller for use. - * The index passed as an argument refers to the N'th game controller on the system. - * This index is not the value which will identify this controller in future - * controller events. The joystick's instance id (::SDL_JoystickID) will be - * used there instead. - * - * \return A controller identifier, or NULL if an error occurred. - */ -extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index); - -/** - * Return the SDL_GameController associated with an instance id. - */ -extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid); - -/** - * Return the name for this currently opened controller - */ -extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller); - -/** - * Get the USB vendor ID of an opened controller, if available. - * If the vendor ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController * gamecontroller); - -/** - * Get the USB product ID of an opened controller, if available. - * If the product ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController * gamecontroller); - -/** - * Get the product version of an opened controller, if available. - * If the product version isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController * gamecontroller); - -/** - * Returns SDL_TRUE if the controller has been opened and currently connected, - * or SDL_FALSE if it has not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller); - -/** - * Get the underlying joystick object used by a controller - */ -extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller); - -/** - * Enable/disable controller event polling. - * - * If controller events are disabled, you must call SDL_GameControllerUpdate() - * yourself and check the state of the controller when you want controller - * information. - * - * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE. - */ -extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state); - -/** - * Update the current state of the open game controllers. - * - * This is called automatically by the event loop if any game controller - * events are enabled. - */ -extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void); - - -/** - * The list of axes available from a controller - * - * Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX, - * and are centered within ~8000 of zero, though advanced UI will allow users to set - * or autodetect the dead zone, which varies between controllers. - * - * Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX. - */ -typedef enum -{ - SDL_CONTROLLER_AXIS_INVALID = -1, - SDL_CONTROLLER_AXIS_LEFTX, - SDL_CONTROLLER_AXIS_LEFTY, - SDL_CONTROLLER_AXIS_RIGHTX, - SDL_CONTROLLER_AXIS_RIGHTY, - SDL_CONTROLLER_AXIS_TRIGGERLEFT, - SDL_CONTROLLER_AXIS_TRIGGERRIGHT, - SDL_CONTROLLER_AXIS_MAX -} SDL_GameControllerAxis; - -/** - * turn this string into a axis mapping - */ -extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString); - -/** - * turn this axis enum into a string mapping - */ -extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis); - -/** - * Get the SDL joystick layer binding for this controller button mapping - */ -extern DECLSPEC SDL_GameControllerButtonBind SDLCALL -SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, - SDL_GameControllerAxis axis); - -/** - * Get the current state of an axis control on a game controller. - * - * The state is a value ranging from -32768 to 32767 (except for the triggers, - * which range from 0 to 32767). - * - * The axis indices start at index 0. - */ -extern DECLSPEC Sint16 SDLCALL -SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, - SDL_GameControllerAxis axis); - -/** - * The list of buttons available from a controller - */ -typedef enum -{ - SDL_CONTROLLER_BUTTON_INVALID = -1, - SDL_CONTROLLER_BUTTON_A, - SDL_CONTROLLER_BUTTON_B, - SDL_CONTROLLER_BUTTON_X, - SDL_CONTROLLER_BUTTON_Y, - SDL_CONTROLLER_BUTTON_BACK, - SDL_CONTROLLER_BUTTON_GUIDE, - SDL_CONTROLLER_BUTTON_START, - SDL_CONTROLLER_BUTTON_LEFTSTICK, - SDL_CONTROLLER_BUTTON_RIGHTSTICK, - SDL_CONTROLLER_BUTTON_LEFTSHOULDER, - SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, - SDL_CONTROLLER_BUTTON_DPAD_UP, - SDL_CONTROLLER_BUTTON_DPAD_DOWN, - SDL_CONTROLLER_BUTTON_DPAD_LEFT, - SDL_CONTROLLER_BUTTON_DPAD_RIGHT, - SDL_CONTROLLER_BUTTON_MAX -} SDL_GameControllerButton; - -/** - * turn this string into a button mapping - */ -extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString); - -/** - * turn this button enum into a string mapping - */ -extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button); - -/** - * Get the SDL joystick layer binding for this controller button mapping - */ -extern DECLSPEC SDL_GameControllerButtonBind SDLCALL -SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, - SDL_GameControllerButton button); - - -/** - * Get the current state of a button on a game controller. - * - * The button indices start at index 0. - */ -extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller, - SDL_GameControllerButton button); - -/** - * Close a controller previously opened with SDL_GameControllerOpen(). - */ -extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_gamecontroller_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_hints.h b/bsp/simulator/SDL2-2.0.7/include/SDL_hints.h deleted file mode 100644 index 7d43814b6b881c5d7eebba1f942220f415e67e8a..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_hints.h +++ /dev/null @@ -1,959 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_hints.h - * - * Official documentation for SDL configuration variables - * - * This file contains functions to set and get configuration hints, - * as well as listing each of them alphabetically. - * - * The convention for naming hints is SDL_HINT_X, where "SDL_X" is - * the environment variable that can be used to override the default. - * - * In general these hints are just that - they may or may not be - * supported or applicable on any given platform, but they provide - * a way for an application or user to give the library a hint as - * to how they would like the library to work. - */ - -#ifndef SDL_hints_h_ -#define SDL_hints_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface. - * - * SDL can try to accelerate the SDL screen surface by using streaming - * textures with a 3D rendering engine. This variable controls whether and - * how this is done. - * - * This variable can be set to the following values: - * "0" - Disable 3D acceleration - * "1" - Enable 3D acceleration, using the default renderer. - * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.) - * - * By default SDL tries to make a best guess for each platform whether - * to use acceleration or not. - */ -#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION" - -/** - * \brief A variable specifying which render driver to use. - * - * If the application doesn't pick a specific renderer to use, this variable - * specifies the name of the preferred renderer. If the preferred renderer - * can't be initialized, the normal default renderer is used. - * - * This variable is case insensitive and can be set to the following values: - * "direct3d" - * "opengl" - * "opengles2" - * "opengles" - * "software" - * - * The default varies by platform, but it's the first one in the list that - * is available on the current platform. - */ -#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER" - -/** - * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available. - * - * This variable can be set to the following values: - * "0" - Disable shaders - * "1" - Enable shaders - * - * By default shaders are used if OpenGL supports them. - */ -#define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS" - -/** - * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations. - * - * This variable can be set to the following values: - * "0" - Thread-safety is not enabled (faster) - * "1" - Thread-safety is enabled - * - * By default the Direct3D device is created with thread-safety disabled. - */ -#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE" - -/** - * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer. - * - * This variable does not have any effect on the Direct3D 9 based renderer. - * - * This variable can be set to the following values: - * "0" - Disable Debug Layer use - * "1" - Enable Debug Layer use - * - * By default, SDL does not use Direct3D Debug Layer. - */ -#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG" - -/** - * \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize. - * - * This variable can be set to the following values: - * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen - * "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen - * - * By default letterbox is used - */ -#define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE" - -/** - * \brief A variable controlling the scaling quality - * - * This variable can be set to the following values: - * "0" or "nearest" - Nearest pixel sampling - * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D) - * "2" or "best" - Currently this is the same as "linear" - * - * By default nearest pixel sampling is used - */ -#define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY" - -/** - * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing. - * - * This variable can be set to the following values: - * "0" - Disable vsync - * "1" - Enable vsync - * - * By default SDL does not sync screen surface updates with vertical refresh. - */ -#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC" - -/** - * \brief A variable controlling whether the screensaver is enabled. - * - * This variable can be set to the following values: - * "0" - Disable screensaver - * "1" - Enable screensaver - * - * By default SDL will disable the screensaver. - */ -#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER" - -/** - * \brief A variable controlling whether the X11 VidMode extension should be used. - * - * This variable can be set to the following values: - * "0" - Disable XVidMode - * "1" - Enable XVidMode - * - * By default SDL will use XVidMode if it is available. - */ -#define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE" - -/** - * \brief A variable controlling whether the X11 Xinerama extension should be used. - * - * This variable can be set to the following values: - * "0" - Disable Xinerama - * "1" - Enable Xinerama - * - * By default SDL will use Xinerama if it is available. - */ -#define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA" - -/** - * \brief A variable controlling whether the X11 XRandR extension should be used. - * - * This variable can be set to the following values: - * "0" - Disable XRandR - * "1" - Enable XRandR - * - * By default SDL will not use XRandR because of window manager issues. - */ -#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR" - -/** - * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported. - * - * This variable can be set to the following values: - * "0" - Disable _NET_WM_PING - * "1" - Enable _NET_WM_PING - * - * By default SDL will use _NET_WM_PING, but for applications that know they - * will not always be able to respond to ping requests in a timely manner they can - * turn it off to avoid the window manager thinking the app is hung. - * The hint is checked in CreateWindow. - */ -#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING" - -/** - * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden - * - * This variable can be set to the following values: - * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc) - * "1" - The window frame is interactive when the cursor is hidden - * - * By default SDL will allow interaction with the window frame when the cursor is hidden - */ -#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN" - -/** - * \brief A variable to specify custom icon resource id from RC file on Windows platform - */ -#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON" -#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL" - -/** - * \brief A variable controlling whether the windows message loop is processed by SDL - * - * This variable can be set to the following values: - * "0" - The window message loop is not run - * "1" - The window message loop is processed in SDL_PumpEvents() - * - * By default SDL will process the windows message loop - */ -#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP" - -/** - * \brief A variable controlling whether grabbing input grabs the keyboard - * - * This variable can be set to the following values: - * "0" - Grab will affect only the mouse - * "1" - Grab will affect mouse and keyboard - * - * By default SDL will not grab the keyboard so system shortcuts still work. - */ -#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD" - -/** - * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode - */ -#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE" - -/** - * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode - */ -#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE" - -/** - * \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 A variable controlling whether touch events should generate synthetic mouse events - * - * This variable can be set to the following values: - * "0" - Touch events will not generate mouse events - * "1" - Touch events will generate mouse events - * - * By default SDL will generate mouse events for touch events - */ -#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS" - -/** - * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true. - * - */ -#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS" - -/** - * \brief A variable controlling whether the idle timer is disabled on iOS. - * - * When an iOS app does not receive touches for some time, the screen is - * dimmed automatically. For games where the accelerometer is the only input - * 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. - * - * This variable can be set to the following values: - * "0" - Enable idle timer - * "1" - Disable idle timer - */ -#define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED" - -/** - * \brief A variable controlling which orientations are allowed on iOS. - * - * In some circumstances it is necessary to be able to explicitly control - * which UI orientations are allowed. - * - * This variable is a space delimited list of the following values: - * "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 - * actual joysticks only. - * - * This variable can be set to the following values: - * "0" - List only real joysticks and accept input from them - * "1" - List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default). - */ -#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK" - -/** - * \brief A variable that lets you disable the detection and use of Xinput gamepad devices - * - * The variable can be set to the following values: - * "0" - Disable XInput detection (only uses direct input) - * "1" - Enable XInput detection (the default) - */ -#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED" - -/** - * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices. - * - * This hint is for backwards compatibility only and will be removed in SDL 2.1 - * - * The default value is "0". This hint must be set before SDL_Init() - */ -#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING" - -/** - * \brief A variable that lets you manually hint extra gamecontroller db entries. - * - * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h - * - * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER) - * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping() - */ -#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG" - -/** - * \brief A variable containing a list of devices to skip when scanning for game controllers. - * - * The format of the string is a comma separated list of USB VID/PID pairs - * in hexadecimal form, e.g. - * - * 0xAAAA/0xBBBB,0xCCCC/0xDDDD - * - * The variable can also take the form of @file, in which case the named - * file will be loaded and interpreted as the value of the variable. - */ -#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES" - -/** - * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable. - * - * The format of the string is a comma separated list of USB VID/PID pairs - * in hexadecimal form, e.g. - * - * 0xAAAA/0xBBBB,0xCCCC/0xDDDD - * - * The variable can also take the form of @file, in which case the named - * file will be loaded and interpreted as the value of the variable. - */ -#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT" - -/** - * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background. - * - * The variable can be set to the following values: - * "0" - Disable joystick & gamecontroller input events when the - * application is in the background. - * "1" - Enable joystick & gamecontroller input events when the - * application is in the background. - * - * The default value is "0". This hint may be set at any time. - */ -#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS" - -/** - * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it. - * This is a debugging aid for developers and not expected to be used by end users. The default is "1" - * - * This variable can be set to the following values: - * "0" - don't allow topmost - * "1" - allow topmost - */ -#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST" - -/** - * \brief A variable that controls the timer resolution, in milliseconds. - * - * The higher resolution the timer, the more frequently the CPU services - * timer interrupts, and the more precise delays are, but this takes up - * power and CPU time. This hint is only used on Windows 7 and earlier. - * - * See this blog post for more information: - * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/ - * - * If this variable is set to "0", the system timer resolution is not set. - * - * The default value is "1". This hint may be set at any time. - */ -#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION" - - -/** - * \brief A variable describing the content orientation on QtWayland-based platforms. - * - * On QtWayland platforms, windows are rotated client-side to allow for custom - * transitions. In order to correctly position overlays (e.g. volume bar) and - * gestures (e.g. events view, close/minimize gestures), the system needs to - * know in which orientation the application is currently drawing its contents. - * - * This does not cause the window to be rotated or resized, the application - * needs to take care of drawing the content in the right orientation (the - * framebuffer is always in portrait mode). - * - * This variable can be one of the following values: - * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape" - */ -#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION" - -/** - * \brief Flags to set on QtWayland windows to integrate with the native window manager. - * - * On QtWayland platforms, this hint controls the flags to set on the windows. - * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures. - * - * This variable is a space-separated list of the following values (empty = no flags): - * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager" - */ -#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS" - -/** -* \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size -* -* Use this hint in case you need to set SDL's threads stack size to other than the default. -* This is specially useful if you build SDL against a non glibc libc library (such as musl) which -* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses). -* Support for this hint is currently available only in the pthread, Windows, and PSP backend. -*/ -#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE" - -/** - * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS) - */ -#define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED" - -/** - * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac - * - * If present, holding ctrl while left clicking will generate a right click - * event when on Mac. - */ -#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK" - -/** -* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries -* -* SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It -* can use two different sets of binaries, those compiled by the user from source -* or those provided by the Chrome browser. In the later case, these binaries require -* that SDL loads a DLL providing the shader compiler. -* -* This variable can be set to the following values: -* "d3dcompiler_46.dll" - default, best for Vista or later. -* "d3dcompiler_43.dll" - for XP support. -* "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries. -* -*/ -#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER" - -/** -* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p"). -* -* If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has -* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly -* created SDL_Window: -* -* 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is -* needed for example when sharing an OpenGL context across multiple windows. -* -* 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for -* OpenGL rendering. -* -* This variable can be set to the following values: -* The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should -* share a pixel format with. -*/ -#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT" - -/** - * \brief A URL to a WinRT app's privacy policy - * - * All network-enabled WinRT apps must make a privacy policy available to its - * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be - * be available in the Windows Settings charm, as accessed from within the app. - * SDL provides code to add a URL-based link there, which can point to the app's - * 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 - * be a valid URL. For example, "http://www.example.com". - * - * The default value is "", which will prevent SDL from adding a privacy policy - * link to the Settings charm. This hint should only be set during app init. - * - * The label text of an app's "Privacy Policy" link may be customized via another - * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL. - * - * Please note that on Windows Phone, Microsoft does not provide standard UI - * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL - * will not get used on that platform. Network-enabled phone apps should display - * their privacy policy through some other, in-app means. - */ -#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL" - -/** \brief Label text for a WinRT app's privacy policy link - * - * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT, - * Microsoft mandates that this policy be available via the Windows Settings charm. - * SDL provides code to add a link there, with its label text being set via the - * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL. - * - * Please note that a privacy policy's contents are not set via this hint. A separate - * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the - * 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(). - * - * For additional information on linking to a privacy policy, see the documentation for - * SDL_HINT_WINRT_PRIVACY_POLICY_URL. - */ -#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL" - -/** \brief Allows back-button-press events on Windows Phone to be marked as handled - * - * Windows Phone devices typically feature a Back button. When pressed, - * the OS will emit back-button-press events, which apps are expected to - * handle in an appropriate manner. If apps do not explicitly mark these - * events as 'Handled', then the OS will invoke its default behavior for - * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to - * terminate the app (and attempt to switch to the previous app, or to the - * device's home screen). - * - * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL - * to mark back-button-press events as Handled, if and when one is sent to - * the app. - * - * Internally, Windows Phone sends back button events as parameters to - * special back-button-press callback functions. Apps that need to respond - * to back-button-press events are expected to register one or more - * callback functions for such, shortly after being launched (during the - * app's initialization phase). After the back button is pressed, the OS - * will invoke these callbacks. If the app's callback(s) do not explicitly - * mark the event as handled by the time they return, or if the app never - * registers one of these callback, the OS will consider the event - * un-handled, and it will apply its default back button behavior (terminate - * the app). - * - * SDL registers its own back-button-press callback with the Windows Phone - * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN - * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which - * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON. - * If the hint's value is set to "1", the back button event's Handled - * property will get set to 'true'. If the hint's value is set to something - * else, or if it is unset, SDL will leave the event's Handled property - * alone. (By default, the OS sets this property to 'false', to note.) - * - * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a - * back button is pressed, or can set it in direct-response to a back button - * being pressed. - * - * In order to get notified when a back button is pressed, SDL apps should - * register a callback function with SDL_AddEventWatch(), and have it listen - * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK. - * (Alternatively, SDL_KEYUP events can be listened-for. Listening for - * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON - * set by such a callback, will be applied to the OS' current - * back-button-press event. - * - * More details on back button behavior in Windows Phone apps can be found - * at the following page, on Microsoft's developer site: - * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx - */ -#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON" - -/** - * \brief A variable that dictates policy for fullscreen Spaces on Mac OS X. - * - * This hint only applies to Mac OS X. - * - * The variable can be set to the following values: - * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and - * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" - * button on their titlebars). - * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and - * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" - * button on their titlebars). - * - * The default value is "1". Spaces are disabled regardless of this hint if - * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before - * any windows are created. - */ -#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES" - -/** -* \brief When set don't force the SDL app to become a foreground process -* -* This hint only applies to Mac OS X. -* -*/ -#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP" - -/** - * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc. - * - * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION. - * - * If both hints were set then SDL_RWFromFile() will look into expansion files - * after a given relative path was not found in the internal storage and assets. - * - * By default this hint is not set and the APK expansion files are not searched. - */ -#define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION" - -/** - * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc. - * - * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION. - * - * If both hints were set then SDL_RWFromFile() will look into expansion files - * after a given relative path was not found in the internal storage and assets. - * - * By default this hint is not set and the APK expansion files are not searched. - */ -#define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION" - -/** - * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events. - * - * The variable can be set to the following values: - * "0" - SDL_TEXTEDITING events are sent, and it is the application's - * responsibility to render the text from these events and - * differentiate it somehow from committed text. (default) - * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent, - * and text that is being composed will be rendered in its own UI. - */ -#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING" - - /** - * \brief A variable to control whether mouse and touch events are to be treated together or separately - * - * The variable can be set to the following values: - * "0" - Mouse events will be handled as touch events, and touch will raise fake mouse - * events. This is the behaviour of SDL <= 2.0.3. (default) - * "1" - Mouse events will be handled separately from pure touch events. - * - * The value of this hint is used at runtime, so it can be changed at any time. - */ -#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH" - -/** - * \brief override the binding element for keyboard inputs for Emscripten builds - * - * This hint only applies to the emscripten platform - * - * The variable can be one of - * "#window" - The javascript window object (this is the default) - * "#document" - The javascript document object - * "#screen" - the javascript window.screen object - * "#canvas" - the WebGL canvas element - * any other string without a leading # sign applies to the element on the page with that ID. - */ -#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT" - -/** - * \brief Tell SDL not to catch the SIGINT or SIGTERM signals. - * - * This hint only applies to Unix-like platforms. - * - * The variable can be set to the following values: - * "0" - SDL will install a SIGINT and SIGTERM handler, and when it - * catches a signal, convert it into an SDL_QUIT event. - * "1" - SDL will not install a signal handler at all. - */ -#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS" - -/** - * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows. - * - * The variable can be set to the following values: - * "0" - SDL will generate a window-close event when it sees Alt+F4. - * "1" - SDL will only do normal key handling for Alt+F4. - */ -#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4" - -/** - * \brief 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 with the 0x406D1388 Exception. - * The 0x406D1388 Exception is a trick used to inform Visual Studio of a - * thread's name, but it tends to cause problems with other debuggers, - * and the .NET runtime. Note that SDL 2.0.6 and later will still use - * the (safer) SetThreadDescription API, introduced in the Windows 10 - * Creators Update, if available. - * - * 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. - * "1" - SDL will not raise this exception, and threads will be unnamed. (default) - * This is necessary with .NET languages or debuggers that aren't Visual Studio. - */ -#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 A variable controlling what driver to use for OpenGL ES contexts. - * - * On some platforms, currently Windows and X11, OpenGL drivers may support - * creating contexts with an OpenGL ES profile. By default SDL uses these - * profiles, when available, otherwise it attempts to load an OpenGL ES - * library, e.g. that provided by the ANGLE project. This variable controls - * whether SDL follows this default behaviour or will always load an - * OpenGL ES library. - * - * Circumstances where this is useful include - * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE, - * or emulator, e.g. those from ARM, Imagination or Qualcomm. - * - Resolving OpenGL ES function addresses at link time by linking with - * the OpenGL ES library instead of querying them at run time with - * SDL_GL_GetProcAddress(). - * - * Caution: for an application to work with the default behaviour across - * different OpenGL drivers it must query the OpenGL ES function - * addresses at run time using SDL_GL_GetProcAddress(). - * - * This variable is ignored on most platforms because OpenGL ES is native - * or not supported. - * - * This variable can be set to the following values: - * "0" - Use ES profile of OpenGL, if available. (Default when not set.) - * "1" - Load OpenGL ES library using the default library names. - * - */ -#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER" - -/** - * \brief A variable controlling speed/quality tradeoff of audio resampling. - * - * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ ) - * to handle audio resampling. There are different resampling modes available - * that produce different levels of quality, using more CPU. - * - * If this hint isn't specified to a valid setting, or libsamplerate isn't - * available, SDL will use the default, internal resampling algorithm. - * - * Note that this is currently only applicable to resampling audio that is - * being written to a device for playback or audio being read from a device - * for capture. SDL_AudioCVT always uses the default resampler (although this - * might change for SDL 2.1). - * - * This hint is currently only checked at audio subsystem initialization. - * - * This variable can be set to the following values: - * - * "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast) - * "1" or "fast" - Use fast, slightly higher quality resampling, if available - * "2" or "medium" - Use medium quality resampling, if available - * "3" or "best" - Use high quality resampling, if available - */ -#define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE" - -/** - * \brief A variable controlling the audio category on iOS and Mac OS X - * - * This variable can be set to the following values: - * - * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default) - * "playback" - Use the AVAudioSessionCategoryPlayback category - * - * For more information, see Apple's documentation: - * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html - */ -#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY" - -/** - * \brief An enumeration of hint priorities - */ -typedef enum -{ - SDL_HINT_DEFAULT, - SDL_HINT_NORMAL, - SDL_HINT_OVERRIDE -} SDL_HintPriority; - - -/** - * \brief Set a hint with a specific priority - * - * The priority controls the behavior when setting a hint that already - * has a value. Hints will replace existing hints of their priority and - * lower. Environment variables are considered to have override priority. - * - * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise - */ -extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name, - const char *value, - SDL_HintPriority priority); - -/** - * \brief Set a hint with normal priority - * - * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise - */ -extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name, - const char *value); - -/** - * \brief Get a hint - * - * \return The string value of a hint variable. - */ -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 type definition of the hint callback function. - */ -typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue); - -/** - * \brief Add a function to watch a particular hint - * - * \param name The hint to watch - * \param callback The function to call when the hint value changes - * \param userdata A pointer to pass to the callback function - */ -extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name, - SDL_HintCallback callback, - void *userdata); - -/** - * \brief Remove a function watching a particular hint - * - * \param name The hint being watched - * \param callback The function being called when the hint value changes - * \param userdata A pointer being passed to the callback function - */ -extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name, - SDL_HintCallback callback, - void *userdata); - -/** - * \brief Clear all hints - * - * This function is called during SDL_Quit() to free stored hints. - */ -extern DECLSPEC void SDLCALL SDL_ClearHints(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_hints_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_joystick.h b/bsp/simulator/SDL2-2.0.7/include/SDL_joystick.h deleted file mode 100644 index f598dc828dafa2751d3aba2286059a8298d79aa3..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_joystick.h +++ /dev/null @@ -1,382 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_joystick.h - * - * 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 - * 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 - * then it will get a new instance_id, instance_id's are monotonically increasing identifiers of a joystick plugged in. - * - * The term JoystickGUID is a stable 128-bit identifier for a joystick device that does not change over time, it identifies class of - * the device (a X360 wired controller for example). This identifier is platform dependent. - * - * - */ - -#ifndef SDL_joystick_h_ -#define SDL_joystick_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file SDL_joystick.h - * - * In order to use these functions, SDL_Init() must have been called - * with the ::SDL_INIT_JOYSTICK flag. This causes SDL to scan the system - * for joysticks, and load appropriate drivers. - * - * If you would like to receive joystick updates while the application - * is in the background, you should set the following hint before calling - * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS - */ - -/** - * The joystick structure used to identify an SDL joystick - */ -struct _SDL_Joystick; -typedef struct _SDL_Joystick SDL_Joystick; - -/* A structure that encodes the stable unique id for a joystick device */ -typedef struct { - Uint8 data[16]; -} SDL_JoystickGUID; - -/** - * This is a unique ID for a joystick for the time it is connected to the system, - * and is never reused for the lifetime of the application. If the joystick is - * disconnected and reconnected, it will get a new ID. - * - * The ID value starts at 0 and increments from there. The value -1 is an invalid ID. - */ -typedef Sint32 SDL_JoystickID; - -typedef enum -{ - SDL_JOYSTICK_TYPE_UNKNOWN, - SDL_JOYSTICK_TYPE_GAMECONTROLLER, - SDL_JOYSTICK_TYPE_WHEEL, - SDL_JOYSTICK_TYPE_ARCADE_STICK, - SDL_JOYSTICK_TYPE_FLIGHT_STICK, - SDL_JOYSTICK_TYPE_DANCE_PAD, - SDL_JOYSTICK_TYPE_GUITAR, - SDL_JOYSTICK_TYPE_DRUM_KIT, - SDL_JOYSTICK_TYPE_ARCADE_PAD, - SDL_JOYSTICK_TYPE_THROTTLE -} SDL_JoystickType; - -typedef enum -{ - SDL_JOYSTICK_POWER_UNKNOWN = -1, - SDL_JOYSTICK_POWER_EMPTY, - SDL_JOYSTICK_POWER_LOW, - SDL_JOYSTICK_POWER_MEDIUM, - SDL_JOYSTICK_POWER_FULL, - SDL_JOYSTICK_POWER_WIRED, - SDL_JOYSTICK_POWER_MAX -} SDL_JoystickPowerLevel; - -/* Function prototypes */ - -/** - * Locking for multi-threaded access to the joystick API - * - * If you are using the joystick API or handling events from multiple threads - * you should use these locking functions to protect access to the joysticks. - * - * In particular, you are guaranteed that the joystick list won't change, so - * the API functions that take a joystick index will be valid, and joystick - * and game controller events will not be delivered. - */ -extern DECLSPEC void SDLCALL SDL_LockJoysticks(void); -extern DECLSPEC void SDLCALL SDL_UnlockJoysticks(void); - -/** - * Count the number of joysticks attached to the system right now - */ -extern DECLSPEC int SDLCALL SDL_NumJoysticks(void); - -/** - * Get the implementation dependent name of a joystick. - * This can be called before any joysticks are opened. - * If no name can be found, this function returns NULL. - */ -extern DECLSPEC const char *SDLCALL SDL_JoystickNameForIndex(int device_index); - -/** - * Return the GUID for the joystick at this index - * This can be called before any joysticks are opened. - */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index); - -/** - * Get the USB vendor ID of a joystick, if available. - * This can be called before any joysticks are opened. - * If the vendor ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceVendor(int device_index); - -/** - * Get the USB product ID of a joystick, if available. - * This can be called before any joysticks are opened. - * If the product ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProduct(int device_index); - -/** - * Get the product version of a joystick, if available. - * This can be called before any joysticks are opened. - * If the product version isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetDeviceProductVersion(int device_index); - -/** - * Get the type of a joystick, if available. - * This can be called before any joysticks are opened. - */ -extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetDeviceType(int device_index); - -/** - * Get the instance ID of a joystick. - * This can be called before any joysticks are opened. - * If the index is out of range, this function will return -1. - */ -extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickGetDeviceInstanceID(int device_index); - -/** - * Open a joystick for use. - * The index passed as an argument refers to the N'th joystick on the system. - * This index is not the value which will identify this joystick in future - * joystick events. The joystick's instance id (::SDL_JoystickID) will be used - * there instead. - * - * \return A joystick identifier, or NULL if an error occurred. - */ -extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index); - -/** - * Return the SDL_Joystick associated with an instance id. - */ -extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid); - -/** - * Return the name for this currently opened joystick. - * If no name can be found, this function returns NULL. - */ -extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick); - -/** - * Return the GUID for this opened joystick - */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick); - -/** - * Get the USB vendor ID of an opened joystick, if available. - * If the vendor ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetVendor(SDL_Joystick * joystick); - -/** - * Get the USB product ID of an opened joystick, if available. - * If the product ID isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProduct(SDL_Joystick * joystick); - -/** - * Get the product version of an opened joystick, if available. - * If the product version isn't available this function returns 0. - */ -extern DECLSPEC Uint16 SDLCALL SDL_JoystickGetProductVersion(SDL_Joystick * joystick); - -/** - * Get the type of an opened joystick. - */ -extern DECLSPEC SDL_JoystickType SDLCALL SDL_JoystickGetType(SDL_Joystick * joystick); - -/** - * Return a string representation for this guid. pszGUID must point to at least 33 bytes - * (32 for the string plus a NULL terminator). - */ -extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID); - -/** - * Convert a string into a joystick guid - */ -extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID); - -/** - * Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAttached(SDL_Joystick * joystick); - -/** - * Get the instance ID of an opened joystick or -1 if the joystick is invalid. - */ -extern DECLSPEC SDL_JoystickID SDLCALL SDL_JoystickInstanceID(SDL_Joystick * joystick); - -/** - * Get the number of general axis controls on a joystick. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumAxes(SDL_Joystick * joystick); - -/** - * Get the number of trackballs on a joystick. - * - * Joystick trackballs have only relative motion events associated - * with them and their state cannot be polled. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumBalls(SDL_Joystick * joystick); - -/** - * Get the number of POV hats on a joystick. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick); - -/** - * Get the number of buttons on a joystick. - */ -extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick); - -/** - * Update the current state of the open joysticks. - * - * This is called automatically by the event loop if any joystick - * events are enabled. - */ -extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void); - -/** - * Enable/disable joystick event polling. - * - * If joystick events are disabled, you must call SDL_JoystickUpdate() - * yourself and check the state of the joystick when you want joystick - * information. - * - * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE. - */ -extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state); - -#define SDL_JOYSTICK_AXIS_MAX 32767 -#define SDL_JOYSTICK_AXIS_MIN -32768 -/** - * Get the current state of an axis control on a joystick. - * - * The state is a value ranging from -32768 to 32767. - * - * The axis indices start at index 0. - */ -extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick, - int axis); - -/** - * Get the initial state of an axis control on a joystick. - * - * The state is a value ranging from -32768 to 32767. - * - * The axis indices start at index 0. - * - * \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick * joystick, - int axis, Sint16 *state); - -/** - * \name Hat positions - */ -/* @{ */ -#define SDL_HAT_CENTERED 0x00 -#define SDL_HAT_UP 0x01 -#define SDL_HAT_RIGHT 0x02 -#define SDL_HAT_DOWN 0x04 -#define SDL_HAT_LEFT 0x08 -#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) -#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) -#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) -#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) -/* @} */ - -/** - * Get the current state of a POV hat on a joystick. - * - * The hat indices start at index 0. - * - * \return The return value is one of the following positions: - * - ::SDL_HAT_CENTERED - * - ::SDL_HAT_UP - * - ::SDL_HAT_RIGHT - * - ::SDL_HAT_DOWN - * - ::SDL_HAT_LEFT - * - ::SDL_HAT_RIGHTUP - * - ::SDL_HAT_RIGHTDOWN - * - ::SDL_HAT_LEFTUP - * - ::SDL_HAT_LEFTDOWN - */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick * joystick, - int hat); - -/** - * Get the ball axis change since the last poll. - * - * \return 0, or -1 if you passed it invalid parameters. - * - * The ball indices start at index 0. - */ -extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick, - int ball, int *dx, int *dy); - -/** - * Get the current state of a button on a joystick. - * - * The button indices start at index 0. - */ -extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick, - int button); - -/** - * Close a joystick previously opened with SDL_JoystickOpen(). - */ -extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick); - -/** - * Return the battery level of this joystick - */ -extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_joystick_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_keyboard.h b/bsp/simulator/SDL2-2.0.7/include/SDL_keyboard.h deleted file mode 100644 index e78ca469082c793a8190331c01766a3e3374a5ba..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_keyboard.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_keyboard.h - * - * Include file for SDL keyboard event handling - */ - -#ifndef SDL_keyboard_h_ -#define SDL_keyboard_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_keycode.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The SDL keysym structure, used in key events. - * - * \note If you are looking for translated character input, see the ::SDL_TEXTINPUT event. - */ -typedef struct SDL_Keysym -{ - SDL_Scancode scancode; /**< SDL physical key code - see ::SDL_Scancode for details */ - SDL_Keycode sym; /**< SDL virtual key code - see ::SDL_Keycode for details */ - Uint16 mod; /**< current key modifiers */ - Uint32 unused; -} SDL_Keysym; - -/* Function prototypes */ - -/** - * \brief Get the window which currently has keyboard focus. - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void); - -/** - * \brief Get a snapshot of the current state of the keyboard. - * - * \param numkeys if non-NULL, receives the length of the returned array. - * - * \return An array of key states. Indexes into this array are obtained by using ::SDL_Scancode values. - * - * \b Example: - * \code - * const Uint8 *state = SDL_GetKeyboardState(NULL); - * if ( state[SDL_SCANCODE_RETURN] ) { - * printf(" is pressed.\n"); - * } - * \endcode - */ -extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys); - -/** - * \brief Get the current key modifier state for the keyboard. - */ -extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void); - -/** - * \brief Set the current key modifier state for the keyboard. - * - * \note This does not change the keyboard state, only the key modifier flags. - */ -extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate); - -/** - * \brief Get the key code corresponding to the given scancode according - * to the current keyboard layout. - * - * See ::SDL_Keycode for details. - * - * \sa SDL_GetKeyName() - */ -extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode); - -/** - * \brief Get the scancode corresponding to the given key code according to the - * current keyboard layout. - * - * See ::SDL_Scancode for details. - * - * \sa SDL_GetScancodeName() - */ -extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromKey(SDL_Keycode key); - -/** - * \brief Get a human-readable name for a scancode. - * - * \return A pointer to the name for the scancode. - * If the scancode doesn't have a name, this function returns - * an empty string (""). - * - * \sa SDL_Scancode - */ -extern DECLSPEC const char *SDLCALL SDL_GetScancodeName(SDL_Scancode scancode); - -/** - * \brief Get a scancode from a human-readable name - * - * \return scancode, or SDL_SCANCODE_UNKNOWN if the name wasn't recognized - * - * \sa SDL_Scancode - */ -extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name); - -/** - * \brief Get a human-readable name for a key. - * - * \return A pointer to a UTF-8 string that stays valid at least until the next - * call to this function. If you need it around any longer, you must - * copy it. If the key doesn't have a name, this function returns an - * empty string (""). - * - * \sa SDL_Keycode - */ -extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key); - -/** - * \brief Get a key code from a human-readable name - * - * \return key code, or SDLK_UNKNOWN if the name wasn't recognized - * - * \sa SDL_Keycode - */ -extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name); - -/** - * \brief Start accepting Unicode text input events. - * This function will show the on-screen keyboard if supported. - * - * \sa SDL_StopTextInput() - * \sa SDL_SetTextInputRect() - * \sa SDL_HasScreenKeyboardSupport() - */ -extern DECLSPEC void SDLCALL SDL_StartTextInput(void); - -/** - * \brief Return whether or not Unicode text input events are enabled. - * - * \sa SDL_StartTextInput() - * \sa SDL_StopTextInput() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsTextInputActive(void); - -/** - * \brief Stop receiving any text input events. - * This function will hide the on-screen keyboard if supported. - * - * \sa SDL_StartTextInput() - * \sa SDL_HasScreenKeyboardSupport() - */ -extern DECLSPEC void SDLCALL SDL_StopTextInput(void); - -/** - * \brief Set the rectangle used to type Unicode text inputs. - * This is used as a hint for IME and on-screen keyboard placement. - * - * \sa SDL_StartTextInput() - */ -extern DECLSPEC void SDLCALL SDL_SetTextInputRect(SDL_Rect *rect); - -/** - * \brief Returns whether the platform has some screen keyboard support. - * - * \return SDL_TRUE if some keyboard support is available else SDL_FALSE. - * - * \note Not all screen keyboard functions are supported on all platforms. - * - * \sa SDL_IsScreenKeyboardShown() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasScreenKeyboardSupport(void); - -/** - * \brief Returns whether the screen keyboard is shown for given window. - * - * \param window The window for which screen keyboard should be queried. - * - * \return SDL_TRUE if screen keyboard is shown else SDL_FALSE. - * - * \sa SDL_HasScreenKeyboardSupport() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_keyboard_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_log.h b/bsp/simulator/SDL2-2.0.7/include/SDL_log.h deleted file mode 100644 index 356d0e1cf7492f54d82e5829a6030587400869d1..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_log.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_log.h - * - * Simple log messages with categories and priorities. - * - * By default logs are quiet, but if you're debugging SDL you might want: - * - * SDL_LogSetAllPriority(SDL_LOG_PRIORITY_WARN); - * - * Here's where the messages go on different platforms: - * Windows: debug output stream - * Android: log output - * Others: standard error output (stderr) - */ - -#ifndef SDL_log_h_ -#define SDL_log_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * \brief The maximum size of a log message - * - * Messages longer than the maximum size will be truncated - */ -#define SDL_MAX_LOG_MESSAGE 4096 - -/** - * \brief The predefined log categories - * - * By default the application category is enabled at the INFO level, - * the assert category is enabled at the WARN level, test is enabled - * at the VERBOSE level and all other categories are enabled at the - * CRITICAL level. - */ -enum -{ - SDL_LOG_CATEGORY_APPLICATION, - SDL_LOG_CATEGORY_ERROR, - SDL_LOG_CATEGORY_ASSERT, - SDL_LOG_CATEGORY_SYSTEM, - SDL_LOG_CATEGORY_AUDIO, - SDL_LOG_CATEGORY_VIDEO, - SDL_LOG_CATEGORY_RENDER, - SDL_LOG_CATEGORY_INPUT, - SDL_LOG_CATEGORY_TEST, - - /* Reserved for future SDL library use */ - SDL_LOG_CATEGORY_RESERVED1, - SDL_LOG_CATEGORY_RESERVED2, - SDL_LOG_CATEGORY_RESERVED3, - SDL_LOG_CATEGORY_RESERVED4, - SDL_LOG_CATEGORY_RESERVED5, - SDL_LOG_CATEGORY_RESERVED6, - SDL_LOG_CATEGORY_RESERVED7, - SDL_LOG_CATEGORY_RESERVED8, - SDL_LOG_CATEGORY_RESERVED9, - SDL_LOG_CATEGORY_RESERVED10, - - /* Beyond this point is reserved for application use, e.g. - enum { - MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM, - MYAPP_CATEGORY_AWESOME2, - MYAPP_CATEGORY_AWESOME3, - ... - }; - */ - SDL_LOG_CATEGORY_CUSTOM -}; - -/** - * \brief The predefined log priorities - */ -typedef enum -{ - SDL_LOG_PRIORITY_VERBOSE = 1, - SDL_LOG_PRIORITY_DEBUG, - SDL_LOG_PRIORITY_INFO, - SDL_LOG_PRIORITY_WARN, - SDL_LOG_PRIORITY_ERROR, - SDL_LOG_PRIORITY_CRITICAL, - SDL_NUM_LOG_PRIORITIES -} SDL_LogPriority; - - -/** - * \brief Set the priority of all log categories - */ -extern DECLSPEC void SDLCALL SDL_LogSetAllPriority(SDL_LogPriority priority); - -/** - * \brief Set the priority of a particular log category - */ -extern DECLSPEC void SDLCALL SDL_LogSetPriority(int category, - SDL_LogPriority priority); - -/** - * \brief Get the priority of a particular log category - */ -extern DECLSPEC SDL_LogPriority SDLCALL SDL_LogGetPriority(int category); - -/** - * \brief Reset all priorities to default. - * - * \note This is called in SDL_Quit(). - */ -extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void); - -/** - * \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO - */ -extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_VERBOSE - */ -extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_DEBUG - */ -extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_INFO - */ -extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_WARN - */ -extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_ERROR - */ -extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with SDL_LOG_PRIORITY_CRITICAL - */ -extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2); - -/** - * \brief Log a message with the specified category and priority. - */ -extern DECLSPEC void SDLCALL SDL_LogMessage(int category, - SDL_LogPriority priority, - SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3); - -/** - * \brief Log a message with the specified category and priority. - */ -extern DECLSPEC void SDLCALL SDL_LogMessageV(int category, - SDL_LogPriority priority, - const char *fmt, va_list ap); - -/** - * \brief The prototype for the log output function - */ -typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message); - -/** - * \brief Get the current log output function. - */ -extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata); - -/** - * \brief This function allows you to replace the default log output - * function with one of your own. - */ -extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_log_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_main.h b/bsp/simulator/SDL2-2.0.7/include/SDL_main.h deleted file mode 100644 index 719f6726a05faba222086dfc68835dea8df00a09..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_main.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SDL_main_h_ -#define SDL_main_h_ - -#include "SDL_stdinc.h" - -/** - * \file SDL_main.h - * - * Redefine main() on some platforms so that it is called by SDL. - */ - -#ifndef SDL_MAIN_HANDLED -#if defined(__WIN32__) -/* On Windows SDL provides WinMain(), which parses the command line and passes - the arguments to your main function. - - If you provide your own WinMain(), you may define SDL_MAIN_HANDLED - */ -#define SDL_MAIN_AVAILABLE - -#elif defined(__WINRT__) -/* On WinRT, SDL provides a main function that initializes CoreApplication, - creating an instance of IFrameworkView in the process. - - Please note that #include'ing SDL_main.h is not enough to get a main() - function working. In non-XAML apps, the file, - src/main/winrt/SDL_WinRT_main_NonXAML.cpp, or a copy of it, must be compiled - into the app itself. In XAML apps, the function, SDL_WinRTRunApp must be - called, with a pointer to the Direct3D-hosted XAML control passed in. -*/ -#define SDL_MAIN_NEEDED - -#elif defined(__IPHONEOS__) -/* On iOS SDL provides a main function that creates an application delegate - and starts the iOS application run loop. - - See src/video/uikit/SDL_uikitappdelegate.m for more details. - */ -#define SDL_MAIN_NEEDED - -#elif defined(__ANDROID__) -/* On Android SDL provides a Java class in SDLActivity.java that is the - main activity entry point. - - See README-android.md for more details on extending that class. - */ -#define SDL_MAIN_NEEDED - -#elif defined(__NACL__) -/* On NACL we use ppapi_simple to set up the application helper code, - then wait for the first PSE_INSTANCE_DIDCHANGEVIEW event before - starting the user main function. - All user code is run in a separate thread by ppapi_simple, thus - allowing for blocking io to take place via nacl_io -*/ -#define SDL_MAIN_NEEDED - -#endif -#endif /* SDL_MAIN_HANDLED */ - -#ifdef __cplusplus -#define C_LINKAGE "C" -#else -#define C_LINKAGE -#endif /* __cplusplus */ - -/** - * \file SDL_main.h - * - * The application's main() function must be called with C linkage, - * and should be declared like this: - * \code - * #ifdef __cplusplus - * extern "C" - * #endif - * int main(int argc, char *argv[]) - * { - * } - * \endcode - */ - -#if defined(SDL_MAIN_NEEDED) || defined(SDL_MAIN_AVAILABLE) -#define main SDL_main -#endif - -/** - * The prototype for the application's main() function - */ -extern C_LINKAGE DECLSPEC int SDL_main(int argc, char *argv[]); - - -#include "begin_code.h" -#ifdef __cplusplus -extern "C" { -#endif - -/** - * This is called by the real SDL main function to let the rest of the - * library know that initialization was done properly. - * - * Calling this yourself without knowing what you're doing can cause - * crashes and hard to diagnose problems with your application. - */ -extern DECLSPEC void SDLCALL SDL_SetMainReady(void); - -#ifdef __WIN32__ - -/** - * This can be called to set the application class at startup - */ -extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, - void *hInst); -extern DECLSPEC void SDLCALL SDL_UnregisterApp(void); - -#endif /* __WIN32__ */ - - -#ifdef __WINRT__ - -/** - * \brief Initializes and launches an SDL/WinRT application. - * - * \param mainFunction The SDL app's C-style main(). - * \param reserved Reserved for future use; should be NULL - * \return 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more - * information on the failure. - */ -extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * reserved); - -#endif /* __WINRT__ */ - - -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_main_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_messagebox.h b/bsp/simulator/SDL2-2.0.7/include/SDL_messagebox.h deleted file mode 100644 index c326d8f01098b147e1bff015fb8e355e37f00744..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_messagebox.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SDL_messagebox_h_ -#define SDL_messagebox_h_ - -#include "SDL_stdinc.h" -#include "SDL_video.h" /* For SDL_Window */ - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief SDL_MessageBox flags. If supported will display warning icon, etc. - */ -typedef enum -{ - SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */ - SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */ - SDL_MESSAGEBOX_INFORMATION = 0x00000040 /**< informational dialog */ -} SDL_MessageBoxFlags; - -/** - * \brief Flags for SDL_MessageBoxButtonData. - */ -typedef enum -{ - SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = 0x00000001, /**< Marks the default button when return is hit */ - SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = 0x00000002 /**< Marks the default button when escape is hit */ -} SDL_MessageBoxButtonFlags; - -/** - * \brief Individual button data. - */ -typedef struct -{ - Uint32 flags; /**< ::SDL_MessageBoxButtonFlags */ - int buttonid; /**< User defined button id (value returned via SDL_ShowMessageBox) */ - const char * text; /**< The UTF-8 button text */ -} SDL_MessageBoxButtonData; - -/** - * \brief RGB value used in a message box color scheme - */ -typedef struct -{ - Uint8 r, g, b; -} SDL_MessageBoxColor; - -typedef enum -{ - SDL_MESSAGEBOX_COLOR_BACKGROUND, - SDL_MESSAGEBOX_COLOR_TEXT, - SDL_MESSAGEBOX_COLOR_BUTTON_BORDER, - SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND, - SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED, - SDL_MESSAGEBOX_COLOR_MAX -} SDL_MessageBoxColorType; - -/** - * \brief A set of colors to use for message box dialogs - */ -typedef struct -{ - SDL_MessageBoxColor colors[SDL_MESSAGEBOX_COLOR_MAX]; -} SDL_MessageBoxColorScheme; - -/** - * \brief MessageBox structure containing title, text, window, etc. - */ -typedef struct -{ - Uint32 flags; /**< ::SDL_MessageBoxFlags */ - SDL_Window *window; /**< Parent window, can be NULL */ - const char *title; /**< UTF-8 title */ - const char *message; /**< UTF-8 message text */ - - int numbuttons; - const SDL_MessageBoxButtonData *buttons; - - const SDL_MessageBoxColorScheme *colorScheme; /**< ::SDL_MessageBoxColorScheme, can be NULL to use system settings */ -} SDL_MessageBoxData; - -/** - * \brief Create a modal message box. - * - * \param messageboxdata The SDL_MessageBoxData structure with title, text, etc. - * \param buttonid The pointer to which user id of hit button should be copied. - * - * \return -1 on error, otherwise 0 and buttonid contains user id of button - * hit or -1 if dialog was closed. - * - * \note This function should be called on the thread that created the parent - * window, or on the main thread if the messagebox has no parent. It will - * block execution of that thread until the user clicks a button or - * closes the messagebox. - */ -extern DECLSPEC int SDLCALL SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid); - -/** - * \brief Create a simple modal message box - * - * \param flags ::SDL_MessageBoxFlags - * \param title UTF-8 title text - * \param message UTF-8 message text - * \param window The parent window, or NULL for no parent - * - * \return 0 on success, -1 on error - * - * \sa SDL_ShowMessageBox - */ -extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_messagebox_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_mouse.h b/bsp/simulator/SDL2-2.0.7/include/SDL_mouse.h deleted file mode 100644 index 6001bd46c1e80270d85d18dd72025b0c17f2722a..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_mouse.h +++ /dev/null @@ -1,302 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_mouse.h - * - * Include file for SDL mouse event handling. - */ - -#ifndef SDL_mouse_h_ -#define SDL_mouse_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */ - -/** - * \brief Cursor types for SDL_CreateSystemCursor(). - */ -typedef enum -{ - SDL_SYSTEM_CURSOR_ARROW, /**< Arrow */ - SDL_SYSTEM_CURSOR_IBEAM, /**< I-beam */ - SDL_SYSTEM_CURSOR_WAIT, /**< Wait */ - SDL_SYSTEM_CURSOR_CROSSHAIR, /**< Crosshair */ - SDL_SYSTEM_CURSOR_WAITARROW, /**< Small wait cursor (or Wait if not available) */ - SDL_SYSTEM_CURSOR_SIZENWSE, /**< Double arrow pointing northwest and southeast */ - SDL_SYSTEM_CURSOR_SIZENESW, /**< Double arrow pointing northeast and southwest */ - SDL_SYSTEM_CURSOR_SIZEWE, /**< Double arrow pointing west and east */ - SDL_SYSTEM_CURSOR_SIZENS, /**< Double arrow pointing north and south */ - SDL_SYSTEM_CURSOR_SIZEALL, /**< Four pointed arrow pointing north, south, east, and west */ - SDL_SYSTEM_CURSOR_NO, /**< Slashed circle or crossbones */ - SDL_SYSTEM_CURSOR_HAND, /**< Hand */ - SDL_NUM_SYSTEM_CURSORS -} SDL_SystemCursor; - -/** - * \brief Scroll direction types for the Scroll event - */ -typedef enum -{ - SDL_MOUSEWHEEL_NORMAL, /**< The scroll direction is normal */ - SDL_MOUSEWHEEL_FLIPPED /**< The scroll direction is flipped / natural */ -} SDL_MouseWheelDirection; - -/* Function prototypes */ - -/** - * \brief Get the window which currently has mouse focus. - */ -extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void); - -/** - * \brief Retrieve the current state of the mouse. - * - * The current button state is returned as a button bitmask, which can - * be tested using the SDL_BUTTON(X) macros, and x and y are set to the - * mouse cursor position relative to the focus window for the currently - * selected mouse. You can pass NULL for either x or y. - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetMouseState(int *x, int *y); - -/** - * \brief Get the current state of the mouse, in relation to the desktop - * - * This works just like SDL_GetMouseState(), but the coordinates will be - * reported relative to the top-left of the desktop. This can be useful if - * you need to track the mouse outside of a specific window and - * SDL_CaptureMouse() doesn't fit your needs. For example, it could be - * useful if you need to track the mouse while dragging a window, where - * coordinates relative to a window might not be in sync at all times. - * - * \note SDL_GetMouseState() returns the mouse position as SDL understands - * it from the last pump of the event queue. This function, however, - * queries the OS for the current mouse position, and as such, might - * be a slightly less efficient function. Unless you know what you're - * doing and have a good reason to use this function, you probably want - * SDL_GetMouseState() instead. - * - * \param x Returns the current X coord, relative to the desktop. Can be NULL. - * \param y Returns the current Y coord, relative to the desktop. Can be NULL. - * \return The current button state as a bitmask, which can be tested using the SDL_BUTTON(X) macros. - * - * \sa SDL_GetMouseState - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetGlobalMouseState(int *x, int *y); - -/** - * \brief Retrieve the relative state of the mouse. - * - * The current button state is returned as a button bitmask, which can - * be tested using the SDL_BUTTON(X) macros, and x and y are set to the - * mouse deltas since the last call to SDL_GetRelativeMouseState(). - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y); - -/** - * \brief Moves the mouse to the given position within the window. - * - * \param window The window to move the mouse into, or NULL for the current mouse focus - * \param x The x coordinate within the window - * \param y The y coordinate within the window - * - * \note This function generates a mouse motion event - */ -extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window, - int x, int y); - -/** - * \brief Moves the mouse to the given position in global screen space. - * - * \param x The x coordinate - * \param y The y coordinate - * \return 0 on success, -1 on error (usually: unsupported by a platform). - * - * \note This function generates a mouse motion event - */ -extern DECLSPEC int SDLCALL SDL_WarpMouseGlobal(int x, int y); - -/** - * \brief Set relative mouse mode. - * - * \param enabled Whether or not to enable relative mode - * - * \return 0 on success, or -1 if relative mode is not supported. - * - * While the mouse is in relative mode, the cursor is hidden, and the - * driver will try to report continuous motion in the current window. - * Only relative motion events will be delivered, the mouse position - * will not change. - * - * \note This function will flush any pending mouse motion. - * - * \sa SDL_GetRelativeMouseMode() - */ -extern DECLSPEC int SDLCALL SDL_SetRelativeMouseMode(SDL_bool enabled); - -/** - * \brief Capture the mouse, to track input outside an SDL window. - * - * \param enabled Whether or not to enable capturing - * - * Capturing enables your app to obtain mouse events globally, instead of - * just within your window. Not all video targets support this function. - * When capturing is enabled, the current window will get all mouse events, - * but unlike relative mode, no change is made to the cursor and it is - * not restrained to your window. - * - * This function may also deny mouse input to other windows--both those in - * your application and others on the system--so you should use this - * function sparingly, and in small bursts. For example, you might want to - * track the mouse while the user is dragging something, until the user - * releases a mouse button. It is not recommended that you capture the mouse - * for long periods of time, such as the entire time your app is running. - * - * While captured, mouse events still report coordinates relative to the - * current (foreground) window, but those coordinates may be outside the - * bounds of the window (including negative values). Capturing is only - * allowed for the foreground window. If the window loses focus while - * capturing, the capture will be disabled automatically. - * - * While capturing is enabled, the current window will have the - * SDL_WINDOW_MOUSE_CAPTURE flag set. - * - * \return 0 on success, or -1 if not supported. - */ -extern DECLSPEC int SDLCALL SDL_CaptureMouse(SDL_bool enabled); - -/** - * \brief Query whether relative mouse mode is enabled. - * - * \sa SDL_SetRelativeMouseMode() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_GetRelativeMouseMode(void); - -/** - * \brief Create a cursor, using the specified bitmap data and - * mask (in MSB format). - * - * The cursor width must be a multiple of 8 bits. - * - * The cursor is created in black and white according to the following: - * - * - * - * - * - * - *
data mask resulting pixel on screen
0 1 White
1 1 Black
0 0 Transparent
1 0 Inverted color if possible, black - * if not.
- * - * \sa SDL_FreeCursor() - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateCursor(const Uint8 * data, - const Uint8 * mask, - int w, int h, int hot_x, - int hot_y); - -/** - * \brief Create a color cursor. - * - * \sa SDL_FreeCursor() - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateColorCursor(SDL_Surface *surface, - int hot_x, - int hot_y); - -/** - * \brief Create a system cursor. - * - * \sa SDL_FreeCursor() - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_CreateSystemCursor(SDL_SystemCursor id); - -/** - * \brief Set the active cursor. - */ -extern DECLSPEC void SDLCALL SDL_SetCursor(SDL_Cursor * cursor); - -/** - * \brief Return the active cursor. - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void); - -/** - * \brief Return the default cursor. - */ -extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void); - -/** - * \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); - -/** - * \brief Toggle whether or not the cursor is shown. - * - * \param toggle 1 to show the cursor, 0 to hide it, -1 to query the current - * state. - * - * \return 1 if the cursor is shown, or 0 if the cursor is hidden. - */ -extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle); - -/** - * Used as a mask when testing buttons in buttonstate. - * - Button 1: Left mouse button - * - Button 2: Middle mouse button - * - Button 3: Right mouse button - */ -#define SDL_BUTTON(X) (1 << ((X)-1)) -#define SDL_BUTTON_LEFT 1 -#define SDL_BUTTON_MIDDLE 2 -#define SDL_BUTTON_RIGHT 3 -#define SDL_BUTTON_X1 4 -#define SDL_BUTTON_X2 5 -#define SDL_BUTTON_LMASK SDL_BUTTON(SDL_BUTTON_LEFT) -#define SDL_BUTTON_MMASK SDL_BUTTON(SDL_BUTTON_MIDDLE) -#define SDL_BUTTON_RMASK SDL_BUTTON(SDL_BUTTON_RIGHT) -#define SDL_BUTTON_X1MASK SDL_BUTTON(SDL_BUTTON_X1) -#define SDL_BUTTON_X2MASK SDL_BUTTON(SDL_BUTTON_X2) - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_mouse_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_mutex.h b/bsp/simulator/SDL2-2.0.7/include/SDL_mutex.h deleted file mode 100644 index 0272379e55e16bb25a913f9b4e4ca11809af7b56..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_mutex.h +++ /dev/null @@ -1,251 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SDL_mutex_h_ -#define SDL_mutex_h_ - -/** - * \file SDL_mutex.h - * - * Functions to provide thread synchronization primitives. - */ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Synchronization functions which can time out return this value - * if they time out. - */ -#define SDL_MUTEX_TIMEDOUT 1 - -/** - * This is the timeout value which corresponds to never time out. - */ -#define SDL_MUTEX_MAXWAIT (~(Uint32)0) - - -/** - * \name Mutex functions - */ -/* @{ */ - -/* The SDL mutex structure, defined in SDL_sysmutex.c */ -struct SDL_mutex; -typedef struct SDL_mutex SDL_mutex; - -/** - * Create a mutex, initialized unlocked. - */ -extern DECLSPEC SDL_mutex *SDLCALL SDL_CreateMutex(void); - -/** - * Lock the mutex. - * - * \return 0, or -1 on error. - */ -#define SDL_mutexP(m) SDL_LockMutex(m) -extern DECLSPEC int SDLCALL SDL_LockMutex(SDL_mutex * mutex); - -/** - * Try to lock the mutex - * - * \return 0, SDL_MUTEX_TIMEDOUT, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex); - -/** - * Unlock the mutex. - * - * \return 0, or -1 on error. - * - * \warning It is an error to unlock a mutex that has not been locked by - * the current thread, and doing so results in undefined behavior. - */ -#define SDL_mutexV(m) SDL_UnlockMutex(m) -extern DECLSPEC int SDLCALL SDL_UnlockMutex(SDL_mutex * mutex); - -/** - * Destroy a mutex. - */ -extern DECLSPEC void SDLCALL SDL_DestroyMutex(SDL_mutex * mutex); - -/* @} *//* Mutex functions */ - - -/** - * \name Semaphore functions - */ -/* @{ */ - -/* The SDL semaphore structure, defined in SDL_syssem.c */ -struct SDL_semaphore; -typedef struct SDL_semaphore SDL_sem; - -/** - * Create a semaphore, initialized with value, returns NULL on failure. - */ -extern DECLSPEC SDL_sem *SDLCALL SDL_CreateSemaphore(Uint32 initial_value); - -/** - * Destroy a semaphore. - */ -extern DECLSPEC void SDLCALL SDL_DestroySemaphore(SDL_sem * sem); - -/** - * This function suspends the calling thread until the semaphore pointed - * to by \c sem has a positive count. It then atomically decreases the - * semaphore count. - */ -extern DECLSPEC int SDLCALL SDL_SemWait(SDL_sem * sem); - -/** - * Non-blocking variant of SDL_SemWait(). - * - * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait would - * block, and -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_SemTryWait(SDL_sem * sem); - -/** - * Variant of SDL_SemWait() with a timeout in milliseconds. - * - * \return 0 if the wait succeeds, ::SDL_MUTEX_TIMEDOUT if the wait does not - * succeed in the allotted time, and -1 on error. - * - * \warning On some platforms this function is implemented by looping with a - * delay of 1 ms, and so should be avoided if possible. - */ -extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms); - -/** - * Atomically increases the semaphore's count (not blocking). - * - * \return 0, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem); - -/** - * Returns the current count of the semaphore. - */ -extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem); - -/* @} *//* Semaphore functions */ - - -/** - * \name Condition variable functions - */ -/* @{ */ - -/* The SDL condition variable structure, defined in SDL_syscond.c */ -struct SDL_cond; -typedef struct SDL_cond SDL_cond; - -/** - * Create a condition variable. - * - * Typical use of condition variables: - * - * Thread A: - * SDL_LockMutex(lock); - * while ( ! condition ) { - * SDL_CondWait(cond, lock); - * } - * SDL_UnlockMutex(lock); - * - * Thread B: - * SDL_LockMutex(lock); - * ... - * condition = true; - * ... - * SDL_CondSignal(cond); - * SDL_UnlockMutex(lock); - * - * There is some discussion whether to signal the condition variable - * with the mutex locked or not. There is some potential performance - * benefit to unlocking first on some platforms, but there are some - * potential race conditions depending on how your code is structured. - * - * In general it's safer to signal the condition variable while the - * mutex is locked. - */ -extern DECLSPEC SDL_cond *SDLCALL SDL_CreateCond(void); - -/** - * Destroy a condition variable. - */ -extern DECLSPEC void SDLCALL SDL_DestroyCond(SDL_cond * cond); - -/** - * Restart one of the threads that are waiting on the condition variable. - * - * \return 0 or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_CondSignal(SDL_cond * cond); - -/** - * Restart all threads that are waiting on the condition variable. - * - * \return 0 or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond * cond); - -/** - * Wait on the condition variable, unlocking the provided mutex. - * - * \warning The mutex must be locked before entering this function! - * - * The mutex is re-locked once the condition variable is signaled. - * - * \return 0 when it is signaled, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond * cond, SDL_mutex * mutex); - -/** - * Waits for at most \c ms milliseconds, and returns 0 if the condition - * variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not - * signaled in the allotted time, and -1 on error. - * - * \warning On some platforms this function is implemented by looping with a - * delay of 1 ms, and so should be avoided if possible. - */ -extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond, - SDL_mutex * mutex, Uint32 ms); - -/* @} *//* Condition variable functions */ - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_mutex_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_rect.h b/bsp/simulator/SDL2-2.0.7/include/SDL_rect.h deleted file mode 100644 index c4f6d74b339ddc7b71372221758dc229043362fd..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_rect.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_rect.h - * - * Header file for SDL_rect definition and management functions. - */ - -#ifndef SDL_rect_h_ -#define SDL_rect_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_pixels.h" -#include "SDL_rwops.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The structure that defines a point - * - * \sa SDL_EnclosePoints - * \sa SDL_PointInRect - */ -typedef struct SDL_Point -{ - int x; - int y; -} SDL_Point; - -/** - * \brief A rectangle, with the origin at the upper left. - * - * \sa SDL_RectEmpty - * \sa SDL_RectEquals - * \sa SDL_HasIntersection - * \sa SDL_IntersectRect - * \sa SDL_UnionRect - * \sa SDL_EnclosePoints - */ -typedef struct SDL_Rect -{ - int x, y; - int w, h; -} SDL_Rect; - -/** - * \brief Returns true if point resides inside a rectangle. - */ -SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r) -{ - return ( (p->x >= r->x) && (p->x < (r->x + r->w)) && - (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE; -} - -/** - * \brief Returns true if the rectangle has no area. - */ -SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r) -{ - return ((!r) || (r->w <= 0) || (r->h <= 0)) ? SDL_TRUE : SDL_FALSE; -} - -/** - * \brief Returns true if the two rectangles are equal. - */ -SDL_FORCE_INLINE SDL_bool SDL_RectEquals(const SDL_Rect *a, const SDL_Rect *b) -{ - return (a && b && (a->x == b->x) && (a->y == b->y) && - (a->w == b->w) && (a->h == b->h)) ? SDL_TRUE : SDL_FALSE; -} - -/** - * \brief Determine whether two rectangles intersect. - * - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_HasIntersection(const SDL_Rect * A, - const SDL_Rect * B); - -/** - * \brief Calculate the intersection of two rectangles. - * - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRect(const SDL_Rect * A, - const SDL_Rect * B, - SDL_Rect * result); - -/** - * \brief Calculate the union of two rectangles. - */ -extern DECLSPEC void SDLCALL SDL_UnionRect(const SDL_Rect * A, - const SDL_Rect * B, - SDL_Rect * result); - -/** - * \brief Calculate a minimal rectangle enclosing a set of points - * - * \return SDL_TRUE if any points were within the clipping rect - */ -extern DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints(const SDL_Point * points, - int count, - const SDL_Rect * clip, - SDL_Rect * result); - -/** - * \brief Calculate the intersection of a rectangle and line segment. - * - * \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect * - rect, int *X1, - int *Y1, int *X2, - int *Y2); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_rect_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_render.h b/bsp/simulator/SDL2-2.0.7/include/SDL_render.h deleted file mode 100644 index ea6ef9ff645cef9e643162828ccb6b5173d1b732..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_render.h +++ /dev/null @@ -1,910 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_render.h - * - * Header file for SDL 2D rendering functions. - * - * This API supports the following features: - * * single pixel points - * * single pixel lines - * * filled rectangles - * * texture images - * - * The primitives may be drawn in opaque, blended, or additive modes. - * - * The texture images may be drawn in opaque, blended, or additive modes. - * They can have an additional color tint or alpha modulation applied to - * them, and may also be stretched with linear interpolation. - * - * This API is designed to accelerate simple 2D operations. You may - * want more functionality such as polygons and particle effects and - * in that case you should use SDL's OpenGL/Direct3D support or one - * of the many good 3D engines. - * - * These functions must be called from the main thread. - * See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995 - */ - -#ifndef SDL_render_h_ -#define SDL_render_h_ - -#include "SDL_stdinc.h" -#include "SDL_rect.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Flags used when creating a rendering context - */ -typedef enum -{ - SDL_RENDERER_SOFTWARE = 0x00000001, /**< The renderer is a software fallback */ - SDL_RENDERER_ACCELERATED = 0x00000002, /**< The renderer uses hardware - acceleration */ - SDL_RENDERER_PRESENTVSYNC = 0x00000004, /**< Present is synchronized - with the refresh rate */ - SDL_RENDERER_TARGETTEXTURE = 0x00000008 /**< The renderer supports - rendering to texture */ -} SDL_RendererFlags; - -/** - * \brief Information on the capabilities of a render driver or context. - */ -typedef struct SDL_RendererInfo -{ - const char *name; /**< The name of the renderer */ - Uint32 flags; /**< Supported ::SDL_RendererFlags */ - Uint32 num_texture_formats; /**< The number of available texture formats */ - Uint32 texture_formats[16]; /**< The available texture formats */ - int max_texture_width; /**< The maximum texture width */ - int max_texture_height; /**< The maximum texture height */ -} SDL_RendererInfo; - -/** - * \brief The access pattern allowed for a texture. - */ -typedef enum -{ - SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */ - SDL_TEXTUREACCESS_STREAMING, /**< Changes frequently, lockable */ - SDL_TEXTUREACCESS_TARGET /**< Texture can be used as a render target */ -} SDL_TextureAccess; - -/** - * \brief The texture channel modulation used in SDL_RenderCopy(). - */ -typedef enum -{ - SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */ - SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */ - SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */ -} SDL_TextureModulate; - -/** - * \brief Flip constants for SDL_RenderCopyEx - */ -typedef enum -{ - SDL_FLIP_NONE = 0x00000000, /**< Do not flip */ - SDL_FLIP_HORIZONTAL = 0x00000001, /**< flip horizontally */ - SDL_FLIP_VERTICAL = 0x00000002 /**< flip vertically */ -} SDL_RendererFlip; - -/** - * \brief A structure representing rendering state - */ -struct SDL_Renderer; -typedef struct SDL_Renderer SDL_Renderer; - -/** - * \brief An efficient driver-specific representation of pixel data - */ -struct SDL_Texture; -typedef struct SDL_Texture SDL_Texture; - - -/* Function prototypes */ - -/** - * \brief Get the number of 2D rendering drivers available for the current - * display. - * - * A render driver is a set of code that handles rendering and texture - * management on a particular display. Normally there is only one, but - * some drivers may have several available with different capabilities. - * - * \sa SDL_GetRenderDriverInfo() - * \sa SDL_CreateRenderer() - */ -extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void); - -/** - * \brief Get information about a specific 2D rendering driver for the current - * display. - * - * \param index The index of the driver to query information about. - * \param info A pointer to an SDL_RendererInfo struct to be filled with - * information on the rendering driver. - * - * \return 0 on success, -1 if the index was out of range. - * - * \sa SDL_CreateRenderer() - */ -extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index, - SDL_RendererInfo * info); - -/** - * \brief Create a window and default renderer - * - * \param width The width of the window - * \param height The height of the window - * \param window_flags The flags used to create the window - * \param window A pointer filled with the window, or NULL on error - * \param renderer A pointer filled with the renderer, or NULL on error - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer( - int width, int height, Uint32 window_flags, - SDL_Window **window, SDL_Renderer **renderer); - - -/** - * \brief Create a 2D rendering context for a window. - * - * \param window The window where rendering is displayed. - * \param index The index of the rendering driver to initialize, or -1 to - * initialize the first one supporting the requested flags. - * \param flags ::SDL_RendererFlags. - * - * \return A valid rendering context or NULL if there was an error. - * - * \sa SDL_CreateSoftwareRenderer() - * \sa SDL_GetRendererInfo() - * \sa SDL_DestroyRenderer() - */ -extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window, - int index, Uint32 flags); - -/** - * \brief Create a 2D software rendering context for a surface. - * - * \param surface The surface where rendering is done. - * - * \return A valid rendering context or NULL if there was an error. - * - * \sa SDL_CreateRenderer() - * \sa SDL_DestroyRenderer() - */ -extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface); - -/** - * \brief Get the renderer associated with a window. - */ -extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window); - -/** - * \brief Get information about a rendering context. - */ -extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer, - SDL_RendererInfo * info); - -/** - * \brief Get the output size in pixels of a rendering context. - */ -extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer, - int *w, int *h); - -/** - * \brief Create a texture for a rendering context. - * - * \param renderer The renderer. - * \param format The format of the texture. - * \param access One of the enumerated values in ::SDL_TextureAccess. - * \param w The width of the texture in pixels. - * \param h The height of the texture in pixels. - * - * \return The created texture is returned, or NULL if no rendering context was - * active, the format was unsupported, or the width or height were out - * of range. - * - * \note The contents of the texture are not defined at creation. - * - * \sa SDL_QueryTexture() - * \sa SDL_UpdateTexture() - * \sa SDL_DestroyTexture() - */ -extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer, - Uint32 format, - int access, int w, - int h); - -/** - * \brief Create a texture from an existing surface. - * - * \param renderer The renderer. - * \param surface The surface containing pixel data used to fill the texture. - * - * \return The created texture is returned, or NULL on error. - * - * \note The surface is not modified or freed by this function. - * - * \sa SDL_QueryTexture() - * \sa SDL_DestroyTexture() - */ -extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface); - -/** - * \brief Query the attributes of a texture - * - * \param texture A texture to be queried. - * \param format A pointer filled in with the raw format of the texture. The - * actual format may differ, but pixel transfers will use this - * format. - * \param access A pointer filled in with the actual access to the texture. - * \param w A pointer filled in with the width of the texture in pixels. - * \param h A pointer filled in with the height of the texture in pixels. - * - * \return 0 on success, or -1 if the texture is not valid. - */ -extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture, - Uint32 * format, int *access, - int *w, int *h); - -/** - * \brief Set an additional color value used in render copy operations. - * - * \param texture The texture to update. - * \param r The red color value multiplied into copy operations. - * \param g The green color value multiplied into copy operations. - * \param b The blue color value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or color modulation - * is not supported. - * - * \sa SDL_GetTextureColorMod() - */ -extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture, - Uint8 r, Uint8 g, Uint8 b); - - -/** - * \brief Get the additional color value used in render copy operations. - * - * \param texture The texture to query. - * \param r A pointer filled in with the current red color value. - * \param g A pointer filled in with the current green color value. - * \param b A pointer filled in with the current blue color value. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \sa SDL_SetTextureColorMod() - */ -extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture, - Uint8 * r, Uint8 * g, - Uint8 * b); - -/** - * \brief Set an additional alpha value used in render copy operations. - * - * \param texture The texture to update. - * \param alpha The alpha value multiplied into copy operations. - * - * \return 0 on success, or -1 if the texture is not valid or alpha modulation - * is not supported. - * - * \sa SDL_GetTextureAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture, - Uint8 alpha); - -/** - * \brief Get the additional alpha value used in render copy operations. - * - * \param texture The texture to query. - * \param alpha A pointer filled in with the current alpha value. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \sa SDL_SetTextureAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture, - Uint8 * alpha); - -/** - * \brief Set the blend mode used for texture copy operations. - * - * \param texture The texture to update. - * \param blendMode ::SDL_BlendMode to use for texture blending. - * - * \return 0 on success, or -1 if the texture is not valid or the blend mode is - * not supported. - * - * \note If the blend mode is not supported, the closest supported mode is - * chosen. - * - * \sa SDL_GetTextureBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, - SDL_BlendMode blendMode); - -/** - * \brief Get the blend mode used for texture copy operations. - * - * \param texture The texture to query. - * \param blendMode A pointer filled in with the current blend mode. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \sa SDL_SetTextureBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture, - SDL_BlendMode *blendMode); - -/** - * \brief Update the given texture rectangle with new pixel data. - * - * \param texture The texture to update - * \param rect A pointer to the rectangle of pixels to update, or NULL to - * update the entire texture. - * \param pixels The raw pixel data in the format of the texture. - * \param pitch The number of bytes in a row of pixel data, including padding between lines. - * - * The pixel data must be in the format of the texture. The pixel format can be - * queried with SDL_QueryTexture. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \note This is a fairly slow function. - */ -extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture, - const SDL_Rect * rect, - const void *pixels, int pitch); - -/** - * \brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data. - * - * \param texture The texture to update - * \param rect A pointer to the rectangle of pixels to update, or NULL to - * update the entire texture. - * \param Yplane The raw pixel data for the Y plane. - * \param Ypitch The number of bytes between rows of pixel data for the Y plane. - * \param Uplane The raw pixel data for the U plane. - * \param Upitch The number of bytes between rows of pixel data for the U plane. - * \param Vplane The raw pixel data for the V plane. - * \param Vpitch The number of bytes between rows of pixel data for the V plane. - * - * \return 0 on success, or -1 if the texture is not valid. - * - * \note You can use SDL_UpdateTexture() as long as your pixel data is - * a contiguous block of Y and U/V planes in the proper order, but - * this function is available if your pixel data is not contiguous. - */ -extern DECLSPEC int SDLCALL SDL_UpdateYUVTexture(SDL_Texture * texture, - const SDL_Rect * rect, - const Uint8 *Yplane, int Ypitch, - const Uint8 *Uplane, int Upitch, - const Uint8 *Vplane, int Vpitch); - -/** - * \brief Lock a portion of the texture for write-only pixel access. - * - * \param texture The texture to lock for access, which was created with - * ::SDL_TEXTUREACCESS_STREAMING. - * \param rect A pointer to the rectangle to lock for access. If the rect - * is NULL, the entire texture will be locked. - * \param pixels This is filled in with a pointer to the locked pixels, - * appropriately offset by the locked area. - * \param pitch This is filled in with the pitch of the locked pixels. - * - * \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING. - * - * \sa SDL_UnlockTexture() - */ -extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture, - const SDL_Rect * rect, - void **pixels, int *pitch); - -/** - * \brief Unlock a texture, uploading the changes to video memory, if needed. - * - * \sa SDL_LockTexture() - */ -extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture); - -/** - * \brief Determines whether a window supports the use of render targets - * - * \param renderer The renderer that will be checked - * - * \return SDL_TRUE if supported, SDL_FALSE if not. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer); - -/** - * \brief Set a texture as the current rendering target. - * - * \param renderer The renderer. - * \param texture The targeted texture, which must be created with the SDL_TEXTUREACCESS_TARGET flag, or NULL for the default render target - * - * \return 0 on success, or -1 on error - * - * \sa SDL_GetRenderTarget() - */ -extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer, - SDL_Texture *texture); - -/** - * \brief Get the current render target or NULL for the default render target. - * - * \return The current render target - * - * \sa SDL_SetRenderTarget() - */ -extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer); - -/** - * \brief Set device independent resolution for rendering - * - * \param renderer The renderer for which resolution should be set. - * \param w The width of the logical resolution - * \param h The height of the logical resolution - * - * This function uses the viewport and scaling functionality to allow a fixed logical - * resolution for rendering, regardless of the actual output resolution. If the actual - * output resolution doesn't have the same aspect ratio the output rendering will be - * centered within the output display. - * - * If the output display is a window, mouse events in the window will be filtered - * and scaled so they seem to arrive within the logical resolution. - * - * \note If this function results in scaling or subpixel drawing by the - * rendering backend, it will be handled using the appropriate - * quality hints. - * - * \sa SDL_RenderGetLogicalSize() - * \sa SDL_RenderSetScale() - * \sa SDL_RenderSetViewport() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h); - -/** - * \brief Get device independent resolution for rendering - * - * \param renderer The renderer from which resolution should be queried. - * \param w A pointer filled with the width of the logical resolution - * \param h A pointer filled with the height of the logical resolution - * - * \sa SDL_RenderSetLogicalSize() - */ -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. - * - * \param renderer The renderer for which the drawing area should be set. - * \param rect The rectangle representing the drawing area, or NULL to set the viewport to the entire target. - * - * The x,y of the viewport rect represents the origin for rendering. - * - * \return 0 on success, or -1 on error - * - * \note If the window associated with the renderer is resized, the viewport is automatically reset. - * - * \sa SDL_RenderGetViewport() - * \sa SDL_RenderSetLogicalSize() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Get the drawing area for the current target. - * - * \sa SDL_RenderSetViewport() - */ -extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, - SDL_Rect * rect); - -/** - * \brief Set the clip rectangle for the current target. - * - * \param renderer The renderer for which clip rectangle should be set. - * \param rect A pointer to the rectangle to set as the clip rectangle, or - * NULL to disable clipping. - * - * \return 0 on success, or -1 on error - * - * \sa SDL_RenderGetClipRect() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Get the clip rectangle for the current target. - * - * \param renderer The renderer from which clip rectangle should be queried. - * \param rect A pointer filled in with the current clip rectangle, or - * an empty rectangle if clipping is disabled. - * - * \sa SDL_RenderSetClipRect() - */ -extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer, - SDL_Rect * rect); - -/** - * \brief Get whether clipping is enabled on the given renderer. - * - * \param renderer The renderer from which clip state should be queried. - * - * \sa SDL_RenderGetClipRect() - */ -extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer); - - -/** - * \brief Set the drawing scale for rendering on the current target. - * - * \param renderer The renderer for which the drawing scale should be set. - * \param scaleX The horizontal scaling factor - * \param scaleY The vertical scaling factor - * - * The drawing coordinates are scaled by the x/y scaling factors - * before they are used by the renderer. This allows resolution - * independent drawing with a single coordinate system. - * - * \note If this results in scaling or subpixel drawing by the - * rendering backend, it will be handled using the appropriate - * quality hints. For best results use integer scaling factors. - * - * \sa SDL_RenderGetScale() - * \sa SDL_RenderSetLogicalSize() - */ -extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer, - float scaleX, float scaleY); - -/** - * \brief Get the drawing scale for the current target. - * - * \param renderer The renderer from which drawing scale should be queried. - * \param scaleX A pointer filled in with the horizontal scaling factor - * \param scaleY A pointer filled in with the vertical scaling factor - * - * \sa SDL_RenderSetScale() - */ -extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, - float *scaleX, float *scaleY); - -/** - * \brief Set the color used for drawing operations (Rect, Line and Clear). - * - * \param renderer The renderer for which drawing color should be set. - * \param r The red value used to draw on the rendering target. - * \param g The green value used to draw on the rendering target. - * \param b The blue value used to draw on the rendering target. - * \param a The alpha value used to draw on the rendering target, usually - * ::SDL_ALPHA_OPAQUE (255). - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_SetRenderDrawColor(SDL_Renderer * renderer, - Uint8 r, Uint8 g, Uint8 b, - Uint8 a); - -/** - * \brief Get the color used for drawing operations (Rect, Line and Clear). - * - * \param renderer The renderer from which drawing color should be queried. - * \param r A pointer to the red value used to draw on the rendering target. - * \param g A pointer to the green value used to draw on the rendering target. - * \param b A pointer to the blue value used to draw on the rendering target. - * \param a A pointer to the alpha value used to draw on the rendering target, - * usually ::SDL_ALPHA_OPAQUE (255). - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer, - Uint8 * r, Uint8 * g, Uint8 * b, - Uint8 * a); - -/** - * \brief Set the blend mode used for drawing operations (Fill and Line). - * - * \param renderer The renderer for which blend mode should be set. - * \param blendMode ::SDL_BlendMode to use for blending. - * - * \return 0 on success, or -1 on error - * - * \note If the blend mode is not supported, the closest supported mode is - * chosen. - * - * \sa SDL_GetRenderDrawBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, - SDL_BlendMode blendMode); - -/** - * \brief Get the blend mode used for drawing operations. - * - * \param renderer The renderer from which blend mode should be queried. - * \param blendMode A pointer filled in with the current blend mode. - * - * \return 0 on success, or -1 on error - * - * \sa SDL_SetRenderDrawBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, - SDL_BlendMode *blendMode); - -/** - * \brief Clear the current rendering target with the drawing color - * - * This function clears the entire rendering target, ignoring the viewport and - * the clip rectangle. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer); - -/** - * \brief Draw a point on the current rendering target. - * - * \param renderer The renderer which should draw a point. - * \param x The x coordinate of the point. - * \param y The y coordinate of the point. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, - int x, int y); - -/** - * \brief Draw multiple points on the current rendering target. - * - * \param renderer The renderer which should draw multiple points. - * \param points The points to draw - * \param count The number of points to draw - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, - const SDL_Point * points, - int count); - -/** - * \brief Draw a line on the current rendering target. - * - * \param renderer The renderer which should draw a line. - * \param x1 The x coordinate of the start point. - * \param y1 The y coordinate of the start point. - * \param x2 The x coordinate of the end point. - * \param y2 The y coordinate of the end point. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, - int x1, int y1, int x2, int y2); - -/** - * \brief Draw a series of connected lines on the current rendering target. - * - * \param renderer The renderer which should draw multiple lines. - * \param points The points along the lines - * \param count The number of points, drawing count-1 lines - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, - const SDL_Point * points, - int count); - -/** - * \brief Draw a rectangle on the current rendering target. - * - * \param renderer The renderer which should draw a rectangle. - * \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Draw some number of rectangles on the current rendering target. - * - * \param renderer The renderer which should draw multiple rectangles. - * \param rects A pointer to an array of destination rectangles. - * \param count The number of rectangles. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, - const SDL_Rect * rects, - int count); - -/** - * \brief Fill a rectangle on the current rendering target with the drawing color. - * - * \param renderer The renderer which should fill a rectangle. - * \param rect A pointer to the destination rectangle, or NULL for the entire - * rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer, - const SDL_Rect * rect); - -/** - * \brief Fill some number of rectangles on the current rendering target with the drawing color. - * - * \param renderer The renderer which should fill multiple rectangles. - * \param rects A pointer to an array of destination rectangles. - * \param count The number of rectangles. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer, - const SDL_Rect * rects, - int count); - -/** - * \brief Copy a portion of the texture to the current rendering target. - * - * \param renderer The renderer which should copy parts of a texture. - * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire - * texture. - * \param dstrect A pointer to the destination rectangle, or NULL for the - * entire rendering target. - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, - SDL_Texture * texture, - const SDL_Rect * srcrect, - const SDL_Rect * dstrect); - -/** - * \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center - * - * \param renderer The renderer which should copy parts of a texture. - * \param texture The source texture. - * \param srcrect A pointer to the source rectangle, or NULL for the entire - * texture. - * \param dstrect A pointer to the destination rectangle, or NULL for the - * entire rendering target. - * \param angle An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction - * \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2). - * \param flip An SDL_RendererFlip value stating which flipping actions should be performed on the texture - * - * \return 0 on success, or -1 on error - */ -extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, - SDL_Texture * texture, - const SDL_Rect * srcrect, - const SDL_Rect * dstrect, - const double angle, - const SDL_Point *center, - const SDL_RendererFlip flip); - -/** - * \brief Read pixels from the current rendering target. - * - * \param renderer The renderer from which pixels should be read. - * \param rect A pointer to the rectangle to read, or NULL for the entire - * render target. - * \param format The desired format of the pixel data, or 0 to use the format - * of the rendering target - * \param pixels A pointer to be filled in with the pixel data - * \param pitch The pitch of the pixels parameter. - * - * \return 0 on success, or -1 if pixel reading is not supported. - * - * \warning This is a very slow operation, and should not be used frequently. - */ -extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer, - const SDL_Rect * rect, - Uint32 format, - void *pixels, int pitch); - -/** - * \brief Update the screen with rendering performed. - */ -extern DECLSPEC void SDLCALL SDL_RenderPresent(SDL_Renderer * renderer); - -/** - * \brief Destroy the specified texture. - * - * \sa SDL_CreateTexture() - * \sa SDL_CreateTextureFromSurface() - */ -extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture); - -/** - * \brief Destroy the rendering context for a window and free associated - * textures. - * - * \sa SDL_CreateRenderer() - */ -extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer); - - -/** - * \brief Bind the texture to the current OpenGL/ES/ES2 context for use with - * OpenGL instructions. - * - * \param texture The SDL texture to bind - * \param texw A pointer to a float that will be filled with the texture width - * \param texh A pointer to a float that will be filled with the texture height - * - * \return 0 on success, or -1 if the operation is not supported - */ -extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh); - -/** - * \brief Unbind a texture from the current OpenGL/ES/ES2 context. - * - * \param texture The SDL texture to unbind - * - * \return 0 on success, or -1 if the operation is not supported - */ -extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_render_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_revision.h b/bsp/simulator/SDL2-2.0.7/include/SDL_revision.h deleted file mode 100644 index 9376093ee76bd46fbb70196e87673cda9d53ccd6..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_revision.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SDL_REVISION "hg-11645:2088cd828335" -#define SDL_REVISION_NUMBER 11645 diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_rwops.h b/bsp/simulator/SDL2-2.0.7/include/SDL_rwops.h deleted file mode 100644 index 7f0cbdfd55d5fabdd8ff80fc5ec605a7dd70bc0c..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_rwops.h +++ /dev/null @@ -1,254 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_rwops.h - * - * This file provides a general interface for SDL to read and write - * data streams. It can easily be extended to files, memory, etc. - */ - -#ifndef SDL_rwops_h_ -#define SDL_rwops_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* RWops Types */ -#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. - */ -typedef struct SDL_RWops -{ - /** - * Return the size of the file in this rwops, or -1 if unknown - */ - Sint64 (SDLCALL * size) (struct SDL_RWops * context); - - /** - * Seek to \c offset relative to \c whence, one of stdio's whence values: - * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END - * - * \return the final offset in the data stream, or -1 on error. - */ - Sint64 (SDLCALL * seek) (struct SDL_RWops * context, Sint64 offset, - int whence); - - /** - * Read up to \c maxnum objects each of size \c size from the data - * stream to the area pointed at by \c ptr. - * - * \return the number of objects read, or 0 at error or end of file. - */ - size_t (SDLCALL * read) (struct SDL_RWops * context, void *ptr, - size_t size, size_t maxnum); - - /** - * Write exactly \c num objects each of size \c size from the area - * pointed at by \c ptr to data stream. - * - * \return the number of objects written, or 0 at error or end of file. - */ - size_t (SDLCALL * write) (struct SDL_RWops * context, const void *ptr, - size_t size, size_t num); - - /** - * Close and free an allocated SDL_RWops structure. - * - * \return 0 if successful or -1 on write error when flushing data. - */ - int (SDLCALL * close) (struct SDL_RWops * context); - - Uint32 type; - union - { -#if defined(__ANDROID__) - struct - { - void *fileNameRef; - void *inputStreamRef; - void *readableByteChannelRef; - void *readMethod; - void *assetFileDescriptorRef; - long position; - long size; - long offset; - int fd; - } androidio; -#elif defined(__WIN32__) - struct - { - SDL_bool append; - void *h; - struct - { - void *data; - size_t size; - size_t left; - } buffer; - } windowsio; -#endif - -#ifdef HAVE_STDIO_H - struct - { - SDL_bool autoclose; - FILE *fp; - } stdio; -#endif - struct - { - Uint8 *base; - Uint8 *here; - Uint8 *stop; - } mem; - struct - { - void *data1; - void *data2; - } unknown; - } hidden; - -} SDL_RWops; - - -/** - * \name RWFrom functions - * - * Functions to create SDL_RWops structures from various data streams. - */ -/* @{ */ - -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file, - const char *mode); - -#ifdef HAVE_STDIO_H -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, - SDL_bool autoclose); -#else -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp, - SDL_bool autoclose); -#endif - -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size); -extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem, - int size); - -/* @} *//* RWFrom functions */ - - -extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void); -extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area); - -#define RW_SEEK_SET 0 /**< Seek from the beginning of data */ -#define RW_SEEK_CUR 1 /**< Seek relative to current read point */ -#define RW_SEEK_END 2 /**< Seek relative to the end of data */ - -/** - * \name Read/write macros - * - * Macros to easily read and write from an SDL_RWops structure. - */ -/* @{ */ -#define SDL_RWsize(ctx) (ctx)->size(ctx) -#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence) -#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR) -#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) -#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) -#define SDL_RWclose(ctx) (ctx)->close(ctx) -/* @} *//* Read/write macros */ - - -/** - * Load all the data from an SDL data stream. - * - * The data is allocated with a zero byte at the end (null terminated) - * - * If \c datasize is not NULL, it is filled with the size of the data read. - * - * If \c freesrc is non-zero, the stream will be closed after being read. - * - * The data should be freed with SDL_free(). - * - * \return the data, or NULL if there was an error. - */ -extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize, - int freesrc); - -/** - * Load an entire file. - * - * Convenience macro. - */ -#define SDL_LoadFile(file, datasize) SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1) - -/** - * \name Read endian functions - * - * Read an item of the specified endianness and return in native format. - */ -/* @{ */ -extern DECLSPEC Uint8 SDLCALL SDL_ReadU8(SDL_RWops * src); -extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src); -extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src); -extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src); -extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src); -extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src); -extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src); -/* @} *//* Read endian functions */ - -/** - * \name Write endian functions - * - * Write an item of native format to the specified endianness. - */ -/* @{ */ -extern DECLSPEC size_t SDLCALL SDL_WriteU8(SDL_RWops * dst, Uint8 value); -extern DECLSPEC size_t SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value); -extern DECLSPEC size_t SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value); -extern DECLSPEC size_t SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value); -extern DECLSPEC size_t SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value); -extern DECLSPEC size_t SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value); -extern DECLSPEC size_t SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value); -/* @} *//* Write endian functions */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_rwops_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_surface.h b/bsp/simulator/SDL2-2.0.7/include/SDL_surface.h deleted file mode 100644 index 510690c9cffe37fa3153d547d87c9ed0089584c2..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_surface.h +++ /dev/null @@ -1,521 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_surface.h - * - * Header file for ::SDL_Surface definition and management functions. - */ - -#ifndef SDL_surface_h_ -#define SDL_surface_h_ - -#include "SDL_stdinc.h" -#include "SDL_pixels.h" -#include "SDL_rect.h" -#include "SDL_blendmode.h" -#include "SDL_rwops.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name Surface flags - * - * These are the currently supported flags for the ::SDL_Surface. - * - * \internal - * Used internally (read-only). - */ -/* @{ */ -#define SDL_SWSURFACE 0 /**< Just here for compatibility */ -#define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */ -#define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */ -#define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */ -/* @} *//* Surface flags */ - -/** - * Evaluates to true if the surface needs to be locked before access. - */ -#define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) - -/** - * \brief A collection of pixels used in software blitting. - * - * \note This structure should be treated as read-only, except for \c pixels, - * which, if not NULL, contains the raw pixel data for the surface. - */ -typedef struct SDL_Surface -{ - Uint32 flags; /**< Read-only */ - SDL_PixelFormat *format; /**< Read-only */ - int w, h; /**< Read-only */ - int pitch; /**< Read-only */ - void *pixels; /**< Read-write */ - - /** Application data associated with the surface */ - void *userdata; /**< Read-write */ - - /** information needed for surfaces requiring locks */ - int locked; /**< Read-only */ - void *lock_data; /**< Read-only */ - - /** clipping information */ - SDL_Rect clip_rect; /**< Read-only */ - - /** info for fast blit mapping to other surfaces */ - struct SDL_BlitMap *map; /**< Private */ - - /** Reference count -- used when freeing surface */ - int refcount; /**< Read-mostly */ -} SDL_Surface; - -/** - * \brief The type of function used for surface blitting functions. - */ -typedef int (SDLCALL *SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect, - struct SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * Allocate and free an RGB surface. - * - * If the depth is 4 or 8 bits, an empty palette is allocated for the surface. - * If the depth is greater than 8 bits, the pixel format is set using the - * flags '[RGB]mask'. - * - * If the function runs out of memory, it will return NULL. - * - * \param flags The \c flags are obsolete and should be set to 0. - * \param width The width in pixels of the surface to create. - * \param height The height in pixels of the surface to create. - * \param depth The depth in bits of the surface to create. - * \param Rmask The red mask of the surface to create. - * \param Gmask The green mask of the surface to create. - * \param Bmask The blue mask of the surface to create. - * \param Amask The alpha mask of the surface to create. - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurface - (Uint32 flags, int width, int height, int depth, - Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask); - -/* !!! FIXME for 2.1: why does this ask for depth? Format provides that. */ -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, - int depth, - int pitch, - Uint32 Rmask, - 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); - -/** - * \brief Set the palette used by a surface. - * - * \return 0, or -1 if the surface format doesn't use a palette. - * - * \note A single palette can be shared with many surfaces. - */ -extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface, - SDL_Palette * palette); - -/** - * \brief Sets up a surface for directly accessing the pixels. - * - * Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write - * to and read from \c surface->pixels, using the pixel format stored in - * \c surface->format. Once you are done accessing the surface, you should - * use SDL_UnlockSurface() to release it. - * - * Not all surfaces require locking. If SDL_MUSTLOCK(surface) evaluates - * to 0, then you can read and write to the surface at any time, and the - * pixel format of the surface will not change. - * - * No operating system or library calls should be made between lock/unlock - * pairs, as critical system locks may be held during this time. - * - * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. - * - * \sa SDL_UnlockSurface() - */ -extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface * surface); -/** \sa SDL_LockSurface() */ -extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface * surface); - -/** - * Load a surface from a seekable SDL data stream (memory or file). - * - * If \c freesrc is non-zero, the stream will be closed after being read. - * - * The new surface should be freed with SDL_FreeSurface(). - * - * \return the new surface, or NULL if there was an error. - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src, - int freesrc); - -/** - * Load a surface from a file. - * - * Convenience macro. - */ -#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1) - -/** - * 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. - */ -extern DECLSPEC int SDLCALL SDL_SaveBMP_RW - (SDL_Surface * surface, SDL_RWops * dst, int freedst); - -/** - * Save a surface to a file. - * - * Convenience macro. - */ -#define SDL_SaveBMP(surface, file) \ - SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1) - -/** - * \brief Sets the RLE acceleration hint for a surface. - * - * \return 0 on success, or -1 if the surface is not valid - * - * \note If RLE is enabled, colorkey and alpha blending blits are much faster, - * but the surface must be locked before directly accessing the pixels. - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, - int flag); - -/** - * \brief Sets the color key (transparent pixel) in a blittable surface. - * - * \param surface The surface to update - * \param flag Non-zero to enable colorkey and 0 to disable colorkey - * \param key The transparent pixel in the native surface format - * - * \return 0 on success, or -1 if the surface is not valid - * - * You can pass SDL_RLEACCEL to enable RLE accelerated blits. - */ -extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, - int flag, Uint32 key); - -/** - * \brief Gets the color key (transparent pixel) in a blittable surface. - * - * \param surface The surface to update - * \param key A pointer filled in with the transparent pixel in the native - * surface format - * - * \return 0 on success, or -1 if the surface is not valid or colorkey is not - * enabled. - */ -extern DECLSPEC int SDLCALL SDL_GetColorKey(SDL_Surface * surface, - Uint32 * key); - -/** - * \brief Set an additional color value used in blit operations. - * - * \param surface The surface to update. - * \param r The red color value multiplied into blit operations. - * \param g The green color value multiplied into blit operations. - * \param b The blue color value multiplied into blit operations. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_GetSurfaceColorMod() - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, - Uint8 r, Uint8 g, Uint8 b); - - -/** - * \brief Get the additional color value used in blit operations. - * - * \param surface The surface to query. - * \param r A pointer filled in with the current red color value. - * \param g A pointer filled in with the current green color value. - * \param b A pointer filled in with the current blue color value. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_SetSurfaceColorMod() - */ -extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, - Uint8 * r, Uint8 * g, - Uint8 * b); - -/** - * \brief Set an additional alpha value used in blit operations. - * - * \param surface The surface to update. - * \param alpha The alpha value multiplied into blit operations. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_GetSurfaceAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, - Uint8 alpha); - -/** - * \brief Get the additional alpha value used in blit operations. - * - * \param surface The surface to query. - * \param alpha A pointer filled in with the current alpha value. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_SetSurfaceAlphaMod() - */ -extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, - Uint8 * alpha); - -/** - * \brief Set the blend mode used for blit operations. - * - * \param surface The surface to update. - * \param blendMode ::SDL_BlendMode to use for blit blending. - * - * \return 0 on success, or -1 if the parameters are not valid. - * - * \sa SDL_GetSurfaceBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, - SDL_BlendMode blendMode); - -/** - * \brief Get the blend mode used for blit operations. - * - * \param surface The surface to query. - * \param blendMode A pointer filled in with the current blend mode. - * - * \return 0 on success, or -1 if the surface is not valid. - * - * \sa SDL_SetSurfaceBlendMode() - */ -extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, - SDL_BlendMode *blendMode); - -/** - * Sets the clipping rectangle for the destination surface in a blit. - * - * If the clip rectangle is NULL, clipping will be disabled. - * - * If the clip rectangle doesn't intersect the surface, the function will - * return SDL_FALSE and blits will be completely clipped. Otherwise the - * function returns SDL_TRUE and blits to the surface will be clipped to - * the intersection of the surface area and the clipping rectangle. - * - * Note that blits are automatically clipped to the edges of the source - * and destination surfaces. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface, - const SDL_Rect * rect); - -/** - * Gets the clipping rectangle for the destination surface in a blit. - * - * \c rect must be a pointer to a valid rectangle which will be filled - * with the correct values. - */ -extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface * surface, - SDL_Rect * rect); - -/* - * Creates a new surface identical to the existing surface - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_DuplicateSurface(SDL_Surface * surface); - -/** - * Creates a new surface of the specified format, and then copies and maps - * the given surface to it so the blit of the converted surface will be as - * fast as possible. If this function fails, it returns NULL. - * - * The \c flags parameter is passed to SDL_CreateRGBSurface() and has those - * semantics. You can also pass ::SDL_RLEACCEL in the flags parameter and - * SDL will try to RLE accelerate colorkey and alpha blits in the resulting - * surface. - */ -extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurface - (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags); -extern DECLSPEC SDL_Surface *SDLCALL SDL_ConvertSurfaceFormat - (SDL_Surface * src, Uint32 pixel_format, Uint32 flags); - -/** - * \brief Copy a block of pixels of one format to another format - * - * \return 0 on success, or -1 if there was an error - */ -extern DECLSPEC int SDLCALL SDL_ConvertPixels(int width, int height, - Uint32 src_format, - const void * src, int src_pitch, - Uint32 dst_format, - void * dst, int dst_pitch); - -/** - * Performs a fast fill of the given rectangle with \c color. - * - * If \c rect is NULL, the whole surface will be filled with \c color. - * - * The color should be a pixel of the format used by the surface, and - * can be generated by the SDL_MapRGB() function. - * - * \return 0 on success, or -1 on error. - */ -extern DECLSPEC int SDLCALL SDL_FillRect - (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color); -extern DECLSPEC int SDLCALL SDL_FillRects - (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color); - -/** - * Performs a fast blit from the source surface to the destination surface. - * - * This assumes that the source and destination rectangles are - * the same size. If either \c srcrect or \c dstrect are NULL, the entire - * surface (\c src or \c dst) is copied. The final blit rectangles are saved - * in \c srcrect and \c dstrect after all clipping is performed. - * - * \return If the blit is successful, it returns 0, otherwise it returns -1. - * - * The blit function should not be called on a locked surface. - * - * The blit semantics for surfaces with and without blending and colorkey - * are defined as follows: - * \verbatim - RGBA->RGB: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source alpha-channel and per-surface alpha) - SDL_SRCCOLORKEY ignored. - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy RGB. - if SDL_SRCCOLORKEY set, only copy the pixels matching the - RGB values of the source color key, ignoring alpha in the - comparison. - - RGB->RGBA: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source per-surface alpha) - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy RGB, set destination alpha to source per-surface alpha value. - both: - if SDL_SRCCOLORKEY set, only copy the pixels matching the - source color key. - - RGBA->RGBA: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source alpha-channel and per-surface alpha) - SDL_SRCCOLORKEY ignored. - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy all of RGBA to the destination. - if SDL_SRCCOLORKEY set, only copy the pixels matching the - RGB values of the source color key, ignoring alpha in the - comparison. - - RGB->RGB: - Source surface blend mode set to SDL_BLENDMODE_BLEND: - alpha-blend (using the source per-surface alpha) - Source surface blend mode set to SDL_BLENDMODE_NONE: - copy RGB. - both: - if SDL_SRCCOLORKEY set, only copy the pixels matching the - source color key. - \endverbatim - * - * You should call SDL_BlitSurface() unless you know exactly how SDL - * blitting works internally and how to use the other blit functions. - */ -#define SDL_BlitSurface SDL_UpperBlit - -/** - * This is the public blit function, SDL_BlitSurface(), and it performs - * rectangle validation and clipping before passing it to SDL_LowerBlit() - */ -extern DECLSPEC int SDLCALL SDL_UpperBlit - (SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * This is a semi-private blit function and it performs low-level surface - * blitting only. - */ -extern DECLSPEC int SDLCALL SDL_LowerBlit - (SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * \brief Perform a fast, low quality, stretch blit between two surfaces of the - * same pixel format. - * - * \note This function uses a static buffer, and is not thread-safe. - */ -extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src, - const SDL_Rect * srcrect, - SDL_Surface * dst, - const SDL_Rect * dstrect); - -#define SDL_BlitScaled SDL_UpperBlitScaled - -/** - * This is the public scaled blit function, SDL_BlitScaled(), and it performs - * rectangle validation and clipping before passing it to SDL_LowerBlitScaled() - */ -extern DECLSPEC int SDLCALL SDL_UpperBlitScaled - (SDL_Surface * src, const SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - -/** - * This is a semi-private blit function and it performs low-level surface - * scaled blitting only. - */ -extern DECLSPEC int SDLCALL SDL_LowerBlitScaled - (SDL_Surface * src, SDL_Rect * srcrect, - SDL_Surface * dst, SDL_Rect * dstrect); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_surface_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_system.h b/bsp/simulator/SDL2-2.0.7/include/SDL_system.h deleted file mode 100644 index 53075c2c78aefd75ffe72f54c99653f81db19f10..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_system.h +++ /dev/null @@ -1,216 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_system.h - * - * Include file for platform specific SDL API functions - */ - -#ifndef SDL_system_h_ -#define SDL_system_h_ - -#include "SDL_stdinc.h" -#include "SDL_keyboard.h" -#include "SDL_render.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - - -/* Platform specific functions for Windows */ -#ifdef __WIN32__ - -/** - \brief Set a function that is called for every windows message, before TranslateMessage() -*/ -typedef void (SDLCALL * SDL_WindowsMessageHook)(void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam); -extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata); - -/** - \brief Returns the D3D9 adapter index that matches the specified display index. - - This adapter index can be passed to IDirect3D9::CreateDevice and controls - on which monitor a full screen application will appear. -*/ -extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex( int displayIndex ); - -typedef struct IDirect3DDevice9 IDirect3DDevice9; -/** - \brief Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer. - - Once you are done using the device, you should release it to avoid a resource leak. - */ -extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer); - -/** - \brief Returns the DXGI Adapter and Output indices for the specified display index. - - These can be passed to EnumAdapters and EnumOutputs respectively to get the objects - required to create a DX10 or DX11 device and swap chain. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex ); - -#endif /* __WIN32__ */ - - -/* Platform specific functions for iOS */ -#if defined(__IPHONEOS__) && __IPHONEOS__ - -#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam) -extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam); - -#define SDL_iOSSetEventPump(enabled) SDL_iPhoneSetEventPump(enabled) -extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled); - -#endif /* __IPHONEOS__ */ - - -/* Platform specific functions for Android */ -#if defined(__ANDROID__) && __ANDROID__ - -/** - \brief Get the JNI environment for the current thread - - This returns JNIEnv*, but the prototype is void* so we don't need jni.h - */ -extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void); - -/** - \brief Get the SDL Activity object for the application - - This returns jobject, but the prototype is void* so we don't need jni.h - The jobject returned by SDL_AndroidGetActivity is a local reference. - It is the caller's responsibility to properly release it - (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef) - */ -extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void); - -/** - See the official Android developer guide for more information: - http://developer.android.com/guide/topics/data/data-storage.html -*/ -#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01 -#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02 - -/** - \brief Get the path used for internal storage for this application. - - This path is unique to your application and cannot be written to - by other applications. - */ -extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void); - -/** - \brief Get the current state of external storage, a bitmask of these values: - SDL_ANDROID_EXTERNAL_STORAGE_READ - SDL_ANDROID_EXTERNAL_STORAGE_WRITE - - If external storage is currently unavailable, this will return 0. -*/ -extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void); - -/** - \brief Get the path used for external storage for this application. - - This path is unique to your application, but is public and can be - written to by other applications. - */ -extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void); - -#endif /* __ANDROID__ */ - -/* Platform specific functions for WinRT */ -#if defined(__WINRT__) && __WINRT__ - -/** - * \brief WinRT / Windows Phone path types - */ -typedef enum -{ - /** \brief The installed app's root directory. - Files here are likely to be read-only. */ - SDL_WINRT_PATH_INSTALLED_LOCATION, - - /** \brief The app's local data store. Files may be written here */ - SDL_WINRT_PATH_LOCAL_FOLDER, - - /** \brief The app's roaming data store. Unsupported on Windows Phone. - Files written here may be copied to other machines via a network - connection. - */ - SDL_WINRT_PATH_ROAMING_FOLDER, - - /** \brief The app's temporary data store. Unsupported on Windows Phone. - Files written here may be deleted at any time. */ - SDL_WINRT_PATH_TEMP_FOLDER -} SDL_WinRT_Path; - - -/** - * \brief Retrieves a WinRT defined path on the local file system - * - * \note Documentation on most app-specific path types on WinRT - * can be found on MSDN, at the URL: - * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx - * - * \param pathType The type of path to retrieve. - * \return A UCS-2 string (16-bit, wide-char) containing the path, or NULL - * if the path is not available for any reason. Not all paths are - * available on all versions of Windows. This is especially true on - * Windows Phone. Check the documentation for the given - * SDL_WinRT_Path for more information on which path types are - * supported where. - */ -extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType); - -/** - * \brief Retrieves a WinRT defined path on the local file system - * - * \note Documentation on most app-specific path types on WinRT - * can be found on MSDN, at the URL: - * http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx - * - * \param pathType The type of path to retrieve. - * \return A UTF-8 string (8-bit, multi-byte) containing the path, or NULL - * if the path is not available for any reason. Not all paths are - * available on all versions of Windows. This is especially true on - * Windows Phone. Check the documentation for the given - * SDL_WinRT_Path for more information on which path types are - * supported where. - */ -extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType); - -#endif /* __WINRT__ */ - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_system_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_thread.h b/bsp/simulator/SDL2-2.0.7/include/SDL_thread.h deleted file mode 100644 index 204cfe12aa673f986c1678c1aa443b0b7ee352f2..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_thread.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SDL_thread_h_ -#define SDL_thread_h_ - -/** - * \file SDL_thread.h - * - * Header for the SDL thread management routines. - */ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -/* Thread synchronization primitives */ -#include "SDL_atomic.h" -#include "SDL_mutex.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/* The SDL thread structure, defined in SDL_thread.c */ -struct SDL_Thread; -typedef struct SDL_Thread SDL_Thread; - -/* The SDL thread ID */ -typedef unsigned long SDL_threadID; - -/* Thread local storage ID, 0 is the invalid ID */ -typedef unsigned int SDL_TLSID; - -/** - * The SDL thread priority. - * - * \note On many systems you require special privileges to set high priority. - */ -typedef enum { - SDL_THREAD_PRIORITY_LOW, - SDL_THREAD_PRIORITY_NORMAL, - SDL_THREAD_PRIORITY_HIGH -} SDL_ThreadPriority; - -/** - * The function passed to SDL_CreateThread(). - * It is passed a void* user context parameter and returns an int. - */ -typedef int (SDLCALL * SDL_ThreadFunction) (void *data); - -#if defined(__WIN32__) && !defined(HAVE_LIBC) -/** - * \file SDL_thread.h - * - * We compile SDL into a DLL. This means, that it's the DLL which - * creates a new thread for the calling process with the SDL_CreateThread() - * API. There is a problem with this, that only the RTL of the SDL2.DLL will - * be initialized for those threads, and not the RTL of the calling - * application! - * - * To solve this, we make a little hack here. - * - * We'll always use the caller's _beginthread() and _endthread() APIs to - * start a new thread. This way, if it's the SDL2.DLL which uses this API, - * then the RTL of SDL2.DLL will be used to create the new thread, and if it's - * the application, then the RTL of the application will be used. - * - * So, in short: - * Always use the _beginthread() and _endthread() of the calling runtime - * library! - */ -#define SDL_PASSED_BEGINTHREAD_ENDTHREAD -#include /* _beginthreadex() and _endthreadex() */ - -typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) - (void *, unsigned, unsigned (__stdcall *func)(void *), - void * /*arg*/, unsigned, unsigned * /* threadID */); -typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code); - -/** - * Create a thread. - */ -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread); - -/** - * Create a thread. - */ -#if defined(SDL_CreateThread) && SDL_DYNAMIC_API -#undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) -#else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex) -#endif - -#elif defined(__OS2__) -/* - * just like the windows case above: We compile SDL2 - * into a dll with Watcom's runtime statically linked. - */ -#define SDL_PASSED_BEGINTHREAD_ENDTHREAD -#ifndef __EMX__ -#include -#else -#include -#endif -typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/); -typedef void (*pfnSDL_CurrentEndThread)(void); -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data, - pfnSDL_CurrentBeginThread pfnBeginThread, - pfnSDL_CurrentEndThread pfnEndThread); -#if defined(SDL_CreateThread) && SDL_DYNAMIC_API -#undef SDL_CreateThread -#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) -#else -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread) -#endif - -#else - -/** - * Create a thread. - * - * Thread naming is a little complicated: Most systems have very small - * limits for the string length (Haiku has 32 bytes, Linux currently has 16, - * Visual C++ 6.0 has nine!), and possibly other arbitrary rules. You'll - * have to see what happens with your system's debugger. The name should be - * UTF-8 (but using the naming limits of C identifiers is a better bet). - * There are no requirements for thread naming conventions, so long as the - * string is null-terminated UTF-8, but these guidelines are helpful in - * choosing a name: - * - * http://stackoverflow.com/questions/149932/naming-conventions-for-threads - * - * If a system imposes requirements, SDL will try to munge the string for - * it (truncate, etc), but the original string contents will be available - * from SDL_GetThreadName(). - */ -extern DECLSPEC SDL_Thread *SDLCALL -SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data); - -#endif - -/** - * Get the thread name, as it was specified in SDL_CreateThread(). - * This function returns a pointer to a UTF-8 string that names the - * specified thread, or NULL if it doesn't have a name. This is internal - * memory, not to be free()'d by the caller, and remains valid until the - * specified thread is cleaned up by SDL_WaitThread(). - */ -extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread); - -/** - * Get the thread identifier for the current thread. - */ -extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void); - -/** - * Get the thread identifier for the specified thread. - * - * Equivalent to SDL_ThreadID() if the specified thread is NULL. - */ -extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread); - -/** - * Set the priority for the current thread - */ -extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority); - -/** - * Wait for a thread to finish. Threads that haven't been detached will - * remain (as a "zombie") until this function cleans them up. Not doing so - * is a resource leak. - * - * Once a thread has been cleaned up through this function, the SDL_Thread - * that references it becomes invalid and should not be referenced again. - * As such, only one thread may call SDL_WaitThread() on another. - * - * The return code for the thread function is placed in the area - * pointed to by \c status, if \c status is not NULL. - * - * You may not wait on a thread that has been used in a call to - * SDL_DetachThread(). Use either that function or this one, but not - * both, or behavior is undefined. - * - * It is safe to pass NULL to this function; it is a no-op. - */ -extern DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread * thread, int *status); - -/** - * A thread may be "detached" to signify that it should not remain until - * another thread has called SDL_WaitThread() on it. Detaching a thread - * is useful for long-running threads that nothing needs to synchronize - * with or further manage. When a detached thread is done, it simply - * goes away. - * - * There is no way to recover the return code of a detached thread. If you - * need this, don't detach the thread and instead use SDL_WaitThread(). - * - * Once a thread is detached, you should usually assume the SDL_Thread isn't - * safe to reference again, as it will become invalid immediately upon - * the detached thread's exit, instead of remaining until someone has called - * SDL_WaitThread() to finally clean it up. As such, don't detach the same - * thread more than once. - * - * If a thread has already exited when passed to SDL_DetachThread(), it will - * stop waiting for a call to SDL_WaitThread() and clean up immediately. - * It is not safe to detach a thread that might be used with SDL_WaitThread(). - * - * You may not call SDL_WaitThread() on a thread that has been detached. - * Use either that function or this one, but not both, or behavior is - * undefined. - * - * It is safe to pass NULL to this function; it is a no-op. - */ -extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread); - -/** - * \brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific. - * - * \return The newly created thread local storage identifier, or 0 on error - * - * \code - * static SDL_SpinLock tls_lock; - * static SDL_TLSID thread_local_storage; - * - * void SetMyThreadData(void *value) - * { - * if (!thread_local_storage) { - * SDL_AtomicLock(&tls_lock); - * if (!thread_local_storage) { - * thread_local_storage = SDL_TLSCreate(); - * } - * SDL_AtomicUnlock(&tls_lock); - * } - * SDL_TLSSet(thread_local_storage, value, 0); - * } - * - * void *GetMyThreadData(void) - * { - * return SDL_TLSGet(thread_local_storage); - * } - * \endcode - * - * \sa SDL_TLSGet() - * \sa SDL_TLSSet() - */ -extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void); - -/** - * \brief Get the value associated with a thread local storage ID for the current thread. - * - * \param id The thread local storage ID - * - * \return The value associated with the ID for the current thread, or NULL if no value has been set. - * - * \sa SDL_TLSCreate() - * \sa SDL_TLSSet() - */ -extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id); - -/** - * \brief Set the value associated with a thread local storage ID for the current thread. - * - * \param id The thread local storage ID - * \param value The value to associate with the ID for the current thread - * \param destructor A function called when the thread exits, to free the value. - * - * \return 0 on success, -1 on error - * - * \sa SDL_TLSCreate() - * \sa SDL_TLSGet() - */ -extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*)); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_thread_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_timer.h b/bsp/simulator/SDL2-2.0.7/include/SDL_timer.h deleted file mode 100644 index 282625d3f0dc8dfe2b94fa48032d037cace0de3c..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_timer.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef SDL_timer_h_ -#define SDL_timer_h_ - -/** - * \file SDL_timer.h - * - * Header for the SDL time management routines. - */ - -#include "SDL_stdinc.h" -#include "SDL_error.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Get the number of milliseconds since the SDL library initialization. - * - * \note This value wraps if the program runs for more than ~49 days. - */ -extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void); - -/** - * \brief Compare SDL ticks values, and return true if A has passed B - * - * e.g. if you want to wait 100 ms, you could do this: - * Uint32 timeout = SDL_GetTicks() + 100; - * while (!SDL_TICKS_PASSED(SDL_GetTicks(), timeout)) { - * ... do work until timeout has elapsed - * } - */ -#define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0) - -/** - * \brief Get the current value of the high resolution counter - */ -extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void); - -/** - * \brief Get the count per second of the high resolution counter - */ -extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceFrequency(void); - -/** - * \brief Wait a specified number of milliseconds before returning. - */ -extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms); - -/** - * Function prototype for the timer callback function. - * - * The callback function is passed the current timer interval and returns - * the next timer interval. If the returned value is the same as the one - * passed in, the periodic alarm continues, otherwise a new alarm is - * scheduled. If the callback returns 0, the periodic alarm is cancelled. - */ -typedef Uint32 (SDLCALL * SDL_TimerCallback) (Uint32 interval, void *param); - -/** - * Definition of the timer ID type. - */ -typedef int SDL_TimerID; - -/** - * \brief Add a new timer to the pool of timers already running. - * - * \return A timer ID, or 0 when an error occurs. - */ -extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval, - SDL_TimerCallback callback, - void *param); - -/** - * \brief Remove a timer knowing its ID. - * - * \return A boolean value indicating success or failure. - * - * \warning It is not safe to remove a timer multiple times. - */ -extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_timer_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_touch.h b/bsp/simulator/SDL2-2.0.7/include/SDL_touch.h deleted file mode 100644 index db9e25ebdccad221a3c38bbce06b02bec65c3c2c..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_touch.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_touch.h - * - * Include file for SDL touch event handling. - */ - -#ifndef SDL_touch_h_ -#define SDL_touch_h_ - -#include "SDL_stdinc.h" -#include "SDL_error.h" -#include "SDL_video.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -typedef Sint64 SDL_TouchID; -typedef Sint64 SDL_FingerID; - -typedef struct SDL_Finger -{ - SDL_FingerID id; - float x; - float y; - float pressure; -} SDL_Finger; - -/* Used as the device ID for mouse events simulated with touch input */ -#define SDL_TOUCH_MOUSEID ((Uint32)-1) - - -/* Function prototypes */ - -/** - * \brief Get the number of registered touch devices. - */ -extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); - -/** - * \brief Get the touch ID with the given index, or 0 if the index is invalid. - */ -extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); - -/** - * \brief Get the number of active fingers for a given touch device. - */ -extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); - -/** - * \brief Get the finger object of the given touch, with the given index. - */ -extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_touch_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_version.h b/bsp/simulator/SDL2-2.0.7/include/SDL_version.h deleted file mode 100644 index 5b4c402486d6adb4e8ebaec3cfa4bee301e48e8b..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_version.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_version.h - * - * This header defines the current SDL version. - */ - -#ifndef SDL_version_h_ -#define SDL_version_h_ - -#include "SDL_stdinc.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Information the version of SDL in use. - * - * Represents the library's version as three levels: major revision - * (increments with massive changes, additions, and enhancements), - * minor revision (increments with backwards-compatible changes to the - * major revision), and patchlevel (increments with fixes to the minor - * revision). - * - * \sa SDL_VERSION - * \sa SDL_GetVersion - */ -typedef struct SDL_version -{ - Uint8 major; /**< major version */ - Uint8 minor; /**< minor version */ - Uint8 patch; /**< update version */ -} SDL_version; - -/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL -*/ -#define SDL_MAJOR_VERSION 2 -#define SDL_MINOR_VERSION 0 -#define SDL_PATCHLEVEL 7 - -/** - * \brief Macro to determine SDL version program was compiled against. - * - * This macro fills in a SDL_version structure with the version of the - * library you compiled against. This is determined by what header the - * compiler uses. Note that if you dynamically linked the library, you might - * have a slightly newer or older version at runtime. That version can be - * determined with SDL_GetVersion(), which, unlike SDL_VERSION(), - * is not a macro. - * - * \param x A pointer to a SDL_version struct to initialize. - * - * \sa SDL_version - * \sa SDL_GetVersion - */ -#define SDL_VERSION(x) \ -{ \ - (x)->major = SDL_MAJOR_VERSION; \ - (x)->minor = SDL_MINOR_VERSION; \ - (x)->patch = SDL_PATCHLEVEL; \ -} - -/** - * This macro turns the version numbers into a numeric value: - * \verbatim - (1,2,3) -> (1203) - \endverbatim - * - * This assumes that there will never be more than 100 patchlevels. - */ -#define SDL_VERSIONNUM(X, Y, Z) \ - ((X)*1000 + (Y)*100 + (Z)) - -/** - * This is the version number macro for the current SDL version. - */ -#define SDL_COMPILEDVERSION \ - SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL) - -/** - * This macro will evaluate to true if compiled with SDL at least X.Y.Z. - */ -#define SDL_VERSION_ATLEAST(X, Y, Z) \ - (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) - -/** - * \brief Get the version of SDL that is linked against your program. - * - * If you are linking to SDL dynamically, then it is possible that the - * current version will be different than the version you compiled against. - * This function returns the current version, while SDL_VERSION() is a - * macro that tells you what version you compiled with. - * - * \code - * SDL_version compiled; - * SDL_version linked; - * - * SDL_VERSION(&compiled); - * SDL_GetVersion(&linked); - * printf("We compiled against SDL version %d.%d.%d ...\n", - * compiled.major, compiled.minor, compiled.patch); - * printf("But we linked against SDL version %d.%d.%d.\n", - * linked.major, linked.minor, linked.patch); - * \endcode - * - * This function may be called safely at any time, even before SDL_Init(). - * - * \sa SDL_VERSION - */ -extern DECLSPEC void SDLCALL SDL_GetVersion(SDL_version * ver); - -/** - * \brief Get the code revision of SDL that is linked against your program. - * - * Returns an arbitrary string (a hash value) uniquely identifying the - * exact revision of the SDL library in use, and is only useful in comparing - * against other revisions. It is NOT an incrementing number. - */ -extern DECLSPEC const char *SDLCALL SDL_GetRevision(void); - -/** - * \brief Get the revision number of SDL that is linked against your program. - * - * Returns a number uniquely identifying the exact revision of the SDL - * library in use. It is an incrementing number based on commits to - * hg.libsdl.org. - */ -extern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void); - - -/* Ends C function definitions when using C++ */ -#ifdef __cplusplus -} -#endif -#include "close_code.h" - -#endif /* SDL_version_h_ */ - -/* vi: set ts=4 sw=4 expandtab: */ diff --git a/bsp/simulator/SDL2-2.0.7/include/SDL_video.h b/bsp/simulator/SDL2-2.0.7/include/SDL_video.h deleted file mode 100644 index 6f6cda8b182b22160d97c0d9d5e684290419d0b9..0000000000000000000000000000000000000000 --- a/bsp/simulator/SDL2-2.0.7/include/SDL_video.h +++ /dev/null @@ -1,1247 +0,0 @@ -/* - Simple DirectMedia Layer - Copyright (C) 1997-2017 Sam Lantinga - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -/** - * \file SDL_video.h - * - * Header file for SDL video functions. - */ - -#ifndef SDL_video_h_ -#define SDL_video_h_ - -#include "SDL_stdinc.h" -#include "SDL_pixels.h" -#include "SDL_rect.h" -#include "SDL_surface.h" - -#include "begin_code.h" -/* Set up for C function definitions, even when using C++ */ -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief The structure that defines a display mode - * - * \sa SDL_GetNumDisplayModes() - * \sa SDL_GetDisplayMode() - * \sa SDL_GetDesktopDisplayMode() - * \sa SDL_GetCurrentDisplayMode() - * \sa SDL_GetClosestDisplayMode() - * \sa SDL_SetWindowDisplayMode() - * \sa SDL_GetWindowDisplayMode() - */ -typedef struct -{ - Uint32 format; /**< pixel format */ - int w; /**< width, in screen coordinates */ - int h; /**< height, in screen coordinates */ - int refresh_rate; /**< refresh rate (or zero for unspecified) */ - void *driverdata; /**< driver-specific data, initialize to 0 */ -} SDL_DisplayMode; - -/** - * \brief The type used to identify a window - * - * \sa SDL_CreateWindow() - * \sa SDL_CreateWindowFrom() - * \sa SDL_DestroyWindow() - * \sa SDL_GetWindowData() - * \sa SDL_GetWindowFlags() - * \sa SDL_GetWindowGrab() - * \sa SDL_GetWindowPosition() - * \sa SDL_GetWindowSize() - * \sa SDL_GetWindowTitle() - * \sa SDL_HideWindow() - * \sa SDL_MaximizeWindow() - * \sa SDL_MinimizeWindow() - * \sa SDL_RaiseWindow() - * \sa SDL_RestoreWindow() - * \sa SDL_SetWindowData() - * \sa SDL_SetWindowFullscreen() - * \sa SDL_SetWindowGrab() - * \sa SDL_SetWindowIcon() - * \sa SDL_SetWindowPosition() - * \sa SDL_SetWindowSize() - * \sa SDL_SetWindowBordered() - * \sa SDL_SetWindowResizable() - * \sa SDL_SetWindowTitle() - * \sa SDL_ShowWindow() - */ -typedef struct SDL_Window SDL_Window; - -/** - * \brief The flags on a window - * - * \sa SDL_GetWindowFlags() - */ -typedef enum -{ - /* !!! FIXME: change this to name = (1<