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
- The bits of this structure can be directly reinterpreted as an integer-packed color which uses the SDL_PIXELFORMAT_RGBA32 format (SDL_PIXELFORMAT_ABGR8888 on little-endian systems and SDL_PIXELFORMAT_RGBA8888 on big-endian systems).
- \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 Game controller sensor event structure (event.csensor.*)
- \brief Game controller touchpad event structure (event.ctouchpad.*)
- \brief Display state change event data (event.display.*)
- \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.
- The structure that defines a point (floating point)
- A rectangle, with the origin at the upper left (floating point).
- 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.
- Individual button data.
- RGB value used in a message box color scheme
- A set of colors to use for message box dialogs
- 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.
- The structure that defines a point (integer)
- \brief The “quit requested” event
- This is the read/write operation structure – very basic.
- A rectangle, with the origin at the upper left (integer).
- A structure representing rendering state
- Information on the capabilities of a render driver or context.
- \brief Sensor event structure (event.sensor.*)
- \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()
- \brief SDL_syswm.h
- The custom event structure.
- \brief Keyboard text editing event structure (event.edit.*)
- \brief Keyboard text input event structure (event.text.*)
- An efficient driver-specific representation of pixel data
- \brief Touch finger event structure (event.tfinger.*)
- \brief A user-defined event type (event.user.*)
- Vertex structure
- \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 A handle representing an open HID device
- hidapi info structure */ \brief Information about a connected HID device
- Information about 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
- \brief SDL_sensor.h
- < Wayland display
- < Wayland EGL window (native window)
- < Wayland surface
- < Wayland xdg surface (window manager handle)
- < Wayland xdg toplevel role
Enums
- Array component order, low byte -> high byte.
- Bitmap pixel order, high bit -> low bit.
- \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 Event subtype for display events
- \brief Display orientation
- The types of events that can be delivered.
- \brief Window flash operation
- \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
- Possible return values from the SDL_HitTest callback.
- \brief Enumeration of valid key mods (possibly OR’d together).
- \brief The predefined log categories
- \brief The predefined log priorities
- Flags for SDL_MessageBoxButtonData.
- SDL_MessageBox flags. If supported will display warning icon, etc.
- \brief Scroll direction types for the Scroll event
- Packed component layout.
- Packed component order, high bit -> low bit.
- Pixel type.
- The basic state for the system’s power supply.
- Flags used when creating a rendering context
- Flip constants for SDL_RenderCopyEx
- These are the various supported windowing subsystems
- The scaling mode for a texture.
- \brief The SDL keyboard scancode representation.
- \brief Cursor types for SDL_CreateSystemCursor().
- The access pattern allowed for a texture.
- 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.
Constants
Statics
Functions
- Add a callback to be triggered when an event is added to the event queue.
- Add a function to watch a particular hint.
- Call a callback function at a future time.
- Create an SDL_PixelFormat structure corresponding to a pixel format.
- Create a palette structure with the specified number of color entries.
- Use this function to allocate an empty, unpopulated SDL_RWops structure.
- Add to an atomic variable.
- Set an atomic variable to a new value if it is currently an old value.
- Set a pointer to a new value if it is currently an old value.
- Get the value of an atomic variable.
- Get the value of a pointer atomically.
- Lock a spin lock by setting it to a non-zero value.
- Set an atomic variable to a value.
- Set a pointer to a value atomically.
- Try to lock a spin lock by setting it to a non-zero value.
- Unlock a spin lock by setting it to 0.
- Use this function to initialize a particular audio driver.
- Use this function to shut down audio if you initialized it with SDL_AudioInit().
- Get the number of converted/resampled bytes available.
- 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.
- Initialize an SDL_AudioCVT structure for conversion.
- Calculate a 256 entry gamma ramp for a gamma value.
- Capture the mouse and to track input outside an SDL window.
- Clear any previous error message for this thread.
- Clear all hints.
- Drop any queued audio data waiting to be sent to the hardware.
- This function is a legacy means of closing the audio device.
- Use this function to shut down audio processing and close the audio device.
- Compose a custom blend mode for renderers.
- Restart all threads that are waiting on the condition variable.
- Restart one of the threads that are waiting on the condition variable.
- Wait until a condition variable is signaled.
- Wait until a condition variable is signaled or a certain time has passed.
- Convert audio data to a desired audio format.
- Copy a block of pixels of one format to another format.
- Copy an existing surface to a new surface of the specified format.
- Copy an existing surface to a new surface of the specified format enum.
- Create a color cursor.
- Create a condition variable.
- Create a cursor using the specified bitmap data and mask (in MSB format).
- Create a new mutex.
- Allocate a new RGB surface.
- Allocate a new RGB surface with existing pixel data.
- Allocate a new RGB surface with a specific pixel format.
- Allocate a new RGB surface with with a specific pixel format and existing pixel data.
- Create a 2D rendering context for a window.
- Create a semaphore.
- Create a window that can be shaped with the specified position, dimensions, and flags.
- Create a 2D software rendering context for a surface.
- Create a system cursor.
- Create a texture for a rendering context.
- Create a texture from an existing surface.
- Create a new thread with a default stack size.
- Create a new thread with a specific stack size.
- Create a window with the specified position, dimensions, and flags.
- Create a window and default renderer.
- Create an SDL window from an existing native window.
- Remove an event watch callback added with SDL_AddEventWatch().
- Remove a function watching a particular hint.
- Wait a specified number of milliseconds before returning.
- Dequeue more audio on non-callback devices.
- Destroy a condition variable.
- Destroy a mutex created with SDL_CreateMutex().
- Destroy the rendering context for a window and free associated textures.
- Destroy a semaphore.
- Destroy the specified texture.
- Destroy a window.
- Let a thread clean up on exit without intervention.
- Prevent the screen from being blanked by a screen saver.
- Allow the screen to be blanked by a screen saver.
- Calculate a minimal rectangle enclosing a set of points.
- Set the state of processing events by type.
- Perform a fast fill of a rectangle with a specific color.
- Perform a fast fill of a set of rectangles with a specific color.
- Run a specific filter function on the current event queue, removing any events for which the filter returns 0.
- Request a window to demand attention from the user.
- Clear events of a specific type from the event queue.
- Clear events of a range of types from the event queue.
- Free an audio stream
- Free a previously-created cursor.
- Free an SDL_PixelFormat structure allocated by SDL_AllocFormat().
- Free a palette created with SDL_AllocPalette().
- Use this function to free an SDL_RWops structure allocated by SDL_AllocRW().
- Free an RGB surface.
- Free data previously allocated with SDL_LoadWAV() or SDL_LoadWAV_RW().
- Bind an OpenGL/ES/ES2 texture to the current context.
- Create an OpenGL context for an OpenGL window, and make it current.
- Delete an OpenGL context.
- Check if an OpenGL extension is supported for the current context.
- Get the actual value for an attribute from the current context.
- Get the currently active OpenGL context.
- Get the currently active OpenGL window.
- Get the size of a window’s underlying drawable in pixels.
- Get an OpenGL function by name.
- Get the swap interval for the current OpenGL context.
- Dynamically load an OpenGL library.
- Set up an OpenGL context for rendering into an OpenGL window.
- Reset all previously set OpenGL context attributes to their default values.
- Set an OpenGL window attribute before window creation.
- Set the swap interval for the current OpenGL context.
- Update a window with OpenGL rendering.
- Unbind an OpenGL/ES/ES2 texture from the current context.
- Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
- Add support for controllers that SDL is unaware of or to cause an existing controller to have a different binding.
- Load a set of Game Controller mappings from a seekable SDL data stream.
- Close a game controller previously opened with SDL_GameControllerOpen().
- Query or change current state of Game Controller events.
- Get the SDL_GameController associated with an instance id.
- Get the SDL_GameController associated with a player index.
- Return the sfSymbolsName for a given axis on a game controller on Apple platforms.
- Return the sfSymbolsName for a given button on a game controller on Apple platforms.
- Check if a controller has been opened and is currently connected.
- Get the current state of an axis control on a game controller.
- Convert a string into SDL_GameControllerAxis enum.
- Get the SDL joystick layer binding for a controller axis mapping.
- Get the SDL joystick layer binding for a controller button mapping.
- Get the current state of a button on a game controller.
- Convert a string into an SDL_GameControllerButton enum.
- Get the Joystick ID from a Game Controller.
- Get the number of supported simultaneous fingers on a touchpad on a game controller.
- Get the number of touchpads on a game controller.
- Get the player index of an opened game controller.
- Get the USB product ID of an opened controller, if available.
- Get the product version of an opened controller, if available.
- Get the current state of a game controller sensor.
- Get the data rate (number of events per second) of a game controller sensor.
- Get the serial number of an opened controller, if available.
- Convert from an SDL_GameControllerAxis enum to a string.
- Convert from an SDL_GameControllerButton enum to a string.
- Get the current state of a finger on a touchpad on a game controller.
- Get the type of this currently opened controller
- Get the USB vendor ID of an opened controller, if available.
- Query whether a game controller has a given axis.
- Query whether a game controller has a given button.
- Query whether a game controller has an LED.
- Query whether a game controller has rumble support.
- Query whether a game controller has rumble support on triggers.
- Return whether a game controller has a particular sensor.
- Query whether sensor data reporting is enabled for a game controller.
- Get the current mapping of a Game Controller.
- Get the mapping of a game controller.
- Get the game controller mapping string for a given GUID.
- Get the mapping at a particular index.
- Get the implementation-dependent name for an opened game controller.
- Get the implementation dependent name for the game controller.
- Get the number of mappings installed.
- Open a game controller for use.
- Start a rumble effect on a game controller.
- Start a rumble effect in the game controller’s triggers.
- Send a controller specific effect packet
- Update a game controller’s LED color.
- Set the player index of an opened game controller.
- Set whether data reporting for a game controller sensor is enabled.
- Get the type of a game controller.
- Manually pump game controller updates if not using the loop.
- Get the current assertion handler.
- Get a list of all assertion failures.
- Get the human-readable name of a specific audio device.
- Get the preferred audio format of a specific audio device.
- Use this function to get the current audio state of an audio device.
- Use this function to get the name of a built in audio driver.
- This function is a legacy means of querying the audio device.
- Get the directory where the application was run from.
- Determine the L1 cache line size of the CPU.
- Get the number of CPU cores available.
- Get the clipping rectangle for a surface.
- Get UTF-8 text from the clipboard, which must be freed with SDL_free().
- Get the closest match to the requested display mode.
- Get the color key (transparent pixel) for a surface.
- Get the name of the current audio driver.
- Get information about the current display mode.
- Get the name of the currently initialized video driver.
- Get the active cursor.
- Get the default assertion handler.
- Get the default cursor.
- Get information about the desktop’s display mode.
- Get the desktop area represented by a display.
- Get the dots/pixels-per-inch for a display.
- Get information about a specific display mode.
- Get the name of a display in UTF-8 encoding.
- Get the orientation of a display.
- Get the usable desktop area represented by a display.
- Retrieve a message about the last error that occurred on the current thread.
- Get the last error message that was set for the current thread.
- Query the current event filter.
- Get the current state of the mouse in relation to the desktop.
- Get the window that currently has an input grab enabled.
- Get the value of a hint.
- Get the boolean value of a hint variable.
- Get a key code from a human-readable name.
- Get the key code corresponding to the given scancode according to the current keyboard layout.
- Get a human-readable name for a key.
- Query the window which currently has keyboard focus.
- Get a snapshot of the current state of the keyboard.
- Get the current set of SDL memory functions
- Get the current key modifier state for the keyboard.
- Get the window which currently has mouse focus.
- Retrieve the current state of the mouse.
- Get the number of outstanding (unfreed) allocations
- Get the number of built-in audio devices.
- Use this function to get the number of built-in audio drivers.
- Get the number of available display modes.
- Get the number of 2D rendering drivers available for the current display.
- Get the number of registered touch devices.
- Get the number of active fingers for a given touch device.
- Get the number of available video displays.
- Get the number of video drivers compiled into SDL.
- Get the current value of the high resolution counter.
- Get the count per second of the high resolution counter.
- Get the human readable name of a pixel format.
- Get the name of the platform.
- Get the current power supply details.
- Get the user-and-app-specific path where files can be written.
- Report the user’s preferred locale.
- Get the number of bytes of still-queued audio.
- Get RGB values from a pixel in the specified format.
- Get RGBA values from a pixel in the specified format.
- Query whether relative mouse mode is enabled.
- Retrieve the relative state of the mouse.
- Get the blend mode used for drawing operations.
- Get the color used for drawing operations (Rect, Line and Clear).
- Get info about a specific 2D rendering driver for the current display.
- Get the current render target.
- Get the renderer associated with a window.
- Get information about a rendering context.
- Get the output size in pixels of a rendering context.
- Get the code revision of SDL that is linked against your program.
- Obsolete function, do not use.
- Get the scancode corresponding to the given key code according to the current keyboard layout.
- Get a scancode from a human-readable name.
- Get a human-readable name for a scancode.
- Get the shape parameters of a shaped window.
- Get the additional alpha value used in blit operations.
- Get the blend mode used for blit operations.
- Get the additional color value multiplied into blit operations.
- Get the amount of RAM configured in the system.
- Get the additional alpha value multiplied into render copy operations.
- Get the blend mode used for texture copy operations.
- Get the additional color value multiplied into render copy operations.
- Get the scale mode used for texture scale operations.
- Get the user-specified pointer associated with a texture
- Get the thread identifier for the specified thread.
- Get the thread name as it was specified in SDL_CreateThread().
- Get the number of milliseconds since SDL library initialization.
- Get the number of milliseconds since SDL library initialization.
- Get the touch ID with the given index.
- Get the type of the given touch device.
- Get the finger object for specified touch device ID and finger index.
- Get the version of SDL that is linked against your program.
- Get the name of a built in video driver.
- Get the size of a window’s borders (decorations) around the client area.
- Get the brightness (gamma multiplier) for a given window’s display.
- Retrieve the data pointer associated with a window.
- Get the index of the display associated with a window.
- Query the display mode to use when a window is visible at fullscreen.
- Get the window flags.
- Get a window from a stored ID.
- Get the gamma ramp for a given window’s display.
- Get a window’s input grab mode.
- Get the raw ICC profile data for the screen the window is currently on.
- Get the numeric ID of a window.
- Get a window’s keyboard grab mode.
- Get the maximum size of a window’s client area.
- Get the minimum size of a window’s client area.
- Get a window’s mouse grab mode.
- Get the mouse confinement rectangle of a window.
- Get the opacity of a window.
- Get the pixel format associated with the window.
- Get the position of a window.
- Get the size of a window’s client area.
- Get the SDL surface associated with the window.
- Get the title of a window.
- Get driver-specific information about a window.
- Get the YUV conversion mode
- Get the YUV conversion mode, returning the correct mode for the resolution when the current conversion mode is SDL_YUV_CONVERSION_AUTOMATIC
- Close a haptic device previously opened with SDL_HapticOpen().
- Destroy a haptic effect on the device.
- Check to see if an effect is supported by a haptic device.
- Get the status of the current effect on the specified haptic device.
- Get the index of a haptic device.
- Get the implementation dependent name of a haptic device.
- Create a new haptic effect on a specified device.
- Get the number of haptic axes the device has.
- Get the number of effects a haptic device can store.
- Get the number of effects a haptic device can play at the same time.
- Open a haptic device for use.
- Open a haptic device for use from a joystick device.
- Try to open a haptic device from the current mouse.
- Check if the haptic device at the designated index has been opened.
- Pause a haptic device.
- Get the haptic device’s supported features in bitwise manner.
- Initialize a haptic device for simple rumble playback.
- Run a simple rumble effect on a haptic device.
- Stop the simple rumble on a haptic device.
- Check whether rumble is supported on a haptic device.
- Run the haptic effect on its associated haptic device.
- Set the global autocenter of the device.
- Set the global gain of the specified haptic device.
- Stop all the currently playing effects on a haptic device.
- Stop the haptic effect on its associated haptic device.
- Unpause a haptic device.
- Update the properties of an effect.
- Determine whether the CPU has 3DNow! features.
- Determine whether the CPU has ARM SIMD (ARMv6) features.
- Determine whether the CPU has AVX features.
- Determine whether the CPU has AVX2 features.
- Determine whether the CPU has AVX-512F (foundation) features.
- Determine whether the CPU has AltiVec features.
- Query whether the clipboard exists and contains a non-empty text string.
- Returns whether the surface has a color key
- Check for the existence of a certain event type in the event queue.
- Check for the existence of certain event types in the event queue.
- Determine whether two rectangles intersect.
- Determine whether the CPU has MMX features.
- Determine whether the CPU has NEON (ARM SIMD) features.
- Determine whether the CPU has the RDTSC instruction.
- Determine whether the CPU has SSE features.
- Determine whether the CPU has SSE2 features.
- Determine whether the CPU has SSE3 features.
- Determine whether the CPU has SSE4.1 features.
- Determine whether the CPU has SSE4.2 features.
- Check whether the platform has screen keyboard support.
- Returns whether the surface is RLE enabled
- Hide a window.
- Initialize the SDL library.
- Compatibility function to initialize the SDL library.
- Calculate the intersection of two rectangles.
- Calculate the intersection of a rectangle and line segment.
- Check if the given joystick is supported by the game controller interface.
- Check whether the screen keyboard is shown for given window.
- Check whether the screensaver is currently enabled.
- Return whether the given window is a shaped window.
- Query if the current device is a tablet.
- Check whether or not Unicode text input events are enabled.
- Attach a new virtual joystick.
- Close a joystick previously opened with SDL_JoystickOpen().
- Get the battery level of a joystick as SDL_JoystickPowerLevel.
- Detach a virtual joystick.
- Enable/disable joystick event polling.
- Get the SDL_Joystick associated with an instance id.
- Get the SDL_Joystick associated with a player index.
- Get the status of a specified joystick.
- 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.
- Get the implementation-dependent GUID for the joystick at a given device index.
- Get the instance ID of a joystick.
- Get the player index of a joystick, or -1 if it’s not available This can be called before any joysticks are opened.
- Get the USB product ID of a joystick, if available.
- Get the product version of a joystick, if available.
- Get the type of a joystick, if available.
- Get the USB vendor ID of a joystick, if available.
- Get the implementation-dependent GUID for the joystick.
- Convert a GUID string into a SDL_JoystickGUID structure.
- Get an ASCII string representation for a given SDL_JoystickGUID.
- Get the current state of a POV hat on a joystick.
- Get the player index of an opened joystick.
- Get the USB product ID of an opened joystick, if available.
- Get the product version of an opened joystick, if available.
- Get the serial number of an opened joystick, if available.
- Get the type of an opened joystick.
- Get the USB vendor ID of an opened joystick, if available.
- Query whether a joystick has an LED.
- Query whether a joystick has rumble support.
- Query whether a joystick has rumble support on triggers.
- Get the instance ID of an opened joystick.
- Query if a joystick has haptic features.
- Query whether or not the joystick at a given device index is virtual.
- Get the implementation dependent name of a joystick.
- Get the implementation dependent name of a joystick.
- 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.
- Start a rumble effect.
- Start a rumble effect in the joystick’s triggers
- Send a joystick specific effect packet
- Update a joystick’s LED color.
- Set the player index of an opened joystick.
- Set values on an opened, virtual-joystick’s axis.
- Set values on an opened, virtual-joystick’s button.
- Set values on an opened, virtual-joystick’s hat.
- Update the current state of the open joysticks.
- Sets the UNIX nice value for a thread.
- Sets the priority (not nice level) and scheduling policy for a thread.
- Load a BMP image from a seekable SDL data stream.
- Load Dollar Gesture templates from a file.
- Load all the data from a file path.
- Load all the data from an SDL data stream.
- Look up the address of the named function in a shared object.
- Dynamically load a shared object.
- Load the audio data of a WAVE file into memory.
- This function is a legacy means of locking the audio device.
- Use this function to lock out the audio callback function for a specified device.
- Locking for multi-threaded access to the joystick API
- Lock the mutex.
- Locking for multi-threaded access to the sensor API
- Set up a surface for directly accessing the pixels.
- Lock a portion of the texture for write-only pixel access.
- Lock a portion of the texture for write-only pixel access, and expose it as a SDL surface.
- Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.
- Log a message with SDL_LOG_PRIORITY_CRITICAL.
- Log a message with SDL_LOG_PRIORITY_DEBUG.
- Log a message with SDL_LOG_PRIORITY_ERROR.
- Get the current log output function.
- Get the priority of a particular log category.
- Log a message with SDL_LOG_PRIORITY_INFO.
- Log a message with the specified category and priority.
- Log a message with the specified category and priority.
- Reset all priorities to default.
- Set the priority of all log categories.
- Replace the default log output function with one of your own.
- Set the priority of a particular log category.
- Log a message with SDL_LOG_PRIORITY_VERBOSE.
- Log a message with SDL_LOG_PRIORITY_WARN.
- Perform low-level surface blitting only.
- Perform low-level surface scaled blitting only.
- Map an RGB triple to an opaque pixel value for a given pixel format.
- Map an RGBA quadruple to a pixel value for a given pixel format.
- Convert a bpp value and RGBA masks to an enumerated pixel format.
- 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.
- Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window.
- Destroy an existing SDL_MetalView object.
- Get the size of a window’s underlying drawable in pixels (for use with setting viewport, scissor & etc).
- Get a pointer to the backing CAMetalLayer for the given view.
- Minimize a window to an iconic representation.
- This function is a legacy means of mixing audio.
- Mix audio data in a specified format.
- Query whether or not the current mouse has haptic capabilities.
- Create a new audio stream.
- Count the number of haptic devices attached to the system.
- Count the number of joysticks attached to the system.
- Count the number of sensors attached to the system right now.
- This function is a legacy means of opening the audio device.
- Open a specific audio device.
- Open a URL/URI in the browser or other appropriate external application.
- This function is a legacy means of pausing the audio device.
- Use this function to pause and unpause audio playback on a specified device.
- Check the event queue for messages and optionally return them.
- Convert one of the enumerated pixel formats to a bpp value and RGBA masks.
- Poll for currently pending events.
- Premultiply the alpha on a block of pixels.
- Pump the event loop, gathering events from the input devices.
- Add an event to the event queue.
- Query the attributes of a texture.
- Queue more audio on non-callback devices.
- Clean up all initialized subsystems.
- Shut down specific SDL subsystems.
- Use this function to prepare a read-only memory buffer for use with RWops.
- Use this function to create an SDL_RWops structure from a standard I/O file pointer (stdio.h’s
FILE*
). - Use this function to create a new SDL_RWops structure for reading from and/or writing to a named file.
- Use this function to prepare a read-write memory buffer for use with SDL_RWops.
- Close and free an allocated SDL_RWops structure.
- Read from a data source.
- Seek within an SDL_RWops data stream.
- Use this function to get the size of the data stream in an SDL_RWops.
- Determine the current read/write offset in an SDL_RWops data stream.
- Write to an SDL_RWops data stream.
- Raise a window above other windows and set the input focus.
- Use this function to read 16 bits of big-endian data from an SDL_RWops and return in native format.
- Use this function to read 32 bits of big-endian data from an SDL_RWops and return in native format.
- Use this function to read 64 bits of big-endian data from an SDL_RWops and return in native format.
- Use this function to read 16 bits of little-endian data from an SDL_RWops and return in native format.
- Use this function to read 32 bits of little-endian data from an SDL_RWops and return in native format.
- Use this function to read 64 bits of little-endian data from an SDL_RWops and return in native format.
- Use this function to read a byte from an SDL_RWops.
- Begin recording a gesture on a specified touch device or all touch devices.
- Allocate a set of user-defined events, and return the beginning event number for that set of events.
- Remove a timer created with SDL_AddTimer().
- Clear the current rendering target with the drawing color.
- Copy a portion of the texture to the current rendering target.
- Copy a portion of the texture to the current rendering, with optional rotation and flipping.
- Copy a portion of the source texture to the current rendering target, with rotation and flipping, at subpixel precision.
- Copy a portion of the texture to the current rendering target at subpixel precision.
- Draw a line on the current rendering target.
- Draw a line on the current rendering target at subpixel precision.
- Draw a series of connected lines on the current rendering target.
- Draw a series of connected lines on the current rendering target at subpixel precision.
- Draw a point on the current rendering target.
- Draw a point on the current rendering target at subpixel precision.
- Draw multiple points on the current rendering target.
- Draw multiple points on the current rendering target at subpixel precision.
- Draw a rectangle on the current rendering target.
- Draw a rectangle on the current rendering target at subpixel precision.
- Draw some number of rectangles on the current rendering target.
- Draw some number of rectangles on the current rendering target at subpixel precision.
- Fill a rectangle on the current rendering target with the drawing color.
- Fill a rectangle on the current rendering target with the drawing color at subpixel precision.
- Fill some number of rectangles on the current rendering target with the drawing color.
- Fill some number of rectangles on the current rendering target with the drawing color at subpixel precision.
- Force the rendering context to flush any pending commands to the underlying rendering API.
- Render a list of triangles, optionally using a texture and indices into the vertex array Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
- Render a list of triangles, optionally using a texture and indices into the vertex arrays Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and SDL_SetTextureAlphaMod are ignored).
- Get the clip rectangle for the current target.
- Get whether integer scales are forced for resolution-independent rendering.
- Get device independent resolution for rendering.
- Get the Metal command encoder for the current frame
- Get the CAMetalLayer associated with the given Metal renderer.
- Get the drawing scale for the current target.
- Get the drawing area for the current target.
- Get whether clipping is enabled on the given renderer.
- Get real coordinates of point in window when given logical coordinates of point in renderer. Logical coordinates will differ from real coordinates when render is scaled and logical renderer size set
- Update the screen with any rendering performed since the previous call.
- Read pixels from the current rendering target to an array of pixels.
- Set the clip rectangle for rendering on the specified target.
- Set whether to force integer scales for resolution-independent rendering.
- Set a device independent resolution for rendering.
- Set the drawing scale for rendering on the current target.
- Toggle VSync of the given renderer.
- Set the drawing area for rendering on the current target.
- Determine whether a renderer supports the use of render targets.
- Get logical coordinates of point in renderer when given real coordinates of point in window.
- Clear the list of all assertion failures.
- Restore the size and position of a minimized or maximized window.
- Allocate memory in a SIMD-friendly way.
- Deallocate memory obtained from SDL_SIMDAlloc
- Report the alignment this system needs for SIMD allocations.
- Reallocate memory obtained from SDL_SIMDAlloc
- Save all currently loaded Dollar Gesture templates.
- Save a surface to a seekable SDL data stream in BMP format.
- Save a currently loaded Dollar Gesture template.
- Atomically increment a semaphore’s value and wake waiting threads.
- See if a semaphore has a positive value and decrement it if it does.
- Get the current value of a semaphore.
- Wait until a semaphore has a positive value and then decrements it.
- Wait until a semaphore has a positive value and then decrements it.
- Close a sensor previously opened with SDL_SensorOpen().
- Return the SDL_Sensor associated with an instance id.
- Get the current state of an opened sensor.
- Get the instance ID of a sensor.
- Get the implementation dependent name of a sensor.
- Get the platform dependent type of a sensor.
- Get the type of a sensor.
- Get the instance ID of a sensor.
- Get the implementation dependent name of a sensor
- Get the platform dependent type of a sensor.
- Get the type of a sensor.
- Open a sensor for use.
- Update the current state of the open sensors.
- Set an application-defined assertion handler.
- Set the clipping rectangle for a surface.
- Put UTF-8 text into the clipboard.
- Set the color key (transparent pixel) in a surface.
- Set the active cursor.
- Set the SDL error message for the current thread.
- Set up a filter to process all events before they change internal state and are posted to the internal event queue.
- Set a hint with normal priority.
- Set a hint with a specific priority.
- Circumvent failure of SDL_Init() when not using SDL_main() as an entry point.
- Replace SDL’s memory allocation functions with a custom set
- Set the current key modifier state for the keyboard.
- Set a range of colors in a palette.
- Set the palette for a pixel format structure.
- Set relative mouse mode.
- Set the blend mode used for drawing operations (Fill and Line).
- Set the color used for drawing operations (Rect, Line and Clear).
- Set a texture as the current rendering target.
- Set an additional alpha value used in blit operations.
- Set the blend mode used for blit operations.
- Set an additional color value multiplied into blit operations.
- Set the palette used by a surface.
- Set the RLE acceleration hint for a surface.
- Set the rectangle used to type Unicode text inputs.
- Set an additional alpha value multiplied into render copy operations.
- Set the blend mode for a texture, used by SDL_RenderCopy().
- Set an additional color value multiplied into render copy operations.
- Set the scale mode used for texture scale operations.
- Associate a user-specified pointer with a texture.
- Set the priority for the current thread.
- Set the window to always be above the others.
- Set the border state of a window.
- Set the brightness (gamma multiplier) for a given window’s display.
- Associate an arbitrary named pointer with a window.
- Set the display mode to use when a window is visible at fullscreen.
- Set a window’s fullscreen state.
- Set the gamma ramp for the display that owns a given window.
- Set a window’s input grab mode.
- Provide a callback that decides if a window region has special properties.
- Set the icon for a window.
- Explicitly set input focus to the window.
- Set a window’s keyboard grab mode.
- Set the maximum size of a window’s client area.
- Set the minimum size of a window’s client area.
- Set the window as a modal for another window.
- Set a window’s mouse grab mode.
- Confines the cursor to the specified area of a window.
- Set the opacity for a window.
- Set the position of a window.
- Set the user-resizable state of a window.
- Set the shape and parameters of a shaped window.
- Set the size of a window’s client area.
- Set the title of a window.
- Set the YUV conversion mode
- Toggle whether or not the cursor is shown.
- Create a modal message box.
- Display a simple modal message box.
- Show a window.
- Perform a fast, low quality, stretch blit between two surfaces of the same format.
- Perform bilinear scaling between two surfaces of the same format, 32BPP.
- Start accepting Unicode text input events.
- Stop receiving any text input events.
- Cleanup all TLS data for this thread.
- Create a piece of thread-local storage.
- Get the current thread’s value associated with a thread local storage ID.
- Set the current thread’s value associated with a thread local storage ID.
- Get the thread identifier for the current thread.
- Try to lock a mutex without blocking.
- Calculate the union of two rectangles.
- Unload a shared object from memory.
- This function is a legacy means of unlocking the audio device.
- Use this function to unlock the audio callback function for a specified device.
- Unlocking for multi-threaded access to the joystick API
- Unlock the mutex.
- Release a surface after directly accessing the pixels.
- Unlock a texture, uploading the changes to video memory, if needed.
- Update a rectangle within a planar NV12 or NV21 texture with new pixels.
- Update the given texture rectangle with new pixel data.
- Copy the window surface to the screen.
- Copy areas of the window surface to the screen.
- Update a rectangle within a planar YV12 or IYUV texture with new pixel data.
- Perform a fast blit from the source surface to the destination surface.
- Perform a scaled surface copy to a destination surface.
- Initialize the video subsystem, optionally specifying a video driver.
- Shut down the video subsystem, if initialized with SDL_VideoInit().
- Create a Vulkan rendering surface for a window.
- Get the size of the window’s underlying drawable dimensions in pixels.
- Get the names of the Vulkan instance extensions needed to create a surface with SDL_Vulkan_CreateSurface.
- Get the address of the
vkGetInstanceProcAddr
function. - Dynamically load the Vulkan loader library.
- Unload the Vulkan library previously loaded by SDL_Vulkan_LoadLibrary()
- Wait indefinitely for the next available event.
- Wait until the specified timeout (in milliseconds) for the next available event.
- Wait for a thread to finish.
- Move the mouse to the given position in global screen space.
- Move the mouse cursor to the given position within the window.
- Get a mask of the specified subsystems which are currently initialized.
- Use this function to write 16 bits in native format to a SDL_RWops as big-endian data.
- Use this function to write 32 bits in native format to a SDL_RWops as big-endian data.
- Use this function to write 64 bits in native format to a SDL_RWops as big-endian data.
- Use this function to write 16 bits in native format to a SDL_RWops as little-endian data.
- Use this function to write 32 bits in native format to a SDL_RWops as little-endian data.
- Use this function to write 64 bits in native format to a SDL_RWops as little-endian data.
- Use this function to write a byte to an SDL_RWops.
- Use this function to compute arc cosine of
x
. - Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
- Close a HID device.
- Check to see if devices may have been added or removed.
- Enumerate the HID Devices.
- Finalize the HIDAPI library.
- Free an enumeration Linked List
- Get a feature report from a HID device.
- Get a string from a HID device, based on its string index.
- Get The Manufacturer String from a HID device.
- Get The Product String from a HID device.
- Get The Serial Number String from a HID device.
- Initialize the HIDAPI library.
- Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
- Open a HID device by its path name.
- Read an Input report from a HID device.
- Read an Input report from a HID device with timeout.
- Send a Feature report to the device.
- Set the device handle to be non-blocking.
- Write an Output report to a HID device.
- This function converts a string between encodings in one pass, returning a string that must be freed with SDL_free() or NULL on error.
- a64l⚠
- abs⚠
- atof⚠
- atoi⚠
- atol⚠
- div⚠
- ecvt⚠
- exit⚠
- fcvt⚠
- free⚠
- gcvt⚠
- l64a⚠
- labs⚠
- ldiv⚠
- rand⚠
Type Aliases
- A callback that fires when an SDL assertion fails.
- This function is called when the audio device needs more data.
- SDL Audio Device IDs.
- \brief Audio format flags.
- A function pointer used for callbacks that watch the event queue.
- \brief An opaque handle to an OpenGL context.
- Type definition of the hint callback function.
- 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.
- The prototype for the log output callback function.
- \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
- This is a unique ID for a sensor for the time it is connected to the system, and is never reused for the lifetime of the application.
- The function passed to SDL_CreateThread().
- Function prototype for the timer callback function.
- Definition of the timer ID type.
- \brief The type of function used for surface blitting functions.
- The prototype for the application’s main() function
Unions
- \brief General event structure
- \brief The generic template for any haptic effect.
- \brief A union containing parameters for shaped windows.