sdl.stdc

Aliases for base types declared in the SDL headers.

Members

Aliases

SDL_CompareCallback
alias SDL_CompareCallback = int function(const(void)* a, const(void)* b)

A callback used with SDL sorting and binary search functions.

SDL_CompareCallback_r
alias SDL_CompareCallback_r = int function(void* userdata, const(void)* a, const(void)* b)

A callback used with SDL sorting and binary search functions.

SDL_FunctionPointer
alias SDL_FunctionPointer = void function()

A generic function pointer.

SDL_Time
alias SDL_Time = Sint64

SDL times are signed, 64-bit integers representing nanoseconds since the Unix epoch (Jan 1, 1970).

SDL_calloc_func
alias SDL_calloc_func = void* function(size_t nmemb, size_t size)

A callback used to implement SDL_calloc().

SDL_free_func
alias SDL_free_func = void function(void* mem)

A callback used to implement SDL_free().

SDL_malloc_func
alias SDL_malloc_func = void* function(size_t size)

A callback used to implement SDL_malloc().

SDL_realloc_func
alias SDL_realloc_func = void* function(void* mem, size_t size)

A callback used to implement SDL_realloc().

Sint16
alias Sint16 = short

16-bit signed integer

Sint32
alias Sint32 = int

32-bit signed integer

Sint64
alias Sint64 = long

64-bit signed integer

Sint8
alias Sint8 = byte

8-bit signed integer

Uint16
alias Uint16 = ushort

16-bit unsigned integer

Uint32
alias Uint32 = uint

32-bit unsigned integer

Uint64
alias Uint64 = ulong

64-bit unsigned integer

Uint8
alias Uint8 = ubyte

8-bit unsigned integer

Functions

SDL_CreateEnvironment
SDL_Environment* SDL_CreateEnvironment(bool populated)

Create a set of environment variables

SDL_DestroyEnvironment
void SDL_DestroyEnvironment(SDL_Environment* env)

Destroy a set of environment variables.

SDL_GetEnvironment
SDL_Environment* SDL_GetEnvironment()

Get the process environment.

SDL_GetEnvironmentVariable
const(char)* SDL_GetEnvironmentVariable(SDL_Environment* env, const(char)* name)

Get the value of a variable in the environment.

SDL_GetEnvironmentVariables
char** SDL_GetEnvironmentVariables(SDL_Environment* env)

Get all variables in the environment.

SDL_GetMemoryFunctions
void SDL_GetMemoryFunctions(SDL_malloc_func* malloc_func, SDL_calloc_func* calloc_func, SDL_realloc_func* realloc_func, SDL_free_func* free_func)

Get the current set of SDL memory functions.

SDL_GetNumAllocations
int SDL_GetNumAllocations()

Get the number of outstanding (unfreed) allocations.

SDL_GetOriginalMemoryFunctions
void SDL_GetOriginalMemoryFunctions(SDL_malloc_func* malloc_func, SDL_calloc_func* calloc_func, SDL_realloc_func* realloc_func, SDL_free_func* free_func)

Get the original set of SDL memory functions.

SDL_SetEnvironmentVariable
bool SDL_SetEnvironmentVariable(SDL_Environment* env, const(char)* name, const(char)* value, bool overwrite)

Set the value of a variable in the environment.

SDL_SetMemoryFunctions
bool SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, SDL_calloc_func calloc_func, SDL_realloc_func realloc_func, SDL_free_func free_func)

Replace SDL's memory allocation functions with a custom set.

SDL_UnsetEnvironmentVariable
bool SDL_UnsetEnvironmentVariable(SDL_Environment* env, const(char)* name)

Clear a variable from the environment.

SDL_abs
int SDL_abs(int x)

Compute the absolute value of x.

SDL_aligned_alloc
void* SDL_aligned_alloc(size_t alignment, size_t size)

Allocate memory aligned to a specific alignment.

SDL_aligned_free
void SDL_aligned_free(void* mem)

Free memory allocated by SDL_aligned_alloc().

SDL_bsearch
void* SDL_bsearch(const(void)* key, const(void)* base, size_t nmemb, size_t size, SDL_CompareCallback compare)

Perform a binary search on a previously sorted array.

SDL_bsearch_r
void* SDL_bsearch_r(const(void)* key, const(void)* base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void* userdata)

Perform a binary search on a previously sorted array, passing a userdata pointer to the compare function.

SDL_calloc
void* SDL_calloc(size_t nmemb, size_t size)

Allocate a zero-initialized array.

SDL_crc16
Uint16 SDL_crc16(Uint16 crc, const(void)* data, size_t len)

Calculate a CRC-16 value.

SDL_crc32
Uint32 SDL_crc32(Uint32 crc, const(void)* data, size_t len)

Calculate a CRC-32 value.

SDL_free
void SDL_free(void* mem)

Free allocated memory.

SDL_getenv
const(char)* SDL_getenv(const(char)* name)

Get the value of a variable in the environment.

SDL_getenv_unsafe
const(char)* SDL_getenv_unsafe(const(char)* name)

Get the value of a variable in the environment.

SDL_isalnum
int SDL_isalnum(int x)

Query if a character is alphabetic (a letter) or a number.

SDL_isalpha
int SDL_isalpha(int x)

Query if a character is alphabetic (a letter).

SDL_isblank
int SDL_isblank(int x)

Report if a character is blank (a space or tab).

SDL_iscntrl
int SDL_iscntrl(int x)

Report if a character is a control character.

SDL_isdigit
int SDL_isdigit(int x)

Report if a character is a numeric digit.

SDL_isgraph
int SDL_isgraph(int x)

Report if a character is any "printable" except space.

SDL_islower
int SDL_islower(int x)

Report if a character is lower case.

SDL_isprint
int SDL_isprint(int x)

Report if a character is "printable".

SDL_ispunct
int SDL_ispunct(int x)

Report if a character is a punctuation mark.

SDL_isspace
int SDL_isspace(int x)

Report if a character is whitespace.

SDL_isupper
int SDL_isupper(int x)

Report if a character is upper case.

SDL_isxdigit
int SDL_isxdigit(int x)

Report if a character is a hexadecimal digit.

SDL_malloc
void* SDL_malloc(size_t size)

Allocate uninitialized memory.

SDL_memcpy
void* SDL_memcpy(void* dst, const(void)* src, size_t len)

Copy non-overlapping memory.

SDL_murmur3_32
Uint32 SDL_murmur3_32(const(void)* data, size_t len, Uint32 seed)

Calculate a 32-bit MurmurHash3 value for a block of data.

SDL_qsort
void SDL_qsort(void* base, size_t nmemb, size_t size, SDL_CompareCallback compare)

Sort an array.

SDL_qsort_r
void SDL_qsort_r(void* base, size_t nmemb, size_t size, SDL_CompareCallback_r compare, void* userdata)

Sort an array, passing a userdata pointer to the compare function.

SDL_realloc
void* SDL_realloc(void* mem, size_t size)

Change the size of allocated memory.

SDL_setenv_unsafe
int SDL_setenv_unsafe(const(char)* name, const(char)* value, int overwrite)

Set the value of a variable in the environment.

SDL_tolower
int SDL_tolower(int x)

Convert low-ASCII English letters to lowercase.

SDL_toupper
int SDL_toupper(int x)

Convert low-ASCII English letters to uppercase.

SDL_unsetenv_unsafe
int SDL_unsetenv_unsafe(const(char)* name)

Clear a variable from the environment.

Structs

SDL_Environment
struct SDL_Environment

A thread-safe set of environment variables

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen