arsa
2.7
|
#include "SDL_config.h"
#include <stddef.h>
#include <stdarg.h>
#include <stdint.h>
#include "begin_code.h"
#include "close_code.h"
Go to the source code of this file.
Macros | |
#define | SDL_arraysize(array) (sizeof(array)/sizeof(array[0])) |
#define | SDL_TABLESIZE(table) SDL_arraysize(table) |
#define | SDL_STRINGIFY_ARG(arg) #arg |
#define | SDL_FOURCC(A, B, C, D) |
#define | SDL_PRIs64 "lld" |
#define | SDL_PRIu64 "llu" |
#define | SDL_PRIx64 "llx" |
#define | SDL_PRIX64 "llX" |
#define | SDL_IN_BYTECAP(x) |
#define | SDL_INOUT_Z_CAP(x) |
#define | SDL_OUT_Z_CAP(x) |
#define | SDL_OUT_CAP(x) |
#define | SDL_OUT_BYTECAP(x) |
#define | SDL_OUT_Z_BYTECAP(x) |
#define | SDL_PRINTF_FORMAT_STRING |
#define | SDL_SCANF_FORMAT_STRING |
#define | SDL_PRINTF_VARARG_FUNC(fmtargnumber) |
#define | SDL_SCANF_VARARG_FUNC(fmtargnumber) |
#define | SDL_COMPILE_TIME_ASSERT(name, x) typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1] |
#define | SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count)) |
#define | SDL_stack_free(data) SDL_free(data) |
#define | SDL_min(x, y) (((x) < (y)) ? (x) : (y)) |
#define | SDL_max(x, y) (((x) > (y)) ? (x) : (y)) |
#define | SDL_zero(x) SDL_memset(&(x), 0, sizeof((x))) |
#define | SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x))) |
#define | SDL_zeroa(x) SDL_memset((x), 0, sizeof((x))) |
#define | M_PI 3.14159265358979323846264338327950288 |
#define | SDL_ICONV_ERROR (size_t)-1 |
#define | SDL_ICONV_E2BIG (size_t)-2 |
#define | SDL_ICONV_EILSEQ (size_t)-3 |
#define | SDL_ICONV_EINVAL (size_t)-4 |
#define | SDL_iconv_utf8_locale(S) SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1) |
#define | SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) |
#define | SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) |
Cast operators | |
Use proper C++ casts when compiled as C++ to be compatible with the option -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above). | |
#define | SDL_reinterpret_cast(type, expression) ((type)(expression)) |
#define | SDL_static_cast(type, expression) ((type)(expression)) |
#define | SDL_const_cast(type, expression) ((type)(expression)) |
Typedefs | |
typedef void *(SDLCALL * | SDL_malloc_func) (size_t size) |
typedef void *(SDLCALL * | SDL_calloc_func) (size_t nmemb, size_t size) |
typedef void *(SDLCALL * | SDL_realloc_func) (void *mem, size_t size) |
typedef void(SDLCALL * | SDL_free_func) (void *mem) |
typedef struct _SDL_iconv_t * | SDL_iconv_t |
Basic data types | |
#define | SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */ |
A signed 8-bit integer type. More... | |
#define | SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */ |
#define | SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */ |
An unsigned 8-bit integer type. More... | |
#define | SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */ |
#define | SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */ |
A signed 16-bit integer type. More... | |
#define | SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */ |
#define | SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */ |
An unsigned 16-bit integer type. More... | |
#define | SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */ |
#define | SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */ |
A signed 32-bit integer type. More... | |
#define | SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */ |
#define | SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */ |
An unsigned 32-bit integer type. More... | |
#define | SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */ |
#define | SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */ |
A signed 64-bit integer type. More... | |
#define | SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */ |
#define | SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */ |
An unsigned 64-bit integer type. More... | |
#define | SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */ |
enum | SDL_bool { SDL_FALSE = 0, SDL_TRUE = 1 } |
typedef int8_t | Sint8 |
typedef uint8_t | Uint8 |
typedef int16_t | Sint16 |
typedef uint16_t | Uint16 |
typedef int32_t | Sint32 |
typedef uint32_t | Uint32 |
typedef int64_t | Sint64 |
typedef uint64_t | Uint64 |
This is a general header that includes C language support.
Definition in file SDL_stdinc.h.
#define M_PI 3.14159265358979323846264338327950288 |
pi
Definition at line 502 of file SDL_stdinc.h.
The number of elements in an array.
Definition at line 115 of file SDL_stdinc.h.
#define SDL_COMPILE_TIME_ASSERT | ( | name, | |
x | |||
) | typedef int SDL_compile_time_assert_ ## name[(x) * 2 - 1] |
Definition at line 312 of file SDL_stdinc.h.
Definition at line 139 of file SDL_stdinc.h.
#define SDL_FOURCC | ( | A, | |
B, | |||
C, | |||
D | |||
) |
Definition at line 144 of file SDL_stdinc.h.
#define SDL_ICONV_E2BIG (size_t)-2 |
Definition at line 545 of file SDL_stdinc.h.
#define SDL_ICONV_EILSEQ (size_t)-3 |
Definition at line 546 of file SDL_stdinc.h.
#define SDL_ICONV_EINVAL (size_t)-4 |
Definition at line 547 of file SDL_stdinc.h.
#define SDL_ICONV_ERROR (size_t)-1 |
Definition at line 544 of file SDL_stdinc.h.
#define SDL_iconv_utf8_locale | ( | S | ) | SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1) |
Definition at line 565 of file SDL_stdinc.h.
#define SDL_iconv_utf8_ucs2 | ( | S | ) | (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) |
Definition at line 566 of file SDL_stdinc.h.
#define SDL_iconv_utf8_ucs4 | ( | S | ) | (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1) |
Definition at line 567 of file SDL_stdinc.h.
#define SDL_IN_BYTECAP | ( | x | ) |
Definition at line 294 of file SDL_stdinc.h.
#define SDL_INOUT_Z_CAP | ( | x | ) |
Definition at line 295 of file SDL_stdinc.h.
#define SDL_MAX_SINT16 ((Sint16)0x7FFF) /* 32767 */ |
A signed 16-bit integer type.
Definition at line 183 of file SDL_stdinc.h.
#define SDL_MAX_SINT32 ((Sint32)0x7FFFFFFF) /* 2147483647 */ |
A signed 32-bit integer type.
Definition at line 195 of file SDL_stdinc.h.
#define SDL_MAX_SINT64 ((Sint64)0x7FFFFFFFFFFFFFFFll) /* 9223372036854775807 */ |
A signed 64-bit integer type.
Definition at line 208 of file SDL_stdinc.h.
#define SDL_MAX_SINT8 ((Sint8)0x7F) /* 127 */ |
A signed 8-bit integer type.
Definition at line 171 of file SDL_stdinc.h.
#define SDL_MAX_UINT16 ((Uint16)0xFFFF) /* 65535 */ |
An unsigned 16-bit integer type.
Definition at line 189 of file SDL_stdinc.h.
#define SDL_MAX_UINT32 ((Uint32)0xFFFFFFFFu) /* 4294967295 */ |
An unsigned 32-bit integer type.
Definition at line 201 of file SDL_stdinc.h.
#define SDL_MAX_UINT64 ((Uint64)0xFFFFFFFFFFFFFFFFull) /* 18446744073709551615 */ |
An unsigned 64-bit integer type.
Definition at line 214 of file SDL_stdinc.h.
#define SDL_MAX_UINT8 ((Uint8)0xFF) /* 255 */ |
An unsigned 8-bit integer type.
Definition at line 177 of file SDL_stdinc.h.
#define SDL_MIN_SINT16 ((Sint16)(~0x7FFF)) /* -32768 */ |
Definition at line 184 of file SDL_stdinc.h.
#define SDL_MIN_SINT32 ((Sint32)(~0x7FFFFFFF)) /* -2147483648 */ |
Definition at line 196 of file SDL_stdinc.h.
#define SDL_MIN_SINT64 ((Sint64)(~0x7FFFFFFFFFFFFFFFll)) /* -9223372036854775808 */ |
Definition at line 209 of file SDL_stdinc.h.
#define SDL_MIN_SINT8 ((Sint8)(~0x7F)) /* -128 */ |
Definition at line 172 of file SDL_stdinc.h.
#define SDL_MIN_UINT16 ((Uint16)0x0000) /* 0 */ |
Definition at line 190 of file SDL_stdinc.h.
#define SDL_MIN_UINT32 ((Uint32)0x00000000) /* 0 */ |
Definition at line 202 of file SDL_stdinc.h.
#define SDL_MIN_UINT64 ((Uint64)(0x0000000000000000ull)) /* 0 */ |
Definition at line 215 of file SDL_stdinc.h.
#define SDL_MIN_UINT8 ((Uint8)0x00) /* 0 */ |
Definition at line 178 of file SDL_stdinc.h.
#define SDL_OUT_BYTECAP | ( | x | ) |
Definition at line 298 of file SDL_stdinc.h.
#define SDL_OUT_CAP | ( | x | ) |
Definition at line 297 of file SDL_stdinc.h.
#define SDL_OUT_Z_BYTECAP | ( | x | ) |
Definition at line 299 of file SDL_stdinc.h.
#define SDL_OUT_Z_CAP | ( | x | ) |
Definition at line 296 of file SDL_stdinc.h.
#define SDL_PRINTF_FORMAT_STRING |
Definition at line 300 of file SDL_stdinc.h.
#define SDL_PRINTF_VARARG_FUNC | ( | fmtargnumber | ) |
Definition at line 307 of file SDL_stdinc.h.
#define SDL_PRIs64 "lld" |
Definition at line 231 of file SDL_stdinc.h.
#define SDL_PRIu64 "llu" |
Definition at line 242 of file SDL_stdinc.h.
#define SDL_PRIx64 "llx" |
Definition at line 253 of file SDL_stdinc.h.
#define SDL_PRIX64 "llX" |
Definition at line 264 of file SDL_stdinc.h.
Definition at line 137 of file SDL_stdinc.h.
#define SDL_SCANF_FORMAT_STRING |
Definition at line 301 of file SDL_stdinc.h.
#define SDL_SCANF_VARARG_FUNC | ( | fmtargnumber | ) |
Definition at line 308 of file SDL_stdinc.h.
Definition at line 357 of file SDL_stdinc.h.
Definition at line 358 of file SDL_stdinc.h.
Definition at line 138 of file SDL_stdinc.h.
#define SDL_STRINGIFY_ARG | ( | arg | ) | #arg |
Macro useful for building other macros with strings in them
e.g. #define LOG_ERROR(X) OutputDebugString(SDL_STRINGIFY_ARG(FUNCTION) ": " X "\n")
Definition at line 123 of file SDL_stdinc.h.
#define SDL_TABLESIZE | ( | table | ) | SDL_arraysize(table) |
Definition at line 116 of file SDL_stdinc.h.
#define SDL_zero | ( | x | ) | SDL_memset(&(x), 0, sizeof((x))) |
Definition at line 416 of file SDL_stdinc.h.
#define SDL_zeroa | ( | x | ) | SDL_memset((x), 0, sizeof((x))) |
Definition at line 418 of file SDL_stdinc.h.
#define SDL_zerop | ( | x | ) | SDL_memset((x), 0, sizeof(*(x))) |
Definition at line 417 of file SDL_stdinc.h.
Definition at line 367 of file SDL_stdinc.h.
Definition at line 369 of file SDL_stdinc.h.
typedef struct _SDL_iconv_t* SDL_iconv_t |
Definition at line 550 of file SDL_stdinc.h.
Definition at line 368 of file SDL_stdinc.h.
Definition at line 185 of file SDL_stdinc.h.
Definition at line 197 of file SDL_stdinc.h.
Definition at line 210 of file SDL_stdinc.h.
Definition at line 173 of file SDL_stdinc.h.
Definition at line 191 of file SDL_stdinc.h.
Definition at line 203 of file SDL_stdinc.h.
Definition at line 216 of file SDL_stdinc.h.
Definition at line 179 of file SDL_stdinc.h.
enum SDL_bool |
Enumerator | |
---|---|
SDL_FALSE | |
SDL_TRUE |
Definition at line 161 of file SDL_stdinc.h.
DECLSPEC void SDLCALL 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.
Get the number of outstanding (unfreed) allocations.
DECLSPEC size_t SDLCALL SDL_iconv | ( | SDL_iconv_t | cd, |
const char ** | inbuf, | ||
size_t * | inbytesleft, | ||
char ** | outbuf, | ||
size_t * | outbytesleft | ||
) |
DECLSPEC int SDLCALL SDL_iconv_close | ( | SDL_iconv_t | cd | ) |
DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open | ( | const char * | tocode, |
const char * | fromcode | ||
) |
DECLSPEC char* SDLCALL SDL_iconv_string | ( | const char * | tocode, |
const char * | fromcode, | ||
const char * | inbuf, | ||
size_t | inbytesleft | ||
) |
This function converts a string between encodings in one pass, returning a string that must be freed with SDL_free() or NULL on error.
DECLSPEC void* SDLCALL SDL_memcpy | ( | SDL_OUT_BYTECAP(len) void * | dst, |
SDL_IN_BYTECAP(len) const void * | src, | ||
size_t | len | ||
) |
SDL_FORCE_INLINE void* SDL_memcpy4 | ( | SDL_OUT_BYTECAP(dwords *4) void * | dst, |
SDL_IN_BYTECAP(dwords *4) const void * | src, | ||
size_t | dwords | ||
) |
Definition at line 597 of file SDL_stdinc.h.
DECLSPEC void* SDLCALL SDL_memmove | ( | SDL_OUT_BYTECAP(len) void * | dst, |
SDL_IN_BYTECAP(len) const void * | src, | ||
size_t | len | ||
) |
SDL_FORCE_INLINE void SDL_memset4 | ( | void * | dst, |
Uint32 | val, | ||
size_t | dwords | ||
) |
Definition at line 421 of file SDL_stdinc.h.
DECLSPEC void SDLCALL SDL_qsort | ( | void * | base, |
size_t | nmemb, | ||
size_t | size, | ||
int(*)(const void *, const void *) | compare | ||
) |
DECLSPEC int SDLCALL 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.
DECLSPEC int SDLCALL SDL_snprintf | ( | SDL_OUT_Z_CAP(maxlen) char * | text, |
size_t | maxlen, | ||
SDL_PRINTF_FORMAT_STRING const char * | fmt, | ||
... | |||
) |
DECLSPEC int SDLCALL SDL_sscanf | ( | const char * | text, |
SDL_SCANF_FORMAT_STRING const char * | fmt, | ||
... | |||
) |
DECLSPEC size_t SDLCALL SDL_strlcat | ( | SDL_INOUT_Z_CAP(maxlen) char * | dst, |
const char * | src, | ||
size_t | maxlen | ||
) |
DECLSPEC size_t SDLCALL SDL_strlcpy | ( | SDL_OUT_Z_CAP(maxlen) char * | dst, |
const char * | src, | ||
size_t | maxlen | ||
) |
DECLSPEC size_t SDLCALL SDL_utf8strlcpy | ( | SDL_OUT_Z_CAP(dst_bytes) char * | dst, |
const char * | src, | ||
size_t | dst_bytes | ||
) |
DECLSPEC int SDLCALL SDL_vsnprintf | ( | SDL_OUT_Z_CAP(maxlen) char * | text, |
size_t | maxlen, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
DECLSPEC size_t SDLCALL SDL_wcslcat | ( | SDL_INOUT_Z_CAP(maxlen) wchar_t * | dst, |
const wchar_t * | src, | ||
size_t | maxlen | ||
) |
DECLSPEC size_t SDLCALL SDL_wcslcpy | ( | SDL_OUT_Z_CAP(maxlen) wchar_t * | dst, |
const wchar_t * | src, | ||
size_t | maxlen | ||
) |