commit
7d049d57db
BIN
bsp/simulator/Debug/SDL2.dll
Normal file
BIN
bsp/simulator/Debug/SDL2.dll
Normal file
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
|
||||
Bugs are now managed in the SDL bug tracker, here:
|
||||
|
||||
http://bugzilla.libsdl.org/
|
||||
|
||||
You may report bugs there, and search to see if a given issue has already
|
||||
been reported, discussed, and maybe even fixed.
|
||||
|
||||
|
||||
You may also find help on the SDL mailing list. Subscription information:
|
||||
|
||||
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
|
||||
|
||||
Bug reports are welcome here, but we really appreciate if you use Bugzilla, as
|
||||
bugs discussed on the mailing list may be forgotten or missed.
|
||||
|
@ -1,20 +0,0 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
@ -1,13 +0,0 @@
|
||||
|
||||
Please distribute this file with the SDL runtime environment:
|
||||
|
||||
The Simple DirectMedia Layer (SDL for short) is a cross-platform library
|
||||
designed to make it easy to write multi-media software, such as games and
|
||||
emulators.
|
||||
|
||||
The Simple DirectMedia Layer library source code is available from:
|
||||
http://www.libsdl.org/
|
||||
|
||||
This library is distributed under the terms of the zlib license:
|
||||
http://www.zlib.net/zlib_license.html
|
||||
|
@ -1,42 +0,0 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
|
||||
(SDL)
|
||||
|
||||
Version 2.0
|
||||
|
||||
---
|
||||
http://www.libsdl.org/
|
||||
|
||||
Simple DirectMedia Layer is a cross-platform development library designed
|
||||
to provide low level access to audio, keyboard, mouse, joystick, and graphics
|
||||
hardware via OpenGL and Direct3D. It is used by video playback software,
|
||||
emulators, and popular games including Valve's award winning catalog
|
||||
and many Humble Bundle games.
|
||||
|
||||
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
|
||||
Support for other platforms may be found in the source code.
|
||||
|
||||
SDL is written in C, works natively with C++, and there are bindings
|
||||
available for several other languages, including C# and Python.
|
||||
|
||||
This library is distributed under the zlib license, which can be found
|
||||
in the file "COPYING.txt".
|
||||
|
||||
The best way to learn how to use SDL is to check out the header files in
|
||||
the "include" subdirectory and the programs in the "test" subdirectory.
|
||||
The header files and test programs are well commented and always up to date.
|
||||
More documentation and FAQs are available online at:
|
||||
http://wiki.libsdl.org/
|
||||
|
||||
If you need help with the library, or just want to discuss SDL related
|
||||
issues, you can join the developers mailing list:
|
||||
http://www.libsdl.org/mailing-list.php
|
||||
|
||||
If you want to report bugs or contribute patches, please submit them to
|
||||
bugzilla:
|
||||
http://bugzilla.libsdl.org/
|
||||
|
||||
Enjoy!
|
||||
Sam Lantinga (slouken@libsdl.org)
|
||||
|
@ -1,108 +0,0 @@
|
||||
|
||||
This is a list of major changes in SDL's version history.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.3:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Mac OS X:
|
||||
* Fixed creating an OpenGL context by default on Mac OS X 10.6
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.2:
|
||||
---------------------------------------------------------------------------
|
||||
General:
|
||||
* Added SDL_GL_ResetAttributes() to reset OpenGL attributes to default values
|
||||
* Added an API to load a database of game controller mappings from a file:
|
||||
SDL_GameControllerAddMappingsFromFile(), SDL_GameControllerAddMappingsFromRW()
|
||||
* Added game controller mappings for the PS4 and OUYA controllers
|
||||
* Added SDL_GetDefaultAssertionHandler() and SDL_GetAssertionHandler()
|
||||
* Added SDL_DetachThread()
|
||||
* Added SDL_HasAVX() to determine if the CPU has AVX features
|
||||
* Added SDL_vsscanf(), SDL_acos(), and SDL_asin() to the stdlib routines
|
||||
* EGL can now create/manage OpenGL and OpenGL ES 1.x/2.x contexts, and share
|
||||
them using SDL_GL_SHARE_WITH_CURRENT_CONTEXT
|
||||
* Added a field "clicks" to the mouse button event which records whether the event is a single click, double click, etc.
|
||||
* The screensaver is now disabled by default, and there is a hint SDL_HINT_VIDEO_ALLOW_SCREENSAVER that can change that behavior.
|
||||
* Added a hint SDL_HINT_MOUSE_RELATIVE_MODE_WARP to specify whether mouse relative mode should be emulated using mouse warping.
|
||||
* testgl2 does not need to link with libGL anymore
|
||||
* Added testgles2 test program to demonstrate working with OpenGL ES 2.0
|
||||
* Added controllermap test program to visually map a game controller
|
||||
|
||||
Windows:
|
||||
* Support for OpenGL ES 2.x contexts using either WGL or EGL (natively via
|
||||
the driver or emulated through ANGLE)
|
||||
* Added a hint SDL_HINT_VIDEO_WIN_D3DCOMPILER to specify which D3D shader compiler to use for OpenGL ES 2 support through ANGLE
|
||||
* Added a hint SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT that is useful when creating multiple windows that should share the same OpenGL context.
|
||||
* Added an event SDL_RENDER_TARGETS_RESET that is sent when D3D9 render targets are reset after the device has been restored.
|
||||
|
||||
Mac OS X:
|
||||
* Added a hint SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK to control whether Ctrl+click should be treated as a right click on Mac OS X. This is off by default.
|
||||
|
||||
Linux:
|
||||
* Fixed fullscreen and focused behavior when receiving NotifyGrab events
|
||||
* Added experimental Wayland and Mir support, disabled by default
|
||||
|
||||
Android:
|
||||
* Joystick support (minimum SDK version required to build SDL is now 12,
|
||||
the required runtime version remains at 10, but on such devices joystick
|
||||
support won't be available).
|
||||
* Hotplugging support for joysticks
|
||||
* Added a hint SDL_HINT_ACCELEROMETER_AS_JOYSTICK to control whether the accelerometer should be listed as a 3 axis joystick, which it will by default.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
2.0.1:
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
General:
|
||||
* Added an API to get common filesystem paths in SDL_filesystem.h:
|
||||
SDL_GetBasePath(), SDL_GetPrefPath()
|
||||
* Added an API to do optimized YV12 and IYUV texture updates:
|
||||
SDL_UpdateYUVTexture()
|
||||
* Added an API to get the amount of RAM on the system:
|
||||
SDL_GetSystemRAM()
|
||||
* Added a macro to perform timestamp comparisons with SDL_GetTicks():
|
||||
SDL_TICKS_PASSED()
|
||||
* Dramatically improved OpenGL ES 2.0 rendering performance
|
||||
* Added OpenGL attribute SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
|
||||
|
||||
Windows:
|
||||
* Created a static library configuration for the Visual Studio 2010 project
|
||||
* Added a hint to create the Direct3D device with support for multi-threading:
|
||||
SDL_HINT_RENDER_DIRECT3D_THREADSAFE
|
||||
* Added a function to get the D3D9 adapter index for a display:
|
||||
SDL_Direct3D9GetAdapterIndex()
|
||||
* Added a function to get the D3D9 device for a D3D9 renderer:
|
||||
SDL_RenderGetD3D9Device()
|
||||
* Fixed building SDL with the mingw32 toolchain (mingw-w64 is preferred)
|
||||
* Fixed crash when using two XInput controllers at the same time
|
||||
* Fixed detecting a mixture of XInput and DirectInput controllers
|
||||
* Fixed clearing a D3D render target larger than the window
|
||||
* Improved support for format specifiers in SDL_snprintf()
|
||||
|
||||
Mac OS X:
|
||||
* Added support for retina displays:
|
||||
Create your window with the SDL_WINDOW_ALLOW_HIGHDPI flag, and then use SDL_GL_GetDrawableSize() to find the actual drawable size. You are responsible for scaling mouse and drawing coordinates appropriately.
|
||||
* Fixed mouse warping in fullscreen mode
|
||||
* Right mouse click is emulated by holding the Ctrl key while left clicking
|
||||
|
||||
Linux:
|
||||
* Fixed float audio support with the PulseAudio driver
|
||||
* Fixed missing line endpoints in the OpenGL renderer on some drivers
|
||||
* X11 symbols are no longer defined to avoid collisions when linking statically
|
||||
|
||||
iOS:
|
||||
* Fixed status bar visibility on iOS 7
|
||||
* Flipped the accelerometer Y axis to match expected values
|
||||
|
||||
Android:
|
||||
IMPORTANT: You MUST get the updated SDLActivity.java to match C code
|
||||
* Moved EGL initialization to native code
|
||||
* Fixed the accelerometer axis rotation relative to the device rotation
|
||||
* Fixed race conditions when handling the EGL context on pause/resume
|
||||
* Touch devices are available for enumeration immediately after init
|
||||
|
||||
Raspberry Pi:
|
||||
* Added support for the Raspberry Pi, see README-raspberrypi.txt for details
|
@ -1,517 +0,0 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_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 value 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_HINT_RENDER_DIRECT3D11_DEBUG"
|
||||
|
||||
/**
|
||||
* \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 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 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 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.
|
||||
*
|
||||
* 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 an Android 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 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 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 If set to 1, then do not allow high-DPI windows. ("Retina" on Mac)
|
||||
*/
|
||||
#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_HINT_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 it's 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_HINT_WINRT_PRIVACY_POLICY_LABEL"
|
||||
|
||||
/** \brief If set to 1, back button press events on Windows Phone 8+ will be marked as handled.
|
||||
*
|
||||
* TODO, WinRT: document SDL_HINT_WINRT_HANDLE_BACK_BUTTON need and use
|
||||
* For now, more details on why this is needed can be found at the
|
||||
* beginning of the following web page:
|
||||
* http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
|
||||
*/
|
||||
#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_HINT_WINRT_HANDLE_BACK_BUTTON"
|
||||
|
||||
/**
|
||||
* \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 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 Add a function to watch a particular hint
|
||||
*
|
||||
* \param name The hint to watch
|
||||
* \param callback The function to call when the hint value changes
|
||||
* \param userdata A pointer to pass to the callback function
|
||||
*/
|
||||
typedef void (*SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
|
||||
extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
|
||||
SDL_HintCallback callback,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* \brief Remove a function watching a particular hint
|
||||
*
|
||||
* \param name The hint being watched
|
||||
* \param callback The function being called when the hint value changes
|
||||
* \param userdata A pointer being passed to the callback function
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
|
||||
SDL_HintCallback callback,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* \brief Clear all hints
|
||||
*
|
||||
* This function is called during SDL_Quit() to free stored hints.
|
||||
*/
|
||||
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: */
|
@ -1,2 +0,0 @@
|
||||
#define SDL_REVISION "hg-8628:b558f99d48f0"
|
||||
#define SDL_REVISION_NUMBER 8628
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,44 +25,9 @@
|
||||
* Main include header for the SDL library
|
||||
*/
|
||||
|
||||
/**
|
||||
* \mainpage Simple DirectMedia Layer (SDL)
|
||||
*
|
||||
* http://www.libsdl.org/
|
||||
*
|
||||
* \section intro_sec Introduction
|
||||
*
|
||||
* Simple DirectMedia Layer is a cross-platform development library designed
|
||||
* to provide low level access to audio, keyboard, mouse, joystick, and
|
||||
* graphics hardware via OpenGL and Direct3D. It is used by video playback
|
||||
* software, emulators, and popular games including Valve's award winning
|
||||
* catalog and many Humble Bundle games.
|
||||
*
|
||||
* SDL officially supports Windows, Mac OS X, Linux, iOS, and Android.
|
||||
* Support for other platforms may be found in the source code.
|
||||
*
|
||||
* SDL is written in C, works natively with C++, and there are bindings
|
||||
* available for several other languages, including C# and Python.
|
||||
*
|
||||
* This library is distributed under the zlib license, which can be found
|
||||
* in the file "COPYING.txt".
|
||||
*
|
||||
* The best way to learn how to use SDL is to check out the header files in
|
||||
* the "include" subdirectory and the programs in the "test" subdirectory.
|
||||
* The header files and test programs are well commented and always up to date.
|
||||
* More documentation and FAQs are available online at:
|
||||
* http://wiki.libsdl.org/
|
||||
*
|
||||
* If you need help with the library, or just want to discuss SDL related
|
||||
* issues, you can join the developers mailing list:
|
||||
* http://www.libsdl.org/mailing-list.php
|
||||
*
|
||||
* Enjoy!
|
||||
* Sam Lantinga (slouken@libsdl.org)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_H
|
||||
#define _SDL_H
|
||||
#ifndef SDL_h_
|
||||
#define SDL_h_
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_stdinc.h"
|
||||
@ -75,10 +40,10 @@
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_filesystem.h"
|
||||
#include "SDL_joystick.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"
|
||||
@ -86,6 +51,7 @@
|
||||
#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"
|
||||
@ -107,14 +73,14 @@ extern "C" {
|
||||
* specify the subsystems which you will be using in your application.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_INIT_TIMER 0x00000001
|
||||
#define SDL_INIT_AUDIO 0x00000010
|
||||
#define SDL_INIT_VIDEO 0x00000020 /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_JOYSTICK 0x00000200 /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_HAPTIC 0x00001000
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000 /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||
#define SDL_INIT_EVENTS 0x00004000
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000 /**< Don't catch fatal signals */
|
||||
#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 \
|
||||
@ -123,13 +89,17 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* This function initializes the subsystems specified by \c flags
|
||||
* Unless the ::SDL_INIT_NOPARACHUTE flag is set, it will install cleanup
|
||||
* signal handlers for some commonly ignored fatal signals (like SIGSEGV).
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
@ -158,6 +128,6 @@ extern DECLSPEC void SDLCALL SDL_Quit(void);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_H */
|
||||
#endif /* SDL_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_assert_h
|
||||
#define _SDL_assert_h
|
||||
#ifndef SDL_assert_h_
|
||||
#define SDL_assert_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
@ -51,9 +51,11 @@ assert can have unique static variables associated with it.
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif defined(HAVE_SIGNAL_H)
|
||||
#elif defined(__386__) && defined(__WATCOMC__)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||
#include <signal.h>
|
||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||
#else
|
||||
@ -63,7 +65,7 @@ assert can have unique static variables associated with it.
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER))
|
||||
#elif ((__GNUC__ >= 2) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
@ -86,8 +88,10 @@ This also solves the problem of...
|
||||
disable assertions.
|
||||
*/
|
||||
|
||||
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||
this condition isn't constant. And looks like an owl's face! */
|
||||
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (-1 == __LINE__)
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||
#else
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||
#endif
|
||||
@ -102,9 +106,9 @@ typedef enum
|
||||
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
||||
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
||||
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
||||
} SDL_assert_state;
|
||||
} SDL_AssertState;
|
||||
|
||||
typedef struct SDL_assert_data
|
||||
typedef struct SDL_AssertData
|
||||
{
|
||||
int always_ignore;
|
||||
unsigned int trigger_count;
|
||||
@ -112,13 +116,13 @@ typedef struct SDL_assert_data
|
||||
const char *filename;
|
||||
int linenum;
|
||||
const char *function;
|
||||
const struct SDL_assert_data *next;
|
||||
} SDL_assert_data;
|
||||
const struct SDL_AssertData *next;
|
||||
} SDL_AssertData;
|
||||
|
||||
#if (SDL_ASSERT_LEVEL > 0)
|
||||
|
||||
/* Never call this directly. Use the SDL_assert* macros. */
|
||||
extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
||||
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||
const char *,
|
||||
const char *, int)
|
||||
#if defined(__clang__)
|
||||
@ -141,16 +145,13 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
||||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
while ( !(condition) ) { \
|
||||
static struct SDL_assert_data assert_data = { \
|
||||
static struct SDL_AssertData sdl_assert_data = { \
|
||||
0, 0, #condition, 0, 0, 0, 0 \
|
||||
}; \
|
||||
const SDL_assert_state state = SDL_ReportAssertion(&assert_data, \
|
||||
SDL_FUNCTION, \
|
||||
SDL_FILE, \
|
||||
SDL_LINE); \
|
||||
if (state == SDL_ASSERTION_RETRY) { \
|
||||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||
continue; /* go again. */ \
|
||||
} else if (state == SDL_ASSERTION_BREAK) { \
|
||||
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
|
||||
SDL_TriggerBreakpoint(); \
|
||||
} \
|
||||
break; /* not retrying. */ \
|
||||
@ -184,8 +185,8 @@ extern DECLSPEC SDL_assert_state SDLCALL SDL_ReportAssertion(SDL_assert_data *,
|
||||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||
|
||||
|
||||
typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_assert_data* data, void* userdata);
|
||||
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_AssertData* data, void* userdata);
|
||||
|
||||
/**
|
||||
* \brief Set an application-defined assertion handler.
|
||||
@ -202,7 +203,7 @@ typedef SDL_assert_state (SDLCALL *SDL_AssertionHandler)(
|
||||
*
|
||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||
*
|
||||
* \return SDL_assert_state value of how to handle the assertion failure.
|
||||
* Return SDL_AssertState value of how to handle the assertion failure.
|
||||
*
|
||||
* \param handler Callback function, called when an assertion fails.
|
||||
* \param userdata A pointer passed to the callback as-is.
|
||||
@ -224,7 +225,7 @@ extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||
|
||||
/**
|
||||
* \brief Get the value assertion handler.
|
||||
* \brief Get the current assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called when an assertion is
|
||||
* triggered. This is either the value last passed to
|
||||
@ -249,9 +250,9 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
|
||||
* The proper way to examine this data looks something like this:
|
||||
*
|
||||
* <code>
|
||||
* const SDL_assert_data *item = SDL_GetAssertionReport();
|
||||
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||
* while (item) {
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\n",
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||
* item->condition, item->function, item->filename,
|
||||
* item->linenum, item->trigger_count,
|
||||
* item->always_ignore ? "yes" : "no");
|
||||
@ -262,7 +263,7 @@ extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puse
|
||||
* \return List of all assertions.
|
||||
* \sa SDL_ResetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
|
||||
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||
|
||||
/**
|
||||
* \brief Reset the list of all assertion failures.
|
||||
@ -273,12 +274,18 @@ extern DECLSPEC const SDL_assert_data * SDLCALL SDL_GetAssertionReport(void);
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||
|
||||
|
||||
/* these had wrong naming conventions until 2.0.4. Please update your app! */
|
||||
#define SDL_assert_state SDL_AssertState
|
||||
#define SDL_assert_data SDL_AssertData
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_assert_h */
|
||||
#endif /* SDL_assert_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -56,8 +56,8 @@
|
||||
* All of the atomic operations that modify memory are full memory barriers.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_atomic_h_
|
||||
#define _SDL_atomic_h_
|
||||
#ifndef SDL_atomic_h_
|
||||
#define SDL_atomic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_platform.h"
|
||||
@ -118,12 +118,16 @@ extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||
* The compiler barrier prevents the compiler from reordering
|
||||
* reads and writes to globally visible variables across the call.
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200)
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||
void _ReadWriteBarrier(void);
|
||||
#pragma intrinsic(_ReadWriteBarrier)
|
||||
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||
#elif defined(__GNUC__)
|
||||
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#elif defined(__WATCOMC__)
|
||||
extern _inline void SDL_CompilerBarrier (void);
|
||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||
@ -148,6 +152,9 @@ void _ReadWriteBarrier(void);
|
||||
* For more information on these semantics, take a look at the blog post:
|
||||
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
|
||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
@ -155,11 +162,11 @@ void _ReadWriteBarrier(void);
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierRelease();
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
|
||||
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
@ -169,10 +176,17 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquire();
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||
#endif /* __GNUC__ && __arm__ */
|
||||
#else
|
||||
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
|
||||
#include <mbarrier.h>
|
||||
#define SDL_MemoryBarrierRelease() __machine_rel_barrier()
|
||||
#define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
|
||||
#else
|
||||
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
||||
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A type representing an atomic integer value. It is a struct
|
||||
@ -255,6 +269,6 @@ extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
||||
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_atomic_h_ */
|
||||
#endif /* SDL_atomic_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Access to the raw audio mixing buffer for the SDL library.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_audio_h
|
||||
#define _SDL_audio_h
|
||||
#ifndef SDL_audio_h_
|
||||
#define SDL_audio_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -155,12 +155,24 @@ typedef Uint16 SDL_AudioFormat;
|
||||
*
|
||||
* 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
|
||||
{
|
||||
@ -168,11 +180,11 @@ typedef struct SDL_AudioSpec
|
||||
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 samples (power of 2) */
|
||||
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;
|
||||
void *userdata;
|
||||
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;
|
||||
|
||||
|
||||
@ -181,7 +193,23 @@ typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
|
||||
SDL_AudioFormat format);
|
||||
|
||||
/**
|
||||
* A structure to hold a set of audio conversion filters and buffers.
|
||||
* \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
|
||||
@ -205,7 +233,7 @@ typedef struct SDL_AudioCVT
|
||||
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[10]; /**< Filter list */
|
||||
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;
|
||||
|
||||
@ -236,7 +264,7 @@ extern DECLSPEC void SDLCALL SDL_AudioQuit(void);
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* This function returns the name of the value audio driver, or NULL
|
||||
* 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);
|
||||
@ -273,9 +301,12 @@ extern DECLSPEC const char *SDLCALL SDL_GetCurrentAudioDriver(void);
|
||||
* 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.
|
||||
* 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.
|
||||
* 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
|
||||
@ -298,7 +329,7 @@ extern DECLSPEC int SDLCALL SDL_OpenAudio(SDL_AudioSpec * desired,
|
||||
typedef Uint32 SDL_AudioDeviceID;
|
||||
|
||||
/**
|
||||
* Get the number of available devices exposed by the value driver.
|
||||
* 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
|
||||
@ -357,7 +388,7 @@ extern DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(const char
|
||||
/**
|
||||
* \name Audio state
|
||||
*
|
||||
* Get the value audio state.
|
||||
* Get the current audio state.
|
||||
*/
|
||||
/* @{ */
|
||||
typedef enum
|
||||
@ -428,10 +459,10 @@ 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.
|
||||
* to the other. An unsupported format causes an error and -1 will be returned.
|
||||
*
|
||||
* \return -1 if the format conversion is not supported, 0 if there's
|
||||
* no conversion needed, or 1 if the audio filter is set up.
|
||||
* \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,
|
||||
@ -450,9 +481,137 @@ extern DECLSPEC int SDLCALL SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
||||
* 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
|
||||
@ -474,6 +633,166 @@ extern DECLSPEC void SDLCALL SDL_MixAudioFormat(Uint8 * dst,
|
||||
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
|
||||
*
|
||||
@ -501,6 +820,6 @@ extern DECLSPEC void SDLCALL SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_audio_h */
|
||||
#endif /* SDL_audio_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Functions for fiddling with bits and bitmasks.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_bits_h
|
||||
#define _SDL_bits_h
|
||||
#ifndef SDL_bits_h_
|
||||
#define SDL_bits_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -47,10 +47,20 @@ extern "C" {
|
||||
*
|
||||
* \return Index of the most significant bit, or -1 if the value is 0.
|
||||
*/
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline int _SDL_clz_watcom (Uint32);
|
||||
#pragma aux _SDL_clz_watcom = \
|
||||
"bsr eax, eax" \
|
||||
"xor eax, 31" \
|
||||
parm [eax] nomemory \
|
||||
value [eax] \
|
||||
modify exact [eax] nomemory;
|
||||
#endif
|
||||
|
||||
SDL_FORCE_INLINE int
|
||||
SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
{
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
/* Count Leading Zeroes builtin in GCC.
|
||||
* http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
|
||||
*/
|
||||
@ -58,6 +68,11 @@ SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
return -1;
|
||||
}
|
||||
return 31 - __builtin_clz(x);
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
return 31 - _SDL_clz_watcom(x);
|
||||
#else
|
||||
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
|
||||
* <seander@cs.stanford.edu>, released in the public domain.
|
||||
@ -92,6 +107,6 @@ SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_bits_h */
|
||||
#endif /* SDL_bits_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
120
bsp/simulator/SDL2-2.0.7/include/SDL_blendmode.h
Normal file
120
bsp/simulator/SDL2-2.0.7/include/SDL_blendmode.h
Normal file
@ -0,0 +1,120 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_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: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL clipboard handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_clipboard_h
|
||||
#define _SDL_clipboard_h
|
||||
#ifndef SDL_clipboard_h_
|
||||
#define SDL_clipboard_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -66,6 +66,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_clipboard_h */
|
||||
#endif /* SDL_clipboard_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,9 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_config_windows_h
|
||||
#define _SDL_config_windows_h
|
||||
#ifndef SDL_config_windows_h_
|
||||
#define SDL_config_windows_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
@ -76,15 +77,23 @@ typedef unsigned int uintptr_t;
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define HAVE_DDRAW_H 1
|
||||
#define HAVE_DINPUT_H 1
|
||||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
/* Useful headers */
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
@ -130,12 +139,22 @@ typedef unsigned int uintptr_t;
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#if defined(_MSC_VER)
|
||||
/* These functions were added with the VC++ 2013 C runtime library */
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_SCALBN 1
|
||||
#endif
|
||||
/* This function is available with at least the VC++ 2008 C runtime library */
|
||||
#if _MSC_VER >= 1400
|
||||
#define HAVE__FSEEKI64 1
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
@ -145,15 +164,18 @@ typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 1
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 0
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
@ -195,6 +217,8 @@ typedef unsigned int uintptr_t;
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINDOWS 1
|
||||
@ -207,4 +231,4 @@ typedef unsigned int uintptr_t;
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* _SDL_config_windows_h */
|
||||
#endif /* SDL_config_windows_h_ */
|
445
bsp/simulator/SDL2-2.0.7/include/SDL_config.h.cmake
Normal file
445
bsp/simulator/SDL2-2.0.7/include/SDL_config.h.cmake
Normal file
@ -0,0 +1,445 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* C language features */
|
||||
#cmakedefine const @HAVE_CONST@
|
||||
#cmakedefine inline @HAVE_INLINE@
|
||||
#cmakedefine volatile @HAVE_VOLATILE@
|
||||
|
||||
/* C datatypes */
|
||||
/* Define SIZEOF_VOIDP for 64/32 architectures */
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#cmakedefine HAVE_GCC_ATOMICS @HAVE_GCC_ATOMICS@
|
||||
#cmakedefine HAVE_GCC_SYNC_LOCK_TEST_AND_SET @HAVE_GCC_SYNC_LOCK_TEST_AND_SET@
|
||||
|
||||
#cmakedefine HAVE_D3D_H @HAVE_D3D_H@
|
||||
#cmakedefine HAVE_D3D11_H @HAVE_D3D11_H@
|
||||
#cmakedefine HAVE_DDRAW_H @HAVE_DDRAW_H@
|
||||
#cmakedefine HAVE_DSOUND_H @HAVE_DSOUND_H@
|
||||
#cmakedefine HAVE_DINPUT_H @HAVE_DINPUT_H@
|
||||
#cmakedefine HAVE_XAUDIO2_H @HAVE_XAUDIO2_H@
|
||||
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
|
||||
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
|
||||
#cmakedefine HAVE_XINPUT_GAMEPAD_EX @HAVE_XINPUT_GAMEPAD_EX@
|
||||
#cmakedefine HAVE_XINPUT_STATE_EX @HAVE_XINPUT_STATE_EX@
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#cmakedefine HAVE_LIBC 1
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#cmakedefine HAVE_ALLOCA_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_STDIO_H 1
|
||||
#cmakedefine STDC_HEADERS 1
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
#cmakedefine HAVE_MEMORY_H 1
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
||||
#cmakedefine HAVE_WCHAR_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_CTYPE_H 1
|
||||
#cmakedefine HAVE_MATH_H 1
|
||||
#cmakedefine HAVE_ICONV_H 1
|
||||
#cmakedefine HAVE_SIGNAL_H 1
|
||||
#cmakedefine HAVE_ALTIVEC_H 1
|
||||
#cmakedefine HAVE_PTHREAD_NP_H 1
|
||||
#cmakedefine HAVE_LIBUDEV_H 1
|
||||
#cmakedefine HAVE_DBUS_DBUS_H 1
|
||||
#cmakedefine HAVE_IBUS_IBUS_H 1
|
||||
#cmakedefine HAVE_FCITX_FRONTEND_H 1
|
||||
#cmakedefine HAVE_LIBSAMPLERATE_H 1
|
||||
|
||||
/* C library functions */
|
||||
#cmakedefine HAVE_MALLOC 1
|
||||
#cmakedefine HAVE_CALLOC 1
|
||||
#cmakedefine HAVE_REALLOC 1
|
||||
#cmakedefine HAVE_FREE 1
|
||||
#cmakedefine HAVE_ALLOCA 1
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#cmakedefine HAVE_GETENV 1
|
||||
#cmakedefine HAVE_SETENV 1
|
||||
#cmakedefine HAVE_PUTENV 1
|
||||
#cmakedefine HAVE_UNSETENV 1
|
||||
#endif
|
||||
#cmakedefine HAVE_QSORT 1
|
||||
#cmakedefine HAVE_ABS 1
|
||||
#cmakedefine HAVE_BCOPY 1
|
||||
#cmakedefine HAVE_MEMSET 1
|
||||
#cmakedefine HAVE_MEMCPY 1
|
||||
#cmakedefine HAVE_MEMMOVE 1
|
||||
#cmakedefine HAVE_MEMCMP 1
|
||||
#cmakedefine HAVE_WCSLEN 1
|
||||
#cmakedefine HAVE_WCSLCPY 1
|
||||
#cmakedefine HAVE_WCSLCAT 1
|
||||
#cmakedefine HAVE_WCSCMP 1
|
||||
#cmakedefine HAVE_STRLEN 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
#cmakedefine HAVE_STRDUP 1
|
||||
#cmakedefine HAVE__STRREV 1
|
||||
#cmakedefine HAVE__STRUPR 1
|
||||
#cmakedefine HAVE__STRLWR 1
|
||||
#cmakedefine HAVE_INDEX 1
|
||||
#cmakedefine HAVE_RINDEX 1
|
||||
#cmakedefine HAVE_STRCHR 1
|
||||
#cmakedefine HAVE_STRRCHR 1
|
||||
#cmakedefine HAVE_STRSTR 1
|
||||
#cmakedefine HAVE_ITOA 1
|
||||
#cmakedefine HAVE__LTOA 1
|
||||
#cmakedefine HAVE__UITOA 1
|
||||
#cmakedefine HAVE__ULTOA 1
|
||||
#cmakedefine HAVE_STRTOL 1
|
||||
#cmakedefine HAVE_STRTOUL 1
|
||||
#cmakedefine HAVE__I64TOA 1
|
||||
#cmakedefine HAVE__UI64TOA 1
|
||||
#cmakedefine HAVE_STRTOLL 1
|
||||
#cmakedefine HAVE_STRTOULL 1
|
||||
#cmakedefine HAVE_STRTOD 1
|
||||
#cmakedefine HAVE_ATOI 1
|
||||
#cmakedefine HAVE_ATOF 1
|
||||
#cmakedefine HAVE_STRCMP 1
|
||||
#cmakedefine HAVE_STRNCMP 1
|
||||
#cmakedefine HAVE__STRICMP 1
|
||||
#cmakedefine HAVE_STRCASECMP 1
|
||||
#cmakedefine HAVE__STRNICMP 1
|
||||
#cmakedefine HAVE_STRNCASECMP 1
|
||||
#cmakedefine HAVE_VSSCANF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
#cmakedefine HAVE_M_PI 1
|
||||
#cmakedefine HAVE_ATAN 1
|
||||
#cmakedefine HAVE_ATAN2 1
|
||||
#cmakedefine HAVE_ACOS 1
|
||||
#cmakedefine HAVE_ASIN 1
|
||||
#cmakedefine HAVE_CEIL 1
|
||||
#cmakedefine HAVE_COPYSIGN 1
|
||||
#cmakedefine HAVE_COS 1
|
||||
#cmakedefine HAVE_COSF 1
|
||||
#cmakedefine HAVE_FABS 1
|
||||
#cmakedefine HAVE_FLOOR 1
|
||||
#cmakedefine HAVE_LOG 1
|
||||
#cmakedefine HAVE_POW 1
|
||||
#cmakedefine HAVE_SCALBN 1
|
||||
#cmakedefine HAVE_SIN 1
|
||||
#cmakedefine HAVE_SINF 1
|
||||
#cmakedefine HAVE_SQRT 1
|
||||
#cmakedefine HAVE_SQRTF 1
|
||||
#cmakedefine HAVE_TAN 1
|
||||
#cmakedefine HAVE_TANF 1
|
||||
#cmakedefine HAVE_FOPEN64 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSEEKO64 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
#cmakedefine HAVE_SA_SIGACTION 1
|
||||
#cmakedefine HAVE_SETJMP 1
|
||||
#cmakedefine HAVE_NANOSLEEP 1
|
||||
#cmakedefine HAVE_SYSCONF 1
|
||||
#cmakedefine HAVE_SYSCTLBYNAME 1
|
||||
#cmakedefine HAVE_CLOCK_GETTIME 1
|
||||
#cmakedefine HAVE_GETPAGESIZE 1
|
||||
#cmakedefine HAVE_MPROTECT 1
|
||||
#cmakedefine HAVE_ICONV 1
|
||||
#cmakedefine HAVE_PTHREAD_SETNAME_NP 1
|
||||
#cmakedefine HAVE_PTHREAD_SET_NAME_NP 1
|
||||
#cmakedefine HAVE_SEM_TIMEDWAIT 1
|
||||
#cmakedefine HAVE_GETAUXVAL 1
|
||||
#cmakedefine HAVE_POLL 1
|
||||
|
||||
#elif __WIN32__
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#else
|
||||
/* We may need some replacement for stdarg.h here */
|
||||
#include <stdarg.h>
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#cmakedefine SDL_DEFAULT_ASSERT_LEVEL @SDL_DEFAULT_ASSERT_LEVEL@
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
#cmakedefine SDL_ATOMIC_DISABLED @SDL_ATOMIC_DISABLED@
|
||||
#cmakedefine SDL_AUDIO_DISABLED @SDL_AUDIO_DISABLED@
|
||||
#cmakedefine SDL_CPUINFO_DISABLED @SDL_CPUINFO_DISABLED@
|
||||
#cmakedefine SDL_EVENTS_DISABLED @SDL_EVENTS_DISABLED@
|
||||
#cmakedefine SDL_FILE_DISABLED @SDL_FILE_DISABLED@
|
||||
#cmakedefine SDL_JOYSTICK_DISABLED @SDL_JOYSTICK_DISABLED@
|
||||
#cmakedefine SDL_HAPTIC_DISABLED @SDL_HAPTIC_DISABLED@
|
||||
#cmakedefine SDL_LOADSO_DISABLED @SDL_LOADSO_DISABLED@
|
||||
#cmakedefine SDL_RENDER_DISABLED @SDL_RENDER_DISABLED@
|
||||
#cmakedefine SDL_THREADS_DISABLED @SDL_THREADS_DISABLED@
|
||||
#cmakedefine SDL_TIMERS_DISABLED @SDL_TIMERS_DISABLED@
|
||||
#cmakedefine SDL_VIDEO_DISABLED @SDL_VIDEO_DISABLED@
|
||||
#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@
|
||||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA_DYNAMIC @SDL_AUDIO_DRIVER_ALSA_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ANDROID @SDL_AUDIO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS @SDL_AUDIO_DRIVER_ARTS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ARTS_DYNAMIC @SDL_AUDIO_DRIVER_ARTS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_COREAUDIO @SDL_AUDIO_DRIVER_COREAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DISK @SDL_AUDIO_DRIVER_DISK@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DSOUND @SDL_AUDIO_DRIVER_DSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_DUMMY @SDL_AUDIO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_EMSCRIPTEN @SDL_AUDIO_DRIVER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD @SDL_AUDIO_DRIVER_ESD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_ESD_DYNAMIC @SDL_AUDIO_DRIVER_ESD_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND @SDL_AUDIO_DRIVER_FUSIONSOUND@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC @SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_HAIKU @SDL_AUDIO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_JACK @SDL_AUDIO_DRIVER_JACK@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_JACK_DYNAMIC @SDL_AUDIO_DRIVER_JACK_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS @SDL_AUDIO_DRIVER_NAS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NAS_DYNAMIC @SDL_AUDIO_DRIVER_NAS_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_NETBSD @SDL_AUDIO_DRIVER_NETBSD@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO @SDL_AUDIO_DRIVER_PULSEAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC @SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_QSA @SDL_AUDIO_DRIVER_QSA@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO @SDL_AUDIO_DRIVER_SNDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SNDIO_DYNAMIC @SDL_AUDIO_DRIVER_SNDIO_DYNAMIC@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_SUNAUDIO @SDL_AUDIO_DRIVER_SUNAUDIO@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WASAPI @SDL_AUDIO_DRIVER_WASAPI@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_WINMM @SDL_AUDIO_DRIVER_WINMM@
|
||||
#cmakedefine SDL_AUDIO_DRIVER_XAUDIO2 @SDL_AUDIO_DRIVER_XAUDIO2@
|
||||
|
||||
/* Enable various input drivers */
|
||||
#cmakedefine SDL_INPUT_LINUXEV @SDL_INPUT_LINUXEV@
|
||||
#cmakedefine SDL_INPUT_LINUXKD @SDL_INPUT_LINUXKD@
|
||||
#cmakedefine SDL_INPUT_TSLIB @SDL_INPUT_TSLIB@
|
||||
#cmakedefine SDL_JOYSTICK_ANDROID @SDL_JOYSTICK_ANDROID@
|
||||
#cmakedefine SDL_JOYSTICK_HAIKU @SDL_JOYSTICK_HAIKU@
|
||||
#cmakedefine SDL_JOYSTICK_DINPUT @SDL_JOYSTICK_DINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_XINPUT @SDL_JOYSTICK_XINPUT@
|
||||
#cmakedefine SDL_JOYSTICK_DUMMY @SDL_JOYSTICK_DUMMY@
|
||||
#cmakedefine SDL_JOYSTICK_IOKIT @SDL_JOYSTICK_IOKIT@
|
||||
#cmakedefine SDL_JOYSTICK_MFI @SDL_JOYSTICK_MFI@
|
||||
#cmakedefine SDL_JOYSTICK_LINUX @SDL_JOYSTICK_LINUX@
|
||||
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
|
||||
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
|
||||
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
|
||||
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
|
||||
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
|
||||
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
|
||||
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
|
||||
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
|
||||
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#cmakedefine SDL_LOADSO_DLOPEN @SDL_LOADSO_DLOPEN@
|
||||
#cmakedefine SDL_LOADSO_DUMMY @SDL_LOADSO_DUMMY@
|
||||
#cmakedefine SDL_LOADSO_LDG @SDL_LOADSO_LDG@
|
||||
#cmakedefine SDL_LOADSO_WINDOWS @SDL_LOADSO_WINDOWS@
|
||||
|
||||
/* Enable various threading systems */
|
||||
#cmakedefine SDL_THREAD_PTHREAD @SDL_THREAD_PTHREAD@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX@
|
||||
#cmakedefine SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP @SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP@
|
||||
#cmakedefine SDL_THREAD_WINDOWS @SDL_THREAD_WINDOWS@
|
||||
|
||||
/* Enable various timer systems */
|
||||
#cmakedefine SDL_TIMER_HAIKU @SDL_TIMER_HAIKU@
|
||||
#cmakedefine SDL_TIMER_DUMMY @SDL_TIMER_DUMMY@
|
||||
#cmakedefine SDL_TIMER_UNIX @SDL_TIMER_UNIX@
|
||||
#cmakedefine SDL_TIMER_WINDOWS @SDL_TIMER_WINDOWS@
|
||||
#cmakedefine SDL_TIMER_WINCE @SDL_TIMER_WINCE@
|
||||
|
||||
/* Enable various video drivers */
|
||||
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM @SDL_VIDEO_DRIVER_KMSDRM@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM @SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH @SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
|
||||
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT @SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 @SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR @SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS @SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE @SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XCURSOR @SDL_VIDEO_DRIVER_X11_XCURSOR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XDBE @SDL_VIDEO_DRIVER_X11_XDBE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINERAMA @SDL_VIDEO_DRIVER_X11_XINERAMA@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2 @SDL_VIDEO_DRIVER_X11_XINPUT2@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH @SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XRANDR @SDL_VIDEO_DRIVER_X11_XRANDR@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSCRNSAVER @SDL_VIDEO_DRIVER_X11_XSCRNSAVER@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XSHAPE @SDL_VIDEO_DRIVER_X11_XSHAPE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_XVIDMODE @SDL_VIDEO_DRIVER_X11_XVIDMODE@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS @SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY @SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY@
|
||||
#cmakedefine SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM @SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM@
|
||||
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D @SDL_VIDEO_RENDER_D3D@
|
||||
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES @SDL_VIDEO_RENDER_OGL_ES@
|
||||
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_RENDER_DIRECTFB @SDL_VIDEO_RENDER_DIRECTFB@
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#cmakedefine SDL_VIDEO_OPENGL @SDL_VIDEO_OPENGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_ES @SDL_VIDEO_OPENGL_ES@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_ES2 @SDL_VIDEO_OPENGL_ES2@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_BGL @SDL_VIDEO_OPENGL_BGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_CGL @SDL_VIDEO_OPENGL_CGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_GLX @SDL_VIDEO_OPENGL_GLX@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_WGL @SDL_VIDEO_OPENGL_WGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_EGL @SDL_VIDEO_OPENGL_EGL@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA @SDL_VIDEO_OPENGL_OSMESA@
|
||||
#cmakedefine SDL_VIDEO_OPENGL_OSMESA_DYNAMIC @SDL_VIDEO_OPENGL_OSMESA_DYNAMIC@
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
|
||||
|
||||
/* Enable system power support */
|
||||
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
|
||||
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
|
||||
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
|
||||
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
|
||||
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
|
||||
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
|
||||
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
|
||||
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
|
||||
#cmakedefine SDL_FILESYSTEM_COCOA @SDL_FILESYSTEM_COCOA@
|
||||
#cmakedefine SDL_FILESYSTEM_DUMMY @SDL_FILESYSTEM_DUMMY@
|
||||
#cmakedefine SDL_FILESYSTEM_UNIX @SDL_FILESYSTEM_UNIX@
|
||||
#cmakedefine SDL_FILESYSTEM_WINDOWS @SDL_FILESYSTEM_WINDOWS@
|
||||
#cmakedefine SDL_FILESYSTEM_EMSCRIPTEN @SDL_FILESYSTEM_EMSCRIPTEN@
|
||||
|
||||
/* Enable assembly routines */
|
||||
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
|
||||
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
|
||||
|
||||
/* Platform specific definitions */
|
||||
#if !defined(__WIN32__)
|
||||
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
# endif /* if (stdint.h isn't available) */
|
||||
#else /* __WIN32__ */
|
||||
# if !defined(_STDINT_H_) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
|
||||
# if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
# elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
# ifndef _UINTPTR_T_DEFINED
|
||||
# ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
# else
|
||||
typedef unsigned int uintptr_t;
|
||||
# endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
# endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
# if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
# endif
|
||||
# if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
# endif
|
||||
# else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
# ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
# endif
|
||||
typedef unsigned int uintptr_t;
|
||||
# endif /* __GNUC__ || _MSC_VER */
|
||||
# endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
#endif /* SDL_config_h_ */
|
389
bsp/simulator/SDL2-2.0.7/include/SDL_config.h.in
Normal file
389
bsp/simulator/SDL2-2.0.7/include/SDL_config.h.in
Normal file
@ -0,0 +1,389 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* Make sure that this isn't included by Visual C++ */
|
||||
#ifdef _MSC_VER
|
||||
#error You should run hg revert SDL_config.h
|
||||
#endif
|
||||
|
||||
/* C language features */
|
||||
#undef const
|
||||
#undef inline
|
||||
#undef volatile
|
||||
|
||||
/* C datatypes */
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
#undef HAVE_GCC_ATOMICS
|
||||
#undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET
|
||||
|
||||
#undef HAVE_DDRAW_H
|
||||
#undef HAVE_DINPUT_H
|
||||
#undef HAVE_DSOUND_H
|
||||
#undef HAVE_DXGI_H
|
||||
#undef HAVE_XINPUT_H
|
||||
#undef HAVE_XINPUT_GAMEPAD_EX
|
||||
#undef HAVE_XINPUT_STATE_EX
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#undef HAVE_LIBC
|
||||
#if HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#undef HAVE_ALLOCA_H
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
#undef HAVE_STDIO_H
|
||||
#undef STDC_HEADERS
|
||||
#undef HAVE_STDLIB_H
|
||||
#undef HAVE_STDARG_H
|
||||
#undef HAVE_MALLOC_H
|
||||
#undef HAVE_MEMORY_H
|
||||
#undef HAVE_STRING_H
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_WCHAR_H
|
||||
#undef HAVE_INTTYPES_H
|
||||
#undef HAVE_STDINT_H
|
||||
#undef HAVE_CTYPE_H
|
||||
#undef HAVE_MATH_H
|
||||
#undef HAVE_ICONV_H
|
||||
#undef HAVE_SIGNAL_H
|
||||
#undef HAVE_ALTIVEC_H
|
||||
#undef HAVE_PTHREAD_NP_H
|
||||
#undef HAVE_LIBUDEV_H
|
||||
#undef HAVE_DBUS_DBUS_H
|
||||
#undef HAVE_IBUS_IBUS_H
|
||||
#undef HAVE_FCITX_FRONTEND_H
|
||||
#undef HAVE_LIBSAMPLERATE_H
|
||||
|
||||
/* C library functions */
|
||||
#undef HAVE_MALLOC
|
||||
#undef HAVE_CALLOC
|
||||
#undef HAVE_REALLOC
|
||||
#undef HAVE_FREE
|
||||
#undef HAVE_ALLOCA
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#undef HAVE_GETENV
|
||||
#undef HAVE_SETENV
|
||||
#undef HAVE_PUTENV
|
||||
#undef HAVE_UNSETENV
|
||||
#endif
|
||||
#undef HAVE_QSORT
|
||||
#undef HAVE_ABS
|
||||
#undef HAVE_BCOPY
|
||||
#undef HAVE_MEMSET
|
||||
#undef HAVE_MEMCPY
|
||||
#undef HAVE_MEMMOVE
|
||||
#undef HAVE_MEMCMP
|
||||
#undef HAVE_WCSLEN
|
||||
#undef HAVE_WCSLCPY
|
||||
#undef HAVE_WCSLCAT
|
||||
#undef HAVE_WCSCMP
|
||||
#undef HAVE_STRLEN
|
||||
#undef HAVE_STRLCPY
|
||||
#undef HAVE_STRLCAT
|
||||
#undef HAVE_STRDUP
|
||||
#undef HAVE__STRREV
|
||||
#undef HAVE__STRUPR
|
||||
#undef HAVE__STRLWR
|
||||
#undef HAVE_INDEX
|
||||
#undef HAVE_RINDEX
|
||||
#undef HAVE_STRCHR
|
||||
#undef HAVE_STRRCHR
|
||||
#undef HAVE_STRSTR
|
||||
#undef HAVE_ITOA
|
||||
#undef HAVE__LTOA
|
||||
#undef HAVE__UITOA
|
||||
#undef HAVE__ULTOA
|
||||
#undef HAVE_STRTOL
|
||||
#undef HAVE_STRTOUL
|
||||
#undef HAVE__I64TOA
|
||||
#undef HAVE__UI64TOA
|
||||
#undef HAVE_STRTOLL
|
||||
#undef HAVE_STRTOULL
|
||||
#undef HAVE_STRTOD
|
||||
#undef HAVE_ATOI
|
||||
#undef HAVE_ATOF
|
||||
#undef HAVE_STRCMP
|
||||
#undef HAVE_STRNCMP
|
||||
#undef HAVE__STRICMP
|
||||
#undef HAVE_STRCASECMP
|
||||
#undef HAVE__STRNICMP
|
||||
#undef HAVE_STRNCASECMP
|
||||
#undef HAVE_SSCANF
|
||||
#undef HAVE_VSSCANF
|
||||
#undef HAVE_SNPRINTF
|
||||
#undef HAVE_VSNPRINTF
|
||||
#undef HAVE_M_PI
|
||||
#undef HAVE_ATAN
|
||||
#undef HAVE_ATAN2
|
||||
#undef HAVE_ACOS
|
||||
#undef HAVE_ASIN
|
||||
#undef HAVE_CEIL
|
||||
#undef HAVE_COPYSIGN
|
||||
#undef HAVE_COS
|
||||
#undef HAVE_COSF
|
||||
#undef HAVE_FABS
|
||||
#undef HAVE_FLOOR
|
||||
#undef HAVE_LOG
|
||||
#undef HAVE_POW
|
||||
#undef HAVE_SCALBN
|
||||
#undef HAVE_SIN
|
||||
#undef HAVE_SINF
|
||||
#undef HAVE_SQRT
|
||||
#undef HAVE_SQRTF
|
||||
#undef HAVE_TAN
|
||||
#undef HAVE_TANF
|
||||
#undef HAVE_FOPEN64
|
||||
#undef HAVE_FSEEKO
|
||||
#undef HAVE_FSEEKO64
|
||||
#undef HAVE_SIGACTION
|
||||
#undef HAVE_SA_SIGACTION
|
||||
#undef HAVE_SETJMP
|
||||
#undef HAVE_NANOSLEEP
|
||||
#undef HAVE_SYSCONF
|
||||
#undef HAVE_SYSCTLBYNAME
|
||||
#undef HAVE_CLOCK_GETTIME
|
||||
#undef HAVE_GETPAGESIZE
|
||||
#undef HAVE_MPROTECT
|
||||
#undef HAVE_ICONV
|
||||
#undef HAVE_PTHREAD_SETNAME_NP
|
||||
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||
#undef HAVE_SEM_TIMEDWAIT
|
||||
#undef HAVE_GETAUXVAL
|
||||
#undef HAVE_POLL
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#undef SDL_DEFAULT_ASSERT_LEVEL
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
#undef SDL_ATOMIC_DISABLED
|
||||
#undef SDL_AUDIO_DISABLED
|
||||
#undef SDL_CPUINFO_DISABLED
|
||||
#undef SDL_EVENTS_DISABLED
|
||||
#undef SDL_FILE_DISABLED
|
||||
#undef SDL_JOYSTICK_DISABLED
|
||||
#undef SDL_HAPTIC_DISABLED
|
||||
#undef SDL_LOADSO_DISABLED
|
||||
#undef SDL_RENDER_DISABLED
|
||||
#undef SDL_THREADS_DISABLED
|
||||
#undef SDL_TIMERS_DISABLED
|
||||
#undef SDL_VIDEO_DISABLED
|
||||
#undef SDL_POWER_DISABLED
|
||||
#undef SDL_FILESYSTEM_DISABLED
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#undef SDL_AUDIO_DRIVER_ALSA
|
||||
#undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_ANDROID
|
||||
#undef SDL_AUDIO_DRIVER_ARTS
|
||||
#undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_COREAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_DISK
|
||||
#undef SDL_AUDIO_DRIVER_DSOUND
|
||||
#undef SDL_AUDIO_DRIVER_DUMMY
|
||||
#undef SDL_AUDIO_DRIVER_EMSCRIPTEN
|
||||
#undef SDL_AUDIO_DRIVER_ESD
|
||||
#undef SDL_AUDIO_DRIVER_ESD_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND
|
||||
#undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_HAIKU
|
||||
#undef SDL_AUDIO_DRIVER_JACK
|
||||
#undef SDL_AUDIO_DRIVER_JACK_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NACL
|
||||
#undef SDL_AUDIO_DRIVER_NAS
|
||||
#undef SDL_AUDIO_DRIVER_NAS_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_NETBSD
|
||||
#undef SDL_AUDIO_DRIVER_OSS
|
||||
#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
|
||||
#undef SDL_AUDIO_DRIVER_PAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_QSA
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO
|
||||
#undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
|
||||
#undef SDL_AUDIO_DRIVER_SUNAUDIO
|
||||
#undef SDL_AUDIO_DRIVER_WASAPI
|
||||
#undef SDL_AUDIO_DRIVER_WINMM
|
||||
#undef SDL_AUDIO_DRIVER_XAUDIO2
|
||||
|
||||
/* Enable various input drivers */
|
||||
#undef SDL_INPUT_LINUXEV
|
||||
#undef SDL_INPUT_LINUXKD
|
||||
#undef SDL_INPUT_TSLIB
|
||||
#undef SDL_JOYSTICK_HAIKU
|
||||
#undef SDL_JOYSTICK_DINPUT
|
||||
#undef SDL_JOYSTICK_XINPUT
|
||||
#undef SDL_JOYSTICK_DUMMY
|
||||
#undef SDL_JOYSTICK_IOKIT
|
||||
#undef SDL_JOYSTICK_LINUX
|
||||
#undef SDL_JOYSTICK_ANDROID
|
||||
#undef SDL_JOYSTICK_WINMM
|
||||
#undef SDL_JOYSTICK_USBHID
|
||||
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
|
||||
#undef SDL_JOYSTICK_EMSCRIPTEN
|
||||
#undef SDL_HAPTIC_DUMMY
|
||||
#undef SDL_HAPTIC_LINUX
|
||||
#undef SDL_HAPTIC_IOKIT
|
||||
#undef SDL_HAPTIC_DINPUT
|
||||
#undef SDL_HAPTIC_XINPUT
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#undef SDL_LOADSO_DLOPEN
|
||||
#undef SDL_LOADSO_DUMMY
|
||||
#undef SDL_LOADSO_LDG
|
||||
#undef SDL_LOADSO_WINDOWS
|
||||
|
||||
/* Enable various threading systems */
|
||||
#undef SDL_THREAD_PTHREAD
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX
|
||||
#undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP
|
||||
#undef SDL_THREAD_WINDOWS
|
||||
|
||||
/* Enable various timer systems */
|
||||
#undef SDL_TIMER_HAIKU
|
||||
#undef SDL_TIMER_DUMMY
|
||||
#undef SDL_TIMER_UNIX
|
||||
#undef SDL_TIMER_WINDOWS
|
||||
|
||||
/* Enable various video drivers */
|
||||
#undef SDL_VIDEO_DRIVER_HAIKU
|
||||
#undef SDL_VIDEO_DRIVER_COCOA
|
||||
#undef SDL_VIDEO_DRIVER_DIRECTFB
|
||||
#undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_DUMMY
|
||||
#undef SDL_VIDEO_DRIVER_WINDOWS
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
|
||||
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_MIR
|
||||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#undef SDL_VIDEO_DRIVER_RPI
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM
|
||||
#undef SDL_VIDEO_DRIVER_ANDROID
|
||||
#undef SDL_VIDEO_DRIVER_EMSCRIPTEN
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
|
||||
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XCURSOR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XDBE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
#undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||
#undef SDL_VIDEO_DRIVER_X11_XRANDR
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
|
||||
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
|
||||
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
|
||||
#undef SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY
|
||||
#undef SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM
|
||||
#undef SDL_VIDEO_DRIVER_NACL
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE
|
||||
#undef SDL_VIDEO_DRIVER_VIVANTE_VDK
|
||||
#undef SDL_VIDEO_DRIVER_QNX
|
||||
|
||||
#undef SDL_VIDEO_RENDER_D3D
|
||||
#undef SDL_VIDEO_RENDER_D3D11
|
||||
#undef SDL_VIDEO_RENDER_OGL
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES
|
||||
#undef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#undef SDL_VIDEO_RENDER_DIRECTFB
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#undef SDL_VIDEO_OPENGL
|
||||
#undef SDL_VIDEO_OPENGL_ES
|
||||
#undef SDL_VIDEO_OPENGL_ES2
|
||||
#undef SDL_VIDEO_OPENGL_BGL
|
||||
#undef SDL_VIDEO_OPENGL_CGL
|
||||
#undef SDL_VIDEO_OPENGL_EGL
|
||||
#undef SDL_VIDEO_OPENGL_GLX
|
||||
#undef SDL_VIDEO_OPENGL_WGL
|
||||
#undef SDL_VIDEO_OPENGL_OSMESA
|
||||
#undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#undef SDL_VIDEO_VULKAN
|
||||
|
||||
/* Enable system power support */
|
||||
#undef SDL_POWER_LINUX
|
||||
#undef SDL_POWER_WINDOWS
|
||||
#undef SDL_POWER_MACOSX
|
||||
#undef SDL_POWER_HAIKU
|
||||
#undef SDL_POWER_ANDROID
|
||||
#undef SDL_POWER_EMSCRIPTEN
|
||||
#undef SDL_POWER_HARDWIRED
|
||||
|
||||
/* Enable system filesystem support */
|
||||
#undef SDL_FILESYSTEM_HAIKU
|
||||
#undef SDL_FILESYSTEM_COCOA
|
||||
#undef SDL_FILESYSTEM_DUMMY
|
||||
#undef SDL_FILESYSTEM_UNIX
|
||||
#undef SDL_FILESYSTEM_WINDOWS
|
||||
#undef SDL_FILESYSTEM_NACL
|
||||
#undef SDL_FILESYSTEM_ANDROID
|
||||
#undef SDL_FILESYSTEM_EMSCRIPTEN
|
||||
|
||||
/* Enable assembly routines */
|
||||
#undef SDL_ASSEMBLY_ROUTINES
|
||||
#undef SDL_ALTIVEC_BLITTERS
|
||||
|
||||
/* Enable ime support */
|
||||
#undef SDL_USE_IME
|
||||
|
||||
/* Enable dynamic udev support */
|
||||
#undef SDL_UDEV_DYNAMIC
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
#undef SDL_LIBSAMPLERATE_DYNAMIC
|
||||
|
||||
#endif /* SDL_config_h_ */
|
157
bsp/simulator/SDL2-2.0.7/include/SDL_config_android.h
Normal file
157
bsp/simulator/SDL2-2.0.7/include/SDL_config_android.h
Normal file
@ -0,0 +1,157 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_android_h_
|
||||
#define SDL_config_android_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config_android.h
|
||||
*
|
||||
* This is a configuration that can be used to build SDL for Android
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
|
||||
#define SIZEOF_VOIDP 4
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_ANDROID 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_ANDROID 1
|
||||
#define SDL_HAPTIC_ANDROID 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_ANDROID 1
|
||||
|
||||
/* Enable OpenGL ES */
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Android does not support Vulkan in native code using the "armeabi" ABI. */
|
||||
#if defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_ANDROID 1
|
||||
|
||||
/* Enable the filesystem driver */
|
||||
#define SDL_FILESYSTEM_ANDROID 1
|
||||
|
||||
#endif /* SDL_config_android_h_ */
|
166
bsp/simulator/SDL2-2.0.7/include/SDL_config_iphoneos.h
Normal file
166
bsp/simulator/SDL2-2.0.7/include/SDL_config_iphoneos.h
Normal file
@ -0,0 +1,166 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_iphoneos_h_
|
||||
#define SDL_config_iphoneos_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
|
||||
/* enable iPhone version of Core Audio driver */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DUMMY 1
|
||||
|
||||
/* Enable MFi joystick support */
|
||||
#define SDL_JOYSTICK_MFI 1
|
||||
|
||||
/* Enable Unix style SO loading */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Supported video drivers */
|
||||
#define SDL_VIDEO_DRIVER_UIKIT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* enable OpenGL ES */
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#if !TARGET_OS_SIMULATOR && !TARGET_CPU_ARM // Only 64-bit devices have Metal
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_UIKIT 1
|
||||
|
||||
/* enable iPhone keyboard support */
|
||||
#define SDL_IPHONE_KEYBOARD 1
|
||||
|
||||
/* enable iOS extended launch screen */
|
||||
#define SDL_IPHONE_LAUNCHSCREEN 1
|
||||
|
||||
/* Set max recognized G-force from accelerometer
|
||||
See src/joystick/uikit/SDL_sysjoystick.m for notes on why this is needed
|
||||
*/
|
||||
#define SDL_IPHONE_MAX_GFORCE 5.0
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
#endif /* SDL_config_iphoneos_h_ */
|
197
bsp/simulator/SDL2-2.0.7/include/SDL_config_macosx.h
Normal file
197
bsp/simulator/SDL2-2.0.7/include/SDL_config_macosx.h
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_macosx_h_
|
||||
#define SDL_config_macosx_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_IOKIT 1
|
||||
#define SDL_HAPTIC_IOKIT 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_COCOA 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_8
|
||||
/*
|
||||
* No matter the versions targeted, this is the 10.8 or later SDK, so you have
|
||||
* to use the external Xquartz, which is a more modern Xlib. Previous SDKs
|
||||
* used an older Xlib.
|
||||
*/
|
||||
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_CGL
|
||||
#define SDL_VIDEO_OPENGL_CGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_GLX
|
||||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
|
||||
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#ifdef __ppc__
|
||||
#define SDL_ALTIVEC_BLITTERS 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_macosx_h_ */
|
197
bsp/simulator/SDL2-2.0.7/include/SDL_config_macosx.h.orig
Normal file
197
bsp/simulator/SDL2-2.0.7/include/SDL_config_macosx.h.orig
Normal file
@ -0,0 +1,197 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_macosx_h_
|
||||
#define SDL_config_macosx_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYSCTLBYNAME 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_IOKIT 1
|
||||
#define SDL_HAPTIC_IOKIT 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_COCOA 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#undef SDL_VIDEO_DRIVER_X11
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_8
|
||||
/*
|
||||
* No matter the versions targeted, this is the 10.8 or later SDK, so you have
|
||||
* to use the external Xquartz, which is a more modern Xlib. Previous SDKs
|
||||
* used an older Xlib.
|
||||
*/
|
||||
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
|
||||
#endif
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_CGL
|
||||
#define SDL_VIDEO_OPENGL_CGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_GLX
|
||||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures and 10.11+ */
|
||||
#if TARGET_CPU_X86_64
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
#else
|
||||
#define SDL_VIDEO_VULKAN 0
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_MACOSX 1
|
||||
|
||||
/* enable filesystem support */
|
||||
#define SDL_FILESYSTEM_COCOA 1
|
||||
|
||||
/* Enable assembly routines */
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#ifdef __ppc__
|
||||
#define SDL_ALTIVEC_BLITTERS 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_macosx_h_ */
|
82
bsp/simulator/SDL2-2.0.7/include/SDL_config_minimal.h
Normal file
82
bsp/simulator/SDL2-2.0.7/include/SDL_config_minimal.h
Normal file
@ -0,0 +1,82 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_minimal_h_
|
||||
#define SDL_config_minimal_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/**
|
||||
* \file SDL_config_minimal.h
|
||||
*
|
||||
* This is the minimal configuration that can be used to build SDL.
|
||||
*/
|
||||
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
/* Here are some reasonable defaults */
|
||||
typedef unsigned int size_t;
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
#else
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif /* Visual Studio 2008 */
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
|
||||
#endif
|
||||
|
||||
/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
|
||||
/* Enable the stub haptic driver (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
/* Enable the stub thread support (src/thread/generic/\*.c) */
|
||||
#define SDL_THREADS_DISABLED 1
|
||||
|
||||
/* Enable the stub timer support (src/timer/dummy/\*.c) */
|
||||
#define SDL_TIMERS_DISABLED 1
|
||||
|
||||
/* Enable the dummy video driver (src/video/dummy/\*.c) */
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable the dummy filesystem driver (src/filesystem/dummy/\*.c) */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
#endif /* SDL_config_minimal_h_ */
|
128
bsp/simulator/SDL2-2.0.7/include/SDL_config_pandora.h
Normal file
128
bsp/simulator/SDL2-2.0.7/include/SDL_config_pandora.h
Normal file
@ -0,0 +1,128 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_pandora_h_
|
||||
#define SDL_config_pandora_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
|
||||
|
||||
#define SDL_TIMER_UNIX 1
|
||||
#define SDL_FILESYSTEM_UNIX 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_X11 1
|
||||
#define SDL_VIDEO_DRIVER_PANDORA 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* SDL_config_pandora_h_ */
|
144
bsp/simulator/SDL2-2.0.7/include/SDL_config_psp.h
Normal file
144
bsp/simulator/SDL2-2.0.7/include/SDL_config_psp.h
Normal file
@ -0,0 +1,144 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_psp_h_
|
||||
#define SDL_config_psp_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
/* #define HAVE_SYSCONF 1 */
|
||||
/* #define HAVE_SIGACTION 1 */
|
||||
|
||||
|
||||
/* PSP isn't that sophisticated */
|
||||
#define LACKS_SYS_MMAN_H 1
|
||||
|
||||
/* Enable the stub thread support (src/thread/psp/\*.c) */
|
||||
#define SDL_THREAD_PSP 1
|
||||
|
||||
/* Enable the stub timer support (src/timer/psp/\*.c) */
|
||||
#define SDL_TIMERS_PSP 1
|
||||
|
||||
/* Enable the stub joystick driver (src/joystick/psp/\*.c) */
|
||||
#define SDL_JOYSTICK_PSP 1
|
||||
|
||||
/* Enable the stub audio driver (src/audio/psp/\*.c) */
|
||||
#define SDL_AUDIO_DRIVER_PSP 1
|
||||
|
||||
/* PSP video dirver */
|
||||
#define SDL_VIDEO_DRIVER_PSP 1
|
||||
|
||||
/* PSP render dirver */
|
||||
#define SDL_VIDEO_RENDER_PSP 1
|
||||
|
||||
#define SDL_POWER_PSP 1
|
||||
|
||||
/* !!! FIXME: what does PSP do for filesystem stuff? */
|
||||
#define SDL_FILESYSTEM_DUMMY 1
|
||||
|
||||
/* PSP doesn't have haptic device (src/haptic/dummy/\*.c) */
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
|
||||
/* PSP can't load shared object (src/loadso/dummy/\*.c) */
|
||||
#define SDL_LOADSO_DISABLED 1
|
||||
|
||||
|
||||
#endif /* SDL_config_psp_h_ */
|
225
bsp/simulator/SDL2-2.0.7/include/SDL_config_windows.h
Normal file
225
bsp/simulator/SDL2-2.0.7/include/SDL_config_windows.h
Normal file
@ -0,0 +1,225 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_windows_h_
|
||||
#define SDL_config_windows_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
#else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef _WIN64
|
||||
# define SIZEOF_VOIDP 8
|
||||
#else
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define HAVE_DDRAW_H 1
|
||||
#define HAVE_DINPUT_H 1
|
||||
#define HAVE_DSOUND_H 1
|
||||
#define HAVE_DXGI_H 1
|
||||
#define HAVE_XINPUT_H 1
|
||||
|
||||
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
|
||||
#ifdef HAVE_LIBC
|
||||
/* Useful headers */
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
#define HAVE__STRLWR 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE__LTOA 1
|
||||
#define HAVE__ULTOA 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_SCALBN 1
|
||||
#endif
|
||||
#if !defined(_MSC_VER) || defined(_USE_MATH_DEFINES)
|
||||
#define HAVE_M_PI 1
|
||||
#endif
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#endif
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_WASAPI 1
|
||||
#define SDL_AUDIO_DRIVER_DSOUND 1
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 0
|
||||
#define SDL_AUDIO_DRIVER_WINMM 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_JOYSTICK_DINPUT 1
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_DINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#define SDL_THREAD_WINDOWS 1
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_WINDOWS 1
|
||||
|
||||
#ifndef SDL_VIDEO_RENDER_D3D
|
||||
#define SDL_VIDEO_RENDER_D3D 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_D3D11
|
||||
#define SDL_VIDEO_RENDER_D3D11 0
|
||||
#endif
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#ifndef SDL_VIDEO_OPENGL
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_WGL
|
||||
#define SDL_VIDEO_OPENGL_WGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_OGL
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_RENDER_OGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#endif
|
||||
#ifndef SDL_VIDEO_OPENGL_EGL
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
#endif
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINDOWS 1
|
||||
|
||||
/* Enable filesystem support */
|
||||
#define SDL_FILESYSTEM_WINDOWS 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_windows_h_ */
|
215
bsp/simulator/SDL2-2.0.7/include/SDL_config_winrt.h
Normal file
215
bsp/simulator/SDL2-2.0.7/include/SDL_config_winrt.h
Normal file
@ -0,0 +1,215 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_winrt_h_
|
||||
#define SDL_config_winrt_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* Make sure the Windows SDK's NTDDI_VERSION macro gets defined. This is used
|
||||
by SDL to determine which version of the Windows SDK is being used.
|
||||
*/
|
||||
#include <sdkddkver.h>
|
||||
|
||||
/* Define possibly-undefined NTDDI values (used when compiling SDL against
|
||||
older versions of the Windows SDK.
|
||||
*/
|
||||
#ifndef NTDDI_WINBLUE
|
||||
#define NTDDI_WINBLUE 0x06030000
|
||||
#endif
|
||||
#ifndef NTDDI_WIN10
|
||||
#define NTDDI_WIN10 0x0A000000
|
||||
#endif
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
#if !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
|
||||
#if defined(__GNUC__) || defined(__DMC__) || defined(__WATCOMC__)
|
||||
#define HAVE_STDINT_H 1
|
||||
#elif defined(_MSC_VER)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
/* Older Visual C++ headers don't have the Win64-compatible typedefs... */
|
||||
#if ((_MSC_VER <= 1200) && (!defined(DWORD_PTR)))
|
||||
#define DWORD_PTR DWORD
|
||||
#endif
|
||||
#if ((_MSC_VER <= 1200) && (!defined(LONG_PTR)))
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
#else /* !__GNUC__ && !_MSC_VER */
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#ifndef _SIZE_T_DEFINED_
|
||||
#define _SIZE_T_DEFINED_
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#ifdef _WIN64
|
||||
# define SIZEOF_VOIDP 8
|
||||
#else
|
||||
# define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Useful headers */
|
||||
#define HAVE_DXGI_H 1
|
||||
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
|
||||
#define HAVE_XINPUT_H 1
|
||||
#endif
|
||||
#define HAVE_LIBC 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE__STRREV 1
|
||||
#define HAVE__STRUPR 1
|
||||
//#define HAVE__STRLWR 1 // TODO, WinRT: consider using _strlwr_s instead
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
//#define HAVE_ITOA 1 // TODO, WinRT: consider using _itoa_s instead
|
||||
//#define HAVE__LTOA 1 // TODO, WinRT: consider using _ltoa_s instead
|
||||
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
//#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE__STRICMP 1
|
||||
#define HAVE__STRNICMP 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
//#define HAVE_SSCANF 1 // TODO, WinRT: consider using sscanf_s instead
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE__COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_POW 1
|
||||
//#define HAVE_SCALBN 1
|
||||
#define HAVE__SCALB 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE__FSEEKI64 1
|
||||
|
||||
/* Enable various audio drivers */
|
||||
#define SDL_AUDIO_DRIVER_XAUDIO2 1
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable various input drivers */
|
||||
#if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#define SDL_JOYSTICK_DISABLED 1
|
||||
#define SDL_HAPTIC_DISABLED 1
|
||||
#else
|
||||
#define SDL_JOYSTICK_XINPUT 1
|
||||
#define SDL_HAPTIC_XINPUT 1
|
||||
#endif
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_WINDOWS 1
|
||||
|
||||
/* Enable various threading systems */
|
||||
#if (NTDDI_VERSION >= NTDDI_WINBLUE)
|
||||
#define SDL_THREAD_WINDOWS 1
|
||||
#else
|
||||
/* WinRT on Windows 8.0 and Windows Phone 8.0 don't support CreateThread() */
|
||||
#define SDL_THREAD_STDCPP 1
|
||||
#endif
|
||||
|
||||
/* Enable various timer systems */
|
||||
#define SDL_TIMER_WINDOWS 1
|
||||
|
||||
/* Enable various video drivers */
|
||||
#define SDL_VIDEO_DRIVER_WINRT 1
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
|
||||
/* Enable OpenGL ES 2.0 (via a modified ANGLE library) */
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
|
||||
/* Enable appropriate renderer(s) */
|
||||
#define SDL_VIDEO_RENDER_D3D11 1
|
||||
|
||||
#if SDL_VIDEO_OPENGL_ES2
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
#endif
|
||||
|
||||
/* Enable system power support */
|
||||
#define SDL_POWER_WINRT 1
|
||||
|
||||
/* Enable assembly routines (Win64 doesn't have inline asm) */
|
||||
#ifndef _WIN64
|
||||
#define SDL_ASSEMBLY_ROUTINES 1
|
||||
#endif
|
||||
|
||||
#endif /* SDL_config_winrt_h_ */
|
121
bsp/simulator/SDL2-2.0.7/include/SDL_config_wiz.h
Normal file
121
bsp/simulator/SDL2-2.0.7/include/SDL_config_wiz.h
Normal file
@ -0,0 +1,121 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_wiz_h_
|
||||
#define SDL_config_wiz_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/* This is a set of defines to configure the SDL features */
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#define SDL_BYTEORDER 1234
|
||||
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_POW 1
|
||||
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_TSLIB 1
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP 1
|
||||
|
||||
#define SDL_TIMER_UNIX 1
|
||||
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_PANDORA 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
|
||||
#endif /* SDL_config_wiz_h_ */
|
20
bsp/simulator/SDL2-2.0.7/include/SDL_copying.h
Normal file
20
bsp/simulator/SDL2-2.0.7/include/SDL_copying.h
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,14 +25,20 @@
|
||||
* CPU feature detection for SDL.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_cpuinfo_h
|
||||
#define _SDL_cpuinfo_h
|
||||
#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 <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#define __MMX__
|
||||
@ -40,6 +46,7 @@
|
||||
#endif
|
||||
#define __SSE__
|
||||
#define __SSE2__
|
||||
#endif /* __clang__ */
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#else
|
||||
@ -61,6 +68,9 @@
|
||||
#ifdef __SSE2__
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#ifdef __SSE3__
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "begin_code.h"
|
||||
@ -139,6 +149,16 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||
|
||||
/**
|
||||
* This function returns true if the CPU has AVX2 features.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||
|
||||
/**
|
||||
* This function returns 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.
|
||||
*/
|
||||
@ -151,6 +171,6 @@ extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_cpuinfo_h */
|
||||
#endif /* SDL_cpuinfo_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
1673
bsp/simulator/SDL2-2.0.7/include/SDL_egl.h
Normal file
1673
bsp/simulator/SDL2-2.0.7/include/SDL_egl.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Functions for reading and writing endian-specific values
|
||||
*/
|
||||
|
||||
#ifndef _SDL_endian_h
|
||||
#define _SDL_endian_h
|
||||
#ifndef SDL_endian_h_
|
||||
#define SDL_endian_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#else /* __linux __ */
|
||||
#else /* __linux__ */
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
||||
@ -52,7 +52,7 @@
|
||||
#else
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#endif
|
||||
#endif /* __linux __ */
|
||||
#endif /* __linux__ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
|
||||
@ -96,6 +96,12 @@ SDL_Swap16(Uint16 x)
|
||||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint16 SDL_Swap16(Uint16);
|
||||
#pragma aux SDL_Swap16 = \
|
||||
"xchg al, ah" \
|
||||
parm [ax] \
|
||||
modify [ax];
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
@ -136,6 +142,21 @@ SDL_Swap32(Uint32 x)
|
||||
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern _inline Uint32 SDL_Swap32(Uint32);
|
||||
#ifndef __SW_3 /* 486+ */
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"bswap eax" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#else /* 386-only */
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"xchg al, ah" \
|
||||
"ror eax, 16" \
|
||||
"xchg al, ah" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#endif
|
||||
#else
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
@ -234,6 +255,6 @@ SDL_SwapFloat(float x)
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_endian_h */
|
||||
#endif /* SDL_endian_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Simple error message routines for SDL.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_error_h
|
||||
#define _SDL_error_h
|
||||
#ifndef SDL_error_h_
|
||||
#define SDL_error_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -38,7 +38,7 @@ extern "C" {
|
||||
|
||||
/* Public functions */
|
||||
/* SDL_SetError() unconditionally returns -1. */
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(const char *fmt, ...);
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||
|
||||
@ -71,6 +71,6 @@ extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_error_h */
|
||||
#endif /* SDL_error_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_events_h
|
||||
#define _SDL_events_h
|
||||
#ifndef SDL_events_h_
|
||||
#define SDL_events_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -59,7 +59,7 @@ typedef enum
|
||||
/* Application events */
|
||||
SDL_QUIT = 0x100, /**< User-requested quit */
|
||||
|
||||
/* These application events have special meaning on iOS, see README-ios.txt for details */
|
||||
/* These application events have special meaning on iOS, see README-ios.md for details */
|
||||
SDL_APP_TERMINATING, /**< The application is being terminated by the OS
|
||||
Called on iOS in applicationWillTerminate()
|
||||
Called on Android in onDestroy()
|
||||
@ -94,6 +94,9 @@ typedef enum
|
||||
SDL_KEYUP, /**< Key released */
|
||||
SDL_TEXTEDITING, /**< Keyboard text editing (composition) */
|
||||
SDL_TEXTINPUT, /**< Keyboard text input */
|
||||
SDL_KEYMAPCHANGED, /**< Keymap changed due to a system event such as an
|
||||
input language or keyboard layout change.
|
||||
*/
|
||||
|
||||
/* Mouse events */
|
||||
SDL_MOUSEMOTION = 0x400, /**< Mouse moved */
|
||||
@ -133,9 +136,17 @@ typedef enum
|
||||
|
||||
/* Drag and drop events */
|
||||
SDL_DROPFILE = 0x1000, /**< The system requests a file open */
|
||||
SDL_DROPTEXT, /**< text/plain drag-and-drop event */
|
||||
SDL_DROPBEGIN, /**< A new set of drops is beginning (NULL filename) */
|
||||
SDL_DROPCOMPLETE, /**< Current set of drops is now complete (NULL filename) */
|
||||
|
||||
/* Audio hotplug events */
|
||||
SDL_AUDIODEVICEADDED = 0x1100, /**< A new audio device is available */
|
||||
SDL_AUDIODEVICEREMOVED, /**< An audio device has been removed. */
|
||||
|
||||
/* Render events */
|
||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset */
|
||||
SDL_RENDER_TARGETS_RESET = 0x2000, /**< The render targets have been reset and their contents need to be updated */
|
||||
SDL_RENDER_DEVICE_RESET, /**< The device has been reset and all textures need to be recreated */
|
||||
|
||||
/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
|
||||
* and should be allocated with SDL_RegisterEvents()
|
||||
@ -154,7 +165,7 @@ typedef enum
|
||||
typedef struct SDL_CommonEvent
|
||||
{
|
||||
Uint32 type;
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_CommonEvent;
|
||||
|
||||
/**
|
||||
@ -163,7 +174,7 @@ typedef struct SDL_CommonEvent
|
||||
typedef struct SDL_WindowEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_WINDOWEVENT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The associated window */
|
||||
Uint8 event; /**< ::SDL_WindowEventID */
|
||||
Uint8 padding1;
|
||||
@ -179,7 +190,7 @@ typedef struct SDL_WindowEvent
|
||||
typedef struct SDL_KeyboardEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_KEYDOWN or ::SDL_KEYUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
Uint8 repeat; /**< Non-zero if this is a key repeat */
|
||||
@ -195,7 +206,7 @@ typedef struct SDL_KeyboardEvent
|
||||
typedef struct SDL_TextEditingEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTEDITING */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTEDITINGEVENT_TEXT_SIZE]; /**< The editing text */
|
||||
Sint32 start; /**< The start cursor of selected editing text */
|
||||
@ -210,7 +221,7 @@ typedef struct SDL_TextEditingEvent
|
||||
typedef struct SDL_TextInputEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_TEXTINPUT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with keyboard focus, if any */
|
||||
char text[SDL_TEXTINPUTEVENT_TEXT_SIZE]; /**< The input text */
|
||||
} SDL_TextInputEvent;
|
||||
@ -221,10 +232,10 @@ typedef struct SDL_TextInputEvent
|
||||
typedef struct SDL_MouseMotionEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Uint32 state; /**< The value button state */
|
||||
Uint32 state; /**< The current button state */
|
||||
Sint32 x; /**< X coordinate, relative to window */
|
||||
Sint32 y; /**< Y coordinate, relative to window */
|
||||
Sint32 xrel; /**< The relative motion in the X direction */
|
||||
@ -237,7 +248,7 @@ typedef struct SDL_MouseMotionEvent
|
||||
typedef struct SDL_MouseButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Uint8 button; /**< The mouse button index */
|
||||
@ -254,11 +265,12 @@ typedef struct SDL_MouseButtonEvent
|
||||
typedef struct SDL_MouseWheelEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MOUSEWHEEL */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The window with mouse focus, if any */
|
||||
Uint32 which; /**< The mouse instance id, or SDL_TOUCH_MOUSEID */
|
||||
Sint32 x; /**< The amount scrolled horizontally, positive to the right and negative to the left */
|
||||
Sint32 y; /**< The amount scrolled vertically, positive away from the user and negative toward the user */
|
||||
Uint32 direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
|
||||
} SDL_MouseWheelEvent;
|
||||
|
||||
/**
|
||||
@ -267,7 +279,7 @@ typedef struct SDL_MouseWheelEvent
|
||||
typedef struct SDL_JoyAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYAXISMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The joystick axis index */
|
||||
Uint8 padding1;
|
||||
@ -283,7 +295,7 @@ typedef struct SDL_JoyAxisEvent
|
||||
typedef struct SDL_JoyBallEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBALLMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 ball; /**< The joystick trackball index */
|
||||
Uint8 padding1;
|
||||
@ -299,7 +311,7 @@ typedef struct SDL_JoyBallEvent
|
||||
typedef struct SDL_JoyHatEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYHATMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 hat; /**< The joystick hat index */
|
||||
Uint8 value; /**< The hat position value.
|
||||
@ -319,7 +331,7 @@ typedef struct SDL_JoyHatEvent
|
||||
typedef struct SDL_JoyButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The joystick button index */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
@ -333,7 +345,7 @@ typedef struct SDL_JoyButtonEvent
|
||||
typedef struct SDL_JoyDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_JOYDEVICEADDED or ::SDL_JOYDEVICEREMOVED */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED event */
|
||||
} SDL_JoyDeviceEvent;
|
||||
|
||||
@ -344,7 +356,7 @@ typedef struct SDL_JoyDeviceEvent
|
||||
typedef struct SDL_ControllerAxisEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERAXISMOTION */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 axis; /**< The controller axis (SDL_GameControllerAxis) */
|
||||
Uint8 padding1;
|
||||
@ -361,7 +373,7 @@ typedef struct SDL_ControllerAxisEvent
|
||||
typedef struct SDL_ControllerButtonEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_JoystickID which; /**< The joystick instance id */
|
||||
Uint8 button; /**< The controller button (SDL_GameControllerButton) */
|
||||
Uint8 state; /**< ::SDL_PRESSED or ::SDL_RELEASED */
|
||||
@ -376,10 +388,24 @@ typedef struct SDL_ControllerButtonEvent
|
||||
typedef struct SDL_ControllerDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_CONTROLLERDEVICEADDED, ::SDL_CONTROLLERDEVICEREMOVED, or ::SDL_CONTROLLERDEVICEREMAPPED */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Sint32 which; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
|
||||
} SDL_ControllerDeviceEvent;
|
||||
|
||||
/**
|
||||
* \brief Audio device event structure (event.adevice.*)
|
||||
*/
|
||||
typedef struct SDL_AudioDeviceEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_AUDIODEVICEADDED, or ::SDL_AUDIODEVICEREMOVED */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 which; /**< The audio device index for the ADDED event (valid until next SDL_GetNumAudioDevices() call), SDL_AudioDeviceID for the REMOVED event */
|
||||
Uint8 iscapture; /**< zero if an output device, non-zero if a capture device. */
|
||||
Uint8 padding1;
|
||||
Uint8 padding2;
|
||||
Uint8 padding3;
|
||||
} SDL_AudioDeviceEvent;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Touch finger event structure (event.tfinger.*)
|
||||
@ -387,13 +413,13 @@ typedef struct SDL_ControllerDeviceEvent
|
||||
typedef struct SDL_TouchFingerEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
SDL_FingerID fingerId;
|
||||
float x; /**< Normalized in the range 0...1 */
|
||||
float y; /**< Normalized in the range 0...1 */
|
||||
float dx; /**< Normalized in the range 0...1 */
|
||||
float dy; /**< Normalized in the range 0...1 */
|
||||
float dx; /**< Normalized in the range -1...1 */
|
||||
float dy; /**< Normalized in the range -1...1 */
|
||||
float pressure; /**< Normalized in the range 0...1 */
|
||||
} SDL_TouchFingerEvent;
|
||||
|
||||
@ -404,8 +430,8 @@ typedef struct SDL_TouchFingerEvent
|
||||
typedef struct SDL_MultiGestureEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_MULTIGESTURE */
|
||||
Uint32 timestamp;
|
||||
SDL_TouchID touchId; /**< The touch device index */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
float dTheta;
|
||||
float dDist;
|
||||
float x;
|
||||
@ -420,8 +446,8 @@ typedef struct SDL_MultiGestureEvent
|
||||
*/
|
||||
typedef struct SDL_DollarGestureEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DOLLARGESTURE */
|
||||
Uint32 timestamp;
|
||||
Uint32 type; /**< ::SDL_DOLLARGESTURE or ::SDL_DOLLARRECORD */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_TouchID touchId; /**< The touch device id */
|
||||
SDL_GestureID gestureId;
|
||||
Uint32 numFingers;
|
||||
@ -433,14 +459,15 @@ typedef struct SDL_DollarGestureEvent
|
||||
|
||||
/**
|
||||
* \brief An event used to request a file open by the system (event.drop.*)
|
||||
* This event is disabled by default, you can enable it with SDL_EventState()
|
||||
* \note If you enable this event, you must free the filename in the event.
|
||||
* This event is enabled by default, you can disable it with SDL_EventState().
|
||||
* \note If this event is enabled, you must free the filename in the event.
|
||||
*/
|
||||
typedef struct SDL_DropEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_DROPFILE */
|
||||
Uint32 timestamp;
|
||||
char *file; /**< The file name, which should be freed with SDL_free() */
|
||||
Uint32 type; /**< ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE */
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
char *file; /**< The file name, which should be freed with SDL_free(), is NULL on begin/complete */
|
||||
Uint32 windowID; /**< The window that was dropped on, if any */
|
||||
} SDL_DropEvent;
|
||||
|
||||
|
||||
@ -450,7 +477,7 @@ typedef struct SDL_DropEvent
|
||||
typedef struct SDL_QuitEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_QuitEvent;
|
||||
|
||||
/**
|
||||
@ -459,7 +486,7 @@ typedef struct SDL_QuitEvent
|
||||
typedef struct SDL_OSEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_QUIT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
} SDL_OSEvent;
|
||||
|
||||
/**
|
||||
@ -468,7 +495,7 @@ typedef struct SDL_OSEvent
|
||||
typedef struct SDL_UserEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_USEREVENT through ::SDL_LASTEVENT-1 */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
Uint32 windowID; /**< The associated window if any */
|
||||
Sint32 code; /**< User defined event code */
|
||||
void *data1; /**< User defined data pointer */
|
||||
@ -488,7 +515,7 @@ typedef struct SDL_SysWMmsg SDL_SysWMmsg;
|
||||
typedef struct SDL_SysWMEvent
|
||||
{
|
||||
Uint32 type; /**< ::SDL_SYSWMEVENT */
|
||||
Uint32 timestamp;
|
||||
Uint32 timestamp; /**< In milliseconds, populated using SDL_GetTicks() */
|
||||
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
|
||||
} SDL_SysWMEvent;
|
||||
|
||||
@ -514,6 +541,7 @@ typedef union SDL_Event
|
||||
SDL_ControllerAxisEvent caxis; /**< Game Controller axis event data */
|
||||
SDL_ControllerButtonEvent cbutton; /**< Game Controller button event data */
|
||||
SDL_ControllerDeviceEvent cdevice; /**< Game Controller device event data */
|
||||
SDL_AudioDeviceEvent adevice; /**< Audio device event data */
|
||||
SDL_QuitEvent quit; /**< Quit request event data */
|
||||
SDL_UserEvent user; /**< Custom event data */
|
||||
SDL_SysWMEvent syswm; /**< System dependent window event data */
|
||||
@ -583,6 +611,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
|
||||
|
||||
/**
|
||||
* This function clears events from the event queue
|
||||
* This function only affects currently queued events. If you want to make
|
||||
* sure that all pending OS events are flushed, you can call SDL_PumpEvents()
|
||||
* on the main thread immediately before the flush call.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
|
||||
extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);
|
||||
@ -659,7 +690,7 @@ extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Return the value event filter - can be used to "chain" filters.
|
||||
* Return the current event filter - can be used to "chain" filters.
|
||||
* If there is no event filter set, this function returns SDL_FALSE.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
|
||||
@ -678,7 +709,7 @@ extern DECLSPEC void SDLCALL SDL_DelEventWatch(SDL_EventFilter filter,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Run the filter function on the value event queue, removing any
|
||||
* Run the filter function on the current event queue, removing any
|
||||
* events for which the filter returns 0.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
||||
@ -693,11 +724,11 @@ extern DECLSPEC void SDLCALL SDL_FilterEvents(SDL_EventFilter filter,
|
||||
/**
|
||||
* This function allows you to set the state of processing certain events.
|
||||
* - If \c state is set to ::SDL_IGNORE, that event will be automatically
|
||||
* dropped from the event queue and will not event be filtered.
|
||||
* dropped from the event queue and will not be filtered.
|
||||
* - If \c state is set to ::SDL_ENABLE, that event will be processed
|
||||
* normally.
|
||||
* - If \c state is set to ::SDL_QUERY, SDL_EventState() will return the
|
||||
* value processing state of the specified event.
|
||||
* current processing state of the specified event.
|
||||
*/
|
||||
extern DECLSPEC Uint8 SDLCALL SDL_EventState(Uint32 type, int state);
|
||||
/* @} */
|
||||
@ -718,6 +749,6 @@ extern DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_events_h */
|
||||
#endif /* SDL_events_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* \brief Include file for filesystem SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef _SDL_filesystem_h
|
||||
#define _SDL_filesystem_h
|
||||
#ifndef SDL_filesystem_h_
|
||||
#define SDL_filesystem_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -42,7 +42,7 @@ extern "C" {
|
||||
*
|
||||
* 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 value working directory.
|
||||
* 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).
|
||||
@ -131,6 +131,6 @@ extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_system_h */
|
||||
#endif /* SDL_filesystem_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL game controller event handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_gamecontroller_h
|
||||
#define _SDL_gamecontroller_h
|
||||
#ifndef SDL_gamecontroller_h_
|
||||
#define SDL_gamecontroller_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -43,7 +43,7 @@ extern "C" {
|
||||
* \file SDL_gamecontroller.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
|
||||
* 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
|
||||
@ -51,7 +51,9 @@ extern "C" {
|
||||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||
*/
|
||||
|
||||
/* The gamecontroller structure used to identify an SDL game controller */
|
||||
/**
|
||||
* The gamecontroller structure used to identify an SDL game controller
|
||||
*/
|
||||
struct _SDL_GameController;
|
||||
typedef struct _SDL_GameController SDL_GameController;
|
||||
|
||||
@ -87,13 +89,13 @@ typedef struct 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) ) {
|
||||
* 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:
|
||||
* 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.
|
||||
@ -105,22 +107,22 @@ typedef struct SDL_GameControllerButtonBind
|
||||
* Buttons can be used as a controller axis and vice versa.
|
||||
*
|
||||
* This string shows an example of a valid mapping for a controller
|
||||
* "341a3608000000000000504944564944,Afterglow 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",
|
||||
* "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 value SDL_GetPlatform()
|
||||
* 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 );
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
|
||||
|
||||
/**
|
||||
* Load a set of mappings from a file, filtered by the value SDL_GetPlatform()
|
||||
* Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
|
||||
*
|
||||
* Convenience macro.
|
||||
*/
|
||||
@ -131,28 +133,41 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW( SDL_RWops * rw,
|
||||
*
|
||||
* \return 1 if mapping is added, 0 if updated, -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping( const char* mappingString );
|
||||
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
|
||||
* \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 );
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
|
||||
|
||||
/**
|
||||
* Get a mapping string for an open GameController
|
||||
*
|
||||
* \return the mapping string. Must be freed with SDL_free. Returns NULL if no mapping is available
|
||||
* \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GameControllerMapping( SDL_GameController * gamecontroller );
|
||||
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.
|
||||
@ -163,18 +178,42 @@ extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_
|
||||
/**
|
||||
* 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 the value which will identify this controller in future controller
|
||||
* events.
|
||||
* 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.
|
||||
@ -198,7 +237,7 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameCont
|
||||
extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
|
||||
|
||||
/**
|
||||
* Update the value state of the open game controllers.
|
||||
* Update the current state of the open game controllers.
|
||||
*
|
||||
* This is called automatically by the event loop if any game controller
|
||||
* events are enabled.
|
||||
@ -208,6 +247,12 @@ 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
|
||||
{
|
||||
@ -239,9 +284,10 @@ SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
|
||||
SDL_GameControllerAxis axis);
|
||||
|
||||
/**
|
||||
* Get the value state of an axis control on a game controller.
|
||||
* Get the current state of an axis control on a game controller.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
* The state is a value ranging from -32768 to 32767 (except for the triggers,
|
||||
* which range from 0 to 32767).
|
||||
*
|
||||
* The axis indices start at index 0.
|
||||
*/
|
||||
@ -292,7 +338,7 @@ SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
|
||||
|
||||
|
||||
/**
|
||||
* Get the value state of a button on a game controller.
|
||||
* Get the current state of a button on a game controller.
|
||||
*
|
||||
* The button indices start at index 0.
|
||||
*/
|
||||
@ -311,6 +357,6 @@ extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecon
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_gamecontroller_h */
|
||||
#endif /* SDL_gamecontroller_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL gesture event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_gesture_h
|
||||
#define _SDL_gesture_h
|
||||
#ifndef SDL_gesture_h_
|
||||
#define SDL_gesture_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -82,6 +82,6 @@ extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWo
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_gesture_h */
|
||||
#endif /* SDL_gesture_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -22,12 +22,12 @@
|
||||
/**
|
||||
* \file SDL_haptic.h
|
||||
*
|
||||
* \brief The SDL Haptic subsystem allows you to control haptic (force feedback)
|
||||
* \brief The SDL haptic subsystem allows you to control haptic (force feedback)
|
||||
* devices.
|
||||
*
|
||||
* The basic usage is as follows:
|
||||
* - Initialize the Subsystem (::SDL_INIT_HAPTIC).
|
||||
* - Open a Haptic Device.
|
||||
* - Initialize the subsystem (::SDL_INIT_HAPTIC).
|
||||
* - Open a haptic device.
|
||||
* - SDL_HapticOpen() to open from index.
|
||||
* - SDL_HapticOpenFromJoystick() to open from an existing joystick.
|
||||
* - Create an effect (::SDL_HapticEffect).
|
||||
@ -102,15 +102,10 @@
|
||||
* return 0; // Success
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
* You can also find out more information on my blog:
|
||||
* http://bobbens.dyndns.org/journal/2010/sdl_haptic/
|
||||
*
|
||||
* \author Edgar Simo Serra
|
||||
*/
|
||||
|
||||
#ifndef _SDL_haptic_h
|
||||
#define _SDL_haptic_h
|
||||
#ifndef SDL_haptic_h_
|
||||
#define SDL_haptic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -154,7 +149,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticCondition
|
||||
*/
|
||||
#define SDL_HAPTIC_CONSTANT (1<<0)
|
||||
#define SDL_HAPTIC_CONSTANT (1u<<0)
|
||||
|
||||
/**
|
||||
* \brief Sine wave effect supported.
|
||||
@ -163,7 +158,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticPeriodic
|
||||
*/
|
||||
#define SDL_HAPTIC_SINE (1<<1)
|
||||
#define SDL_HAPTIC_SINE (1u<<1)
|
||||
|
||||
/**
|
||||
* \brief Left/Right effect supported.
|
||||
@ -174,7 +169,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
* \warning this value was SDL_HAPTIC_SQUARE right before 2.0.0 shipped. Sorry,
|
||||
* we ran out of bits, and this is important for XInput devices.
|
||||
*/
|
||||
#define SDL_HAPTIC_LEFTRIGHT (1<<2)
|
||||
#define SDL_HAPTIC_LEFTRIGHT (1u<<2)
|
||||
|
||||
/* !!! FIXME: put this back when we have more bits in 2.1 */
|
||||
/* #define SDL_HAPTIC_SQUARE (1<<2) */
|
||||
@ -186,7 +181,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticPeriodic
|
||||
*/
|
||||
#define SDL_HAPTIC_TRIANGLE (1<<3)
|
||||
#define SDL_HAPTIC_TRIANGLE (1u<<3)
|
||||
|
||||
/**
|
||||
* \brief Sawtoothup wave effect supported.
|
||||
@ -195,7 +190,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticPeriodic
|
||||
*/
|
||||
#define SDL_HAPTIC_SAWTOOTHUP (1<<4)
|
||||
#define SDL_HAPTIC_SAWTOOTHUP (1u<<4)
|
||||
|
||||
/**
|
||||
* \brief Sawtoothdown wave effect supported.
|
||||
@ -204,7 +199,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticPeriodic
|
||||
*/
|
||||
#define SDL_HAPTIC_SAWTOOTHDOWN (1<<5)
|
||||
#define SDL_HAPTIC_SAWTOOTHDOWN (1u<<5)
|
||||
|
||||
/**
|
||||
* \brief Ramp effect supported.
|
||||
@ -213,7 +208,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticRamp
|
||||
*/
|
||||
#define SDL_HAPTIC_RAMP (1<<6)
|
||||
#define SDL_HAPTIC_RAMP (1u<<6)
|
||||
|
||||
/**
|
||||
* \brief Spring effect supported - uses axes position.
|
||||
@ -223,7 +218,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticCondition
|
||||
*/
|
||||
#define SDL_HAPTIC_SPRING (1<<7)
|
||||
#define SDL_HAPTIC_SPRING (1u<<7)
|
||||
|
||||
/**
|
||||
* \brief Damper effect supported - uses axes velocity.
|
||||
@ -233,7 +228,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticCondition
|
||||
*/
|
||||
#define SDL_HAPTIC_DAMPER (1<<8)
|
||||
#define SDL_HAPTIC_DAMPER (1u<<8)
|
||||
|
||||
/**
|
||||
* \brief Inertia effect supported - uses axes acceleration.
|
||||
@ -243,7 +238,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticCondition
|
||||
*/
|
||||
#define SDL_HAPTIC_INERTIA (1<<9)
|
||||
#define SDL_HAPTIC_INERTIA (1u<<9)
|
||||
|
||||
/**
|
||||
* \brief Friction effect supported - uses axes movement.
|
||||
@ -253,14 +248,14 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticCondition
|
||||
*/
|
||||
#define SDL_HAPTIC_FRICTION (1<<10)
|
||||
#define SDL_HAPTIC_FRICTION (1u<<10)
|
||||
|
||||
/**
|
||||
* \brief Custom effect is supported.
|
||||
*
|
||||
* User defined custom haptic effect.
|
||||
*/
|
||||
#define SDL_HAPTIC_CUSTOM (1<<11)
|
||||
#define SDL_HAPTIC_CUSTOM (1u<<11)
|
||||
|
||||
/* @} *//* Haptic effects */
|
||||
|
||||
@ -273,7 +268,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticSetGain
|
||||
*/
|
||||
#define SDL_HAPTIC_GAIN (1<<12)
|
||||
#define SDL_HAPTIC_GAIN (1u<<12)
|
||||
|
||||
/**
|
||||
* \brief Device can set autocenter.
|
||||
@ -282,24 +277,26 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
*
|
||||
* \sa SDL_HapticSetAutocenter
|
||||
*/
|
||||
#define SDL_HAPTIC_AUTOCENTER (1<<13)
|
||||
#define SDL_HAPTIC_AUTOCENTER (1u<<13)
|
||||
|
||||
/**
|
||||
* \brief Device can be queried for effect status.
|
||||
*
|
||||
* Device can be queried for effect status.
|
||||
* Device supports querying effect status.
|
||||
*
|
||||
* \sa SDL_HapticGetEffectStatus
|
||||
*/
|
||||
#define SDL_HAPTIC_STATUS (1<<14)
|
||||
#define SDL_HAPTIC_STATUS (1u<<14)
|
||||
|
||||
/**
|
||||
* \brief Device can be paused.
|
||||
*
|
||||
* Devices supports being paused.
|
||||
*
|
||||
* \sa SDL_HapticPause
|
||||
* \sa SDL_HapticUnpause
|
||||
*/
|
||||
#define SDL_HAPTIC_PAUSE (1<<15)
|
||||
#define SDL_HAPTIC_PAUSE (1u<<15)
|
||||
|
||||
|
||||
/**
|
||||
@ -347,6 +344,9 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
/**
|
||||
* \brief Structure that represents a haptic direction.
|
||||
*
|
||||
* This is the direction where the force comes from,
|
||||
* instead of the direction in which the force is exerted.
|
||||
*
|
||||
* Directions can be specified by:
|
||||
* - ::SDL_HAPTIC_POLAR : Specified by polar coordinates.
|
||||
* - ::SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.
|
||||
@ -370,7 +370,7 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
^
|
||||
|
|
||||
|
|
||||
(1,0) West <----[ HAPTIC ]----> East (-1,0)
|
||||
(-1,0) West <----[ HAPTIC ]----> East (1,0)
|
||||
|
|
||||
|
|
||||
v
|
||||
@ -395,9 +395,9 @@ typedef struct _SDL_Haptic SDL_Haptic;
|
||||
* (X axis, Y axis and Z axis (with 3 axes)). ::SDL_HAPTIC_CARTESIAN uses
|
||||
* the first three \c dir parameters. The cardinal directions would be:
|
||||
* - North: 0,-1, 0
|
||||
* - East: -1, 0, 0
|
||||
* - East: 1, 0, 0
|
||||
* - South: 0, 1, 0
|
||||
* - West: 1, 0, 0
|
||||
* - West: -1, 0, 0
|
||||
*
|
||||
* The Z axis represents the height of the effect if supported, otherwise
|
||||
* it's unused. In cartesian encoding (1, 2) would be the same as (2, 4), you
|
||||
@ -446,7 +446,7 @@ typedef struct SDL_HapticDirection
|
||||
/**
|
||||
* \brief A structure containing a template for a Constant effect.
|
||||
*
|
||||
* The struct is exclusive to the ::SDL_HAPTIC_CONSTANT effect.
|
||||
* This struct is exclusively for the ::SDL_HAPTIC_CONSTANT effect.
|
||||
*
|
||||
* A constant effect applies a constant force in the specified direction
|
||||
* to the joystick.
|
||||
@ -492,7 +492,7 @@ typedef struct SDL_HapticConstant
|
||||
* over time. The type determines the shape of the wave and the parameters
|
||||
* determine the dimensions of the wave.
|
||||
*
|
||||
* Phase is given by hundredth of a cycle meaning that giving the phase a value
|
||||
* Phase is given by hundredth of a degree meaning that giving the phase a value
|
||||
* of 9000 will displace it 25% of its period. Here are sample values:
|
||||
* - 0: No phase displacement.
|
||||
* - 9000: Displaced 25% of its period.
|
||||
@ -553,9 +553,9 @@ typedef struct SDL_HapticPeriodic
|
||||
|
||||
/* Periodic */
|
||||
Uint16 period; /**< Period of the wave. */
|
||||
Sint16 magnitude; /**< Peak value. */
|
||||
Sint16 magnitude; /**< Peak value; if negative, equivalent to 180 degrees extra phase shift. */
|
||||
Sint16 offset; /**< Mean value of the wave. */
|
||||
Uint16 phase; /**< Horizontal shift given by hundredth of a cycle. */
|
||||
Uint16 phase; /**< Positive phase shift given by hundredth of a degree. */
|
||||
|
||||
/* Envelope */
|
||||
Uint16 attack_length; /**< Duration of the attack. */
|
||||
@ -604,11 +604,11 @@ typedef struct SDL_HapticCondition
|
||||
Uint16 interval; /**< How soon it can be triggered again after button. */
|
||||
|
||||
/* Condition */
|
||||
Uint16 right_sat[3]; /**< Level when joystick is to the positive side. */
|
||||
Uint16 left_sat[3]; /**< Level when joystick is to the negative side. */
|
||||
Uint16 right_sat[3]; /**< Level when joystick is to the positive side; max 0xFFFF. */
|
||||
Uint16 left_sat[3]; /**< Level when joystick is to the negative side; max 0xFFFF. */
|
||||
Sint16 right_coeff[3]; /**< How fast to increase the force towards the positive side. */
|
||||
Sint16 left_coeff[3]; /**< How fast to increase the force towards the negative side. */
|
||||
Uint16 deadband[3]; /**< Size of the dead zone. */
|
||||
Uint16 deadband[3]; /**< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. */
|
||||
Sint16 center[3]; /**< Position of the dead zone. */
|
||||
} SDL_HapticCondition;
|
||||
|
||||
@ -678,6 +678,8 @@ typedef struct SDL_HapticLeftRight
|
||||
/**
|
||||
* \brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
|
||||
*
|
||||
* This struct is exclusively for the ::SDL_HAPTIC_CUSTOM effect.
|
||||
*
|
||||
* A custom force feedback effect is much like a periodic effect, where the
|
||||
* application can define its exact shape. You will have to allocate the
|
||||
* data yourself. Data should consist of channels * samples Uint16 samples.
|
||||
@ -806,7 +808,7 @@ typedef union SDL_HapticEffect
|
||||
extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
|
||||
|
||||
/**
|
||||
* \brief Get the implementation dependent name of a Haptic device.
|
||||
* \brief Get the implementation dependent name of a haptic device.
|
||||
*
|
||||
* This can be called before any joysticks are opened.
|
||||
* If no name can be found, this function returns NULL.
|
||||
@ -819,9 +821,9 @@ extern DECLSPEC int SDLCALL SDL_NumHaptics(void);
|
||||
extern DECLSPEC const char *SDLCALL SDL_HapticName(int device_index);
|
||||
|
||||
/**
|
||||
* \brief Opens a Haptic device for usage.
|
||||
* \brief Opens a haptic device for use.
|
||||
*
|
||||
* The index passed as an argument refers to the N'th Haptic device on this
|
||||
* The index passed as an argument refers to the N'th haptic device on this
|
||||
* system.
|
||||
*
|
||||
* When opening a haptic device, its gain will be set to maximum and
|
||||
@ -865,7 +867,7 @@ extern DECLSPEC int SDLCALL SDL_HapticOpened(int device_index);
|
||||
extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
|
||||
|
||||
/**
|
||||
* \brief Gets whether or not the value mouse has haptic capabilities.
|
||||
* \brief Gets whether or not the current mouse has haptic capabilities.
|
||||
*
|
||||
* \return SDL_TRUE if the mouse is haptic, SDL_FALSE if it isn't.
|
||||
*
|
||||
@ -874,7 +876,7 @@ extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic);
|
||||
extern DECLSPEC int SDLCALL SDL_MouseIsHaptic(void);
|
||||
|
||||
/**
|
||||
* \brief Tries to open a haptic device from the value mouse.
|
||||
* \brief Tries to open a haptic device from the current mouse.
|
||||
*
|
||||
* \return The haptic device identifier or NULL on error.
|
||||
*
|
||||
@ -887,17 +889,17 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromMouse(void);
|
||||
* \brief Checks to see if a joystick has haptic features.
|
||||
*
|
||||
* \param joystick Joystick to test for haptic capabilities.
|
||||
* \return 1 if the joystick is haptic, 0 if it isn't
|
||||
* or -1 if an error ocurred.
|
||||
* \return SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't
|
||||
* or -1 if an error occurred.
|
||||
*
|
||||
* \sa SDL_HapticOpenFromJoystick
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* \brief Opens a Haptic device for usage from a Joystick device.
|
||||
* \brief Opens a haptic device for use from a joystick device.
|
||||
*
|
||||
* You must still close the haptic device seperately. It will not be closed
|
||||
* You must still close the haptic device separately. It will not be closed
|
||||
* with the joystick.
|
||||
*
|
||||
* When opening from a joystick you should first close the haptic device before
|
||||
@ -915,7 +917,7 @@ extern DECLSPEC SDL_Haptic *SDLCALL SDL_HapticOpenFromJoystick(SDL_Joystick *
|
||||
joystick);
|
||||
|
||||
/**
|
||||
* \brief Closes a Haptic device previously opened with SDL_HapticOpen().
|
||||
* \brief Closes a haptic device previously opened with SDL_HapticOpen().
|
||||
*
|
||||
* \param haptic Haptic device to close.
|
||||
*/
|
||||
@ -954,12 +956,12 @@ extern DECLSPEC int SDLCALL SDL_HapticNumEffects(SDL_Haptic * haptic);
|
||||
extern DECLSPEC int SDLCALL SDL_HapticNumEffectsPlaying(SDL_Haptic * haptic);
|
||||
|
||||
/**
|
||||
* \brief Gets the haptic devices supported features in bitwise matter.
|
||||
* \brief Gets the haptic device's supported features in bitwise manner.
|
||||
*
|
||||
* Example:
|
||||
* \code
|
||||
* if (SDL_HapticQuery(haptic) & SDL_HAPTIC_CONSTANT) {
|
||||
* printf("We have constant haptic effect!");
|
||||
* printf("We have constant haptic effect!\n");
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
@ -998,7 +1000,7 @@ extern DECLSPEC int SDLCALL SDL_HapticEffectSupported(SDL_Haptic * haptic,
|
||||
*
|
||||
* \param haptic Haptic device to create the effect on.
|
||||
* \param effect Properties of the effect to create.
|
||||
* \return The id of the effect on success or -1 on error.
|
||||
* \return The identifier of the effect on success or -1 on error.
|
||||
*
|
||||
* \sa SDL_HapticUpdateEffect
|
||||
* \sa SDL_HapticRunEffect
|
||||
@ -1010,13 +1012,13 @@ extern DECLSPEC int SDLCALL SDL_HapticNewEffect(SDL_Haptic * haptic,
|
||||
/**
|
||||
* \brief Updates the properties of an effect.
|
||||
*
|
||||
* Can be used dynamically, although behaviour when dynamically changing
|
||||
* Can be used dynamically, although behavior when dynamically changing
|
||||
* direction may be strange. Specifically the effect may reupload itself
|
||||
* and start playing from the start. You cannot change the type either when
|
||||
* running SDL_HapticUpdateEffect().
|
||||
*
|
||||
* \param haptic Haptic device that has the effect.
|
||||
* \param effect Effect to update.
|
||||
* \param effect Identifier of the effect to update.
|
||||
* \param data New effect properties to use.
|
||||
* \return 0 on success or -1 on error.
|
||||
*
|
||||
@ -1078,7 +1080,7 @@ extern DECLSPEC void SDLCALL SDL_HapticDestroyEffect(SDL_Haptic * haptic,
|
||||
int effect);
|
||||
|
||||
/**
|
||||
* \brief Gets the status of the value effect on the haptic device.
|
||||
* \brief Gets the status of the current effect on the haptic device.
|
||||
*
|
||||
* Device must support the ::SDL_HAPTIC_STATUS feature.
|
||||
*
|
||||
@ -1148,7 +1150,7 @@ extern DECLSPEC int SDLCALL SDL_HapticPause(SDL_Haptic * haptic);
|
||||
*
|
||||
* Call to unpause after SDL_HapticPause().
|
||||
*
|
||||
* \param haptic Haptic device to pause.
|
||||
* \param haptic Haptic device to unpause.
|
||||
* \return 0 on success or -1 on error.
|
||||
*
|
||||
* \sa SDL_HapticPause
|
||||
@ -1220,6 +1222,6 @@ extern DECLSPEC int SDLCALL SDL_HapticRumbleStop(SDL_Haptic * haptic);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_haptic_h */
|
||||
#endif /* SDL_haptic_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
959
bsp/simulator/SDL2-2.0.7/include/SDL_hints.h
Normal file
959
bsp/simulator/SDL2-2.0.7/include/SDL_hints.h
Normal file
@ -0,0 +1,959 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_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: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -24,10 +24,10 @@
|
||||
*
|
||||
* Include file for SDL joystick event handling
|
||||
*
|
||||
* The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks, with the exact joystick
|
||||
* The term "device_index" identifies currently plugged in joystick devices between 0 and SDL_NumJoysticks(), with the exact joystick
|
||||
* behind a device_index changing as joysticks are plugged and unplugged.
|
||||
*
|
||||
* The term "instance_id" is the value instantiation of a joystick device in the system, if the joystick is removed and then re-inserted
|
||||
* 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
|
||||
@ -36,8 +36,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_joystick_h
|
||||
#define _SDL_joystick_h
|
||||
#ifndef SDL_joystick_h_
|
||||
#define SDL_joystick_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -60,7 +60,9 @@ extern "C" {
|
||||
* SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
|
||||
*/
|
||||
|
||||
/* The joystick structure used to identify an SDL joystick */
|
||||
/**
|
||||
* The joystick structure used to identify an SDL joystick
|
||||
*/
|
||||
struct _SDL_Joystick;
|
||||
typedef struct _SDL_Joystick SDL_Joystick;
|
||||
|
||||
@ -69,10 +71,55 @@ 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
|
||||
*/
|
||||
@ -85,32 +132,96 @@ extern DECLSPEC int SDLCALL SDL_NumJoysticks(void);
|
||||
*/
|
||||
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 tothe N'th joystick on the system.
|
||||
* This index is the value which will identify this joystick in future joystick
|
||||
* events.
|
||||
* 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 the joystick at this index
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetDeviceGUID(int device_index);
|
||||
|
||||
/**
|
||||
* 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).
|
||||
@ -118,7 +229,7 @@ extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joys
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* convert a string into a joystick formatted guid
|
||||
* Convert a string into a joystick guid
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUIDFromString(const char *pchGUID);
|
||||
|
||||
@ -156,7 +267,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickNumHats(SDL_Joystick * joystick);
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickNumButtons(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Update the value state of the open joysticks.
|
||||
* Update the current state of the open joysticks.
|
||||
*
|
||||
* This is called automatically by the event loop if any joystick
|
||||
* events are enabled.
|
||||
@ -174,8 +285,10 @@ extern DECLSPEC void SDLCALL SDL_JoystickUpdate(void);
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
|
||||
#define SDL_JOYSTICK_AXIS_MAX 32767
|
||||
#define SDL_JOYSTICK_AXIS_MIN -32768
|
||||
/**
|
||||
* Get the value state of an axis control on a joystick.
|
||||
* Get the current state of an axis control on a joystick.
|
||||
*
|
||||
* The state is a value ranging from -32768 to 32767.
|
||||
*
|
||||
@ -184,12 +297,24 @@ extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state);
|
||||
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_UP 0x01
|
||||
#define SDL_HAT_RIGHT 0x02
|
||||
#define SDL_HAT_DOWN 0x04
|
||||
#define SDL_HAT_LEFT 0x08
|
||||
@ -200,7 +325,7 @@ extern DECLSPEC Sint16 SDLCALL SDL_JoystickGetAxis(SDL_Joystick * joystick,
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* Get the value state of a POV hat on a joystick.
|
||||
* Get the current state of a POV hat on a joystick.
|
||||
*
|
||||
* The hat indices start at index 0.
|
||||
*
|
||||
@ -229,7 +354,7 @@ extern DECLSPEC int SDLCALL SDL_JoystickGetBall(SDL_Joystick * joystick,
|
||||
int ball, int *dx, int *dy);
|
||||
|
||||
/**
|
||||
* Get the value state of a button on a joystick.
|
||||
* Get the current state of a button on a joystick.
|
||||
*
|
||||
* The button indices start at index 0.
|
||||
*/
|
||||
@ -241,6 +366,10 @@ extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetButton(SDL_Joystick * joystick,
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
|
||||
|
||||
/**
|
||||
* Return the battery level of this joystick
|
||||
*/
|
||||
extern DECLSPEC SDL_JoystickPowerLevel SDLCALL SDL_JoystickCurrentPowerLevel(SDL_Joystick * joystick);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@ -248,6 +377,6 @@ extern DECLSPEC void SDLCALL SDL_JoystickClose(SDL_Joystick * joystick);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_joystick_h */
|
||||
#endif /* SDL_joystick_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL keyboard event handling
|
||||
*/
|
||||
|
||||
#ifndef _SDL_keyboard_h
|
||||
#define _SDL_keyboard_h
|
||||
#ifndef SDL_keyboard_h_
|
||||
#define SDL_keyboard_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -48,7 +48,7 @@ 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; /**< value key modifiers */
|
||||
Uint16 mod; /**< current key modifiers */
|
||||
Uint32 unused;
|
||||
} SDL_Keysym;
|
||||
|
||||
@ -60,7 +60,7 @@ typedef struct SDL_Keysym
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
|
||||
|
||||
/**
|
||||
* \brief Get a snapshot of the value state of the keyboard.
|
||||
* \brief Get a snapshot of the current state of the keyboard.
|
||||
*
|
||||
* \param numkeys if non-NULL, receives the length of the returned array.
|
||||
*
|
||||
@ -77,12 +77,12 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_GetKeyboardFocus(void);
|
||||
extern DECLSPEC const Uint8 *SDLCALL SDL_GetKeyboardState(int *numkeys);
|
||||
|
||||
/**
|
||||
* \brief Get the value key modifier state for the keyboard.
|
||||
* \brief Get the current key modifier state for the keyboard.
|
||||
*/
|
||||
extern DECLSPEC SDL_Keymod SDLCALL SDL_GetModState(void);
|
||||
|
||||
/**
|
||||
* \brief Set the value key modifier state for the keyboard.
|
||||
* \brief Set the current key modifier state for the keyboard.
|
||||
*
|
||||
* \note This does not change the keyboard state, only the key modifier flags.
|
||||
*/
|
||||
@ -90,7 +90,7 @@ extern DECLSPEC void SDLCALL SDL_SetModState(SDL_Keymod modstate);
|
||||
|
||||
/**
|
||||
* \brief Get the key code corresponding to the given scancode according
|
||||
* to the value keyboard layout.
|
||||
* to the current keyboard layout.
|
||||
*
|
||||
* See ::SDL_Keycode for details.
|
||||
*
|
||||
@ -100,7 +100,7 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromScancode(SDL_Scancode scancode
|
||||
|
||||
/**
|
||||
* \brief Get the scancode corresponding to the given key code according to the
|
||||
* value keyboard layout.
|
||||
* current keyboard layout.
|
||||
*
|
||||
* See ::SDL_Scancode for details.
|
||||
*
|
||||
@ -136,7 +136,7 @@ extern DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *name);
|
||||
* copy it. If the key doesn't have a name, this function returns an
|
||||
* empty string ("").
|
||||
*
|
||||
* \sa SDL_Key
|
||||
* \sa SDL_Keycode
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetKeyName(SDL_Keycode key);
|
||||
|
||||
@ -212,6 +212,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenKeyboardShown(SDL_Window *window);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_keyboard_h */
|
||||
#endif /* SDL_keyboard_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Defines constants which identify keyboard keys and modifiers.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_keycode_h
|
||||
#define _SDL_keycode_h
|
||||
#ifndef SDL_keycode_h_
|
||||
#define SDL_keycode_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_scancode.h"
|
||||
@ -34,10 +34,13 @@
|
||||
/**
|
||||
* \brief The SDL virtual key representation.
|
||||
*
|
||||
* Values of this type are used to represent keyboard keys using the value
|
||||
* Values of this type are used to represent keyboard keys using the current
|
||||
* layout of the keyboard. These values include Unicode values representing
|
||||
* the unmodified character that would be generated by pressing the key, or
|
||||
* an SDLK_* constant for those keys that do not generate characters.
|
||||
*
|
||||
* A special exception is the number keys at the top of the keyboard which
|
||||
* always map to SDLK_0...SDLK_9, regardless of layout.
|
||||
*/
|
||||
typedef Sint32 SDL_Keycode;
|
||||
|
||||
@ -308,7 +311,12 @@ enum
|
||||
SDLK_KBDILLUMDOWN = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMDOWN),
|
||||
SDLK_KBDILLUMUP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_KBDILLUMUP),
|
||||
SDLK_EJECT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_EJECT),
|
||||
SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP)
|
||||
SDLK_SLEEP = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SLEEP),
|
||||
SDLK_APP1 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP1),
|
||||
SDLK_APP2 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_APP2),
|
||||
|
||||
SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
|
||||
SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
|
||||
};
|
||||
|
||||
/**
|
||||
@ -336,6 +344,6 @@ typedef enum
|
||||
#define KMOD_ALT (KMOD_LALT|KMOD_RALT)
|
||||
#define KMOD_GUI (KMOD_LGUI|KMOD_RGUI)
|
||||
|
||||
#endif /* _SDL_keycode_h */
|
||||
#endif /* SDL_keycode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -38,8 +38,8 @@
|
||||
* the results you expect. :)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_loadso_h
|
||||
#define _SDL_loadso_h
|
||||
#ifndef SDL_loadso_h_
|
||||
#define SDL_loadso_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -76,6 +76,6 @@ extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_loadso_h */
|
||||
#endif /* SDL_loadso_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -34,8 +34,8 @@
|
||||
* Others: standard error output (stderr)
|
||||
*/
|
||||
|
||||
#ifndef _SDL_log_h
|
||||
#define _SDL_log_h
|
||||
#ifndef SDL_log_h_
|
||||
#define SDL_log_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -137,44 +137,44 @@ extern DECLSPEC void SDLCALL SDL_LogResetPriorities(void);
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Log(const char *fmt, ...);
|
||||
extern DECLSPEC void SDLCALL SDL_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_VERBOSE
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, const char *fmt, ...);
|
||||
extern DECLSPEC void SDLCALL SDL_LogVerbose(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_DEBUG
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogDebug(int category, const char *fmt, ...);
|
||||
extern DECLSPEC void SDLCALL SDL_LogDebug(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_INFO
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogInfo(int category, const char *fmt, ...);
|
||||
extern DECLSPEC void SDLCALL SDL_LogInfo(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_WARN
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogWarn(int category, const char *fmt, ...);
|
||||
extern DECLSPEC void SDLCALL SDL_LogWarn(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_ERROR
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogError(int category, const char *fmt, ...);
|
||||
extern DECLSPEC void SDLCALL SDL_LogError(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Log a message with SDL_LOG_PRIORITY_CRITICAL
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogCritical(int category, const char *fmt, ...);
|
||||
extern DECLSPEC void SDLCALL SDL_LogCritical(int category, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Log a message with the specified category and priority.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogMessage(int category,
|
||||
SDL_LogPriority priority,
|
||||
const char *fmt, ...);
|
||||
SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(3);
|
||||
|
||||
/**
|
||||
* \brief Log a message with the specified category and priority.
|
||||
@ -186,10 +186,10 @@ extern DECLSPEC void SDLCALL SDL_LogMessageV(int category,
|
||||
/**
|
||||
* \brief The prototype for the log output function
|
||||
*/
|
||||
typedef void (*SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||
typedef void (SDLCALL *SDL_LogOutputFunction)(void *userdata, int category, SDL_LogPriority priority, const char *message);
|
||||
|
||||
/**
|
||||
* \brief Get the value log output function.
|
||||
* \brief Get the current log output function.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_LogGetOutputFunction(SDL_LogOutputFunction *callback, void **userdata);
|
||||
|
||||
@ -206,6 +206,6 @@ extern DECLSPEC void SDLCALL SDL_LogSetOutputFunction(SDL_LogOutputFunction call
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_log_h */
|
||||
#endif /* SDL_log_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_main_h
|
||||
#define _SDL_main_h
|
||||
#ifndef SDL_main_h_
|
||||
#define SDL_main_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -63,10 +63,19 @@
|
||||
/* On Android SDL provides a Java class in SDLActivity.java that is the
|
||||
main activity entry point.
|
||||
|
||||
See README-android.txt for more details on extending that class.
|
||||
See README-android.md for more details on extending that class.
|
||||
*/
|
||||
#define SDL_MAIN_NEEDED
|
||||
|
||||
#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 */
|
||||
|
||||
@ -98,7 +107,7 @@
|
||||
/**
|
||||
* The prototype for the application's main() function
|
||||
*/
|
||||
extern C_LINKAGE int SDL_main(int argc, char *argv[]);
|
||||
extern C_LINKAGE DECLSPEC int SDL_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
@ -133,14 +142,11 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
|
||||
* \brief Initializes and launches an SDL/WinRT application.
|
||||
*
|
||||
* \param mainFunction The SDL app's C-style main().
|
||||
* \param xamlBackgroundPanel An optional, XAML-based, background panel.
|
||||
* For Non-XAML apps, this value must be set to NULL. For XAML apps,
|
||||
* pass in a pointer to a SwapChainBackgroundPanel, casted to an
|
||||
* IInspectable (via reinterpret_cast).
|
||||
* \ret 0 on success, -1 on failure. On failure, use SDL_GetError to retrieve more
|
||||
* \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 * xamlBackgroundPanel);
|
||||
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * reserved);
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
@ -150,6 +156,6 @@ extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), v
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_main_h */
|
||||
#endif /* SDL_main_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_messagebox_h
|
||||
#define _SDL_messagebox_h
|
||||
#ifndef SDL_messagebox_h_
|
||||
#define SDL_messagebox_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_video.h" /* For SDL_Window */
|
||||
@ -139,6 +139,6 @@ extern DECLSPEC int SDLCALL SDL_ShowSimpleMessageBox(Uint32 flags, const char *t
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_messagebox_h */
|
||||
#endif /* SDL_messagebox_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL mouse event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_mouse_h
|
||||
#define _SDL_mouse_h
|
||||
#ifndef SDL_mouse_h_
|
||||
#define SDL_mouse_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -38,10 +38,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct SDL_Cursor SDL_Cursor; /* Implementation dependent */
|
||||
typedef struct SDL_Cursor SDL_Cursor; /**< Implementation dependent */
|
||||
|
||||
/**
|
||||
* \brief Cursor types for SDL_CreateSystemCursor.
|
||||
* \brief Cursor types for SDL_CreateSystemCursor().
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@ -60,6 +60,15 @@ typedef enum
|
||||
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 */
|
||||
|
||||
/**
|
||||
@ -68,19 +77,44 @@ typedef enum
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_GetMouseFocus(void);
|
||||
|
||||
/**
|
||||
* \brief Retrieve the value state of the mouse.
|
||||
* \brief Retrieve the current state of the mouse.
|
||||
*
|
||||
* The value button state is returned as a button bitmask, which can
|
||||
* 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 value button state is returned as a button bitmask, which can
|
||||
* 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().
|
||||
*/
|
||||
@ -89,7 +123,7 @@ 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 value mouse focus
|
||||
* \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
|
||||
*
|
||||
@ -98,6 +132,17 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetRelativeMouseState(int *x, int *y);
|
||||
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.
|
||||
*
|
||||
@ -106,7 +151,7 @@ extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
|
||||
* \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 value window.
|
||||
* driver will try to report continuous motion in the current window.
|
||||
* Only relative motion events will be delivered, the mouse position
|
||||
* will not change.
|
||||
*
|
||||
@ -116,6 +161,37 @@ extern DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window,
|
||||
*/
|
||||
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.
|
||||
*
|
||||
@ -178,16 +254,18 @@ extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetCursor(void);
|
||||
extern DECLSPEC SDL_Cursor *SDLCALL SDL_GetDefaultCursor(void);
|
||||
|
||||
/**
|
||||
* \brief Frees a cursor created with SDL_CreateCursor().
|
||||
* \brief Frees a cursor created with SDL_CreateCursor() or similar functions.
|
||||
*
|
||||
* \sa SDL_CreateCursor()
|
||||
* \sa SDL_CreateColorCursor()
|
||||
* \sa SDL_CreateSystemCursor()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeCursor(SDL_Cursor * cursor);
|
||||
|
||||
/**
|
||||
* \brief Toggle whether or not the cursor is shown.
|
||||
*
|
||||
* \param toggle 1 to show the cursor, 0 to hide it, -1 to query the value
|
||||
* \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.
|
||||
@ -219,6 +297,6 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_mouse_h */
|
||||
#endif /* SDL_mouse_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_mutex_h
|
||||
#define _SDL_mutex_h
|
||||
#ifndef SDL_mutex_h_
|
||||
#define SDL_mutex_h_
|
||||
|
||||
/**
|
||||
* \file SDL_mutex.h
|
||||
@ -84,7 +84,7 @@ extern DECLSPEC int SDLCALL SDL_TryLockMutex(SDL_mutex * mutex);
|
||||
* \return 0, or -1 on error.
|
||||
*
|
||||
* \warning It is an error to unlock a mutex that has not been locked by
|
||||
* the value thread, and doing so results in undefined behavior.
|
||||
* 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);
|
||||
@ -150,7 +150,7 @@ extern DECLSPEC int SDLCALL SDL_SemWaitTimeout(SDL_sem * sem, Uint32 ms);
|
||||
extern DECLSPEC int SDLCALL SDL_SemPost(SDL_sem * sem);
|
||||
|
||||
/**
|
||||
* Returns the value count of the semaphore.
|
||||
* Returns the current count of the semaphore.
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_SemValue(SDL_sem * sem);
|
||||
|
||||
@ -246,6 +246,6 @@ extern DECLSPEC int SDLCALL SDL_CondWaitTimeout(SDL_cond * cond,
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_mutex_h */
|
||||
#endif /* SDL_mutex_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDLname_h_
|
||||
#define _SDLname_h_
|
||||
#ifndef SDLname_h_
|
||||
#define SDLname_h_
|
||||
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define NeedFunctionPrototypes 1
|
||||
@ -28,6 +28,6 @@
|
||||
|
||||
#define SDL_NAME(X) SDL_##X
|
||||
|
||||
#endif /* _SDLname_h_ */
|
||||
#endif /* SDLname_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
2183
bsp/simulator/SDL2-2.0.7/include/SDL_opengl.h
Normal file
2183
bsp/simulator/SDL2-2.0.7/include/SDL_opengl.h
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -24,6 +24,7 @@
|
||||
*
|
||||
* This is a simple file to encapsulate the OpenGL ES 1.X API headers.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#include <OpenGLES/ES1/gl.h>
|
52
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2.h
Normal file
52
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2.h
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_opengles2.h
|
||||
*
|
||||
* This is a simple file to encapsulate the OpenGL ES 2.0 API headers.
|
||||
*/
|
||||
#include "SDL_config.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
|
||||
#ifdef __IPHONEOS__
|
||||
#include <OpenGLES/ES2/gl.h>
|
||||
#include <OpenGLES/ES2/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2platform.h>
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
|
||||
#else /* _MSC_VER */
|
||||
|
||||
/* OpenGL ES2 headers for Visual Studio */
|
||||
#include "SDL_opengles2_khrplatform.h"
|
||||
#include "SDL_opengles2_gl2platform.h"
|
||||
#include "SDL_opengles2_gl2.h"
|
||||
#include "SDL_opengles2_gl2ext.h"
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY GL_APIENTRY
|
||||
#endif
|
621
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2_gl2.h
Normal file
621
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2_gl2.h
Normal file
@ -0,0 +1,621 @@
|
||||
#ifndef __gl2_h_
|
||||
#define __gl2_h_
|
||||
|
||||
/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */
|
||||
|
||||
/*#include <GLES2/gl2platform.h>*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Data type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
typedef void GLvoid;
|
||||
typedef char GLchar;
|
||||
typedef unsigned int GLenum;
|
||||
typedef unsigned char GLboolean;
|
||||
typedef unsigned int GLbitfield;
|
||||
typedef khronos_int8_t GLbyte;
|
||||
typedef short GLshort;
|
||||
typedef int GLint;
|
||||
typedef int GLsizei;
|
||||
typedef khronos_uint8_t GLubyte;
|
||||
typedef unsigned short GLushort;
|
||||
typedef unsigned int GLuint;
|
||||
typedef khronos_float_t GLfloat;
|
||||
typedef khronos_float_t GLclampf;
|
||||
typedef khronos_int32_t GLfixed;
|
||||
|
||||
/* GL types for handling large vertex buffer objects */
|
||||
typedef khronos_intptr_t GLintptr;
|
||||
typedef khronos_ssize_t GLsizeiptr;
|
||||
|
||||
/* OpenGL ES core versions */
|
||||
#define GL_ES_VERSION_2_0 1
|
||||
|
||||
/* ClearBufferMask */
|
||||
#define GL_DEPTH_BUFFER_BIT 0x00000100
|
||||
#define GL_STENCIL_BUFFER_BIT 0x00000400
|
||||
#define GL_COLOR_BUFFER_BIT 0x00004000
|
||||
|
||||
/* Boolean */
|
||||
#define GL_FALSE 0
|
||||
#define GL_TRUE 1
|
||||
|
||||
/* BeginMode */
|
||||
#define GL_POINTS 0x0000
|
||||
#define GL_LINES 0x0001
|
||||
#define GL_LINE_LOOP 0x0002
|
||||
#define GL_LINE_STRIP 0x0003
|
||||
#define GL_TRIANGLES 0x0004
|
||||
#define GL_TRIANGLE_STRIP 0x0005
|
||||
#define GL_TRIANGLE_FAN 0x0006
|
||||
|
||||
/* AlphaFunction (not supported in ES20) */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* BlendingFactorDest */
|
||||
#define GL_ZERO 0
|
||||
#define GL_ONE 1
|
||||
#define GL_SRC_COLOR 0x0300
|
||||
#define GL_ONE_MINUS_SRC_COLOR 0x0301
|
||||
#define GL_SRC_ALPHA 0x0302
|
||||
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
|
||||
#define GL_DST_ALPHA 0x0304
|
||||
#define GL_ONE_MINUS_DST_ALPHA 0x0305
|
||||
|
||||
/* BlendingFactorSrc */
|
||||
/* GL_ZERO */
|
||||
/* GL_ONE */
|
||||
#define GL_DST_COLOR 0x0306
|
||||
#define GL_ONE_MINUS_DST_COLOR 0x0307
|
||||
#define GL_SRC_ALPHA_SATURATE 0x0308
|
||||
/* GL_SRC_ALPHA */
|
||||
/* GL_ONE_MINUS_SRC_ALPHA */
|
||||
/* GL_DST_ALPHA */
|
||||
/* GL_ONE_MINUS_DST_ALPHA */
|
||||
|
||||
/* BlendEquationSeparate */
|
||||
#define GL_FUNC_ADD 0x8006
|
||||
#define GL_BLEND_EQUATION 0x8009
|
||||
#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
|
||||
#define GL_BLEND_EQUATION_ALPHA 0x883D
|
||||
|
||||
/* BlendSubtract */
|
||||
#define GL_FUNC_SUBTRACT 0x800A
|
||||
#define GL_FUNC_REVERSE_SUBTRACT 0x800B
|
||||
|
||||
/* Separate Blend Functions */
|
||||
#define GL_BLEND_DST_RGB 0x80C8
|
||||
#define GL_BLEND_SRC_RGB 0x80C9
|
||||
#define GL_BLEND_DST_ALPHA 0x80CA
|
||||
#define GL_BLEND_SRC_ALPHA 0x80CB
|
||||
#define GL_CONSTANT_COLOR 0x8001
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
#define GL_CONSTANT_ALPHA 0x8003
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_BLEND_COLOR 0x8005
|
||||
|
||||
/* Buffer Objects */
|
||||
#define GL_ARRAY_BUFFER 0x8892
|
||||
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
#define GL_ARRAY_BUFFER_BINDING 0x8894
|
||||
#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
|
||||
|
||||
#define GL_STREAM_DRAW 0x88E0
|
||||
#define GL_STATIC_DRAW 0x88E4
|
||||
#define GL_DYNAMIC_DRAW 0x88E8
|
||||
|
||||
#define GL_BUFFER_SIZE 0x8764
|
||||
#define GL_BUFFER_USAGE 0x8765
|
||||
|
||||
#define GL_CURRENT_VERTEX_ATTRIB 0x8626
|
||||
|
||||
/* CullFaceMode */
|
||||
#define GL_FRONT 0x0404
|
||||
#define GL_BACK 0x0405
|
||||
#define GL_FRONT_AND_BACK 0x0408
|
||||
|
||||
/* DepthFunction */
|
||||
/* GL_NEVER */
|
||||
/* GL_LESS */
|
||||
/* GL_EQUAL */
|
||||
/* GL_LEQUAL */
|
||||
/* GL_GREATER */
|
||||
/* GL_NOTEQUAL */
|
||||
/* GL_GEQUAL */
|
||||
/* GL_ALWAYS */
|
||||
|
||||
/* EnableCap */
|
||||
#define GL_TEXTURE_2D 0x0DE1
|
||||
#define GL_CULL_FACE 0x0B44
|
||||
#define GL_BLEND 0x0BE2
|
||||
#define GL_DITHER 0x0BD0
|
||||
#define GL_STENCIL_TEST 0x0B90
|
||||
#define GL_DEPTH_TEST 0x0B71
|
||||
#define GL_SCISSOR_TEST 0x0C11
|
||||
#define GL_POLYGON_OFFSET_FILL 0x8037
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#define GL_SAMPLE_COVERAGE 0x80A0
|
||||
|
||||
/* ErrorCode */
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_INVALID_ENUM 0x0500
|
||||
#define GL_INVALID_VALUE 0x0501
|
||||
#define GL_INVALID_OPERATION 0x0502
|
||||
#define GL_OUT_OF_MEMORY 0x0505
|
||||
|
||||
/* FrontFaceDirection */
|
||||
#define GL_CW 0x0900
|
||||
#define GL_CCW 0x0901
|
||||
|
||||
/* GetPName */
|
||||
#define GL_LINE_WIDTH 0x0B21
|
||||
#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
|
||||
#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
|
||||
#define GL_CULL_FACE_MODE 0x0B45
|
||||
#define GL_FRONT_FACE 0x0B46
|
||||
#define GL_DEPTH_RANGE 0x0B70
|
||||
#define GL_DEPTH_WRITEMASK 0x0B72
|
||||
#define GL_DEPTH_CLEAR_VALUE 0x0B73
|
||||
#define GL_DEPTH_FUNC 0x0B74
|
||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||
#define GL_STENCIL_FUNC 0x0B92
|
||||
#define GL_STENCIL_FAIL 0x0B94
|
||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||
#define GL_STENCIL_REF 0x0B97
|
||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||
#define GL_STENCIL_BACK_FUNC 0x8800
|
||||
#define GL_STENCIL_BACK_FAIL 0x8801
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
|
||||
#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
|
||||
#define GL_STENCIL_BACK_REF 0x8CA3
|
||||
#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
|
||||
#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
|
||||
#define GL_VIEWPORT 0x0BA2
|
||||
#define GL_SCISSOR_BOX 0x0C10
|
||||
/* GL_SCISSOR_TEST */
|
||||
#define GL_COLOR_CLEAR_VALUE 0x0C22
|
||||
#define GL_COLOR_WRITEMASK 0x0C23
|
||||
#define GL_UNPACK_ALIGNMENT 0x0CF5
|
||||
#define GL_PACK_ALIGNMENT 0x0D05
|
||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_SUBPIXEL_BITS 0x0D50
|
||||
#define GL_RED_BITS 0x0D52
|
||||
#define GL_GREEN_BITS 0x0D53
|
||||
#define GL_BLUE_BITS 0x0D54
|
||||
#define GL_ALPHA_BITS 0x0D55
|
||||
#define GL_DEPTH_BITS 0x0D56
|
||||
#define GL_STENCIL_BITS 0x0D57
|
||||
#define GL_POLYGON_OFFSET_UNITS 0x2A00
|
||||
/* GL_POLYGON_OFFSET_FILL */
|
||||
#define GL_POLYGON_OFFSET_FACTOR 0x8038
|
||||
#define GL_TEXTURE_BINDING_2D 0x8069
|
||||
#define GL_SAMPLE_BUFFERS 0x80A8
|
||||
#define GL_SAMPLES 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
|
||||
|
||||
/* GetTextureParameter */
|
||||
/* GL_TEXTURE_MAG_FILTER */
|
||||
/* GL_TEXTURE_MIN_FILTER */
|
||||
/* GL_TEXTURE_WRAP_S */
|
||||
/* GL_TEXTURE_WRAP_T */
|
||||
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
|
||||
|
||||
/* HintMode */
|
||||
#define GL_DONT_CARE 0x1100
|
||||
#define GL_FASTEST 0x1101
|
||||
#define GL_NICEST 0x1102
|
||||
|
||||
/* HintTarget */
|
||||
#define GL_GENERATE_MIPMAP_HINT 0x8192
|
||||
|
||||
/* DataType */
|
||||
#define GL_BYTE 0x1400
|
||||
#define GL_UNSIGNED_BYTE 0x1401
|
||||
#define GL_SHORT 0x1402
|
||||
#define GL_UNSIGNED_SHORT 0x1403
|
||||
#define GL_INT 0x1404
|
||||
#define GL_UNSIGNED_INT 0x1405
|
||||
#define GL_FLOAT 0x1406
|
||||
#define GL_FIXED 0x140C
|
||||
|
||||
/* PixelFormat */
|
||||
#define GL_DEPTH_COMPONENT 0x1902
|
||||
#define GL_ALPHA 0x1906
|
||||
#define GL_RGB 0x1907
|
||||
#define GL_RGBA 0x1908
|
||||
#define GL_LUMINANCE 0x1909
|
||||
#define GL_LUMINANCE_ALPHA 0x190A
|
||||
|
||||
/* PixelType */
|
||||
/* GL_UNSIGNED_BYTE */
|
||||
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
|
||||
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
|
||||
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
|
||||
|
||||
/* Shaders */
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
#define GL_VERTEX_SHADER 0x8B31
|
||||
#define GL_MAX_VERTEX_ATTRIBS 0x8869
|
||||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VARYING_VECTORS 0x8DFC
|
||||
#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
|
||||
#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
|
||||
#define GL_SHADER_TYPE 0x8B4F
|
||||
#define GL_DELETE_STATUS 0x8B80
|
||||
#define GL_LINK_STATUS 0x8B82
|
||||
#define GL_VALIDATE_STATUS 0x8B83
|
||||
#define GL_ATTACHED_SHADERS 0x8B85
|
||||
#define GL_ACTIVE_UNIFORMS 0x8B86
|
||||
#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
|
||||
#define GL_ACTIVE_ATTRIBUTES 0x8B89
|
||||
#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
|
||||
#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
|
||||
#define GL_CURRENT_PROGRAM 0x8B8D
|
||||
|
||||
/* StencilFunction */
|
||||
#define GL_NEVER 0x0200
|
||||
#define GL_LESS 0x0201
|
||||
#define GL_EQUAL 0x0202
|
||||
#define GL_LEQUAL 0x0203
|
||||
#define GL_GREATER 0x0204
|
||||
#define GL_NOTEQUAL 0x0205
|
||||
#define GL_GEQUAL 0x0206
|
||||
#define GL_ALWAYS 0x0207
|
||||
|
||||
/* StencilOp */
|
||||
/* GL_ZERO */
|
||||
#define GL_KEEP 0x1E00
|
||||
#define GL_REPLACE 0x1E01
|
||||
#define GL_INCR 0x1E02
|
||||
#define GL_DECR 0x1E03
|
||||
#define GL_INVERT 0x150A
|
||||
#define GL_INCR_WRAP 0x8507
|
||||
#define GL_DECR_WRAP 0x8508
|
||||
|
||||
/* StringName */
|
||||
#define GL_VENDOR 0x1F00
|
||||
#define GL_RENDERER 0x1F01
|
||||
#define GL_VERSION 0x1F02
|
||||
#define GL_EXTENSIONS 0x1F03
|
||||
|
||||
/* TextureMagFilter */
|
||||
#define GL_NEAREST 0x2600
|
||||
#define GL_LINEAR 0x2601
|
||||
|
||||
/* TextureMinFilter */
|
||||
/* GL_NEAREST */
|
||||
/* GL_LINEAR */
|
||||
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
|
||||
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
|
||||
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
|
||||
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||
|
||||
/* TextureParameterName */
|
||||
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_WRAP_S 0x2802
|
||||
#define GL_TEXTURE_WRAP_T 0x2803
|
||||
|
||||
/* TextureTarget */
|
||||
/* GL_TEXTURE_2D */
|
||||
#define GL_TEXTURE 0x1702
|
||||
|
||||
#define GL_TEXTURE_CUBE_MAP 0x8513
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
|
||||
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
|
||||
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
|
||||
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
|
||||
|
||||
/* TextureUnit */
|
||||
#define GL_TEXTURE0 0x84C0
|
||||
#define GL_TEXTURE1 0x84C1
|
||||
#define GL_TEXTURE2 0x84C2
|
||||
#define GL_TEXTURE3 0x84C3
|
||||
#define GL_TEXTURE4 0x84C4
|
||||
#define GL_TEXTURE5 0x84C5
|
||||
#define GL_TEXTURE6 0x84C6
|
||||
#define GL_TEXTURE7 0x84C7
|
||||
#define GL_TEXTURE8 0x84C8
|
||||
#define GL_TEXTURE9 0x84C9
|
||||
#define GL_TEXTURE10 0x84CA
|
||||
#define GL_TEXTURE11 0x84CB
|
||||
#define GL_TEXTURE12 0x84CC
|
||||
#define GL_TEXTURE13 0x84CD
|
||||
#define GL_TEXTURE14 0x84CE
|
||||
#define GL_TEXTURE15 0x84CF
|
||||
#define GL_TEXTURE16 0x84D0
|
||||
#define GL_TEXTURE17 0x84D1
|
||||
#define GL_TEXTURE18 0x84D2
|
||||
#define GL_TEXTURE19 0x84D3
|
||||
#define GL_TEXTURE20 0x84D4
|
||||
#define GL_TEXTURE21 0x84D5
|
||||
#define GL_TEXTURE22 0x84D6
|
||||
#define GL_TEXTURE23 0x84D7
|
||||
#define GL_TEXTURE24 0x84D8
|
||||
#define GL_TEXTURE25 0x84D9
|
||||
#define GL_TEXTURE26 0x84DA
|
||||
#define GL_TEXTURE27 0x84DB
|
||||
#define GL_TEXTURE28 0x84DC
|
||||
#define GL_TEXTURE29 0x84DD
|
||||
#define GL_TEXTURE30 0x84DE
|
||||
#define GL_TEXTURE31 0x84DF
|
||||
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||
|
||||
/* TextureWrapMode */
|
||||
#define GL_REPEAT 0x2901
|
||||
#define GL_CLAMP_TO_EDGE 0x812F
|
||||
#define GL_MIRRORED_REPEAT 0x8370
|
||||
|
||||
/* Uniform Types */
|
||||
#define GL_FLOAT_VEC2 0x8B50
|
||||
#define GL_FLOAT_VEC3 0x8B51
|
||||
#define GL_FLOAT_VEC4 0x8B52
|
||||
#define GL_INT_VEC2 0x8B53
|
||||
#define GL_INT_VEC3 0x8B54
|
||||
#define GL_INT_VEC4 0x8B55
|
||||
#define GL_BOOL 0x8B56
|
||||
#define GL_BOOL_VEC2 0x8B57
|
||||
#define GL_BOOL_VEC3 0x8B58
|
||||
#define GL_BOOL_VEC4 0x8B59
|
||||
#define GL_FLOAT_MAT2 0x8B5A
|
||||
#define GL_FLOAT_MAT3 0x8B5B
|
||||
#define GL_FLOAT_MAT4 0x8B5C
|
||||
#define GL_SAMPLER_2D 0x8B5E
|
||||
#define GL_SAMPLER_CUBE 0x8B60
|
||||
|
||||
/* Vertex Arrays */
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
|
||||
|
||||
/* Read Format */
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
|
||||
#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
|
||||
|
||||
/* Shader Source */
|
||||
#define GL_COMPILE_STATUS 0x8B81
|
||||
#define GL_INFO_LOG_LENGTH 0x8B84
|
||||
#define GL_SHADER_SOURCE_LENGTH 0x8B88
|
||||
#define GL_SHADER_COMPILER 0x8DFA
|
||||
|
||||
/* Shader Binary */
|
||||
#define GL_SHADER_BINARY_FORMATS 0x8DF8
|
||||
#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
|
||||
|
||||
/* Shader Precision-Specified Types */
|
||||
#define GL_LOW_FLOAT 0x8DF0
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_HIGH_FLOAT 0x8DF2
|
||||
#define GL_LOW_INT 0x8DF3
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_HIGH_INT 0x8DF5
|
||||
|
||||
/* Framebuffer Object. */
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
|
||||
#define GL_RGBA4 0x8056
|
||||
#define GL_RGB5_A1 0x8057
|
||||
#define GL_RGB565 0x8D62
|
||||
#define GL_DEPTH_COMPONENT16 0x81A5
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
|
||||
#define GL_NONE 0
|
||||
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* GL core functions.
|
||||
*-----------------------------------------------------------------------*/
|
||||
|
||||
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
|
||||
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
|
||||
GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode );
|
||||
GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
|
||||
GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
|
||||
GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
|
||||
GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
|
||||
GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glClear (GLbitfield mask);
|
||||
GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth);
|
||||
GL_APICALL void GL_APIENTRY glClearStencil (GLint s);
|
||||
GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
|
||||
GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateProgram (void);
|
||||
GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type);
|
||||
GL_APICALL void GL_APIENTRY glCullFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func);
|
||||
GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag);
|
||||
GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
|
||||
GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
|
||||
GL_APICALL void GL_APIENTRY glDisable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
|
||||
GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
|
||||
GL_APICALL void GL_APIENTRY glEnable (GLenum cap);
|
||||
GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index);
|
||||
GL_APICALL void GL_APIENTRY glFinish (void);
|
||||
GL_APICALL void GL_APIENTRY glFlush (void);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
|
||||
GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode);
|
||||
GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
|
||||
GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target);
|
||||
GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
|
||||
GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
|
||||
GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
|
||||
GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL GLenum GL_APIENTRY glGetError (void);
|
||||
GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
|
||||
GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
|
||||
GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
|
||||
GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
|
||||
GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader);
|
||||
GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture);
|
||||
GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width);
|
||||
GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
|
||||
GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
|
||||
GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void);
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
|
||||
GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
|
||||
GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
|
||||
GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
|
||||
GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
|
||||
GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
|
||||
GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x);
|
||||
GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
|
||||
GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
|
||||
GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
|
||||
GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
|
||||
GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
|
||||
GL_APICALL void GL_APIENTRY glUseProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
|
||||
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
|
||||
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __gl2_h_ */
|
||||
|
File diff suppressed because it is too large
Load Diff
30
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2_gl2platform.h
Normal file
30
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2_gl2platform.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef __gl2platform_h_
|
||||
#define __gl2platform_h_
|
||||
|
||||
/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
|
||||
|
||||
/*
|
||||
* This document is licensed under the SGI Free Software B License Version
|
||||
* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
|
||||
*/
|
||||
|
||||
/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h
|
||||
*
|
||||
* Adopters may modify khrplatform.h and this file to suit their platform.
|
||||
* You are encouraged to submit all modifications to the Khronos group so that
|
||||
* they can be included in future versions of this file. Please submit changes
|
||||
* by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
|
||||
* by filing a bug against product "OpenGL-ES" component "Registry".
|
||||
*/
|
||||
|
||||
/*#include <KHR/khrplatform.h>*/
|
||||
|
||||
#ifndef GL_APICALL
|
||||
#define GL_APICALL KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
#ifndef GL_APIENTRY
|
||||
#define GL_APIENTRY KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
#endif /* __gl2platform_h_ */
|
282
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2_khrplatform.h
Normal file
282
bsp/simulator/SDL2-2.0.7/include/SDL_opengles2_khrplatform.h
Normal file
@ -0,0 +1,282 @@
|
||||
#ifndef __khrplatform_h_
|
||||
#define __khrplatform_h_
|
||||
|
||||
/*
|
||||
** Copyright (c) 2008-2009 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Khronos platform-specific types and definitions.
|
||||
*
|
||||
* $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $
|
||||
*
|
||||
* Adopters may modify this file to suit their platform. Adopters are
|
||||
* encouraged to submit platform specific modifications to the Khronos
|
||||
* group so that they can be included in future versions of this file.
|
||||
* Please submit changes by sending them to the public Khronos Bugzilla
|
||||
* (http://khronos.org/bugzilla) by filing a bug against product
|
||||
* "Khronos (general)" component "Registry".
|
||||
*
|
||||
* A predefined template which fills in some of the bug fields can be
|
||||
* reached using http://tinyurl.com/khrplatform-h-bugreport, but you
|
||||
* must create a Bugzilla login first.
|
||||
*
|
||||
*
|
||||
* See the Implementer's Guidelines for information about where this file
|
||||
* should be located on your system and for more details of its use:
|
||||
* http://www.khronos.org/registry/implementers_guide.pdf
|
||||
*
|
||||
* This file should be included as
|
||||
* #include <KHR/khrplatform.h>
|
||||
* by Khronos client API header files that use its types and defines.
|
||||
*
|
||||
* The types in khrplatform.h should only be used to define API-specific types.
|
||||
*
|
||||
* Types defined in khrplatform.h:
|
||||
* khronos_int8_t signed 8 bit
|
||||
* khronos_uint8_t unsigned 8 bit
|
||||
* khronos_int16_t signed 16 bit
|
||||
* khronos_uint16_t unsigned 16 bit
|
||||
* khronos_int32_t signed 32 bit
|
||||
* khronos_uint32_t unsigned 32 bit
|
||||
* khronos_int64_t signed 64 bit
|
||||
* khronos_uint64_t unsigned 64 bit
|
||||
* khronos_intptr_t signed same number of bits as a pointer
|
||||
* khronos_uintptr_t unsigned same number of bits as a pointer
|
||||
* khronos_ssize_t signed size
|
||||
* khronos_usize_t unsigned size
|
||||
* khronos_float_t signed 32 bit floating point
|
||||
* khronos_time_ns_t unsigned 64 bit time in nanoseconds
|
||||
* khronos_utime_nanoseconds_t unsigned time interval or absolute time in
|
||||
* nanoseconds
|
||||
* khronos_stime_nanoseconds_t signed time interval in nanoseconds
|
||||
* khronos_boolean_enum_t enumerated boolean type. This should
|
||||
* only be used as a base type when a client API's boolean type is
|
||||
* an enum. Client APIs which use an integer or other type for
|
||||
* booleans cannot use this as the base type for their boolean.
|
||||
*
|
||||
* Tokens defined in khrplatform.h:
|
||||
*
|
||||
* KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
|
||||
*
|
||||
* KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
|
||||
* KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
|
||||
*
|
||||
* Calling convention macros defined in this file:
|
||||
* KHRONOS_APICALL
|
||||
* KHRONOS_APIENTRY
|
||||
* KHRONOS_APIATTRIBUTES
|
||||
*
|
||||
* These may be used in function prototypes as:
|
||||
*
|
||||
* KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
|
||||
* int arg1,
|
||||
* int arg2) KHRONOS_APIATTRIBUTES;
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APICALL
|
||||
*-------------------------------------------------------------------------
|
||||
* This precedes the return type of the function in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
# define KHRONOS_APICALL __declspec(dllimport)
|
||||
#elif defined (__SYMBIAN32__)
|
||||
# define KHRONOS_APICALL IMPORT_C
|
||||
#else
|
||||
# define KHRONOS_APICALL
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIENTRY
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the return type of the function and precedes the function
|
||||
* name in the function prototype.
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
|
||||
/* Win32 but not WinCE */
|
||||
# define KHRONOS_APIENTRY __stdcall
|
||||
#else
|
||||
# define KHRONOS_APIENTRY
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Definition of KHRONOS_APIATTRIBUTES
|
||||
*-------------------------------------------------------------------------
|
||||
* This follows the closing parenthesis of the function prototype arguments.
|
||||
*/
|
||||
#if defined (__ARMCC_2__)
|
||||
#define KHRONOS_APIATTRIBUTES __softfp
|
||||
#else
|
||||
#define KHRONOS_APIATTRIBUTES
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* basic type definitions
|
||||
*-----------------------------------------------------------------------*/
|
||||
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
|
||||
|
||||
|
||||
/*
|
||||
* Using <stdint.h>
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__VMS ) || defined(__sgi)
|
||||
|
||||
/*
|
||||
* Using <inttypes.h>
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
|
||||
|
||||
/*
|
||||
* Win32
|
||||
*/
|
||||
typedef __int32 khronos_int32_t;
|
||||
typedef unsigned __int32 khronos_uint32_t;
|
||||
typedef __int64 khronos_int64_t;
|
||||
typedef unsigned __int64 khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
|
||||
/*
|
||||
* Sun or Digital
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
typedef long int khronos_int64_t;
|
||||
typedef unsigned long int khronos_uint64_t;
|
||||
#else
|
||||
typedef long long int khronos_int64_t;
|
||||
typedef unsigned long long int khronos_uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#elif 0
|
||||
|
||||
/*
|
||||
* Hypothetical platform with no float or int64 support
|
||||
*/
|
||||
typedef int khronos_int32_t;
|
||||
typedef unsigned int khronos_uint32_t;
|
||||
#define KHRONOS_SUPPORT_INT64 0
|
||||
#define KHRONOS_SUPPORT_FLOAT 0
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Generic fallback
|
||||
*/
|
||||
#include <stdint.h>
|
||||
typedef int32_t khronos_int32_t;
|
||||
typedef uint32_t khronos_uint32_t;
|
||||
typedef int64_t khronos_int64_t;
|
||||
typedef uint64_t khronos_uint64_t;
|
||||
#define KHRONOS_SUPPORT_INT64 1
|
||||
#define KHRONOS_SUPPORT_FLOAT 1
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Types that are (so far) the same on all platforms
|
||||
*/
|
||||
typedef signed char khronos_int8_t;
|
||||
typedef unsigned char khronos_uint8_t;
|
||||
typedef signed short int khronos_int16_t;
|
||||
typedef unsigned short int khronos_uint16_t;
|
||||
|
||||
/*
|
||||
* Types that differ between LLP64 and LP64 architectures - in LLP64,
|
||||
* pointers are 64 bits, but 'long' is still 32 bits. Win64 appears
|
||||
* to be the only LLP64 architecture in current use.
|
||||
*/
|
||||
#ifdef _WIN64
|
||||
typedef signed long long int khronos_intptr_t;
|
||||
typedef unsigned long long int khronos_uintptr_t;
|
||||
typedef signed long long int khronos_ssize_t;
|
||||
typedef unsigned long long int khronos_usize_t;
|
||||
#else
|
||||
typedef signed long int khronos_intptr_t;
|
||||
typedef unsigned long int khronos_uintptr_t;
|
||||
typedef signed long int khronos_ssize_t;
|
||||
typedef unsigned long int khronos_usize_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_FLOAT
|
||||
/*
|
||||
* Float type
|
||||
*/
|
||||
typedef float khronos_float_t;
|
||||
#endif
|
||||
|
||||
#if KHRONOS_SUPPORT_INT64
|
||||
/* Time types
|
||||
*
|
||||
* These types can be used to represent a time interval in nanoseconds or
|
||||
* an absolute Unadjusted System Time. Unadjusted System Time is the number
|
||||
* of nanoseconds since some arbitrary system event (e.g. since the last
|
||||
* time the system booted). The Unadjusted System Time is an unsigned
|
||||
* 64 bit value that wraps back to 0 every 584 years. Time intervals
|
||||
* may be either signed or unsigned.
|
||||
*/
|
||||
typedef khronos_uint64_t khronos_utime_nanoseconds_t;
|
||||
typedef khronos_int64_t khronos_stime_nanoseconds_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Dummy value used to pad enum types to 32 bits.
|
||||
*/
|
||||
#ifndef KHRONOS_MAX_ENUM
|
||||
#define KHRONOS_MAX_ENUM 0x7FFFFFFF
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Enumerated boolean type
|
||||
*
|
||||
* Values other than zero should be considered to be true. Therefore
|
||||
* comparisons should not be made against KHRONOS_TRUE.
|
||||
*/
|
||||
typedef enum {
|
||||
KHRONOS_FALSE = 0,
|
||||
KHRONOS_TRUE = 1,
|
||||
KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
|
||||
} khronos_boolean_enum_t;
|
||||
|
||||
#endif /* __khrplatform_h_ */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,10 +25,11 @@
|
||||
* Header for the enumerated pixel format definitions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_pixels_h
|
||||
#define _SDL_pixels_h
|
||||
#ifndef SDL_pixels_h_
|
||||
#define SDL_pixels_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_endian.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -86,6 +87,8 @@ enum
|
||||
};
|
||||
|
||||
/** Array component order, low byte -> high byte. */
|
||||
/* !!! FIXME: in 2.1, make these not overlap differently with
|
||||
!!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
|
||||
enum
|
||||
{
|
||||
SDL_ARRAYORDER_NONE,
|
||||
@ -134,12 +137,31 @@ enum
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX4) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_INDEX8)))
|
||||
|
||||
#define SDL_ISPIXELFORMAT_ALPHA(format) \
|
||||
#define SDL_ISPIXELFORMAT_PACKED(format) \
|
||||
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
||||
((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED8) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED16) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_PACKED32)))
|
||||
|
||||
#define SDL_ISPIXELFORMAT_ARRAY(format) \
|
||||
(!SDL_ISPIXELFORMAT_FOURCC(format) && \
|
||||
((SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU8) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU16) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYU32) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF16) || \
|
||||
(SDL_PIXELTYPE(format) == SDL_PIXELTYPE_ARRAYF32)))
|
||||
|
||||
#define SDL_ISPIXELFORMAT_ALPHA(format) \
|
||||
((SDL_ISPIXELFORMAT_PACKED(format) && \
|
||||
((SDL_PIXELORDER(format) == SDL_PACKEDORDER_ARGB) || \
|
||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_RGBA) || \
|
||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_ABGR) || \
|
||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA)))
|
||||
(SDL_PIXELORDER(format) == SDL_PACKEDORDER_BGRA))) || \
|
||||
(SDL_ISPIXELFORMAT_ARRAY(format) && \
|
||||
((SDL_PIXELORDER(format) == SDL_ARRAYORDER_ARGB) || \
|
||||
(SDL_PIXELORDER(format) == SDL_ARRAYORDER_RGBA) || \
|
||||
(SDL_PIXELORDER(format) == SDL_ARRAYORDER_ABGR) || \
|
||||
(SDL_PIXELORDER(format) == SDL_ARRAYORDER_BGRA))))
|
||||
|
||||
/* The flag is set to 1 because 0x1? is not in the printable ASCII range */
|
||||
#define SDL_ISPIXELFORMAT_FOURCC(format) \
|
||||
@ -239,6 +261,19 @@ enum
|
||||
SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_ARGB,
|
||||
SDL_PACKEDLAYOUT_2101010, 32, 4),
|
||||
|
||||
/* Aliases for RGBA byte arrays of color data, for the current platform */
|
||||
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_RGBA8888,
|
||||
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_ARGB8888,
|
||||
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_BGRA8888,
|
||||
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_ABGR8888,
|
||||
#else
|
||||
SDL_PIXELFORMAT_RGBA32 = SDL_PIXELFORMAT_ABGR8888,
|
||||
SDL_PIXELFORMAT_ARGB32 = SDL_PIXELFORMAT_BGRA8888,
|
||||
SDL_PIXELFORMAT_BGRA32 = SDL_PIXELFORMAT_ARGB8888,
|
||||
SDL_PIXELFORMAT_ABGR32 = SDL_PIXELFORMAT_RGBA8888,
|
||||
#endif
|
||||
|
||||
SDL_PIXELFORMAT_YV12 = /**< Planar mode: Y + V + U (3 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
|
||||
SDL_PIXELFORMAT_IYUV = /**< Planar mode: Y + U + V (3 planes) */
|
||||
@ -248,7 +283,11 @@ enum
|
||||
SDL_PIXELFORMAT_UYVY = /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
|
||||
SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
|
||||
SDL_PIXELFORMAT_YVYU = /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
|
||||
SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U')
|
||||
SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
|
||||
SDL_PIXELFORMAT_NV12 = /**< Planar mode: Y + U/V interleaved (2 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '1', '2'),
|
||||
SDL_PIXELFORMAT_NV21 = /**< Planar mode: Y + V/U interleaved (2 planes) */
|
||||
SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1')
|
||||
};
|
||||
|
||||
typedef struct SDL_Color
|
||||
@ -424,6 +463,6 @@ extern DECLSPEC void SDLCALL SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_pixels_h */
|
||||
#endif /* SDL_pixels_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Try to get a standard set of platform defines.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_platform_h
|
||||
#define _SDL_platform_h
|
||||
#ifndef SDL_platform_h_
|
||||
#define SDL_platform_h_
|
||||
|
||||
#if defined(_AIX)
|
||||
#undef __AIX__
|
||||
@ -56,7 +56,7 @@
|
||||
#undef __IRIX__
|
||||
#define __IRIX__ 1
|
||||
#endif
|
||||
#if defined(linux) || defined(__linux) || defined(__linux__)
|
||||
#if (defined(linux) || defined(__linux) || defined(__linux__))
|
||||
#undef __LINUX__
|
||||
#define __LINUX__ 1
|
||||
#endif
|
||||
@ -70,18 +70,22 @@
|
||||
/* lets us know what version of Mac OS X we're compiling on */
|
||||
#include "AvailabilityMacros.h"
|
||||
#include "TargetConditionals.h"
|
||||
#if TARGET_OS_TV
|
||||
#undef __TVOS__
|
||||
#define __TVOS__ 1
|
||||
#endif
|
||||
#if TARGET_OS_IPHONE
|
||||
/* if compiling for iPhone */
|
||||
/* if compiling for iOS */
|
||||
#undef __IPHONEOS__
|
||||
#define __IPHONEOS__ 1
|
||||
#undef __MACOSX__
|
||||
#else
|
||||
/* if not compiling for iPhone */
|
||||
/* if not compiling for iOS */
|
||||
#undef __MACOSX__
|
||||
#define __MACOSX__ 1
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||
# error SDL for Mac OS X only supports deploying on 10.5 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1050 */
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
# error SDL for Mac OS X only supports deploying on 10.6 and above.
|
||||
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < 1060 */
|
||||
#endif /* TARGET_OS_IPHONE */
|
||||
#endif /* defined(__APPLE__) */
|
||||
|
||||
@ -93,7 +97,7 @@
|
||||
#undef __OPENBSD__
|
||||
#define __OPENBSD__ 1
|
||||
#endif
|
||||
#if defined(__OS2__)
|
||||
#if defined(__OS2__) || defined(__EMX__)
|
||||
#undef __OS2__
|
||||
#define __OS2__ 1
|
||||
#endif
|
||||
@ -109,28 +113,36 @@
|
||||
#undef __RISCOS__
|
||||
#define __RISCOS__ 1
|
||||
#endif
|
||||
#if defined(__SVR4)
|
||||
#if defined(__sun) && defined(__SVR4)
|
||||
#undef __SOLARIS__
|
||||
#define __SOLARIS__ 1
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
/* Try to find out if we're compiling for WinRT or non-WinRT */
|
||||
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
|
||||
#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
|
||||
#if defined(_MSC_VER) && defined(__has_include)
|
||||
#define HAVE_WINAPIFAMILY_H __has_include(<winapifamily.h>)
|
||||
/* If _USING_V110_SDK71_ is defined it means we are using the Windows XP toolset. */
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1700 && !_USING_V110_SDK71_) /* _MSC_VER == 1700 for Visual Studio 2012 */
|
||||
#define HAVE_WINAPIFAMILY_H 1
|
||||
#else
|
||||
#define HAVE_WINAPIFAMILY_H 0
|
||||
#endif
|
||||
|
||||
#if HAVE_WINAPIFAMILY_H
|
||||
#include <winapifamily.h>
|
||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||
#undef __WINDOWS__
|
||||
#define __WINDOWS__ 1
|
||||
/* See if we're compiling for WinRT: */
|
||||
#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
|
||||
#define WINAPI_FAMILY_WINRT (!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP))
|
||||
#else
|
||||
#define WINAPI_FAMILY_WINRT 0
|
||||
#endif /* HAVE_WINAPIFAMILY_H */
|
||||
|
||||
#if WINAPI_FAMILY_WINRT
|
||||
#undef __WINRT__
|
||||
#define __WINRT__ 1
|
||||
#endif
|
||||
#else
|
||||
#undef __WINDOWS__
|
||||
#define __WINDOWS__ 1
|
||||
#endif /* _MSC_VER < 1700 */
|
||||
#define __WINDOWS__ 1
|
||||
#endif
|
||||
#endif /* defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) */
|
||||
|
||||
#if defined(__WINDOWS__)
|
||||
@ -142,6 +154,23 @@
|
||||
#define __PSP__ 1
|
||||
#endif
|
||||
|
||||
/* The NACL compiler defines __native_client__ and __pnacl__
|
||||
* Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
|
||||
*/
|
||||
#if defined(__native_client__)
|
||||
#undef __LINUX__
|
||||
#undef __NACL__
|
||||
#define __NACL__ 1
|
||||
#endif
|
||||
#if defined(__pnacl__)
|
||||
#undef __LINUX__
|
||||
#undef __PNACL__
|
||||
#define __PNACL__ 1
|
||||
/* PNACL with newlib supports static linking only */
|
||||
#define __SDL_NOGETPROCADDR__
|
||||
#endif
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@ -159,6 +188,6 @@ extern DECLSPEC const char * SDLCALL SDL_GetPlatform (void);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_platform_h */
|
||||
#endif /* SDL_platform_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_power_h
|
||||
#define _SDL_power_h
|
||||
#ifndef SDL_power_h_
|
||||
#define SDL_power_h_
|
||||
|
||||
/**
|
||||
* \file SDL_power.h
|
||||
@ -50,7 +50,7 @@ typedef enum
|
||||
|
||||
|
||||
/**
|
||||
* \brief Get the value power supply details.
|
||||
* \brief Get the current power supply details.
|
||||
*
|
||||
* \param secs Seconds of battery life left. You can pass a NULL here if
|
||||
* you don't care. Will return -1 if we can't determine a
|
||||
@ -70,6 +70,6 @@ extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_power_h */
|
||||
#endif /* SDL_power_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL quit event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_quit_h
|
||||
#define _SDL_quit_h
|
||||
#ifndef SDL_quit_h_
|
||||
#define SDL_quit_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -55,4 +55,4 @@
|
||||
#define SDL_QuitRequested() \
|
||||
(SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
|
||||
|
||||
#endif /* _SDL_quit_h */
|
||||
#endif /* SDL_quit_h_ */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Header file for SDL_rect definition and management functions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_rect_h
|
||||
#define _SDL_rect_h
|
||||
#ifndef SDL_rect_h_
|
||||
#define SDL_rect_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -43,6 +43,7 @@ extern "C" {
|
||||
* \brief The structure that defines a point
|
||||
*
|
||||
* \sa SDL_EnclosePoints
|
||||
* \sa SDL_PointInRect
|
||||
*/
|
||||
typedef struct SDL_Point
|
||||
{
|
||||
@ -66,6 +67,15 @@ typedef struct SDL_Rect
|
||||
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.
|
||||
*/
|
||||
@ -133,6 +143,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_rect_h */
|
||||
#endif /* SDL_rect_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -45,8 +45,8 @@
|
||||
* See this bug for details: http://bugzilla.libsdl.org/show_bug.cgi?id=1995
|
||||
*/
|
||||
|
||||
#ifndef _SDL_render_h
|
||||
#define _SDL_render_h
|
||||
#ifndef SDL_render_h_
|
||||
#define SDL_render_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_rect.h"
|
||||
@ -81,8 +81,8 @@ typedef struct SDL_RendererInfo
|
||||
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 maximimum texture width */
|
||||
int max_texture_height; /**< The maximimum texture height */
|
||||
int max_texture_width; /**< The maximum texture width */
|
||||
int max_texture_height; /**< The maximum texture height */
|
||||
} SDL_RendererInfo;
|
||||
|
||||
/**
|
||||
@ -131,7 +131,7 @@ typedef struct SDL_Texture SDL_Texture;
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* \brief Get the number of 2D rendering drivers available for the value
|
||||
* \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
|
||||
@ -144,7 +144,7 @@ typedef struct SDL_Texture SDL_Texture;
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
|
||||
|
||||
/**
|
||||
* \brief Get information about a specific 2D rendering driver for the value
|
||||
* \brief Get information about a specific 2D rendering driver for the current
|
||||
* display.
|
||||
*
|
||||
* \param index The index of the driver to query information about.
|
||||
@ -215,7 +215,7 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer * renderer,
|
||||
SDL_RendererInfo * info);
|
||||
|
||||
/**
|
||||
* \brief Get the output size of a rendering context.
|
||||
* \brief Get the output size in pixels of a rendering context.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
||||
int *w, int *h);
|
||||
@ -229,10 +229,12 @@ extern DECLSPEC int SDLCALL SDL_GetRendererOutputSize(SDL_Renderer * renderer,
|
||||
* \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 0 if no rendering context was
|
||||
* \return The created texture is returned, or NULL if no rendering context was
|
||||
* active, the format was unsupported, or the width or height were out
|
||||
* of range.
|
||||
*
|
||||
* \note The contents of the texture are not defined at creation.
|
||||
*
|
||||
* \sa SDL_QueryTexture()
|
||||
* \sa SDL_UpdateTexture()
|
||||
* \sa SDL_DestroyTexture()
|
||||
@ -248,7 +250,7 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(SDL_Renderer * renderer,
|
||||
* \param renderer The renderer.
|
||||
* \param surface The surface containing pixel data used to fill the texture.
|
||||
*
|
||||
* \return The created texture is returned, or 0 on error.
|
||||
* \return The created texture is returned, or NULL on error.
|
||||
*
|
||||
* \note The surface is not modified or freed by this function.
|
||||
*
|
||||
@ -295,9 +297,9 @@ extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
|
||||
* \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 value red color value.
|
||||
* \param g A pointer filled in with the value green color value.
|
||||
* \param b A pointer filled in with the value blue color value.
|
||||
* \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.
|
||||
*
|
||||
@ -325,7 +327,7 @@ extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
|
||||
* \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 value alpha value.
|
||||
* \param alpha A pointer filled in with the current alpha value.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
@ -355,7 +357,7 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
|
||||
* \brief Get the blend mode used for texture copy operations.
|
||||
*
|
||||
* \param texture The texture to query.
|
||||
* \param blendMode A pointer filled in with the value blend mode.
|
||||
* \param blendMode A pointer filled in with the current blend mode.
|
||||
*
|
||||
* \return 0 on success, or -1 if the texture is not valid.
|
||||
*
|
||||
@ -370,8 +372,11 @@ extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
|
||||
* \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.
|
||||
* \param pitch The number of bytes between rows of pixel data.
|
||||
* \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.
|
||||
*
|
||||
@ -442,7 +447,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* \brief Set a texture as the value rendering target.
|
||||
* \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
|
||||
@ -455,9 +460,9 @@ extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer,
|
||||
SDL_Texture *texture);
|
||||
|
||||
/**
|
||||
* \brief Get the value render target or NULL for the default render target.
|
||||
* \brief Get the current render target or NULL for the default render target.
|
||||
*
|
||||
* \return The value render target
|
||||
* \return The current render target
|
||||
*
|
||||
* \sa SDL_SetRenderTarget()
|
||||
*/
|
||||
@ -500,7 +505,31 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
|
||||
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h);
|
||||
|
||||
/**
|
||||
* \brief Set the drawing area for rendering on the value target.
|
||||
* \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.
|
||||
@ -518,7 +547,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Get the drawing area for the value target.
|
||||
* \brief Get the drawing area for the current target.
|
||||
*
|
||||
* \sa SDL_RenderSetViewport()
|
||||
*/
|
||||
@ -526,7 +555,7 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
|
||||
SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Set the clip rectangle for the value target.
|
||||
* \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
|
||||
@ -540,10 +569,10 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Get the clip rectangle for the value target.
|
||||
* \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 value clip rectangle, or
|
||||
* \param rect A pointer filled in with the current clip rectangle, or
|
||||
* an empty rectangle if clipping is disabled.
|
||||
*
|
||||
* \sa SDL_RenderSetClipRect()
|
||||
@ -552,7 +581,17 @@ extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
|
||||
SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Set the drawing scale for rendering on the value target.
|
||||
* \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
|
||||
@ -573,7 +612,7 @@ extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
|
||||
float scaleX, float scaleY);
|
||||
|
||||
/**
|
||||
* \brief Get the drawing scale for the value target.
|
||||
* \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
|
||||
@ -636,7 +675,7 @@ extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer,
|
||||
* \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 value blend mode.
|
||||
* \param blendMode A pointer filled in with the current blend mode.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*
|
||||
@ -646,16 +685,17 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer,
|
||||
SDL_BlendMode *blendMode);
|
||||
|
||||
/**
|
||||
* \brief Clear the value rendering target with the drawing color
|
||||
* \brief Clear the current rendering target with the drawing color
|
||||
*
|
||||
* This function clears the entire rendering target, ignoring the viewport.
|
||||
* This function clears the entire rendering target, ignoring the viewport and
|
||||
* the clip rectangle.
|
||||
*
|
||||
* \return 0 on success, or -1 on error
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
|
||||
|
||||
/**
|
||||
* \brief Draw a point on the value rendering target.
|
||||
* \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.
|
||||
@ -667,7 +707,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
|
||||
int x, int y);
|
||||
|
||||
/**
|
||||
* \brief Draw multiple points on the value rendering target.
|
||||
* \brief Draw multiple points on the current rendering target.
|
||||
*
|
||||
* \param renderer The renderer which should draw multiple points.
|
||||
* \param points The points to draw
|
||||
@ -680,7 +720,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Draw a line on the value rendering target.
|
||||
* \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.
|
||||
@ -694,7 +734,7 @@ 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 value rendering target.
|
||||
* \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
|
||||
@ -707,7 +747,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Draw a rectangle on the value rendering target.
|
||||
* \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.
|
||||
@ -718,7 +758,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Draw some number of rectangles on the value rendering target.
|
||||
* \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.
|
||||
@ -731,7 +771,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Fill a rectangle on the value rendering target with the drawing color.
|
||||
* \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
|
||||
@ -743,7 +783,7 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
|
||||
const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Fill some number of rectangles on the value rendering target with the drawing color.
|
||||
* \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.
|
||||
@ -756,7 +796,7 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* \brief Copy a portion of the texture to the value rendering target.
|
||||
* \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.
|
||||
@ -773,7 +813,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
|
||||
const SDL_Rect * dstrect);
|
||||
|
||||
/**
|
||||
* \brief Copy a portion of the source texture to the value rendering target, rotating it by angle around the given center
|
||||
* \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.
|
||||
@ -781,8 +821,8 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
|
||||
* 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
|
||||
* \param center A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done aroud dstrect.w/2, dstrect.h/2)
|
||||
* \param 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
|
||||
@ -796,7 +836,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
|
||||
const SDL_RendererFlip flip);
|
||||
|
||||
/**
|
||||
* \brief Read pixels from the value rendering target.
|
||||
* \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
|
||||
@ -838,7 +878,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Bind the texture to the value OpenGL/ES/ES2 context for use with
|
||||
* \brief Bind the texture to the current OpenGL/ES/ES2 context for use with
|
||||
* OpenGL instructions.
|
||||
*
|
||||
* \param texture The SDL texture to bind
|
||||
@ -850,7 +890,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
|
||||
extern DECLSPEC int SDLCALL SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh);
|
||||
|
||||
/**
|
||||
* \brief Unbind a texture from the value OpenGL/ES/ES2 context.
|
||||
* \brief Unbind a texture from the current OpenGL/ES/ES2 context.
|
||||
*
|
||||
* \param texture The SDL texture to unbind
|
||||
*
|
||||
@ -865,6 +905,6 @@ extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_render_h */
|
||||
#endif /* SDL_render_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
2
bsp/simulator/SDL2-2.0.7/include/SDL_revision.h
Normal file
2
bsp/simulator/SDL2-2.0.7/include/SDL_revision.h
Normal file
@ -0,0 +1,2 @@
|
||||
#define SDL_REVISION "hg-11645:2088cd828335"
|
||||
#define SDL_REVISION_NUMBER 11645
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -26,8 +26,8 @@
|
||||
* data streams. It can easily be extended to files, memory, etc.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_rwops_h
|
||||
#define _SDL_rwops_h
|
||||
#ifndef SDL_rwops_h_
|
||||
#define SDL_rwops_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -39,12 +39,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* RWops Types */
|
||||
#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
|
||||
#define SDL_RWOPS_WINFILE 1 /* Win32 file */
|
||||
#define SDL_RWOPS_STDFILE 2 /* Stdio file */
|
||||
#define SDL_RWOPS_JNIFILE 3 /* Android asset */
|
||||
#define SDL_RWOPS_MEMORY 4 /* Memory stream */
|
||||
#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
|
||||
#define SDL_RWOPS_UNKNOWN 0U /**< Unknown stream type */
|
||||
#define SDL_RWOPS_WINFILE 1U /**< Win32 file */
|
||||
#define SDL_RWOPS_STDFILE 2U /**< Stdio file */
|
||||
#define SDL_RWOPS_JNIFILE 3U /**< Android asset */
|
||||
#define SDL_RWOPS_MEMORY 4U /**< Memory stream */
|
||||
#define SDL_RWOPS_MEMORY_RO 5U /**< Read-Only memory stream */
|
||||
|
||||
/**
|
||||
* This is the read/write operation structure -- very basic.
|
||||
@ -93,7 +93,7 @@ typedef struct SDL_RWops
|
||||
Uint32 type;
|
||||
union
|
||||
{
|
||||
#if defined(ANDROID)
|
||||
#if defined(__ANDROID__)
|
||||
struct
|
||||
{
|
||||
void *fileNameRef;
|
||||
@ -172,7 +172,7 @@ 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 value read point */
|
||||
#define RW_SEEK_CUR 1 /**< Seek relative to current read point */
|
||||
#define RW_SEEK_END 2 /**< Seek relative to the end of data */
|
||||
|
||||
/**
|
||||
@ -190,6 +190,29 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
|
||||
/* @} *//* 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
|
||||
*
|
||||
@ -220,13 +243,12 @@ 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 */
|
||||
#endif /* SDL_rwops_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Defines keyboard scancodes.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_scancode_h
|
||||
#define _SDL_scancode_h
|
||||
#ifndef SDL_scancode_h_
|
||||
#define SDL_scancode_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
* SDL_Event structure.
|
||||
*
|
||||
* The values in this enumeration are based on the USB usage page standard:
|
||||
* http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
|
||||
* http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
@ -390,12 +390,24 @@ typedef enum
|
||||
|
||||
/* @} *//* Walther keys */
|
||||
|
||||
/**
|
||||
* \name Usage page 0x0C (additional media keys)
|
||||
*
|
||||
* These values are mapped from usage page 0x0C (USB consumer page).
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
SDL_SCANCODE_AUDIOREWIND = 285,
|
||||
SDL_SCANCODE_AUDIOFASTFORWARD = 286,
|
||||
|
||||
/* @} *//* Usage page 0x0C (additional media keys) */
|
||||
|
||||
/* Add any other keys here. */
|
||||
|
||||
SDL_NUM_SCANCODES = 512 /**< not a key, just marks the number of scancodes
|
||||
for array bounds */
|
||||
} SDL_Scancode;
|
||||
|
||||
#endif /* _SDL_scancode_h */
|
||||
#endif /* SDL_scancode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_shape_h
|
||||
#define _SDL_shape_h
|
||||
#ifndef SDL_shape_h_
|
||||
#define SDL_shape_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_pixels.h"
|
||||
@ -71,6 +71,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,un
|
||||
* \param window The window to query for being shaped.
|
||||
*
|
||||
* \return SDL_TRUE if the window is a window that can be shaped, SDL_FALSE if the window is unshaped or NULL.
|
||||
*
|
||||
* \sa SDL_CreateShapedWindow
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_IsShapedWindow(const SDL_Window *window);
|
||||
@ -91,7 +92,7 @@ typedef enum {
|
||||
|
||||
/** \brief A union containing parameters for shaped windows. */
|
||||
typedef union {
|
||||
/** \brief a cutoff alpha value for binarization of the window shape's alpha channel. */
|
||||
/** \brief A cutoff alpha value for binarization of the window shape's alpha channel. */
|
||||
Uint8 binarizationCutoff;
|
||||
SDL_Color colorKey;
|
||||
} SDL_WindowShapeParams;
|
||||
@ -111,8 +112,8 @@ typedef struct SDL_WindowShapeMode {
|
||||
* \param shape A surface encoding the desired shape for the window.
|
||||
* \param shape_mode The parameters to set for the shaped window.
|
||||
*
|
||||
* \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on invalid an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW
|
||||
* if the SDL_Window* given does not reference a valid shaped window.
|
||||
* \return 0 on success, SDL_INVALID_SHAPE_ARGUMENT on an invalid shape argument, or SDL_NONSHAPEABLE_WINDOW
|
||||
* if the SDL_Window given does not reference a valid shaped window.
|
||||
*
|
||||
* \sa SDL_WindowShapeMode
|
||||
* \sa SDL_GetShapedWindowMode.
|
||||
@ -127,7 +128,7 @@ extern DECLSPEC int SDLCALL SDL_SetWindowShape(SDL_Window *window,SDL_Surface *s
|
||||
*
|
||||
* \return 0 if the window has a shape and, provided shape_mode was not NULL, shape_mode has been filled with the mode
|
||||
* data, SDL_NONSHAPEABLE_WINDOW if the SDL_Window given is not a shaped window, or SDL_WINDOW_LACKS_SHAPE if
|
||||
* the SDL_Window* given is a shapeable window currently lacking a shape.
|
||||
* the SDL_Window given is a shapeable window currently lacking a shape.
|
||||
*
|
||||
* \sa SDL_WindowShapeMode
|
||||
* \sa SDL_SetWindowShape
|
||||
@ -140,4 +141,4 @@ extern DECLSPEC int SDLCALL SDL_GetShapedWindowMode(SDL_Window *window,SDL_Windo
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_shape_h */
|
||||
#endif /* SDL_shape_h_ */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* This is a general header that includes C language support.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_stdinc_h
|
||||
#define _SDL_stdinc_h
|
||||
#ifndef SDL_stdinc_h_
|
||||
#define SDL_stdinc_h_
|
||||
|
||||
#include "SDL_config.h"
|
||||
|
||||
@ -62,6 +62,9 @@
|
||||
#ifdef HAVE_STRINGS_H
|
||||
# include <strings.h>
|
||||
#endif
|
||||
#ifdef HAVE_WCHAR_H
|
||||
# include <wchar.h>
|
||||
#endif
|
||||
#if defined(HAVE_INTTYPES_H)
|
||||
# include <inttypes.h>
|
||||
#elif defined(HAVE_STDINT_H)
|
||||
@ -83,9 +86,6 @@
|
||||
#ifdef HAVE_FLOAT_H
|
||||
# include <float.h>
|
||||
#endif
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
||||
# include <iconv.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The number of elements in an array.
|
||||
@ -93,6 +93,13 @@
|
||||
#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
|
||||
#define SDL_TABLESIZE(table) SDL_arraysize(table)
|
||||
|
||||
/**
|
||||
* Macro useful for building other macros with strings in them
|
||||
*
|
||||
* e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(__FUNCTION__) ": " X "\n")
|
||||
*/
|
||||
#define SDL_STRINGIFY_ARG(arg) #arg
|
||||
|
||||
/**
|
||||
* \name Cast operators
|
||||
*
|
||||
@ -123,51 +130,165 @@
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
#ifdef __CC_ARM
|
||||
/* ARM's compiler throws warnings if we use an enum: like "SDL_bool x = a < b;" */
|
||||
#define SDL_FALSE 0
|
||||
#define SDL_TRUE 1
|
||||
typedef int SDL_bool;
|
||||
#else
|
||||
typedef enum
|
||||
{
|
||||
SDL_FALSE = 0,
|
||||
SDL_TRUE = 1
|
||||
} SDL_bool;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief A signed 8-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */
|
||||
#define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */
|
||||
typedef int8_t Sint8;
|
||||
/**
|
||||
* \brief An unsigned 8-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */
|
||||
#define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */
|
||||
typedef uint8_t Uint8;
|
||||
/**
|
||||
* \brief A signed 16-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */
|
||||
#define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */
|
||||
typedef int16_t Sint16;
|
||||
/**
|
||||
* \brief An unsigned 16-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */
|
||||
#define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */
|
||||
typedef uint16_t Uint16;
|
||||
/**
|
||||
* \brief A signed 32-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */
|
||||
#define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */
|
||||
typedef int32_t Sint32;
|
||||
/**
|
||||
* \brief An unsigned 32-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */
|
||||
#define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */
|
||||
typedef uint32_t Uint32;
|
||||
|
||||
/**
|
||||
* \brief A signed 64-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */
|
||||
#define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */
|
||||
typedef int64_t Sint64;
|
||||
/**
|
||||
* \brief An unsigned 64-bit integer type.
|
||||
*/
|
||||
#define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */
|
||||
#define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */
|
||||
typedef uint64_t Uint64;
|
||||
|
||||
/* @} *//* Basic data types */
|
||||
|
||||
/* Make sure we have macros for printing 64 bit values.
|
||||
* <stdint.h> should define these but this is not true all platforms.
|
||||
* (for example win32) */
|
||||
#ifndef SDL_PRIs64
|
||||
#ifdef PRIs64
|
||||
#define SDL_PRIs64 PRIs64
|
||||
#elif defined(__WIN32__)
|
||||
#define SDL_PRIs64 "I64d"
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIs64 "ld"
|
||||
#else
|
||||
#define SDL_PRIs64 "lld"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIu64
|
||||
#ifdef PRIu64
|
||||
#define SDL_PRIu64 PRIu64
|
||||
#elif defined(__WIN32__)
|
||||
#define SDL_PRIu64 "I64u"
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIu64 "lu"
|
||||
#else
|
||||
#define SDL_PRIu64 "llu"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIx64
|
||||
#ifdef PRIx64
|
||||
#define SDL_PRIx64 PRIx64
|
||||
#elif defined(__WIN32__)
|
||||
#define SDL_PRIx64 "I64x"
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIx64 "lx"
|
||||
#else
|
||||
#define SDL_PRIx64 "llx"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SDL_PRIX64
|
||||
#ifdef PRIX64
|
||||
#define SDL_PRIX64 PRIX64
|
||||
#elif defined(__WIN32__)
|
||||
#define SDL_PRIX64 "I64X"
|
||||
#elif defined(__LINUX__) && defined(__LP64__)
|
||||
#define SDL_PRIX64 "lX"
|
||||
#else
|
||||
#define SDL_PRIX64 "llX"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Annotations to help code analysis tools */
|
||||
#ifdef SDL_DISABLE_ANALYZE_MACROS
|
||||
#define SDL_IN_BYTECAP(x)
|
||||
#define SDL_INOUT_Z_CAP(x)
|
||||
#define SDL_OUT_Z_CAP(x)
|
||||
#define SDL_OUT_CAP(x)
|
||||
#define SDL_OUT_BYTECAP(x)
|
||||
#define SDL_OUT_Z_BYTECAP(x)
|
||||
#define SDL_PRINTF_FORMAT_STRING
|
||||
#define SDL_SCANF_FORMAT_STRING
|
||||
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
|
||||
#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
|
||||
#else
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600) /* VS 2010 and above */
|
||||
#include <sal.h>
|
||||
|
||||
#define SDL_IN_BYTECAP(x) _In_bytecount_(x)
|
||||
#define SDL_INOUT_Z_CAP(x) _Inout_z_cap_(x)
|
||||
#define SDL_OUT_Z_CAP(x) _Out_z_cap_(x)
|
||||
#define SDL_OUT_CAP(x) _Out_cap_(x)
|
||||
#define SDL_OUT_BYTECAP(x) _Out_bytecap_(x)
|
||||
#define SDL_OUT_Z_BYTECAP(x) _Out_z_bytecap_(x)
|
||||
|
||||
#define SDL_PRINTF_FORMAT_STRING _Printf_format_string_
|
||||
#define SDL_SCANF_FORMAT_STRING _Scanf_format_string_impl_
|
||||
#else
|
||||
#define SDL_IN_BYTECAP(x)
|
||||
#define SDL_INOUT_Z_CAP(x)
|
||||
#define SDL_OUT_Z_CAP(x)
|
||||
#define SDL_OUT_CAP(x)
|
||||
#define SDL_OUT_BYTECAP(x)
|
||||
#define SDL_OUT_Z_BYTECAP(x)
|
||||
#define SDL_PRINTF_FORMAT_STRING
|
||||
#define SDL_SCANF_FORMAT_STRING
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __printf__, fmtargnumber, fmtargnumber+1 )))
|
||||
#define SDL_SCANF_VARARG_FUNC( fmtargnumber ) __attribute__ (( format( __scanf__, fmtargnumber, fmtargnumber+1 )))
|
||||
#else
|
||||
#define SDL_PRINTF_VARARG_FUNC( fmtargnumber )
|
||||
#define SDL_SCANF_VARARG_FUNC( fmtargnumber )
|
||||
#endif
|
||||
#endif /* SDL_DISABLE_ANALYZE_MACROS */
|
||||
|
||||
#define SDL_COMPILE_TIME_ASSERT(name, x) \
|
||||
typedef int SDL_dummy_ ## name[(x) * 2 - 1]
|
||||
typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1]
|
||||
/** \cond */
|
||||
#ifndef DOXYGEN_SHOULD_IGNORE_THIS
|
||||
SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
|
||||
@ -242,6 +363,37 @@ extern DECLSPEC void *SDLCALL SDL_calloc(size_t nmemb, size_t size);
|
||||
extern DECLSPEC void *SDLCALL SDL_realloc(void *mem, size_t size);
|
||||
extern DECLSPEC void SDLCALL SDL_free(void *mem);
|
||||
|
||||
typedef void *(SDLCALL *SDL_malloc_func)(size_t size);
|
||||
typedef void *(SDLCALL *SDL_calloc_func)(size_t nmemb, size_t size);
|
||||
typedef void *(SDLCALL *SDL_realloc_func)(void *mem, size_t size);
|
||||
typedef void (SDLCALL *SDL_free_func)(void *mem);
|
||||
|
||||
/**
|
||||
* \brief Get the current set of SDL memory functions
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func,
|
||||
SDL_calloc_func *calloc_func,
|
||||
SDL_realloc_func *realloc_func,
|
||||
SDL_free_func *free_func);
|
||||
|
||||
/**
|
||||
* \brief Replace SDL's memory allocation functions with a custom set
|
||||
*
|
||||
* \note If you are replacing SDL's memory functions, you should call
|
||||
* SDL_GetNumAllocations() and be very careful if it returns non-zero.
|
||||
* That means that your free function will be called with memory
|
||||
* allocated by the previous memory allocation functions.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetMemoryFunctions(SDL_malloc_func malloc_func,
|
||||
SDL_calloc_func calloc_func,
|
||||
SDL_realloc_func realloc_func,
|
||||
SDL_free_func free_func);
|
||||
|
||||
/**
|
||||
* \brief Get the number of outstanding (unfreed) allocations
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_getenv(const char *name);
|
||||
extern DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
|
||||
|
||||
@ -259,7 +411,7 @@ extern DECLSPEC int SDLCALL SDL_isspace(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_toupper(int x);
|
||||
extern DECLSPEC int SDLCALL SDL_tolower(int x);
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memset(void *dst, int c, size_t len);
|
||||
extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, size_t len);
|
||||
|
||||
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
|
||||
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
|
||||
@ -284,34 +436,30 @@ SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
|
||||
return;
|
||||
switch (dwords % 4)
|
||||
{
|
||||
case 0: do { *_p++ = _val;
|
||||
case 3: *_p++ = _val;
|
||||
case 2: *_p++ = _val;
|
||||
case 1: *_p++ = _val;
|
||||
case 0: do { *_p++ = _val; /* fallthrough */
|
||||
case 3: *_p++ = _val; /* fallthrough */
|
||||
case 2: *_p++ = _val; /* fallthrough */
|
||||
case 1: *_p++ = _val; /* fallthrough */
|
||||
} while ( --_n );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
|
||||
extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
|
||||
SDL_FORCE_INLINE void *SDL_memcpy4(void *dst, const void *src, size_t dwords)
|
||||
{
|
||||
return SDL_memcpy(dst, src, dwords * 4);
|
||||
}
|
||||
|
||||
extern DECLSPEC void *SDLCALL SDL_memmove(void *dst, const void *src, size_t len);
|
||||
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
|
||||
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
|
||||
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
|
||||
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
|
||||
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlcpy(SDL_OUT_Z_CAP(dst_bytes) char *dst, const char *src, size_t dst_bytes);
|
||||
extern DECLSPEC size_t SDLCALL SDL_strlcat(SDL_INOUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
|
||||
extern DECLSPEC char *SDLCALL SDL_strdup(const char *str);
|
||||
extern DECLSPEC char *SDLCALL SDL_strrev(char *str);
|
||||
extern DECLSPEC char *SDLCALL SDL_strupr(char *str);
|
||||
@ -319,6 +467,7 @@ extern DECLSPEC char *SDLCALL SDL_strlwr(char *str);
|
||||
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
|
||||
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
|
||||
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
|
||||
|
||||
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
|
||||
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
|
||||
@ -340,14 +489,14 @@ extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size
|
||||
extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
|
||||
extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t len);
|
||||
|
||||
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
|
||||
extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, SDL_SCANF_FORMAT_STRING const char *fmt, ...) SDL_SCANF_VARARG_FUNC(2);
|
||||
extern DECLSPEC int SDLCALL SDL_vsscanf(const char *text, const char *fmt, va_list ap);
|
||||
extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
|
||||
extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
|
||||
extern DECLSPEC int SDLCALL SDL_snprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, SDL_PRINTF_FORMAT_STRING const char *fmt, ... ) SDL_PRINTF_VARARG_FUNC(3);
|
||||
extern DECLSPEC int SDLCALL SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt, va_list ap);
|
||||
|
||||
#ifndef HAVE_M_PI
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846264338327950288 /* pi */
|
||||
#define M_PI 3.14159265358979323846264338327950288 /**< pi */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -367,6 +516,9 @@ extern DECLSPEC double SDLCALL SDL_scalbn(double x, int n);
|
||||
extern DECLSPEC double SDLCALL SDL_sin(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_sinf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_sqrt(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_sqrtf(float x);
|
||||
extern DECLSPEC double SDLCALL SDL_tan(double x);
|
||||
extern DECLSPEC float SDLCALL SDL_tanf(float x);
|
||||
|
||||
/* The SDL implementation of iconv() returns these error codes */
|
||||
#define SDL_ICONV_ERROR (size_t)-1
|
||||
@ -394,12 +546,45 @@ extern DECLSPEC char *SDLCALL SDL_iconv_string(const char *tocode,
|
||||
#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||
#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
|
||||
|
||||
/* force builds using Clang's static analysis tools to use literal C runtime
|
||||
here, since there are possibly tests that are ineffective otherwise. */
|
||||
#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
|
||||
#define SDL_malloc malloc
|
||||
#define SDL_calloc calloc
|
||||
#define SDL_realloc realloc
|
||||
#define SDL_free free
|
||||
#define SDL_memset memset
|
||||
#define SDL_memcpy memcpy
|
||||
#define SDL_memmove memmove
|
||||
#define SDL_memcmp memcmp
|
||||
#define SDL_strlen strlen
|
||||
#define SDL_strlcpy strlcpy
|
||||
#define SDL_strlcat strlcat
|
||||
#define SDL_strdup strdup
|
||||
#define SDL_strchr strchr
|
||||
#define SDL_strrchr strrchr
|
||||
#define SDL_strstr strstr
|
||||
#define SDL_strcmp strcmp
|
||||
#define SDL_strncmp strncmp
|
||||
#define SDL_strcasecmp strcasecmp
|
||||
#define SDL_strncasecmp strncasecmp
|
||||
#define SDL_sscanf sscanf
|
||||
#define SDL_vsscanf vsscanf
|
||||
#define SDL_snprintf snprintf
|
||||
#define SDL_vsnprintf vsnprintf
|
||||
#endif
|
||||
|
||||
SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
|
||||
{
|
||||
return SDL_memcpy(dst, src, dwords * 4);
|
||||
}
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_stdinc_h */
|
||||
#endif /* SDL_stdinc_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Header file for ::SDL_Surface definition and management functions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_surface_h
|
||||
#define _SDL_surface_h
|
||||
#ifndef SDL_surface_h_
|
||||
#define SDL_surface_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_pixels.h"
|
||||
@ -94,8 +94,8 @@ typedef struct SDL_Surface
|
||||
/**
|
||||
* \brief The type of function used for surface blitting functions.
|
||||
*/
|
||||
typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
||||
struct SDL_Surface * dst, SDL_Rect * dstrect);
|
||||
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.
|
||||
@ -118,6 +118,11 @@ typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
|
||||
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,
|
||||
@ -127,6 +132,8 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
|
||||
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);
|
||||
|
||||
/**
|
||||
@ -184,6 +191,12 @@ extern DECLSPEC SDL_Surface *SDLCALL SDL_LoadBMP_RW(SDL_RWops * src,
|
||||
/**
|
||||
* 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.
|
||||
@ -257,9 +270,9 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface,
|
||||
* \brief Get the additional color value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param r A pointer filled in with the value red color value.
|
||||
* \param g A pointer filled in with the value green color value.
|
||||
* \param b A pointer filled in with the value blue color value.
|
||||
* \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.
|
||||
*
|
||||
@ -286,7 +299,7 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
|
||||
* \brief Get the additional alpha value used in blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param alpha A pointer filled in with the value alpha value.
|
||||
* \param alpha A pointer filled in with the current alpha value.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
@ -312,7 +325,7 @@ extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface,
|
||||
* \brief Get the blend mode used for blit operations.
|
||||
*
|
||||
* \param surface The surface to query.
|
||||
* \param blendMode A pointer filled in with the value blend mode.
|
||||
* \param blendMode A pointer filled in with the current blend mode.
|
||||
*
|
||||
* \return 0 on success, or -1 if the surface is not valid.
|
||||
*
|
||||
@ -346,6 +359,11 @@ extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface * surface,
|
||||
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
|
||||
@ -498,6 +516,6 @@ extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_surface_h */
|
||||
#endif /* SDL_surface_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for platform specific SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef _SDL_system_h
|
||||
#define _SDL_system_h
|
||||
#ifndef SDL_system_h_
|
||||
#define SDL_system_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_keyboard.h"
|
||||
@ -42,24 +42,36 @@ extern "C" {
|
||||
|
||||
/* 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.
|
||||
|
||||
/* 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 );
|
||||
|
||||
/* Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
|
||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||
/**
|
||||
\brief Returns the D3D device associated with a renderer, or NULL if it's not a D3D renderer.
|
||||
|
||||
Once you are done using the device, you should release it to avoid a resource leak.
|
||||
*/
|
||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_RenderGetD3D9Device(SDL_Renderer * renderer);
|
||||
|
||||
/* Returns the DXGI Adapter and Output indices for the specified display index.
|
||||
/**
|
||||
\brief Returns the DXGI Adapter and Output indices for the specified display index.
|
||||
|
||||
These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
|
||||
required to create a DX10 or DX11 device and swap chain.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapterIndex, int *outputIndex );
|
||||
|
||||
#endif /* __WIN32__ */
|
||||
|
||||
@ -67,7 +79,10 @@ extern DECLSPEC void SDLCALL SDL_DXGIGetOutputInfo( int displayIndex, int *adapt
|
||||
/* 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__ */
|
||||
@ -76,43 +91,54 @@ extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
|
||||
/* Platform specific functions for Android */
|
||||
#if defined(__ANDROID__) && __ANDROID__
|
||||
|
||||
/* Get the JNI environment for the value thread
|
||||
/**
|
||||
\brief Get the JNI environment for the current thread
|
||||
|
||||
This returns JNIEnv*, but the prototype is void* so we don't need jni.h
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv();
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
|
||||
|
||||
/**
|
||||
\brief Get the SDL Activity object for the application
|
||||
|
||||
/* 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();
|
||||
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
|
||||
|
||||
/* See the official Android developer guide for more information:
|
||||
/**
|
||||
See the official Android developer guide for more information:
|
||||
http://developer.android.com/guide/topics/data/data-storage.html
|
||||
*/
|
||||
#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
|
||||
#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
|
||||
|
||||
/* Get the path used for internal storage for this application.
|
||||
/**
|
||||
\brief Get the path used for internal storage for this application.
|
||||
|
||||
This path is unique to your application and cannot be written to
|
||||
by other applications.
|
||||
*/
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath();
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
|
||||
|
||||
/* Get the value state of external storage, a bitmask of these values:
|
||||
/**
|
||||
\brief Get the current state of external storage, a bitmask of these values:
|
||||
SDL_ANDROID_EXTERNAL_STORAGE_READ
|
||||
SDL_ANDROID_EXTERNAL_STORAGE_WRITE
|
||||
|
||||
If external storage is currently unavailable, this will return 0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState();
|
||||
extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(void);
|
||||
|
||||
/**
|
||||
\brief Get the path used for external storage for this application.
|
||||
|
||||
/* 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();
|
||||
extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
|
||||
|
||||
#endif /* __ANDROID__ */
|
||||
|
||||
@ -151,7 +177,7 @@ typedef enum
|
||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
*
|
||||
* \param pathType The type of path to retrieve.
|
||||
* \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
|
||||
* \return A UCS-2 string (16-bit, wide-char) containing the path, or NULL
|
||||
* if the path is not available for any reason. Not all paths are
|
||||
* available on all versions of Windows. This is especially true on
|
||||
* Windows Phone. Check the documentation for the given
|
||||
@ -168,7 +194,7 @@ extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path
|
||||
* http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
|
||||
*
|
||||
* \param pathType The type of path to retrieve.
|
||||
* \ret A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
|
||||
* \return A UTF-8 string (8-bit, multi-byte) containing the path, or NULL
|
||||
* if the path is not available for any reason. Not all paths are
|
||||
* available on all versions of Windows. This is especially true on
|
||||
* Windows Phone. Check the documentation for the given
|
||||
@ -179,13 +205,12 @@ extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathT
|
||||
|
||||
#endif /* __WINRT__ */
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_system_h */
|
||||
#endif /* SDL_system_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL custom system window manager hooks.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_syswm_h
|
||||
#define _SDL_syswm_h
|
||||
#ifndef SDL_syswm_h_
|
||||
#define SDL_syswm_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -52,7 +52,9 @@ struct SDL_SysWMinfo;
|
||||
#else
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
@ -83,7 +85,7 @@ struct SDL_SysWMinfo;
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
#ifdef __OBJC__
|
||||
#include <Cocoa/Cocoa.h>
|
||||
@class NSWindow;
|
||||
#else
|
||||
typedef struct _NSWindow NSWindow;
|
||||
#endif
|
||||
@ -96,12 +98,17 @@ typedef struct _NSWindow NSWindow;
|
||||
typedef struct _UIWindow UIWindow;
|
||||
typedef struct _UIViewController UIViewController;
|
||||
#endif
|
||||
typedef Uint32 GLuint;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||
#include <mir_toolkit/mir_client_library.h>
|
||||
#if defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
typedef struct ANativeWindow ANativeWindow;
|
||||
typedef void *EGLSurface;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||
#include "SDL_egl.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* These are the various supported windowing subsystems
|
||||
@ -117,6 +124,9 @@ typedef enum
|
||||
SDL_SYSWM_WAYLAND,
|
||||
SDL_SYSWM_MIR,
|
||||
SDL_SYSWM_WINRT,
|
||||
SDL_SYSWM_ANDROID,
|
||||
SDL_SYSWM_VIVANTE,
|
||||
SDL_SYSWM_OS2
|
||||
} SDL_SYSWM_TYPE;
|
||||
|
||||
/**
|
||||
@ -149,14 +159,26 @@ struct SDL_SysWMmsg
|
||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
struct
|
||||
{
|
||||
/* Latest version of Xcode clang complains about empty structs in C v. C++:
|
||||
error: empty struct has size 0 in C, size 1 in C++
|
||||
*/
|
||||
int dummy;
|
||||
/* No Cocoa window events yet */
|
||||
} cocoa;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
struct
|
||||
{
|
||||
int dummy;
|
||||
/* No UIKit window events yet */
|
||||
} uikit;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||
struct
|
||||
{
|
||||
int dummy;
|
||||
/* No Vivante window events yet */
|
||||
} vivante;
|
||||
#endif
|
||||
/* Can't have an empty union */
|
||||
int dummy;
|
||||
@ -179,6 +201,8 @@ struct SDL_SysWMinfo
|
||||
struct
|
||||
{
|
||||
HWND window; /**< The window handle */
|
||||
HDC hdc; /**< The window device context */
|
||||
HINSTANCE hinstance; /**< The instance handle */
|
||||
} win;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_WINRT)
|
||||
@ -205,13 +229,24 @@ struct SDL_SysWMinfo
|
||||
#if defined(SDL_VIDEO_DRIVER_COCOA)
|
||||
struct
|
||||
{
|
||||
NSWindow *window; /* The Cocoa window */
|
||||
#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
|
||||
NSWindow __unsafe_unretained *window; /**< The Cocoa window */
|
||||
#else
|
||||
NSWindow *window; /**< The Cocoa window */
|
||||
#endif
|
||||
} cocoa;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_UIKIT)
|
||||
struct
|
||||
{
|
||||
UIWindow *window; /* The UIKit window */
|
||||
#if defined(__OBJC__) && defined(__has_feature) && __has_feature(objc_arc)
|
||||
UIWindow __unsafe_unretained *window; /**< The UIKit window */
|
||||
#else
|
||||
UIWindow *window; /**< The UIKit window */
|
||||
#endif
|
||||
GLuint framebuffer; /**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */
|
||||
GLuint colorbuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */
|
||||
GLuint resolveFramebuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */
|
||||
} uikit;
|
||||
#endif
|
||||
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
|
||||
@ -225,13 +260,30 @@ struct SDL_SysWMinfo
|
||||
#if defined(SDL_VIDEO_DRIVER_MIR)
|
||||
struct
|
||||
{
|
||||
MirConnection *connection; /**< Mir display server connection */
|
||||
MirSurface *surface; /**< Mir surface */
|
||||
struct MirConnection *connection; /**< Mir display server connection */
|
||||
struct MirSurface *surface; /**< Mir surface */
|
||||
} mir;
|
||||
#endif
|
||||
|
||||
/* Can't have an empty union */
|
||||
int dummy;
|
||||
#if defined(SDL_VIDEO_DRIVER_ANDROID)
|
||||
struct
|
||||
{
|
||||
ANativeWindow *window;
|
||||
EGLSurface surface;
|
||||
} android;
|
||||
#endif
|
||||
|
||||
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
|
||||
struct
|
||||
{
|
||||
EGLNativeDisplayType display;
|
||||
EGLNativeWindowType window;
|
||||
} vivante;
|
||||
#endif
|
||||
|
||||
/* Make sure this union is always 64 bytes (8 64-bit pointers). */
|
||||
/* Be careful not to overflow this if you add a new target! */
|
||||
Uint8 dummy[64];
|
||||
} info;
|
||||
};
|
||||
|
||||
@ -267,6 +319,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_syswm_h */
|
||||
#endif /* SDL_syswm_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -27,21 +27,22 @@
|
||||
* This code is a part of the SDL2_test library, not the main SDL library.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_h
|
||||
#define _SDL_test_h
|
||||
#ifndef SDL_test_h_
|
||||
#define SDL_test_h_
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_test_common.h"
|
||||
#include "SDL_test_font.h"
|
||||
#include "SDL_test_random.h"
|
||||
#include "SDL_test_fuzzer.h"
|
||||
#include "SDL_test_crc32.h"
|
||||
#include "SDL_test_md5.h"
|
||||
#include "SDL_test_log.h"
|
||||
#include "SDL_test_assert.h"
|
||||
#include "SDL_test_common.h"
|
||||
#include "SDL_test_compare.h"
|
||||
#include "SDL_test_crc32.h"
|
||||
#include "SDL_test_font.h"
|
||||
#include "SDL_test_fuzzer.h"
|
||||
#include "SDL_test_harness.h"
|
||||
#include "SDL_test_images.h"
|
||||
#include "SDL_test_compare.h"
|
||||
#include "SDL_test_log.h"
|
||||
#include "SDL_test_md5.h"
|
||||
#include "SDL_test_memory.h"
|
||||
#include "SDL_test_random.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -52,7 +53,7 @@ extern "C" {
|
||||
/* Global definitions */
|
||||
|
||||
/*
|
||||
* Note: Maximum size of SDLTest log message is less than SDLs limit
|
||||
* Note: Maximum size of SDLTest log message is less than SDL's limit
|
||||
* to ensure we can fit additional information such as the timestamp.
|
||||
*/
|
||||
#define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584
|
||||
@ -63,6 +64,6 @@ extern "C" {
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_h */
|
||||
#endif /* SDL_test_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -33,8 +33,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_assert_h
|
||||
#define _SDL_test_assert_h
|
||||
#ifndef SDL_test_assert_h_
|
||||
#define SDL_test_assert_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -58,7 +58,7 @@ extern "C" {
|
||||
* \param assertCondition Evaluated condition or variable to assert; fail (==0) or pass (!=0).
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*/
|
||||
void SDLTest_Assert(int assertCondition, const char *assertDescription, ...);
|
||||
void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Assert for test cases that logs but does not break execution flow on failures. Updates assertion counters.
|
||||
@ -68,24 +68,24 @@ void SDLTest_Assert(int assertCondition, const char *assertDescription, ...);
|
||||
*
|
||||
* \returns Returns the assertCondition so it can be used to externally to break execution flow if desired.
|
||||
*/
|
||||
int SDLTest_AssertCheck(int assertCondition, const char *assertDescription, ...);
|
||||
int SDLTest_AssertCheck(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(2);
|
||||
|
||||
/**
|
||||
* \brief Explicitely pass without checking an assertion condition. Updates assertion counter.
|
||||
* \brief Explicitly pass without checking an assertion condition. Updates assertion counter.
|
||||
*
|
||||
* \param assertDescription Message to log with the assert describing it.
|
||||
*/
|
||||
void SDLTest_AssertPass(const char *assertDescription, ...);
|
||||
void SDLTest_AssertPass(SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* \brief Resets the assert summary counters to zero.
|
||||
*/
|
||||
void SDLTest_ResetAssertSummary();
|
||||
void SDLTest_ResetAssertSummary(void);
|
||||
|
||||
/**
|
||||
* \brief Logs summary of all assertions (total, pass, fail) since last reset as INFO or ERROR.
|
||||
*/
|
||||
void SDLTest_LogAssertSummary();
|
||||
void SDLTest_LogAssertSummary(void);
|
||||
|
||||
|
||||
/**
|
||||
@ -93,13 +93,13 @@ void SDLTest_LogAssertSummary();
|
||||
*
|
||||
* \returns TEST_RESULT_PASSED, TEST_RESULT_FAILED, or TEST_RESULT_NO_ASSERT
|
||||
*/
|
||||
int SDLTest_AssertSummaryToTestResult();
|
||||
int SDLTest_AssertSummaryToTestResult(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_assert_h */
|
||||
#endif /* SDL_test_assert_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -29,8 +29,8 @@
|
||||
|
||||
/* Ported from original test\common.h file. */
|
||||
|
||||
#ifndef _SDL_test_common_h
|
||||
#define _SDL_test_common_h
|
||||
#ifndef SDL_test_common_h_
|
||||
#define SDL_test_common_h_
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
@ -183,6 +183,6 @@ void SDLTest_CommonQuit(SDLTest_CommonState * state);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_common_h */
|
||||
#endif /* SDL_test_common_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_compare_h
|
||||
#define _SDL_test_compare_h
|
||||
#ifndef SDL_test_compare_h_
|
||||
#define SDL_test_compare_h_
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
@ -51,9 +51,9 @@ extern "C" {
|
||||
*
|
||||
* \param surface Surface used in comparison
|
||||
* \param referenceSurface Test Surface used in comparison
|
||||
* \param allowable_error Allowable difference (squared) in blending accuracy.
|
||||
* \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy.
|
||||
*
|
||||
* \returns 0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
|
||||
* \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.
|
||||
*/
|
||||
int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error);
|
||||
|
||||
@ -64,6 +64,6 @@ int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface,
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_compare_h */
|
||||
#endif /* SDL_test_compare_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_crc32_h
|
||||
#define _SDL_test_crc32_h
|
||||
#ifndef SDL_test_crc32_h_
|
||||
#define SDL_test_crc32_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -70,30 +70,30 @@ extern "C" {
|
||||
/* ---------- Function Prototypes ------------- */
|
||||
|
||||
/**
|
||||
* /brief Initialize the CRC context
|
||||
* \brief Initialize the CRC context
|
||||
*
|
||||
* Note: The function initializes the crc table required for all crc calculations.
|
||||
*
|
||||
* /param crcContext pointer to context variable
|
||||
* \param crcContext pointer to context variable
|
||||
*
|
||||
* /returns 0 for OK, -1 on error
|
||||
* \returns 0 for OK, -1 on error
|
||||
*
|
||||
*/
|
||||
int SDLTest_Crc32Init(SDLTest_Crc32Context * crcContext);
|
||||
|
||||
|
||||
/**
|
||||
* /brief calculate a crc32 from a data block
|
||||
* \brief calculate a crc32 from a data block
|
||||
*
|
||||
* /param crcContext pointer to context variable
|
||||
* /param inBuf input buffer to checksum
|
||||
* /param inLen length of input buffer
|
||||
* /param crc32 pointer to Uint32 to store the final CRC into
|
||||
* \param crcContext pointer to context variable
|
||||
* \param inBuf input buffer to checksum
|
||||
* \param inLen length of input buffer
|
||||
* \param crc32 pointer to Uint32 to store the final CRC into
|
||||
*
|
||||
* /returns 0 for OK, -1 on error
|
||||
* \returns 0 for OK, -1 on error
|
||||
*
|
||||
*/
|
||||
int SDLTest_crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
|
||||
int SDLTest_Crc32Calc(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf, CrcUint32 inLen, CrcUint32 *crc32);
|
||||
|
||||
/* Same routine broken down into three steps */
|
||||
int SDLTest_Crc32CalcStart(SDLTest_Crc32Context * crcContext, CrcUint32 *crc32);
|
||||
@ -102,11 +102,11 @@ int SDLTest_Crc32CalcBuffer(SDLTest_Crc32Context * crcContext, CrcUint8 *inBuf,
|
||||
|
||||
|
||||
/**
|
||||
* /brief clean up CRC context
|
||||
* \brief clean up CRC context
|
||||
*
|
||||
* /param crcContext pointer to context variable
|
||||
* \param crcContext pointer to context variable
|
||||
*
|
||||
* /returns 0 for OK, -1 on error
|
||||
* \returns 0 for OK, -1 on error
|
||||
*
|
||||
*/
|
||||
|
||||
@ -119,6 +119,6 @@ int SDLTest_Crc32Done(SDLTest_Crc32Context * crcContext);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_crc32_h */
|
||||
#endif /* SDL_test_crc32_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -27,8 +27,8 @@
|
||||
* This code is a part of the SDL2_test library, not the main SDL library.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_font_h
|
||||
#define _SDL_test_font_h
|
||||
#ifndef SDL_test_font_h_
|
||||
#define SDL_test_font_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -50,7 +50,7 @@ extern "C" {
|
||||
*
|
||||
* \returns Returns 0 on success, -1 on failure.
|
||||
*/
|
||||
int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c );
|
||||
int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c);
|
||||
|
||||
/**
|
||||
* \brief Draw a string in the currently set font.
|
||||
@ -62,15 +62,20 @@ int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c );
|
||||
*
|
||||
* \returns Returns 0 on success, -1 on failure.
|
||||
*/
|
||||
int SDLTest_DrawString( SDL_Renderer * renderer, int x, int y, const char *s );
|
||||
int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Cleanup textures used by font drawing functions.
|
||||
*/
|
||||
void SDLTest_CleanupTextDrawing(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_font_h */
|
||||
#endif /* SDL_test_font_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_fuzzer_h
|
||||
#define _SDL_test_fuzzer_h
|
||||
#ifndef SDL_test_fuzzer_h_
|
||||
#define SDL_test_fuzzer_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -57,7 +57,7 @@ extern "C" {
|
||||
/**
|
||||
* Initializes the fuzzer for a test
|
||||
*
|
||||
* /param execKey Execution "Key" that initializes the random number generator uniquely for the test.
|
||||
* \param execKey Execution "Key" that initializes the random number generator uniquely for the test.
|
||||
*
|
||||
*/
|
||||
void SDLTest_FuzzerInit(Uint64 execKey);
|
||||
@ -68,14 +68,14 @@ void SDLTest_FuzzerInit(Uint64 execKey);
|
||||
*
|
||||
* \returns Generated integer
|
||||
*/
|
||||
Uint8 SDLTest_RandomUint8();
|
||||
Uint8 SDLTest_RandomUint8(void);
|
||||
|
||||
/**
|
||||
* Returns a random Sint8
|
||||
*
|
||||
* \returns Generated signed integer
|
||||
*/
|
||||
Sint8 SDLTest_RandomSint8();
|
||||
Sint8 SDLTest_RandomSint8(void);
|
||||
|
||||
|
||||
/**
|
||||
@ -83,14 +83,14 @@ Sint8 SDLTest_RandomSint8();
|
||||
*
|
||||
* \returns Generated integer
|
||||
*/
|
||||
Uint16 SDLTest_RandomUint16();
|
||||
Uint16 SDLTest_RandomUint16(void);
|
||||
|
||||
/**
|
||||
* Returns a random Sint16
|
||||
*
|
||||
* \returns Generated signed integer
|
||||
*/
|
||||
Sint16 SDLTest_RandomSint16();
|
||||
Sint16 SDLTest_RandomSint16(void);
|
||||
|
||||
|
||||
/**
|
||||
@ -98,7 +98,7 @@ Sint16 SDLTest_RandomSint16();
|
||||
*
|
||||
* \returns Generated integer
|
||||
*/
|
||||
Sint32 SDLTest_RandomSint32();
|
||||
Sint32 SDLTest_RandomSint32(void);
|
||||
|
||||
|
||||
/**
|
||||
@ -106,14 +106,14 @@ Sint32 SDLTest_RandomSint32();
|
||||
*
|
||||
* \returns Generated integer
|
||||
*/
|
||||
Uint32 SDLTest_RandomUint32();
|
||||
Uint32 SDLTest_RandomUint32(void);
|
||||
|
||||
/**
|
||||
* Returns random Uint64.
|
||||
*
|
||||
* \returns Generated integer
|
||||
*/
|
||||
Uint64 SDLTest_RandomUint64();
|
||||
Uint64 SDLTest_RandomUint64(void);
|
||||
|
||||
|
||||
/**
|
||||
@ -121,29 +121,29 @@ Uint64 SDLTest_RandomUint64();
|
||||
*
|
||||
* \returns Generated signed integer
|
||||
*/
|
||||
Sint64 SDLTest_RandomSint64();
|
||||
Sint64 SDLTest_RandomSint64(void);
|
||||
|
||||
/**
|
||||
* \returns random float in range [0.0 - 1.0[
|
||||
*/
|
||||
float SDLTest_RandomUnitFloat();
|
||||
float SDLTest_RandomUnitFloat(void);
|
||||
|
||||
/**
|
||||
* \returns random double in range [0.0 - 1.0[
|
||||
*/
|
||||
double SDLTest_RandomUnitDouble();
|
||||
double SDLTest_RandomUnitDouble(void);
|
||||
|
||||
/**
|
||||
* \returns random float.
|
||||
*
|
||||
*/
|
||||
float SDLTest_RandomFloat();
|
||||
float SDLTest_RandomFloat(void);
|
||||
|
||||
/**
|
||||
* \returns random double.
|
||||
*
|
||||
*/
|
||||
double SDLTest_RandomDouble();
|
||||
double SDLTest_RandomDouble(void);
|
||||
|
||||
/**
|
||||
* Returns a random boundary value for Uint8 within the given boundaries.
|
||||
@ -318,7 +318,7 @@ Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL
|
||||
/**
|
||||
* Returns integer in range [min, max] (inclusive).
|
||||
* Min and max values can be negative values.
|
||||
* If Max in smaller tham min, then the values are swapped.
|
||||
* If Max in smaller than min, then the values are swapped.
|
||||
* Min and max are the same value, that value will be returned.
|
||||
*
|
||||
* \param min Minimum inclusive value of returned random number
|
||||
@ -338,7 +338,7 @@ Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);
|
||||
*
|
||||
* \returns Newly allocated random string; or NULL if length was invalid or string could not be allocated.
|
||||
*/
|
||||
char * SDLTest_RandomAsciiString();
|
||||
char * SDLTest_RandomAsciiString(void);
|
||||
|
||||
|
||||
/**
|
||||
@ -371,7 +371,7 @@ char * SDLTest_RandomAsciiStringOfSize(int size);
|
||||
/**
|
||||
* Returns the invocation count for the fuzzer since last ...FuzzerInit.
|
||||
*/
|
||||
int SDLTest_GetFuzzerInvocationCount();
|
||||
int SDLTest_GetFuzzerInvocationCount(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@ -379,6 +379,6 @@ int SDLTest_GetFuzzerInvocationCount();
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_fuzzer_h */
|
||||
#endif /* SDL_test_fuzzer_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -33,8 +33,8 @@
|
||||
Based on original GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_harness_h
|
||||
#define _SDL_test_harness_h
|
||||
#ifndef SDL_test_h_arness_h
|
||||
#define SDL_test_h_arness_h
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -98,6 +98,17 @@ typedef struct SDLTest_TestSuiteReference {
|
||||
} SDLTest_TestSuiteReference;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Generates a random run seed string for the harness. The generated seed will contain alphanumeric characters (0-9A-Z).
|
||||
*
|
||||
* Note: The returned string needs to be deallocated by the caller.
|
||||
*
|
||||
* \param length The length of the seed string to generate
|
||||
*
|
||||
* \returns The generated seed string
|
||||
*/
|
||||
char *SDLTest_GenerateRunSeed(const int length);
|
||||
|
||||
/**
|
||||
* \brief Execute a test suite using the given run seed and execution key.
|
||||
*
|
||||
@ -118,6 +129,6 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_harness_h */
|
||||
#endif /* SDL_test_h_arness_h */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -33,8 +33,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_images_h
|
||||
#define _SDL_test_images_h
|
||||
#ifndef SDL_test_images_h_
|
||||
#define SDL_test_images_h_
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
@ -55,17 +55,17 @@ typedef struct SDLTest_SurfaceImage_s {
|
||||
} SDLTest_SurfaceImage_t;
|
||||
|
||||
/* Test images */
|
||||
SDL_Surface *SDLTest_ImageBlit();
|
||||
SDL_Surface *SDLTest_ImageBlitColor();
|
||||
SDL_Surface *SDLTest_ImageBlitAlpha();
|
||||
SDL_Surface *SDLTest_ImageBlitBlendAdd();
|
||||
SDL_Surface *SDLTest_ImageBlitBlend();
|
||||
SDL_Surface *SDLTest_ImageBlitBlendMod();
|
||||
SDL_Surface *SDLTest_ImageBlitBlendNone();
|
||||
SDL_Surface *SDLTest_ImageBlitBlendAll();
|
||||
SDL_Surface *SDLTest_ImageFace();
|
||||
SDL_Surface *SDLTest_ImagePrimitives();
|
||||
SDL_Surface *SDLTest_ImagePrimitivesBlend();
|
||||
SDL_Surface *SDLTest_ImageBlit(void);
|
||||
SDL_Surface *SDLTest_ImageBlitColor(void);
|
||||
SDL_Surface *SDLTest_ImageBlitAlpha(void);
|
||||
SDL_Surface *SDLTest_ImageBlitBlendAdd(void);
|
||||
SDL_Surface *SDLTest_ImageBlitBlend(void);
|
||||
SDL_Surface *SDLTest_ImageBlitBlendMod(void);
|
||||
SDL_Surface *SDLTest_ImageBlitBlendNone(void);
|
||||
SDL_Surface *SDLTest_ImageBlitBlendAll(void);
|
||||
SDL_Surface *SDLTest_ImageFace(void);
|
||||
SDL_Surface *SDLTest_ImagePrimitives(void);
|
||||
SDL_Surface *SDLTest_ImagePrimitivesBlend(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@ -73,6 +73,6 @@ SDL_Surface *SDLTest_ImagePrimitivesBlend();
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_images_h */
|
||||
#endif /* SDL_test_images_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -33,8 +33,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_log_h
|
||||
#define _SDL_test_log_h
|
||||
#ifndef SDL_test_log_h_
|
||||
#define SDL_test_log_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -47,14 +47,14 @@ extern "C" {
|
||||
*
|
||||
* \param fmt Message to be logged
|
||||
*/
|
||||
void SDLTest_Log(const char *fmt, ...);
|
||||
void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* \brief Prints given message with a timestamp in the TEST category and the ERROR priority.
|
||||
*
|
||||
* \param fmt Message to be logged
|
||||
*/
|
||||
void SDLTest_LogError(const char *fmt, ...);
|
||||
void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@ -62,6 +62,6 @@ void SDLTest_LogError(const char *fmt, ...);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_log_h */
|
||||
#endif /* SDL_test_log_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -53,8 +53,8 @@
|
||||
***********************************************************************
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_md5_h
|
||||
#define _SDL_test_md5_h
|
||||
#ifndef SDL_test_md5_h_
|
||||
#define SDL_test_md5_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -78,9 +78,9 @@ extern "C" {
|
||||
/* ---------- Function Prototypes ------------- */
|
||||
|
||||
/**
|
||||
* /brief initialize the context
|
||||
* \brief initialize the context
|
||||
*
|
||||
* /param mdContext pointer to context variable
|
||||
* \param mdContext pointer to context variable
|
||||
*
|
||||
* Note: The function initializes the message-digest context
|
||||
* mdContext. Call before each new use of the context -
|
||||
@ -90,11 +90,11 @@ extern "C" {
|
||||
|
||||
|
||||
/**
|
||||
* /brief update digest from variable length data
|
||||
* \brief update digest from variable length data
|
||||
*
|
||||
* /param mdContext pointer to context variable
|
||||
* /param inBuf pointer to data array/string
|
||||
* /param inLen length of data array/string
|
||||
* \param mdContext pointer to context variable
|
||||
* \param inBuf pointer to data array/string
|
||||
* \param inLen length of data array/string
|
||||
*
|
||||
* Note: The function updates the message-digest context to account
|
||||
* for the presence of each of the characters inBuf[0..inLen-1]
|
||||
@ -105,10 +105,10 @@ extern "C" {
|
||||
unsigned int inLen);
|
||||
|
||||
|
||||
/*
|
||||
* /brief complete digest computation
|
||||
/**
|
||||
* \brief complete digest computation
|
||||
*
|
||||
* /param mdContext pointer to context variable
|
||||
* \param mdContext pointer to context variable
|
||||
*
|
||||
* Note: The function terminates the message-digest computation and
|
||||
* ends with the desired message digest in mdContext.digest[0..15].
|
||||
@ -124,6 +124,6 @@ extern "C" {
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_md5_h */
|
||||
#endif /* SDL_test_md5_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -20,13 +20,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL_blendmode.h
|
||||
* \file SDL_test_memory.h
|
||||
*
|
||||
* Header file declaring the SDL_BlendMode enumeration
|
||||
* Include file for SDL test framework.
|
||||
*
|
||||
* This code is a part of the SDL2_test library, not the main SDL library.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_blendmode_h
|
||||
#define _SDL_blendmode_h
|
||||
#ifndef SDL_test_memory_h_
|
||||
#define SDL_test_memory_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -34,23 +36,21 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief The blend mode used in SDL_RenderCopy() and drawing operations.
|
||||
* \brief Start tracking SDL memory allocations
|
||||
*
|
||||
* \note This should be called before any other SDL functions for complete tracking coverage
|
||||
*/
|
||||
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;
|
||||
int SDLTest_TrackAllocations();
|
||||
|
||||
/**
|
||||
* \brief Print a log of any outstanding allocations
|
||||
*
|
||||
* \note This can be called after SDL_Quit()
|
||||
*/
|
||||
void SDLTest_LogAllocations();
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
@ -58,6 +58,6 @@ typedef enum
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_video_h */
|
||||
#endif /* SDL_test_memory_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -37,8 +37,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _SDL_test_random_h
|
||||
#define _SDL_test_random_h
|
||||
#ifndef SDL_test_random_h_
|
||||
#define SDL_test_random_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
@ -110,6 +110,6 @@ extern "C" {
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_test_random_h */
|
||||
#endif /* SDL_test_random_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_thread_h
|
||||
#define _SDL_thread_h
|
||||
#ifndef SDL_thread_h_
|
||||
#define SDL_thread_h_
|
||||
|
||||
/**
|
||||
* \file SDL_thread.h
|
||||
@ -74,15 +74,15 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
|
||||
*
|
||||
* 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 SDL.DLL will
|
||||
* 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 SDL.DLL which uses this API,
|
||||
* then the RTL of SDL.DLL will be used to create the new thread, and if it's
|
||||
* 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:
|
||||
@ -90,14 +90,11 @@ typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
|
||||
* library!
|
||||
*/
|
||||
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
|
||||
#include <process.h> /* This has _beginthread() and _endthread() defined! */
|
||||
#include <process.h> /* _beginthreadex() and _endthreadex() */
|
||||
|
||||
typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
|
||||
unsigned (__stdcall *
|
||||
func) (void
|
||||
*),
|
||||
void *arg, unsigned,
|
||||
unsigned *threadID);
|
||||
typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread)
|
||||
(void *, unsigned, unsigned (__stdcall *func)(void *),
|
||||
void * /*arg*/, unsigned, unsigned * /* threadID */);
|
||||
typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
|
||||
|
||||
/**
|
||||
@ -118,6 +115,30 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
|
||||
#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 <process.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#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
|
||||
|
||||
/**
|
||||
@ -153,7 +174,7 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetThreadName(SDL_Thread *thread);
|
||||
|
||||
/**
|
||||
* Get the thread identifier for the value thread.
|
||||
* Get the thread identifier for the current thread.
|
||||
*/
|
||||
extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
|
||||
|
||||
@ -165,7 +186,7 @@ extern DECLSPEC SDL_threadID SDLCALL SDL_ThreadID(void);
|
||||
extern DECLSPEC SDL_threadID SDLCALL SDL_GetThreadID(SDL_Thread * thread);
|
||||
|
||||
/**
|
||||
* Set the priority for the value thread
|
||||
* Set the priority for the current thread
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetThreadPriority(SDL_ThreadPriority priority);
|
||||
|
||||
@ -233,9 +254,9 @@ extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
|
||||
* if (!thread_local_storage) {
|
||||
* thread_local_storage = SDL_TLSCreate();
|
||||
* }
|
||||
* SDL_AtomicUnLock(&tls_lock);
|
||||
* SDL_AtomicUnlock(&tls_lock);
|
||||
* }
|
||||
* SDL_TLSSet(thread_local_storage, value);
|
||||
* SDL_TLSSet(thread_local_storage, value, 0);
|
||||
* }
|
||||
*
|
||||
* void *GetMyThreadData(void)
|
||||
@ -250,11 +271,11 @@ extern DECLSPEC void SDLCALL SDL_DetachThread(SDL_Thread * thread);
|
||||
extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
|
||||
|
||||
/**
|
||||
* \brief Get the value associated with a thread local storage ID for the value thread.
|
||||
* \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 value thread, or NULL if no value has been set.
|
||||
* \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()
|
||||
@ -262,10 +283,10 @@ extern DECLSPEC SDL_TLSID SDLCALL SDL_TLSCreate(void);
|
||||
extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
|
||||
|
||||
/**
|
||||
* \brief Set the value associated with a thread local storage ID for the value thread.
|
||||
* \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 value thread
|
||||
* \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
|
||||
@ -273,7 +294,7 @@ extern DECLSPEC void * SDLCALL SDL_TLSGet(SDL_TLSID id);
|
||||
* \sa SDL_TLSCreate()
|
||||
* \sa SDL_TLSGet()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (*destructor)(void*));
|
||||
extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (SDLCALL *destructor)(void*));
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
@ -282,6 +303,6 @@ extern DECLSPEC int SDLCALL SDL_TLSSet(SDL_TLSID id, const void *value, void (*d
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_thread_h */
|
||||
#endif /* SDL_thread_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -19,8 +19,8 @@
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_timer_h
|
||||
#define _SDL_timer_h
|
||||
#ifndef SDL_timer_h_
|
||||
#define SDL_timer_h_
|
||||
|
||||
/**
|
||||
* \file SDL_timer.h
|
||||
@ -56,7 +56,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetTicks(void);
|
||||
#define SDL_TICKS_PASSED(A, B) ((Sint32)((B) - (A)) <= 0)
|
||||
|
||||
/**
|
||||
* \brief Get the value value of the high resolution counter
|
||||
* \brief Get the current value of the high resolution counter
|
||||
*/
|
||||
extern DECLSPEC Uint64 SDLCALL SDL_GetPerformanceCounter(void);
|
||||
|
||||
@ -73,7 +73,7 @@ extern DECLSPEC void SDLCALL SDL_Delay(Uint32 ms);
|
||||
/**
|
||||
* Function prototype for the timer callback function.
|
||||
*
|
||||
* The callback function is passed the value timer interval and returns
|
||||
* 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.
|
||||
@ -88,7 +88,7 @@ typedef int SDL_TimerID;
|
||||
/**
|
||||
* \brief Add a new timer to the pool of timers already running.
|
||||
*
|
||||
* \return A timer ID, or NULL when an error occurs.
|
||||
* \return A timer ID, or 0 when an error occurs.
|
||||
*/
|
||||
extern DECLSPEC SDL_TimerID SDLCALL SDL_AddTimer(Uint32 interval,
|
||||
SDL_TimerCallback callback,
|
||||
@ -110,6 +110,6 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RemoveTimer(SDL_TimerID id);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_timer_h */
|
||||
#endif /* SDL_timer_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Include file for SDL touch event handling.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_touch_h
|
||||
#define _SDL_touch_h
|
||||
#ifndef SDL_touch_h_
|
||||
#define SDL_touch_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
@ -81,6 +81,6 @@ extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_touch_h */
|
||||
#endif /* SDL_touch_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -22,11 +22,11 @@
|
||||
/**
|
||||
* \file SDL_version.h
|
||||
*
|
||||
* This header defines the value SDL version.
|
||||
* This header defines the current SDL version.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_version_h
|
||||
#define _SDL_version_h
|
||||
#ifndef SDL_version_h_
|
||||
#define SDL_version_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
@ -59,7 +59,7 @@ typedef struct SDL_version
|
||||
*/
|
||||
#define SDL_MAJOR_VERSION 2
|
||||
#define SDL_MINOR_VERSION 0
|
||||
#define SDL_PATCHLEVEL 3
|
||||
#define SDL_PATCHLEVEL 7
|
||||
|
||||
/**
|
||||
* \brief Macro to determine SDL version program was compiled against.
|
||||
@ -95,7 +95,7 @@ typedef struct SDL_version
|
||||
((X)*1000 + (Y)*100 + (Z))
|
||||
|
||||
/**
|
||||
* This is the version number macro for the value SDL version.
|
||||
* This is the version number macro for the current SDL version.
|
||||
*/
|
||||
#define SDL_COMPILEDVERSION \
|
||||
SDL_VERSIONNUM(SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL)
|
||||
@ -110,8 +110,8 @@ typedef struct SDL_version
|
||||
* \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
|
||||
* value version will be different than the version you compiled against.
|
||||
* This function returns the value version, while SDL_VERSION() is a
|
||||
* 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
|
||||
@ -157,6 +157,6 @@ extern DECLSPEC int SDLCALL SDL_GetRevisionNumber(void);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_version_h */
|
||||
#endif /* SDL_version_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -25,8 +25,8 @@
|
||||
* Header file for SDL video functions.
|
||||
*/
|
||||
|
||||
#ifndef _SDL_video_h
|
||||
#define _SDL_video_h
|
||||
#ifndef SDL_video_h_
|
||||
#define SDL_video_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_pixels.h"
|
||||
@ -53,8 +53,8 @@ extern "C" {
|
||||
typedef struct
|
||||
{
|
||||
Uint32 format; /**< pixel format */
|
||||
int w; /**< width */
|
||||
int h; /**< height */
|
||||
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;
|
||||
@ -83,6 +83,7 @@ typedef struct
|
||||
* \sa SDL_SetWindowPosition()
|
||||
* \sa SDL_SetWindowSize()
|
||||
* \sa SDL_SetWindowBordered()
|
||||
* \sa SDL_SetWindowResizable()
|
||||
* \sa SDL_SetWindowTitle()
|
||||
* \sa SDL_ShowWindow()
|
||||
*/
|
||||
@ -95,6 +96,7 @@ typedef struct SDL_Window SDL_Window;
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/* !!! FIXME: change this to name = (1<<x). */
|
||||
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
|
||||
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
|
||||
SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
|
||||
@ -108,13 +110,20 @@ typedef enum
|
||||
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
||||
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
|
||||
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
||||
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000 /**< window should be created in high-DPI mode if supported */
|
||||
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000, /**< window should be created in high-DPI mode if supported */
|
||||
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to INPUT_GRABBED) */
|
||||
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
||||
SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
|
||||
SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
|
||||
SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
|
||||
SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
|
||||
SDL_WINDOW_VULKAN = 0x10000000 /**< window usable for Vulkan surface */
|
||||
} SDL_WindowFlags;
|
||||
|
||||
/**
|
||||
* \brief Used to indicate that you don't care what the window position is.
|
||||
*/
|
||||
#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000
|
||||
#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
|
||||
#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
|
||||
#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
|
||||
#define SDL_WINDOWPOS_ISUNDEFINED(X) \
|
||||
@ -123,7 +132,7 @@ typedef enum
|
||||
/**
|
||||
* \brief Used to indicate that the window position should be centered.
|
||||
*/
|
||||
#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000
|
||||
#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
|
||||
#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
|
||||
#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
|
||||
#define SDL_WINDOWPOS_ISCENTERED(X) \
|
||||
@ -142,7 +151,9 @@ typedef enum
|
||||
SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
|
||||
*/
|
||||
SDL_WINDOWEVENT_RESIZED, /**< Window has been resized to data1xdata2 */
|
||||
SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as a result of an API call or through the system or user changing the window size. */
|
||||
SDL_WINDOWEVENT_SIZE_CHANGED, /**< The window size has changed, either as
|
||||
a result of an API call or through the
|
||||
system or user changing the window size. */
|
||||
SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
|
||||
SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
|
||||
SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
|
||||
@ -151,8 +162,9 @@ typedef enum
|
||||
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
|
||||
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
|
||||
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
|
||||
SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the
|
||||
window be closed */
|
||||
SDL_WINDOWEVENT_CLOSE, /**< The window manager requests that the window be closed */
|
||||
SDL_WINDOWEVENT_TAKE_FOCUS, /**< Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) */
|
||||
SDL_WINDOWEVENT_HIT_TEST /**< Window had a hit test that wasn't SDL_HITTEST_NORMAL. */
|
||||
} SDL_WindowEventID;
|
||||
|
||||
/**
|
||||
@ -188,14 +200,17 @@ typedef enum
|
||||
SDL_GL_CONTEXT_FLAGS,
|
||||
SDL_GL_CONTEXT_PROFILE_MASK,
|
||||
SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
|
||||
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
|
||||
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
|
||||
SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
|
||||
SDL_GL_CONTEXT_RESET_NOTIFICATION,
|
||||
SDL_GL_CONTEXT_NO_ERROR
|
||||
} SDL_GLattr;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_GL_CONTEXT_PROFILE_CORE = 0x0001,
|
||||
SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002,
|
||||
SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /* GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
|
||||
SDL_GL_CONTEXT_PROFILE_ES = 0x0004 /**< GLX_CONTEXT_ES2_PROFILE_BIT_EXT */
|
||||
} SDL_GLprofile;
|
||||
|
||||
typedef enum
|
||||
@ -206,6 +221,17 @@ typedef enum
|
||||
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
|
||||
} SDL_GLcontextFlag;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000,
|
||||
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001
|
||||
} SDL_GLcontextReleaseFlag;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
|
||||
SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001
|
||||
} SDL_GLContextResetNotification;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
@ -254,7 +280,7 @@ extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
|
||||
/**
|
||||
* \brief Returns the name of the currently initialized video driver.
|
||||
*
|
||||
* \return The name of the value video driver or NULL if no driver
|
||||
* \return The name of the current video driver or NULL if no driver
|
||||
* has been initialized
|
||||
*
|
||||
* \sa SDL_GetNumVideoDrivers()
|
||||
@ -288,6 +314,37 @@ extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Get the dots/pixels-per-inch for a display
|
||||
*
|
||||
* \note Diagonal, horizontal and vertical DPI can all be optionally
|
||||
* returned if the parameter is non-NULL.
|
||||
*
|
||||
* \return 0 on success, or -1 if no DPI information is available or the index is out of range.
|
||||
*
|
||||
* \sa SDL_GetNumVideoDisplays()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
|
||||
|
||||
/**
|
||||
* \brief Get the usable desktop area represented by a display, with the
|
||||
* primary display located at 0,0
|
||||
*
|
||||
* This is the same area as SDL_GetDisplayBounds() reports, but with portions
|
||||
* reserved by the system removed. For example, on Mac OS X, this subtracts
|
||||
* the area occupied by the menu bar and dock.
|
||||
*
|
||||
* Setting a window to be fullscreen generally bypasses these unusable areas,
|
||||
* so these are good guidelines for the maximum space available to a
|
||||
* non-fullscreen window.
|
||||
*
|
||||
* \return 0 on success, or -1 if the index is out of range.
|
||||
*
|
||||
* \sa SDL_GetDisplayBounds()
|
||||
* \sa SDL_GetNumVideoDisplays()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Returns the number of available display modes.
|
||||
*
|
||||
@ -315,7 +372,7 @@ extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
|
||||
extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
|
||||
|
||||
/**
|
||||
* \brief Fill in information about the value display mode.
|
||||
* \brief Fill in information about the current display mode.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
|
||||
|
||||
@ -392,18 +449,39 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
||||
* ::SDL_WINDOWPOS_UNDEFINED.
|
||||
* \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
||||
* ::SDL_WINDOWPOS_UNDEFINED.
|
||||
* \param w The width of the window.
|
||||
* \param h The height of the window.
|
||||
* \param w The width of the window, in screen coordinates.
|
||||
* \param h The height of the window, in screen coordinates.
|
||||
* \param flags The flags for the window, a mask of any of the following:
|
||||
* ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL,
|
||||
* ::SDL_WINDOW_HIDDEN, ::SDL_WINDOW_BORDERLESS,
|
||||
* ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
|
||||
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED,
|
||||
* ::SDL_WINDOW_ALLOW_HIGHDPI.
|
||||
* ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN.
|
||||
*
|
||||
* \return The id of the window created, or zero if window creation failed.
|
||||
* \return The created window, or NULL if window creation failed.
|
||||
*
|
||||
* If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
|
||||
* in pixels may differ from its size in screen coordinates on platforms with
|
||||
* high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query
|
||||
* the client area's size in screen coordinates, and SDL_GL_GetDrawableSize(),
|
||||
* SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to query the
|
||||
* drawable size in pixels.
|
||||
*
|
||||
* If the window is created with any of the SDL_WINDOW_OPENGL or
|
||||
* SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
|
||||
* (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
|
||||
* corrensponding UnloadLibrary function is called by SDL_DestroyWindow().
|
||||
*
|
||||
* If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
|
||||
* SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
|
||||
*
|
||||
* \note On non-Apple devices, SDL requires you to either not link to the
|
||||
* Vulkan loader or link to a dynamic library version. This limitation
|
||||
* may be removed in a future version of SDL.
|
||||
*
|
||||
* \sa SDL_DestroyWindow()
|
||||
* \sa SDL_GL_LoadLibrary()
|
||||
* \sa SDL_Vulkan_LoadLibrary()
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
|
||||
int x, int y, int w,
|
||||
@ -414,7 +492,7 @@ extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
|
||||
*
|
||||
* \param data A pointer to driver-dependent window creation data
|
||||
*
|
||||
* \return The id of the window created, or zero if window creation failed.
|
||||
* \return The created window, or NULL if window creation failed.
|
||||
*
|
||||
* \sa SDL_DestroyWindow()
|
||||
*/
|
||||
@ -493,10 +571,10 @@ extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
|
||||
* \brief Set the position of a window.
|
||||
*
|
||||
* \param window The window to reposition.
|
||||
* \param x The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
|
||||
::SDL_WINDOWPOS_UNDEFINED.
|
||||
* \param y The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
|
||||
::SDL_WINDOWPOS_UNDEFINED.
|
||||
* \param x The x coordinate of the window in screen coordinates, or
|
||||
* ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.
|
||||
* \param y The y coordinate of the window in screen coordinates, or
|
||||
* ::SDL_WINDOWPOS_CENTERED or ::SDL_WINDOWPOS_UNDEFINED.
|
||||
*
|
||||
* \note The window coordinate origin is the upper left of the display.
|
||||
*
|
||||
@ -509,8 +587,10 @@ extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
|
||||
* \brief Get the position of a window.
|
||||
*
|
||||
* \param window The window to query.
|
||||
* \param x Pointer to variable for storing the x position, may be NULL
|
||||
* \param y Pointer to variable for storing the y position, may be NULL
|
||||
* \param x Pointer to variable for storing the x position, in screen
|
||||
* coordinates. May be NULL.
|
||||
* \param y Pointer to variable for storing the y position, in screen
|
||||
* coordinates. May be NULL.
|
||||
*
|
||||
* \sa SDL_SetWindowPosition()
|
||||
*/
|
||||
@ -521,13 +601,19 @@ extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
|
||||
* \brief Set the size of a window's client area.
|
||||
*
|
||||
* \param window The window to resize.
|
||||
* \param w The width of the window, must be >0
|
||||
* \param h The height of the window, must be >0
|
||||
* \param w The width of the window, in screen coordinates. Must be >0.
|
||||
* \param h The height of the window, in screen coordinates. Must be >0.
|
||||
*
|
||||
* \note You can't change the size of a fullscreen window, it automatically
|
||||
* matches the size of the display mode.
|
||||
* \note Fullscreen windows automatically match the size of the display mode,
|
||||
* and you should use SDL_SetWindowDisplayMode() to change their size.
|
||||
*
|
||||
* The window size in screen coordinates may differ from the size in pixels, if
|
||||
* the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with
|
||||
* high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or
|
||||
* SDL_GetRendererOutputSize() to get the real client area size in pixels.
|
||||
*
|
||||
* \sa SDL_GetWindowSize()
|
||||
* \sa SDL_SetWindowDisplayMode()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
||||
int h);
|
||||
@ -536,14 +622,40 @@ extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
||||
* \brief Get the size of a window's client area.
|
||||
*
|
||||
* \param window The window to query.
|
||||
* \param w Pointer to variable for storing the width, may be NULL
|
||||
* \param h Pointer to variable for storing the height, may be NULL
|
||||
* \param w Pointer to variable for storing the width, in screen
|
||||
* coordinates. May be NULL.
|
||||
* \param h Pointer to variable for storing the height, in screen
|
||||
* coordinates. May be NULL.
|
||||
*
|
||||
* The window size in screen coordinates may differ from the size in pixels, if
|
||||
* the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a platform with
|
||||
* high-dpi support (e.g. iOS or OS X). Use SDL_GL_GetDrawableSize() or
|
||||
* SDL_GetRendererOutputSize() to get the real client area size in pixels.
|
||||
*
|
||||
* \sa SDL_SetWindowSize()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
|
||||
int *h);
|
||||
|
||||
/**
|
||||
* \brief Get the size of a window's borders (decorations) around the client area.
|
||||
*
|
||||
* \param window The window to query.
|
||||
* \param top Pointer to variable for storing the size of the top border. NULL is permitted.
|
||||
* \param left Pointer to variable for storing the size of the left border. NULL is permitted.
|
||||
* \param bottom Pointer to variable for storing the size of the bottom border. NULL is permitted.
|
||||
* \param right Pointer to variable for storing the size of the right border. NULL is permitted.
|
||||
*
|
||||
* \return 0 on success, or -1 if getting this information is not supported.
|
||||
*
|
||||
* \note if this function fails (returns -1), the size values will be
|
||||
* initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as
|
||||
* if the window in question was borderless.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
|
||||
int *top, int *left,
|
||||
int *bottom, int *right);
|
||||
|
||||
/**
|
||||
* \brief Set the minimum size of a window's client area.
|
||||
*
|
||||
@ -619,6 +731,23 @@ extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
|
||||
extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
|
||||
SDL_bool bordered);
|
||||
|
||||
/**
|
||||
* \brief Set the user-resizable state of a window.
|
||||
*
|
||||
* This will add or remove the window's SDL_WINDOW_RESIZABLE flag and
|
||||
* allow/disallow user resizing of the window. This is a no-op if the
|
||||
* window's resizable state already matches the requested state.
|
||||
*
|
||||
* \param window The window of which to change the resizable state.
|
||||
* \param resizable SDL_TRUE to allow resizing, SDL_FALSE to disallow.
|
||||
*
|
||||
* \note You can't change the resizable state of a fullscreen window.
|
||||
*
|
||||
* \sa SDL_GetWindowFlags()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
|
||||
SDL_bool resizable);
|
||||
|
||||
/**
|
||||
* \brief Show a window.
|
||||
*
|
||||
@ -702,7 +831,7 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
|
||||
* \return 0 on success, or -1 on error.
|
||||
*
|
||||
* \sa SDL_GetWindowSurface()
|
||||
* \sa SDL_UpdateWindowSurfaceRect()
|
||||
* \sa SDL_UpdateWindowSurface()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
|
||||
const SDL_Rect * rects,
|
||||
@ -714,6 +843,9 @@ extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
|
||||
* \param window The window for which the input grab mode should be set.
|
||||
* \param grabbed This is SDL_TRUE to grab input, and SDL_FALSE to release input.
|
||||
*
|
||||
* If the caller enables a grab while another window is currently grabbed,
|
||||
* the other window loses its grab in favor of the caller's window.
|
||||
*
|
||||
* \sa SDL_GetWindowGrab()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
||||
@ -728,6 +860,15 @@ extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Get the window that currently has an input grab enabled.
|
||||
*
|
||||
* \return This returns the window if input is grabbed, and NULL otherwise.
|
||||
*
|
||||
* \sa SDL_SetWindowGrab()
|
||||
*/
|
||||
extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
|
||||
|
||||
/**
|
||||
* \brief Set the brightness (gamma correction) for a window.
|
||||
*
|
||||
@ -747,6 +888,58 @@ extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float b
|
||||
*/
|
||||
extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Set the opacity for a window
|
||||
*
|
||||
* \param window The window which will be made transparent or opaque
|
||||
* \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
|
||||
* clamped internally between 0.0f and 1.0f.
|
||||
*
|
||||
* \return 0 on success, or -1 if setting the opacity isn't supported.
|
||||
*
|
||||
* \sa SDL_GetWindowOpacity()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
|
||||
|
||||
/**
|
||||
* \brief Get the opacity of a window.
|
||||
*
|
||||
* If transparency isn't supported on this platform, opacity will be reported
|
||||
* as 1.0f without error.
|
||||
*
|
||||
* \param window The window in question.
|
||||
* \param out_opacity Opacity (0.0f - transparent, 1.0f - opaque)
|
||||
*
|
||||
* \return 0 on success, or -1 on error (invalid window, etc).
|
||||
*
|
||||
* \sa SDL_SetWindowOpacity()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
|
||||
|
||||
/**
|
||||
* \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
|
||||
*
|
||||
* \param modal_window The window that should be modal
|
||||
* \param parent_window The parent window
|
||||
*
|
||||
* \return 0 on success, or -1 otherwise.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
|
||||
|
||||
/**
|
||||
* \brief Explicitly sets input focus to the window.
|
||||
*
|
||||
* You almost certainly want SDL_RaiseWindow() instead of this function. Use
|
||||
* this with caution, as you might give focus to a window that's completely
|
||||
* obscured by other windows.
|
||||
*
|
||||
* \param window The window that should get the input focus
|
||||
*
|
||||
* \return 0 on success, or -1 otherwise.
|
||||
* \sa SDL_RaiseWindow()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Set the gamma ramp for a window.
|
||||
*
|
||||
@ -790,6 +983,75 @@ extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
|
||||
Uint16 * green,
|
||||
Uint16 * blue);
|
||||
|
||||
/**
|
||||
* \brief Possible return values from the SDL_HitTest callback.
|
||||
*
|
||||
* \sa SDL_HitTest
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_HITTEST_NORMAL, /**< Region is normal. No special properties. */
|
||||
SDL_HITTEST_DRAGGABLE, /**< Region can drag entire window. */
|
||||
SDL_HITTEST_RESIZE_TOPLEFT,
|
||||
SDL_HITTEST_RESIZE_TOP,
|
||||
SDL_HITTEST_RESIZE_TOPRIGHT,
|
||||
SDL_HITTEST_RESIZE_RIGHT,
|
||||
SDL_HITTEST_RESIZE_BOTTOMRIGHT,
|
||||
SDL_HITTEST_RESIZE_BOTTOM,
|
||||
SDL_HITTEST_RESIZE_BOTTOMLEFT,
|
||||
SDL_HITTEST_RESIZE_LEFT
|
||||
} SDL_HitTestResult;
|
||||
|
||||
/**
|
||||
* \brief Callback used for hit-testing.
|
||||
*
|
||||
* \sa SDL_SetWindowHitTest
|
||||
*/
|
||||
typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
|
||||
const SDL_Point *area,
|
||||
void *data);
|
||||
|
||||
/**
|
||||
* \brief Provide a callback that decides if a window region has special properties.
|
||||
*
|
||||
* Normally windows are dragged and resized by decorations provided by the
|
||||
* system window manager (a title bar, borders, etc), but for some apps, it
|
||||
* makes sense to drag them from somewhere else inside the window itself; for
|
||||
* example, one might have a borderless window that wants to be draggable
|
||||
* from any part, or simulate its own title bar, etc.
|
||||
*
|
||||
* This function lets the app provide a callback that designates pieces of
|
||||
* a given window as special. This callback is run during event processing
|
||||
* if we need to tell the OS to treat a region of the window specially; the
|
||||
* use of this callback is known as "hit testing."
|
||||
*
|
||||
* Mouse input may not be delivered to your application if it is within
|
||||
* a special area; the OS will often apply that input to moving the window or
|
||||
* resizing the window and not deliver it to the application.
|
||||
*
|
||||
* Specifying NULL for a callback disables hit-testing. Hit-testing is
|
||||
* disabled by default.
|
||||
*
|
||||
* Platforms that don't support this functionality will return -1
|
||||
* unconditionally, even if you're attempting to disable hit-testing.
|
||||
*
|
||||
* Your callback may fire at any time, and its firing does not indicate any
|
||||
* specific behavior (for example, on Windows, this certainly might fire
|
||||
* when the OS is deciding whether to drag your window, but it fires for lots
|
||||
* of other reasons, too, some unrelated to anything you probably care about
|
||||
* _and when the mouse isn't actually at the location it is testing_).
|
||||
* Since this can fire at any time, you should try to keep your callback
|
||||
* efficient, devoid of allocations, etc.
|
||||
*
|
||||
* \param window The window to set hit-testing on.
|
||||
* \param callback The callback to call when doing a hit-test.
|
||||
* \param callback_data An app-defined void pointer passed to the callback.
|
||||
* \return 0 on success, -1 on error (including unsupported).
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
|
||||
SDL_HitTest callback,
|
||||
void *callback_data);
|
||||
|
||||
/**
|
||||
* \brief Destroy a window.
|
||||
*/
|
||||
@ -797,7 +1059,7 @@ extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Returns whether the screensaver is currently enabled (default on).
|
||||
* \brief Returns whether the screensaver is currently enabled (default off).
|
||||
*
|
||||
* \sa SDL_EnableScreenSaver()
|
||||
* \sa SDL_DisableScreenSaver()
|
||||
@ -859,7 +1121,7 @@ extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
|
||||
extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
|
||||
|
||||
/**
|
||||
* \brief Return true if an OpenGL extension is supported for the value
|
||||
* \brief Return true if an OpenGL extension is supported for the current
|
||||
* context.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
|
||||
@ -872,17 +1134,22 @@ extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
|
||||
|
||||
/**
|
||||
* \brief Set an OpenGL window attribute before window creation.
|
||||
*
|
||||
* \return 0 on success, or -1 if the attribute could not be set.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
|
||||
|
||||
/**
|
||||
* \brief Get the actual value for an attribute from the value context.
|
||||
* \brief Get the actual value for an attribute from the current context.
|
||||
*
|
||||
* \return 0 on success, or -1 if the attribute could not be retrieved.
|
||||
* The integer at \c value will be modified in either case.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
|
||||
|
||||
/**
|
||||
* \brief Create an OpenGL context for use with an OpenGL window, and make it
|
||||
* value.
|
||||
* current.
|
||||
*
|
||||
* \sa SDL_GL_DeleteContext()
|
||||
*/
|
||||
@ -908,13 +1175,14 @@ extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
|
||||
extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
|
||||
|
||||
/**
|
||||
* \brief Get the size of a window's underlying drawable (for use with glViewport).
|
||||
* \brief Get the size of a window's underlying drawable in pixels (for use
|
||||
* with glViewport).
|
||||
*
|
||||
* \param window Window from which the drawable size should be queried
|
||||
* \param w Pointer to variable for storing the width, may be NULL
|
||||
* \param h Pointer to variable for storing the height, may be NULL
|
||||
* \param w Pointer to variable for storing the width in pixels, may be NULL
|
||||
* \param h Pointer to variable for storing the height in pixels, may be NULL
|
||||
*
|
||||
* This may differ from SDL_GetWindowSize if we're rendering to a high-DPI
|
||||
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
||||
* drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
|
||||
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
||||
* by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
||||
@ -926,7 +1194,7 @@ extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
|
||||
int *h);
|
||||
|
||||
/**
|
||||
* \brief Set the swap interval for the value OpenGL context.
|
||||
* \brief Set the swap interval for the current OpenGL context.
|
||||
*
|
||||
* \param interval 0 for immediate updates, 1 for updates synchronized with the
|
||||
* vertical retrace. If the system supports it, you may
|
||||
@ -940,13 +1208,13 @@ extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
|
||||
extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
|
||||
|
||||
/**
|
||||
* \brief Get the swap interval for the value OpenGL context.
|
||||
* \brief Get the swap interval for the current OpenGL context.
|
||||
*
|
||||
* \return 0 if there is no vertical retrace synchronization, 1 if the buffer
|
||||
* swap is synchronized with the vertical retrace, and -1 if late
|
||||
* swaps happen immediately instead of waiting for the next retrace.
|
||||
* If the system can't determine the swap interval, or there isn't a
|
||||
* valid value context, this will return 0 as a safe default.
|
||||
* valid current context, this will return 0 as a safe default.
|
||||
*
|
||||
* \sa SDL_GL_SetSwapInterval()
|
||||
*/
|
||||
@ -974,6 +1242,6 @@ extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* _SDL_video_h */
|
||||
#endif /* SDL_video_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
257
bsp/simulator/SDL2-2.0.7/include/SDL_vulkan.h
Normal file
257
bsp/simulator/SDL2-2.0.7/include/SDL_vulkan.h
Normal file
@ -0,0 +1,257 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 2017, Mark Callow
|
||||
|
||||
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_vulkan.h
|
||||
*
|
||||
* Header file for functions to creating Vulkan surfaces on SDL windows.
|
||||
*/
|
||||
|
||||
#ifndef SDL_vulkan_h_
|
||||
#define SDL_vulkan_h_
|
||||
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Avoid including vulkan.h, don't define VkInstance if it's already included */
|
||||
#ifdef VULKAN_H_
|
||||
#define NO_SDL_VULKAN_TYPEDEFS
|
||||
#endif
|
||||
#ifndef NO_SDL_VULKAN_TYPEDEFS
|
||||
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
|
||||
|
||||
#if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
|
||||
#else
|
||||
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
|
||||
#endif
|
||||
|
||||
VK_DEFINE_HANDLE(VkInstance)
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
|
||||
|
||||
#endif /* !NO_SDL_VULKAN_TYPEDEFS */
|
||||
|
||||
typedef VkInstance SDL_vulkanInstance;
|
||||
typedef VkSurfaceKHR SDL_vulkanSurface; /* for compatibility with Tizen */
|
||||
|
||||
/**
|
||||
* \name Vulkan support functions
|
||||
*
|
||||
* \note SDL_Vulkan_GetInstanceExtensions & SDL_Vulkan_CreateSurface API
|
||||
* is compatable with Tizen's implementation of Vulkan in SDL.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
/**
|
||||
* \brief Dynamically load a Vulkan loader library.
|
||||
*
|
||||
* \param [in] path The platform dependent Vulkan loader library name, or
|
||||
* \c NULL to open the default Vulkan loader library.
|
||||
*
|
||||
* \return \c 0 on success, or \c -1 if the library couldn't be loaded.
|
||||
*
|
||||
* This should be done after initializing the video driver, but before
|
||||
* creating any Vulkan windows. If no Vulkan loader library is loaded, the
|
||||
* default library will be loaded upon creation of the first Vulkan window.
|
||||
*
|
||||
* \note If you specify a non-NULL \a path, you should retrieve all of the
|
||||
* Vulkan functions used in your program from the dynamic library using
|
||||
* \c SDL_Vulkan_GetVkGetInstanceProcAddr() unless you can guarantee
|
||||
* \a path points to the same vulkan loader library that you linked to.
|
||||
*
|
||||
* \note On Apple devices, if \a path is NULL, SDL will attempt to find
|
||||
* the vkGetInstanceProcAddr address within all the mach-o images of
|
||||
* the current process. This is because the currently (v0.17.0)
|
||||
* recommended MoltenVK (Vulkan on Metal) usage is as a static library.
|
||||
* If it is not found then SDL will attempt to load \c libMoltenVK.dylib.
|
||||
* Applications using the dylib alternative therefore do not need to do
|
||||
* anything special when calling SDL.
|
||||
*
|
||||
* \note On non-Apple devices, SDL requires you to either not link to the
|
||||
* Vulkan loader or link to a dynamic library version. This limitation
|
||||
* may be removed in a future version of SDL.
|
||||
*
|
||||
* \note This function will fail if there are no working Vulkan drivers
|
||||
* installed.
|
||||
*
|
||||
* \sa SDL_Vulkan_GetVkGetInstanceProcAddr()
|
||||
* \sa SDL_Vulkan_UnloadLibrary()
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Vulkan_LoadLibrary(const char *path);
|
||||
|
||||
/**
|
||||
* \brief Get the address of the \c vkGetInstanceProcAddr function.
|
||||
*
|
||||
* \note This should be called after either calling SDL_Vulkan_LoadLibrary
|
||||
* or creating an SDL_Window with the SDL_WINDOW_VULKAN flag.
|
||||
*/
|
||||
extern DECLSPEC void *SDLCALL SDL_Vulkan_GetVkGetInstanceProcAddr(void);
|
||||
|
||||
/**
|
||||
* \brief Unload the Vulkan loader library previously loaded by
|
||||
* \c SDL_Vulkan_LoadLibrary().
|
||||
*
|
||||
* \sa SDL_Vulkan_LoadLibrary()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Vulkan_UnloadLibrary(void);
|
||||
|
||||
/**
|
||||
* \brief Get the names of the Vulkan instance extensions needed to create
|
||||
* a surface with \c SDL_Vulkan_CreateSurface().
|
||||
*
|
||||
* \param [in] window Window for which the required Vulkan instance
|
||||
* extensions should be retrieved
|
||||
* \param [in,out] count pointer to an \c unsigned related to the number of
|
||||
* required Vulkan instance extensions
|
||||
* \param [out] names \c NULL or a pointer to an array to be filled with the
|
||||
* required Vulkan instance extensions
|
||||
*
|
||||
* \return \c SDL_TRUE on success, \c SDL_FALSE on error.
|
||||
*
|
||||
* If \a pNames is \c NULL, then the number of required Vulkan instance
|
||||
* extensions is returned in pCount. Otherwise, \a pCount must point to a
|
||||
* variable set to the number of elements in the \a pNames array, and on
|
||||
* return the variable is overwritten with the number of names actually
|
||||
* written to \a pNames. If \a pCount is less than the number of required
|
||||
* extensions, at most \a pCount structures will be written. If \a pCount
|
||||
* is smaller than the number of required extensions, \c SDL_FALSE will be
|
||||
* returned instead of \c SDL_TRUE, to indicate that not all the required
|
||||
* extensions were returned.
|
||||
*
|
||||
* \note The returned list of extensions will contain \c VK_KHR_surface
|
||||
* and zero or more platform specific extensions
|
||||
*
|
||||
* \note The extension names queried here must be enabled when calling
|
||||
* VkCreateInstance, otherwise surface creation will fail.
|
||||
*
|
||||
* \note \c window should have been created with the \c SDL_WINDOW_VULKAN flag.
|
||||
*
|
||||
* \code
|
||||
* unsigned int count;
|
||||
* // get count of required extensions
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, NULL))
|
||||
* handle_error();
|
||||
*
|
||||
* static const char *const additionalExtensions[] =
|
||||
* {
|
||||
* VK_EXT_DEBUG_REPORT_EXTENSION_NAME, // example additional extension
|
||||
* };
|
||||
* size_t additionalExtensionsCount = sizeof(additionalExtensions) / sizeof(additionalExtensions[0]);
|
||||
* size_t extensionCount = count + additionalExtensionsCount;
|
||||
* const char **names = malloc(sizeof(const char *) * extensionCount);
|
||||
* if(!names)
|
||||
* handle_error();
|
||||
*
|
||||
* // get names of required extensions
|
||||
* if(!SDL_Vulkan_GetInstanceExtensions(window, &count, names))
|
||||
* handle_error();
|
||||
*
|
||||
* // copy additional extensions after required extensions
|
||||
* for(size_t i = 0; i < additionalExtensionsCount; i++)
|
||||
* names[i + count] = additionalExtensions[i];
|
||||
*
|
||||
* VkInstanceCreateInfo instanceCreateInfo = {};
|
||||
* instanceCreateInfo.enabledExtensionCount = extensionCount;
|
||||
* instanceCreateInfo.ppEnabledExtensionNames = names;
|
||||
* // fill in rest of instanceCreateInfo
|
||||
*
|
||||
* VkInstance instance;
|
||||
* // create the Vulkan instance
|
||||
* VkResult result = vkCreateInstance(&instanceCreateInfo, NULL, &instance);
|
||||
* free(names);
|
||||
* \endcode
|
||||
*
|
||||
* \sa SDL_Vulkan_CreateSurface()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetInstanceExtensions(
|
||||
SDL_Window *window,
|
||||
unsigned int *pCount,
|
||||
const char **pNames);
|
||||
|
||||
/**
|
||||
* \brief Create a Vulkan rendering surface for a window.
|
||||
*
|
||||
* \param [in] window SDL_Window to which to attach the rendering surface.
|
||||
* \param [in] instance handle to the Vulkan instance to use.
|
||||
* \param [out] surface pointer to a VkSurfaceKHR handle to receive the
|
||||
* handle of the newly created surface.
|
||||
*
|
||||
* \return \c SDL_TRUE on success, \c SDL_FALSE on error.
|
||||
*
|
||||
* \code
|
||||
* VkInstance instance;
|
||||
* SDL_Window *window;
|
||||
*
|
||||
* // create instance and window
|
||||
*
|
||||
* // create the Vulkan surface
|
||||
* VkSurfaceKHR surface;
|
||||
* if(!SDL_Vulkan_CreateSurface(window, instance, &surface))
|
||||
* handle_error();
|
||||
* \endcode
|
||||
*
|
||||
* \note \a window should have been created with the \c SDL_WINDOW_VULKAN flag.
|
||||
*
|
||||
* \note \a instance should have been created with the extensions returned
|
||||
* by \c SDL_Vulkan_CreateSurface() enabled.
|
||||
*
|
||||
* \sa SDL_Vulkan_GetInstanceExtensions()
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Vulkan_CreateSurface(
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
VkSurfaceKHR* surface);
|
||||
|
||||
/**
|
||||
* \brief Get the size of a window's underlying drawable in pixels (for use
|
||||
* with setting viewport, scissor & etc).
|
||||
*
|
||||
* \param window SDL_Window from which the drawable size should be queried
|
||||
* \param w Pointer to variable for storing the width in pixels,
|
||||
* may be NULL
|
||||
* \param h Pointer to variable for storing the height in pixels,
|
||||
* may be NULL
|
||||
*
|
||||
* This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
|
||||
* drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
|
||||
* platform with high-DPI support (Apple calls this "Retina"), and not disabled
|
||||
* by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
|
||||
*
|
||||
* \sa SDL_GetWindowSize()
|
||||
* \sa SDL_CreateWindow()
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window * window,
|
||||
int *w, int *h);
|
||||
|
||||
/* @} *//* Vulkan support functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_vulkan_h_ */
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -41,6 +41,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SDL_UNUSED
|
||||
# ifdef __GNUC__
|
||||
# define SDL_UNUSED __attribute__((unused))
|
||||
# else
|
||||
# define SDL_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some compilers use a special export keyword */
|
||||
#ifndef DECLSPEC
|
||||
# if defined(__WIN32__) || defined(__WINRT__)
|
||||
@ -53,11 +61,15 @@
|
||||
# else
|
||||
# define DECLSPEC __declspec(dllexport)
|
||||
# endif
|
||||
# elif defined(__OS2__)
|
||||
# ifdef BUILD_SDL
|
||||
# define DECLSPEC __declspec(dllexport)
|
||||
# else
|
||||
# define DECLSPEC
|
||||
# endif
|
||||
# else
|
||||
# if defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define DECLSPEC __attribute__ ((visibility("default")))
|
||||
# elif defined(__GNUC__) && __GNUC__ >= 2
|
||||
# define DECLSPEC __declspec(dllexport)
|
||||
# else
|
||||
# define DECLSPEC
|
||||
# endif
|
||||
@ -68,6 +80,11 @@
|
||||
#ifndef SDLCALL
|
||||
#if (defined(__WIN32__) || defined(__WINRT__)) && !defined(__GNUC__)
|
||||
#define SDLCALL __cdecl
|
||||
#elif defined(__OS2__) || defined(__EMX__)
|
||||
#define SDLCALL _System
|
||||
# if defined (__GNUC__) && !defined(_System)
|
||||
# define _System /* for old EMX/GCC compat. */
|
||||
# endif
|
||||
#else
|
||||
#define SDLCALL
|
||||
#endif
|
||||
@ -105,7 +122,7 @@
|
||||
#elif defined(_MSC_VER) || defined(__BORLANDC__) || \
|
||||
defined(__DMC__) || defined(__SC__) || \
|
||||
defined(__WATCOMC__) || defined(__LCC__) || \
|
||||
defined(__DECC)
|
||||
defined(__DECC) || defined(__CC_ARM)
|
||||
#define SDL_INLINE __inline
|
||||
#ifndef __inline__
|
||||
#define __inline__ __inline
|
||||
@ -128,6 +145,16 @@
|
||||
#endif
|
||||
#endif /* SDL_FORCE_INLINE not defined */
|
||||
|
||||
#ifndef SDL_NORETURN
|
||||
#if defined(__GNUC__)
|
||||
#define SDL_NORETURN __attribute__((noreturn))
|
||||
#elif defined(_MSC_VER)
|
||||
#define SDL_NORETURN __declspec(noreturn)
|
||||
#else
|
||||
#define SDL_NORETURN
|
||||
#endif
|
||||
#endif /* SDL_NORETURN not defined */
|
||||
|
||||
/* Apparently this is needed by several Windows compilers */
|
||||
#if !defined(__MACH__)
|
||||
#ifndef NULL
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
||||
Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
@ -29,7 +29,7 @@
|
||||
#undef _begin_code_h
|
||||
|
||||
/* Reset structure packing at previous byte alignment */
|
||||
#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__)
|
||||
#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
|
||||
#ifdef __BORLANDC__
|
||||
#pragma nopackwarning
|
||||
#endif
|
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2.dll
Normal file
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2.dll
Normal file
Binary file not shown.
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2.lib
Normal file
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2.lib
Normal file
Binary file not shown.
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2main.lib
Normal file
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2main.lib
Normal file
Binary file not shown.
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2test.lib
Normal file
BIN
bsp/simulator/SDL2-2.0.7/lib/x86/SDL2test.lib
Normal file
Binary file not shown.
@ -18,6 +18,9 @@ int mnt_init(void)
|
||||
dfs_init();
|
||||
|
||||
#ifdef RT_USING_DFS_WINSHAREDIR
|
||||
extern int dfs_win32_init(void);
|
||||
extern rt_err_t rt_win_sharedir_init(const char *name);
|
||||
|
||||
dfs_win32_init();
|
||||
rt_win_sharedir_init("wshare");
|
||||
|
||||
|
@ -11,10 +11,10 @@ CPPPATH = [cwd]
|
||||
if GetDepend('RT_USING_GUIENGINE') == False:
|
||||
SrcRemove(src, 'sdl_fb.c')
|
||||
else:
|
||||
LIBS.append('SDL')
|
||||
LIBS.append('SDL2')
|
||||
if sys.platform == 'win32':
|
||||
LIBPATH.append(os.path.abspath(os.path.join(cwd, '../SDL/lib/x86')))
|
||||
CPPPATH.append(os.path.abspath(os.path.join(cwd, '../SDL/include')))
|
||||
LIBPATH.append(os.path.abspath(os.path.join(cwd, '../SDL2-2.0.7/lib/x86')))
|
||||
CPPPATH.append(os.path.abspath(os.path.join(cwd, '../SDL2-2.0.7/include')))
|
||||
|
||||
if GetDepend('RT_USING_DFS') == False or GetDepend('RT_USING_DFS_ELMFAT') == False:
|
||||
SrcRemove(src, 'sd_sim.c')
|
||||
|
@ -73,7 +73,7 @@ int sdlfb_info(int *format, int *bpp)
|
||||
}
|
||||
|
||||
static rt_mutex_t sdllock;
|
||||
static rt_err_t sdlfb_control(rt_device_t dev, int cmd, void *args)
|
||||
static rt_err_t sdlfb_control(rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
{
|
||||
struct sdlfb_device *device;
|
||||
|
||||
@ -97,6 +97,7 @@ static rt_err_t sdlfb_control(rt_device_t dev, int cmd, void *args)
|
||||
info->height = device->height;
|
||||
}
|
||||
break;
|
||||
|
||||
case RTGRAPHIC_CTRL_RECT_UPDATE:
|
||||
{
|
||||
SDL_Texture * texture;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user