Crate sdl2_sys

source ·
Expand description

This crate was mainly generated by bindgen. It should be enough in most cases, but if you ever find discrepancies between what bindgen generated and your OS, you can always generate your own sdl2-sys.

Structs

\brief Audio device event structure (event.adevice.*)
The calculated values in this structure are calculated by SDL_OpenAudio().
< Private
\brief Fields shared by every event
\brief Game controller axis motion event structure (event.caxis.*)
\brief Game controller button event structure (event.cbutton.*)
\brief Controller device event structure (event.cdevice.*)
\brief The structure that defines a display mode
\brief Dollar Gesture Event (event.dgesture.*)
\brief An event used to request a file open by the system (event.drop.*) This event is enabled by default, you can disable it with SDL_EventState(). \note If this event is enabled, you must free the filename in the event.
Get the SDL joystick layer binding for this controller button/axis mapping
\brief A structure containing a template for a Condition effect.
\brief A structure containing a template for a Constant effect.
\brief A structure containing a template for the ::SDL_HAPTIC_CUSTOM effect.
\brief Structure that represents a haptic direction.
\brief A structure containing a template for a Left/Right effect.
\brief A structure containing a template for a Periodic effect.
\brief A structure containing a template for a Ramp effect.
\brief Joystick axis motion event structure (event.jaxis.*)
\brief Joystick trackball motion event structure (event.jball.*)
\brief Joystick button event structure (event.jbutton.*)
\brief Joystick device event structure (event.jdevice.*)
\brief Joystick hat position change event structure (event.jhat.*)
\brief Keyboard button event structure (event.key.*)
\brief The SDL keysym structure, used in key events.
\brief Individual button data.
\brief RGB value used in a message box color scheme
\brief A set of colors to use for message box dialogs
\brief MessageBox structure containing title, text, window, etc.
\brief Mouse button event structure (event.button.*)
\brief Mouse motion event structure (event.motion.*)
\brief Mouse wheel event structure (event.wheel.*)
\brief Multiple Finger Gesture Event (event.mgesture.*)
\brief OS Specific event
\note Everything in the pixel format structure is read-only.
\brief The structure that defines a point
\brief The “quit requested” event
This is the read/write operation structure – very basic.
\brief A rectangle, with the origin at the upper left.
\brief A structure representing rendering state
\brief Information on the capabilities of a render driver or context.
\brief A collection of pixels used in software blitting.
\brief A video driver dependent system event (event.syswm.*) This event is disabled by default, you can enable it with SDL_EventState()
The custom window manager information structure.
The custom event structure.
\brief Keyboard text editing event structure (event.edit.*)
\brief Keyboard text input event structure (event.text.*)
\brief An efficient driver-specific representation of pixel data
\brief Touch finger event structure (event.tfinger.*)
\brief A user-defined event type (event.user.*)
\brief Window state change event data (event.window.*)
\brief A struct that tags the SDL_WindowShapeParams union with an enum describing the type of its contents.
\brief A type representing an atomic integer value. It is a struct so people don’t accidentally use numeric operations on it.
\brief Information the version of SDL in use.
The gamecontroller structure used to identify an SDL game controller
\typedef SDL_Haptic
The joystick structure used to identify an SDL joystick
< Wayland display
< Wayland shell_surface (window manager handle)
< Wayland surface

Enums

\brief The normalized factor used to multiply pixel components
\brief The blend mode used in SDL_RenderCopy() and drawing operations.
\brief The blend operation used when combining source and destination pixel components
\brief The types of events that can be delivered.
\brief OpenGL configuration attributes
The list of axes available from a controller
The list of buttons available from a controller
\brief An enumeration of hint priorities
\brief Possible return values from the SDL_HitTest callback.
\brief Enumeration of valid key mods (possibly OR’d together).
\brief The predefined log priorities
\brief Flags for SDL_MessageBoxButtonData.
\brief SDL_MessageBox flags. If supported will display warning icon, etc.
\brief Scroll direction types for the Scroll event
\brief The basic state for the system’s power supply.
\brief Flags used when creating a rendering context
\brief Flip constants for SDL_RenderCopyEx
These are the various supported windowing subsystems
\brief The SDL keyboard scancode representation.
\brief Cursor types for SDL_CreateSystemCursor().
\brief The access pattern allowed for a texture.
\brief The texture channel modulation used in SDL_RenderCopy().
The SDL thread priority.
\brief Event subtype for window events
\brief The flags on a window
\brief The formula used for converting between YUV and RGB
\brief An enum denoting the specific type of contents present in an SDL_WindowShapeParams union.
Pixel type.
Bitmap pixel order, high bit -> low bit.
Packed component order, high bit -> low bit.
Array component order, low byte -> high byte.
Packed component layout.
\brief The predefined log categories

