High level SDL 2.0 shared library wrapper for Nim.
Documentation below comes from SDL 2.0 library documentation.
Usage
# Load all symbols from SDL 2.0 shared library. # This must be the first proc called. if not open_sdl2_library(): echo "Failed to load SDL 2.0 library: ", last_sdl2_error() quit QuitFailure defer: close_sdl2_library() # Initialize SDL 2.0. if not Init INIT_VIDEO: echo "Failed to initialize SDL 2.0: ", GetError() quit QuitFailure defer: Quit() # SDL 2.0 calls follow…
Configuration
You can disable functions you don't use. All function groups are enabled by default.
Group | Define | Functions Defined In |
---|---|---|
Audio | sdl2.audio=0 | <SDL2/SDL_audio.h> |
Blend Mode | sdl2.blendmode=0 | <SDL2/SDL_blendmode.h> |
Clipboard | sdl2.clipboard=0 | <SDL2/SDL_clipboard.h> |
Game Controller | sdl2.gamecontroller=0 | <SDL2/SDL_gamecontroller.h> |
Gesture | sdl2.gesture=0 | <SDL2/SDL_gesture.h> |
Haptic | sdl2.haptic=0 | <SDL2/SDL_haptic.h> |
Hints | sdl2.hints=0 | <SDL2/SDL_hints.h> |
Joystick | sdl2.joystick=0 | <SDL2/SDL_joystick.h> |
Keyboard | sdl2.keyboard=0 | <SDL2/SDL_keyboard.h> |
Mouse | sdl2.mouse=0 | <SDL2/SDL_mouse.h> |
Sensor | sdl2.sensor=0 | <SDL2/SDL_sensor.h> |
Shape | sdl2.shape=0 | <SDL2/SDL_shape.h> |
Touch | sdl2.touch=0 | <SDL2/SDL_touch.h> |
For example if you don't need audio functions compile with:
nim c -d=sdl2.audio=0 file(s)
Imports
-
nsdl2/config, nsdl2/libsdl2, nsdl2/utils, nsdl2/sdl2inc/audio, nsdl2/sdl2inc/blendmode, nsdl2/sdl2inc/events, nsdl2/sdl2inc/hints, nsdl2/sdl2inc/init, nsdl2/sdl2inc/joystick, nsdl2/sdl2inc/keycode, nsdl2/sdl2inc/log, nsdl2/sdl2inc/messagebox, nsdl2/sdl2inc/mouse, nsdl2/sdl2inc/pixels, nsdl2/sdl2inc/rect, nsdl2/sdl2inc/render, nsdl2/sdl2inc/rwops, nsdl2/sdl2inc/surface, nsdl2/sdl2inc/timer, nsdl2/sdl2inc/touch, nsdl2/sdl2inc/version, nsdl2/sdl2inc/video
Procs
proc AddTimer(interval: uint32; callback: TimerCallback; param: pointer = nil): TimerID {. inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param);
proc AudioInit(driver_name: string): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_AudioInit(const char *driver_name);
proc AudioQuit() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_AudioQuit(void);
proc CaptureMouse(enabled: bool): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_CaptureMouse(SDL_bool enabled);
proc ClearError() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_ClearError(void);
proc CloseAudio() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_CloseAudio(void);
proc CloseAudioDevice(dev: AudioDeviceID) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_CloseAudioDevice(SDL_AudioDeviceID dev);
proc ConvertSurface(src: SurfacePtr; fmt: PixelFormat): SurfacePtr {....raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Surface *SDL_ConvertSurface(SDL_Surface *src, const SDL_PixelFormat *fmt, Uint32 flags);
proc ConvertSurfaceFormat(src: SurfacePtr; pixel_format: PixelFormatEnum): SurfacePtr {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Surface *SDL_ConvertSurfaceFormat(SDL_Surface *src, Uint32 pixel_format, Uint32 flags);
proc CreateColorCursor(surface: SurfacePtr; hot_x, hot_y: int): CursorPtr {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Cursor *SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y);
proc CreateCursor(data: openArray[byte]; mask: openArray[byte]; w: int; h: int; hot_x: int; hot_y: int): CursorPtr {....raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Cursor *SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y);
proc CreateRenderer(window: Window; flags = RendererFlags 0): Renderer {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Renderer * SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags);
proc CreateRenderer(window: Window; index: int; flags = RendererFlags 0): Renderer {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Renderer * SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags);
proc CreateRGBSurface(flags: SurfaceFlags; width: int; height: int; depth: int; rmask: uint32; gmask: uint32; bmask: uint32; amask: uint32): SurfacePtr {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
proc CreateRGBSurface(width: int; height: int; depth: int; rmask: uint32; gmask: uint32; bmask: uint32; amask: uint32): SurfacePtr {. inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
proc CreateRGBSurfaceFrom(pixels: pointer; width: int; height: int; depth: int; pitch: int; rmask: uint32; gmask: uint32; bmask: uint32; amask: uint32): SurfacePtr {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Surface *SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
proc CreateRGBSurfaceWithFormat(width: int; height: int; depth: int; format: PixelFormatEnum): SurfacePtr {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Surface *SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format);
proc CreateSoftwareRenderer(surface: SurfacePtr): Renderer {....raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Renderer * SDL_CreateSoftwareRenderer(SDL_Surface *surface);
proc CreateSystemCursor(id: SystemCursor) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc CreateTexture(renderer: Renderer; format: PixelFormatEnum; access: TextureAccess; width, height: int): Texture {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Texture * SDL_CreateTexture(SDL_Renderer *renderer, Uint32 format, int access, int w, int h);
proc CreateTextureFromSurface(renderer: Renderer; surface: SurfacePtr): Texture {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Texture * SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface);
proc CreateWindow(title: string; w: int; h: int; flags = WindowFlags 0): Window {. inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Create a window with the specified position, dimensions, and flags.
SDL_Window * SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags);
proc CreateWindow(title: string; x: int; y: int; w: int; h: int; flags = WindowFlags 0): Window {....raises: [], tags: [RootEffect], forbids: [].}
-
Create a window with the specified position, dimensions, and flags.
SDL_Window * SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags);
proc CreateWindowAndRenderer(width: int; height: int; window_flags: WindowFlags = WindowFlags 0): tuple[ window: Window, renderer: Renderer] {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_CreateWindowAndRenderer(int width, int height, Uint32 window_flags, SDL_Window **window, SDL_Renderer **renderer);
proc Delay(ms: uint32) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_Delay(Uint32 ms);
proc DestroyRenderer(renderer: Renderer) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Destroy the window rendering context and free all textures.
void SDL_DestroyRenderer(SDL_Renderer *renderer);
proc DestroyTexture(texture: Texture) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Destroy the texture.
void SDL_DestroyTexture(SDL_Texture *texture);
proc DestroyWindow(window: Window) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Destroy a window.
void SDL_DestroyWindow(SDL_Window *window);
proc DisableScreenSaver() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Prevent the screen from being blanked by a screen saver.
void SDL_DisableScreenSaver(void);
proc EnableScreenSaver() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Allow the screen to be blanked by a screen saver.
void SDL_EnableScreenSaver(void);
proc EventState(typ: EventType; state: bool): bool {.discardable, inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the state of processing events.
Return true if the event was enable prior calling this function, false otherwise.
Uint8 SDL_EventState(Uint32 type, int state);
proc FillRect(dst: SurfacePtr; color: uint32): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_FillRect (SDL_Surface *dst, const SDL_Rect *rect, Uint32 color);
proc FillRect(dst: SurfacePtr; rect: Rect; color: uint32): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_FillRect (SDL_Surface *dst, const SDL_Rect *rect, Uint32 color);
proc FlashWindow(window: Window; operation: FlashOperation): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Request a window to demand attention from the user.
This function is available since SDL 2.0.16.
int SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation);
proc FlushEvent(typ: EventType) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_FlushEvent(Uint32 type);
proc FlushEvents(min_type, max_type: EventType) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_FlushEvents(Uint32 min_type, Uint32 max_type);
proc free_drop_event_file(event: var Event) {....raises: [], tags: [], forbids: [].}
- Free memory allocated for EVENT_DROPFILE and EVENT_DROPTEXT.
proc FreeCursor(cursor: CursorPtr) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc FreeSurface(surface: SurfacePtr) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_FreeSurface(SDL_Surface *surface);
proc FreeWAV(audio_buf: ptr UncheckedArray[byte]) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_FreeWAV(Uint8 *audio_buf);
proc GetAudioDeviceName(index: int; iscapture: bool): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
const char *SDL_GetAudioDeviceName(int index, int iscapture);
proc GetAudioDeviceSpec(index: int; iscapture: bool; spec: var AudioSpec): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_GetAudioDeviceSpec(int index, int iscapture, SDL_AudioSpec *spec);
proc GetAudioDeviceStatus(dev: AudioDeviceID): AudioStatus {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_AudioStatus SDL_GetAudioDeviceStatus(SDL_AudioDeviceID dev);
proc GetAudioDriver(index: int): string {....raises: [], tags: [RootEffect], forbids: [].}
-
const char* SDL_GetAudioDriver(int index);
proc GetAudioStatus(): AudioStatus {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_AudioStatus SDL_GetAudioStatus(void);
proc GetClipboardText(): string {....raises: [], tags: [RootEffect], forbids: [].}
-
Get UTF-8 text from the clipboard.Note: Unlike SDL_GetClipboardText, the text returned by get_clipboard_text must not be freed with sdl_free.
char * SDL_GetClipboardText(void);
proc GetCurrentAudioDriver(): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
const char* SDL_GetCurrentAudioDriver(void);
proc GetCurrentDisplayMode(display_index: Natural; mode: var DisplayMode): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Get information about the current display mode.
Returns 0 on success or a negative error code on failure; call get_error() for more information.
int SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode *mode)
proc GetCurrentVideoDriver(): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the name of the currently initialized video driver.
Returns the name of the current video driver or "" if no driver has been initialized.
const char *SDL_GetCurrentVideoDriver(void);
proc GetDefaultAudioInfo(name: var string; spec: var AudioSpec; iscapture: bool): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_GetDefaultAudioInfo(char **name, SDL_AudioSpec *spec, int iscapture);
proc GetDesktopDisplayMode(display_index: Natural; mode: var DisplayMode): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Get information about the desktop's display mode.
int SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode *mode);
proc GetDisplayBounds(display_index: Natural; rect: var Rect): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the desktop area represented by a display.
int SDL_GetDisplayBounds(int displayIndex, SDL_Rect *rect);
proc GetDisplayBounds(display_index: Natural; x: var int; y: var int; width: var int; height: var int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the desktop area represented by a display.
int SDL_GetDisplayBounds(int displayIndex, SDL_Rect *rect);
proc GetDisplayDPI(display_index: int; ddpi: var float; hdpi: var float; vdpi: var float): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the dots/pixels-per-inch for a display.
This function is available since SDL 2.0.4.
int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi);
proc GetDisplayMode(display_index: Natural; mode_index: int; mode: var DisplayMode): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Get information about a specific display mode.
int SDL_GetDisplayMode(int displayIndex, int modeIndex, SDL_DisplayMode *mode);
proc GetDisplayName(display_index: Natural): string {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the name of a display in UTF-8 encoding.
const char * SDL_GetDisplayName(int displayIndex);
proc GetDisplayOrientation(display_index: Natural): DisplayOrientation {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the orientation of a display.
This function is available since SDL 2.0.9. Returns ORIENTATION_UNKNOWN in SDL prior 2.0.9.
SDL_DisplayOrientation SDL_GetDisplayOrientation(int displayIndex);
proc GetDisplayUsableBounds(display_index: Natural; rect: var Rect): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the usable desktop area represented by a display.
Available since SDL 2.0.5. Equal to GetDisplayBounds prior SDL 2.0.5.
int SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect *rect);
proc GetDisplayUsableBounds(display_index: Natural; x: var int; y: var int; width: var int; height: var int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the usable desktop area represented by a display.
Available since SDL 2.0.5. Equal to GetDisplayBounds prior SDL 2.0.5.
int SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect *rect);
proc GetError(): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
const char *SDL_GetError(void);
proc GetGlobalMouseState(): tuple[x, y: int, state: uint32] {....raises: [], tags: [RootEffect], forbids: [].}
-
Note: This function returns tuple of (-1, -1, 0) on SDL prior 2.0.4.
Uint32 SDL_GetGlobalMouseState(int *x, int *y);
proc GetGrabbedWindow(): Window {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the window that currently has an input grab enabled.
SDL_Window *SDL_GetGrabbedWindow(void);
proc GetKeyboardFocus(): Window {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc GetMouseFocus(): Window {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Window * SDL_GetMouseFocus(void);
proc GetMouseState(): tuple[x, y: int, state: uint32] {....raises: [], tags: [RootEffect], forbids: [].}
-
Uint32 SDL_GetMouseState(int *x, int *y);
proc GetNumAudioDevices(iscapture: bool): int {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc GetNumAudioDrivers(): int {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc GetNumDisplayModes(display_index: Natural): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of available display modes.
int SDL_GetNumDisplayModes(int displayIndex);
proc GetNumRenderDrivers(): int {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_GetNumRenderDrivers(void);
proc GetNumTouchDevices(): int {....raises: [], tags: [RootEffect], forbids: [].}
proc GetNumTouchFingers(touch_id: TouchID): int {....raises: [], tags: [RootEffect], forbids: [].}
proc GetNumVideoDisplays(): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of available video displays.
int SDL_GetNumVideoDisplays(void);
proc GetNumVideoDrivers(): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of video drivers compiled into SDL.
int SDL_GetNumVideoDrivers(void);
proc GetPerformanceCounter(): uint64 {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Uint64 SDL_GetPerformanceCounter(void);
proc GetPerformanceFrequency(): uint64 {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Uint64 SDL_GetPerformanceFrequency(void);
proc GetPixelFormatName(format: PixelFormatEnum): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
const char* SDL_GetPixelFormatName(Uint32 format);
proc GetQueuedAudioSize(dev: AudioDeviceID): uint32 {....raises: [], tags: [RootEffect], forbids: [].}
-
Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev);
proc GetRelativeMouseMode(): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc GetRelativeMouseState(): tuple[x, y: int, state: uint32] {....raises: [], tags: [RootEffect], forbids: [].}
-
Uint32 SDL_GetRelativeMouseState(int *x, int *y);
proc GetRenderDrawColor(renderer: Renderer; r: var byte; g: var byte; b: var byte; a: var byte): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_GetRenderDrawColor(SDL_Renderer *renderer, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);
proc GetRenderDriverInfo(index: int; info: var RendererInfo): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo *info);
proc GetRenderer(window: Window): Renderer {....raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Renderer * SDL_GetRenderer(SDL_Window *window);
proc GetRendererInfo(renderer: Renderer; info: var RendererInfo): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_GetRendererInfo(SDL_Renderer *renderer, SDL_RendererInfo *info);
proc GetRendererOutputSize(renderer: Renderer; w: var int; h: var int): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_GetRendererOutputSize(SDL_Renderer *renderer, int *w, int *h);
proc GetRenderTarget(renderer: Renderer): Texture {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Texture * SDL_GetRenderTarget(SDL_Renderer *renderer);
proc GetRevision(): string {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the code revision of SDL that is linked against your program.
const char *SDL_GetRevision(void);
proc GetTicks(): uint32 {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of milliseconds since SDL library initialization.
This value wraps if the program runs for more than ~49 days.
This function is not recommended as of SDL 2.0.18; use GetTicks64 instead, where the value doesn't wrap every ~49 days. There are places in SDL where we provide a 32-bit timestamp that can not change without breaking binary compatibility, though, so this function isn't officially deprecated.
Returns an unsigned 32-bit value representing the number of milliseconds since the SDL library initialized.
Original name: SDL_GetTicks
proc GetTicks64(): uint64 {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of milliseconds since SDL library initialization.
Note that you should not use the TICKS_PASSED macro with values returned by this function, as that macro does clever math to compensate for the 32-bit overflow every ~49 days that GetTicks suffers from. 64-bit values from this function can be safely compared directly.
For example, if you want to wait 100 ms, you could do this:
let timeout = get_ticks64() + 100 while get_ticks64() < timeout: # ... do work until timeout has elapsed
Returns an unsigned 64-bit value representing the number of milliseconds since the SDL library initialized.
This function is available since SDL 2.0.18.
Original name: SDL_GetTicks64
proc GetTouchDevice(index: int): TouchID {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the touch ID with the given index.
SDL_TouchID SDL_GetTouchDevice(int index);
proc GetTouchDeviceType(touch_id: TouchID): TouchDeviceType {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the type of the given touch device.
This function is available since SDL 2.0.10.
SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID touchID);
proc GetTouchFinger(touch_id: TouchID; index: int): ptr Finger {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the finger object for specified touch device ID and finger index.
SDL_Finger * SDL_GetTouchFinger(SDL_TouchID touchID, int index);
proc GetTouchName(index: int): string {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the touch device name as reported from the driver or "" if the index is invalid.
This function is available since SDL 2.0.22.
const char* SDL_GetTouchName(int index);
proc GetVersion(): tuple[major, minor, patch: int] {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the version of SDL that is linked against your program.
void SDL_GetVersion(SDL_version *ver);
proc GetVideoDriver(index: int): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the name of a built in video driver.
const char *SDL_GetVideoDriver(int index);
proc GetWindowBordersSize(window: Window; top: var int; left: var int; bottom: var int; right: var int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the size of a window's borders (decorations) around the client area.
This function is available since SDL 2.0.5.
int SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right);
proc GetWindowDisplayIndex(window: Window): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the index of the display associated with a window.
int SDL_GetWindowDisplayIndex(SDL_Window *window)
proc GetWindowDisplayMode(window: Window; mode: var DisplayMode): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Query the display mode to use when a window is visible at fullscreen.
int SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)
proc GetWindowFlags(window: Window): WindowFlags {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the window flags.
Uint32 SDL_GetWindowFlags(SDL_Window *window);
proc GetWindowFromID(id: uint32): Window {....raises: [], tags: [RootEffect], forbids: [].}
-
Get a window from a stored ID.
SDL_Window * SDL_GetWindowFromID(Uint32 id);
proc GetWindowGrab(window: Window): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc GetWindowID(window: Window): uint32 {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the numeric ID of a window.
Uint32 SDL_GetWindowID(SDL_Window *window);
proc GetWindowKeyboardGrab(window: Window): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc GetWindowMaximumSize(window: Window): tuple[w, h: int] {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the maximum size of a window's client area.
void SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h);
proc GetWindowMinimumSize(window: Window): tuple[w, h: int] {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the minimum size of a window's client area.
void SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h);
proc GetWindowMouseGrab(window: Window): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc GetWindowMouseRect(window: Window): Rect {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the mouse confinement rectangle of a window.
This function is available since SDL 2.0.18.
const SDL_Rect * SDL_GetWindowMouseRect(SDL_Window *window);
proc GetWindowOpacity(window: Window; opacity: var float): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the opacity of a window.
This function is available since SDL 2.0.5.
int SDL_GetWindowOpacity(SDL_Window *window, float *out_opacity);
proc GetWindowPixelFormat(window: Window): PixelFormatEnum {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the pixel format associated with the window.
Returns the pixel format of the window on success or PIXELFORMAT_UNKNOWN on failure; call get_error for more information.
Uint32 SDL_GetWindowPixelFormat(SDL_Window *window);
proc GetWindowPosition(window: Window): tuple[x, y: int] {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the position of a window.
void SDL_GetWindowPosition(SDL_Window *window, int *x, int *y);
proc GetWindowSize(window: Window): tuple[w, h: int] {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the size of a window's client area.
void SDL_GetWindowSize(SDL_Window *window, int *w, int *h);
proc GetWindowSizeInPixels(window: Window): tuple[w, h: int] {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the size of a window in pixels.
This function is available since SDL 2.26.0.
void SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h);
proc GetWindowSurface(window: Window): SurfacePtr {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the SDL surface associated with the window.
SDL_Surface * SDL_GetWindowSurface(SDL_Window *window);
proc GetWindowTitle(window: Window): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the title of a window.
Params:
- window - the window to query
Returns the title of the window in UTF-8 format or "" if there is no title.
Original name: SDL_GetWindowTitle
proc HasWindowSurface(window: Window): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc HideWindow(window: Window) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Hide a window.
Params:
- window - the window to hide
Original name: SDL_HideWindow
proc InitSubSystem(flags: InitFlags): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Compatibility function to initialize the SDL library.
In SDL2, this function and Init are interchangeable.
Params:
Returns true on success or false on failure; call get_error for more information.
Original name: SDL_InitSubSystem
proc JoystickClose(joystick: Joystick) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Close a joystick previously opened with open_joystick.
Available since SDL 2.0.0.
See: SDL_JoystickClose
proc JoystickGetDeviceProduct(device_index: cint): uint16 {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the USB product ID of a joystick, if available.
Returns the USB product ID of the selected joystick. If called on an invalid index, this function returns zero. Returns 0 on SDL prior to 2.0.6.
Available since SDL 2.0.6.
Note: This can be called before any joysticks are opened. If the product ID isn't available this function returns 0. proc JoystickGetDeviceVendor(device_index: cint): uint16 {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the USB vendor ID of a joystick, if available.
Returns the USB vendor ID of the selected joystick. If called on an invalid index, this function returns zero.
Available since SDL 2.0.6.
Note: This can be called before any joysticks are opened. If the vendor ID isn't available this function returns 0. proc JoystickGetGUID(joystick: Joystick): JoystickGUID {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the implementation-dependent GUID for the joystick.
Returns the GUID of the given joystick. If called on an invalid index, this function returns a zero GUID; call get_error() for more information.
proc JoystickGetGUIDString(guid: JoystickGUID): string {....raises: [], tags: [RootEffect], forbids: [].}
-
Get an ASCII string representation for a given JoystickGUID.
proc JoystickGetGUIDString(joystick: Joystick): string {....raises: [], tags: [RootEffect], forbids: [].}
proc JoystickGetProduct(joystick: Joystick): uint16 {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the USB product ID of a joystick, if available.
Returns the USB product ID of the selected joystick. If called on an invalid index, this function returns zero. Returns 0 on SDL prior to 2.0.6.
Available since SDL 2.0.6.
proc JoystickGetSerial(joystick: Joystick): string {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the serial number of an opened joystick, if available.
Returns the serial number of the selected joystick, or "" if unavailable. Returns "" on SDL prior to 2.0.14.
Available since SDL 2.0.14.
See: SDL_JoystickGetSerial.
proc JoystickGetType(joystick: Joystick): JoystickType {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the type of an opened joystick.
Returns the JoystickType <sdl2inc/joystick.html#JoystickType> of the selected joystick. Returns JOYSTICK_TYPE_UNKNOWN <sdl2inc/joystick#JoystickType,JOYSTICK_TYPE_UNKNOWN> on SDL prior to 2.0.6.
Available since SDL 2.0.6.
See: SDL_JoystickGetType.
proc JoystickGetVendor(joystick: Joystick): uint16 {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the USB vendor ID of an opened joystick, if available.
Returns the USB vendor ID of the selected joystick, or 0 if unavailable.
Available since SDL 2.0.6.
See: SDL_JoystickGetVendor.
proc JoystickHasLED(joystick: Joystick): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc JoystickHasRumble(joystick: Joystick): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc JoystickHasRumbleTriggers(joystick: Joystick): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc JoystickName(joystick: Joystick): string {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the implementation dependent name of a joystick.
Available since SDL 2.0.0.
Returns the name of the selected joystick. If no name can be found, this function returns ""; call get_error() for more information.
proc JoystickNumAxes(joystick: Joystick): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of general axis controls on a joystick.
Returns the number of axis controls/number of axes on success or a negative error code on failure; call get_error() for more information.
Available since SDL 2.0.0.
See: SDL_JoystickNumAxes
proc JoystickNumBalls(joystick: Joystick): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of trackballs on a joystick.
Returns the number of trackballs on success or a negative error code on failure; call get_error() for more information.
Available since SDL 2.0.0.
proc JoystickNumButtons(joystick: Joystick): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of buttons on a joystick.
Returns the number of buttons on success or a negative error code on failure; call get_error() for more information.
Available since SDL 2.0.0.
proc JoystickNumHats(joystick: Joystick): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Get the number of POV hats on a joystick.
Returns the number of POV hats on success or a negative error code on failure; call get_error() for more information.
Available since SDL 2.0.0.
See: SDL_JoystickNumHats
proc JoystickOpen(device_index: int): Joystick {....raises: [], tags: [RootEffect], forbids: [].}
-
Open a joystick for use.
Returns a joystick identifier or nil if an error occurred.
Available since SDL 2.0.0.
See: SDL_JoystickOpen
proc JoystickPath(joystick: Joystick): string {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get the implementation dependent path of a joystick.
Returns the path of the selected joystick. If no path can be found, this function returns nil; call get_error() for more information. Returns "" on SDL prior to 2.24.0.
Available since SDL 2.24.0.
See: SDL_JoystickPath
proc JoystickUpdate() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Update the current state of the open joysticks.Note: This is called automatically by the event loop if any joystick events are enabled.
Available since SDL 2.0.0.
See: SDL_JoystickUpdate
proc LoadBMP(file: string): SurfacePtr {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
#define SDL_LoadBMP(file) SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1);
proc LoadBMP_RW(src: RWops; freesrc: bool): SurfacePtr {....raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Surface *SDL_LoadBMP_RW(SDL_RWops *src, int freesrc);
proc LoadWAV(file: string; spec: var AudioSpec; audio_buf: var ptr UncheckedArray[byte]; audio_len: var uint32): ptr AudioSpec {. inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
#define SDL_LoadWAV(file, spec, audio_buf, audio_len) \ SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
proc LoadWAV_RW(src: RWops; freesrc: bool; spec: var AudioSpec; audio_buf: var ptr UncheckedArray[byte]; audio_len: var uint32): ptr AudioSpec {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_AudioSpec * SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 ** audio_buf, Uint32 *audio_len);
proc LockSurface(surface: SurfacePtr): bool {.discardable, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_LockSurface(SDL_Surface *surface);
proc Log(message: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_Log(const char *fmt, ...);
proc LogCritical(category: LogCategory; message: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogCritical(int category, const char *fmt, ...);
proc LogDebug(category: LogCategory; message: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogDebug(int category, const char *fmt, ...);
proc LogError(category: LogCategory; message: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogError(int category, const char *fmt, ...);
proc LogInfo(category: LogCategory; message: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogInfo(int category, const char *fmt, ...);
proc LogMessage(category: LogCategory; priority: LogPriority; message: string) {. ...raises: [], tags: [RootEffect], forbids: [].}
proc LogSetAllPriority(priority: LogPriority) {....raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogSetAllPriority(SDL_LogPriority priority);
proc LogSetOutputFunction(callback: LogOutputFunction; userdata: pointer = nil) {. inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogSetOutputFunction(SDL_LogOutputFunction callback, void *userdata);
proc LogSetPriority(category: LogCategory; priority: LogPriority) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogSetPriority(int category, SDL_LogPriority priority);
proc LogVerbose(category: LogCategory; message: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogVerbose(int category, const char *fmt, ...);
proc LogWarn(category: LogCategory; message: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_LogWarn(int category, const char *fmt, ...);
proc MapRGB(format: PixelFormat; r: byte; g: byte; b: byte): uint32 {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Uint32 SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b);
proc MapRGBA(format: PixelFormat; r: byte; g: byte; b: byte; a: byte): uint32 {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Uint32 SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
proc MasksToPixelFormatEnum(bpp: int; rmask: uint32; gmask: uint32; bmask: uint32; amask: uint32): PixelFormatEnum {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
proc MaximizeWindow(window: Window) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Make a window as large as possible.
void SDL_MaximizeWindow(SDL_Window *window);
proc MinimizeWindow(window: Window) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Minimize a window to an iconic representation.
void SDL_MinimizeWindow(SDL_Window *window);
proc MixAudio(dst: ptr UncheckedArray[byte]; src: ptr byte or ptr UncheckedArray[byte]; len: uint32; volume: int) {....raises: [].}
-
void SDL_MixAudio(Uint8 *dst, const Uint8 *src, Uint32 len, int volume);
proc NumJoysticks(): int {....raises: [], tags: [RootEffect], forbids: [].}
-
Count the number of joysticks attached to the system.
Returns the number of attached joysticks on success or a negative error code on failure; call get_error() for more information.
Available since SDL 2.0.0.
See: SDL_NumJoysticks
proc OpenAudioDevice(device: string; iscapture: bool; desired: AudioSpec; allowed_changes = AudioAllowFlags 0): AudioDeviceID {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_AudioDeviceID SDL_OpenAudioDevice(const char *device, int iscapture, const SDL_AudioSpec *desired, SDL_AudioSpec *obtained, int allowed_changes);
proc OpenAudioDevice(device: string; iscapture: bool; desired: AudioSpec; obtained: var AudioSpec; allowed_changes = AudioAllowFlags 0): AudioDeviceID {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_AudioDeviceID SDL_OpenAudioDevice(const char *device, int iscapture, const SDL_AudioSpec *desired, SDL_AudioSpec *obtained, int allowed_changes);
proc PauseAudio(pause_on: bool) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
proc PauseAudioDevice(dev: AudioDeviceID; pause_on: bool) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_PauseAudioDevice(SDL_AudioDeviceID dev, int pause_on);
proc PeepEvents(events: var openArray[Event]; action: EventAction; min_type: EventType; max_type: EventType): int {.inline, ...raises: [], tags: [], forbids: [].}
proc PeepEvents(events: var openArray[Event]; numevents: int; action: EventAction; min_type: EventType; max_type: EventType): int {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 minType, Uint32 maxType);
proc PixelFormatEnumToMasks(format: PixelFormatEnum): tuple[bpp: int, rmask, gmask, bmask, amask: uint32] {....raises: [], tags: [RootEffect], forbids: [].}
-
Return tuple of (0, 0, 0, 0) on error.
SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask);
proc PollEvent(): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_PollEvent(SDL_Event *event);
proc PremultiplyAlpha(width: int; height: int; src_format: PixelFormatEnum; src: pointer; src_pitch: int; dst_format: PixelFormatEnum; dst: pointer; dst_pitch: int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_PremultiplyAlpha(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch);
proc PumpEvents() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_PumpEvents(void);
proc QueryTexture(texture: Texture; format: var uint32; access: var int; w: var int; h: var int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_QueryTexture(SDL_Texture *texture, Uint32 *format, int *access, int *w, int *h);
proc QueueAudio(dev: AudioDeviceID; data: pointer; len: uint32): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len);
proc Quit() {....raises: [], tags: [RootEffect], forbids: [].}
-
Clean up all initialized subsystems.
You should call this function even if you have already shutdown each initialized subsystem with QuitSubSystem. It is safe to call this function even in the case of errors in initialization.
If you start a subsystem using a call to that subsystem's init function (for example VideoInit instead of Init or InitSubSystem, then you must use that subsystem's quit function (video) to shut it down before calling Quit. But generally, you should not be using those functions directly anyhow; use Init instead.
You can use this function with atexit() to ensure that it is run when your application is shutdown, but it is not wise to do this from a library or other dynamically loaded code.
Original name: SDL_Quit
proc QuitRequested(): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
#define SDL_QuitRequested() \ SDL_PumpEvents(), \ (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0))
proc QuitSubSystem(flags: InitFlags) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Shut down specific SDL subsystems.
If you start a subsystem using a call to that subsystem's init function (for example VideoInit instead of Init or InitSubSystem, SDL_QuitSubSystem() and WasInit will not work. You will need to use that subsystem's quit function (VideoInit) directly instead. But generally, you should not be using those functions directly anyhow; use Init instead.
You still need to call Quit even if you close all open subsystems with InitSubSystem.
Params:
Original name: SDL_QuitSubSystem
proc RaiseWindow(window: Window) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Raise a window above other windows and set the input focus.
void SDL_RaiseWindow(SDL_Window *window);
proc RemoveTimer(id: TimerID): bool {.discardable, inline, ...raises: [], raises: [], tags: [RootEffect], forbids: [].}
proc RenderClear(renderer: Renderer): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderClear(SDL_Renderer *renderer);
proc RenderCopy(renderer: Renderer; texture: Texture): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect);
proc RenderCopy(renderer: Renderer; texture: Texture; dst: Rect): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect);
proc RenderCopy(renderer: Renderer; texture: Texture; src: Rect; dst: Rect): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect);
proc RenderCopy(renderer: Renderer; texture: Texture; x: int; y: int; w: int; h: int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect);
proc RenderCopyEx(renderer: Renderer; texture: Texture; src: Rect; dst: Rect; angle: float; center: Point; flip: RendererFlip): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
SDL_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect, const double angle, const SDL_Point *center, const SDL_RendererFlip flip);
proc RenderDrawLine(renderer: Renderer; x1: int; y1: int; x2: int; y2: int): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderDrawLine(SDL_Renderer *renderer, int x1, int y1, int x2, int y2);
proc RenderDrawPoint(renderer: Renderer; x: int; y: int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderDrawPoint(SDL_Renderer *renderer, int x, int y);
proc RenderDrawPointF(renderer: Renderer; x: float; y: float): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderDrawPointF(SDL_Renderer *renderer, float x, float y);
proc RenderDrawRect(renderer: Renderer; rect: Rect): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderDrawRect(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderDrawRect(renderer: Renderer; x: int; y: int; w: int; h: int): bool {. inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderDrawRect(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderFillRect(renderer: Renderer): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderFillRect(renderer: Renderer; rect: Rect): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderFillRect(renderer: Renderer; x, y: int; w, h: int): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_FRect *rect);
proc RenderGeometry(renderer: Renderer; texture: Texture; vertices: openArray[Vertex]; num_vertices: int = 0): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices);
proc RenderGeometry(renderer: Renderer; vertices: openArray[Vertex]; num_vertices: int = 0): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices);
proc RenderGetClipRect(renderer: Renderer; rect: var Rect) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_RenderGetClipRect(SDL_Renderer *renderer, SDL_Rect *rect);
proc RenderGetLogicalSize(renderer: Renderer; w: var int; h: var int) {. ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_RenderGetLogicalSize(SDL_Renderer *renderer, int *w, int *h)
proc RenderGetScale(renderer: Renderer; scale_x, scale_y: var float) {. ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_RenderGetScale(SDL_Renderer *renderer, float *scaleX, float *scaleY);
proc RenderGetViewport(renderer: Renderer; rect: var Rect) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_RenderGetViewport(SDL_Renderer *renderer, SDL_Rect *rect);
proc RenderGetWindow(renderer: Renderer): Window {....raises: [], tags: [RootEffect], forbids: [].}
-
SDL_Window *SDL_RenderGetWindow(SDL_Renderer *renderer);
proc RenderPresent(renderer: Renderer) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_RenderPresent(SDL_Renderer *renderer);
proc RenderReadPixels(renderer: Renderer; format: PixelFormatEnum; pixels: pointer; pitch: int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, Uint32 format, void *pixels, int pitch);
proc RenderReadPixels(renderer: Renderer; rect: Rect; format: PixelFormatEnum; pixels: pointer; pitch: int): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, Uint32 format, void *pixels, int pitch);
proc RenderSetClipRect(renderer: Renderer): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderSetClipRect(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderSetClipRect(renderer: Renderer; rect: Rect): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderSetClipRect(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderSetLogicalSize(renderer: Renderer; w: int; h: int): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderSetLogicalSize(SDL_Renderer *renderer, int w, int h);
proc RenderSetScale(renderer: Renderer; scale_x: float; scale_y: float): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderSetScale(SDL_Renderer *renderer, float scaleX, float scaleY);
proc RenderSetViewport(renderer: Renderer): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderSetViewport(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderSetViewport(renderer: Renderer; rect: Rect): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderSetViewport(SDL_Renderer *renderer, const SDL_Rect *rect);
proc RenderSetVSync(renderer: Renderer; vsync: bool): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync);
proc RenderTargetSupported(renderer: Renderer): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc RenderWindowToLogical(renderer: Renderer; window_x: int; window_y: int; logical_x: var float; logical_y: var float): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_RenderWindowToLogical(SDL_Renderer *renderer, int windowX, int windowY, float *logicalX, float *logicalY);
proc RestoreWindow(window: Window) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Restore the size and position of a minimized or maximized window.
void SDL_RestoreWindow(SDL_Window *window);
proc RWFromFile(file, mode: string): RWops {....raises: [], tags: [RootEffect], forbids: [].}
-
SDL_RWops * SDL_RWFromFile(const char *file, const char *mode);
proc SaveBMP(surface: SurfacePtr; file: string): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc sdl2_avail(flags = INIT_VIDEO): bool {....raises: [], tags: [RootEffect], forbids: [].}
proc SetClipboardText(text: string): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetClipboardText(const char *text);
proc SetColorKey(surface: SurfacePtr; flag: bool; key: uint32): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetColorKey(SDL_Surface *surface, int flag, Uint32 key);
proc SetError(msg: string): bool {.discardable, inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetError(const char *fmt, ...);
proc SetPixelFormatPalette(format: var PixelFormat; palette: Palette): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetPixelFormatPalette(SDL_PixelFormat *format, SDL_Palette *palette);
proc SetRelativeMouseMode(enable: bool): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetRelativeMouseMode(SDL_bool enabled);
proc SetRenderDrawBlendMode(renderer: Renderer; blend_mode: BlendMode): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode);
proc SetRenderDrawColor(renderer: Renderer; r: byte; g: byte; b: byte; a: byte = 0x000000FF): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Set the color used for drawing operations (clear, line, rect, etc.).
int SDL_SetRenderDrawColor(SDL_Renderer *renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
proc SetRenderTarget(renderer: Renderer; texture: Texture = nil): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture);
proc SetTextureAlphaMod(texture: Texture; a: byte): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetTextureAlphaMod(SDL_Texture *texture, Uint8 alpha);
proc SetTextureBlendMode(texture: Texture; blend_mode: BlendMode): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode);
proc SetTextureColorMod(texture: Texture; r: byte; g: byte; b: byte): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_SetTextureColorMod(SDL_Texture *texture, Uint8 r, Uint8 g, Uint8 b);
proc SetWindowAlwaysOnTop(window: Window; on_top: bool): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Set the window to always be above the others.
This function is available since SDL 2.0.16.
void SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top);
proc SetWindowBordered(window: Window; bordered: bool) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the border state of a window.
void SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered);
proc SetWindowDisplayMode(window: Window; mode: DisplayMode): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Set the display mode to use when a window is visible at fullscreen.
int SDL_SetWindowDisplayMode(SDL_Window *window, const SDL_DisplayMode *mode);
proc SetWindowFullscreen(window: Window; flags = WindowFlags 0): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Set a window's fullscreen state.
int SDL_SetWindowFullscreen(SDL_Window *window, Uint32 flags);
proc SetWindowGrab(window: Window; grabbed: bool) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set a window's input grab mode.
void SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed);
proc SetWindowHitTest(window: Window; callback: HitTest; callback_data: pointer): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Provide a callback that decides if a window region has special properties.
This function is available since SDL 2.0.4.
int SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data);
proc SetWindowIcon(window: Window; surface: SurfacePtr) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the icon for a window.
void SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon);
proc SetWindowInputFocus(window: Window): bool {. ...deprecated: "use RaiseWindow instead", raises: [], tags: [], forbids: [].}
-
Explicitly set input focus to the window.
int SDL_SetWindowInputFocus(SDL_Window *window);
proc SetWindowKeyboardGrab(window: Window; grabbed: bool): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Set a window's keyboard grab mode.
This function is available since SDL 2.0.16.
void SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed);
proc SetWindowMaximumSize(window: Window; max_w: int; max_h: int) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the maximum size of a window's client area.
void SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h);
proc SetWindowMinimumSize(window: Window; min_w: int; min_h: int) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the minimum size of a window's client area.
void SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h);
proc SetWindowModalFor(modal_window: Window; parent_window: Window): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the window as a modal for another window.
This function is available since SDL 2.0.5.
int SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window);
proc SetWindowMouseGrab(window: Window; grabbed: bool): bool {.discardable, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set a window's mouse grab mode.
This function is available since SDL 2.0.16.
void SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed);
proc SetWindowMouseRect(window: Window; rect: Rect): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Confines the cursor to the specified area of a window.
This function is available since SDL 2.0.18.
int SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect);
proc SetWindowOpacity(window: Window; opacity: float): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Set the opacity for a window.
This function is available since SDL 2.0.5.
int SDL_SetWindowOpacity(SDL_Window *window, float opacity);
proc SetWindowPosition(window: Window; x: int; y: int) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the position of a window.Note: Centering the window after returning from full screen moves the window to primary display.
void SDL_SetWindowPosition(SDL_Window *window, int x, int y);
proc SetWindowResizable(window: Window; ontop: bool): bool {.discardable, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the user-resizable state of a window.
This function is available since SDL 2.0.5.
void SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable);
proc SetWindowSize(window: Window; x: int; y: int) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the size of a window's client area.
void SDL_SetWindowSize(SDL_Window *window, int w, int h);
proc SetWindowTitle(window: Window; title: string) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Set the title of a window.
This string is expected to be in UTF-8 encoding.
Params:
- window - the window to change
- title - the desired window title in UTF-8 format
Original name: SDL_SetWindowTitle
proc ShowCursor(toggle: EventState): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_ShowCursor(int toggle);
proc ShowMessageBo(messageboxdata: var MessageBoxData; buttonid: var int): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
proc ShowSimpleMessageBox(flags: MessageBoxFlags; title: string; message: string; window: Window = nil): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window);
proc ShowWindow(window: Window) {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Show a window.
Params:
- window - the window to show
Original name: SDL_ShowWindow
proc UnlockSurface(surface: SurfacePtr) {....raises: [], tags: [RootEffect], forbids: [].}
-
void SDL_UnlockSurface(SDL_Surface *surface);
proc UpdateTexture(texture: Texture; pixels: pointer; pitch: int): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, const void *pixels, int pitch);
proc UpdateTexture(texture: Texture; rect: Rect; pixels: pointer; pitch: int): bool {. ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, const void *pixels, int pitch);
proc UpdateTexture[T: SomeUnsignedInt](texture: Texture; pixels: openArray[T]; pitch: int): bool {.inline, ...raises: [].}
-
int SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, const void *pixels, int pitch);
proc UpdateWindowSurface(window: Window): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Copy the window surface to the screen.
int SDL_UpdateWindowSurface(SDL_Window *window);
proc VideoInit(driver_name: string): bool {....raises: [], tags: [RootEffect], forbids: [].}
-
Initialize the video subsystem, optionally specifying a video driver.
int SDL_VideoInit(const char *driver_name);
proc VideoQuit() {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Shut down the video subsystem, if initialized with VideoInit().
void SDL_VideoQuit(void);
proc WaitEvent(): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_WaitEvent(SDL_Event *event);
proc WaitEventTimeout(event: var Event; timeout: int): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_WaitEventTimeout(SDL_Event *event, int timeout);
proc WaitEventTimeout(timeout: int): bool {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
int SDL_WaitEventTimeout(SDL_Event *event, int timeout);
proc WasInit(flags: InitFlags = INIT_NONE): InitFlags {.inline, ...raises: [], tags: [RootEffect], forbids: [].}
-
Get a mask of the specified subsystems which are currently initialized.
Params:
Returns a mask of all initialized subsystems if flags is INIT_NONE, otherwise it returns the initialization status of the specified subsystems.
The return value does not include INIT_NOPARACHUTE.
Original name: SDL_WasInit
Exports
-
open_sdl2_library, close_sdl2_library, last_sdl2_error, AUDIO_S32, AUDIO_S16, AUDIO_ALLOW_ANY_CHANGE, AudioDeviceID, AudioSpec, ==, AUDIO_S32SYS, AUDIO_S16LSB, AUDIO_ALLOW_FORMAT_CHANGE, MIX_MAXVOLUME, AUDIO_MASK_ENDIAN, and, AudioFilter, AUDIO_U16MSB, AUDIO_F32, AUDIOCVT_MAX_FILTERS, AUDIO_MASK_BITSIZE, AUDIO_S32LSB, AUDIO_F32LSB, ==, AUDIO_ALLOW_SAMPLES_CHANGE, AUDIO_S16SYS, AUDIO_U16LSB, AUDIO_MASK_DATATYPE, AUDIO_S16MSB, AudioFormat, AUDIO_F32MSB, or, AudioStatus, AUDIO_S8, AudioStream, ==, AUDIO_ALLOW_FREQUENCY_CHANGE, AudioAllowFlags, AUDIO_ALLOW_CHANNELS_CHANGE, AUDIO_U8, AudioCallback, AudioCVT, AUDIO_U16SYS, AUDIO_F32SYS, or, AUDIO_U16, AUDIO_MASK_SIGNED, AUDIO_S32MSB, BLENDMODE_MOD, or, BLENDMODE_INVALID, BLENDMODE_MUL, BLENDMODE_BLEND, BlendFactor, BlendOperation, BLENDMODE_ADD, BlendMode, BLENDMODE_NONE, EventState, ENABLE, TouchFingerEvent, UserEvent, SysWMEvent, SensorEvent, $, IGNORE, JoyAxisEvent, EventFilter, DollarGestureEvent, RELEASED, AudioDeviceEvent, QuitEvent, DisplayEvent, MultiGestureEvent, DropEvent, ControllerTouchpadEvent, WindowEvent, OSEvent, PRESSED, ControllerButtonEvent, TextInputEvent, DISABLE, JoyButtonEvent, QUERY, repr, SysWMmsgPtr, KeyboardEvent, EventType, ControllerAxisEvent, ControllerSensorEvent, MouseButtonEvent, Event, MouseWheelEvent, JoyHatEvent, repr, JoyBallEvent, TextEditingEvent, ControllerDeviceEvent, MouseMotionEvent, JoyDeviceEvent, EventAction, CommonEvent, HINT_THREAD_STACK_SIZE, HINT_GAMECONTROLLERCONFIG, HINT_ACCELEROMETER_AS_JOYSTICK, HINT_VIDEO_EGL_ALLOW_TRANSPARENCY, HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO, HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS, HINT_PS2_DYNAMIC_VSYNC, HINT_AUTO_UPDATE_JOYSTICKS, HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, HINT_MOUSE_FOCUS_CLICKTHROUGH, HINT_NO_SIGNAL_HANDLERS, HINT_WINDOWS_ENABLE_MENU_MNEMONICS, HINT_VIDEO_FOREIGN_WINDOW_OPENGL, HINT_VIDEO_MAC_FULLSCREEN_SPACES, HINT_EVENT_LOGGING, HINT_AUDIO_DEVICE_APP_NAME, HINT_MOUSE_RELATIVE_SCALING, HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC, HINT_MOUSE_RELATIVE_MODE_CENTER, HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING, HINT_WINDOWS_DPI_SCALING, HINT_JOYSTICK_WGI, HINT_VIDEO_X11_XVIDMODE, HINT_WINDOWS_INTRESOURCE_ICON, HINT_APP_NAME, HINT_WAVE_TRUNCATION, HINT_GRAB_KEYBOARD, HINT_JOYSTICK_ROG_CHAKRAM, HINT_LINUX_JOYSTICK_CLASSIC, HINT_DIRECTINPUT_ENABLED, HINT_EMSCRIPTEN_ASYNCIFY, HINT_TIMER_RESOLUTION, HINT_VIDEO_DOUBLE_BUFFER, HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, HINT_VIDEO_WAYLAND_MODE_EMULATION, HINT_WINDOWS_USE_D3D9EX, HINT_VIDEO_WAYLAND_PREFER_LIBDECOR, HINT_TRACKPAD_IS_TOUCH_ONLY, HINT_X11_WINDOW_TYPE, HINT_ORIENTATIONS, HINT_RENDER_LOGICAL_SIZE_MODE, HINT_MOUSE_AUTO_CAPTURE, HINT_VIDEO_X11_NET_WM_PING, HINT_THREAD_PRIORITY_POLICY, HINT_JOYSTICK_THREAD, HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED, HINT_QTWAYLAND_WINDOW_FLAGS, HINT_MOUSE_RELATIVE_MODE_WARP, HINT_IME_SHOW_UI, HINT_JOYSTICK_HIDAPI_JOY_CONS, HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED, HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED, HINT_QUIT_ON_LAST_WINDOW_CLOSE, HINT_AUDIO_DEVICE_STREAM_ROLE, HINT_APPLE_TV_CONTROLLER_UI_EVENTS, HINT_VIDEODRIVER, HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR, HINT_MOUSE_DOUBLE_CLICK_TIME, HINT_RENDER_OPENGL_SHADERS, HINT_MOUSE_TOUCH_EVENTS, HintCallback, HINT_GAMECONTROLLER_USE_BUTTON_LABELS, HINT_WAVE_RIFF_CHUNK_SIZE, HINT_TOUCH_MOUSE_EVENTS, HINT_AUDIO_RESAMPLING_MODE, HINT_KMSDRM_REQUIRE_DRM_MASTER, HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT, HINT_JOYSTICK_HIDAPI_SWITCH, HINT_MOUSE_RELATIVE_WARP_MOTION, HINT_JOYSTICK_RAWINPUT, HINT_LINUX_JOYSTICK_DEADZONES, HINT_AUDIODRIVER, HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT, HINT_X11_FORCE_OVERRIDE_REDIRECT, HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS, HINT_AUTO_UPDATE_SENSORS, HINT_PREFERRED_LOCALES, HintName, HINT_RENDER_DIRECT3D11_DEBUG, HINT_RPI_VIDEO_LAYER, HINT_MAC_OPENGL_ASYNC_DISPATCH, HINT_JOYSTICK_HIDAPI_PS4, HINT_IDLE_TIMER_DISABLED, HINT_VIDEO_ALLOW_SCREENSAVER, HINT_WINRT_PRIVACY_POLICY_LABEL, HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS, HINT_BMP_SAVE_LEGACY_FORMAT, HINT_WINRT_HANDLE_BACK_BUTTON, HINT_AUDIO_INCLUDE_MONITORS, HINT_DISPLAY_USABLE_BOUNDS, HINT_FORCE_RAISEWINDOW, HINT_RENDER_LINE_METHOD, HINT_IME_INTERNAL_EDITING, HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED, HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT, HintPriority, HINT_AUDIO_CATEGORY, HINT_RENDER_BATCHING, HINT_XINPUT_ENABLED, HINT_MOUSE_RELATIVE_SPEED_SCALE, HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED, HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE, HINT_IOS_HIDE_HOME_INDICATOR, HINT_RENDER_SCALE_QUALITY, HINT_WINDOWS_DISABLE_THREAD_NAMING, HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL, HINT_JOYSTICK_DEVICE, HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS, HINT_GAMECONTROLLERTYPE, HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, HINT_JOYSTICK_HIDAPI_XBOX_ONE, HINT_TV_REMOTE_AS_JOYSTICK, HINT_JOYSTICK_HIDAPI_STADIA, HINT_WINDOWS_INTRESOURCE_ICON_SMALL, HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED, HINT_WINDOWS_DPI_AWARENESS, HINT_VIDEO_X11_WINDOW_VISUALID, HINT_ALLOW_TOPMOST, HINT_RENDER_DIRECT3D_THREADSAFE, HINT_POLL_SENTINEL, HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION, HINT_MOUSE_DOUBLE_CLICK_RADIUS, HINT_VITA_TOUCH_MOUSE_DEVICE, HINT_JOYSTICK_HIDAPI_PS3, HINT_JOYSTICK_HIDAPI_XBOX_360, HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME, HINT_JOYSTICK_HIDAPI_GAMECUBE, HINT_ENABLE_SCREEN_KEYBOARD, HINT_APPLE_TV_REMOTE_ALLOW_ROTATION, HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN, HINT_JOYSTICK_HIDAPI_SHIELD, HINT_MOUSE_RELATIVE_SYSTEM_SCALE, HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL, HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION, HINT_VIDEO_HIGHDPI_DISABLED, HINT_JOYSTICK_HIDAPI, HINT_VIDEO_FOREIGN_WINDOW_VULKAN, HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, HINT_QTWAYLAND_CONTENT_ORIENTATION, HINT_ENABLE_STEAM_CONTROLLERS, HINT_RENDER_DRIVER, HINT_JOYSTICK_HIDAPI_STEAM, HINT_LINUX_HAT_DEADZONES, HINT_LINUX_DIGITAL_HATS, HINT_RENDER_VSYNC, HINT_MOUSE_NORMAL_SPEED_SCALE, HINT_MAC_BACKGROUND_APP, HINT_VIDEO_X11_XRANDR, HINT_VIDEO_WIN_D3DCOMPILER, HINT_ANDROID_TRAP_BACK_BUTTON, HINT_FRAMEBUFFER_ACCELERATION, HINT_WINRT_PRIVACY_POLICY_URL, HINT_GAMECONTROLLERCONFIG_FILE, HINT_GAMECONTROLLER_IGNORE_DEVICES, HINT_VIDEO_X11_XINERAMA, HINT_WINDOWS_ENABLE_MESSAGELOOP, HINT_JOYSTICK_HIDAPI_XBOX, HINT_KMSDRM_DEVICE_INDEX, HINT_ALLOW_ALT_TAB_WHILE_GRABBED, HINT_AUDIO_DEVICE_STREAM_NAME, HINT_VIDEO_X11_FORCE_EGL, HINT_RETURN_KEY_HIDES_IME, HINT_JOYSTICK_HIDAPI_PS5, HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, HINT_JOYSTICK_HIDAPI_WII, HINT_IME_SUPPORT_EXTENDED_TEXT, HINT_ANDROID_BLOCK_ON_PAUSE, HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP, HINT_VIDEO_EXTERNAL_CONTEXT, HINT_WINDOW_NO_ACTIVATION_WHEN_SHOWN, HINT_OPENGL_ES_DRIVER, HINT_HIDAPI_IGNORE_DEVICES, HINT_EMSCRIPTEN_KEYBOARD_ELEMENT, HINT_JOYSTICK_HIDAPI_LUNA, HINT_WAVE_FACT_CHUNK, HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, INIT_EVENTS, INIT_AUDIO, INIT_NOPARACHUTE, or, INIT_VIDEO, INIT_SENSOR, INIT_HAPTIC, INIT_GAMECONTROLLER, INIT_EVERYTHING, SdlBool, INIT_JOYSTICK, INIT_TIMER, InitFlags, ==, INIT_NONE, and, JoystickGUID, JoystickID, HAT_LEFTDOWN, JoystickType, IPHONE_MAX_GFORCE, ==, JOYSTICK_AXIS_MAX, HAT_LEFT, HAT_DOWN, and, JOYSTICK_AXIS_MIN, HAT_UP, HAT_RIGHTDOWN, Joystick, Hat, HAT_CENTERED, ==, HAT_RIGHT, HAT_RIGHTUP, JoystickPowerLevel, HAT_LEFTUP, SDLK_KP_1, KMOD_NUM, SDLK_y, SDLK_EXCLAIM, SDLK_KP_000, SDLK_F22, SDLK_KP_EQUALSAS400, SDLK_KP_COMMA, SDLK_KP_BINARY, SDLK_F15, SDLK_APPLICATION, ==, SDLK_d, SDLK_QUOTEDBL, SDLK_KP_MEMADD, SDLK_MODE, SDLK_7, SDLK_CLEAR, SDLK_F11, SDLK_COLON, SDLK_AC_SEARCH, SDLK_UNDERSCORE, SDLK_KP_LEFTBRACE, SDLK_F19, SDLK_CANCEL, SDLK_TAB, SDLK_AGAIN, SDLK_t, SDLK_BACKSLASH, SDLK_RIGHTPAREN, SDLK_KP_TAB, SDLK_BRIGHTNESSUP, KMOD_CTRL, SDLK_MENU, SDLK_4, SDLK_COMMA, SDLK_AC_HOME, SDLK_CURRENCYSUBUNIT, SDLK_KP_RIGHTBRACE, SDLK_KP_DBLAMPERSAND, SDLK_F5, SDLK_ASTERISK, SDLK_KP_MEMSTORE, SDLK_3, SDLK_KP_PLUS, SDLK_DELETE, SDLK_PERIOD, SDLK_KP_5, SDLK_OPER, SDLK_KP_MEMDIVIDE, SDLK_p, SDLK_F7, SDLK_u, SDLK_g, SDLK_KBDILLUMUP, SDLK_AT, SDLK_AC_BACK, SDLK_PRIOR, SDLK_F4, SDLK_F2, SDLK_MEDIASELECT, SDLK_MINUS, SDLK_F20, SDLK_KP_D, SDLK_z, SDLK_RSHIFT, SDLK_VOLUMEDOWN, SDLK_F9, SDLK_PERCENT, SDLK_KBDILLUMTOGGLE, KMOD_ALT, SDLK_MUTE, KMOD_LALT, SDLK_CALCULATOR, SDLK_F23, SDLK_SCROLLLOCK, SDLK_PRINTSCREEN, SDLK_s, SDLK_k, SDLK_SEMICOLON, SDLK_RCTRL, SDLK_ESCAPE, SDLK_F10, ==, SDLK_KP_2, SDLK_LALT, SDLK_RIGHT, SDLK_FIND, SDLK_KP_OCTAL, SDLK_x, Keycode, SDLK_BACKSPACE, SDLK_KP_E, SDLK_v, SDLK_KP_HEXADECIMAL, SDLK_F3, KMOD_LSHIFT, SDLK_PAGEDOWN, SDLK_COMPUTER, SDLK_KP_B, SDLK_CRSEL, KMOD_LGUI, SDLK_j, SDLK_KP_LEFTPAREN, SDLK_LEFTBRACKET, KMOD_RGUI, SDLK_COPY, SDLK_DISPLAYSWITCH, SDLK_h, SDLK_APP1, SDLK_POWER, SDLK_RALT, SDLK_KP_HASH, SDLK_F14, SDLK_KP_MEMSUBTRACT, SDLK_KP_LESS, SDLK_KP_DECIMAL, SDLK_CURRENCYUNIT, SDLK_F17, SDLK_KP_7, SDLK_AUDIOMUTE, SDLK_KP_0, SDLK_LEFT, KMOD_RSHIFT, SDLK_8, SDLK_KP_4, SDLK_KP_3, SDLK_KP_A, SDLK_KP_SPACE, SDLK_KP_MEMCLEAR, SDLK_KP_ENTER, SDLK_UNDO, SDLK_e, SDLK_KP_COLON, SDLK_w, KMOD_RALT, SDLK_KP_EQUALS, SDLK_DECIMALSEPARATOR, SDLK_PAUSE, SDLK_KP_MULTIPLY, SDLK_l, SDLK_KBDILLUMDOWN, SDLK_F1, SDLK_CARET, SDLK_KP_00, SDLK_AUDIOPREV, SDLK_KP_PERCENT, SDLK_PAGEUP, SDLK_F12, SDLK_9, SDLK_AC_FORWARD, SDLK_SELECT, SDLK_AC_STOP, SDLK_KP_AT, SDLK_AUDIOREWIND, SDLK_F6, SDLK_1, SDLK_F16, SDLK_r, SDLK_F24, SDLK_KP_XOR, KMOD_RCTRL, SDLK_RETURN2, SDLK_NUMLOCKCLEAR, SDLK_o, SDLK_AUDIOFASTFORWARD, SDLK_KP_MEMRECALL, SDLK_i, SDLK_KP_VERTICALBAR, SDLK_HOME, KMOD_NONE, SDLK_KP_DIVIDE, SDLK_n, SDLK_KP_F, KMOD_SCROLL, SDLK_CUT, SDLK_ALTERASE, SDLK_AC_REFRESH, SDLK_SLASH, SDLK_KP_PERIOD, SDLK_DOLLAR, SDLK_STOP, SDLK_APP2, KMOD_LCTRL, SDLK_KP_MINUS, SDLK_INSERT, SDLK_BRIGHTNESSDOWN, SDLK_KP_RIGHTPAREN, SDLK_LSHIFT, SDLK_KP_C, SDLK_KP_8, SDLK_CAPSLOCK, SDLK_RETURN, SDLK_KP_POWER, SDLK_b, SDLK_KP_EXCLAM, SDLK_m, SDLK_END, SDLK_F18, SDLK_6, SDLK_LESS, SDLK_THOUSANDSSEPARATOR, SDLK_F8, KMOD_CAPS, SDLK_F13, SDLK_HASH, SDLK_KP_BACKSPACE, and, SDLK_LCTRL, SDLK_AUDIOPLAY, SDLK_VOLUMEUP, SDLK_CLEARAGAIN, SDLK_SYSREQ, SDLK_SLEEP, SDLK_KP_6, SDLK_KP_CLEAR, SDLK_MAIL, SDLK_5, SDLK_PLUS, SDLK_EXSEL, SDLK_EJECT, SDLK_QUESTION, SDLK_UNKNOWN, SDLK_0, SDLK_EQUALS, KMOD_GUI, SDLK_LGUI, SDLK_SPACE, SDLK_AUDIONEXT, SDLK_KP_DBLVERTICALBAR, SDLK_LEFTPAREN, Keymod, SDLK_AUDIOSTOP, SDLK_RIGHTBRACKET, SDLK_AMPERSAND, SDLK_f, SDLK_HELP, SDLK_OUT, SDLK_q, SDLK_BACKQUOTE, KMOD_MODE, SDLK_AC_BOOKMARKS, SDLK_KP_CLEARENTRY, SDLK_2, SDLK_WWW, SDLK_PASTE, SDLK_SEPARATOR, SDLK_UP, SDLK_KP_PLUSMINUS, KMOD_SHIFT, SDLK_c, SDLK_KP_AMPERSAND, SDLK_QUOTE, SDLK_KP_MEMMULTIPLY, SDLK_RGUI, SDLK_KP_9, SDLK_F21, SDLK_a, SDLK_DOWN, SDLK_GREATER, SDLK_KP_GREATER, SDLK_EXECUTE, LogPriority, LogCategory, LogOutputFunction, MESSAGEBOX_WARNING, MessageBoxButtonData, MessageBoxData, MessageBoxButtonFlags, MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, or, MessageBoxColorType, MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT, MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT, MessageBoxColorScheme, MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, MessageBoxColor, +, MESSAGEBOX_ERROR, MessageBoxFlags, MESSAGEBOX_INFORMATION, BUTTON_X2, MouseWheelDirection, BUTTON_LEFT, button_mask, BUTTON_X1MASK, BUTTON_RMASK, BUTTON_X2MASK, BUTTON_MMASK, BUTTON_X1, BUTTON_RIGHT, BUTTON_LMASK, SystemCursor, NUM_SYSTEM_CURSORS, BUTTON_MIDDLE, CursorPtr, ALPHA_TRANSPARENT, Palette, PackedLayout, ArrayOrder, PIXELFORMAT_RGB555, PIXELFORMAT_BGR888, ALPHA_OPAQUE, Color, PackedOrder, PIXELFORMAT_RGBA32, BitmapOrder, PIXELFORMAT_RGB444, PIXELFORMAT_BGR555, PIXELFORMAT_ARGB32, PIXELFORMAT_BGR444, PixelType, PIXELFORMAT_RGB888, PixelFormat, PIXELFORMAT_BGRA32, PixelFormatEnum, PIXELFORMAT_ABGR32, FPoint, Point, FRect, point_in_rect, init, Rect, rect_empty, contains, RendererFlags, or, ScaleMode, RENDERER_ACCELERATED, RENDERER_TARGETTEXTURE, RendererInfo, and, TextureAccess, Renderer, RendererFlip, +=, Vertex, RENDERER_PRESENTVSYNC, TextureModulate, RENDERER_SOFTWARE, Texture, or, w, pixels32, SurfaceFlags, DONTFREE, pixels16, SIMD_ALIGNED, format, mustlock, YuvConversionMode, ==, PREALLOC, pixels, RLEACCEL, SWSURFACE, SurfacePtr, pitch, h, TimerCallback, ticks_passed, TimerID, MOUSE_TOUCHID, TouchID, FingerID, Finger, TOUCH_MOUSEID, TouchDeviceType, WindowEventID, WINDOW_METAL, ==, GLContextResetNotification, WINDOW_HIDDEN, and, +=, HitTestResult, WINDOW_INPUT_FOCUS, WINDOW_VULKAN, Window, WINDOW_SKIP_TASKBAR, WINDOW_OPENGL, WINDOW_ALWAYS_ON_TOP, windowpos_isundefined, WINDOW_ALLOW_HIGHDPI, WINDOW_INPUT_GRABBED, WINDOW_RESIZABLE, ==, WINDOW_FULLSCREEN, WINDOW_BORDERLESS, WINDOW_MAXIMIZED, WindowFlags, WINDOW_MOUSE_GRABBED, WINDOW_MINIMIZED, GLcontextReleaseFlag, WINDOW_SHOWN, WINDOW_FULLSCREEN_DESKTOP, DisplayOrientation, WINDOW_TOOLTIP, windowpos_undefined_display, GLprofile, WINDOWPOS_CENTERED, WINDOW_MOUSE_CAPTURE, or, HitTest, WINDOW_KEYBOARD_GRABBED, WINDOWPOS_UNDEFINED, windowpos_iscentered, WINDOW_MOUSE_FOCUS, WINDOW_POPUP_MENU, DisplayMode, FlashOperation, WINDOW_FOREIGN, WINDOW_UTILITY, GLattr, DisplayEventID, windowpos_centered_display, GLcontextFlag