<!-- DO NOT EDIT THIS PAGE ON THE WIKI. IT WILL BE OVERWRITTEN BY WIKIHEADERS AND CHANGES WILL BE LOST! -->

# QuickReferenceNoUnicode

If you want to paste this into a text editor that can handle
fancy Unicode section headers, try using
[QuickReference](QuickReference) instead.

```c
// SDL3 API Quick Reference
//
// https://libsdl.org/
//
// The latest version of this document can be found at https://wiki.libsdl.org/SDL3/QuickReference
// Based on SDL version 3.5.0
//
// This can be useful in an IDE with search and syntax highlighting.
//
// Original idea for this document came from Dan Bechard (thanks!)
// ASCII art generated by: https://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow (with modified 'S' for readability)


// XX  XXX    XX  XX  XXXXXXXX
// XX  XXXX   XX  XX     XX
// XX  XX XX  XX  XX     XX
// XX  XX  XX XX  XX     XX
// XX  XX   XXXX  XX     XX

bool SDL_Init(SDL_InitFlags flags);                                                               // Initialize the SDL library.
bool SDL_InitSubSystem(SDL_InitFlags flags);                                                      // Compatibility function to initialize the SDL library.
void SDL_QuitSubSystem(SDL_InitFlags flags);                                                      // Shut down specific SDL subsystems.
SDL_InitFlags SDL_WasInit(SDL_InitFlags flags);                                                   // Get a mask of the specified subsystems which are currently initialized.
void SDL_Quit(void);                                                                              // Clean up all initialized subsystems.
bool SDL_IsMainThread(void);                                                                      // Return whether this is the main thread.
bool SDL_RunOnMainThread(SDL_MainThreadCallback callback, void *userdata, bool wait_complete);    // Call a function on the main thread during event processing.
bool SDL_SetAppMetadata(const char *appname, const char *appversion, const char *appidentifier);  // Specify basic metadata about your app.
bool SDL_SetAppMetadataProperty(const char *name, const char *value);                             // Specify metadata about your app through a set of properties.
const char * SDL_GetAppMetadataProperty(const char *name);                                        // Get metadata about your app.

// XX   XX  XX  XXX    XX  XXXXXXXX   XXXXXX
// XX   XX  XX  XXXX   XX     XX     XX
// XXXXXXX  XX  XX XX  XX     XX     XXXXXXX
// XX   XX  XX  XX  XX XX     XX          XX
// XX   XX  XX  XX   XXXX     XX     XXXXXX

bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority);  // Set a hint with a specific priority.
bool SDL_SetHint(const char *name, const char *value);                                         // Set a hint with normal priority.
bool SDL_ResetHint(const char *name);                                                          // Reset a hint to the default value.
void SDL_ResetHints(void);                                                                     // Reset all hints to the default values.
const char * SDL_GetHint(const char *name);                                                    // Get the value of a hint.
bool SDL_GetHintBoolean(const char *name, bool default_value);                                 // Get the boolean value of a hint variable.
bool SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata);         // Add a function to watch a particular hint.
void SDL_RemoveHintCallback(const char *name, SDL_HintCallback callback, void *userdata);      // Remove a function watching a particular hint.

// XXXXXXX  XXXXXX   XXXXXX    XXXXXX   XXXXXX
// XX       XX   XX  XX   XX  XX    XX  XX   XX
// XXXXX    XXXXXX   XXXXXX   XX    XX  XXXXXX
// XX       XX   XX  XX   XX  XX    XX  XX   XX
// XXXXXXX  XX   XX  XX   XX   XXXXXX   XX   XX

bool SDL_SetError(const char *fmt, ... ...);      // Set the SDL error message for the current thread.
bool SDL_SetErrorV(const char *fmt, va_list ap);  // Set the SDL error message for the current thread.
bool SDL_OutOfMemory(void);                       // Set an error indicating that memory allocation failed.
const char * SDL_GetError(void);                  // Retrieve a message about the last error that occurred on the current thread.
bool SDL_ClearError(void);                        // Clear any previous error message for this thread.

// XX    XX  XXXXXXX  XXXXXX    XXXXXX  XX   XXXXXX   XXX    XX
// XX    XX  XX       XX   XX  XX       XX  XX    XX  XXXX   XX
// XX    XX  XXXXX    XXXXXX   XXXXXXX  XX  XX    XX  XX XX  XX
//  XX  XX   XX       XX   XX       XX  XX  XX    XX  XX  XX XX
//   XXXX    XXXXXXX  XX   XX  XXXXXX   XX   XXXXXX   XX   XXXX

int SDL_GetVersion(void);            // Get the version of SDL that is linked against your program.
const char * SDL_GetRevision(void);  // Get the code revision of the SDL library that is linked against your program.

// XXXXXX   XXXXXX    XXXXXX   XXXXXX   XXXXXXX  XXXXXX   XXXXXXXX  XX  XXXXXXX   XXXXXX
// XX   XX  XX   XX  XX    XX  XX   XX  XX       XX   XX     XX     XX  XX       XX
// XXXXXX   XXXXXX   XX    XX  XXXXXX   XXXXX    XXXXXX      XX     XX  XXXXX    XXXXXXX
// XX       XX   XX  XX    XX  XX       XX       XX   XX     XX     XX  XX            XX
// XX       XX   XX   XXXXXX   XX       XXXXXXX  XX   XX     XX     XX  XXXXXXX  XXXXXX

SDL_PropertiesID SDL_GetGlobalProperties(void);                                                                                                      // Get the global SDL properties.
SDL_PropertiesID SDL_CreateProperties(void);                                                                                                         // Create a group of properties.
bool SDL_CopyProperties(SDL_PropertiesID src, SDL_PropertiesID dst);                                                                                 // Copy a group of properties.
bool SDL_LockProperties(SDL_PropertiesID props);                                                                                                     // Lock a group of properties.
void SDL_UnlockProperties(SDL_PropertiesID props);                                                                                                   // Unlock a group of properties.
bool SDL_SetPointerPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata);  // Set a pointer property in a group of properties with a cleanup function that is called when the property is deleted.
bool SDL_SetPointerProperty(SDL_PropertiesID props, const char *name, void *value);                                                                  // Set a pointer property in a group of properties.
bool SDL_SetStringProperty(SDL_PropertiesID props, const char *name, const char *value);                                                             // Set a string property in a group of properties.
bool SDL_SetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 value);                                                                  // Set an integer property in a group of properties.
bool SDL_SetFloatProperty(SDL_PropertiesID props, const char *name, float value);                                                                    // Set a floating point property in a group of properties.
bool SDL_SetBooleanProperty(SDL_PropertiesID props, const char *name, bool value);                                                                   // Set a boolean property in a group of properties.
bool SDL_HasProperty(SDL_PropertiesID props, const char *name);                                                                                      // Return whether a property exists in a group of properties.
SDL_PropertyType SDL_GetPropertyType(SDL_PropertiesID props, const char *name);                                                                      // Get the type of a property in a group of properties.
void * SDL_GetPointerProperty(SDL_PropertiesID props, const char *name, void *default_value);                                                        // Get a pointer property from a group of properties.
const char * SDL_GetStringProperty(SDL_PropertiesID props, const char *name, const char *default_value);                                             // Get a string property from a group of properties.
Sint64 SDL_GetNumberProperty(SDL_PropertiesID props, const char *name, Sint64 default_value);                                                        // Get a number property from a group of properties.
float SDL_GetFloatProperty(SDL_PropertiesID props, const char *name, float default_value);                                                           // Get a floating point property from a group of properties.
bool SDL_GetBooleanProperty(SDL_PropertiesID props, const char *name, bool default_value);                                                           // Get a boolean property from a group of properties.
bool SDL_ClearProperty(SDL_PropertiesID props, const char *name);                                                                                    // Clear a property from a group of properties.
int SDL_GetNumProperties(SDL_PropertiesID props);                                                                                                    // Get the current number of items in a group of properties.
bool SDL_EnumerateProperties(SDL_PropertiesID props, SDL_EnumeratePropertiesCallback callback, void *userdata);                                      // Enumerate the properties contained in a group of properties.
void SDL_DestroyProperties(SDL_PropertiesID props);                                                                                                  // Destroy a group of properties.

// XX        XXXXXX    XXXXXX
// XX       XX    XX  XX
// XX       XX    XX  XX   XXX
// XX       XX    XX  XX    XX
// XXXXXXX   XXXXXX    XXXXXX

void SDL_SetLogPriorities(SDL_LogPriority priority);                                        // Set the priority of all log categories.
void SDL_SetLogPriority(int category, SDL_LogPriority priority);                            // Set the priority of a particular log category.
SDL_LogPriority SDL_GetLogPriority(int category);                                           // Get the priority of a particular log category.
void SDL_ResetLogPriorities(void);                                                          // Reset all priorities to default.
bool SDL_SetLogPriorityPrefix(SDL_LogPriority priority, const char *prefix);                // Set the text prepended to log messages of a given priority.
void SDL_Log(const char *fmt, ... ...);                                                     // Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
void SDL_LogTrace(int category, const char *fmt, ... ...);                                  // Log a message with SDL_LOG_PRIORITY_TRACE.
void SDL_LogVerbose(int category, const char *fmt, ... ...);                                // Log a message with SDL_LOG_PRIORITY_VERBOSE.
void SDL_LogDebug(int category, const char *fmt, ... ...);                                  // Log a message with SDL_LOG_PRIORITY_DEBUG.
void SDL_LogInfo(int category, const char *fmt, ... ...);                                   // Log a message with SDL_LOG_PRIORITY_INFO.
void SDL_LogWarn(int category, const char *fmt, ... ...);                                   // Log a message with SDL_LOG_PRIORITY_WARN.
void SDL_LogError(int category, const char *fmt, ... ...);                                  // Log a message with SDL_LOG_PRIORITY_ERROR.
void SDL_LogCritical(int category, const char *fmt, ... ...);                               // Log a message with SDL_LOG_PRIORITY_CRITICAL.
void SDL_LogMessage(int category, SDL_LogPriority priority, const char *fmt, ... ...);      // Log a message with the specified category and priority.
void SDL_LogMessageV(int category, SDL_LogPriority priority, const char *fmt, va_list ap);  // Log a message with the specified category and priority.
SDL_LogOutputFunction SDL_GetDefaultLogOutputFunction(void);                                // Get the default log output function.
void SDL_GetLogOutputFunction(SDL_LogOutputFunction *callback, void **userdata);            // Get the current log output function.
void SDL_SetLogOutputFunction(SDL_LogOutputFunction callback, void *userdata);              // Replace the default log output function with one of your own.

// XX    XX  XX  XXXXXX   XXXXXXX   XXXXXX
// XX    XX  XX  XX   XX  XX       XX    XX
// XX    XX  XX  XX   XX  XXXXX    XX    XX
//  XX  XX   XX  XX   XX  XX       XX    XX
//   XXXX    XX  XXXXXX   XXXXXXX   XXXXXX

int SDL_GetNumVideoDrivers(void);                                                                                                                                                                     // Get the number of video drivers compiled into SDL.
const char * SDL_GetVideoDriver(int index);                                                                                                                                                           // Get the name of a built in video driver.
const char * SDL_GetCurrentVideoDriver(void);                                                                                                                                                         // Get the name of the currently initialized video driver.
SDL_SystemTheme SDL_GetSystemTheme(void);                                                                                                                                                             // Get the current system theme.
SDL_DisplayID * SDL_GetDisplays(int *count);                                                                                                                                                          // Get a list of currently connected displays.
SDL_DisplayID SDL_GetPrimaryDisplay(void);                                                                                                                                                            // Return the primary display.
SDL_PropertiesID SDL_GetDisplayProperties(SDL_DisplayID displayID);                                                                                                                                   // Get the properties associated with a display.
const char * SDL_GetDisplayName(SDL_DisplayID displayID);                                                                                                                                             // Get the name of a display in UTF-8 encoding.
bool SDL_GetDisplayBounds(SDL_DisplayID displayID, SDL_Rect *rect);                                                                                                                                   // Get the desktop area represented by a display.
bool SDL_GetDisplayUsableBounds(SDL_DisplayID displayID, SDL_Rect *rect);                                                                                                                             // Get the usable desktop area represented by a display, in screen coordinates.
SDL_DisplayOrientation SDL_GetNaturalDisplayOrientation(SDL_DisplayID displayID);                                                                                                                     // Get the orientation of a display when it is unrotated.
SDL_DisplayOrientation SDL_GetCurrentDisplayOrientation(SDL_DisplayID displayID);                                                                                                                     // Get the orientation of a display.
float SDL_GetDisplayContentScale(SDL_DisplayID displayID);                                                                                                                                            // Get the content scale of a display.
SDL_DisplayMode ** SDL_GetFullscreenDisplayModes(SDL_DisplayID displayID, int *count);                                                                                                                // Get a list of fullscreen display modes available on a display.
bool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, float refresh_rate, bool include_high_density_modes, SDL_DisplayMode *closest);                                       // Get the closest match to the requested display mode.
const SDL_DisplayMode * SDL_GetDesktopDisplayMode(SDL_DisplayID displayID);                                                                                                                           // Get information about the desktop's display mode.
const SDL_DisplayMode * SDL_GetCurrentDisplayMode(SDL_DisplayID displayID);                                                                                                                           // Get information about the current display mode.
SDL_DisplayID SDL_GetDisplayForPoint(const SDL_Point *point);                                                                                                                                         // Get the display containing a point.
SDL_DisplayID SDL_GetDisplayForRect(const SDL_Rect *rect);                                                                                                                                            // Get the display primarily containing a rect.
SDL_DisplayID SDL_GetDisplayForWindow(SDL_Window *window);                                                                                                                                            // Get the display associated with a window.
float SDL_GetWindowPixelDensity(SDL_Window *window);                                                                                                                                                  // Get the pixel density of a window.
float SDL_GetWindowDisplayScale(SDL_Window *window);                                                                                                                                                  // Get the content display scale relative to a window's pixel size.
bool SDL_SetWindowFullscreenMode(SDL_Window *window, const SDL_DisplayMode *mode);                                                                                                                    // Set the display mode to use when a window is visible and fullscreen.
const SDL_DisplayMode * SDL_GetWindowFullscreenMode(SDL_Window *window);                                                                                                                              // Query the display mode to use when a window is visible at fullscreen.
void * SDL_GetWindowICCProfile(SDL_Window *window, size_t *size);                                                                                                                                     // Get the raw ICC profile data for the screen the window is currently on.
SDL_PixelFormat SDL_GetWindowPixelFormat(SDL_Window *window);                                                                                                                                         // Get the pixel format associated with the window.
SDL_Window ** SDL_GetWindows(int *count);                                                                                                                                                             // Get a list of valid windows.
SDL_Window * SDL_CreateWindow(const char *title, int w, int h, SDL_WindowFlags flags);                                                                                                                // Create a window with the specified dimensions and flags.
SDL_Window * SDL_CreatePopupWindow(SDL_Window *parent, int offset_x, int offset_y, int w, int h, SDL_WindowFlags flags);                                                                              // Create a child popup window of the specified parent window.
SDL_Window * SDL_CreateWindowWithProperties(SDL_PropertiesID props);                                                                                                                                  // Create a window with the specified properties.
SDL_WindowID SDL_GetWindowID(SDL_Window *window);                                                                                                                                                     // Get the numeric ID of a window.
SDL_Window * SDL_GetWindowFromID(SDL_WindowID id);                                                                                                                                                    // Get a window from a stored ID.
SDL_Window * SDL_GetWindowParent(SDL_Window *window);                                                                                                                                                 // Get parent of a window.
SDL_PropertiesID SDL_GetWindowProperties(SDL_Window *window);                                                                                                                                         // Get the properties associated with a window.
SDL_WindowFlags SDL_GetWindowFlags(SDL_Window *window);                                                                                                                                               // Get the window flags.
bool SDL_SetWindowTitle(SDL_Window *window, const char *title);                                                                                                                                       // Set the title of a window.
const char * SDL_GetWindowTitle(SDL_Window *window);                                                                                                                                                  // Get the title of a window.
bool SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon);                                                                                                                                        // Set the icon for a window.
bool SDL_SetWindowPosition(SDL_Window *window, int x, int y);                                                                                                                                         // Request that the window's position be set.
bool SDL_GetWindowPosition(SDL_Window *window, int *x, int *y);                                                                                                                                       // Get the position of a window.
bool SDL_SetWindowSize(SDL_Window *window, int w, int h);                                                                                                                                             // Request that the size of a window's client area be set.
bool SDL_GetWindowSize(SDL_Window *window, int *w, int *h);                                                                                                                                           // Get the size of a window's client area.
bool SDL_GetWindowSafeArea(SDL_Window *window, SDL_Rect *rect);                                                                                                                                       // Get the safe area for this window.
bool SDL_SetWindowAspectRatio(SDL_Window *window, float min_aspect, float max_aspect);                                                                                                                // Request that the aspect ratio of a window's client area be set.
bool SDL_GetWindowAspectRatio(SDL_Window *window, float *min_aspect, float *max_aspect);                                                                                                              // Get the aspect ratio of a window's client area.
bool SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right);                                                                                                      // Get the size of a window's borders (decorations) around the client area.
bool SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h);                                                                                                                                   // Get the size of a window's client area, in pixels.
bool SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h);                                                                                                                              // Set the minimum size of a window's client area.
bool SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h);                                                                                                                                    // Get the minimum size of a window's client area.
bool SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h);                                                                                                                              // Set the maximum size of a window's client area.
bool SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h);                                                                                                                                    // Get the maximum size of a window's client area.
bool SDL_SetWindowBordered(SDL_Window *window, bool bordered);                                                                                                                                        // Set the border state of a window.
bool SDL_SetWindowResizable(SDL_Window *window, bool resizable);                                                                                                                                      // Set the user-resizable state of a window.
bool SDL_SetWindowAlwaysOnTop(SDL_Window *window, bool on_top);                                                                                                                                       // Set the window to always be above the others.
bool SDL_SetWindowFillDocument(SDL_Window *window, bool fill);                                                                                                                                        // Set the window to fill the current document space (Emscripten only).
bool SDL_ShowWindow(SDL_Window *window);                                                                                                                                                              // Show a window.
bool SDL_HideWindow(SDL_Window *window);                                                                                                                                                              // Hide a window.
bool SDL_RaiseWindow(SDL_Window *window);                                                                                                                                                             // Request that a window be raised above other windows and gain the input focus.
bool SDL_MaximizeWindow(SDL_Window *window);                                                                                                                                                          // Request that the window be made as large as possible.
bool SDL_MinimizeWindow(SDL_Window *window);                                                                                                                                                          // Request that the window be minimized to an iconic representation.
bool SDL_RestoreWindow(SDL_Window *window);                                                                                                                                                           // Request that the size and position of a minimized or maximized window be restored.
bool SDL_SetWindowFullscreen(SDL_Window *window, bool fullscreen);                                                                                                                                    // Request that the window's fullscreen state be changed.
bool SDL_SyncWindow(SDL_Window *window);                                                                                                                                                              // Block until any pending window state is finalized.
bool SDL_WindowHasSurface(SDL_Window *window);                                                                                                                                                        // Return whether the window has a surface associated with it.
SDL_Surface * SDL_GetWindowSurface(SDL_Window *window);                                                                                                                                               // Get the SDL surface associated with the window.
bool SDL_SetWindowSurfaceVSync(SDL_Window *window, int vsync);                                                                                                                                        // Toggle VSync for the window surface.
bool SDL_GetWindowSurfaceVSync(SDL_Window *window, int *vsync);                                                                                                                                       // Get VSync for the window surface.
bool SDL_UpdateWindowSurface(SDL_Window *window);                                                                                                                                                     // Copy the window surface to the screen.
bool SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects);                                                                                                           // Copy areas of the window surface to the screen.
bool SDL_DestroyWindowSurface(SDL_Window *window);                                                                                                                                                    // Destroy the surface associated with the window.
bool SDL_SetWindowKeyboardGrab(SDL_Window *window, bool grabbed);                                                                                                                                     // Set a window's keyboard grab mode.
bool SDL_SetWindowMouseGrab(SDL_Window *window, bool grabbed);                                                                                                                                        // Set a window's mouse grab mode.
bool SDL_GetWindowKeyboardGrab(SDL_Window *window);                                                                                                                                                   // Get a window's keyboard grab mode.
bool SDL_GetWindowMouseGrab(SDL_Window *window);                                                                                                                                                      // Get a window's mouse grab mode.
SDL_Window * SDL_GetGrabbedWindow(void);                                                                                                                                                              // Get the window that currently has an input grab enabled.
bool SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect);                                                                                                                                // Confines the cursor to the specified area of a window.
const SDL_Rect * SDL_GetWindowMouseRect(SDL_Window *window);                                                                                                                                          // Get the mouse confinement rectangle of a window.
bool SDL_SetWindowOpacity(SDL_Window *window, float opacity);                                                                                                                                         // Set the opacity for a window.
float SDL_GetWindowOpacity(SDL_Window *window);                                                                                                                                                       // Get the opacity of a window.
bool SDL_SetWindowParent(SDL_Window *window, SDL_Window *parent);                                                                                                                                     // Set the window as a child of a parent window.
bool SDL_SetWindowModal(SDL_Window *window, bool modal);                                                                                                                                              // Toggle the state of the window as modal.
bool SDL_SetWindowFocusable(SDL_Window *window, bool focusable);                                                                                                                                      // Set whether the window may have input focus.
bool SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y);                                                                                                                                      // Display the system-level window menu.
bool SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data);                                                                                                             // Provide a callback that decides if a window region has special properties.
bool SDL_SetWindowShape(SDL_Window *window, SDL_Surface *shape);                                                                                                                                      // Set the shape of a transparent window.
bool SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation);                                                                                                                               // Request a window to demand attention from the user.
bool SDL_SetWindowProgressState(SDL_Window *window, SDL_ProgressState state);                                                                                                                         // Sets the state of the progress bar for the given windowâs taskbar icon.
SDL_ProgressState SDL_GetWindowProgressState(SDL_Window *window);                                                                                                                                     // Get the state of the progress bar for the given windowâs taskbar icon.
bool SDL_SetWindowProgressValue(SDL_Window *window, float value);                                                                                                                                     // Sets the value of the progress bar for the given windowâs taskbar icon.
float SDL_GetWindowProgressValue(SDL_Window *window);                                                                                                                                                 // Get the value of the progress bar for the given windowâs taskbar icon.
void SDL_DestroyWindow(SDL_Window *window);                                                                                                                                                           // Destroy a window.
bool SDL_ScreenSaverEnabled(void);                                                                                                                                                                    // Check whether the screensaver is currently enabled.
bool SDL_EnableScreenSaver(void);                                                                                                                                                                     // Allow the screen to be blanked by a screen saver.
bool SDL_DisableScreenSaver(void);                                                                                                                                                                    // Prevent the screen from being blanked by a screen saver.
bool SDL_GL_LoadLibrary(const char *path);                                                                                                                                                            // Dynamically load an OpenGL library.
SDL_FunctionPointer SDL_GL_GetProcAddress(const char *proc);                                                                                                                                          // Get an OpenGL function by name.
SDL_FunctionPointer SDL_EGL_GetProcAddress(const char *proc);                                                                                                                                         // Get an EGL library function by name.
void SDL_GL_UnloadLibrary(void);                                                                                                                                                                      // Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
bool SDL_GL_ExtensionSupported(const char *extension);                                                                                                                                                // Check if an OpenGL extension is supported for the current context.
void SDL_GL_ResetAttributes(void);                                                                                                                                                                    // Reset all previously set OpenGL context attributes to their default values.
bool SDL_GL_SetAttribute(SDL_GLAttr attr, int value);                                                                                                                                                 // Set an OpenGL window attribute before window creation.
bool SDL_GL_GetAttribute(SDL_GLAttr attr, int *value);                                                                                                                                                // Get the actual value for an attribute from the current context.
SDL_GLContext SDL_GL_CreateContext(SDL_Window *window);                                                                                                                                               // Create an OpenGL context for an OpenGL window, and make it current.
bool SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context);                                                                                                                                   // Set up an OpenGL context for rendering into an OpenGL window.
SDL_Window * SDL_GL_GetCurrentWindow(void);                                                                                                                                                           // Get the currently active OpenGL window.
SDL_GLContext SDL_GL_GetCurrentContext(void);                                                                                                                                                         // Get the currently active OpenGL context.
SDL_EGLDisplay SDL_EGL_GetCurrentDisplay(void);                                                                                                                                                       // Get the currently active EGL display.
SDL_EGLConfig SDL_EGL_GetCurrentConfig(void);                                                                                                                                                         // Get the currently active EGL config.
SDL_EGLSurface SDL_EGL_GetWindowSurface(SDL_Window *window);                                                                                                                                          // Get the EGL surface associated with the window.
void SDL_EGL_SetAttributeCallbacks(SDL_EGLAttribArrayCallback platformAttribCallback, SDL_EGLIntArrayCallback surfaceAttribCallback, SDL_EGLIntArrayCallback contextAttribCallback, void *userdata);  // Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization.
bool SDL_GL_SetSwapInterval(int interval);                                                                                                                                                            // Set the swap interval for the current OpenGL context.
bool SDL_GL_GetSwapInterval(int *interval);                                                                                                                                                           // Get the swap interval for the current OpenGL context.
bool SDL_GL_SwapWindow(SDL_Window *window);                                                                                                                                                           // Update a window with OpenGL rendering.
bool SDL_GL_DestroyContext(SDL_GLContext context);                                                                                                                                                    // Delete an OpenGL context.

// XXXXXXX  XX    XX  XXXXXXX  XXX    XX  XXXXXXXX   XXXXXX
// XX       XX    XX  XX       XXXX   XX     XX     XX
// XXXXX    XX    XX  XXXXX    XX XX  XX     XX     XXXXXXX
// XX        XX  XX   XX       XX  XX XX     XX          XX
// XXXXXXX    XXXX    XXXXXXX  XX   XXXX     XX     XXXXXX

void SDL_PumpEvents(void);                                                                                     // Pump the event loop, gathering events from the input devices.
int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_EventAction action, Uint32 minType, Uint32 maxType);  // Check the event queue for messages and optionally return them.
bool SDL_HasEvent(Uint32 type);                                                                                // Check for the existence of a certain event type in the event queue.
bool SDL_HasEvents(Uint32 minType, Uint32 maxType);                                                            // Check for the existence of certain event types in the event queue.
void SDL_FlushEvent(Uint32 type);                                                                              // Clear events of a specific type from the event queue.
void SDL_FlushEvents(Uint32 minType, Uint32 maxType);                                                          // Clear events of a range of types from the event queue.
bool SDL_PollEvent(SDL_Event *event);                                                                          // Poll for currently pending events.
bool SDL_WaitEvent(SDL_Event *event);                                                                          // Wait indefinitely for the next available event.
bool SDL_WaitEventTimeout(SDL_Event *event, Sint32 timeoutMS);                                                 // Wait until the specified timeout (in milliseconds) for the next available event.
bool SDL_PushEvent(SDL_Event *event);                                                                          // Add an event to the event queue.
void SDL_SetEventFilter(SDL_EventFilter filter, void *userdata);                                               // Set up a filter to process all events before they are added to the internal event queue.
bool SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata);                                             // Query the current event filter.
bool SDL_AddEventWatch(SDL_EventFilter filter, void *userdata);                                                // Add a callback to be triggered when an event is added to the event queue.
void SDL_RemoveEventWatch(SDL_EventFilter filter, void *userdata);                                             // Remove an event watch callback added with SDL_AddEventWatch().
void SDL_FilterEvents(SDL_EventFilter filter, void *userdata);                                                 // Run a specific filter function on the current event queue, removing any events for which the filter returns false.
void SDL_SetEventEnabled(Uint32 type, bool enabled);                                                           // Set the state of processing events by type.
bool SDL_EventEnabled(Uint32 type);                                                                            // Query the state of processing events by type.
Uint32 SDL_RegisterEvents(int numevents);                                                                      // Allocate a set of user-defined events, and return the beginning event number for that set of events.
SDL_Window * SDL_GetWindowFromEvent(const SDL_Event *event);                                                   // Get window associated with an event.
int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen);                                    // Generate an English description of an event.

// XX   XX  XXXXXXX  XX    XX  XXXXXX    XXXXXX    XXXXX   XXXXXX   XXXXXX
// XX  XX   XX        XX  XX   XX   XX  XX    XX  XX   XX  XX   XX  XX   XX
// XXXXX    XXXXX      XXXX    XXXXXX   XX    XX  XXXXXXX  XXXXXX   XX   XX
// XX  XX   XX          XX     XX   XX  XX    XX  XX   XX  XX   XX  XX   XX
// XX   XX  XXXXXXX     XX     XXXXXX    XXXXXX   XX   XX  XX   XX  XXXXXX

bool SDL_HasKeyboard(void);                                                                      // Return whether a keyboard is currently connected.
SDL_KeyboardID * SDL_GetKeyboards(int *count);                                                   // Get a list of currently connected keyboards.
const char * SDL_GetKeyboardNameForID(SDL_KeyboardID instance_id);                               // Get the name of a keyboard.
SDL_Window * SDL_GetKeyboardFocus(void);                                                         // Query the window which currently has keyboard focus.
const bool * SDL_GetKeyboardState(int *numkeys);                                                 // Get a snapshot of the current state of the keyboard.
void SDL_ResetKeyboard(void);                                                                    // Clear the state of the keyboard.
SDL_Keymod SDL_GetModState(void);                                                                // Get the current key modifier state for the keyboard.
void SDL_SetModState(SDL_Keymod modstate);                                                       // Set the current key modifier state for the keyboard.
SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode, SDL_Keymod modstate, bool key_event);  // Get the key code corresponding to the given scancode according to the current keyboard layout.
SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key, SDL_Keymod *modstate);                      // Get the scancode corresponding to the given key code according to the current keyboard layout.
bool SDL_SetScancodeName(SDL_Scancode scancode, const char *name);                               // Set a human-readable name for a scancode.
const char * SDL_GetScancodeName(SDL_Scancode scancode);                                         // Get a human-readable name for a scancode.
SDL_Scancode SDL_GetScancodeFromName(const char *name);                                          // Get a scancode from a human-readable name.
const char * SDL_GetKeyName(SDL_Keycode key);                                                    // Get a human-readable name for a key.
SDL_Keycode SDL_GetKeyFromName(const char *name);                                                // Get a key code from a human-readable name.
bool SDL_StartTextInput(SDL_Window *window);                                                     // Start accepting Unicode text input events in a window.
bool SDL_StartTextInputWithProperties(SDL_Window *window, SDL_PropertiesID props);               // Start accepting Unicode text input events in a window, with properties describing the input.
bool SDL_TextInputActive(SDL_Window *window);                                                    // Check whether or not Unicode text input events are enabled for a window.
bool SDL_StopTextInput(SDL_Window *window);                                                      // Stop receiving any text input events in a window.
bool SDL_ClearComposition(SDL_Window *window);                                                   // Dismiss the composition window/IME without disabling the subsystem.
bool SDL_SetTextInputArea(SDL_Window *window, const SDL_Rect *rect, int cursor);                 // Set the area used to type Unicode text input.
bool SDL_GetTextInputArea(SDL_Window *window, SDL_Rect *rect, int *cursor);                      // Get the area used to type Unicode text input.
bool SDL_HasScreenKeyboardSupport(void);                                                         // Check whether the platform has screen keyboard support.
bool SDL_ScreenKeyboardShown(SDL_Window *window);                                                // Check whether the screen keyboard is shown for given window.

// XXX    XXX   XXXXXX   XX    XX   XXXXXX  XXXXXXX
// XXXX  XXXX  XX    XX  XX    XX  XX       XX
// XX XXXX XX  XX    XX  XX    XX  XXXXXXX  XXXXX
// XX  XX  XX  XX    XX  XX    XX       XX  XX
// XX      XX   XXXXXX    XXXXXX   XXXXXX   XXXXXXX

bool SDL_HasMouse(void);                                                                                    // Return whether a mouse is currently connected.
SDL_MouseID * SDL_GetMice(int *count);                                                                      // Get a list of currently connected mice.
const char * SDL_GetMouseNameForID(SDL_MouseID instance_id);                                                // Get the name of a mouse.
SDL_Window * SDL_GetMouseFocus(void);                                                                       // Get the window which currently has mouse focus.
SDL_MouseButtonFlags SDL_GetMouseState(float *x, float *y);                                                 // Query SDL's cache for the synchronous mouse button state and the window-relative SDL-cursor position.
SDL_MouseButtonFlags SDL_GetGlobalMouseState(float *x, float *y);                                           // Query the platform for the asynchronous mouse button state and the desktop-relative platform-cursor position.
SDL_MouseButtonFlags SDL_GetRelativeMouseState(float *x, float *y);                                         // Query SDL's cache for the synchronous mouse button state and accumulated mouse delta since last call.
void SDL_WarpMouseInWindow(SDL_Window *window, float x, float y);                                           // Move the mouse cursor to the given position within the window.
bool SDL_WarpMouseGlobal(float x, float y);                                                                 // Move the mouse to the given position in global screen space.
bool SDL_SetRelativeMouseTransform(SDL_MouseMotionTransformCallback callback, void *userdata);              // Set a user-defined function by which to transform relative mouse inputs.
bool SDL_SetWindowRelativeMouseMode(SDL_Window *window, bool enabled);                                      // Set relative mouse mode for a window.
bool SDL_GetWindowRelativeMouseMode(SDL_Window *window);                                                    // Query whether relative mouse mode is enabled for a window.
bool SDL_CaptureMouse(bool enabled);                                                                        // Capture the mouse and to track input outside an SDL window.
SDL_Cursor * SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y);    // Create a cursor using the specified bitmap data and mask (in MSB format).
SDL_Cursor * SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y);                             // Create a color cursor.
SDL_Cursor * SDL_CreateAnimatedCursor(SDL_CursorFrameInfo *frames, int frame_count, int hot_x, int hot_y);  // Create an animated color cursor.
SDL_Cursor * SDL_CreateSystemCursor(SDL_SystemCursor id);                                                   // Create a system cursor.
bool SDL_SetCursor(SDL_Cursor *cursor);                                                                     // Set the active cursor.
SDL_Cursor * SDL_GetCursor(void);                                                                           // Get the active cursor.
SDL_Cursor * SDL_GetDefaultCursor(void);                                                                    // Get the default cursor.
void SDL_DestroyCursor(SDL_Cursor *cursor);                                                                 // Free a previously-created cursor.
bool SDL_ShowCursor(void);                                                                                  // Show the cursor.
bool SDL_HideCursor(void);                                                                                  // Hide the cursor.
bool SDL_CursorVisible(void);                                                                               // Return whether the cursor is currently being shown.

// XXXXXXXX   XXXXXX   XX    XX   XXXXXX  XX   XX
//    XX     XX    XX  XX    XX  XX       XX   XX
//    XX     XX    XX  XX    XX  XX       XXXXXXX
//    XX     XX    XX  XX    XX  XX       XX   XX
//    XX      XXXXXX    XXXXXX    XXXXXX  XX   XX

SDL_TouchID * SDL_GetTouchDevices(int *count);                       // Get a list of registered touch devices.
const char * SDL_GetTouchDeviceName(SDL_TouchID touchID);            // Get the touch device name as reported from the driver.
SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID touchID);     // Get the type of the given touch device.
SDL_Finger ** SDL_GetTouchFingers(SDL_TouchID touchID, int *count);  // Get a list of active fingers for a given touch device.

//  XXXXXX    XXXXX   XXX    XXX  XXXXXXX  XXXXXX    XXXXX   XXXXXX
// XX        XX   XX  XXXX  XXXX  XX       XX   XX  XX   XX  XX   XX
// XX   XXX  XXXXXXX  XX XXXX XX  XXXXX    XXXXXX   XXXXXXX  XX   XX
// XX    XX  XX   XX  XX  XX  XX  XX       XX       XX   XX  XX   XX
//  XXXXXX   XX   XX  XX      XX  XXXXXXX  XX       XX   XX  XXXXXX

int SDL_AddGamepadMapping(const char *mapping);                                                                                      // Add support for gamepads that SDL is unaware of or change the binding of an existing gamepad.
int SDL_AddGamepadMappingsFromIO(SDL_IOStream *src, bool closeio);                                                                   // Load a set of gamepad mappings from an SDL_IOStream.
int SDL_AddGamepadMappingsFromFile(const char *file);                                                                                // Load a set of gamepad mappings from a file.
bool SDL_ReloadGamepadMappings(void);                                                                                                // Reinitialize the SDL mapping database to its initial state.
char ** SDL_GetGamepadMappings(int *count);                                                                                          // Get the current gamepad mappings.
char * SDL_GetGamepadMappingForGUID(SDL_GUID guid);                                                                                  // Get the gamepad mapping string for a given GUID.
char * SDL_GetGamepadMapping(SDL_Gamepad *gamepad);                                                                                  // Get the current mapping of a gamepad.
bool SDL_SetGamepadMapping(SDL_JoystickID instance_id, const char *mapping);                                                         // Set the current mapping of a joystick or gamepad.
bool SDL_HasGamepad(void);                                                                                                           // Return whether a gamepad is currently connected.
SDL_JoystickID * SDL_GetGamepads(int *count);                                                                                        // Get a list of currently connected gamepads.
bool SDL_IsGamepad(SDL_JoystickID instance_id);                                                                                      // Check if the given joystick is supported by the gamepad interface.
const char * SDL_GetGamepadNameForID(SDL_JoystickID instance_id);                                                                    // Get the implementation dependent name of a gamepad.
const char * SDL_GetGamepadPathForID(SDL_JoystickID instance_id);                                                                    // Get the implementation dependent path of a gamepad.
int SDL_GetGamepadPlayerIndexForID(SDL_JoystickID instance_id);                                                                      // Get the player index of a gamepad.
SDL_GUID SDL_GetGamepadGUIDForID(SDL_JoystickID instance_id);                                                                        // Get the implementation-dependent GUID of a gamepad.
Uint16 SDL_GetGamepadVendorForID(SDL_JoystickID instance_id);                                                                        // Get the USB vendor ID of a gamepad, if available.
Uint16 SDL_GetGamepadProductForID(SDL_JoystickID instance_id);                                                                       // Get the USB product ID of a gamepad, if available.
Uint16 SDL_GetGamepadProductVersionForID(SDL_JoystickID instance_id);                                                                // Get the product version of a gamepad, if available.
SDL_GamepadType SDL_GetGamepadTypeForID(SDL_JoystickID instance_id);                                                                 // Get the type of a gamepad.
SDL_GamepadType SDL_GetRealGamepadTypeForID(SDL_JoystickID instance_id);                                                             // Get the type of a gamepad, ignoring any mapping override.
char * SDL_GetGamepadMappingForID(SDL_JoystickID instance_id);                                                                       // Get the mapping of a gamepad.
SDL_Gamepad * SDL_OpenGamepad(SDL_JoystickID instance_id);                                                                           // Open a gamepad for use.
SDL_Gamepad * SDL_GetGamepadFromID(SDL_JoystickID instance_id);                                                                      // Get the SDL_Gamepad associated with a joystick instance ID, if it has been opened.
SDL_Gamepad * SDL_GetGamepadFromPlayerIndex(int player_index);                                                                       // Get the SDL_Gamepad associated with a player index.
SDL_PropertiesID SDL_GetGamepadProperties(SDL_Gamepad *gamepad);                                                                     // Get the properties associated with an opened gamepad.
SDL_JoystickID SDL_GetGamepadID(SDL_Gamepad *gamepad);                                                                               // Get the instance ID of an opened gamepad.
const char * SDL_GetGamepadName(SDL_Gamepad *gamepad);                                                                               // Get the implementation-dependent name for an opened gamepad.
const char * SDL_GetGamepadPath(SDL_Gamepad *gamepad);                                                                               // Get the implementation-dependent path for an opened gamepad.
SDL_GamepadType SDL_GetGamepadType(SDL_Gamepad *gamepad);                                                                            // Get the type of an opened gamepad.
SDL_GamepadType SDL_GetRealGamepadType(SDL_Gamepad *gamepad);                                                                        // Get the type of an opened gamepad, ignoring any mapping override.
int SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad);                                                                                 // Get the player index of an opened gamepad.
bool SDL_SetGamepadPlayerIndex(SDL_Gamepad *gamepad, int player_index);                                                              // Set the player index of an opened gamepad.
Uint16 SDL_GetGamepadVendor(SDL_Gamepad *gamepad);                                                                                   // Get the USB vendor ID of an opened gamepad, if available.
Uint16 SDL_GetGamepadProduct(SDL_Gamepad *gamepad);                                                                                  // Get the USB product ID of an opened gamepad, if available.
Uint16 SDL_GetGamepadProductVersion(SDL_Gamepad *gamepad);                                                                           // Get the product version of an opened gamepad, if available.
Uint16 SDL_GetGamepadFirmwareVersion(SDL_Gamepad *gamepad);                                                                          // Get the firmware version of an opened gamepad, if available.
const char * SDL_GetGamepadSerial(SDL_Gamepad *gamepad);                                                                             // Get the serial number of an opened gamepad, if available.
Uint64 SDL_GetGamepadSteamHandle(SDL_Gamepad *gamepad);                                                                              // Get the Steam Input handle of an opened gamepad, if available.
SDL_JoystickConnectionState SDL_GetGamepadConnectionState(SDL_Gamepad *gamepad);                                                     // Get the connection state of a gamepad.
SDL_PowerState SDL_GetGamepadPowerInfo(SDL_Gamepad *gamepad, int *percent);                                                          // Get the battery state of a gamepad.
bool SDL_GamepadConnected(SDL_Gamepad *gamepad);                                                                                     // Check if a gamepad has been opened and is currently connected.
SDL_Joystick * SDL_GetGamepadJoystick(SDL_Gamepad *gamepad);                                                                         // Get the underlying joystick from a gamepad.
void SDL_SetGamepadEventsEnabled(bool enabled);                                                                                      // Set the state of gamepad event processing.
bool SDL_GamepadEventsEnabled(void);                                                                                                 // Query the state of gamepad event processing.
SDL_GamepadBinding ** SDL_GetGamepadBindings(SDL_Gamepad *gamepad, int *count);                                                      // Get the SDL joystick layer bindings for a gamepad.
void SDL_UpdateGamepads(void);                                                                                                       // Manually pump gamepad updates if not using the loop.
SDL_GamepadType SDL_GetGamepadTypeFromString(const char *str);                                                                       // Convert a string into SDL_GamepadType enum.
const char * SDL_GetGamepadStringForType(SDL_GamepadType type);                                                                      // Convert from an SDL_GamepadType enum to a string.
SDL_GamepadAxis SDL_GetGamepadAxisFromString(const char *str);                                                                       // Convert a string into SDL_GamepadAxis enum.
const char * SDL_GetGamepadStringForAxis(SDL_GamepadAxis axis);                                                                      // Convert from an SDL_GamepadAxis enum to a string.
bool SDL_GamepadHasAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);                                                                 // Query whether a gamepad has a given axis.
Sint16 SDL_GetGamepadAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);                                                               // Get the current state of an axis control on a gamepad.
SDL_GamepadButton SDL_GetGamepadButtonFromString(const char *str);                                                                   // Convert a string into an SDL_GamepadButton enum.
const char * SDL_GetGamepadStringForButton(SDL_GamepadButton button);                                                                // Convert from an SDL_GamepadButton enum to a string.
bool SDL_GamepadHasButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);                                                           // Query whether a gamepad has a given button.
bool SDL_GetGamepadButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);                                                           // Get the current state of a button on a gamepad.
SDL_GamepadButtonLabel SDL_GetGamepadButtonLabelForType(SDL_GamepadType type, SDL_GamepadButton button);                             // Get the label of a button on a gamepad.
SDL_GamepadButtonLabel SDL_GetGamepadButtonLabel(SDL_Gamepad *gamepad, SDL_GamepadButton button);                                    // Get the label of a button on a gamepad.
int SDL_GetNumGamepadTouchpads(SDL_Gamepad *gamepad);                                                                                // Get the number of touchpads on a gamepad.
int SDL_GetNumGamepadTouchpadFingers(SDL_Gamepad *gamepad, int touchpad);                                                            // Get the number of supported simultaneous fingers on a touchpad on a game gamepad.
bool SDL_GetGamepadTouchpadFinger(SDL_Gamepad *gamepad, int touchpad, int finger, bool *down, float *x, float *y, float *pressure);  // Get the current state of a finger on a touchpad on a gamepad.
bool SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_SensorType type);                                                                // Return whether a gamepad has a particular sensor.
bool SDL_SetGamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type, bool enabled);                                           // Set whether data reporting for a gamepad sensor is enabled.
bool SDL_GamepadSensorEnabled(SDL_Gamepad *gamepad, SDL_SensorType type);                                                            // Query whether sensor data reporting is enabled for a gamepad.
float SDL_GetGamepadSensorDataRate(SDL_Gamepad *gamepad, SDL_SensorType type);                                                       // Get the data rate (number of events per second) of a gamepad sensor.
bool SDL_GetGamepadSensorData(SDL_Gamepad *gamepad, SDL_SensorType type, float *data, int num_values);                               // Get the current state of a gamepad sensor.
bool SDL_GamepadHasCapSense(SDL_Gamepad *gamepad, SDL_GamepadCapSenseType type);                                                     // Return whether a gamepad has a particular capsense.
bool SDL_GetGamepadCapSense(SDL_Gamepad *gamepad, SDL_GamepadCapSenseType type);                                                     // Get the current state of a capsense on a gamepad.
bool SDL_RumbleGamepad(SDL_Gamepad *gamepad, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);         // Start a rumble effect on a gamepad.
bool SDL_RumbleGamepadTriggers(SDL_Gamepad *gamepad, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);                   // Start a rumble effect in the gamepad's triggers.
bool SDL_SetGamepadLED(SDL_Gamepad *gamepad, Uint8 red, Uint8 green, Uint8 blue);                                                    // Update a gamepad's LED color.
bool SDL_SendGamepadEffect(SDL_Gamepad *gamepad, const void *data, int size);                                                        // Send a gamepad specific effect packet.
void SDL_CloseGamepad(SDL_Gamepad *gamepad);                                                                                         // Close a gamepad previously opened with SDL_OpenGamepad().
const char * SDL_GetGamepadAppleSFSymbolsNameForButton(SDL_Gamepad *gamepad, SDL_GamepadButton button);                              // Return the sfSymbolsName for a given button on a gamepad on Apple platforms.
const char * SDL_GetGamepadAppleSFSymbolsNameForAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);                                    // Return the sfSymbolsName for a given axis on a gamepad on Apple platforms.

//      XX   XXXXXX   XX    XX   XXXXXX  XXXXXXXX  XX   XXXXXX  XX   XX
//      XX  XX    XX   XX  XX   XX          XX     XX  XX       XX  XX
//      XX  XX    XX    XXXX    XXXXXXX     XX     XX  XX       XXXXX
// XX   XX  XX    XX     XX          XX     XX     XX  XX       XX  XX
//  XXXXX    XXXXXX      XX     XXXXXX      XX     XX   XXXXXX  XX   XX

void SDL_LockJoysticks(void);                                                                                                                     // Locking for atomic access to the joystick API.
bool SDL_TryLockJoysticks(void);                                                                                                                  // Locking for atomic access to the joystick API.
void SDL_UnlockJoysticks(void);                                                                                                                   // Unlocking for atomic access to the joystick API.
bool SDL_HasJoystick(void);                                                                                                                       // Return whether a joystick is currently connected.
SDL_JoystickID * SDL_GetJoysticks(int *count);                                                                                                    // Get a list of currently connected joysticks.
const char * SDL_GetJoystickNameForID(SDL_JoystickID instance_id);                                                                                // Get the implementation dependent name of a joystick.
const char * SDL_GetJoystickPathForID(SDL_JoystickID instance_id);                                                                                // Get the implementation dependent path of a joystick.
int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id);                                                                                  // Get the player index of a joystick.
SDL_GUID SDL_GetJoystickGUIDForID(SDL_JoystickID instance_id);                                                                                    // Get the implementation-dependent GUID of a joystick.
Uint16 SDL_GetJoystickVendorForID(SDL_JoystickID instance_id);                                                                                    // Get the USB vendor ID of a joystick, if available.
Uint16 SDL_GetJoystickProductForID(SDL_JoystickID instance_id);                                                                                   // Get the USB product ID of a joystick, if available.
Uint16 SDL_GetJoystickProductVersionForID(SDL_JoystickID instance_id);                                                                            // Get the product version of a joystick, if available.
SDL_JoystickType SDL_GetJoystickTypeForID(SDL_JoystickID instance_id);                                                                            // Get the type of a joystick, if available.
SDL_Joystick * SDL_OpenJoystick(SDL_JoystickID instance_id);                                                                                      // Open a joystick for use.
SDL_Joystick * SDL_GetJoystickFromID(SDL_JoystickID instance_id);                                                                                 // Get the SDL_Joystick associated with an instance ID, if it has been opened.
SDL_Joystick * SDL_GetJoystickFromPlayerIndex(int player_index);                                                                                  // Get the SDL_Joystick associated with a player index.
SDL_JoystickID SDL_AttachVirtualJoystick(const SDL_VirtualJoystickDesc *desc);                                                                    // Attach a new virtual joystick.
bool SDL_DetachVirtualJoystick(SDL_JoystickID instance_id);                                                                                       // Detach a virtual joystick.
bool SDL_IsJoystickVirtual(SDL_JoystickID instance_id);                                                                                           // Query whether or not a joystick is virtual.
bool SDL_SetJoystickVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value);                                                                  // Set the state of an axis on an opened virtual joystick.
bool SDL_SetJoystickVirtualBall(SDL_Joystick *joystick, int ball, Sint16 xrel, Sint16 yrel);                                                      // Generate ball motion on an opened virtual joystick.
bool SDL_SetJoystickVirtualButton(SDL_Joystick *joystick, int button, bool down);                                                                 // Set the state of a button on an opened virtual joystick.
bool SDL_SetJoystickVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value);                                                                     // Set the state of a hat on an opened virtual joystick.
bool SDL_SetJoystickVirtualTouchpad(SDL_Joystick *joystick, int touchpad, int finger, bool down, float x, float y, float pressure);               // Set touchpad finger state on an opened virtual joystick.
bool SDL_SendJoystickVirtualSensorData(SDL_Joystick *joystick, SDL_SensorType type, Uint64 sensor_timestamp, const float *data, int num_values);  // Send a sensor update for an opened virtual joystick.
SDL_PropertiesID SDL_GetJoystickProperties(SDL_Joystick *joystick);                                                                               // Get the properties associated with a joystick.
const char * SDL_GetJoystickName(SDL_Joystick *joystick);                                                                                         // Get the implementation dependent name of a joystick.
const char * SDL_GetJoystickPath(SDL_Joystick *joystick);                                                                                         // Get the implementation dependent path of a joystick.
int SDL_GetJoystickPlayerIndex(SDL_Joystick *joystick);                                                                                           // Get the player index of an opened joystick.
bool SDL_SetJoystickPlayerIndex(SDL_Joystick *joystick, int player_index);                                                                        // Set the player index of an opened joystick.
SDL_GUID SDL_GetJoystickGUID(SDL_Joystick *joystick);                                                                                             // Get the implementation-dependent GUID for the joystick.
Uint16 SDL_GetJoystickVendor(SDL_Joystick *joystick);                                                                                             // Get the USB vendor ID of an opened joystick, if available.
Uint16 SDL_GetJoystickProduct(SDL_Joystick *joystick);                                                                                            // Get the USB product ID of an opened joystick, if available.
Uint16 SDL_GetJoystickProductVersion(SDL_Joystick *joystick);                                                                                     // Get the product version of an opened joystick, if available.
Uint16 SDL_GetJoystickFirmwareVersion(SDL_Joystick *joystick);                                                                                    // Get the firmware version of an opened joystick, if available.
const char * SDL_GetJoystickSerial(SDL_Joystick *joystick);                                                                                       // Get the serial number of an opened joystick, if available.
SDL_JoystickType SDL_GetJoystickType(SDL_Joystick *joystick);                                                                                     // Get the type of an opened joystick.
void SDL_GetJoystickGUIDInfo(SDL_GUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16);                                     // Get the device information encoded in a SDL_GUID structure.
bool SDL_JoystickConnected(SDL_Joystick *joystick);                                                                                               // Get the status of a specified joystick.
SDL_JoystickID SDL_GetJoystickID(SDL_Joystick *joystick);                                                                                         // Get the instance ID of an opened joystick.
int SDL_GetNumJoystickAxes(SDL_Joystick *joystick);                                                                                               // Get the number of general axis controls on a joystick.
int SDL_GetNumJoystickBalls(SDL_Joystick *joystick);                                                                                              // Get the number of trackballs on a joystick.
int SDL_GetNumJoystickHats(SDL_Joystick *joystick);                                                                                               // Get the number of POV hats on a joystick.
int SDL_GetNumJoystickButtons(SDL_Joystick *joystick);                                                                                            // Get the number of buttons on a joystick.
void SDL_SetJoystickEventsEnabled(bool enabled);                                                                                                  // Set the state of joystick event processing.
bool SDL_JoystickEventsEnabled(void);                                                                                                             // Query the state of joystick event processing.
void SDL_UpdateJoysticks(void);                                                                                                                   // Update the current state of the open joysticks.
Sint16 SDL_GetJoystickAxis(SDL_Joystick *joystick, int axis);                                                                                     // Get the current state of an axis control on a joystick.
bool SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state);                                                            // Get the initial state of an axis control on a joystick.
bool SDL_GetJoystickBall(SDL_Joystick *joystick, int ball, int *dx, int *dy);                                                                     // Get the ball axis change since the last poll.
Uint8 SDL_GetJoystickHat(SDL_Joystick *joystick, int hat);                                                                                        // Get the current state of a POV hat on a joystick.
bool SDL_GetJoystickButton(SDL_Joystick *joystick, int button);                                                                                   // Get the current state of a button on a joystick.
bool SDL_RumbleJoystick(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);                   // Start a rumble effect.
bool SDL_RumbleJoystickTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);                             // Start a rumble effect in the joystick's triggers.
bool SDL_SetJoystickLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue);                                                              // Update a joystick's LED color.
bool SDL_SendJoystickEffect(SDL_Joystick *joystick, const void *data, int size);                                                                  // Send a joystick specific effect packet.
void SDL_CloseJoystick(SDL_Joystick *joystick);                                                                                                   // Close a joystick previously opened with SDL_OpenJoystick().
SDL_JoystickConnectionState SDL_GetJoystickConnectionState(SDL_Joystick *joystick);                                                               // Get the connection state of a joystick.
SDL_PowerState SDL_GetJoystickPowerInfo(SDL_Joystick *joystick, int *percent);                                                                    // Get the battery state of a joystick.

// XX   XX   XXXXX   XXXXXX   XXXXXXXX  XX   XXXXXX
// XX   XX  XX   XX  XX   XX     XX     XX  XX
// XXXXXXX  XXXXXXX  XXXXXX      XX     XX  XX
// XX   XX  XX   XX  XX          XX     XX  XX
// XX   XX  XX   XX  XX          XX     XX   XXXXXX

SDL_HapticID * SDL_GetHaptics(int *count);                                                                 // Get a list of currently connected haptic devices.
const char * SDL_GetHapticNameForID(SDL_HapticID instance_id);                                             // Get the implementation dependent name of a haptic device.
SDL_Haptic * SDL_OpenHaptic(SDL_HapticID instance_id);                                                     // Open a haptic device for use.
SDL_Haptic * SDL_GetHapticFromID(SDL_HapticID instance_id);                                                // Get the SDL_Haptic associated with an instance ID, if it has been opened.
SDL_HapticID SDL_GetHapticID(SDL_Haptic *haptic);                                                          // Get the instance ID of an opened haptic device.
const char * SDL_GetHapticName(SDL_Haptic *haptic);                                                        // Get the implementation dependent name of a haptic device.
bool SDL_IsMouseHaptic(void);                                                                              // Query whether or not the current mouse has haptic capabilities.
SDL_Haptic * SDL_OpenHapticFromMouse(void);                                                                // Try to open a haptic device from the current mouse.
bool SDL_IsJoystickHaptic(SDL_Joystick *joystick);                                                         // Query if a joystick has haptic features.
SDL_Haptic * SDL_OpenHapticFromJoystick(SDL_Joystick *joystick);                                           // Open a haptic device for use from a joystick device.
void SDL_CloseHaptic(SDL_Haptic *haptic);                                                                  // Close a haptic device previously opened with SDL_OpenHaptic().
int SDL_GetMaxHapticEffects(SDL_Haptic *haptic);                                                           // Get the number of effects a haptic device can store.
int SDL_GetMaxHapticEffectsPlaying(SDL_Haptic *haptic);                                                    // Get the number of effects a haptic device can play at the same time.
Uint32 SDL_GetHapticFeatures(SDL_Haptic *haptic);                                                          // Get the haptic device's supported features in bitwise manner.
int SDL_GetNumHapticAxes(SDL_Haptic *haptic);                                                              // Get the number of haptic axes the device has.
bool SDL_HapticEffectSupported(SDL_Haptic *haptic, const SDL_HapticEffect *effect);                        // Check to see if an effect is supported by a haptic device.
SDL_HapticEffectID SDL_CreateHapticEffect(SDL_Haptic *haptic, const SDL_HapticEffect *effect);             // Create a new haptic effect on a specified device.
bool SDL_UpdateHapticEffect(SDL_Haptic *haptic, SDL_HapticEffectID effect, const SDL_HapticEffect *data);  // Update the properties of an effect.
bool SDL_RunHapticEffect(SDL_Haptic *haptic, SDL_HapticEffectID effect, Uint32 iterations);                // Run the haptic effect on its associated haptic device.
bool SDL_StopHapticEffect(SDL_Haptic *haptic, SDL_HapticEffectID effect);                                  // Stop the haptic effect on its associated haptic device.
void SDL_DestroyHapticEffect(SDL_Haptic *haptic, SDL_HapticEffectID effect);                               // Destroy a haptic effect on the device.
bool SDL_GetHapticEffectStatus(SDL_Haptic *haptic, SDL_HapticEffectID effect);                             // Get the status of the current effect on the specified haptic device.
bool SDL_SetHapticGain(SDL_Haptic *haptic, int gain);                                                      // Set the global gain of the specified haptic device.
bool SDL_SetHapticAutocenter(SDL_Haptic *haptic, int autocenter);                                          // Set the global autocenter of the device.
bool SDL_PauseHaptic(SDL_Haptic *haptic);                                                                  // Pause a haptic device.
bool SDL_ResumeHaptic(SDL_Haptic *haptic);                                                                 // Resume a haptic device.
bool SDL_StopHapticEffects(SDL_Haptic *haptic);                                                            // Stop all the currently playing effects on a haptic device.
bool SDL_HapticRumbleSupported(SDL_Haptic *haptic);                                                        // Check whether rumble is supported on a haptic device.
bool SDL_InitHapticRumble(SDL_Haptic *haptic);                                                             // Initialize a haptic device for simple rumble playback.
bool SDL_PlayHapticRumble(SDL_Haptic *haptic, float strength, Uint32 length);                              // Run a simple rumble effect on a haptic device.
bool SDL_StopHapticRumble(SDL_Haptic *haptic);                                                             // Stop the simple rumble on a haptic device.

//  XXXXX   XX    XX  XXXXXX   XX   XXXXXX
// XX   XX  XX    XX  XX   XX  XX  XX    XX
// XXXXXXX  XX    XX  XX   XX  XX  XX    XX
// XX   XX  XX    XX  XX   XX  XX  XX    XX
// XX   XX   XXXXXX   XXXXXX   XX   XXXXXX

int SDL_GetNumAudioDrivers(void);                                                                                                                                // Use this function to get the number of built-in audio drivers.
const char * SDL_GetAudioDriver(int index);                                                                                                                      // Use this function to get the name of a built in audio driver.
const char * SDL_GetCurrentAudioDriver(void);                                                                                                                    // Get the name of the current audio driver.
SDL_AudioDeviceID * SDL_GetAudioPlaybackDevices(int *count);                                                                                                     // Get a list of currently-connected audio playback devices.
SDL_AudioDeviceID * SDL_GetAudioRecordingDevices(int *count);                                                                                                    // Get a list of currently-connected audio recording devices.
const char * SDL_GetAudioDeviceName(SDL_AudioDeviceID devid);                                                                                                    // Get the human-readable name of a specific audio device.
bool SDL_GetAudioDeviceFormat(SDL_AudioDeviceID devid, SDL_AudioSpec *spec, int *sample_frames);                                                                 // Get the current audio format of a specific audio device.
int * SDL_GetAudioDeviceChannelMap(SDL_AudioDeviceID devid, int *count);                                                                                         // Get the current channel map of an audio device.
SDL_AudioDeviceID SDL_OpenAudioDevice(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec);                                                                       // Open a specific audio device.
bool SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid);                                                                                                         // Determine if an audio device is physical (instead of logical).
bool SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid);                                                                                                         // Determine if an audio device is a playback device (instead of recording).
bool SDL_PauseAudioDevice(SDL_AudioDeviceID devid);                                                                                                              // Use this function to pause audio playback on a specified device.
bool SDL_ResumeAudioDevice(SDL_AudioDeviceID devid);                                                                                                             // Use this function to unpause audio playback on a specified device.
bool SDL_AudioDevicePaused(SDL_AudioDeviceID devid);                                                                                                             // Use this function to query if an audio device is paused.
float SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid);                                                                                                           // Get the gain of an audio device.
bool SDL_SetAudioDeviceGain(SDL_AudioDeviceID devid, float gain);                                                                                                // Change the gain of an audio device.
void SDL_CloseAudioDevice(SDL_AudioDeviceID devid);                                                                                                              // Close a previously-opened audio device.
bool SDL_BindAudioStreams(SDL_AudioDeviceID devid, SDL_AudioStream * const *streams, int num_streams);                                                           // Bind a list of audio streams to an audio device.
bool SDL_BindAudioStream(SDL_AudioDeviceID devid, SDL_AudioStream *stream);                                                                                      // Bind a single audio stream to an audio device.
void SDL_UnbindAudioStreams(SDL_AudioStream * const *streams, int num_streams);                                                                                  // Unbind a list of audio streams from their audio devices.
void SDL_UnbindAudioStream(SDL_AudioStream *stream);                                                                                                             // Unbind a single audio stream from its audio device.
SDL_AudioDeviceID SDL_GetAudioStreamDevice(SDL_AudioStream *stream);                                                                                             // Query an audio stream for its currently-bound device.
SDL_AudioStream * SDL_CreateAudioStream(const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec);                                                           // Create a new audio stream.
SDL_PropertiesID SDL_GetAudioStreamProperties(SDL_AudioStream *stream);                                                                                          // Get the properties associated with an audio stream.
bool SDL_GetAudioStreamFormat(SDL_AudioStream *stream, SDL_AudioSpec *src_spec, SDL_AudioSpec *dst_spec);                                                        // Query the current format of an audio stream.
bool SDL_SetAudioStreamFormat(SDL_AudioStream *stream, const SDL_AudioSpec *src_spec, const SDL_AudioSpec *dst_spec);                                            // Change the input and output formats of an audio stream.
float SDL_GetAudioStreamFrequencyRatio(SDL_AudioStream *stream);                                                                                                 // Get the frequency ratio of an audio stream.
bool SDL_SetAudioStreamFrequencyRatio(SDL_AudioStream *stream, float ratio);                                                                                     // Change the frequency ratio of an audio stream.
float SDL_GetAudioStreamGain(SDL_AudioStream *stream);                                                                                                           // Get the gain of an audio stream.
bool SDL_SetAudioStreamGain(SDL_AudioStream *stream, float gain);                                                                                                // Change the gain of an audio stream.
int * SDL_GetAudioStreamInputChannelMap(SDL_AudioStream *stream, int *count);                                                                                    // Get the current input channel map of an audio stream.
int * SDL_GetAudioStreamOutputChannelMap(SDL_AudioStream *stream, int *count);                                                                                   // Get the current output channel map of an audio stream.
bool SDL_SetAudioStreamInputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);                                                                    // Set the current input channel map of an audio stream.
bool SDL_SetAudioStreamOutputChannelMap(SDL_AudioStream *stream, const int *chmap, int count);                                                                   // Set the current output channel map of an audio stream.
bool SDL_PutAudioStreamData(SDL_AudioStream *stream, const void *buf, int len);                                                                                  // Add data to the stream.
bool SDL_PutAudioStreamDataNoCopy(SDL_AudioStream *stream, const void *buf, int len, SDL_AudioStreamDataCompleteCallback callback, void *userdata);              // Add external data to an audio stream without copying it.
bool SDL_PutAudioStreamPlanarData(SDL_AudioStream *stream, const void * const *channel_buffers, int num_channels, int num_samples);                              // Add data to the stream with each channel in a separate array.
int SDL_GetAudioStreamData(SDL_AudioStream *stream, void *buf, int len);                                                                                         // Get converted/resampled data from the stream.
int SDL_GetAudioStreamAvailable(SDL_AudioStream *stream);                                                                                                        // Get the number of converted/resampled bytes available.
int SDL_GetAudioStreamQueued(SDL_AudioStream *stream);                                                                                                           // Get the number of bytes currently queued.
bool SDL_FlushAudioStream(SDL_AudioStream *stream);                                                                                                              // Tell the stream that you're done sending data, and anything being buffered should be converted/resampled and made available immediately.
bool SDL_ClearAudioStream(SDL_AudioStream *stream);                                                                                                              // Clear any pending data in the stream.
bool SDL_PauseAudioStreamDevice(SDL_AudioStream *stream);                                                                                                        // Use this function to pause audio playback on the audio device associated with an audio stream.
bool SDL_ResumeAudioStreamDevice(SDL_AudioStream *stream);                                                                                                       // Use this function to unpause audio playback on the audio device associated with an audio stream.
bool SDL_AudioStreamDevicePaused(SDL_AudioStream *stream);                                                                                                       // Use this function to query if an audio device associated with a stream is paused.
bool SDL_LockAudioStream(SDL_AudioStream *stream);                                                                                                               // Lock an audio stream for serialized access.
bool SDL_UnlockAudioStream(SDL_AudioStream *stream);                                                                                                             // Unlock an audio stream for serialized access.
bool SDL_SetAudioStreamGetCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata);                                                   // Set a callback that runs when data is requested from an audio stream.
bool SDL_SetAudioStreamPutCallback(SDL_AudioStream *stream, SDL_AudioStreamCallback callback, void *userdata);                                                   // Set a callback that runs when data is added to an audio stream.
void SDL_DestroyAudioStream(SDL_AudioStream *stream);                                                                                                            // Free an audio stream.
SDL_AudioStream * SDL_OpenAudioDeviceStream(SDL_AudioDeviceID devid, const SDL_AudioSpec *spec, SDL_AudioStreamCallback callback, void *userdata);               // Convenience function for straightforward audio init for the common case.
bool SDL_SetAudioPostmixCallback(SDL_AudioDeviceID devid, SDL_AudioPostmixCallback callback, void *userdata);                                                    // Set a callback that fires when data is about to be fed to an audio device.
bool SDL_LoadWAV_IO(SDL_IOStream *src, bool closeio, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);                                                 // Load the audio data of a WAVE file into memory.
bool SDL_LoadWAV(const char *path, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len);                                                                   // Loads a WAV from a file path.
bool SDL_MixAudio(Uint8 *dst, const Uint8 *src, SDL_AudioFormat format, Uint32 len, float volume);                                                               // Mix audio data in a specified format.
bool SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec, const Uint8 *src_data, int src_len, const SDL_AudioSpec *dst_spec, Uint8 **dst_data, int *dst_len);  // Convert some audio data of one format to another format.
const char * SDL_GetAudioFormatName(SDL_AudioFormat format);                                                                                                     // Get the human readable name of an audio format.
int SDL_GetSilenceValueForFormat(SDL_AudioFormat format);                                                                                                        // Get the appropriate memset value for silencing an audio format.

// XXXXXXXX  XX  XXX    XXX  XXXXXXX
//    XX     XX  XXXX  XXXX  XX
//    XX     XX  XX XXXX XX  XXXXX
//    XX     XX  XX  XX  XX  XX
//    XX     XX  XX      XX  XXXXXXX

bool SDL_GetDateTimeLocalePreferences(SDL_DateFormat *dateFormat, SDL_TimeFormat *timeFormat);  // Gets the current preferred date and time format for the system locale.
bool SDL_GetCurrentTime(SDL_Time *ticks);                                                       // Gets the current value of the system realtime clock in nanoseconds since Jan 1, 1970 in Universal Coordinated Time (UTC).
bool SDL_TimeToDateTime(SDL_Time ticks, SDL_DateTime *dt, bool localTime);                      // Converts an SDL_Time in nanoseconds since the epoch to a calendar time in the SDL_DateTime format.
bool SDL_DateTimeToTime(const SDL_DateTime *dt, SDL_Time *ticks);                               // Converts a calendar time to an SDL_Time in nanoseconds since the epoch.
void SDL_TimeToWindows(SDL_Time ticks, Uint32 *dwLowDateTime, Uint32 *dwHighDateTime);          // Converts an SDL time into a Windows FILETIME (100-nanosecond intervals since January 1, 1601).
SDL_Time SDL_TimeFromWindows(Uint32 dwLowDateTime, Uint32 dwHighDateTime);                      // Converts a Windows FILETIME (100-nanosecond intervals since January 1, 1601) to an SDL time.
int SDL_GetDaysInMonth(int year, int month);                                                    // Get the number of days in a month for a given year.
int SDL_GetDayOfYear(int year, int month, int day);                                             // Get the day of year for a calendar date.
int SDL_GetDayOfWeek(int year, int month, int day);                                             // Get the day of week for a calendar date.

// XXXXXXXX  XX  XXX    XXX  XXXXXXX  XXXXXX
//    XX     XX  XXXX  XXXX  XX       XX   XX
//    XX     XX  XX XXXX XX  XXXXX    XXXXXX
//    XX     XX  XX  XX  XX  XX       XX   XX
//    XX     XX  XX      XX  XXXXXXX  XX   XX

Uint64 SDL_GetTicks(void);                                                                  // Get the number of milliseconds that have elapsed since the SDL library initialization.
Uint64 SDL_GetTicksNS(void);                                                                // Get the number of nanoseconds since SDL library initialization.
Uint64 SDL_GetPerformanceCounter(void);                                                     // Get the current value of the high resolution counter.
Uint64 SDL_GetPerformanceFrequency(void);                                                   // Get the count per second of the high resolution counter.
void SDL_Delay(Uint32 ms);                                                                  // Wait a specified number of milliseconds before returning.
void SDL_DelayNS(Uint64 ns);                                                                // Wait a specified number of nanoseconds before returning.
void SDL_DelayPrecise(Uint64 ns);                                                           // Wait a specified number of nanoseconds before returning.
SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *userdata);      // Call a callback function at a future time.
SDL_TimerID SDL_AddTimerNS(Uint64 interval, SDL_NSTimerCallback callback, void *userdata);  // Call a callback function at a future time.
bool SDL_RemoveTimer(SDL_TimerID id);                                                       // Remove a timer created with SDL_AddTimer().

// XXXXXX   XXXXXXX  XXX    XX  XXXXXX   XXXXXXX  XXXXXX
// XX   XX  XX       XXXX   XX  XX   XX  XX       XX   XX
// XXXXXX   XXXXX    XX XX  XX  XX   XX  XXXXX    XXXXXX
// XX   XX  XX       XX  XX XX  XX   XX  XX       XX   XX
// XX   XX  XXXXXXX  XX   XXXX  XXXXXX   XXXXXXX  XX   XX

int SDL_GetNumRenderDrivers(void);                                                                                                                                                                                                                              // Get the number of 2D rendering drivers available for the current display.
const char * SDL_GetRenderDriver(int index);                                                                                                                                                                                                                    // Use this function to get the name of a built in 2D rendering driver.
bool SDL_CreateWindowAndRenderer(const char *title, int width, int height, SDL_WindowFlags window_flags, SDL_Window **window, SDL_Renderer **renderer);                                                                                                         // Create a window and default renderer.
SDL_Renderer * SDL_CreateRenderer(SDL_Window *window, const char *name);                                                                                                                                                                                        // Create a 2D rendering context for a window.
SDL_Renderer * SDL_CreateRendererWithProperties(SDL_PropertiesID props);                                                                                                                                                                                        // Create a 2D rendering context for a window, with the specified properties.
SDL_Renderer * SDL_CreateGPURenderer(SDL_GPUDevice *device, SDL_Window *window);                                                                                                                                                                                // Create a 2D GPU rendering context.
SDL_GPUDevice * SDL_GetGPURendererDevice(SDL_Renderer *renderer);                                                                                                                                                                                               // Return the GPU device used by a renderer.
SDL_Renderer * SDL_CreateSoftwareRenderer(SDL_Surface *surface);                                                                                                                                                                                                // Create a 2D software rendering context for a surface.
SDL_Renderer * SDL_GetRenderer(SDL_Window *window);                                                                                                                                                                                                             // Get the renderer associated with a window.
SDL_Window * SDL_GetRenderWindow(SDL_Renderer *renderer);                                                                                                                                                                                                       // Get the window associated with a renderer.
const char * SDL_GetRendererName(SDL_Renderer *renderer);                                                                                                                                                                                                       // Get the name of a renderer.
SDL_PropertiesID SDL_GetRendererProperties(SDL_Renderer *renderer);                                                                                                                                                                                             // Get the properties associated with a renderer.
bool SDL_GetRenderOutputSize(SDL_Renderer *renderer, int *w, int *h);                                                                                                                                                                                           // Get the output size in pixels of a rendering context.
bool SDL_GetCurrentRenderOutputSize(SDL_Renderer *renderer, int *w, int *h);                                                                                                                                                                                    // Get the current output size in pixels of a rendering context.
SDL_Texture * SDL_CreateTexture(SDL_Renderer *renderer, SDL_PixelFormat format, SDL_TextureAccess access, int w, int h);                                                                                                                                        // Create a texture for a rendering context.
SDL_Texture * SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface);                                                                                                                                                                       // Create a texture from an existing surface.
SDL_Texture * SDL_CreateTextureWithProperties(SDL_Renderer *renderer, SDL_PropertiesID props);                                                                                                                                                                  // Create a texture for a rendering context with the specified properties.
SDL_PropertiesID SDL_GetTextureProperties(SDL_Texture *texture);                                                                                                                                                                                                // Get the properties associated with a texture.
SDL_Renderer * SDL_GetRendererFromTexture(SDL_Texture *texture);                                                                                                                                                                                                // Get the renderer that created an SDL_Texture.
bool SDL_GetTextureSize(SDL_Texture *texture, float *w, float *h);                                                                                                                                                                                              // Get the size of a texture, as floating point values.
bool SDL_SetTexturePalette(SDL_Texture *texture, SDL_Palette *palette);                                                                                                                                                                                         // Set the palette used by a texture.
SDL_Palette * SDL_GetTexturePalette(SDL_Texture *texture);                                                                                                                                                                                                      // Get the palette used by a texture.
bool SDL_SetTextureColorMod(SDL_Texture *texture, Uint8 r, Uint8 g, Uint8 b);                                                                                                                                                                                   // Set an additional color value multiplied into render copy operations.
bool SDL_SetTextureColorModFloat(SDL_Texture *texture, float r, float g, float b);                                                                                                                                                                              // Set an additional color value multiplied into render copy operations.
bool SDL_GetTextureColorMod(SDL_Texture *texture, Uint8 *r, Uint8 *g, Uint8 *b);                                                                                                                                                                                // Get the additional color value multiplied into render copy operations.
bool SDL_GetTextureColorModFloat(SDL_Texture *texture, float *r, float *g, float *b);                                                                                                                                                                           // Get the additional color value multiplied into render copy operations.
bool SDL_SetTextureAlphaMod(SDL_Texture *texture, Uint8 alpha);                                                                                                                                                                                                 // Set an additional alpha value multiplied into render copy operations.
bool SDL_SetTextureAlphaModFloat(SDL_Texture *texture, float alpha);                                                                                                                                                                                            // Set an additional alpha value multiplied into render copy operations.
bool SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha);                                                                                                                                                                                                // Get the additional alpha value multiplied into render copy operations.
bool SDL_GetTextureAlphaModFloat(SDL_Texture *texture, float *alpha);                                                                                                                                                                                           // Get the additional alpha value multiplied into render copy operations.
bool SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode);                                                                                                                                                                                    // Set the blend mode for a texture, used by SDL_RenderTexture().
bool SDL_GetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode *blendMode);                                                                                                                                                                                   // Get the blend mode used for texture copy operations.
bool SDL_SetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode scaleMode);                                                                                                                                                                                    // Set the scale mode used for texture scale operations.
bool SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode);                                                                                                                                                                                   // Get the scale mode used for texture scale operations.
bool SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, const void *pixels, int pitch);                                                                                                                                                              // Update the given texture rectangle with new pixel data.
bool SDL_UpdateYUVTexture(SDL_Texture *texture, const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch);                                                                                       // Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
bool SDL_UpdateNVTexture(SDL_Texture *texture, const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *UVplane, int UVpitch);                                                                                                                       // Update a rectangle within a planar NV12 or NV21 texture with new pixels.
bool SDL_LockTexture(SDL_Texture *texture, const SDL_Rect *rect, void **pixels, int *pitch);                                                                                                                                                                    // Lock a portion of the texture for **write-only** pixel access.
bool SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, SDL_Surface **surface);                                                                                                                                                               // Lock a portion of the texture for **write-only** pixel access, and expose it as a SDL surface.
void SDL_UnlockTexture(SDL_Texture *texture);                                                                                                                                                                                                                   // Unlock a texture, uploading the changes to video memory, if needed.
bool SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture);                                                                                                                                                                                         // Set a texture as the current rendering target.
SDL_Texture * SDL_GetRenderTarget(SDL_Renderer *renderer);                                                                                                                                                                                                      // Get the current render target.
bool SDL_SetRenderLogicalPresentation(SDL_Renderer *renderer, int w, int h, SDL_RendererLogicalPresentation mode);                                                                                                                                              // Set a device-independent resolution and presentation mode for rendering.
bool SDL_GetRenderLogicalPresentation(SDL_Renderer *renderer, int *w, int *h, SDL_RendererLogicalPresentation *mode);                                                                                                                                           // Get device independent resolution and presentation mode for rendering.
bool SDL_GetRenderLogicalPresentationRect(SDL_Renderer *renderer, SDL_FRect *rect);                                                                                                                                                                             // Get the final presentation rectangle for rendering.
bool SDL_RenderCoordinatesFromWindow(SDL_Renderer *renderer, float window_x, float window_y, float *x, float *y);                                                                                                                                               // Get a point in render coordinates when given a point in window coordinates.
bool SDL_RenderCoordinatesToWindow(SDL_Renderer *renderer, float x, float y, float *window_x, float *window_y);                                                                                                                                                 // Get a point in window coordinates when given a point in render coordinates.
bool SDL_ConvertEventToRenderCoordinates(SDL_Renderer *renderer, SDL_Event *event);                                                                                                                                                                             // Convert the coordinates in an event to render coordinates.
bool SDL_SetRenderViewport(SDL_Renderer *renderer, const SDL_Rect *rect);                                                                                                                                                                                       // Set the drawing area for rendering on the current target.
bool SDL_GetRenderViewport(SDL_Renderer *renderer, SDL_Rect *rect);                                                                                                                                                                                             // Get the drawing area for the current target.
bool SDL_RenderViewportSet(SDL_Renderer *renderer);                                                                                                                                                                                                             // Return whether an explicit rectangle was set as the viewport.
bool SDL_GetRenderSafeArea(SDL_Renderer *renderer, SDL_Rect *rect);                                                                                                                                                                                             // Get the safe area for rendering within the current viewport.
bool SDL_SetRenderClipRect(SDL_Renderer *renderer, const SDL_Rect *rect);                                                                                                                                                                                       // Set the clip rectangle for rendering on the specified target.
bool SDL_GetRenderClipRect(SDL_Renderer *renderer, SDL_Rect *rect);                                                                                                                                                                                             // Get the clip rectangle for the current target.
bool SDL_RenderClipEnabled(SDL_Renderer *renderer);                                                                                                                                                                                                             // Get whether clipping is enabled on the given render target.
bool SDL_SetRenderScale(SDL_Renderer *renderer, float scaleX, float scaleY);                                                                                                                                                                                    // Set the drawing scale for rendering on the current target.
bool SDL_GetRenderScale(SDL_Renderer *renderer, float *scaleX, float *scaleY);                                                                                                                                                                                  // Get the drawing scale for the current target.
bool SDL_SetRenderDrawColor(SDL_Renderer *renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a);                                                                                                                                                                        // Set the color used for drawing operations.
bool SDL_SetRenderDrawColorFloat(SDL_Renderer *renderer, float r, float g, float b, float a);                                                                                                                                                                   // Set the color used for drawing operations (Rect, Line and Clear).
bool SDL_GetRenderDrawColor(SDL_Renderer *renderer, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);                                                                                                                                                                    // Get the color used for drawing operations (Rect, Line and Clear).
bool SDL_GetRenderDrawColorFloat(SDL_Renderer *renderer, float *r, float *g, float *b, float *a);                                                                                                                                                               // Get the color used for drawing operations (Rect, Line and Clear).
bool SDL_SetRenderColorScale(SDL_Renderer *renderer, float scale);                                                                                                                                                                                              // Set the color scale used for render operations.
bool SDL_GetRenderColorScale(SDL_Renderer *renderer, float *scale);                                                                                                                                                                                             // Get the color scale used for render operations.
bool SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode);                                                                                                                                                                               // Set the blend mode used for drawing operations.
bool SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode *blendMode);                                                                                                                                                                              // Get the blend mode used for drawing operations.
bool SDL_RenderClear(SDL_Renderer *renderer);                                                                                                                                                                                                                   // Clear the current rendering target with the drawing color.
bool SDL_RenderPoint(SDL_Renderer *renderer, float x, float y);                                                                                                                                                                                                 // Draw a point on the current rendering target at subpixel precision.
bool SDL_RenderPoints(SDL_Renderer *renderer, const SDL_FPoint *points, int count);                                                                                                                                                                             // Draw multiple points on the current rendering target at subpixel precision.
bool SDL_RenderLine(SDL_Renderer *renderer, float x1, float y1, float x2, float y2);                                                                                                                                                                            // Draw a line on the current rendering target at subpixel precision.
bool SDL_RenderLines(SDL_Renderer *renderer, const SDL_FPoint *points, int count);                                                                                                                                                                              // Draw a series of connected lines on the current rendering target at subpixel precision.
bool SDL_RenderRect(SDL_Renderer *renderer, const SDL_FRect *rect);                                                                                                                                                                                             // Draw a rectangle on the current rendering target at subpixel precision.
bool SDL_RenderRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count);                                                                                                                                                                                // Draw some number of rectangles on the current rendering target at subpixel precision.
bool SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_FRect *rect);                                                                                                                                                                                         // Fill a rectangle on the current rendering target with the drawing color at subpixel precision.
bool SDL_RenderFillRects(SDL_Renderer *renderer, const SDL_FRect *rects, int count);                                                                                                                                                                            // Fill some number of rectangles on the current rendering target with the drawing color at subpixel precision.
bool SDL_RenderTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FRect *dstrect);                                                                                                                                       // Copy a portion of the texture to the current rendering target at subpixel precision.
bool SDL_RenderTextureRotated(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FRect *dstrect, double angle, const SDL_FPoint *center, SDL_FlipMode flip);                                                                     // Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision.
bool SDL_RenderTextureAffine(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, const SDL_FPoint *origin, const SDL_FPoint *right, const SDL_FPoint *down);                                                                                // Copy a portion of the source texture to the current rendering target, with affine transform, at subpixel precision.
bool SDL_RenderTextureTiled(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float scale, const SDL_FRect *dstrect);                                                                                                                     // Tile a portion of the texture to the current rendering target at subpixel precision.
bool SDL_RenderTexture9Grid(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, const SDL_FRect *dstrect);                                         // Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision.
bool SDL_RenderTexture9GridTiled(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_FRect *srcrect, float left_width, float right_width, float top_height, float bottom_height, float scale, const SDL_FRect *dstrect, float tileScale);                   // Perform a scaled copy using the 9-grid algorithm to the current rendering target at subpixel precision.
bool SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices);                                                                                                       // Render a list of triangles, optionally using a texture and indices into the vertex array.
bool SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, const float *xy, int xy_stride, const SDL_FColor *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices);  // Render a list of triangles, optionally using a texture and indices into the vertex arrays.
bool SDL_SetRenderTextureAddressMode(SDL_Renderer *renderer, SDL_TextureAddressMode u_mode, SDL_TextureAddressMode v_mode);                                                                                                                                     // Set the texture addressing mode used in SDL_RenderGeometry().
bool SDL_GetRenderTextureAddressMode(SDL_Renderer *renderer, SDL_TextureAddressMode *u_mode, SDL_TextureAddressMode *v_mode);                                                                                                                                   // Get the texture addressing mode used in SDL_RenderGeometry().
SDL_Surface * SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect);                                                                                                                                                                               // Read pixels from the current rendering target.
bool SDL_RenderPresent(SDL_Renderer *renderer);                                                                                                                                                                                                                 // Update the screen with any rendering performed since the previous call.
void SDL_DestroyTexture(SDL_Texture *texture);                                                                                                                                                                                                                  // Destroy the specified texture.
void SDL_DestroyRenderer(SDL_Renderer *renderer);                                                                                                                                                                                                               // Destroy the rendering context for a window and free all associated textures.
bool SDL_FlushRenderer(SDL_Renderer *renderer);                                                                                                                                                                                                                 // Force the rendering context to flush any pending commands and state.
void * SDL_GetRenderMetalLayer(SDL_Renderer *renderer);                                                                                                                                                                                                         // Get the CAMetalLayer associated with the given Metal renderer.
void * SDL_GetRenderMetalCommandEncoder(SDL_Renderer *renderer);                                                                                                                                                                                                // Get the Metal command encoder for the current frame.
bool SDL_AddVulkanRenderSemaphores(SDL_Renderer *renderer, Uint32 wait_stage_mask, Sint64 wait_semaphore, Sint64 signal_semaphore);                                                                                                                             // Add a set of synchronization semaphores for the current frame.
bool SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync);                                                                                                                                                                                                     // Toggle VSync of the given renderer.
bool SDL_GetRenderVSync(SDL_Renderer *renderer, int *vsync);                                                                                                                                                                                                    // Get VSync of the given renderer.
bool SDL_RenderDebugText(SDL_Renderer *renderer, float x, float y, const char *str);                                                                                                                                                                            // Draw debug text to an SDL_Renderer.
bool SDL_RenderDebugTextFormat(SDL_Renderer *renderer, float x, float y, const char *fmt, ... ...);                                                                                                                                                             // Draw debug text to an SDL_Renderer.
bool SDL_SetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode scale_mode);                                                                                                                                                                          // Set default scale mode for new textures for given renderer.
bool SDL_GetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode *scale_mode);                                                                                                                                                                         // Get default texture scale mode of the given renderer.
SDL_GPURenderState * SDL_CreateGPURenderState(SDL_Renderer *renderer, const SDL_GPURenderStateCreateInfo *createinfo);                                                                                                                                          // Create custom GPU render state.
bool SDL_SetGPURenderStateSamplerBindings(SDL_GPURenderState *state, int num_sampler_bindings, const SDL_GPUTextureSamplerBinding *sampler_bindings);                                                                                                           // Set sampler bindings variables in a custom GPU render state.
bool SDL_SetGPURenderStateStorageTextures(SDL_GPURenderState *state, int num_storage_textures, SDL_GPUTexture *const *storage_textures);                                                                                                                        // Set storage textures variables in a custom GPU render state.
bool SDL_SetGPURenderStateStorageBuffers(SDL_GPURenderState *state, int num_storage_buffers, SDL_GPUBuffer *const *storage_buffers);                                                                                                                            // Set storage buffers variables in a custom GPU render state.
bool SDL_SetGPURenderStateFragmentUniforms(SDL_GPURenderState *state, Uint32 slot_index, const void *data, Uint32 length);                                                                                                                                      // Set fragment shader uniform variables in a custom GPU render state.
bool SDL_SetGPURenderState(SDL_Renderer *renderer, SDL_GPURenderState *state);                                                                                                                                                                                  // Set custom GPU render state.
void SDL_DestroyGPURenderState(SDL_GPURenderState *state);                                                                                                                                                                                                      // Destroy custom GPU render state.
void SDL_GDKSuspendRenderer(SDL_Renderer *renderer);                                                                                                                                                                                                            // Call this to suspend Render operations on Xbox after receiving the SDL_EVENT_DID_ENTER_BACKGROUND event.
void SDL_GDKResumeRenderer(SDL_Renderer *renderer);                                                                                                                                                                                                             // Call this to resume Render operations on Xbox after receiving the SDL_EVENT_WILL_ENTER_FOREGROUND event.

//  XXXXXX  XX   XX   XXXXX   XXXXXX   XXXXXXX  XXXXXX    XXXXXX   XXXXXX        XX  XXXXXXX   XXXXXX  XXXXXXXX
// XX       XX   XX  XX   XX  XX   XX  XX       XX   XX  XX    XX  XX   XX       XX  XX       XX          XX
// XXXXXXX  XXXXXXX  XXXXXXX  XXXXXX   XXXXX    XX   XX  XX    XX  XXXXXX        XX  XXXXX    XX          XX
//      XX  XX   XX  XX   XX  XX   XX  XX       XX   XX  XX    XX  XX   XX  XX   XX  XX       XX          XX
// XXXXXX   XX   XX  XX   XX  XX   XX  XXXXXXX  XXXXXX    XXXXXX   XXXXXX    XXXXX   XXXXXXX   XXXXXX     XX

SDL_SharedObject * SDL_LoadObject(const char *sofile);                             // Dynamically load a shared object.
SDL_FunctionPointer SDL_LoadFunction(SDL_SharedObject *handle, const char *name);  // Look up the address of the named function in a shared object.
void SDL_UnloadObject(SDL_SharedObject *handle);                                   // Unload a shared object from memory.

// XXXXXXXX  XX   XX  XXXXXX   XXXXXXX   XXXXX   XXXXXX
//    XX     XX   XX  XX   XX  XX       XX   XX  XX   XX
//    XX     XXXXXXX  XXXXXX   XXXXX    XXXXXXX  XX   XX
//    XX     XX   XX  XX   XX  XX       XX   XX  XX   XX
//    XX     XX   XX  XX   XX  XXXXXXX  XX   XX  XXXXXX

SDL_Thread * SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data);       // Create a new thread with a default stack size.
SDL_Thread * SDL_CreateThreadWithProperties(SDL_PropertiesID props);                      // Create a new thread with with the specified properties.
const char * SDL_GetThreadName(SDL_Thread *thread);                                       // Get the thread name as it was specified in SDL_CreateThread().
SDL_ThreadID SDL_GetCurrentThreadID(void);                                                // Get the thread identifier for the current thread.
SDL_ThreadID SDL_GetThreadID(SDL_Thread *thread);                                         // Get the thread identifier for the specified thread.
bool SDL_SetCurrentThreadPriority(SDL_ThreadPriority priority);                           // Set the priority for the current thread.
void SDL_WaitThread(SDL_Thread *thread, int *status);                                     // Wait for a thread to finish.
SDL_ThreadState SDL_GetThreadState(SDL_Thread *thread);                                   // Get the current state of a thread.
void SDL_DetachThread(SDL_Thread *thread);                                                // Let a thread clean up on exit without intervention.
void * SDL_GetTLS(SDL_TLSID *id);                                                         // Get the current thread's value associated with a thread local storage ID.
bool SDL_SetTLS(SDL_TLSID *id, const void *value, SDL_TLSDestructorCallback destructor);  // Set the current thread's value associated with a thread local storage ID.
void SDL_CleanupTLS(void);                                                                // Cleanup all TLS data for this thread.

// XXX    XXX  XX    XX  XXXXXXXX  XXXXXXX  XX   XX
// XXXX  XXXX  XX    XX     XX     XX        XX XX
// XX XXXX XX  XX    XX     XX     XXXXX      XXX
// XX  XX  XX  XX    XX     XX     XX        XX XX
// XX      XX   XXXXXX      XX     XXXXXXX  XX   XX

SDL_Mutex * SDL_CreateMutex(void);                                                       // Create a new mutex.
void SDL_LockMutex(SDL_Mutex *mutex);                                                    // Lock the mutex.
bool SDL_TryLockMutex(SDL_Mutex *mutex);                                                 // Try to lock a mutex without blocking.
void SDL_UnlockMutex(SDL_Mutex *mutex);                                                  // Unlock the mutex.
void SDL_DestroyMutex(SDL_Mutex *mutex);                                                 // Destroy a mutex created with SDL_CreateMutex().
SDL_RWLock * SDL_CreateRWLock(void);                                                     // Create a new read/write lock.
void SDL_LockRWLockForReading(SDL_RWLock *rwlock);                                       // Lock the read/write lock for _read only_ operations.
void SDL_LockRWLockForWriting(SDL_RWLock *rwlock);                                       // Lock the read/write lock for _write_ operations.
bool SDL_TryLockRWLockForReading(SDL_RWLock *rwlock);                                    // Try to lock a read/write lock _for reading_ without blocking.
bool SDL_TryLockRWLockForWriting(SDL_RWLock *rwlock);                                    // Try to lock a read/write lock _for writing_ without blocking.
void SDL_UnlockRWLock(SDL_RWLock *rwlock);                                               // Unlock the read/write lock.
void SDL_DestroyRWLock(SDL_RWLock *rwlock);                                              // Destroy a read/write lock created with SDL_CreateRWLock().
SDL_Semaphore * SDL_CreateSemaphore(Uint32 initial_value);                               // Create a semaphore.
void SDL_DestroySemaphore(SDL_Semaphore *sem);                                           // Destroy a semaphore.
void SDL_WaitSemaphore(SDL_Semaphore *sem);                                              // Wait until a semaphore has a positive value and then decrements it.
bool SDL_TryWaitSemaphore(SDL_Semaphore *sem);                                           // See if a semaphore has a positive value and decrement it if it does.
bool SDL_WaitSemaphoreTimeout(SDL_Semaphore *sem, Sint32 timeoutMS);                     // Wait until a semaphore has a positive value and then decrements it.
void SDL_SignalSemaphore(SDL_Semaphore *sem);                                            // Atomically increment a semaphore's value and wake waiting threads.
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem);                                        // Get the current value of a semaphore.
SDL_Condition * SDL_CreateCondition(void);                                               // Create a condition variable.
void SDL_DestroyCondition(SDL_Condition *cond);                                          // Destroy a condition variable.
void SDL_SignalCondition(SDL_Condition *cond);                                           // Restart one of the threads that are waiting on the condition variable.
void SDL_BroadcastCondition(SDL_Condition *cond);                                        // Restart all threads that are waiting on the condition variable.
void SDL_WaitCondition(SDL_Condition *cond, SDL_Mutex *mutex);                           // Wait until a condition variable is signaled.
bool SDL_WaitConditionTimeout(SDL_Condition *cond, SDL_Mutex *mutex, Sint32 timeoutMS);  // Wait until a condition variable is signaled or a certain time has passed.
bool SDL_ShouldInit(SDL_InitState *state);                                               // Return whether initialization should be done.
bool SDL_ShouldQuit(SDL_InitState *state);                                               // Return whether cleanup should be done.
void SDL_SetInitialized(SDL_InitState *state, bool initialized);                         // Finish an initialization state transition.

//  XXXXX   XXXXXXXX   XXXXXX   XXX    XXX  XX   XXXXXX
// XX   XX     XX     XX    XX  XXXX  XXXX  XX  XX
// XXXXXXX     XX     XX    XX  XX XXXX XX  XX  XX
// XX   XX     XX     XX    XX  XX  XX  XX  XX  XX
// XX   XX     XX      XXXXXX   XX      XX  XX   XXXXXX

bool SDL_TryLockSpinlock(SDL_SpinLock *lock);                                      // Try to lock a spin lock by setting it to a non-zero value.
void SDL_LockSpinlock(SDL_SpinLock *lock);                                         // Lock a spin lock by setting it to a non-zero value.
void SDL_UnlockSpinlock(SDL_SpinLock *lock);                                       // Unlock a spin lock by setting it to 0.
void SDL_MemoryBarrierReleaseFunction(void);                                       // Insert a memory release barrier (function version).
void SDL_MemoryBarrierAcquireFunction(void);                                       // Insert a memory acquire barrier (function version).
bool SDL_CompareAndSwapAtomicInt(SDL_AtomicInt *a, int oldval, int newval);        // Set an atomic variable to a new value if it is currently an old value.
int SDL_SetAtomicInt(SDL_AtomicInt *a, int v);                                     // Set an atomic variable to a value.
int SDL_GetAtomicInt(SDL_AtomicInt *a);                                            // Get the value of an atomic variable.
int SDL_AddAtomicInt(SDL_AtomicInt *a, int v);                                     // Add to an atomic variable.
#define SDL_AtomicIncRef(a)                                                        // Increment an atomic variable used as a reference count.
#define SDL_AtomicDecRef(a)                                                        // Decrement an atomic variable used as a reference count.
bool SDL_CompareAndSwapAtomicU32(SDL_AtomicU32 *a, Uint32 oldval, Uint32 newval);  // Set an atomic variable to a new value if it is currently an old value.
Uint32 SDL_SetAtomicU32(SDL_AtomicU32 *a, Uint32 v);                               // Set an atomic variable to a value.
Uint32 SDL_GetAtomicU32(SDL_AtomicU32 *a);                                         // Get the value of an atomic variable.
Uint32 SDL_AddAtomicU32(SDL_AtomicU32 *a, int v);                                  // Add to an atomic variable.
bool SDL_CompareAndSwapAtomicPointer(void **a, void *oldval, void *newval);        // Set a pointer to a new value if it is currently an old value.
void * SDL_SetAtomicPointer(void **a, void *v);                                    // Set a pointer to a value atomically.
void * SDL_GetAtomicPointer(void **a);                                             // Get the value of a pointer atomically.

// XXXXXXX  XX  XX       XXXXXXX   XXXXXX  XX    XX   XXXXXX  XXXXXXXX  XXXXXXX  XXX    XXX
// XX       XX  XX       XX       XX        XX  XX   XX          XX     XX       XXXX  XXXX
// XXXXX    XX  XX       XXXXX    XXXXXXX    XXXX    XXXXXXX     XX     XXXXX    XX XXXX XX
// XX       XX  XX       XX            XX     XX          XX     XX     XX       XX  XX  XX
// XX       XX  XXXXXXX  XXXXXXX  XXXXXX      XX     XXXXXX      XX     XXXXXXX  XX      XX

const char * SDL_GetBasePath(void);                                                                      // Get the directory where the application was run from.
char * SDL_GetPrefPath(const char *org, const char *app);                                                // Get the user-and-app-specific path where files can be written.
const char * SDL_GetUserFolder(SDL_Folder folder);                                                       // Finds the most suitable user folder for a specific purpose.
bool SDL_CreateDirectory(const char *path);                                                              // Create a directory, and any missing parent directories.
bool SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata);  // Enumerate a directory through a callback function.
bool SDL_RemovePath(const char *path);                                                                   // Remove a file or an empty directory.
bool SDL_RenamePath(const char *oldpath, const char *newpath);                                           // Rename a file or directory.
bool SDL_CopyFile(const char *oldpath, const char *newpath);                                             // Copy a file.
bool SDL_GetPathInfo(const char *path, SDL_PathInfo *info);                                              // Get information about a filesystem path.
char ** SDL_GlobDirectory(const char *path, const char *pattern, SDL_GlobFlags flags, int *count);       // Enumerate a directory tree, filtered by pattern, and return a list.
char * SDL_GetCurrentDirectory(void);                                                                    // Get what the system believes is the "current working directory."

// XX   XXXXXX    XXXXXX  XXXXXXXX  XXXXXX   XXXXXXX   XXXXX   XXX    XXX
// XX  XX    XX  XX          XX     XX   XX  XX       XX   XX  XXXX  XXXX
// XX  XX    XX  XXXXXXX     XX     XXXXXX   XXXXX    XXXXXXX  XX XXXX XX
// XX  XX    XX       XX     XX     XX   XX  XX       XX   XX  XX  XX  XX
// XX   XXXXXX   XXXXXX      XX     XX   XX  XXXXXXX  XX   XX  XX      XX

SDL_IOStream * SDL_IOFromFile(const char *file, const char *mode);                         // Use this function to create a new SDL_IOStream structure for reading from and/or writing to a named file.
SDL_IOStream * SDL_IOFromMem(void *mem, size_t size);                                      // Use this function to prepare a read-write memory buffer for use with SDL_IOStream.
SDL_IOStream * SDL_IOFromConstMem(const void *mem, size_t size);                           // Use this function to prepare a read-only memory buffer for use with SDL_IOStream.
SDL_IOStream * SDL_IOFromDynamicMem(void);                                                 // Use this function to create an SDL_IOStream that is backed by dynamically allocated memory.
SDL_IOStream * SDL_OpenIO(const SDL_IOStreamInterface *iface, void *userdata);             // Create a custom SDL_IOStream.
bool SDL_CloseIO(SDL_IOStream *context);                                                   // Close and free an allocated SDL_IOStream structure.
SDL_PropertiesID SDL_GetIOProperties(SDL_IOStream *context);                               // Get the properties associated with an SDL_IOStream.
SDL_IOStatus SDL_GetIOStatus(SDL_IOStream *context);                                       // Query the stream status of an SDL_IOStream.
Sint64 SDL_GetIOSize(SDL_IOStream *context);                                               // Use this function to get the size of the data stream in an SDL_IOStream.
Sint64 SDL_SeekIO(SDL_IOStream *context, Sint64 offset, SDL_IOWhence whence);              // Seek within an SDL_IOStream data stream.
Sint64 SDL_TellIO(SDL_IOStream *context);                                                  // Determine the current read/write offset in an SDL_IOStream data stream.
size_t SDL_ReadIO(SDL_IOStream *context, void *ptr, size_t size);                          // Read from a data source.
size_t SDL_WriteIO(SDL_IOStream *context, const void *ptr, size_t size);                   // Write to an SDL_IOStream data stream.
size_t SDL_IOprintf(SDL_IOStream *context, const char *fmt, ... ...);                      // Print to an SDL_IOStream data stream.
size_t SDL_IOvprintf(SDL_IOStream *context, const char *fmt, va_list ap);                  // Print to an SDL_IOStream data stream.
bool SDL_FlushIO(SDL_IOStream *context);                                                   // Flush any buffered data in the stream.
void * SDL_LoadFile_IO(SDL_IOStream *src, size_t *datasize, bool closeio);                 // Load all the data from an SDL data stream.
void * SDL_LoadFile(const char *file, size_t *datasize);                                   // Load all the data from a file path.
bool SDL_SaveFile_IO(SDL_IOStream *src, const void *data, size_t datasize, bool closeio);  // Save all the data into an SDL data stream.
bool SDL_SaveFile(const char *file, const void *data, size_t datasize);                    // Save all the data into a file path.
bool SDL_ReadU8(SDL_IOStream *src, Uint8 *value);                                          // Use this function to read a byte from an SDL_IOStream.
bool SDL_ReadS8(SDL_IOStream *src, Sint8 *value);                                          // Use this function to read a signed byte from an SDL_IOStream.
bool SDL_ReadU16LE(SDL_IOStream *src, Uint16 *value);                                      // Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadS16LE(SDL_IOStream *src, Sint16 *value);                                      // Use this function to read 16 bits of little-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadU16BE(SDL_IOStream *src, Uint16 *value);                                      // Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadS16BE(SDL_IOStream *src, Sint16 *value);                                      // Use this function to read 16 bits of big-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadU32LE(SDL_IOStream *src, Uint32 *value);                                      // Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadS32LE(SDL_IOStream *src, Sint32 *value);                                      // Use this function to read 32 bits of little-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadU32BE(SDL_IOStream *src, Uint32 *value);                                      // Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadS32BE(SDL_IOStream *src, Sint32 *value);                                      // Use this function to read 32 bits of big-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadU64LE(SDL_IOStream *src, Uint64 *value);                                      // Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadS64LE(SDL_IOStream *src, Sint64 *value);                                      // Use this function to read 64 bits of little-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadU64BE(SDL_IOStream *src, Uint64 *value);                                      // Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.
bool SDL_ReadS64BE(SDL_IOStream *src, Sint64 *value);                                      // Use this function to read 64 bits of big-endian data from an SDL_IOStream and return in native format.
bool SDL_WriteU8(SDL_IOStream *dst, Uint8 value);                                          // Use this function to write a byte to an SDL_IOStream.
bool SDL_WriteS8(SDL_IOStream *dst, Sint8 value);                                          // Use this function to write a signed byte to an SDL_IOStream.
bool SDL_WriteU16LE(SDL_IOStream *dst, Uint16 value);                                      // Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.
bool SDL_WriteS16LE(SDL_IOStream *dst, Sint16 value);                                      // Use this function to write 16 bits in native format to an SDL_IOStream as little-endian data.
bool SDL_WriteU16BE(SDL_IOStream *dst, Uint16 value);                                      // Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.
bool SDL_WriteS16BE(SDL_IOStream *dst, Sint16 value);                                      // Use this function to write 16 bits in native format to an SDL_IOStream as big-endian data.
bool SDL_WriteU32LE(SDL_IOStream *dst, Uint32 value);                                      // Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.
bool SDL_WriteS32LE(SDL_IOStream *dst, Sint32 value);                                      // Use this function to write 32 bits in native format to an SDL_IOStream as little-endian data.
bool SDL_WriteU32BE(SDL_IOStream *dst, Uint32 value);                                      // Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.
bool SDL_WriteS32BE(SDL_IOStream *dst, Sint32 value);                                      // Use this function to write 32 bits in native format to an SDL_IOStream as big-endian data.
bool SDL_WriteU64LE(SDL_IOStream *dst, Uint64 value);                                      // Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.
bool SDL_WriteS64LE(SDL_IOStream *dst, Sint64 value);                                      // Use this function to write 64 bits in native format to an SDL_IOStream as little-endian data.
bool SDL_WriteU64BE(SDL_IOStream *dst, Uint64 value);                                      // Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.
bool SDL_WriteS64BE(SDL_IOStream *dst, Sint64 value);                                      // Use this function to write 64 bits in native format to an SDL_IOStream as big-endian data.

//  XXXXX    XXXXXX  XX    XX  XXX    XX   XXXXXX  XX   XXXXXX
// XX   XX  XX        XX  XX   XXXX   XX  XX       XX  XX    XX
// XXXXXXX  XXXXXXX    XXXX    XX XX  XX  XX       XX  XX    XX
// XX   XX       XX     XX     XX  XX XX  XX       XX  XX    XX
// XX   XX  XXXXXX      XX     XX   XXXX   XXXXXX  XX   XXXXXX

SDL_AsyncIO * SDL_AsyncIOFromFile(const char *file, const char *mode);                                                        // Use this function to create a new SDL_AsyncIO object for reading from and/or writing to a named file.
Sint64 SDL_GetAsyncIOSize(SDL_AsyncIO *asyncio);                                                                              // Use this function to get the size of the data stream in an SDL_AsyncIO.
bool SDL_ReadAsyncIO(SDL_AsyncIO *asyncio, void *ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue *queue, void *userdata);   // Start an async read.
bool SDL_WriteAsyncIO(SDL_AsyncIO *asyncio, void *ptr, Uint64 offset, Uint64 size, SDL_AsyncIOQueue *queue, void *userdata);  // Start an async write.
bool SDL_CloseAsyncIO(SDL_AsyncIO *asyncio, bool flush, SDL_AsyncIOQueue *queue, void *userdata);                             // Close and free any allocated resources for an async I/O object.
SDL_AsyncIOQueue * SDL_CreateAsyncIOQueue(void);                                                                              // Create a task queue for tracking multiple I/O operations.
void SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue *queue);                                                                        // Destroy a previously-created async I/O task queue.
bool SDL_GetAsyncIOResult(SDL_AsyncIOQueue *queue, SDL_AsyncIOOutcome *outcome);                                              // Query an async I/O task queue for completed tasks.
bool SDL_WaitAsyncIOResult(SDL_AsyncIOQueue *queue, SDL_AsyncIOOutcome *outcome, Sint32 timeoutMS);                           // Block until an async I/O task queue has a completed task.
void SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue);                                                                         // Wake up any threads that are blocking in SDL_WaitAsyncIOResult().
bool SDL_LoadFileAsync(const char *file, SDL_AsyncIOQueue *queue, void *userdata);                                            // Load all the data from a file path, asynchronously.

//  XXXXXX  XXXXXXXX   XXXXXX   XXXXXX    XXXXX    XXXXXX   XXXXXXX
// XX          XX     XX    XX  XX   XX  XX   XX  XX        XX
// XXXXXXX     XX     XX    XX  XXXXXX   XXXXXXX  XX   XXX  XXXXX
//      XX     XX     XX    XX  XX   XX  XX   XX  XX    XX  XX
// XXXXXX      XX      XXXXXX   XX   XX  XX   XX   XXXXXX   XXXXXXX

SDL_Storage * SDL_OpenTitleStorage(const char *override, SDL_PropertiesID props);                                                     // Opens up a read-only container for the application's filesystem.
SDL_Storage * SDL_OpenUserStorage(const char *org, const char *app, SDL_PropertiesID props);                                          // Opens up a container for a user's unique read/write filesystem.
SDL_Storage * SDL_OpenFileStorage(const char *path);                                                                                  // Opens up a container for local filesystem storage.
SDL_Storage * SDL_OpenStorage(const SDL_StorageInterface *iface, void *userdata);                                                     // Opens up a container using a client-provided storage interface.
bool SDL_CloseStorage(SDL_Storage *storage);                                                                                          // Closes and frees a storage container.
bool SDL_StorageReady(SDL_Storage *storage);                                                                                          // Checks if the storage container is ready to use.
bool SDL_GetStorageFileSize(SDL_Storage *storage, const char *path, Uint64 *length);                                                  // Query the size of a file within a storage container.
bool SDL_ReadStorageFile(SDL_Storage *storage, const char *path, void *destination, Uint64 length);                                   // Synchronously read a file from a storage container into a client-provided buffer.
bool SDL_WriteStorageFile(SDL_Storage *storage, const char *path, const void *source, Uint64 length);                                 // Synchronously write a file from client memory into a storage container.
bool SDL_CreateStorageDirectory(SDL_Storage *storage, const char *path);                                                              // Create a directory in a writable storage container.
bool SDL_EnumerateStorageDirectory(SDL_Storage *storage, const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata);  // Enumerate a directory in a storage container through a callback function.
bool SDL_RemoveStoragePath(SDL_Storage *storage, const char *path);                                                                   // Remove a file or an empty directory in a writable storage container.
bool SDL_RenameStoragePath(SDL_Storage *storage, const char *oldpath, const char *newpath);                                           // Rename a file or directory in a writable storage container.
bool SDL_CopyStorageFile(SDL_Storage *storage, const char *oldpath, const char *newpath);                                             // Copy a file in a writable storage container.
bool SDL_GetStoragePathInfo(SDL_Storage *storage, const char *path, SDL_PathInfo *info);                                              // Get information about a filesystem path in a storage container.
Uint64 SDL_GetStorageSpaceRemaining(SDL_Storage *storage);                                                                            // Queries the remaining space in a storage container.
char ** SDL_GlobStorageDirectory(SDL_Storage *storage, const char *path, const char *pattern, SDL_GlobFlags flags, int *count);       // Enumerate a directory tree, filtered by pattern, and return a list.

// XXXXXX   XX  XX   XX  XXXXXXX  XX        XXXXXX
// XX   XX  XX   XX XX   XX       XX       XX
// XXXXXX   XX    XXX    XXXXX    XX       XXXXXXX
// XX       XX   XX XX   XX       XX            XX
// XX       XX  XX   XX  XXXXXXX  XXXXXXX  XXXXXX

const char * SDL_GetPixelFormatName(SDL_PixelFormat format);                                                                                    // Get the human readable name of a pixel format.
bool SDL_GetMasksForPixelFormat(SDL_PixelFormat format, int *bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask);                  // Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
SDL_PixelFormat SDL_GetPixelFormatForMasks(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);                                    // Convert a bpp value and RGBA masks to an enumerated pixel format.
const SDL_PixelFormatDetails * SDL_GetPixelFormatDetails(SDL_PixelFormat format);                                                               // Create an SDL_PixelFormatDetails structure corresponding to a pixel format.
SDL_Palette * SDL_CreatePalette(int ncolors);                                                                                                   // Create a palette structure with the specified number of color entries.
bool SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Color *colors, int firstcolor, int ncolors);                                          // Set a range of colors in a palette.
void SDL_DestroyPalette(SDL_Palette *palette);                                                                                                  // Free a palette created with SDL_CreatePalette().
Uint32 SDL_MapRGB(const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 r, Uint8 g, Uint8 b);                                 // Map an RGB triple to an opaque pixel value for a given pixel format.
Uint32 SDL_MapRGBA(const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 r, Uint8 g, Uint8 b, Uint8 a);                       // Map an RGBA quadruple to a pixel value for a given pixel format.
void SDL_GetRGB(Uint32 pixelvalue, const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 *r, Uint8 *g, Uint8 *b);             // Get RGB values from a pixel in the specified format.
void SDL_GetRGBA(Uint32 pixelvalue, const SDL_PixelFormatDetails *format, const SDL_Palette *palette, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);  // Get RGBA values from a pixel in the specified format.

//  XXXXXX  XX    XX  XXXXXX   XXXXXXX   XXXXX    XXXXXX  XXXXXXX
// XX       XX    XX  XX   XX  XX       XX   XX  XX       XX
// XXXXXXX  XX    XX  XXXXXX   XXXXX    XXXXXXX  XX       XXXXX
//      XX  XX    XX  XX   XX  XX       XX   XX  XX       XX
// XXXXXX    XXXXXX   XX   XX  XX       XX   XX   XXXXXX  XXXXXXX

SDL_Surface * SDL_CreateSurface(int width, int height, SDL_PixelFormat format);                                                                                                                                                                                                                                // Allocate a new surface with a specific pixel format.
SDL_Surface * SDL_CreateSurfaceFrom(int width, int height, SDL_PixelFormat format, void *pixels, int pitch);                                                                                                                                                                                                   // Allocate a new surface with a specific pixel format and existing pixel data.
void SDL_DestroySurface(SDL_Surface *surface);                                                                                                                                                                                                                                                                 // Free a surface.
SDL_PropertiesID SDL_GetSurfaceProperties(SDL_Surface *surface);                                                                                                                                                                                                                                               // Get the properties associated with a surface.
bool SDL_SetSurfaceColorspace(SDL_Surface *surface, SDL_Colorspace colorspace);                                                                                                                                                                                                                                // Set the colorspace used by a surface.
SDL_Colorspace SDL_GetSurfaceColorspace(SDL_Surface *surface);                                                                                                                                                                                                                                                 // Get the colorspace used by a surface.
SDL_Palette * SDL_CreateSurfacePalette(SDL_Surface *surface);                                                                                                                                                                                                                                                  // Create a palette and associate it with a surface.
bool SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette);                                                                                                                                                                                                                                        // Set the palette used by a surface.
SDL_Palette * SDL_GetSurfacePalette(SDL_Surface *surface);                                                                                                                                                                                                                                                     // Get the palette used by a surface.
bool SDL_AddSurfaceAlternateImage(SDL_Surface *surface, SDL_Surface *image);                                                                                                                                                                                                                                   // Add an alternate version of a surface.
bool SDL_SurfaceHasAlternateImages(SDL_Surface *surface);                                                                                                                                                                                                                                                      // Return whether a surface has alternate versions available.
SDL_Surface ** SDL_GetSurfaceImages(SDL_Surface *surface, int *count);                                                                                                                                                                                                                                         // Get an array including all versions of a surface.
void SDL_RemoveSurfaceAlternateImages(SDL_Surface *surface);                                                                                                                                                                                                                                                   // Remove all alternate versions of a surface.
bool SDL_LockSurface(SDL_Surface *surface);                                                                                                                                                                                                                                                                    // Set up a surface for directly accessing the pixels.
void SDL_UnlockSurface(SDL_Surface *surface);                                                                                                                                                                                                                                                                  // Release a surface after directly accessing the pixels.
SDL_Surface * SDL_LoadSurface_IO(SDL_IOStream *src, bool closeio);                                                                                                                                                                                                                                             // Load a BMP, PNG or JPEG image from a seekable SDL data stream.
SDL_Surface * SDL_LoadSurface(const char *file);                                                                                                                                                                                                                                                               // Load a BMP, PNG or JPEG image from a file.
SDL_Surface * SDL_LoadBMP_IO(SDL_IOStream *src, bool closeio);                                                                                                                                                                                                                                                 // Load a BMP image from a seekable SDL data stream.
SDL_Surface * SDL_LoadBMP(const char *file);                                                                                                                                                                                                                                                                   // Load a BMP image from a file.
bool SDL_SaveBMP_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);                                                                                                                                                                                                                                    // Save a surface to a seekable SDL data stream in BMP format.
bool SDL_SaveBMP(SDL_Surface *surface, const char *file);                                                                                                                                                                                                                                                      // Save a surface to a file in BMP format.
SDL_Surface * SDL_LoadPNG_IO(SDL_IOStream *src, bool closeio);                                                                                                                                                                                                                                                 // Load a PNG image from a seekable SDL data stream.
SDL_Surface * SDL_LoadPNG(const char *file);                                                                                                                                                                                                                                                                   // Load a PNG image from a file.
bool SDL_SavePNG_IO(SDL_Surface *surface, SDL_IOStream *dst, bool closeio);                                                                                                                                                                                                                                    // Save a surface to a seekable SDL data stream in PNG format.
bool SDL_SavePNG(SDL_Surface *surface, const char *file);                                                                                                                                                                                                                                                      // Save a surface to a file in PNG format.
SDL_Surface * SDL_LoadJPG_IO(SDL_IOStream *src, bool closeio);                                                                                                                                                                                                                                                 // Load a JPEG image from a seekable SDL data stream.
SDL_Surface * SDL_LoadJPG(const char *file);                                                                                                                                                                                                                                                                   // Load a JPEG image from a file.
bool SDL_SetSurfaceRLE(SDL_Surface *surface, bool enabled);                                                                                                                                                                                                                                                    // Set the RLE acceleration hint for a surface.
bool SDL_SurfaceHasRLE(SDL_Surface *surface);                                                                                                                                                                                                                                                                  // Returns whether the surface is RLE enabled.
bool SDL_SetSurfaceColorKey(SDL_Surface *surface, bool enabled, Uint32 key);                                                                                                                                                                                                                                   // Set the color key (transparent pixel) in a surface.
bool SDL_SurfaceHasColorKey(SDL_Surface *surface);                                                                                                                                                                                                                                                             // Returns whether the surface has a color key.
bool SDL_GetSurfaceColorKey(SDL_Surface *surface, Uint32 *key);                                                                                                                                                                                                                                                // Get the color key (transparent pixel) for a surface.
bool SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b);                                                                                                                                                                                                                                  // Set an additional color value multiplied into blit operations.
bool SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b);                                                                                                                                                                                                                               // Get the additional color value multiplied into blit operations.
bool SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha);                                                                                                                                                                                                                                                // Set an additional alpha value used in blit operations.
bool SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha);                                                                                                                                                                                                                                               // Get the additional alpha value used in blit operations.
bool SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode);                                                                                                                                                                                                                                   // Set the blend mode used for blit operations.
bool SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode);                                                                                                                                                                                                                                  // Get the blend mode used for blit operations.
bool SDL_SetSurfaceClipRect(SDL_Surface *surface, const SDL_Rect *rect);                                                                                                                                                                                                                                       // Set the clipping rectangle for a surface.
bool SDL_GetSurfaceClipRect(SDL_Surface *surface, SDL_Rect *rect);                                                                                                                                                                                                                                             // Get the clipping rectangle for a surface.
bool SDL_FlipSurface(SDL_Surface *surface, SDL_FlipMode flip);                                                                                                                                                                                                                                                 // Flip a surface vertically or horizontally.
SDL_Surface * SDL_RotateSurface(SDL_Surface *surface, float angle);                                                                                                                                                                                                                                            // Return a copy of a surface rotated clockwise a number of degrees.
SDL_Surface * SDL_DuplicateSurface(SDL_Surface *surface);                                                                                                                                                                                                                                                      // Creates a new surface identical to the existing surface.
SDL_Surface * SDL_ScaleSurface(SDL_Surface *surface, int width, int height, SDL_ScaleMode scaleMode);                                                                                                                                                                                                          // Creates a new surface identical to the existing surface, scaled to the desired size.
SDL_Surface * SDL_ConvertSurface(SDL_Surface *surface, SDL_PixelFormat format);                                                                                                                                                                                                                                // Copy an existing surface to a new surface of the specified format.
SDL_Surface * SDL_ConvertSurfaceAndColorspace(SDL_Surface *surface, SDL_PixelFormat format, SDL_Palette *palette, SDL_Colorspace colorspace, SDL_PropertiesID props);                                                                                                                                          // Copy an existing surface to a new surface of the specified format and colorspace.
bool SDL_ConvertPixels(int width, int height, SDL_PixelFormat src_format, const void *src, int src_pitch, SDL_PixelFormat dst_format, void *dst, int dst_pitch);                                                                                                                                               // Copy a block of pixels of one format to another format.
bool SDL_ConvertPixelsAndColorspace(int width, int height, SDL_PixelFormat src_format, SDL_Colorspace src_colorspace, SDL_PropertiesID src_properties, const void *src, int src_pitch, SDL_PixelFormat dst_format, SDL_Colorspace dst_colorspace, SDL_PropertiesID dst_properties, void *dst, int dst_pitch);  // Copy a block of pixels of one format and colorspace to another format and colorspace.
bool SDL_PremultiplyAlpha(int width, int height, SDL_PixelFormat src_format, const void *src, int src_pitch, SDL_PixelFormat dst_format, void *dst, int dst_pitch, bool linear);                                                                                                                               // Premultiply the alpha on a block of pixels.
bool SDL_PremultiplySurfaceAlpha(SDL_Surface *surface, bool linear);                                                                                                                                                                                                                                           // Premultiply the alpha in a surface.
bool SDL_ClearSurface(SDL_Surface *surface, float r, float g, float b, float a);                                                                                                                                                                                                                               // Clear a surface with a specific color, with floating point precision.
bool SDL_FillSurfaceRect(SDL_Surface *dst, const SDL_Rect *rect, Uint32 color);                                                                                                                                                                                                                                // Perform a fast fill of a rectangle with a specific color.
bool SDL_FillSurfaceRects(SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color);                                                                                                                                                                                                                   // Perform a fast fill of a set of rectangles with a specific color.
bool SDL_BlitSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect);                                                                                                                                                                                                    // Performs a fast blit from the source surface to the destination surface with clipping.
bool SDL_BlitSurfaceUnchecked(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect);                                                                                                                                                                                           // Perform low-level surface blitting only.
bool SDL_BlitSurfaceScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);                                                                                                                                                                     // Perform a scaled blit to a destination surface, which may be of a different format.
bool SDL_BlitSurfaceUncheckedScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);                                                                                                                                                            // Perform low-level surface scaled blitting only.
bool SDL_StretchSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);                                                                                                                                                                        // Perform a stretched pixel copy from one surface to another.
bool SDL_BlitSurfaceTiled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect);                                                                                                                                                                                               // Perform a tiled blit to a destination surface, which may be of a different format.
bool SDL_BlitSurfaceTiledWithScale(SDL_Surface *src, const SDL_Rect *srcrect, float scale, SDL_ScaleMode scaleMode, SDL_Surface *dst, const SDL_Rect *dstrect);                                                                                                                                                // Perform a scaled and tiled blit to a destination surface, which may be of a different format.
bool SDL_BlitSurface9Grid(SDL_Surface *src, const SDL_Rect *srcrect, int left_width, int right_width, int top_height, int bottom_height, float scale, SDL_ScaleMode scaleMode, SDL_Surface *dst, const SDL_Rect *dstrect);                                                                                     // Perform a scaled blit using the 9-grid algorithm to a destination surface, which may be of a different format.
Uint32 SDL_MapSurfaceRGB(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b);                                                                                                                                                                                                                                     // Map an RGB triple to an opaque pixel value for a surface.
Uint32 SDL_MapSurfaceRGBA(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b, Uint8 a);                                                                                                                                                                                                                           // Map an RGBA quadruple to a pixel value for a surface.
bool SDL_ReadSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);                                                                                                                                                                                                         // Retrieves a single pixel from a surface as RGBA in the sRGB colorspace.
bool SDL_ReadSurfacePixelFloat(SDL_Surface *surface, int x, int y, float *r, float *g, float *b, float *a);                                                                                                                                                                                                    // Retrieves a single pixel from a surface as RGBA in the sRGB colorspace.
bool SDL_WriteSurfacePixel(SDL_Surface *surface, int x, int y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);                                                                                                                                                                                                            // Writes a single pixel to a surface.
bool SDL_WriteSurfacePixelFloat(SDL_Surface *surface, int x, int y, float r, float g, float b, float a);                                                                                                                                                                                                       // Writes a single pixel to a surface.

// XXXXXX   XX       XXXXXXX  XXX    XX  XXXXXX   XXX    XXX   XXXXXX   XXXXXX   XXXXXXX
// XX   XX  XX       XX       XXXX   XX  XX   XX  XXXX  XXXX  XX    XX  XX   XX  XX
// XXXXXX   XX       XXXXX    XX XX  XX  XX   XX  XX XXXX XX  XX    XX  XX   XX  XXXXX
// XX   XX  XX       XX       XX  XX XX  XX   XX  XX  XX  XX  XX    XX  XX   XX  XX
// XXXXXX   XXXXXXX  XXXXXXX  XX   XXXX  XXXXXX   XX      XX   XXXXXX   XXXXXX   XXXXXXX

SDL_BlendMode SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, SDL_BlendOperation colorOperation, SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor, SDL_BlendOperation alphaOperation);  // Compose a custom blend mode for renderers.

// XXXXXX   XXXXXXX   XXXXXX  XXXXXXXX
// XX   XX  XX       XX          XX
// XXXXXX   XXXXX    XX          XX
// XX   XX  XX       XX          XX
// XX   XX  XXXXXXX   XXXXXX     XX

void SDL_RectToFRect(const SDL_Rect *rect, SDL_FRect *frect);                                                         // Convert an SDL_Rect to SDL_FRect
bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r);                                                          // Determine whether a point resides inside a rectangle.
bool SDL_RectEmpty(const SDL_Rect *r);                                                                                // Determine whether a rectangle has no area.
bool SDL_RectsEqual(const SDL_Rect *a, const SDL_Rect *b);                                                            // Determine whether two rectangles are equal.
bool SDL_HasRectIntersection(const SDL_Rect *A, const SDL_Rect *B);                                                   // Determine whether two rectangles intersect.
bool SDL_GetRectIntersection(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result);                                 // Calculate the intersection of two rectangles.
bool SDL_GetRectUnion(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result);                                        // Calculate the union of two rectangles.
bool SDL_GetRectEnclosingPoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result);          // Calculate a minimal rectangle enclosing a set of points.
bool SDL_GetRectAndLineIntersection(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2);                        // Calculate the intersection of a rectangle and line segment.
bool SDL_PointInRectFloat(const SDL_FPoint *p, const SDL_FRect *r);                                                   // Determine whether a point resides inside a floating point rectangle.
bool SDL_RectEmptyFloat(const SDL_FRect *r);                                                                          // Determine whether a floating point rectangle takes no space.
bool SDL_RectsEqualEpsilon(const SDL_FRect *a, const SDL_FRect *b, float epsilon);                                    // Determine whether two floating point rectangles are equal, within some given epsilon.
bool SDL_RectsEqualFloat(const SDL_FRect *a, const SDL_FRect *b);                                                     // Determine whether two floating point rectangles are equal, within a default epsilon.
bool SDL_HasRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B);                                            // Determine whether two rectangles intersect with float precision.
bool SDL_GetRectIntersectionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);                         // Calculate the intersection of two rectangles with float precision.
bool SDL_GetRectUnionFloat(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result);                                // Calculate the union of two rectangles with float precision.
bool SDL_GetRectEnclosingPointsFloat(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result);  // Calculate a minimal rectangle enclosing a set of points with float precision.
bool SDL_GetRectAndLineIntersectionFloat(const SDL_FRect *rect, float *X1, float *Y1, float *X2, float *Y2);          // Calculate the intersection of a rectangle and line segment with float precision.

//  XXXXXX   XXXXX   XXX    XXX  XXXXXXX  XXXXXX    XXXXX
// XX       XX   XX  XXXX  XXXX  XX       XX   XX  XX   XX
// XX       XXXXXXX  XX XXXX XX  XXXXX    XXXXXX   XXXXXXX
// XX       XX   XX  XX  XX  XX  XX       XX   XX  XX   XX
//  XXXXXX  XX   XX  XX      XX  XXXXXXX  XX   XX  XX   XX

int SDL_GetNumCameraDrivers(void);                                                      // Use this function to get the number of built-in camera drivers.
const char * SDL_GetCameraDriver(int index);                                            // Use this function to get the name of a built in camera driver.
const char * SDL_GetCurrentCameraDriver(void);                                          // Get the name of the current camera driver.
SDL_CameraID * SDL_GetCameras(int *count);                                              // Get a list of currently connected camera devices.
SDL_CameraSpec ** SDL_GetCameraSupportedFormats(SDL_CameraID instance_id, int *count);  // Get the list of native formats/sizes a camera supports.
const char * SDL_GetCameraName(SDL_CameraID instance_id);                               // Get the human-readable device name for a camera.
SDL_CameraPosition SDL_GetCameraPosition(SDL_CameraID instance_id);                     // Get the position of the camera in relation to the system.
SDL_Camera * SDL_OpenCamera(SDL_CameraID instance_id, const SDL_CameraSpec *spec);      // Open a video recording device (a "camera").
SDL_CameraPermissionState SDL_GetCameraPermissionState(SDL_Camera *camera);             // Query if camera access has been approved by the user.
SDL_CameraID SDL_GetCameraID(SDL_Camera *camera);                                       // Get the instance ID of an opened camera.
SDL_PropertiesID SDL_GetCameraProperties(SDL_Camera *camera);                           // Get the properties associated with an opened camera.
bool SDL_GetCameraFormat(SDL_Camera *camera, SDL_CameraSpec *spec);                     // Get the spec that a camera is using when generating images.
SDL_Surface * SDL_AcquireCameraFrame(SDL_Camera *camera, Uint64 *timestampNS);          // Acquire a frame.
void SDL_ReleaseCameraFrame(SDL_Camera *camera, SDL_Surface *frame);                    // Release a frame of video acquired from a camera.
void SDL_CloseCamera(SDL_Camera *camera);                                               // Use this function to shut down camera processing and close the camera device.

// XXX    XXX  XXXXXXX   XXXXXX   XXXXXX   XXXXX    XXXXXX   XXXXXXX  XXXXXX    XXXXXX   XX   XX
// XXXX  XXXX  XX       XX       XX       XX   XX  XX        XX       XX   XX  XX    XX   XX XX
// XX XXXX XX  XXXXX    XXXXXXX  XXXXXXX  XXXXXXX  XX   XXX  XXXXX    XXXXXX   XX    XX    XXX
// XX  XX  XX  XX            XX       XX  XX   XX  XX    XX  XX       XX   XX  XX    XX   XX XX
// XX      XX  XXXXXXX  XXXXXX   XXXXXX   XX   XX   XXXXXX   XXXXXXX  XXXXXX    XXXXXX   XX   XX

bool SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);                                      // Create a modal message box.
bool SDL_ShowSimpleMessageBox(SDL_MessageBoxFlags flags, const char *title, const char *message, SDL_Window *window);  // Display a simple modal message box.

//  XXXXXX  XX       XX  XXXXXX   XXXXXX    XXXXXX    XXXXX   XXXXXX   XXXXXX
// XX       XX       XX  XX   XX  XX   XX  XX    XX  XX   XX  XX   XX  XX   XX
// XX       XX       XX  XXXXXX   XXXXXX   XX    XX  XXXXXXX  XXXXXX   XX   XX
// XX       XX       XX  XX       XX   XX  XX    XX  XX   XX  XX   XX  XX   XX
//  XXXXXX  XXXXXXX  XX  XX       XXXXXX    XXXXXX   XX   XX  XX   XX  XXXXXX

bool SDL_SetClipboardText(const char *text);                                                                                                                                // Put UTF-8 text into the clipboard.
char * SDL_GetClipboardText(void);                                                                                                                                          // Get UTF-8 text from the clipboard.
bool SDL_HasClipboardText(void);                                                                                                                                            // Query whether the clipboard exists and contains a non-empty text string.
bool SDL_SetPrimarySelectionText(const char *text);                                                                                                                         // Put UTF-8 text into the primary selection.
char * SDL_GetPrimarySelectionText(void);                                                                                                                                   // Get UTF-8 text from the primary selection.
bool SDL_HasPrimarySelectionText(void);                                                                                                                                     // Query whether the primary selection exists and contains a non-empty text string.
bool SDL_SetClipboardData(SDL_ClipboardDataCallback callback, SDL_ClipboardCleanupCallback cleanup, void *userdata, const char *const *mime_types, size_t num_mime_types);  // Offer clipboard data to the OS.
bool SDL_ClearClipboardData(void);                                                                                                                                          // Clear the clipboard data.
void * SDL_GetClipboardData(const char *mime_type, size_t *size);                                                                                                           // Get the data from the clipboard for a given mime type.
bool SDL_HasClipboardData(const char *mime_type);                                                                                                                           // Query whether there is data in the clipboard for the provided mime type.
char ** SDL_GetClipboardMimeTypes(size_t *num_mime_types);                                                                                                                  // Retrieve the list of mime types available in the clipboard.

// XXXXXX   XX   XXXXX   XX        XXXXXX    XXXXXX
// XX   XX  XX  XX   XX  XX       XX    XX  XX
// XX   XX  XX  XXXXXXX  XX       XX    XX  XX   XXX
// XX   XX  XX  XX   XX  XX       XX    XX  XX    XX
// XXXXXX   XX  XX   XX  XXXXXXX   XXXXXX    XXXXXX

void SDL_ShowOpenFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, int nfilters, const char *default_location, bool allow_many);  // Displays a dialog that lets the user select a file on their filesystem.
void SDL_ShowSaveFileDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const SDL_DialogFileFilter *filters, int nfilters, const char *default_location);                   // Displays a dialog that lets the user choose a new or existing file on their filesystem.
void SDL_ShowOpenFolderDialog(SDL_DialogFileCallback callback, void *userdata, SDL_Window *window, const char *default_location, bool allow_many);                                                   // Displays a dialog that lets the user select a folder on their filesystem.
void SDL_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFileCallback callback, void *userdata, SDL_PropertiesID props);                                                             // Create and launch a file dialog with the specified properties.

// XXXXXXXX  XXXXXX    XXXXX   XX    XX
//    XX     XX   XX  XX   XX   XX  XX
//    XX     XXXXXX   XXXXXXX    XXXX
//    XX     XX   XX  XX   XX     XX
//    XX     XX   XX  XX   XX     XX

SDL_Tray * SDL_CreateTray(SDL_Surface *icon, const char *tooltip);                                                // Create an icon to be placed in the operating system's tray, or equivalent.
SDL_Tray * SDL_CreateTrayWithProperties(SDL_PropertiesID props);                                                  // Create an icon to be placed in the operating system's tray, or equivalent.
void SDL_SetTrayIcon(SDL_Tray *tray, SDL_Surface *icon);                                                          // Updates the system tray icon's icon.
void SDL_SetTrayTooltip(SDL_Tray *tray, const char *tooltip);                                                     // Updates the system tray icon's tooltip.
SDL_TrayMenu * SDL_CreateTrayMenu(SDL_Tray *tray);                                                                // Create a menu for a system tray.
SDL_TrayMenu * SDL_CreateTraySubmenu(SDL_TrayEntry *entry);                                                       // Create a submenu for a system tray entry.
SDL_TrayMenu * SDL_GetTrayMenu(SDL_Tray *tray);                                                                   // Gets a previously created tray menu.
SDL_TrayMenu * SDL_GetTraySubmenu(SDL_TrayEntry *entry);                                                          // Gets a previously created tray entry submenu.
const SDL_TrayEntry ** SDL_GetTrayEntries(SDL_TrayMenu *menu, int *count);                                        // Returns a list of entries in the menu, in order.
void SDL_RemoveTrayEntry(SDL_TrayEntry *entry);                                                                   // Removes a tray entry.
SDL_TrayEntry * SDL_InsertTrayEntryAt(SDL_TrayMenu *menu, int pos, const char *label, SDL_TrayEntryFlags flags);  // Insert a tray entry at a given position.
void SDL_SetTrayEntryLabel(SDL_TrayEntry *entry, const char *label);                                              // Sets the label of an entry.
const char * SDL_GetTrayEntryLabel(SDL_TrayEntry *entry);                                                         // Gets the label of an entry.
void SDL_SetTrayEntryChecked(SDL_TrayEntry *entry, bool checked);                                                 // Sets whether or not an entry is checked.
bool SDL_GetTrayEntryChecked(SDL_TrayEntry *entry);                                                               // Gets whether or not an entry is checked.
void SDL_SetTrayEntryEnabled(SDL_TrayEntry *entry, bool enabled);                                                 // Sets whether or not an entry is enabled.
bool SDL_GetTrayEntryEnabled(SDL_TrayEntry *entry);                                                               // Gets whether or not an entry is enabled.
void SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, SDL_TrayCallback callback, void *userdata);                   // Sets a callback to be invoked when the entry is selected.
void SDL_ClickTrayEntry(SDL_TrayEntry *entry);                                                                    // Simulate a click on a tray entry.
void SDL_DestroyTray(SDL_Tray *tray);                                                                             // Destroys a tray object.
SDL_TrayMenu * SDL_GetTrayEntryParent(SDL_TrayEntry *entry);                                                      // Gets the menu containing a certain tray entry.
SDL_TrayEntry * SDL_GetTrayMenuParentEntry(SDL_TrayMenu *menu);                                                   // Gets the entry for which the menu is a submenu, if the current menu is a submenu.
SDL_Tray * SDL_GetTrayMenuParentTray(SDL_TrayMenu *menu);                                                         // Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.
void SDL_UpdateTrays(void);                                                                                       // Update the trays.

// XXX    XX   XXXXXX   XXXXXXXX  XX  XXXXXXX  XX   XXXXXX   XXXXX   XXXXXXXX  XX   XXXXXX   XXX    XX
// XXXX   XX  XX    XX     XX     XX  XX       XX  XX       XX   XX     XX     XX  XX    XX  XXXX   XX
// XX XX  XX  XX    XX     XX     XX  XXXXX    XX  XX       XXXXXXX     XX     XX  XX    XX  XX XX  XX
// XX  XX XX  XX    XX     XX     XX  XX       XX  XX       XX   XX     XX     XX  XX    XX  XX  XX XX
// XX   XXXX   XXXXXX      XX     XX  XX       XX   XXXXXX  XX   XX     XX     XX   XXXXXX   XX   XXXX

bool SDL_RequestNotificationPermission(void);                                                                                                           // Requests permission from the system to display notifications.
SDL_NotificationID SDL_ShowNotificationWithProperties(SDL_PropertiesID props);                                                                          // Show a system notification.
SDL_NotificationID SDL_ShowNotification(const char *title, const char *message, SDL_Surface *image, SDL_NotificationAction *actions, int num_actions);  // Show a system notification with normal priority.
bool SDL_RemoveNotification(SDL_NotificationID notification);                                                                                           // Remove a notification.

//  XXXXXX   XXXXXX   XX    XX
// XX        XX   XX  XX    XX
// XX   XXX  XXXXXX   XX    XX
// XX    XX  XX       XX    XX
//  XXXXXX   XX        XXXXXX

bool SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, const char *name);                                                                                                                                                                                                                    // Checks for GPU runtime support.
bool SDL_GPUSupportsProperties(SDL_PropertiesID props);                                                                                                                                                                                                                                                   // Checks for GPU runtime support.
SDL_GPUDevice * SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, bool debug_mode, const char *name);                                                                                                                                                                                                 // Creates a GPU context.
SDL_GPUDevice * SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props);                                                                                                                                                                                                                                // Creates a GPU context.
void SDL_DestroyGPUDevice(SDL_GPUDevice *device);                                                                                                                                                                                                                                                         // Destroys a GPU context previously returned by SDL_CreateGPUDevice.
int SDL_GetNumGPUDrivers(void);                                                                                                                                                                                                                                                                           // Get the number of GPU drivers compiled into SDL.
const char * SDL_GetGPUDriver(int index);                                                                                                                                                                                                                                                                 // Get the name of a built in GPU driver.
const char * SDL_GetGPUDeviceDriver(SDL_GPUDevice *device);                                                                                                                                                                                                                                               // Returns the name of the backend used to create this GPU context.
SDL_GPUShaderFormat SDL_GetGPUShaderFormats(SDL_GPUDevice *device);                                                                                                                                                                                                                                       // Returns the supported shader formats for this GPU context.
SDL_PropertiesID SDL_GetGPUDeviceProperties(SDL_GPUDevice *device);                                                                                                                                                                                                                                       // Get the properties associated with a GPU device.
SDL_GPUComputePipeline * SDL_CreateGPUComputePipeline(SDL_GPUDevice *device, const SDL_GPUComputePipelineCreateInfo *createinfo);                                                                                                                                                                         // Creates a pipeline object to be used in a compute workflow.
SDL_GPUGraphicsPipeline * SDL_CreateGPUGraphicsPipeline(SDL_GPUDevice *device, const SDL_GPUGraphicsPipelineCreateInfo *createinfo);                                                                                                                                                                      // Creates a pipeline object to be used in a graphics workflow.
SDL_GPUSampler * SDL_CreateGPUSampler(SDL_GPUDevice *device, const SDL_GPUSamplerCreateInfo *createinfo);                                                                                                                                                                                                 // Creates a sampler object to be used when binding textures in a graphics workflow.
SDL_GPUShader * SDL_CreateGPUShader(SDL_GPUDevice *device, const SDL_GPUShaderCreateInfo *createinfo);                                                                                                                                                                                                    // Creates a shader to be used when creating a graphics pipeline.
SDL_GPUTexture * SDL_CreateGPUTexture(SDL_GPUDevice *device, const SDL_GPUTextureCreateInfo *createinfo);                                                                                                                                                                                                 // Creates a texture object to be used in graphics or compute workflows.
SDL_GPUBuffer * SDL_CreateGPUBuffer(SDL_GPUDevice *device, const SDL_GPUBufferCreateInfo *createinfo);                                                                                                                                                                                                    // Creates a buffer object to be used in graphics or compute workflows.
SDL_GPUTransferBuffer * SDL_CreateGPUTransferBuffer(SDL_GPUDevice *device, const SDL_GPUTransferBufferCreateInfo *createinfo);                                                                                                                                                                            // Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
void SDL_SetGPUBufferName(SDL_GPUDevice *device, SDL_GPUBuffer *buffer, const char *text);                                                                                                                                                                                                                // Sets an arbitrary string constant to label a buffer.
void SDL_SetGPUTextureName(SDL_GPUDevice *device, SDL_GPUTexture *texture, const char *text);                                                                                                                                                                                                             // Sets an arbitrary string constant to label a texture.
void SDL_InsertGPUDebugLabel(SDL_GPUCommandBuffer *command_buffer, const char *text);                                                                                                                                                                                                                     // Inserts an arbitrary string label into the command buffer callstream.
void SDL_PushGPUDebugGroup(SDL_GPUCommandBuffer *command_buffer, const char *name);                                                                                                                                                                                                                       // Begins a debug group with an arbitrary name.
void SDL_PopGPUDebugGroup(SDL_GPUCommandBuffer *command_buffer);                                                                                                                                                                                                                                          // Ends the most-recently pushed debug group.
void SDL_ReleaseGPUTexture(SDL_GPUDevice *device, SDL_GPUTexture *texture);                                                                                                                                                                                                                               // Frees the given texture as soon as it is safe to do so.
void SDL_ReleaseGPUSampler(SDL_GPUDevice *device, SDL_GPUSampler *sampler);                                                                                                                                                                                                                               // Frees the given sampler as soon as it is safe to do so.
void SDL_ReleaseGPUBuffer(SDL_GPUDevice *device, SDL_GPUBuffer *buffer);                                                                                                                                                                                                                                  // Frees the given buffer as soon as it is safe to do so.
void SDL_ReleaseGPUTransferBuffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer);                                                                                                                                                                                                         // Frees the given transfer buffer as soon as it is safe to do so.
void SDL_ReleaseGPUComputePipeline(SDL_GPUDevice *device, SDL_GPUComputePipeline *compute_pipeline);                                                                                                                                                                                                      // Frees the given compute pipeline as soon as it is safe to do so.
void SDL_ReleaseGPUShader(SDL_GPUDevice *device, SDL_GPUShader *shader);                                                                                                                                                                                                                                  // Frees the given shader as soon as it is safe to do so.
void SDL_ReleaseGPUGraphicsPipeline(SDL_GPUDevice *device, SDL_GPUGraphicsPipeline *graphics_pipeline);                                                                                                                                                                                                   // Frees the given graphics pipeline as soon as it is safe to do so.
SDL_GPUCommandBuffer * SDL_AcquireGPUCommandBuffer(SDL_GPUDevice *device);                                                                                                                                                                                                                                // Acquire a command buffer.
void SDL_PushGPUVertexUniformData(SDL_GPUCommandBuffer *command_buffer, Uint32 slot_index, const void *data, Uint32 length);                                                                                                                                                                              // Pushes data to a vertex uniform slot on the command buffer.
void SDL_PushGPUFragmentUniformData(SDL_GPUCommandBuffer *command_buffer, Uint32 slot_index, const void *data, Uint32 length);                                                                                                                                                                            // Pushes data to a fragment uniform slot on the command buffer.
void SDL_PushGPUComputeUniformData(SDL_GPUCommandBuffer *command_buffer, Uint32 slot_index, const void *data, Uint32 length);                                                                                                                                                                             // Pushes data to a uniform slot on the command buffer.
SDL_GPURenderPass * SDL_BeginGPURenderPass(SDL_GPUCommandBuffer *command_buffer, const SDL_GPUColorTargetInfo *color_target_infos, Uint32 num_color_targets, const SDL_GPUDepthStencilTargetInfo *depth_stencil_target_info);                                                                             // Begins a render pass on a command buffer.
void SDL_BindGPUGraphicsPipeline(SDL_GPURenderPass *render_pass, SDL_GPUGraphicsPipeline *graphics_pipeline);                                                                                                                                                                                             // Binds a graphics pipeline on a render pass to be used in rendering.
void SDL_SetGPUViewport(SDL_GPURenderPass *render_pass, const SDL_GPUViewport *viewport);                                                                                                                                                                                                                 // Sets the current viewport state on a command buffer.
void SDL_SetGPUScissor(SDL_GPURenderPass *render_pass, const SDL_Rect *scissor);                                                                                                                                                                                                                          // Sets the current scissor state on a command buffer.
void SDL_SetGPUBlendConstants(SDL_GPURenderPass *render_pass, SDL_FColor blend_constants);                                                                                                                                                                                                                // Sets the current blend constants on a command buffer.
void SDL_SetGPUStencilReference(SDL_GPURenderPass *render_pass, Uint8 reference);                                                                                                                                                                                                                         // Sets the current stencil reference value on a command buffer.
void SDL_BindGPUVertexBuffers(SDL_GPURenderPass *render_pass, Uint32 first_slot, const SDL_GPUBufferBinding *bindings, Uint32 num_bindings);                                                                                                                                                              // Binds vertex buffers on a command buffer for use with subsequent draw calls.
void SDL_BindGPUIndexBuffer(SDL_GPURenderPass *render_pass, const SDL_GPUBufferBinding *binding, SDL_GPUIndexElementSize index_element_size);                                                                                                                                                             // Binds an index buffer on a command buffer for use with subsequent draw calls.
void SDL_BindGPUVertexSamplers(SDL_GPURenderPass *render_pass, Uint32 first_slot, const SDL_GPUTextureSamplerBinding *texture_sampler_bindings, Uint32 num_bindings);                                                                                                                                     // Binds texture-sampler pairs for use on the vertex shader.
void SDL_BindGPUVertexStorageTextures(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUTexture *const *storage_textures, Uint32 num_bindings);                                                                                                                                                   // Binds storage textures for use on the vertex shader.
void SDL_BindGPUVertexStorageBuffers(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUBuffer *const *storage_buffers, Uint32 num_bindings);                                                                                                                                                      // Binds storage buffers for use on the vertex shader.
void SDL_BindGPUFragmentSamplers(SDL_GPURenderPass *render_pass, Uint32 first_slot, const SDL_GPUTextureSamplerBinding *texture_sampler_bindings, Uint32 num_bindings);                                                                                                                                   // Binds texture-sampler pairs for use on the fragment shader.
void SDL_BindGPUFragmentStorageTextures(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUTexture *const *storage_textures, Uint32 num_bindings);                                                                                                                                                 // Binds storage textures for use on the fragment shader.
void SDL_BindGPUFragmentStorageBuffers(SDL_GPURenderPass *render_pass, Uint32 first_slot, SDL_GPUBuffer *const *storage_buffers, Uint32 num_bindings);                                                                                                                                                    // Binds storage buffers for use on the fragment shader.
void SDL_DrawGPUIndexedPrimitives(SDL_GPURenderPass *render_pass, Uint32 num_indices, Uint32 num_instances, Uint32 first_index, Sint32 vertex_offset, Uint32 first_instance);                                                                                                                             // Draws data using bound graphics state with an index buffer and instancing enabled.
void SDL_DrawGPUPrimitives(SDL_GPURenderPass *render_pass, Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance);                                                                                                                                                        // Draws data using bound graphics state.
void SDL_DrawGPUPrimitivesIndirect(SDL_GPURenderPass *render_pass, SDL_GPUBuffer *buffer, Uint32 offset, Uint32 draw_count);                                                                                                                                                                              // Draws data using bound graphics state and with draw parameters set from a buffer.
void SDL_DrawGPUIndexedPrimitivesIndirect(SDL_GPURenderPass *render_pass, SDL_GPUBuffer *buffer, Uint32 offset, Uint32 draw_count);                                                                                                                                                                       // Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer.
void SDL_EndGPURenderPass(SDL_GPURenderPass *render_pass);                                                                                                                                                                                                                                                // Ends the given render pass.
SDL_GPUComputePass * SDL_BeginGPUComputePass(SDL_GPUCommandBuffer *command_buffer, const SDL_GPUStorageTextureReadWriteBinding *storage_texture_bindings, Uint32 num_storage_texture_bindings, const SDL_GPUStorageBufferReadWriteBinding *storage_buffer_bindings, Uint32 num_storage_buffer_bindings);  // Begins a compute pass on a command buffer.
void SDL_BindGPUComputePipeline(SDL_GPUComputePass *compute_pass, SDL_GPUComputePipeline *compute_pipeline);                                                                                                                                                                                              // Binds a compute pipeline on a command buffer for use in compute dispatch.
void SDL_BindGPUComputeSamplers(SDL_GPUComputePass *compute_pass, Uint32 first_slot, const SDL_GPUTextureSamplerBinding *texture_sampler_bindings, Uint32 num_bindings);                                                                                                                                  // Binds texture-sampler pairs for use on the compute shader.
void SDL_BindGPUComputeStorageTextures(SDL_GPUComputePass *compute_pass, Uint32 first_slot, SDL_GPUTexture *const *storage_textures, Uint32 num_bindings);                                                                                                                                                // Binds storage textures as readonly for use on the compute pipeline.
void SDL_BindGPUComputeStorageBuffers(SDL_GPUComputePass *compute_pass, Uint32 first_slot, SDL_GPUBuffer *const *storage_buffers, Uint32 num_bindings);                                                                                                                                                   // Binds storage buffers as readonly for use on the compute pipeline.
void SDL_DispatchGPUCompute(SDL_GPUComputePass *compute_pass, Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z);                                                                                                                                                                             // Dispatches compute work.
void SDL_DispatchGPUComputeIndirect(SDL_GPUComputePass *compute_pass, SDL_GPUBuffer *buffer, Uint32 offset);                                                                                                                                                                                              // Dispatches compute work with parameters set from a buffer.
void SDL_EndGPUComputePass(SDL_GPUComputePass *compute_pass);                                                                                                                                                                                                                                             // Ends the current compute pass.
void * SDL_MapGPUTransferBuffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer, bool cycle);                                                                                                                                                                                               // Maps a transfer buffer into application address space.
void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer);                                                                                                                                                                                                           // Unmaps a previously mapped transfer buffer.
SDL_GPUCopyPass * SDL_BeginGPUCopyPass(SDL_GPUCommandBuffer *command_buffer);                                                                                                                                                                                                                             // Begins a copy pass on a command buffer.
void SDL_UploadToGPUTexture(SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureTransferInfo *source, const SDL_GPUTextureRegion *destination, bool cycle);                                                                                                                                                   // Uploads data from a transfer buffer to a texture.
void SDL_UploadToGPUBuffer(SDL_GPUCopyPass *copy_pass, const SDL_GPUTransferBufferLocation *source, const SDL_GPUBufferRegion *destination, bool cycle);                                                                                                                                                  // Uploads data from a transfer buffer to a buffer.
void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureLocation *source, const SDL_GPUTextureLocation *destination, Uint32 w, Uint32 h, Uint32 d, bool cycle);                                                                                                                  // Performs a texture-to-texture copy.
void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass *copy_pass, const SDL_GPUBufferLocation *source, const SDL_GPUBufferLocation *destination, Uint32 size, bool cycle);                                                                                                                                       // Performs a buffer-to-buffer copy.
void SDL_DownloadFromGPUTexture(SDL_GPUCopyPass *copy_pass, const SDL_GPUTextureRegion *source, const SDL_GPUTextureTransferInfo *destination);                                                                                                                                                           // Copies data from a texture to a transfer buffer on the GPU timeline.
void SDL_DownloadFromGPUBuffer(SDL_GPUCopyPass *copy_pass, const SDL_GPUBufferRegion *source, const SDL_GPUTransferBufferLocation *destination);                                                                                                                                                          // Copies data from a buffer to a transfer buffer on the GPU timeline.
void SDL_EndGPUCopyPass(SDL_GPUCopyPass *copy_pass);                                                                                                                                                                                                                                                      // Ends the current copy pass.
void SDL_GenerateMipmapsForGPUTexture(SDL_GPUCommandBuffer *command_buffer, SDL_GPUTexture *texture);                                                                                                                                                                                                     // Generates mipmaps for the given texture.
void SDL_BlitGPUTexture(SDL_GPUCommandBuffer *command_buffer, const SDL_GPUBlitInfo *info);                                                                                                                                                                                                               // Blits from a source texture region to a destination texture region.
bool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice *device, SDL_Window *window, SDL_GPUSwapchainComposition swapchain_composition);                                                                                                                                                             // Determines whether a swapchain composition is supported by the window.
bool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice *device, SDL_Window *window, SDL_GPUPresentMode present_mode);                                                                                                                                                                                        // Determines whether a presentation mode is supported by the window.
bool SDL_ClaimWindowForGPUDevice(SDL_GPUDevice *device, SDL_Window *window);                                                                                                                                                                                                                              // Claims a window, creating a swapchain structure for it.
void SDL_ReleaseWindowFromGPUDevice(SDL_GPUDevice *device, SDL_Window *window);                                                                                                                                                                                                                           // Unclaims a window, destroying its swapchain structure.
bool SDL_SetGPUSwapchainParameters(SDL_GPUDevice *device, SDL_Window *window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode);                                                                                                                                        // Changes the swapchain parameters for the given claimed window.
bool SDL_SetGPUAllowedFramesInFlight(SDL_GPUDevice *device, Uint32 allowed_frames_in_flight);                                                                                                                                                                                                             // Configures the maximum allowed number of frames in flight.
SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(SDL_GPUDevice *device, SDL_Window *window);                                                                                                                                                                                                         // Obtains the texture format of the swapchain for the given window.
bool SDL_AcquireGPUSwapchainTexture(SDL_GPUCommandBuffer *command_buffer, SDL_Window *window, SDL_GPUTexture **swapchain_texture, Uint32 *swapchain_texture_width, Uint32 *swapchain_texture_height);                                                                                                     // Acquire a texture to use in presentation.
bool SDL_WaitForGPUSwapchain(SDL_GPUDevice *device, SDL_Window *window);                                                                                                                                                                                                                                  // Blocks the thread until all presenting command buffers are finished executing.
bool SDL_WaitAndAcquireGPUSwapchainTexture(SDL_GPUCommandBuffer *command_buffer, SDL_Window *window, SDL_GPUTexture **swapchain_texture, Uint32 *swapchain_texture_width, Uint32 *swapchain_texture_height);                                                                                              // Blocks the thread until a swapchain texture is available to be acquired, and then acquires it.
bool SDL_SubmitGPUCommandBuffer(SDL_GPUCommandBuffer *command_buffer);                                                                                                                                                                                                                                    // Submits a command buffer so its commands can be processed on the GPU.
SDL_GPUFence * SDL_SubmitGPUCommandBufferAndAcquireFence(SDL_GPUCommandBuffer *command_buffer);                                                                                                                                                                                                           // Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer.
bool SDL_CancelGPUCommandBuffer(SDL_GPUCommandBuffer *command_buffer);                                                                                                                                                                                                                                    // Cancels a command buffer.
bool SDL_WaitForGPUIdle(SDL_GPUDevice *device);                                                                                                                                                                                                                                                           // Blocks the thread until the GPU is completely idle.
bool SDL_WaitForGPUFences(SDL_GPUDevice *device, bool wait_all, SDL_GPUFence *const *fences, Uint32 num_fences);                                                                                                                                                                                          // Blocks the thread until the given fences are signaled.
bool SDL_QueryGPUFence(SDL_GPUDevice *device, SDL_GPUFence *fence);                                                                                                                                                                                                                                       // Checks the status of a fence.
void SDL_ReleaseGPUFence(SDL_GPUDevice *device, SDL_GPUFence *fence);                                                                                                                                                                                                                                     // Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence.
Uint32 SDL_GPUTextureFormatTexelBlockSize(SDL_GPUTextureFormat format);                                                                                                                                                                                                                                   // Obtains the texel block size for a texture format.
bool SDL_GPUTextureSupportsFormat(SDL_GPUDevice *device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage);                                                                                                                                                           // Determines whether a texture format is supported for a given type and usage.
bool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice *device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count);                                                                                                                                                                              // Determines if a sample count for a texture format is supported.
Uint32 SDL_CalculateGPUTextureFormatSize(SDL_GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count);                                                                                                                                                                          // Calculate the size in bytes of a texture format with dimensions.
SDL_PixelFormat SDL_GetPixelFormatFromGPUTextureFormat(SDL_GPUTextureFormat format);                                                                                                                                                                                                                      // Get the SDL pixel format corresponding to a GPU texture format.
SDL_GPUTextureFormat SDL_GetGPUTextureFormatFromPixelFormat(SDL_PixelFormat format);                                                                                                                                                                                                                      // Get the GPU texture format corresponding to an SDL pixel format.
void SDL_GDKSuspendGPU(SDL_GPUDevice *device);                                                                                                                                                                                                                                                            // Call this to suspend GPU operation on Xbox after receiving the SDL_EVENT_DID_ENTER_BACKGROUND event.
void SDL_GDKResumeGPU(SDL_GPUDevice *device);                                                                                                                                                                                                                                                             // Call this to resume GPU operation on Xbox after receiving the SDL_EVENT_WILL_ENTER_FOREGROUND event.

// XX    XX  XX    XX  XX       XX   XX   XXXXX   XXX    XX
// XX    XX  XX    XX  XX       XX  XX   XX   XX  XXXX   XX
// XX    XX  XX    XX  XX       XXXXX    XXXXXXX  XX XX  XX
//  XX  XX   XX    XX  XX       XX  XX   XX   XX  XX  XX XX
//   XXXX     XXXXXX   XXXXXXX  XX   XX  XX   XX  XX   XXXX

bool SDL_Vulkan_LoadLibrary(const char *path);                                                                                                 // Dynamically load the Vulkan loader library.
SDL_FunctionPointer SDL_Vulkan_GetVkGetInstanceProcAddr(void);                                                                                 // Get the address of the `vkGetInstanceProcAddr` function.
void SDL_Vulkan_UnloadLibrary(void);                                                                                                           // Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary().
char const * const * SDL_Vulkan_GetInstanceExtensions(Uint32 *count);                                                                          // Get the Vulkan instance extensions needed for vkCreateInstance.
bool SDL_Vulkan_CreateSurface(SDL_Window *window, VkInstance instance, const struct VkAllocationCallbacks *allocator, VkSurfaceKHR *surface);  // Create a Vulkan rendering surface for a window.
void SDL_Vulkan_DestroySurface(VkInstance instance, VkSurfaceKHR surface, const struct VkAllocationCallbacks *allocator);                      // Destroy the Vulkan rendering surface of a window.
bool SDL_Vulkan_GetPresentationSupport(VkInstance instance, VkPhysicalDevice physicalDevice, Uint32 queueFamilyIndex);                         // Query support for presentation via a given physical device and queue family.

// XXX    XXX  XXXXXXX  XXXXXXXX   XXXXX   XX
// XXXX  XXXX  XX          XX     XX   XX  XX
// XX XXXX XX  XXXXX       XX     XXXXXXX  XX
// XX  XX  XX  XX          XX     XX   XX  XX
// XX      XX  XXXXXXX     XX     XX   XX  XXXXXXX

SDL_MetalView SDL_Metal_CreateView(SDL_Window *window);  // Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window.
void SDL_Metal_DestroyView(SDL_MetalView view);          // Destroy an existing SDL_MetalView object.
void * SDL_Metal_GetLayer(SDL_MetalView view);           // Get a pointer to the backing CAMetalLayer for the given view.

// XXXXXX   XX        XXXXX   XXXXXXXX  XXXXXXX   XXXXXX   XXXXXX   XXX    XXX
// XX   XX  XX       XX   XX     XX     XX       XX    XX  XX   XX  XXXX  XXXX
// XXXXXX   XX       XXXXXXX     XX     XXXXX    XX    XX  XXXXXX   XX XXXX XX
// XX       XX       XX   XX     XX     XX       XX    XX  XX   XX  XX  XX  XX
// XX       XXXXXXX  XX   XX     XX     XX        XXXXXX   XX   XX  XX      XX

#define SDL_PLATFORM_AIX         // A preprocessor macro that is only defined if compiling for AIX.
#define SDL_PLATFORM_HAIKU       // A preprocessor macro that is only defined if compiling for Haiku OS.
#define SDL_PLATFORM_BSDI        // A preprocessor macro that is only defined if compiling for BSDi
#define SDL_PLATFORM_FREEBSD     // A preprocessor macro that is only defined if compiling for FreeBSD.
#define SDL_PLATFORM_HPUX        // A preprocessor macro that is only defined if compiling for HP-UX.
#define SDL_PLATFORM_IRIX        // A preprocessor macro that is only defined if compiling for IRIX.
#define SDL_PLATFORM_LINUX       // A preprocessor macro that is only defined if compiling for Linux.
#define SDL_PLATFORM_ANDROID     // A preprocessor macro that is only defined if compiling for Android.
#define SDL_PLATFORM_UNIX        // A preprocessor macro that is only defined if compiling for a Unix-like system.
#define SDL_PLATFORM_APPLE       // A preprocessor macro that is only defined if compiling for Apple platforms.
#define SDL_PLATFORM_TVOS        // A preprocessor macro that is only defined if compiling for tvOS.
#define SDL_PLATFORM_VISIONOS    // A preprocessor macro that is only defined if compiling for visionOS.
#define SDL_PLATFORM_IOS         // A preprocessor macro that is only defined if compiling for iOS or visionOS.
#define SDL_PLATFORM_MACOS       // A preprocessor macro that is only defined if compiling for macOS.
#define SDL_PLATFORM_EMSCRIPTEN  // A preprocessor macro that is only defined if compiling for Emscripten.
#define SDL_PLATFORM_NETBSD      // A preprocessor macro that is only defined if compiling for NetBSD.
#define SDL_PLATFORM_OPENBSD     // A preprocessor macro that is only defined if compiling for OpenBSD.
#define SDL_PLATFORM_OS2         // A preprocessor macro that is only defined if compiling for OS/2.
#define SDL_PLATFORM_OSF         // A preprocessor macro that is only defined if compiling for Tru64 (OSF/1).
#define SDL_PLATFORM_QNXNTO      // A preprocessor macro that is only defined if compiling for QNX Neutrino.
#define SDL_PLATFORM_RISCOS      // A preprocessor macro that is only defined if compiling for RISC OS.
#define SDL_PLATFORM_SOLARIS     // A preprocessor macro that is only defined if compiling for SunOS/Solaris.
#define SDL_PLATFORM_CYGWIN      // A preprocessor macro that is only defined if compiling for Cygwin.
#define SDL_PLATFORM_WINDOWS     // A preprocessor macro that is only defined if compiling for Windows.
#define SDL_PLATFORM_WINGDK      // A preprocessor macro that is only defined if compiling for Microsoft GDK for Windows.
#define SDL_PLATFORM_XBOXONE     // A preprocessor macro that is only defined if compiling for Xbox One.
#define SDL_PLATFORM_XBOXSERIES  // A preprocessor macro that is only defined if compiling for Xbox Series.
#define SDL_PLATFORM_WIN32       // A preprocessor macro that is only defined if compiling for desktop Windows.
#define SDL_PLATFORM_GDK         // A preprocessor macro that is only defined if compiling for Microsoft GDK on any platform.
#define SDL_PLATFORM_PSP         // A preprocessor macro that is only defined if compiling for Sony PSP.
#define SDL_PLATFORM_PS2         // A preprocessor macro that is only defined if compiling for Sony PlayStation 2.
#define SDL_PLATFORM_VITA        // A preprocessor macro that is only defined if compiling for Sony Vita.
#define SDL_PLATFORM_3DS         // A preprocessor macro that is only defined if compiling for Nintendo 3DS.
#define SDL_PLATFORM_NGAGE       // A preprocessor macro that is only defined if compiling for the Nokia N-Gage.
#define SDL_PLATFORM_DOS         // A preprocessor macro that is only defined if compiling for MS-DOS.
#define SDL_PLATFORM_HURD        // A preprocessor macro that is only defined if compiling for GNU/Hurd.

// XXXXXX    XXXXXX   XX     XX  XXXXXXX  XXXXXX
// XX   XX  XX    XX  XX     XX  XX       XX   XX
// XXXXXX   XX    XX  XX  X  XX  XXXXX    XXXXXX
// XX       XX    XX  XX XXX XX  XX       XX   XX
// XX        XXXXXX    XXX XXX   XXXXXXX  XX   XX

SDL_PowerState SDL_GetPowerInfo(int *seconds, int *percent);  // Get the current power supply details.

//  XXXXXX  XXXXXXX  XXX    XX   XXXXXX   XXXXXX   XXXXXX
// XX       XX       XXXX   XX  XX       XX    XX  XX   XX
// XXXXXXX  XXXXX    XX XX  XX  XXXXXXX  XX    XX  XXXXXX
//      XX  XX       XX  XX XX       XX  XX    XX  XX   XX
// XXXXXX   XXXXXXX  XX   XXXX  XXXXXX    XXXXXX   XX   XX

SDL_SensorID * SDL_GetSensors(int *count);                                // Get a list of currently connected sensors.
const char * SDL_GetSensorNameForID(SDL_SensorID instance_id);            // Get the implementation dependent name of a sensor.
SDL_SensorType SDL_GetSensorTypeForID(SDL_SensorID instance_id);          // Get the type of a sensor.
int SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id);          // Get the platform dependent type of a sensor.
SDL_Sensor * SDL_OpenSensor(SDL_SensorID instance_id);                    // Open a sensor for use.
SDL_Sensor * SDL_GetSensorFromID(SDL_SensorID instance_id);               // Return the SDL_Sensor associated with an instance ID.
SDL_PropertiesID SDL_GetSensorProperties(SDL_Sensor *sensor);             // Get the properties associated with a sensor.
const char * SDL_GetSensorName(SDL_Sensor *sensor);                       // Get the implementation dependent name of a sensor.
SDL_SensorType SDL_GetSensorType(SDL_Sensor *sensor);                     // Get the type of a sensor.
int SDL_GetSensorNonPortableType(SDL_Sensor *sensor);                     // Get the platform dependent type of a sensor.
SDL_SensorID SDL_GetSensorID(SDL_Sensor *sensor);                         // Get the instance ID of a sensor.
bool SDL_GetSensorData(SDL_Sensor *sensor, float *data, int num_values);  // Get the current state of an opened sensor.
void SDL_CloseSensor(SDL_Sensor *sensor);                                 // Close a sensor previously opened with SDL_OpenSensor().
void SDL_UpdateSensors(void);                                             // Update the current state of the open sensors.

// XXXXXX   XXXXXX    XXXXXX    XXXXXX  XXXXXXX   XXXXXX   XXXXXX
// XX   XX  XX   XX  XX    XX  XX       XX       XX       XX
// XXXXXX   XXXXXX   XX    XX  XX       XXXXX    XXXXXXX  XXXXXXX
// XX       XX   XX  XX    XX  XX       XX            XX       XX
// XX       XX   XX   XXXXXX    XXXXXX  XXXXXXX  XXXXXX   XXXXXX

SDL_Process * SDL_CreateProcess(const char * const *args, bool pipe_stdio);     // Create a new process.
SDL_Process * SDL_CreateProcessWithProperties(SDL_PropertiesID props);          // Create a new process with the specified properties.
SDL_PropertiesID SDL_GetProcessProperties(SDL_Process *process);                // Get the properties associated with a process.
void * SDL_ReadProcess(SDL_Process *process, size_t *datasize, int *exitcode);  // Read all the output from a process.
SDL_IOStream * SDL_GetProcessInput(SDL_Process *process);                       // Get the SDL_IOStream associated with process standard input.
SDL_IOStream * SDL_GetProcessOutput(SDL_Process *process);                      // Get the SDL_IOStream associated with process standard output.
bool SDL_KillProcess(SDL_Process *process, bool force);                         // Stop a process.
bool SDL_WaitProcess(SDL_Process *process, bool block, int *exitcode);          // Wait for a process to finish.
void SDL_DestroyProcess(SDL_Process *process);                                  // Destroy a previously created process object.

// XXXXXX   XX  XXXXXXXX   XXXXXX
// XX   XX  XX     XX     XX
// XXXXXX   XX     XX     XXXXXXX
// XX   XX  XX     XX          XX
// XXXXXX   XX     XX     XXXXXX

int SDL_MostSignificantBitIndex32(Uint32 x);  // Get the index of the most significant (set) bit in a 32-bit number.
bool SDL_HasExactlyOneBitSet32(Uint32 x);     // Determine if a unsigned 32-bit value has exactly one bit set.

// XXXXXXX  XXX    XX  XXXXXX   XX   XXXXX   XXX    XX
// XX       XXXX   XX  XX   XX  XX  XX   XX  XXXX   XX
// XXXXX    XX XX  XX  XX   XX  XX  XXXXXXX  XX XX  XX
// XX       XX  XX XX  XX   XX  XX  XX   XX  XX  XX XX
// XXXXXXX  XX   XXXX  XXXXXX   XX  XX   XX  XX   XXXX

float SDL_SwapFloat(float x);  // Byte-swap a floating point number.
Uint16 SDL_Swap16(Uint16 x);   // Byte-swap an unsigned 16-bit number.
Uint32 SDL_Swap32(Uint32 x);   // Byte-swap an unsigned 32-bit number.
Uint64 SDL_Swap64(Uint64 x);   // Byte-swap an unsigned 64-bit number.

//  XXXXX    XXXXXX   XXXXXX  XXXXXXX  XXXXXX   XXXXXXXX
// XX   XX  XX       XX       XX       XX   XX     XX
// XXXXXXX  XXXXXXX  XXXXXXX  XXXXX    XXXXXX      XX
// XX   XX       XX       XX  XX       XX   XX     XX
// XX   XX  XXXXXX   XXXXXX   XXXXXXX  XX   XX     XX

SDL_AssertState SDL_ReportAssertion(SDL_AssertData *data, const char *func, const char *file, int line);  // Never call this directly.
#define SDL_assert(condition)                                                                             // An assertion test that is normally performed only in debug builds.
#define SDL_assert_release(condition)                                                                     // An assertion test that is performed even in release builds.
#define SDL_assert_paranoid(condition)                                                                    // An assertion test that is performed only when built with paranoid settings.
#define SDL_assert_always(condition)                                                                      // An assertion test that is always performed.
void SDL_SetAssertionHandler(SDL_AssertionHandler handler, void *userdata);                               // Set an application-defined assertion handler.
SDL_AssertionHandler SDL_GetDefaultAssertionHandler(void);                                                // Get the default assertion handler.
SDL_AssertionHandler SDL_GetAssertionHandler(void **puserdata);                                           // Get the current assertion handler.
const SDL_AssertData * SDL_GetAssertionReport(void);                                                      // Get a list of all assertion failures.
void SDL_ResetAssertionReport(void);                                                                      // Clear the list of all assertion failures.

//  XXXXXX  XXXXXX   XX    XX  XX  XXX    XX  XXXXXXX   XXXXXX
// XX       XX   XX  XX    XX  XX  XXXX   XX  XX       XX    XX
// XX       XXXXXX   XX    XX  XX  XX XX  XX  XXXXX    XX    XX
// XX       XX       XX    XX  XX  XX  XX XX  XX       XX    XX
//  XXXXXX  XX        XXXXXX   XX  XX   XXXX  XX        XXXXXX

int SDL_GetNumLogicalCPUCores(void);  // Get the number of logical CPU cores available.
int SDL_GetCPUCacheLineSize(void);    // Determine the L1 cache line size of the CPU.
bool SDL_HasAltiVec(void);            // Determine whether the CPU has AltiVec features.
bool SDL_HasMMX(void);                // Determine whether the CPU has MMX features.
bool SDL_HasSSE(void);                // Determine whether the CPU has SSE features.
bool SDL_HasSSE2(void);               // Determine whether the CPU has SSE2 features.
bool SDL_HasSSE3(void);               // Determine whether the CPU has SSE3 features.
bool SDL_HasSSE41(void);              // Determine whether the CPU has SSE4.1 features.
bool SDL_HasSSE42(void);              // Determine whether the CPU has SSE4.2 features.
bool SDL_HasAVX(void);                // Determine whether the CPU has AVX features.
bool SDL_HasAVX2(void);               // Determine whether the CPU has AVX2 features.
bool SDL_HasAVX512F(void);            // Determine whether the CPU has AVX-512F (foundation) features.
bool SDL_HasARMSIMD(void);            // Determine whether the CPU has ARM SIMD (ARMv6) features.
bool SDL_HasNEON(void);               // Determine whether the CPU has NEON (ARM SIMD) features.
bool SDL_HasSVE2(void);               // Determine whether the CPU has SVE2 (Scalable Vector Extension 2).
bool SDL_HasLSX(void);                // Determine whether the CPU has LSX (LOONGARCH SIMD) features.
bool SDL_HasLASX(void);               // Determine whether the CPU has LASX (LOONGARCH SIMD) features.
int SDL_GetSystemRAM(void);           // Get the amount of RAM configured in the system.
size_t SDL_GetSIMDAlignment(void);    // Report the alignment this system needs for SIMD allocations.
int SDL_GetSystemPageSize(void);      // Report the size of a page of memory.

// XX  XXX    XX  XXXXXXXX  XXXXXX   XX  XXX    XX   XXXXXX  XX   XXXXXX   XXXXXX
// XX  XXXX   XX     XX     XX   XX  XX  XXXX   XX  XX       XX  XX       XX
// XX  XX XX  XX     XX     XXXXXX   XX  XX XX  XX  XXXXXXX  XX  XX       XXXXXXX
// XX  XX  XX XX     XX     XX   XX  XX  XX  XX XX       XX  XX  XX            XX
// XX  XX   XXXX     XX     XX   XX  XX  XX   XXXX  XXXXXX   XX   XXXXXX  XXXXXX

#define SDL_LSX_INTRINSICS      // Defined if (and only if) the compiler supports Loongarch LSX intrinsics.
#define SDL_LASX_INTRINSICS     // Defined if (and only if) the compiler supports Loongarch LSX intrinsics.
#define SDL_NEON_INTRINSICS     // Defined if (and only if) the compiler supports ARM NEON intrinsics.
#define SDL_SVE2_INTRINSICS     // Defined if (and only if) the compiler supports ARM SVE2 intrinsics.
#define SDL_ALTIVEC_INTRINSICS  // Defined if (and only if) the compiler supports PowerPC Altivec intrinsics.
#define SDL_MMX_INTRINSICS      // Defined if (and only if) the compiler supports Intel MMX intrinsics.
#define SDL_SSE_INTRINSICS      // Defined if (and only if) the compiler supports Intel SSE intrinsics.
#define SDL_SSE2_INTRINSICS     // Defined if (and only if) the compiler supports Intel SSE2 intrinsics.
#define SDL_SSE3_INTRINSICS     // Defined if (and only if) the compiler supports Intel SSE3 intrinsics.
#define SDL_SSE4_1_INTRINSICS   // Defined if (and only if) the compiler supports Intel SSE4.1 intrinsics.
#define SDL_SSE4_2_INTRINSICS   // Defined if (and only if) the compiler supports Intel SSE4.2 intrinsics.
#define SDL_AVX_INTRINSICS      // Defined if (and only if) the compiler supports Intel AVX intrinsics.
#define SDL_AVX2_INTRINSICS     // Defined if (and only if) the compiler supports Intel AVX2 intrinsics.
#define SDL_AVX512F_INTRINSICS  // Defined if (and only if) the compiler supports Intel AVX-512F intrinsics.

// XX        XXXXXX    XXXXXX   XXXXX   XX       XXXXXXX
// XX       XX    XX  XX       XX   XX  XX       XX
// XX       XX    XX  XX       XXXXXXX  XX       XXXXX
// XX       XX    XX  XX       XX   XX  XX       XX
// XXXXXXX   XXXXXX    XXXXXX  XX   XX  XXXXXXX  XXXXXXX

SDL_Locale ** SDL_GetPreferredLocales(int *count);  // Report the user's preferred locale.

//  XXXXXX  XX    XX   XXXXXX  XXXXXXXX  XXXXXXX  XXX    XXX
// XX        XX  XX   XX          XX     XX       XXXX  XXXX
// XXXXXXX    XXXX    XXXXXXX     XX     XXXXX    XX XXXX XX
//      XX     XX          XX     XX     XX       XX  XX  XX
// XXXXXX      XX     XXXXXX      XX     XXXXXXX  XX      XX

void SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);                                             // Set a callback for every Windows message, run before TranslateMessage().
int SDL_GetDirect3D9AdapterIndex(SDL_DisplayID displayID);                                                                   // Get the D3D9 adapter index that matches the specified display.
bool SDL_GetDXGIOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex);                                    // Get the DXGI Adapter and Output indices for the specified display.
void SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);                                                         // Set a callback for every X11 event.
bool SDL_SetLinuxThreadPriority(Sint64 threadID, int priority);                                                              // Sets the UNIX nice value for a thread.
bool SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);                                 // Sets the priority (not nice level) and scheduling policy for a thread.
bool SDL_SetiOSAnimationCallback(SDL_Window *window, int interval, SDL_iOSAnimationCallback callback, void *callbackParam);  // Use this function to set the animation callback on Apple iOS.
void SDL_SetiOSEventPump(bool enabled);                                                                                      // Use this function to enable or disable the SDL event pump on Apple iOS.
void * SDL_GetAndroidJNIEnv(void);                                                                                           // Get the Android Java Native Interface Environment of the current thread.
void * SDL_GetAndroidActivity(void);                                                                                         // Retrieve the Java instance of the Android activity class.
int SDL_GetAndroidSDKVersion(void);                                                                                          // Query Android API level of the current device.
bool SDL_IsChromebook(void);                                                                                                 // Query if the application is running on a Chromebook.
bool SDL_IsDeXMode(void);                                                                                                    // Query if the application is running on a Samsung DeX docking station.
void SDL_SendAndroidBackButton(void);                                                                                        // Trigger the Android system back button behavior.
const char * SDL_GetAndroidInternalStoragePath(void);                                                                        // Get the path used for internal storage for this Android application.
Uint32 SDL_GetAndroidExternalStorageState(void);                                                                             // Get the current state of external storage for this Android application.
const char * SDL_GetAndroidExternalStoragePath(void);                                                                        // Get the path used for external storage for this Android application.
const char * SDL_GetAndroidCachePath(void);                                                                                  // Get the path used for caching data for this Android application.
bool SDL_RequestAndroidPermission(const char *permission, SDL_RequestAndroidPermissionCallback cb, void *userdata);          // Request permissions at runtime, asynchronously.
bool SDL_ShowAndroidToast(const char *message, int duration, int gravity, int xoffset, int yoffset);                         // Shows an Android toast notification.
bool SDL_SendAndroidMessage(Uint32 command, int param);                                                                      // Send a user command to SDLActivity.
bool SDL_IsPhone(void);                                                                                                      // Query if the current device is a phone.
bool SDL_IsTablet(void);                                                                                                     // Query if the current device is a tablet.
bool SDL_IsTV(void);                                                                                                         // Query if the current device is a TV.
SDL_FormFactor SDL_GetDeviceFormFactor(void);                                                                                // Get the form factor of the current device.
const char * SDL_GetDeviceFormFactorName(SDL_FormFactor form_factor);                                                        // Get a short name for the current device.
SDL_Sandbox SDL_GetSandbox(void);                                                                                            // Get the application sandbox environment, if any.
void SDL_OnApplicationWillTerminate(void);                                                                                   // Let iOS apps with external event handling report onApplicationWillTerminate.
void SDL_OnApplicationDidReceiveMemoryWarning(void);                                                                         // Let iOS apps with external event handling report onApplicationDidReceiveMemoryWarning.
void SDL_OnApplicationWillEnterBackground(void);                                                                             // Let iOS apps with external event handling report onApplicationWillResignActive.
void SDL_OnApplicationDidEnterBackground(void);                                                                              // Let iOS apps with external event handling report onApplicationDidEnterBackground.
void SDL_OnApplicationWillEnterForeground(void);                                                                             // Let iOS apps with external event handling report onApplicationWillEnterForeground.
void SDL_OnApplicationDidEnterForeground(void);                                                                              // Let iOS apps with external event handling report onApplicationDidBecomeActive.
void SDL_OnApplicationDidChangeStatusBarOrientation(void);                                                                   // Let iOS apps with external event handling report onApplicationDidChangeStatusBarOrientation.
bool SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQueue);                                                                    // Gets a reference to the global async task queue handle for GDK, initializing if needed.
bool SDL_GetGDKDefaultUser(XUserHandle *outUserHandle);                                                                      // Gets a reference to the default user handle for GDK.
bool SDL_IsUbuntuTouch(void);                                                                                                // Detect whether the current platform is Ubuntu Touch.

// XXX    XXX  XX   XXXXXX   XXXXXX
// XXXX  XXXX  XX  XX       XX
// XX XXXX XX  XX  XXXXXXX  XX
// XX  XX  XX  XX       XX  XX
// XX      XX  XX  XXXXXX    XXXXXX

bool SDL_OpenURL(const char *url);  // Open a URL/URI in the browser or other appropriate external application.

//  XXXXXX   XX    XX  XX  XXXXXX
// XX        XX    XX  XX  XX   XX
// XX   XXX  XX    XX  XX  XX   XX
// XX    XX  XX    XX  XX  XX   XX
//  XXXXXX    XXXXXX   XX  XXXXXX

void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);  // Get an ASCII string representation for a given SDL_GUID.
SDL_GUID SDL_StringToGUID(const char *pchGUID);                   // Convert a GUID string into a SDL_GUID structure.

//  XXXXXX  XXXXXXXX  XXXXXX   XX  XXX    XX   XXXXXX
// XX          XX     XX   XX  XX  XXXX   XX  XX
// XXXXXXX     XX     XX   XX  XX  XX XX  XX  XX
//      XX     XX     XX   XX  XX  XX  XX XX  XX
// XXXXXX      XX     XXXXXX   XX  XX   XXXX   XXXXXX

#define SDL_COMPILE_TIME_ASSERT(name, x)                                                                                                                    // A compile-time assertion.
#define SDL_arraysize(array)                                                                                                                                // The number of elements in a static array.
#define SDL_reinterpret_cast(type, expression)                                                                                                              // Handle a Reinterpret Cast properly whether using C or C++.
#define SDL_static_cast(type, expression)                                                                                                                   // Handle a Static Cast properly whether using C or C++.
#define SDL_const_cast(type, expression)                                                                                                                    // Handle a Const Cast properly whether using C or C++.
void * SDL_malloc(size_t size);                                                                                                                             // Allocate uninitialized memory.
void * SDL_calloc(size_t nmemb, size_t size);                                                                                                               // Allocate a zero-initialized array.
void * SDL_realloc(void *mem, size_t size);                                                                                                                 // Change the size of allocated memory.
void SDL_free(void *mem);                                                                                                                                   // Free allocated memory.
void SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func);  // Get the original set of SDL memory functions.
void SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func);          // Get the current set of SDL memory functions.
bool SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, SDL_calloc_func calloc_func, SDL_realloc_func realloc_func, SDL_free_func free_func);              // Replace SDL's memory allocation functions with a custom set.
void * SDL_aligned_alloc(size_t alignment, size_t size);                                                                                                    // Allocate memory aligned to a specific alignment.
void * SDL_aligned_alloc_zero(size_t alignment, size_t size);                                                                                               // Allocate zero-initialized memory aligned to a specific alignment.
void SDL_aligned_free(void *mem);                                                                                                                           // Free memory allocated by SDL_aligned_alloc().
int SDL_GetNumAllocations(void);                                                                                                                            // Get the number of outstanding (unfreed) allocations.
SDL_Environment * SDL_GetEnvironment(void);                                                                                                                 // Get the process environment.
SDL_Environment * SDL_CreateEnvironment(bool populated);                                                                                                    // Create a set of environment variables
const char * SDL_GetEnvironmentVariable(SDL_Environment *env, const char *name);                                                                            // Get the value of a variable in the environment.
char ** SDL_GetEnvironmentVariables(SDL_Environment *env);                                                                                                  // Get all variables in the environment.
bool SDL_SetEnvironmentVariable(SDL_Environment *env, const char *name, const char *value, bool overwrite);                                                 // Set the value of a variable in the environment.
bool SDL_UnsetEnvironmentVariable(SDL_Environment *env, const char *name);                                                                                  // Clear a variable from the environment.
void SDL_DestroyEnvironment(SDL_Environment *env);                                                                                                          // Destroy a set of environment variables.
const char * SDL_getenv(const char *name);                                                                                                                  // Get the value of a variable in the environment.
const char * SDL_getenv_unsafe(const char *name);                                                                                                           // Get the value of a variable in the environment.
int SDL_setenv_unsafe(const char *name, const char *value, int overwrite);                                                                                  // Set the value of a variable in the environment.
int SDL_unsetenv_unsafe(const char *name);                                                                                                                  // Clear a variable from the environment.
void SDL_qsort(void *base, size_t nmemb, size_t size, SDL_CompareCallback compare);                                                                         // Sort an array.
void * SDL_bsearch(const void *key, const void *base, size_t nmemb, size_t size, SDL_CompareCallback compare);                                              // Perform a binary search on a previously sorted array.
void SDL_qsort_r(void *base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void *userdata);                                                     // Sort an array, passing a userdata pointer to the compare function.
void * SDL_bsearch_r(const void *key, const void *base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void *userdata);                          // Perform a binary search on a previously sorted array, passing a userdata pointer to the compare function.
int SDL_abs(int x);                                                                                                                                         // Compute the absolute value of `x`.
int SDL_isalpha(int x);                                                                                                                                     // Query if a character is alphabetic (a letter).
int SDL_isalnum(int x);                                                                                                                                     // Query if a character is alphabetic (a letter) or a number.
int SDL_isblank(int x);                                                                                                                                     // Report if a character is blank (a space or tab).
int SDL_iscntrl(int x);                                                                                                                                     // Report if a character is a control character.
int SDL_isdigit(int x);                                                                                                                                     // Report if a character is a numeric digit.
int SDL_isxdigit(int x);                                                                                                                                    // Report if a character is a hexadecimal digit.
int SDL_ispunct(int x);                                                                                                                                     // Report if a character is a punctuation mark.
int SDL_isspace(int x);                                                                                                                                     // Report if a character is whitespace.
int SDL_isupper(int x);                                                                                                                                     // Report if a character is upper case.
int SDL_islower(int x);                                                                                                                                     // Report if a character is lower case.
int SDL_isprint(int x);                                                                                                                                     // Report if a character is "printable".
int SDL_isgraph(int x);                                                                                                                                     // Report if a character is any "printable" except space.
int SDL_toupper(int x);                                                                                                                                     // Convert low-ASCII English letters to uppercase.
int SDL_tolower(int x);                                                                                                                                     // Convert low-ASCII English letters to lowercase.
Uint16 SDL_crc16(Uint16 crc, const void *data, size_t len);                                                                                                 // Calculate a CRC-16 value.
Uint32 SDL_crc32(Uint32 crc, const void *data, size_t len);                                                                                                 // Calculate a CRC-32 value.
Uint32 SDL_murmur3_32(const void *data, size_t len, Uint32 seed);                                                                                           // Calculate a 32-bit MurmurHash3 value for a block of data.
void * SDL_memcpy(void *dst, const void *src, size_t len);                                                                                                  // Copy non-overlapping memory.
void * SDL_memmove(void *dst, const void *src, size_t len);                                                                                                 // Copy memory ranges that might overlap.
void * SDL_memset(void *dst, int c, size_t len);                                                                                                            // Initialize all bytes of buffer of memory to a specific value.
void * SDL_memset4(void *dst, Uint32 val, size_t dwords);                                                                                                   // Initialize all 32-bit words of buffer of memory to a specific value.
int SDL_memcmp(const void *s1, const void *s2, size_t len);                                                                                                 // Compare two buffers of memory.
size_t SDL_wcslen(const wchar_t *wstr);                                                                                                                     // This works exactly like wcslen() but doesn't require access to a C runtime.
size_t SDL_wcsnlen(const wchar_t *wstr, size_t maxlen);                                                                                                     // This works exactly like wcsnlen() but doesn't require access to a C runtime.
size_t SDL_wcslcpy(wchar_t *dst, const wchar_t *src, size_t maxlen);                                                                                        // Copy a wide string.
size_t SDL_wcslcat(wchar_t *dst, const wchar_t *src, size_t maxlen);                                                                                        // Concatenate wide strings.
wchar_t * SDL_wcsdup(const wchar_t *wstr);                                                                                                                  // Allocate a copy of a wide string.
wchar_t * SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);                                                                                       // Search a wide string for the first instance of a specific substring.
wchar_t * SDL_wcsnstr(const wchar_t *haystack, const wchar_t *needle, size_t maxlen);                                                                       // Search a wide string, up to n wide chars, for the first instance of a specific substring.
int SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);                                                                                                   // Compare two null-terminated wide strings.
int SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);                                                                                   // Compare two wide strings up to a number of wchar_t values.
int SDL_wcscasecmp(const wchar_t *str1, const wchar_t *str2);                                                                                               // Compare two null-terminated wide strings, case-insensitively.
int SDL_wcsncasecmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);                                                                               // Compare two wide strings, case-insensitively, up to a number of wchar_t.
long SDL_wcstol(const wchar_t *str, wchar_t **endp, int base);                                                                                              // Parse a `long` from a wide string.
unsigned long SDL_wcstoul(const wchar_t *str, wchar_t **endp, int base);                                                                                    // Parse an `unsigned long` from a wide string.
long long SDL_wcstoll(const wchar_t *str, wchar_t **endp, int base);                                                                                        // Parse a `long long` from a wide string.
unsigned long long SDL_wcstoull(const wchar_t *str, wchar_t **endp, int base);                                                                              // Parse an `unsigned long long` from a wide string.
size_t SDL_strlen(const char *str);                                                                                                                         // This works exactly like strlen() but doesn't require access to a C runtime.
size_t SDL_strnlen(const char *str, size_t maxlen);                                                                                                         // This works exactly like strnlen() but doesn't require access to a C runtime.
size_t SDL_strlcpy(char *dst, const char *src, size_t maxlen);                                                                                              // Copy a string.
size_t SDL_utf8strlcpy(char *dst, const char *src, size_t dst_bytes);                                                                                       // Copy an UTF-8 string.
size_t SDL_strlcat(char *dst, const char *src, size_t maxlen);                                                                                              // Concatenate strings.
char * SDL_strdup(const char *str);                                                                                                                         // Allocate a copy of a string.
char * SDL_strndup(const char *str, size_t maxlen);                                                                                                         // Allocate a copy of a string, up to n characters.
char * SDL_strrev(char *str);                                                                                                                               // Reverse a string's contents.
char * SDL_strupr(char *str);                                                                                                                               // Convert a string to uppercase.
char * SDL_strlwr(char *str);                                                                                                                               // Convert a string to lowercase.
char * SDL_strchr(const char *str, int c);                                                                                                                  // Search a string for the first instance of a specific byte.
char * SDL_strrchr(const char *str, int c);                                                                                                                 // Search a string for the last instance of a specific byte.
char * SDL_strstr(const char *haystack, const char *needle);                                                                                                // Search a string for the first instance of a specific substring.
char * SDL_strnstr(const char *haystack, const char *needle, size_t maxlen);                                                                                // Search a string, up to n bytes, for the first instance of a specific substring.
char * SDL_strcasestr(const char *haystack, const char *needle);                                                                                            // Search a UTF-8 string for the first instance of a specific substring, case-insensitively.
char * SDL_strtok_r(char *str, const char *delim, char **saveptr);                                                                                          // This works exactly like strtok_r() but doesn't require access to a C runtime.
size_t SDL_utf8strlen(const char *str);                                                                                                                     // Count the number of codepoints in a UTF-8 string.
size_t SDL_utf8strnlen(const char *str, size_t bytes);                                                                                                      // Count the number of codepoints in a UTF-8 string, up to n bytes.
char * SDL_itoa(int value, char *str, int radix);                                                                                                           // Convert an integer into a string.
char * SDL_uitoa(unsigned int value, char *str, int radix);                                                                                                 // Convert an unsigned integer into a string.
char * SDL_ltoa(long value, char *str, int radix);                                                                                                          // Convert a long integer into a string.
char * SDL_ultoa(unsigned long value, char *str, int radix);                                                                                                // Convert an unsigned long integer into a string.
char * SDL_lltoa(long long value, char *str, int radix);                                                                                                    // Convert a long long integer into a string.
char * SDL_ulltoa(unsigned long long value, char *str, int radix);                                                                                          // Convert an unsigned long long integer into a string.
int SDL_atoi(const char *str);                                                                                                                              // Parse an `int` from a string.
double SDL_atof(const char *str);                                                                                                                           // Parse a `double` from a string.
long SDL_strtol(const char *str, char **endp, int base);                                                                                                    // Parse a `long` from a string.
unsigned long SDL_strtoul(const char *str, char **endp, int base);                                                                                          // Parse an `unsigned long` from a string.
long long SDL_strtoll(const char *str, char **endp, int base);                                                                                              // Parse a `long long` from a string.
unsigned long long SDL_strtoull(const char *str, char **endp, int base);                                                                                    // Parse an `unsigned long long` from a string.
double SDL_strtod(const char *str, char **endp);                                                                                                            // Parse a `double` from a string.
int SDL_strcmp(const char *str1, const char *str2);                                                                                                         // Compare two null-terminated UTF-8 strings.
int SDL_strncmp(const char *str1, const char *str2, size_t maxlen);                                                                                         // Compare two UTF-8 strings up to a number of bytes.
int SDL_strcasecmp(const char *str1, const char *str2);                                                                                                     // Compare two null-terminated UTF-8 strings, case-insensitively.
int SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen);                                                                                     // Compare two UTF-8 strings, case-insensitively, up to a number of bytes.
char * SDL_strpbrk(const char *str, const char *breakset);                                                                                                  // Searches a string for the first occurrence of any character contained in a breakset, and returns a pointer from the string to that character.
Uint32 SDL_StepUTF8(const char **pstr, size_t *pslen);                                                                                                      // Decode a UTF-8 string, one Unicode codepoint at a time.
Uint32 SDL_StepBackUTF8(const char *start, const char **pstr);                                                                                              // Decode a UTF-8 string in reverse, one Unicode codepoint at a time.
char * SDL_UCS4ToUTF8(Uint32 codepoint, char *dst);                                                                                                         // Convert a single Unicode codepoint to UTF-8.
int SDL_sscanf(const char *text, const char *fmt, ... ...);                                                                                                 // This works exactly like sscanf() but doesn't require access to a C runtime.
int SDL_vsscanf(const char *text, const char *fmt, va_list ap);                                                                                             // This works exactly like vsscanf() but doesn't require access to a C runtime.
int SDL_snprintf(char *text, size_t maxlen, const char *fmt, ... ...);                                                                                      // This works exactly like snprintf() but doesn't require access to a C runtime.
int SDL_swprintf(wchar_t *text, size_t maxlen, const wchar_t *fmt, ... ...);                                                                                // This works exactly like swprintf() but doesn't require access to a C runtime.
int SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);                                                                                  // This works exactly like vsnprintf() but doesn't require access to a C runtime.
int SDL_vswprintf(wchar_t *text, size_t maxlen, const wchar_t *fmt, va_list ap);                                                                            // This works exactly like vswprintf() but doesn't require access to a C runtime.
int SDL_asprintf(char **strp, const char *fmt, ... ...);                                                                                                    // This works exactly like asprintf() but doesn't require access to a C runtime.
int SDL_vasprintf(char **strp, const char *fmt, va_list ap);                                                                                                // This works exactly like vasprintf() but doesn't require access to a C runtime.
void SDL_srand(Uint64 seed);                                                                                                                                // Seeds the pseudo-random number generator.
Sint32 SDL_rand(Sint32 n);                                                                                                                                  // Generate a pseudo-random number less than n for positive n
float SDL_randf(void);                                                                                                                                      // Generate a uniform pseudo-random floating point number less than 1.0
Uint32 SDL_rand_bits(void);                                                                                                                                 // Generate 32 pseudo-random bits.
Sint32 SDL_rand_r(Uint64 *state, Sint32 n);                                                                                                                 // Generate a pseudo-random number less than n for positive n
float SDL_randf_r(Uint64 *state);                                                                                                                           // Generate a uniform pseudo-random floating point number less than 1.0
Uint32 SDL_rand_bits_r(Uint64 *state);                                                                                                                      // Generate 32 pseudo-random bits.
double SDL_acos(double x);                                                                                                                                  // Compute the arc cosine of `x`.
float SDL_acosf(float x);                                                                                                                                   // Compute the arc cosine of `x`.
double SDL_asin(double x);                                                                                                                                  // Compute the arc sine of `x`.
float SDL_asinf(float x);                                                                                                                                   // Compute the arc sine of `x`.
double SDL_atan(double x);                                                                                                                                  // Compute the arc tangent of `x`.
float SDL_atanf(float x);                                                                                                                                   // Compute the arc tangent of `x`.
double SDL_atan2(double y, double x);                                                                                                                       // Compute the arc tangent of `y / x`, using the signs of x and y to adjust the result's quadrant.
float SDL_atan2f(float y, float x);                                                                                                                         // Compute the arc tangent of `y / x`, using the signs of x and y to adjust the result's quadrant.
double SDL_ceil(double x);                                                                                                                                  // Compute the ceiling of `x`.
float SDL_ceilf(float x);                                                                                                                                   // Compute the ceiling of `x`.
double SDL_copysign(double x, double y);                                                                                                                    // Copy the sign of one floating-point value to another.
float SDL_copysignf(float x, float y);                                                                                                                      // Copy the sign of one floating-point value to another.
double SDL_cos(double x);                                                                                                                                   // Compute the cosine of `x`.
float SDL_cosf(float x);                                                                                                                                    // Compute the cosine of `x`.
double SDL_exp(double x);                                                                                                                                   // Compute the exponential of `x`.
float SDL_expf(float x);                                                                                                                                    // Compute the exponential of `x`.
double SDL_fabs(double x);                                                                                                                                  // Compute the absolute value of `x`
float SDL_fabsf(float x);                                                                                                                                   // Compute the absolute value of `x`
double SDL_floor(double x);                                                                                                                                 // Compute the floor of `x`.
float SDL_floorf(float x);                                                                                                                                  // Compute the floor of `x`.
double SDL_trunc(double x);                                                                                                                                 // Truncate `x` to an integer.
float SDL_truncf(float x);                                                                                                                                  // Truncate `x` to an integer.
double SDL_fmod(double x, double y);                                                                                                                        // Return the floating-point remainder of `x / y`
float SDL_fmodf(float x, float y);                                                                                                                          // Return the floating-point remainder of `x / y`
int SDL_isinf(double x);                                                                                                                                    // Return whether the value is infinity.
int SDL_isinff(float x);                                                                                                                                    // Return whether the value is infinity.
int SDL_isnan(double x);                                                                                                                                    // Return whether the value is NaN.
int SDL_isnanf(float x);                                                                                                                                    // Return whether the value is NaN.
double SDL_log(double x);                                                                                                                                   // Compute the natural logarithm of `x`.
float SDL_logf(float x);                                                                                                                                    // Compute the natural logarithm of `x`.
double SDL_log10(double x);                                                                                                                                 // Compute the base-10 logarithm of `x`.
float SDL_log10f(float x);                                                                                                                                  // Compute the base-10 logarithm of `x`.
double SDL_modf(double x, double *y);                                                                                                                       // Split `x` into integer and fractional parts
float SDL_modff(float x, float *y);                                                                                                                         // Split `x` into integer and fractional parts
double SDL_pow(double x, double y);                                                                                                                         // Raise `x` to the power `y`
float SDL_powf(float x, float y);                                                                                                                           // Raise `x` to the power `y`
double SDL_round(double x);                                                                                                                                 // Round `x` to the nearest integer.
float SDL_roundf(float x);                                                                                                                                  // Round `x` to the nearest integer.
long SDL_lround(double x);                                                                                                                                  // Round `x` to the nearest integer representable as a long
long SDL_lroundf(float x);                                                                                                                                  // Round `x` to the nearest integer representable as a long
double SDL_scalbn(double x, int n);                                                                                                                         // Scale `x` by an integer power of two.
float SDL_scalbnf(float x, int n);                                                                                                                          // Scale `x` by an integer power of two.
double SDL_sin(double x);                                                                                                                                   // Compute the sine of `x`.
float SDL_sinf(float x);                                                                                                                                    // Compute the sine of `x`.
double SDL_sqrt(double x);                                                                                                                                  // Compute the square root of `x`.
float SDL_sqrtf(float x);                                                                                                                                   // Compute the square root of `x`.
double SDL_tan(double x);                                                                                                                                   // Compute the tangent of `x`.
float SDL_tanf(float x);                                                                                                                                    // Compute the tangent of `x`.
SDL_iconv_t SDL_iconv_open(const char *tocode, const char *fromcode);                                                                                       // This function allocates a context for the specified character set conversion.
int SDL_iconv_close(SDL_iconv_t cd);                                                                                                                        // This function frees a context used for character set conversion.
size_t SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);                                             // This function converts text between encodings, reading from and writing to a buffer.
char * SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft);                                                   // Helper function to convert a string's encoding in one call.
bool SDL_size_mul_check_overflow(size_t a, size_t b, size_t *ret);                                                                                          // Multiply two integers, checking for overflow.
bool SDL_size_add_check_overflow(size_t a, size_t b, size_t *ret);                                                                                          // Add two integers, checking for overflow.
```