Constants

Statics

Functions

Add a function which is called when an event is added to the queue.
\brief Add a function to watch a particular hint
\brief Add a new timer to the pool of timers already running.
\brief Create an SDL_PixelFormat structure from a pixel format enum.
\brief Create a palette structure with the specified number of color entries.
\brief Add to an atomic variable.
\brief Set an atomic variable to a new value if it is currently an old value.
\brief Set a pointer to a new value if it is currently an old value.
\brief Get the value of an atomic variable
\brief Get the value of a pointer atomically.
\brief Lock a spin lock by setting it to a non-zero value.
\brief Set an atomic variable to a value.
\brief Set a pointer to a value atomically.
\brief Try to lock a spin lock by setting it to a non-zero value.
\brief Unlock a spin lock by setting it to 0. Always returns immediately
Get the number of converted/resampled bytes available. The stream may be buffering data behind the scenes until it has enough to resample correctly, so this number might be lower than what you expect, or even be zero. Add more data or flush the stream if you need the data now.
Clear any pending data in the stream without converting it
Tell the stream that you’re done sending data, and anything being buffered should be converted/resampled and made available immediately.
Get converted/resampled data from the stream
Add data to be converted/resampled to the stream
This function takes a source format and rate and a destination format and rate, and initializes the \c cvt structure with information needed by SDL_ConvertAudio() to convert a buffer of audio data from one format to the other. An unsupported format causes an error and -1 will be returned.
\brief Calculate a 256 entry gamma ramp for a gamma value.
\brief Capture the mouse, to track input outside an SDL window.
\brief Clear all hints
Drop any queued audio data. For playback devices, this is any queued data still waiting to be submitted to the hardware. For capture devices, this is any data that was queued by the device that hasn’t yet been dequeued by the application.
This function shuts down audio processing and closes the audio device.
\brief Create a custom blend mode, which may or may not be supported by a given renderer
Restart all threads that are waiting on the condition variable.
Restart one of the threads that are waiting on the condition variable.
Wait on the condition variable, unlocking the provided mutex.
Waits for at most \c ms milliseconds, and returns 0 if the condition variable is signaled, ::SDL_MUTEX_TIMEDOUT if the condition is not signaled in the allotted time, and -1 on error.
Once you have initialized the \c cvt structure using SDL_BuildAudioCVT(), created an audio buffer \c cvt->buf, and filled it with \c cvt->len bytes of audio data in the source format, this function will convert it in-place to the desired format.
\brief Copy a block of pixels of one format to another format
Creates a new surface of the specified format, and then copies and maps the given surface to it so the blit of the converted surface will be as fast as possible. If this function fails, it returns NULL.
\brief Create a color cursor.
Create a condition variable.
\brief Create a cursor, using the specified bitmap data and mask (in MSB format).
Create a mutex, initialized unlocked.
Allocate and free an RGB surface.
\brief Create a 2D rendering context for a window.
Create a semaphore, initialized with value, returns NULL on failure.
\brief Create a window that can be shaped with the specified position, dimensions, and flags.
\brief Create a 2D software rendering context for a surface.
\brief Create a system cursor.
\brief Create a texture for a rendering context.
\brief Create a texture from an existing surface.
Create a thread.
\brief Create a window with the specified position, dimensions, and flags.
\brief Create a window and default renderer
\brief Create an SDL window from an existing native window.
Remove an event watch function added with SDL_AddEventWatch()
\brief Remove a function watching a particular hint
\brief Wait a specified number of milliseconds before returning.
Dequeue more audio on non-callback devices.
Destroy a condition variable.
Destroy a mutex.
\brief Destroy the rendering context for a window and free associated textures.
Destroy a semaphore.
\brief Destroy the specified texture.
\brief Destroy a window.
A thread may be “detached” to signify that it should not remain until another thread has called SDL_WaitThread() on it. Detaching a thread is useful for long-running threads that nothing needs to synchronize with or further manage. When a detached thread is done, it simply goes away.
\brief Prevent the screen from being blanked by a screensaver
\brief Allow the screen to be blanked by a screensaver
\brief Calculate a minimal rectangle enclosing a set of points
This function allows you to set the state of processing certain events.
Performs a fast fill of the given rectangle with \c color.
Run the filter function on the current event queue, removing any events for which the filter returns 0.
This function clears events from the event queue This function only affects currently queued events. If you want to make sure that all pending OS events are flushed, you can call SDL_PumpEvents() on the main thread immediately before the flush call.
Free an audio stream
\brief Frees a cursor created with SDL_CreateCursor() or similar functions.
\brief Free an SDL_PixelFormat structure.
\brief Free a palette created with SDL_AllocPalette().
This function frees data previously allocated with SDL_LoadWAV_RW()
\brief Bind the texture to the current OpenGL/ES/ES2 context for use with OpenGL instructions.
\brief Create an OpenGL context for use with an OpenGL window, and make it current.
\brief Delete an OpenGL context.
\brief Return true if an OpenGL extension is supported for the current context.
\brief Get the actual value for an attribute from the current context.
\brief Get the currently active OpenGL context.
\brief Get the currently active OpenGL window.
\brief Get the size of a window’s underlying drawable in pixels (for use with glViewport).
\brief Get the address of an OpenGL function.
\brief Get the swap interval for the current OpenGL context.
\brief Dynamically load an OpenGL library.
\brief Set up an OpenGL context for rendering into an OpenGL window.
\brief Reset all previously set OpenGL context attributes to their default values
\brief Set an OpenGL window attribute before window creation.
\brief Set the swap interval for the current OpenGL context.
\brief Swap the OpenGL buffers for a window, if double-buffering is supported.
\brief Unbind a texture from the current OpenGL/ES/ES2 context.
\brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
Add or update an existing mapping configuration
Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform() A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
Close a controller previously opened with SDL_GameControllerOpen().
Enable/disable controller event polling.
Return the SDL_GameController associated with an instance id.
Returns SDL_TRUE if the controller has been opened and currently connected, or SDL_FALSE if it has not.
Get the current state of an axis control on a game controller.
turn this string into a axis mapping
Get the SDL joystick layer binding for this controller button mapping
Get the SDL joystick layer binding for this controller button mapping
Get the current state of a button on a game controller.
turn this string into a button mapping
Get the underlying joystick object used by a controller
Get the USB product ID of an opened controller, if available. If the product ID isn’t available this function returns 0.
Get the product version of an opened controller, if available. If the product version isn’t available this function returns 0.
turn this axis enum into a string mapping
turn this button enum into a string mapping
Get the USB vendor ID of an opened controller, if available. If the vendor ID isn’t available this function returns 0.
Get a mapping string for an open GameController
Get a mapping string for a GUID
Get the mapping at a particular index.
Return the name for this currently opened controller
Get the implementation dependent name of a game controller. This can be called before any controllers are opened. If no name can be found, this function returns NULL.
Get the number of mappings installed
Open a game controller for use. The index passed as an argument refers to the N’th game controller on the system. This index is not the value which will identify this controller in future controller events. The joystick’s instance id (::SDL_JoystickID) will be used there instead.
Update the current state of the open game controllers.
\brief Get the current assertion handler.
\brief Get a list of all assertion failures.
Get the human-readable name of a specific audio device. Must be a value between 0 and (number of audio devices-1). Only valid after a successfully initializing the audio subsystem. The values returned by this function reflect the latest call to SDL_GetNumAudioDevices(); recall that function to redetect available hardware.
\brief Get the path where the application resides.
This function returns the L1 cache line size of the CPU
This function returns the number of CPU cores available.
Gets the clipping rectangle for the destination surface in a blit.
\brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
\brief Get the closest match to the requested display mode.
\brief Gets the color key (transparent pixel) in a blittable surface.
This function returns the name of the current audio driver, or NULL if no driver has been initialized.
\brief Fill in information about the current display mode.
\brief Returns the name of the currently initialized video driver.
\brief Return the active cursor.
\brief Get the default assertion handler.
\brief Return the default cursor.
\brief Fill in information about the desktop display mode.
\brief Get the desktop area represented by a display, with the primary display located at 0,0
\brief Get the dots/pixels-per-inch for a display
\brief Fill in information about a specific display mode.
\brief Get the name of a display in UTF-8 encoding
\brief Get the usable desktop area represented by a display, with the primary display located at 0,0
Return the current event filter - can be used to “chain” filters. If there is no event filter set, this function returns SDL_FALSE.
\brief Get the current state of the mouse, in relation to the desktop
\brief Get the window that currently has an input grab enabled.
\brief Get a hint
\brief Get a hint
\brief Get a key code from a human-readable name
\brief Get the key code corresponding to the given scancode according to the current keyboard layout.
\brief Get a human-readable name for a key.
\brief Get the window which currently has keyboard focus.
\brief Get a snapshot of the current state of the keyboard.
\brief Get the current set of SDL memory functions
\brief Get the current key modifier state for the keyboard.
\brief Get the window which currently has mouse focus.
\brief Retrieve the current state of the mouse.
\brief Get the number of outstanding (unfreed) allocations
Get the number of available devices exposed by the current driver. Only valid after a successfully initializing the audio subsystem. Returns -1 if an explicit list of devices can’t be determined; this is not an error. For example, if SDL is set up to talk to a remote audio server, it can’t list every one available on the Internet, but it will still allow a specific host to be specified to SDL_OpenAudioDevice().
\brief Returns the number of available display modes.
\brief Get the number of 2D rendering drivers available for the current display.
\brief Get the number of registered touch devices.
\brief Get the number of active fingers for a given touch device.
\brief Returns the number of available video displays.
\brief Get the number of video drivers compiled into SDL
\brief Get the current value of the high resolution counter
\brief Get the count per second of the high resolution counter
\brief Get the human readable name of a pixel format
\brief Gets the name of the platform.
\brief Get the current power supply details.
\brief Get the user-and-app-specific path where files can be written.
Get the number of bytes of still-queued audio.
\brief Get the RGB components from a pixel of the specified format.
\brief Get the RGBA components from a pixel of the specified format.
\brief Query whether relative mouse mode is enabled.
\brief Retrieve the relative state of the mouse.
\brief Get the blend mode used for drawing operations.
\brief Get the color used for drawing operations (Rect, Line and Clear).
\brief Get information about a specific 2D rendering driver for the current display.
\brief Get the current render target or NULL for the default render target.
\brief Get the renderer associated with a window.
\brief Get information about a rendering context.
\brief Get the output size in pixels of a rendering context.
\brief Get the code revision of SDL that is linked against your program.
\brief Get the revision number of SDL that is linked against your program.
\brief Get the scancode corresponding to the given key code according to the current keyboard layout.
\brief Get a scancode from a human-readable name
\brief Get a human-readable name for a scancode.
\brief Get the shape parameters of a shaped window.
\brief Get the additional alpha value used in blit operations.
\brief Get the blend mode used for blit operations.
\brief Get the additional color value used in blit operations.
This function returns the amount of RAM configured in the system, in MB.
\brief Get the additional alpha value used in render copy operations.
\brief Get the blend mode used for texture copy operations.
\brief Get the additional color value used in render copy operations.
Get the thread identifier for the specified thread.
Get the thread name, as it was specified in SDL_CreateThread(). This function returns a pointer to a UTF-8 string that names the specified thread, or NULL if it doesn’t have a name. This is internal memory, not to be free()’d by the caller, and remains valid until the specified thread is cleaned up by SDL_WaitThread().
\brief Get the number of milliseconds since the SDL library initialization.
\brief Get the touch ID with the given index, or 0 if the index is invalid.
\brief Get the finger object of the given touch, with the given index.
\brief Get the version of SDL that is linked against your program.
\brief Get the name of a built in video driver.
\brief Get the size of a window’s borders (decorations) around the client area.
\brief Get the brightness (gamma correction) for a window.
\brief Retrieve the data pointer associated with a window.
\brief Get the display index associated with a window.
\brief Fill in information about the display mode used when a fullscreen window is visible.
\brief Get the window flags.
\brief Get a window from a stored ID, or NULL if it doesn’t exist.
\brief Get the gamma ramp for a window.
\brief Get a window’s input grab mode.
\brief Get the numeric ID of a window, for logging purposes.
\brief Get the maximum size of a window’s client area.
\brief Get the minimum size of a window’s client area.
\brief Get the opacity of a window.
\brief Get the pixel format associated with the window.
\brief Get the position of a window.
\brief Get the size of a window’s client area.
\brief Get the SDL surface associated with the window.
\brief Get the title of a window, in UTF-8 format.
\brief This function allows access to driver-dependent window information.
\brief Get the YUV conversion mode
\brief Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
\brief Closes a haptic device previously opened with SDL_HapticOpen().
\brief Destroys a haptic effect on the device.
\brief Checks to see if effect is supported by haptic.
\brief Gets the status of the current effect on the haptic device.
\brief Gets the index of a haptic device.
\brief Get the implementation dependent name of a haptic device.
\brief Creates a new haptic effect on the device.
\brief Gets the number of haptic axes the device has.
\brief Returns the number of effects a haptic device can store.
\brief Returns the number of effects a haptic device can play at the same time.
\brief Opens a haptic device for use.
\brief Opens a haptic device for use from a joystick device.
\brief Tries to open a haptic device from the current mouse.
\brief Checks if the haptic device at index has been opened.
\brief Pauses a haptic device.
\brief Gets the haptic device’s supported features in bitwise manner.
\brief Initializes the haptic device for simple rumble playback.
\brief Runs simple rumble on a haptic device
\brief Stops the simple rumble on a haptic device.
\brief Checks to see if rumble is supported on a haptic device.
\brief Runs the haptic effect on its associated haptic device.
\brief Sets the global autocenter of the device.
\brief Sets the global gain of the device.
\brief Stops all the currently playing effects on a haptic device.
\brief Stops the haptic effect on its associated haptic device.
\brief Unpauses a haptic device.
\brief Updates the properties of an effect.
This function returns true if the CPU has 3DNow! features.
This function returns true if the CPU has AVX features.
This function returns true if the CPU has AVX2 features.
This function returns true if the CPU has AltiVec features.
\brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
Checks to see if certain event types are in the event queue.
\brief Determine whether two rectangles intersect.
This function returns true if the CPU has MMX features.
This function returns true if the CPU has NEON (ARM SIMD) features.
This function returns true if the CPU has the RDTSC instruction.
This function returns true if the CPU has SSE features.
This function returns true if the CPU has SSE2 features.
This function returns true if the CPU has SSE3 features.
This function returns true if the CPU has SSE4.1 features.
This function returns true if the CPU has SSE4.2 features.
\brief Returns whether the platform has some screen keyboard support.
\brief Hide a window.
This function initializes the subsystems specified by \c flags
This function initializes specific SDL subsystems
\brief Calculate the intersection of two rectangles.
\brief Calculate the intersection of a rectangle and line segment.
Is the joystick on this index supported by the game controller interface?
\brief Returns whether the screen keyboard is shown for given window.
\brief Returns whether the screensaver is currently enabled (default off).
\brief Return whether the given window is a shaped window.
\brief Return whether or not Unicode text input events are enabled.
Close a joystick previously opened with SDL_JoystickOpen().
Return the battery level of this joystick
Enable/disable joystick event polling.
Return the SDL_Joystick associated with an instance id.
Returns SDL_TRUE if the joystick has been opened and currently connected, or SDL_FALSE if it has not.
Get the current state of an axis control on a joystick.
Get the initial state of an axis control on a joystick.
Get the ball axis change since the last poll.
Get the current state of a button on a joystick.
Return the GUID for the joystick at this index This can be called before any joysticks are opened.
Get the instance ID of a joystick. This can be called before any joysticks are opened. If the index is out of range, this function will return -1.
Get the USB product ID of a joystick, if available. This can be called before any joysticks are opened. If the product ID isn’t available this function returns 0.
Get the product version of a joystick, if available. This can be called before any joysticks are opened. If the product version isn’t available this function returns 0.
Get the type of a joystick, if available. This can be called before any joysticks are opened.
Get the USB vendor ID of a joystick, if available. This can be called before any joysticks are opened. If the vendor ID isn’t available this function returns 0.
Return the GUID for this opened joystick
Convert a string into a joystick guid
Return a string representation for this guid. pszGUID must point to at least 33 bytes (32 for the string plus a NULL terminator).
Get the current state of a POV hat on a joystick.
Get the USB product ID of an opened joystick, if available. If the product ID isn’t available this function returns 0.
Get the product version of an opened joystick, if available. If the product version isn’t available this function returns 0.
Get the type of an opened joystick.
Get the USB vendor ID of an opened joystick, if available. If the vendor ID isn’t available this function returns 0.
Get the instance ID of an opened joystick or -1 if the joystick is invalid.
\brief Checks to see if a joystick has haptic features.
Return the name for this currently opened joystick. If no name can be found, this function returns NULL.
Get the implementation dependent name of a joystick. This can be called before any joysticks are opened. If no name can be found, this function returns NULL.
Get the number of general axis controls on a joystick.
Get the number of trackballs on a joystick.
Get the number of buttons on a joystick.
Get the number of POV hats on a joystick.
Open a joystick for use. The index passed as an argument refers to the N’th joystick on the system. This index is not the value which will identify this joystick in future joystick events. The joystick’s instance id (::SDL_JoystickID) will be used there instead.
Update the current state of the open joysticks.
Load a surface from a seekable SDL data stream (memory or file).
\brief Load Dollar Gesture templates from a file
Load all the data from an SDL data stream.
Given an object handle, this function looks up the address of the named function in the shared object and returns it. This address is no longer valid after calling SDL_UnloadObject().
This function dynamically loads a shared object and returns a pointer to the object handle (or NULL if there was an error). The ‘sofile’ parameter is a system dependent name of the object file.
This function loads a WAVE from the data source, automatically freeing that source if \c freesrc is non-zero. For example, to load a WAVE file, you could do: \code SDL_LoadWAV_RW(SDL_RWFromFile(“sample.wav”, “rb”), 1, …); \endcode
Locking for multi-threaded access to the joystick API
\brief Sets up a surface for directly accessing the pixels.
\brief Lock a portion of the texture for write-only pixel access.
\brief Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO
\brief Log a message with SDL_LOG_PRIORITY_CRITICAL
\brief Log a message with SDL_LOG_PRIORITY_DEBUG
\brief Log a message with SDL_LOG_PRIORITY_ERROR
\brief Get the current log output function.
\brief Get the priority of a particular log category
\brief Log a message with SDL_LOG_PRIORITY_INFO
\brief Log a message with the specified category and priority.
\brief Log a message with the specified category and priority.
\brief Reset all priorities to default.
\brief Set the priority of all log categories
\brief This function allows you to replace the default log output function with one of your own.
\brief Set the priority of a particular log category
\brief Log a message with SDL_LOG_PRIORITY_VERBOSE
\brief Log a message with SDL_LOG_PRIORITY_WARN
This is a semi-private blit function and it performs low-level surface blitting only.
This is a semi-private blit function and it performs low-level surface scaled blitting only.
\brief Maps an RGB triple to an opaque pixel value for a given pixel format.
\brief Maps an RGBA quadruple to a pixel value for a given pixel format.
\brief Convert a bpp and RGBA masks to an enumerated pixel format.
\brief Make a window as large as possible.
Memory barriers are designed to prevent reads and writes from being reordered by the compiler and being seen out of order on multi-core CPUs.
\brief Minimize a window to an iconic representation.
This takes two audio buffers of the playing audio format and mixes them, performing addition, volume adjustment, and overflow clipping. The volume ranges from 0 - 128, and should be set to ::SDL_MIX_MAXVOLUME for full audio volume. Note this does not change hardware volume. This is provided for convenience – you can mix your own audio data.
This works like SDL_MixAudio(), but you specify the audio format instead of using the format of audio device 1. Thus it can be used when no audio device is open at all.
\brief Gets whether or not the current mouse has haptic capabilities.
Create a new audio stream
\brief Count the number of haptic devices attached to the system.
Count the number of joysticks attached to the system right now
This function opens the audio device with the desired parameters, and returns 0 if successful, placing the actual hardware parameters in the structure pointed to by \c obtained. If \c obtained is NULL, the audio data passed to the callback function will be guaranteed to be in the requested format, and will be automatically converted to the hardware audio format if necessary. This function returns -1 if it failed to open the audio device, or couldn’t set up the audio thread.
Open a specific audio device. Passing in a device name of NULL requests the most reasonable default (and is equivalent to calling SDL_OpenAudio()).
Checks the event queue for messages and optionally returns them.
\brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
\brief Polls for currently pending events.
Pumps the event loop, gathering events from the input devices.
\brief Add an event to the event queue.
\brief Query the attributes of a texture
Queue more audio on non-callback devices.
This function cleans up all initialized subsystems. You should call it upon all exit conditions.
This function cleans up specific SDL subsystems
\brief Raise a window above other windows and set the input focus.
\brief Begin Recording a gesture on the specified touch, or all touches (-1)
This function allocates a set of user-defined events, and returns the beginning event number for that set of events.
\brief Remove a timer knowing its ID.
\brief Clear the current rendering target with the drawing color
\brief Copy a portion of the texture to the current rendering target.
\brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
\brief Draw a line on the current rendering target.
\brief Draw a series of connected lines on the current rendering target.
\brief Draw a point on the current rendering target.
\brief Draw multiple points on the current rendering target.
\brief Draw a rectangle on the current rendering target.
\brief Draw some number of rectangles on the current rendering target.
\brief Fill a rectangle on the current rendering target with the drawing color.
\brief Fill some number of rectangles on the current rendering target with the drawing color.
\brief Get the clip rectangle for the current target.
\brief Get whether integer scales are forced for resolution-independent rendering
\brief Get device independent resolution for rendering
\brief Get the Metal command encoder for the current frame
\brief Get the CAMetalLayer associated with the given Metal renderer
\brief Get the drawing scale for the current target.
\brief Get the drawing area for the current target.
\brief Get whether clipping is enabled on the given renderer.
\brief Update the screen with rendering performed.
\brief Read pixels from the current rendering target.
\brief Set the clip rectangle for the current target.
\brief Set whether to force integer scales for resolution-independent rendering
\brief Set device independent resolution for rendering
\brief Set the drawing scale for rendering on the current target.
\brief Set the drawing area for rendering on the current target.
\brief Determines whether a window supports the use of render targets
\brief Reset the list of all assertion failures.
\brief Restore the size and position of a minimized or maximized window.
\brief Save all currently loaded Dollar Gesture templates
Save a surface to a seekable SDL data stream (memory or file).
\brief Save a currently loaded Dollar Gesture template
Atomically increases the semaphore’s count (not blocking).
Non-blocking variant of SDL_SemWait().
Returns the current count of the semaphore.
This function suspends the calling thread until the semaphore pointed to by \c sem has a positive count. It then atomically decreases the semaphore count.
Variant of SDL_SemWait() with a timeout in milliseconds.
\brief Set an application-defined assertion handler.
Sets the clipping rectangle for the destination surface in a blit.
\brief Put UTF-8 text into the clipboard
\brief Sets the color key (transparent pixel) in a blittable surface.
\brief Set the active cursor.
Sets up a filter to process all events before they change internal state and are posted to the internal event queue.
\brief Set a hint with normal priority
\brief Set a hint with a specific priority
This is called by the real SDL main function to let the rest of the library know that initialization was done properly.
\brief Replace SDL’s memory allocation functions with a custom set
\brief Set the current key modifier state for the keyboard.
\brief Set a range of colors in a palette.
\brief Set the palette for a pixel format structure.
\brief Set relative mouse mode.
\brief Set the blend mode used for drawing operations (Fill and Line).
\brief Set the color used for drawing operations (Rect, Line and Clear).
\brief Set a texture as the current rendering target.
\brief Set an additional alpha value used in blit operations.
\brief Set the blend mode used for blit operations.
\brief Set an additional color value used in blit operations.
\brief Set the palette used by a surface.
\brief Sets the RLE acceleration hint for a surface.
\brief Set the rectangle used to type Unicode text inputs. This is used as a hint for IME and on-screen keyboard placement.
\brief Set an additional alpha value used in render copy operations.
\brief Set the blend mode used for texture copy operations.
\brief Set an additional color value used in render copy operations.
Set the priority for the current thread
\brief Set the border state of a window.
\brief Set the brightness (gamma correction) for a window.
\brief Associate an arbitrary named pointer with a window.
\brief Set the display mode used when a fullscreen window is visible.
\brief Set a window’s fullscreen state.
\brief Set the gamma ramp for a window.
\brief Set a window’s input grab mode.
\brief Provide a callback that decides if a window region has special properties.
\brief Set the icon for a window.
\brief Explicitly sets input focus to the window.
\brief Set the maximum size of a window’s client area.
\brief Set the minimum size of a window’s client area.
\brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
\brief Set the opacity for a window
\brief Set the position of a window.
\brief Set the user-resizable state of a window.
\brief Set the shape and parameters of a shaped window.
\brief Set the size of a window’s client area.
\brief Set the title of a window, in UTF-8 format.
\brief Set the YUV conversion mode
\brief Toggle whether or not the cursor is shown.
\brief Create a modal message box.
\brief Create a simple modal message box
\brief Show a window.
\brief Perform a fast, low quality, stretch blit between two surfaces of the same pixel format.
\brief Start accepting Unicode text input events. This function will show the on-screen keyboard if supported.
\brief Stop receiving any text input events. This function will hide the on-screen keyboard if supported.
\brief Create an identifier that is globally visible to all threads but refers to data that is thread-specific.
\brief Get the value associated with a thread local storage ID for the current thread.
\brief Set the value associated with a thread local storage ID for the current thread.
Get the thread identifier for the current thread.
Try to lock the mutex
\brief Calculate the union of two rectangles.
Unload a shared object from memory.
\sa SDL_LockSurface()
\brief Unlock a texture, uploading the changes to video memory, if needed.
\brief Update the given texture rectangle with new pixel data.
\brief Copy the window surface to the screen.
\brief Copy a number of rectangles on the window surface to the screen.
\brief Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
This is the public blit function, SDL_BlitSurface(), and it performs rectangle validation and clipping before passing it to SDL_LowerBlit()
This is the public scaled blit function, SDL_BlitScaled(), and it performs rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
\brief Initialize the video subsystem, optionally specifying a video driver.
\brief Shuts down the video subsystem.
\brief Create a Vulkan rendering surface for a window.
\brief Get the size of a window’s underlying drawable in pixels (for use with setting viewport, scissor & etc).
\brief Get the names of the Vulkan instance extensions needed to create a surface with \c SDL_Vulkan_CreateSurface().
\brief Get the address of the \c vkGetInstanceProcAddr function.
\brief Dynamically load a Vulkan loader library.
\brief Unload the Vulkan loader library previously loaded by \c SDL_Vulkan_LoadLibrary().
\brief Waits indefinitely for the next available event.
\brief Waits until the specified timeout (in milliseconds) for the next available event.
Wait for a thread to finish. Threads that haven’t been detached will remain (as a “zombie”) until this function cleans them up. Not doing so is a resource leak.
\brief Moves the mouse to the given position in global screen space.
\brief Moves the mouse to the given position within the window.
This function returns a mask of the specified subsystems which have previously been initialized.
This function converts a string between encodings in one pass, returning a string that must be freed with SDL_free() or NULL on error.
The prototype for the application’s main() function
a64l
abs
atof
atoi
atol
div
ecvt
exit
fcvt
free
gcvt
l64a
labs
ldiv
rand

Type Definitions

This function is called when the audio device needs more data.
SDL Audio Device IDs.
\brief Audio format flags.
\brief An opaque handle to an OpenGL context.
\brief type definition of the hint callback function.
\brief Callback used for hit-testing.
This is a unique ID for a joystick for the time it is connected to the system, and is never reused for the lifetime of the application. If the joystick is disconnected and reconnected, it will get a new ID.
\brief The SDL virtual key representation.
\brief The prototype for the log output function
The function passed to SDL_CreateThread(). It is passed a void* user context parameter and returns an int.
Function prototype for the timer callback function.
Definition of the timer ID type.
\brief The type of function used for surface blitting functions.

Unions