sdl3/sdl_stdinc
library
Functions
-
sdlAbs(int x)
→ int
stdinc
-
Compute the absolute value of
x.
-
sdlAcos(double x)
→ double
stdinc
-
Compute the arc cosine of
x.
-
sdlAcosf(double x)
→ double
stdinc
-
Compute the arc cosine of
x.
-
sdlAlignedAlloc(int alignment, int size)
→ Pointer<Void>
stdinc
-
Allocate memory aligned to a specific alignment.
-
sdlAlignedAllocZero(int alignment, int size)
→ Pointer<Void>
stdinc
-
Allocate zero-initialized memory aligned to a specific alignment.
-
sdlAlignedFree(Pointer<Void> mem)
→ void
stdinc
-
Free memory allocated by SDL_aligned_alloc().
-
sdlAsin(double x)
→ double
stdinc
-
Compute the arc sine of
x.
-
sdlAsinf(double x)
→ double
stdinc
-
Compute the arc sine of
x.
-
sdlAsprintf(Pointer<Pointer<Int8>> strp, String? fmt)
→ int
stdinc
-
This works exactly like asprintf() but doesn't require access to a C
runtime.
-
sdlAtan(double x)
→ double
stdinc
-
Compute the arc tangent of
x.
-
sdlAtan2(double y, double x)
→ double
stdinc
-
Compute the arc tangent of
y / x, using the signs of x and y to adjust
the result's quadrant.
-
sdlAtan2f(double y, double x)
→ double
stdinc
-
Compute the arc tangent of
y / x, using the signs of x and y to adjust
the result's quadrant.
-
sdlAtanf(double x)
→ double
stdinc
-
Compute the arc tangent of
x.
-
sdlAtof(String? str)
→ double
stdinc
-
Parse a
double from a string.
-
sdlAtoi(String? str)
→ int
stdinc
-
Parse an
int from a string.
-
sdlBsearch(Pointer<Void> key, Pointer<Void> base, int nmemb, int size, Pointer<NativeFunction<SdlCompareCallback>> compare)
→ Pointer<Void>
stdinc
-
Perform a binary search on a previously sorted array.
-
sdlBsearchR(Pointer<Void> key, Pointer<Void> base, int nmemb, int size, Pointer<NativeFunction<SdlCompareCallbackR>> compare, Pointer<Void> userdata)
→ Pointer<Void>
stdinc
-
Perform a binary search on a previously sorted array, passing a userdata
pointer to the compare function.
-
sdlCeil(double x)
→ double
stdinc
-
Compute the ceiling of
x.
-
sdlCeilf(double x)
→ double
stdinc
-
Compute the ceiling of
x.
-
sdlCopysign(double x, double y)
→ double
stdinc
-
Copy the sign of one floating-point value to another.
-
sdlCopysignf(double x, double y)
→ double
stdinc
-
Copy the sign of one floating-point value to another.
-
sdlCos(double x)
→ double
stdinc
-
Compute the cosine of
x.
-
sdlCosf(double x)
→ double
stdinc
-
Compute the cosine of
x.
-
sdlCrc16(int crc, Pointer<Void> data, int len)
→ int
stdinc
-
Calculate a CRC-16 value.
-
sdlCrc32(int crc, Pointer<Void> data, int len)
→ int
stdinc
-
Calculate a CRC-32 value.
-
sdlCreateEnvironment(bool populated)
→ Pointer<SdlEnvironment>
stdinc
-
Create a set of environment variables.
-
sdlDestroyEnvironment(Pointer<SdlEnvironment> env)
→ void
stdinc
-
Destroy a set of environment variables.
-
sdlExp(double x)
→ double
stdinc
-
Compute the exponential of
x.
-
sdlExpf(double x)
→ double
stdinc
-
Compute the exponential of
x.
-
sdlFabs(double x)
→ double
stdinc
-
Compute the absolute value of
x
-
sdlFabsf(double x)
→ double
stdinc
-
Compute the absolute value of
x
-
sdlFloor(double x)
→ double
stdinc
-
Compute the floor of
x.
-
sdlFloorf(double x)
→ double
stdinc
-
Compute the floor of
x.
-
sdlFmod(double x, double y)
→ double
stdinc
-
Return the floating-point remainder of
x / y
-
sdlFmodf(double x, double y)
→ double
stdinc
-
Return the floating-point remainder of
x / y
-
sdlFree(Pointer<Void> mem)
→ void
stdinc
-
Free allocated memory.
-
sdlGetenv(String? name)
→ String?
stdinc
-
Get the value of a variable in the environment.
-
sdlGetEnvironment()
→ Pointer<SdlEnvironment>
stdinc
-
Get the process environment.
-
sdlGetEnvironmentVariable(Pointer<SdlEnvironment> env, String? name)
→ String?
stdinc
-
Get the value of a variable in the environment.
-
sdlGetEnvironmentVariables(Pointer<SdlEnvironment> env)
→ Pointer<Pointer<Int8>>
stdinc
-
Get all variables in the environment.
-
sdlGetenvUnsafe(String? name)
→ String?
stdinc
-
Get the value of a variable in the environment.
-
sdlGetMemoryFunctions(Pointer<Pointer<NativeFunction<SdlMallocFunc>>> mallocFunc, Pointer<Pointer<NativeFunction<SdlCallocFunc>>> callocFunc, Pointer<Pointer<NativeFunction<SdlReallocFunc>>> reallocFunc, Pointer<Pointer<NativeFunction<SdlFreeFunc>>> freeFunc)
→ void
stdinc
-
Get the current set of SDL memory functions.
-
sdlGetNumAllocations()
→ int
stdinc
-
Get the number of outstanding (unfreed) allocations.
-
sdlGetOriginalMemoryFunctions(Pointer<Pointer<NativeFunction<SdlMallocFunc>>> mallocFunc, Pointer<Pointer<NativeFunction<SdlCallocFunc>>> callocFunc, Pointer<Pointer<NativeFunction<SdlReallocFunc>>> reallocFunc, Pointer<Pointer<NativeFunction<SdlFreeFunc>>> freeFunc)
→ void
stdinc
-
Get the original set of SDL memory functions.
-
sdlIconv(Pointer<SdlIconvT> cd, Pointer<Pointer<Int8>> inbuf, Pointer<Size> inbytesleft, Pointer<Pointer<Int8>> outbuf, Pointer<Size> outbytesleft)
→ int
stdinc
-
This function converts text between encodings, reading from and writing to
a buffer.
-
sdlIconvClose(Pointer<SdlIconvT> cd)
→ int
stdinc
-
This function frees a context used for character set conversion.
-
sdlIconvOpen(String? tocode, String? fromcode)
→ Pointer<SdlIconvT>
stdinc
-
This function allocates a context for the specified character set
conversion.
-
sdlIconvString(String? tocode, String? fromcode, String? inbuf, int inbytesleft)
→ Pointer<Int8>
stdinc
-
Helper function to convert a string's encoding in one call.
-
sdlIsalnum(int x)
→ int
stdinc
-
Query if a character is alphabetic (a letter) or a number.
-
sdlIsalpha(int x)
→ int
stdinc
-
Query if a character is alphabetic (a letter).
-
sdlIsblank(int x)
→ int
stdinc
-
Report if a character is blank (a space or tab).
-
sdlIscntrl(int x)
→ int
stdinc
-
Report if a character is a control character.
-
sdlIsdigit(int x)
→ int
stdinc
-
Report if a character is a numeric digit.
-
sdlIsgraph(int x)
→ int
stdinc
-
Report if a character is any "printable" except space.
-
sdlIsinf(double x)
→ int
stdinc
-
Return whether the value is infinity.
-
sdlIsinff(double x)
→ int
stdinc
-
Return whether the value is infinity.
-
sdlIslower(int x)
→ int
stdinc
-
Report if a character is lower case.
-
sdlIsnan(double x)
→ int
stdinc
-
Return whether the value is NaN.
-
sdlIsnanf(double x)
→ int
stdinc
-
Return whether the value is NaN.
-
sdlIsprint(int x)
→ int
stdinc
-
Report if a character is "printable".
-
sdlIspunct(int x)
→ int
stdinc
-
Report if a character is a punctuation mark.
-
sdlIsspace(int x)
→ int
stdinc
-
Report if a character is whitespace.
-
sdlIsupper(int x)
→ int
stdinc
-
Report if a character is upper case.
-
sdlIsxdigit(int x)
→ int
stdinc
-
Report if a character is a hexadecimal digit.
-
sdlItoa(int value, Pointer<Int8> str, int radix)
→ Pointer<Int8>
stdinc
-
Convert an integer into a string.
-
sdlLltoa(int value, Pointer<Int8> str, int radix)
→ Pointer<Int8>
stdinc
-
Convert a long long integer into a string.
-
sdlLog10(double x)
→ double
stdinc
-
Compute the base-10 logarithm of
x.
-
sdlLog10f(double x)
→ double
stdinc
-
Compute the base-10 logarithm of
x.
-
sdlLogf(double x)
→ double
stdinc
-
Compute the natural logarithm of
x.
-
sdlLround(double x)
→ int
stdinc
-
Round
x to the nearest integer representable as a long
-
sdlLroundf(double x)
→ int
stdinc
-
Round
x to the nearest integer representable as a long
-
sdlLtoa(int value, Pointer<Int8> str, int radix)
→ Pointer<Int8>
stdinc
-
Convert a long integer into a string.
-
sdlMalloc(int size)
→ Pointer<Void>
stdinc
-
Allocate uninitialized memory.
-
sdlMemcmp(Pointer<Void> s1, Pointer<Void> s2, int len)
→ int
stdinc
-
Compare two buffers of memory.
-
sdlMemcpy(Pointer<Void> dst, Pointer<Void> src, int len)
→ Pointer<Void>
stdinc
-
Copy non-overlapping memory.
-
sdlMemmove(Pointer<Void> dst, Pointer<Void> src, int len)
→ Pointer<Void>
stdinc
-
Copy memory ranges that might overlap.
-
sdlMemset(Pointer<Void> dst, int c, int len)
→ Pointer<Void>
stdinc
-
Initialize all bytes of buffer of memory to a specific value.
-
sdlMemset4(Pointer<Void> dst, int val, int dwords)
→ Pointer<Void>
stdinc
-
Initialize all 32-bit words of buffer of memory to a specific value.
-
sdlModf(double x, Pointer<Double> y)
→ double
stdinc
-
Split
x into integer and fractional parts
-
sdlModff(double x, Pointer<Float> y)
→ double
stdinc
-
Split
x into integer and fractional parts
-
sdlMurmur332(Pointer<Void> data, int len, int seed)
→ int
stdinc
-
Calculate a 32-bit MurmurHash3 value for a block of data.
-
sdlPow(double x, double y)
→ double
stdinc
-
Raise
x to the power y
-
sdlPowf(double x, double y)
→ double
stdinc
-
Raise
x to the power y
-
sdlQsort(Pointer<Void> base, int nmemb, int size, Pointer<NativeFunction<SdlCompareCallback>> compare)
→ void
stdinc
-
Sort an array.
-
sdlQsortR(Pointer<Void> base, int nmemb, int size, Pointer<NativeFunction<SdlCompareCallbackR>> compare, Pointer<Void> userdata)
→ void
stdinc
-
Sort an array, passing a userdata pointer to the compare function.
-
sdlRand(int n)
→ int
stdinc
-
Generate a pseudo-random number less than n for positive n
-
sdlRandBits()
→ int
stdinc
-
Generate 32 pseudo-random bits.
-
sdlRandBitsR(Pointer<Uint64> state)
→ int
stdinc
-
Generate 32 pseudo-random bits.
-
sdlRandf()
→ double
stdinc
-
Generate a uniform pseudo-random floating point number less than 1.0
-
sdlRandfR(Pointer<Uint64> state)
→ double
stdinc
-
Generate a uniform pseudo-random floating point number less than 1.0
-
sdlRandR(Pointer<Uint64> state, int n)
→ int
stdinc
-
Generate a pseudo-random number less than n for positive n
-
sdlRound(double x)
→ double
stdinc
-
Round
x to the nearest integer.
-
sdlRoundf(double x)
→ double
stdinc
-
Round
x to the nearest integer.
-
sdlScalbn(double x, int n)
→ double
stdinc
-
Scale
x by an integer power of two.
-
sdlScalbnf(double x, int n)
→ double
stdinc
-
Scale
x by an integer power of two.
-
sdlSetEnvironmentVariable(Pointer<SdlEnvironment> env, String? name, String? value, bool overwrite)
→ bool
stdinc
-
Set the value of a variable in the environment.
-
sdlSetenvUnsafe(String? name, String? value, int overwrite)
→ int
stdinc
-
Set the value of a variable in the environment.
-
sdlSetMemoryFunctions(Pointer<NativeFunction<SdlMallocFunc>> mallocFunc, Pointer<NativeFunction<SdlCallocFunc>> callocFunc, Pointer<NativeFunction<SdlReallocFunc>> reallocFunc, Pointer<NativeFunction<SdlFreeFunc>> freeFunc)
→ bool
stdinc
-
Replace SDL's memory allocation functions with a custom set.
-
sdlSin(double x)
→ double
stdinc
-
Compute the sine of
x.
-
sdlSinf(double x)
→ double
stdinc
-
Compute the sine of
x.
-
sdlSnprintf(Pointer<Int8> text, int maxlen, String? fmt)
→ int
stdinc
-
This works exactly like snprintf() but doesn't require access to a C
runtime.
-
sdlSqrt(double x)
→ double
stdinc
-
Compute the square root of
x.
-
sdlSqrtf(double x)
→ double
stdinc
-
Compute the square root of
x.
-
sdlSrand(int seed)
→ void
stdinc
-
Seeds the pseudo-random number generator.
-
sdlSscanf(String? text, String? fmt)
→ int
stdinc
-
This works exactly like sscanf() but doesn't require access to a C runtime.
-
sdlStepBackUtf8(String? start, Pointer<Pointer<Int8>> pstr)
→ int
stdinc
-
Decode a UTF-8 string in reverse, one Unicode codepoint at a time.
-
sdlStepUtf8(Pointer<Pointer<Int8>> pstr, Pointer<Size> pslen)
→ int
stdinc
-
Decode a UTF-8 string, one Unicode codepoint at a time.
-
sdlStrcasecmp(String? str1, String? str2)
→ int
stdinc
-
Compare two null-terminated UTF-8 strings, case-insensitively.
-
sdlStrcasestr(String? haystack, String? needle)
→ Pointer<Int8>
stdinc
-
Search a UTF-8 string for the first instance of a specific substring,
case-insensitively.
-
sdlStrchr(String? str, int c)
→ Pointer<Int8>
stdinc
-
Search a string for the first instance of a specific byte.
-
sdlStrcmp(String? str1, String? str2)
→ int
stdinc
-
Compare two null-terminated UTF-8 strings.
-
sdlStrdup(String? str)
→ Pointer<Int8>
stdinc
-
Allocate a copy of a string.
-
sdlStrlcat(Pointer<Int8> dst, String? src, int maxlen)
→ int
stdinc
-
Concatenate strings.
-
sdlStrlcpy(Pointer<Int8> dst, String? src, int maxlen)
→ int
stdinc
-
Copy a string.
-
sdlStrlen(String? str)
→ int
stdinc
-
This works exactly like strlen() but doesn't require access to a C runtime.
-
sdlStrlwr(Pointer<Int8> str)
→ Pointer<Int8>
stdinc
-
Convert a string to lowercase.
-
sdlStrncasecmp(String? str1, String? str2, int maxlen)
→ int
stdinc
-
Compare two UTF-8 strings, case-insensitively, up to a number of bytes.
-
sdlStrncmp(String? str1, String? str2, int maxlen)
→ int
stdinc
-
Compare two UTF-8 strings up to a number of bytes.
-
sdlStrndup(String? str, int maxlen)
→ Pointer<Int8>
stdinc
-
Allocate a copy of a string, up to n characters.
-
sdlStrnlen(String? str, int maxlen)
→ int
stdinc
-
This works exactly like strnlen() but doesn't require access to a C
runtime.
-
sdlStrnstr(String? haystack, String? needle, int maxlen)
→ Pointer<Int8>
stdinc
-
Search a string, up to n bytes, for the first instance of a specific
substring.
-
sdlStrpbrk(String? str, String? breakset)
→ Pointer<Int8>
stdinc
-
Searches a string for the first occurrence of any character contained in a
breakset, and returns a pointer from the string to that character.
-
sdlStrrchr(String? str, int c)
→ Pointer<Int8>
stdinc
-
Search a string for the last instance of a specific byte.
-
sdlStrrev(Pointer<Int8> str)
→ Pointer<Int8>
stdinc
-
Reverse a string's contents.
-
sdlStrstr(String? haystack, String? needle)
→ Pointer<Int8>
stdinc
-
Search a string for the first instance of a specific substring.
-
sdlStrtod(String? str, Pointer<Pointer<Int8>> endp)
→ double
stdinc
-
Parse a
double from a string.
-
sdlStrtokR(Pointer<Int8> str, String? delim, Pointer<Pointer<Int8>> saveptr)
→ Pointer<Int8>
stdinc
-
This works exactly like strtok_r() but doesn't require access to a C
runtime.
-
sdlStrtol(String? str, Pointer<Pointer<Int8>> endp, int base)
→ int
stdinc
-
Parse a
long from a string.
-
sdlStrtoll(String? str, Pointer<Pointer<Int8>> endp, int base)
→ int
stdinc
-
Parse a
long long from a string.
-
sdlStrtoul(String? str, Pointer<Pointer<Int8>> endp, int base)
→ int
stdinc
-
Parse an
unsigned long from a string.
-
sdlStrtoull(String? str, Pointer<Pointer<Int8>> endp, int base)
→ int
stdinc
-
Parse an
unsigned long long from a string.
-
sdlStrupr(Pointer<Int8> str)
→ Pointer<Int8>
stdinc
-
Convert a string to uppercase.
-
sdlSwprintf(Pointer<WChar> text, int maxlen, Pointer<WChar> fmt)
→ int
stdinc
-
This works exactly like swprintf() but doesn't require access to a C
runtime.
-
sdlTan(double x)
→ double
stdinc
-
Compute the tangent of
x.
-
sdlTanf(double x)
→ double
stdinc
-
Compute the tangent of
x.
-
sdlTolower(int x)
→ int
stdinc
-
Convert low-ASCII English letters to lowercase.
-
sdlToupper(int x)
→ int
stdinc
-
Convert low-ASCII English letters to uppercase.
-
sdlTrunc(double x)
→ double
stdinc
-
Truncate
x to an integer.
-
sdlTruncf(double x)
→ double
stdinc
-
Truncate
x to an integer.
-
sdlUcs4ToUtf8(int codepoint, Pointer<Int8> dst)
→ Pointer<Int8>
stdinc
-
Convert a single Unicode codepoint to UTF-8.
-
sdlUitoa(int value, Pointer<Int8> str, int radix)
→ Pointer<Int8>
stdinc
-
Convert an unsigned integer into a string.
-
sdlUlltoa(int value, Pointer<Int8> str, int radix)
→ Pointer<Int8>
stdinc
-
Convert an unsigned long long integer into a string.
-
sdlUltoa(int value, Pointer<Int8> str, int radix)
→ Pointer<Int8>
stdinc
-
Convert an unsigned long integer into a string.
-
sdlUnsetEnvironmentVariable(Pointer<SdlEnvironment> env, String? name)
→ bool
stdinc
-
Clear a variable from the environment.
-
sdlUnsetenvUnsafe(String? name)
→ int
stdinc
-
Clear a variable from the environment.
-
sdlUtf8strlcpy(Pointer<Int8> dst, String? src, int dstBytes)
→ int
stdinc
-
Copy an UTF-8 string.
-
sdlUtf8strlen(String? str)
→ int
stdinc
-
Count the number of codepoints in a UTF-8 string.
-
sdlUtf8strnlen(String? str, int bytes)
→ int
stdinc
-
Count the number of codepoints in a UTF-8 string, up to n bytes.
-
sdlVasprintf(Pointer<Pointer<Int8>> strp, String? fmt)
→ int
stdinc
-
This works exactly like vasprintf() but doesn't require access to a C
runtime.
-
sdlVsnprintf(Pointer<Int8> text, int maxlen, String? fmt)
→ int
stdinc
-
This works exactly like vsnprintf() but doesn't require access to a C
runtime.
-
sdlVsscanf(String? text, String? fmt)
→ int
stdinc
-
This works exactly like vsscanf() but doesn't require access to a C
runtime.
-
sdlVswprintf(Pointer<WChar> text, int maxlen, Pointer<WChar> fmt)
→ int
stdinc
-
This works exactly like vswprintf() but doesn't require access to a C
runtime.
-
sdlWcscasecmp(Pointer<WChar> str1, Pointer<WChar> str2)
→ int
stdinc
-
Compare two null-terminated wide strings, case-insensitively.
-
sdlWcscmp(Pointer<WChar> str1, Pointer<WChar> str2)
→ int
stdinc
-
Compare two null-terminated wide strings.
-
sdlWcsdup(Pointer<WChar> wstr)
→ Pointer<WChar>
stdinc
-
Allocate a copy of a wide string.
-
sdlWcslcat(Pointer<WChar> dst, Pointer<WChar> src, int maxlen)
→ int
stdinc
-
Concatenate wide strings.
-
sdlWcslcpy(Pointer<WChar> dst, Pointer<WChar> src, int maxlen)
→ int
stdinc
-
Copy a wide string.
-
sdlWcslen(Pointer<WChar> wstr)
→ int
stdinc
-
This works exactly like wcslen() but doesn't require access to a C runtime.
-
sdlWcsncasecmp(Pointer<WChar> str1, Pointer<WChar> str2, int maxlen)
→ int
stdinc
-
Compare two wide strings, case-insensitively, up to a number of wchar_t.
-
sdlWcsncmp(Pointer<WChar> str1, Pointer<WChar> str2, int maxlen)
→ int
stdinc
-
Compare two wide strings up to a number of wchar_t values.
-
sdlWcsnlen(Pointer<WChar> wstr, int maxlen)
→ int
stdinc
-
This works exactly like wcsnlen() but doesn't require access to a C
runtime.
-
sdlWcsnstr(Pointer<WChar> haystack, Pointer<WChar> needle, int maxlen)
→ Pointer<WChar>
stdinc
-
Search a wide string, up to n wide chars, for the first instance of a
specific substring.
-
sdlWcsstr(Pointer<WChar> haystack, Pointer<WChar> needle)
→ Pointer<WChar>
stdinc
-
Search a wide string for the first instance of a specific substring.
-
sdlWcstol(Pointer<WChar> str, Pointer<Pointer<WChar>> endp, int base)
→ int
stdinc
-
Parse a
long from a wide string.
-
sdlWcstoll(Pointer<WChar> str, Pointer<Pointer<WChar>> endp, int base)
→ int
stdinc
-
Parse a
long long from a wide string.
-
sdlWcstoul(Pointer<WChar> str, Pointer<Pointer<WChar>> endp, int base)
→ int
stdinc
-
Parse an
unsigned long from a wide string.
-
sdlWcstoull(Pointer<WChar> str, Pointer<Pointer<WChar>> endp, int base)
→ int
stdinc
-
Parse an
unsigned long long from a wide string.
-
sdlxGetEnvironmentVariables(Pointer<SdlEnvironment> env)
→ List<String>
stdinc
-
Get all variables in the environment.