1#[derive(PartialEq, Copy, Clone, Hash, Debug, Default)]
4#[repr(C)]
5pub struct __BindgenComplex<T> {
6 pub re: T,
7 pub im: T,
8}
9pub const SDL_PLATFORM_LINUX: u32 = 1;
10pub const SDL_PLATFORM_UNIX: u32 = 1;
11pub const _STRING_H: u32 = 1;
12pub const _FEATURES_H: u32 = 1;
13pub const _DEFAULT_SOURCE: u32 = 1;
14pub const __GLIBC_USE_ISOC2Y: u32 = 0;
15pub const __GLIBC_USE_ISOC23: u32 = 0;
16pub const __USE_ISOC11: u32 = 1;
17pub const __USE_ISOC99: u32 = 1;
18pub const __USE_ISOC95: u32 = 1;
19pub const __USE_POSIX_IMPLICITLY: u32 = 1;
20pub const _POSIX_SOURCE: u32 = 1;
21pub const _POSIX_C_SOURCE: u32 = 202405;
22pub const __USE_POSIX: u32 = 1;
23pub const __USE_POSIX2: u32 = 1;
24pub const __USE_POSIX199309: u32 = 1;
25pub const __USE_POSIX199506: u32 = 1;
26pub const __USE_XOPEN2K: u32 = 1;
27pub const __USE_XOPEN2K8: u32 = 1;
28pub const _ATFILE_SOURCE: u32 = 1;
29pub const __USE_XOPEN2K24: u32 = 1;
30pub const __WORDSIZE: u32 = 64;
31pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
32pub const __SYSCALL_WORDSIZE: u32 = 64;
33pub const __TIMESIZE: u32 = 64;
34pub const __USE_TIME_BITS64: u32 = 1;
35pub const __USE_MISC: u32 = 1;
36pub const __USE_ATFILE: u32 = 1;
37pub const __USE_FORTIFY_LEVEL: u32 = 0;
38pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
39pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
40pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
41pub const _STDC_PREDEF_H: u32 = 1;
42pub const __STDC_IEC_559__: u32 = 1;
43pub const __STDC_IEC_60559_BFP__: u32 = 201404;
44pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
45pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
46pub const __STDC_ISO_10646__: u32 = 201706;
47pub const __GNU_LIBRARY__: u32 = 6;
48pub const __GLIBC__: u32 = 2;
49pub const __GLIBC_MINOR__: u32 = 43;
50pub const _SYS_CDEFS_H: u32 = 1;
51pub const __glibc_c99_flexarr_available: u32 = 1;
52pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
53pub const __HAVE_GENERIC_SELECTION: u32 = 1;
54pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
55pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
56pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
57pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
58pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
59pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
60pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
61pub const _BITS_TYPES_LOCALE_T_H: u32 = 1;
62pub const _BITS_TYPES___LOCALE_T_H: u32 = 1;
63pub const _STRINGS_H: u32 = 1;
64pub const _WCHAR_H: u32 = 1;
65pub const __HAVE_FLOAT128: u32 = 1;
66pub const __HAVE_DISTINCT_FLOAT128: u32 = 1;
67pub const __HAVE_FLOAT64X: u32 = 1;
68pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
69pub const __HAVE_FLOAT16: u32 = 0;
70pub const __HAVE_FLOAT32: u32 = 1;
71pub const __HAVE_FLOAT64: u32 = 1;
72pub const __HAVE_FLOAT32X: u32 = 1;
73pub const __HAVE_FLOAT128X: u32 = 0;
74pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
75pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
76pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
77pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
78pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
79pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
80pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
81pub const _BITS_WCHAR_H: u32 = 1;
82pub const __wint_t_defined: u32 = 1;
83pub const _WINT_T: u32 = 1;
84pub const __mbstate_t_defined: u32 = 1;
85pub const ____mbstate_t_defined: u32 = 1;
86pub const ____FILE_defined: u32 = 1;
87pub const __FILE_defined: u32 = 1;
88pub const WEOF: u32 = 4294967295;
89pub const _STDINT_H: u32 = 1;
90pub const _BITS_TYPES_H: u32 = 1;
91pub const _BITS_TYPESIZES_H: u32 = 1;
92pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
93pub const __INO_T_MATCHES_INO64_T: u32 = 1;
94pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
95pub const __STATFS_MATCHES_STATFS64: u32 = 1;
96pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
97pub const __FD_SETSIZE: u32 = 1024;
98pub const _BITS_TIME64_H: u32 = 1;
99pub const _BITS_STDINT_INTN_H: u32 = 1;
100pub const _BITS_STDINT_UINTN_H: u32 = 1;
101pub const _BITS_STDINT_LEAST_H: u32 = 1;
102pub const INT8_MIN: i32 = -128;
103pub const INT16_MIN: i32 = -32768;
104pub const INT32_MIN: i32 = -2147483648;
105pub const INT8_MAX: u32 = 127;
106pub const INT16_MAX: u32 = 32767;
107pub const INT32_MAX: u32 = 2147483647;
108pub const UINT8_MAX: u32 = 255;
109pub const UINT16_MAX: u32 = 65535;
110pub const UINT32_MAX: u32 = 4294967295;
111pub const INT_LEAST8_MIN: i32 = -128;
112pub const INT_LEAST16_MIN: i32 = -32768;
113pub const INT_LEAST32_MIN: i32 = -2147483648;
114pub const INT_LEAST8_MAX: u32 = 127;
115pub const INT_LEAST16_MAX: u32 = 32767;
116pub const INT_LEAST32_MAX: u32 = 2147483647;
117pub const UINT_LEAST8_MAX: u32 = 255;
118pub const UINT_LEAST16_MAX: u32 = 65535;
119pub const UINT_LEAST32_MAX: u32 = 4294967295;
120pub const INT_FAST8_MIN: i32 = -128;
121pub const INT_FAST16_MIN: i64 = -9223372036854775808;
122pub const INT_FAST32_MIN: i64 = -9223372036854775808;
123pub const INT_FAST8_MAX: u32 = 127;
124pub const INT_FAST16_MAX: u64 = 9223372036854775807;
125pub const INT_FAST32_MAX: u64 = 9223372036854775807;
126pub const UINT_FAST8_MAX: u32 = 255;
127pub const UINT_FAST16_MAX: i32 = -1;
128pub const UINT_FAST32_MAX: i32 = -1;
129pub const INTPTR_MIN: i64 = -9223372036854775808;
130pub const INTPTR_MAX: u64 = 9223372036854775807;
131pub const UINTPTR_MAX: i32 = -1;
132pub const PTRDIFF_MIN: i64 = -9223372036854775808;
133pub const PTRDIFF_MAX: u64 = 9223372036854775807;
134pub const SIG_ATOMIC_MIN: i32 = -2147483648;
135pub const SIG_ATOMIC_MAX: u32 = 2147483647;
136pub const SIZE_MAX: i32 = -1;
137pub const WINT_MIN: u32 = 0;
138pub const WINT_MAX: u32 = 4294967295;
139pub const _INTTYPES_H: u32 = 1;
140pub const ____gwchar_t_defined: u32 = 1;
141pub const __PRI64_PREFIX: &[u8; 2] = b"l\0";
142pub const __PRIPTR_PREFIX: &[u8; 2] = b"l\0";
143pub const PRId8: &[u8; 4] = b"hhd\0";
144pub const PRId16: &[u8; 3] = b"hd\0";
145pub const PRId32: &[u8; 2] = b"d\0";
146pub const PRId64: &[u8; 3] = b"ld\0";
147pub const PRIdLEAST8: &[u8; 4] = b"hhd\0";
148pub const PRIdLEAST16: &[u8; 3] = b"hd\0";
149pub const PRIdLEAST32: &[u8; 2] = b"d\0";
150pub const PRIdLEAST64: &[u8; 3] = b"ld\0";
151pub const PRIdFAST8: &[u8; 4] = b"hhd\0";
152pub const PRIdFAST16: &[u8; 3] = b"ld\0";
153pub const PRIdFAST32: &[u8; 3] = b"ld\0";
154pub const PRIdFAST64: &[u8; 3] = b"ld\0";
155pub const PRIi8: &[u8; 4] = b"hhi\0";
156pub const PRIi16: &[u8; 3] = b"hi\0";
157pub const PRIi32: &[u8; 2] = b"i\0";
158pub const PRIi64: &[u8; 3] = b"li\0";
159pub const PRIiLEAST8: &[u8; 4] = b"hhi\0";
160pub const PRIiLEAST16: &[u8; 3] = b"hi\0";
161pub const PRIiLEAST32: &[u8; 2] = b"i\0";
162pub const PRIiLEAST64: &[u8; 3] = b"li\0";
163pub const PRIiFAST8: &[u8; 4] = b"hhi\0";
164pub const PRIiFAST16: &[u8; 3] = b"li\0";
165pub const PRIiFAST32: &[u8; 3] = b"li\0";
166pub const PRIiFAST64: &[u8; 3] = b"li\0";
167pub const PRIo8: &[u8; 4] = b"hho\0";
168pub const PRIo16: &[u8; 3] = b"ho\0";
169pub const PRIo32: &[u8; 2] = b"o\0";
170pub const PRIo64: &[u8; 3] = b"lo\0";
171pub const PRIoLEAST8: &[u8; 4] = b"hho\0";
172pub const PRIoLEAST16: &[u8; 3] = b"ho\0";
173pub const PRIoLEAST32: &[u8; 2] = b"o\0";
174pub const PRIoLEAST64: &[u8; 3] = b"lo\0";
175pub const PRIoFAST8: &[u8; 4] = b"hho\0";
176pub const PRIoFAST16: &[u8; 3] = b"lo\0";
177pub const PRIoFAST32: &[u8; 3] = b"lo\0";
178pub const PRIoFAST64: &[u8; 3] = b"lo\0";
179pub const PRIu8: &[u8; 4] = b"hhu\0";
180pub const PRIu16: &[u8; 3] = b"hu\0";
181pub const PRIu32: &[u8; 2] = b"u\0";
182pub const PRIu64: &[u8; 3] = b"lu\0";
183pub const PRIuLEAST8: &[u8; 4] = b"hhu\0";
184pub const PRIuLEAST16: &[u8; 3] = b"hu\0";
185pub const PRIuLEAST32: &[u8; 2] = b"u\0";
186pub const PRIuLEAST64: &[u8; 3] = b"lu\0";
187pub const PRIuFAST8: &[u8; 4] = b"hhu\0";
188pub const PRIuFAST16: &[u8; 3] = b"lu\0";
189pub const PRIuFAST32: &[u8; 3] = b"lu\0";
190pub const PRIuFAST64: &[u8; 3] = b"lu\0";
191pub const PRIx8: &[u8; 4] = b"hhx\0";
192pub const PRIx16: &[u8; 3] = b"hx\0";
193pub const PRIx32: &[u8; 2] = b"x\0";
194pub const PRIx64: &[u8; 3] = b"lx\0";
195pub const PRIxLEAST8: &[u8; 4] = b"hhx\0";
196pub const PRIxLEAST16: &[u8; 3] = b"hx\0";
197pub const PRIxLEAST32: &[u8; 2] = b"x\0";
198pub const PRIxLEAST64: &[u8; 3] = b"lx\0";
199pub const PRIxFAST8: &[u8; 4] = b"hhx\0";
200pub const PRIxFAST16: &[u8; 3] = b"lx\0";
201pub const PRIxFAST32: &[u8; 3] = b"lx\0";
202pub const PRIxFAST64: &[u8; 3] = b"lx\0";
203pub const PRIX8: &[u8; 4] = b"hhX\0";
204pub const PRIX16: &[u8; 3] = b"hX\0";
205pub const PRIX32: &[u8; 2] = b"X\0";
206pub const PRIX64: &[u8; 3] = b"lX\0";
207pub const PRIXLEAST8: &[u8; 4] = b"hhX\0";
208pub const PRIXLEAST16: &[u8; 3] = b"hX\0";
209pub const PRIXLEAST32: &[u8; 2] = b"X\0";
210pub const PRIXLEAST64: &[u8; 3] = b"lX\0";
211pub const PRIXFAST8: &[u8; 4] = b"hhX\0";
212pub const PRIXFAST16: &[u8; 3] = b"lX\0";
213pub const PRIXFAST32: &[u8; 3] = b"lX\0";
214pub const PRIXFAST64: &[u8; 3] = b"lX\0";
215pub const PRIdMAX: &[u8; 3] = b"ld\0";
216pub const PRIiMAX: &[u8; 3] = b"li\0";
217pub const PRIoMAX: &[u8; 3] = b"lo\0";
218pub const PRIuMAX: &[u8; 3] = b"lu\0";
219pub const PRIxMAX: &[u8; 3] = b"lx\0";
220pub const PRIXMAX: &[u8; 3] = b"lX\0";
221pub const PRIdPTR: &[u8; 3] = b"ld\0";
222pub const PRIiPTR: &[u8; 3] = b"li\0";
223pub const PRIoPTR: &[u8; 3] = b"lo\0";
224pub const PRIuPTR: &[u8; 3] = b"lu\0";
225pub const PRIxPTR: &[u8; 3] = b"lx\0";
226pub const PRIXPTR: &[u8; 3] = b"lX\0";
227pub const SCNd8: &[u8; 4] = b"hhd\0";
228pub const SCNd16: &[u8; 3] = b"hd\0";
229pub const SCNd32: &[u8; 2] = b"d\0";
230pub const SCNd64: &[u8; 3] = b"ld\0";
231pub const SCNdLEAST8: &[u8; 4] = b"hhd\0";
232pub const SCNdLEAST16: &[u8; 3] = b"hd\0";
233pub const SCNdLEAST32: &[u8; 2] = b"d\0";
234pub const SCNdLEAST64: &[u8; 3] = b"ld\0";
235pub const SCNdFAST8: &[u8; 4] = b"hhd\0";
236pub const SCNdFAST16: &[u8; 3] = b"ld\0";
237pub const SCNdFAST32: &[u8; 3] = b"ld\0";
238pub const SCNdFAST64: &[u8; 3] = b"ld\0";
239pub const SCNi8: &[u8; 4] = b"hhi\0";
240pub const SCNi16: &[u8; 3] = b"hi\0";
241pub const SCNi32: &[u8; 2] = b"i\0";
242pub const SCNi64: &[u8; 3] = b"li\0";
243pub const SCNiLEAST8: &[u8; 4] = b"hhi\0";
244pub const SCNiLEAST16: &[u8; 3] = b"hi\0";
245pub const SCNiLEAST32: &[u8; 2] = b"i\0";
246pub const SCNiLEAST64: &[u8; 3] = b"li\0";
247pub const SCNiFAST8: &[u8; 4] = b"hhi\0";
248pub const SCNiFAST16: &[u8; 3] = b"li\0";
249pub const SCNiFAST32: &[u8; 3] = b"li\0";
250pub const SCNiFAST64: &[u8; 3] = b"li\0";
251pub const SCNu8: &[u8; 4] = b"hhu\0";
252pub const SCNu16: &[u8; 3] = b"hu\0";
253pub const SCNu32: &[u8; 2] = b"u\0";
254pub const SCNu64: &[u8; 3] = b"lu\0";
255pub const SCNuLEAST8: &[u8; 4] = b"hhu\0";
256pub const SCNuLEAST16: &[u8; 3] = b"hu\0";
257pub const SCNuLEAST32: &[u8; 2] = b"u\0";
258pub const SCNuLEAST64: &[u8; 3] = b"lu\0";
259pub const SCNuFAST8: &[u8; 4] = b"hhu\0";
260pub const SCNuFAST16: &[u8; 3] = b"lu\0";
261pub const SCNuFAST32: &[u8; 3] = b"lu\0";
262pub const SCNuFAST64: &[u8; 3] = b"lu\0";
263pub const SCNo8: &[u8; 4] = b"hho\0";
264pub const SCNo16: &[u8; 3] = b"ho\0";
265pub const SCNo32: &[u8; 2] = b"o\0";
266pub const SCNo64: &[u8; 3] = b"lo\0";
267pub const SCNoLEAST8: &[u8; 4] = b"hho\0";
268pub const SCNoLEAST16: &[u8; 3] = b"ho\0";
269pub const SCNoLEAST32: &[u8; 2] = b"o\0";
270pub const SCNoLEAST64: &[u8; 3] = b"lo\0";
271pub const SCNoFAST8: &[u8; 4] = b"hho\0";
272pub const SCNoFAST16: &[u8; 3] = b"lo\0";
273pub const SCNoFAST32: &[u8; 3] = b"lo\0";
274pub const SCNoFAST64: &[u8; 3] = b"lo\0";
275pub const SCNx8: &[u8; 4] = b"hhx\0";
276pub const SCNx16: &[u8; 3] = b"hx\0";
277pub const SCNx32: &[u8; 2] = b"x\0";
278pub const SCNx64: &[u8; 3] = b"lx\0";
279pub const SCNxLEAST8: &[u8; 4] = b"hhx\0";
280pub const SCNxLEAST16: &[u8; 3] = b"hx\0";
281pub const SCNxLEAST32: &[u8; 2] = b"x\0";
282pub const SCNxLEAST64: &[u8; 3] = b"lx\0";
283pub const SCNxFAST8: &[u8; 4] = b"hhx\0";
284pub const SCNxFAST16: &[u8; 3] = b"lx\0";
285pub const SCNxFAST32: &[u8; 3] = b"lx\0";
286pub const SCNxFAST64: &[u8; 3] = b"lx\0";
287pub const SCNdMAX: &[u8; 3] = b"ld\0";
288pub const SCNiMAX: &[u8; 3] = b"li\0";
289pub const SCNoMAX: &[u8; 3] = b"lo\0";
290pub const SCNuMAX: &[u8; 3] = b"lu\0";
291pub const SCNxMAX: &[u8; 3] = b"lx\0";
292pub const SCNdPTR: &[u8; 3] = b"ld\0";
293pub const SCNiPTR: &[u8; 3] = b"li\0";
294pub const SCNoPTR: &[u8; 3] = b"lo\0";
295pub const SCNuPTR: &[u8; 3] = b"lu\0";
296pub const SCNxPTR: &[u8; 3] = b"lx\0";
297pub const __bool_true_false_are_defined: u32 = 1;
298pub const true_: u32 = 1;
299pub const false_: u32 = 0;
300pub const SDL_SIZE_MAX: i32 = -1;
301pub const SDL_PRIs64: &[u8; 3] = b"ld\0";
302pub const SDL_PRIu64: &[u8; 3] = b"lu\0";
303pub const SDL_PRIx64: &[u8; 3] = b"lx\0";
304pub const SDL_PRIX64: &[u8; 3] = b"lX\0";
305pub const SDL_PRIs32: &[u8; 2] = b"d\0";
306pub const SDL_PRIu32: &[u8; 2] = b"u\0";
307pub const SDL_PRIx32: &[u8; 2] = b"x\0";
308pub const SDL_PRIX32: &[u8; 2] = b"X\0";
309pub const SDL_PRILL_PREFIX: &[u8; 3] = b"ll\0";
310pub const SDL_PRILLd: &[u8; 4] = b"lld\0";
311pub const SDL_PRILLu: &[u8; 4] = b"llu\0";
312pub const SDL_PRILLx: &[u8; 4] = b"llx\0";
313pub const SDL_PRILLX: &[u8; 4] = b"llX\0";
314pub const SDL_INVALID_UNICODE_CODEPOINT: u32 = 65533;
315pub const SDL_PI_D: f64 = 3.141592653589793;
316pub const SDL_PI_F: f64 = 3.141592653589793;
317pub const SDL_ASSERT_LEVEL: u32 = 2;
318pub const SDL_NULL_WHILE_LOOP_CONDITION: u32 = 0;
319pub const SDL_LIL_ENDIAN: u32 = 1234;
320pub const SDL_BIG_ENDIAN: u32 = 4321;
321pub const _ENDIAN_H: u32 = 1;
322pub const _BITS_ENDIAN_H: u32 = 1;
323pub const __LITTLE_ENDIAN: u32 = 1234;
324pub const __BIG_ENDIAN: u32 = 4321;
325pub const __PDP_ENDIAN: u32 = 3412;
326pub const _BITS_ENDIANNESS_H: u32 = 1;
327pub const __BYTE_ORDER: u32 = 1234;
328pub const __FLOAT_WORD_ORDER: u32 = 1234;
329pub const LITTLE_ENDIAN: u32 = 1234;
330pub const BIG_ENDIAN: u32 = 4321;
331pub const PDP_ENDIAN: u32 = 3412;
332pub const BYTE_ORDER: u32 = 1234;
333pub const _BITS_BYTESWAP_H: u32 = 1;
334pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
335pub const SDL_BYTEORDER: u32 = 1234;
336pub const SDL_FLOATWORDORDER: u32 = 1234;
337pub const SDL_PROP_NAME_STRING: &[u8; 9] = b"SDL.name\0";
338pub const SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER: &[u8; 33] =
339 b"SDL.thread.create.entry_function\0";
340pub const SDL_PROP_THREAD_CREATE_NAME_STRING: &[u8; 23] = b"SDL.thread.create.name\0";
341pub const SDL_PROP_THREAD_CREATE_USERDATA_POINTER: &[u8; 27] = b"SDL.thread.create.userdata\0";
342pub const SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER: &[u8; 28] = b"SDL.thread.create.stacksize\0";
343pub const SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER: &[u8; 28] = b"SDL.iostream.windows.handle\0";
344pub const SDL_PROP_IOSTREAM_STDIO_FILE_POINTER: &[u8; 24] = b"SDL.iostream.stdio.file\0";
345pub const SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER: &[u8; 29] = b"SDL.iostream.file_descriptor\0";
346pub const SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER: &[u8; 28] = b"SDL.iostream.android.aasset\0";
347pub const SDL_PROP_IOSTREAM_MEMORY_POINTER: &[u8; 25] = b"SDL.iostream.memory.base\0";
348pub const SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER: &[u8; 25] = b"SDL.iostream.memory.size\0";
349pub const SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER: &[u8; 25] = b"SDL.iostream.memory.free\0";
350pub const SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER: &[u8; 28] = b"SDL.iostream.dynamic.memory\0";
351pub const SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER: &[u8; 31] =
352 b"SDL.iostream.dynamic.chunksize\0";
353pub const SDL_AUDIO_MASK_BITSIZE: u32 = 255;
354pub const SDL_AUDIO_MASK_FLOAT: u32 = 256;
355pub const SDL_AUDIO_MASK_BIG_ENDIAN: u32 = 4096;
356pub const SDL_AUDIO_MASK_SIGNED: u32 = 32768;
357pub const SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN: &[u8; 29] = b"SDL.audiostream.auto_cleanup\0";
358pub const SDL_BLENDMODE_NONE: u32 = 0;
359pub const SDL_BLENDMODE_BLEND: u32 = 1;
360pub const SDL_BLENDMODE_BLEND_PREMULTIPLIED: u32 = 16;
361pub const SDL_BLENDMODE_ADD: u32 = 2;
362pub const SDL_BLENDMODE_ADD_PREMULTIPLIED: u32 = 32;
363pub const SDL_BLENDMODE_MOD: u32 = 4;
364pub const SDL_BLENDMODE_MUL: u32 = 8;
365pub const SDL_BLENDMODE_INVALID: u32 = 2147483647;
366pub const SDL_ALPHA_OPAQUE: u32 = 255;
367pub const SDL_ALPHA_OPAQUE_FLOAT: f64 = 1.0;
368pub const SDL_ALPHA_TRANSPARENT: u32 = 0;
369pub const SDL_ALPHA_TRANSPARENT_FLOAT: f64 = 0.0;
370pub const SDL_SURFACE_PREALLOCATED: u32 = 1;
371pub const SDL_SURFACE_LOCK_NEEDED: u32 = 2;
372pub const SDL_SURFACE_LOCKED: u32 = 4;
373pub const SDL_SURFACE_SIMD_ALIGNED: u32 = 8;
374pub const SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT: &[u8; 28] = b"SDL.surface.SDR_white_point\0";
375pub const SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT: &[u8; 25] = b"SDL.surface.HDR_headroom\0";
376pub const SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING: &[u8; 20] = b"SDL.surface.tonemap\0";
377pub const SDL_PROP_SURFACE_HOTSPOT_X_NUMBER: &[u8; 22] = b"SDL.surface.hotspot.x\0";
378pub const SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER: &[u8; 22] = b"SDL.surface.hotspot.y\0";
379pub const SDL_PROP_SURFACE_ROTATION_FLOAT: &[u8; 21] = b"SDL.surface.rotation\0";
380pub const SDL_CACHELINE_SIZE: u32 = 128;
381pub const SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER: &[u8; 29] =
382 b"SDL.video.wayland.wl_display\0";
383pub const SDL_WINDOWPOS_UNDEFINED_MASK: u32 = 536805376;
384pub const SDL_WINDOWPOS_CENTERED_MASK: u32 = 805240832;
385pub const SDL_GL_CONTEXT_PROFILE_CORE: u32 = 1;
386pub const SDL_GL_CONTEXT_PROFILE_COMPATIBILITY: u32 = 2;
387pub const SDL_GL_CONTEXT_PROFILE_ES: u32 = 4;
388pub const SDL_GL_CONTEXT_DEBUG_FLAG: u32 = 1;
389pub const SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG: u32 = 2;
390pub const SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG: u32 = 4;
391pub const SDL_GL_CONTEXT_RESET_ISOLATION_FLAG: u32 = 8;
392pub const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE: u32 = 0;
393pub const SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH: u32 = 1;
394pub const SDL_GL_CONTEXT_RESET_NO_NOTIFICATION: u32 = 0;
395pub const SDL_GL_CONTEXT_RESET_LOSE_CONTEXT: u32 = 1;
396pub const SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN: &[u8; 24] = b"SDL.display.HDR_enabled\0";
397pub const SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER: &[u8; 37] =
398 b"SDL.display.KMSDRM.panel_orientation\0";
399pub const SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER: &[u8; 30] =
400 b"SDL.display.wayland.wl_output\0";
401pub const SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER: &[u8; 29] = b"SDL.display.windows.hmonitor\0";
402pub const SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN: &[u8; 32] =
403 b"SDL.window.create.always_on_top\0";
404pub const SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN: &[u8; 29] = b"SDL.window.create.borderless\0";
405pub const SDL_PROP_WINDOW_CREATE_CONSTRAIN_POPUP_BOOLEAN: &[u8; 34] =
406 b"SDL.window.create.constrain_popup\0";
407pub const SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN: &[u8; 28] = b"SDL.window.create.focusable\0";
408pub const SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN: &[u8; 44] =
409 b"SDL.window.create.external_graphics_context\0";
410pub const SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER: &[u8; 24] = b"SDL.window.create.flags\0";
411pub const SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN: &[u8; 29] = b"SDL.window.create.fullscreen\0";
412pub const SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER: &[u8; 25] = b"SDL.window.create.height\0";
413pub const SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN: &[u8; 25] = b"SDL.window.create.hidden\0";
414pub const SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN: &[u8; 37] =
415 b"SDL.window.create.high_pixel_density\0";
416pub const SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN: &[u8; 28] = b"SDL.window.create.maximized\0";
417pub const SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN: &[u8; 23] = b"SDL.window.create.menu\0";
418pub const SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN: &[u8; 24] = b"SDL.window.create.metal\0";
419pub const SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN: &[u8; 28] = b"SDL.window.create.minimized\0";
420pub const SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN: &[u8; 24] = b"SDL.window.create.modal\0";
421pub const SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN: &[u8; 32] =
422 b"SDL.window.create.mouse_grabbed\0";
423pub const SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN: &[u8; 25] = b"SDL.window.create.opengl\0";
424pub const SDL_PROP_WINDOW_CREATE_PARENT_POINTER: &[u8; 25] = b"SDL.window.create.parent\0";
425pub const SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN: &[u8; 28] = b"SDL.window.create.resizable\0";
426pub const SDL_PROP_WINDOW_CREATE_TITLE_STRING: &[u8; 24] = b"SDL.window.create.title\0";
427pub const SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN: &[u8; 30] =
428 b"SDL.window.create.transparent\0";
429pub const SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN: &[u8; 26] = b"SDL.window.create.tooltip\0";
430pub const SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN: &[u8; 26] = b"SDL.window.create.utility\0";
431pub const SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN: &[u8; 25] = b"SDL.window.create.vulkan\0";
432pub const SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER: &[u8; 24] = b"SDL.window.create.width\0";
433pub const SDL_PROP_WINDOW_CREATE_X_NUMBER: &[u8; 20] = b"SDL.window.create.x\0";
434pub const SDL_PROP_WINDOW_CREATE_Y_NUMBER: &[u8; 20] = b"SDL.window.create.y\0";
435pub const SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER: &[u8; 31] =
436 b"SDL.window.create.cocoa.window\0";
437pub const SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER: &[u8; 29] = b"SDL.window.create.cocoa.view\0";
438pub const SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER: &[u8; 36] =
439 b"SDL.window.create.uikit.windowscene\0";
440pub const SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN: &[u8; 46] =
441 b"SDL.window.create.wayland.surface_role_custom\0";
442pub const SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN: &[u8; 44] =
443 b"SDL.window.create.wayland.create_egl_window\0";
444pub const SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER: &[u8; 37] =
445 b"SDL.window.create.wayland.wl_surface\0";
446pub const SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER: &[u8; 29] = b"SDL.window.create.win32.hwnd\0";
447pub const SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER: &[u8; 42] =
448 b"SDL.window.create.win32.pixel_format_hwnd\0";
449pub const SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER: &[u8; 29] = b"SDL.window.create.x11.window\0";
450pub const SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING: &[u8; 39] =
451 b"SDL.window.create.emscripten.canvas_id\0";
452pub const SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING: &[u8; 46] =
453 b"SDL.window.create.emscripten.keyboard_element\0";
454pub const SDL_PROP_WINDOW_SHAPE_POINTER: &[u8; 17] = b"SDL.window.shape\0";
455pub const SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN: &[u8; 23] = b"SDL.window.HDR_enabled\0";
456pub const SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT: &[u8; 27] = b"SDL.window.SDR_white_level\0";
457pub const SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT: &[u8; 24] = b"SDL.window.HDR_headroom\0";
458pub const SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER: &[u8; 26] = b"SDL.window.android.window\0";
459pub const SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER: &[u8; 27] = b"SDL.window.android.surface\0";
460pub const SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER: &[u8; 24] = b"SDL.window.uikit.window\0";
461pub const SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER: &[u8; 32] =
462 b"SDL.window.uikit.metal_view_tag\0";
463pub const SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER: &[u8; 36] =
464 b"SDL.window.uikit.opengl.framebuffer\0";
465pub const SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER: &[u8; 37] =
466 b"SDL.window.uikit.opengl.renderbuffer\0";
467pub const SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER: &[u8; 44] =
468 b"SDL.window.uikit.opengl.resolve_framebuffer\0";
469pub const SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER: &[u8; 28] = b"SDL.window.kmsdrm.dev_index\0";
470pub const SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER: &[u8; 25] = b"SDL.window.kmsdrm.drm_fd\0";
471pub const SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER: &[u8; 26] = b"SDL.window.kmsdrm.gbm_dev\0";
472pub const SDL_PROP_WINDOW_COCOA_WINDOW_POINTER: &[u8; 24] = b"SDL.window.cocoa.window\0";
473pub const SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER: &[u8; 32] =
474 b"SDL.window.cocoa.metal_view_tag\0";
475pub const SDL_PROP_WINDOW_OPENVR_OVERLAY_ID_NUMBER: &[u8; 29] = b"SDL.window.openvr.overlay_id\0";
476pub const SDL_PROP_WINDOW_QNX_WINDOW_POINTER: &[u8; 22] = b"SDL.window.qnx.window\0";
477pub const SDL_PROP_WINDOW_QNX_SURFACE_POINTER: &[u8; 23] = b"SDL.window.qnx.surface\0";
478pub const SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER: &[u8; 27] = b"SDL.window.vivante.display\0";
479pub const SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER: &[u8; 26] = b"SDL.window.vivante.window\0";
480pub const SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER: &[u8; 27] = b"SDL.window.vivante.surface\0";
481pub const SDL_PROP_WINDOW_WIN32_HWND_POINTER: &[u8; 22] = b"SDL.window.win32.hwnd\0";
482pub const SDL_PROP_WINDOW_WIN32_HDC_POINTER: &[u8; 21] = b"SDL.window.win32.hdc\0";
483pub const SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER: &[u8; 26] = b"SDL.window.win32.instance\0";
484pub const SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER: &[u8; 27] = b"SDL.window.wayland.display\0";
485pub const SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER: &[u8; 27] = b"SDL.window.wayland.surface\0";
486pub const SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER: &[u8; 28] = b"SDL.window.wayland.viewport\0";
487pub const SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER: &[u8; 30] =
488 b"SDL.window.wayland.egl_window\0";
489pub const SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER: &[u8; 31] =
490 b"SDL.window.wayland.xdg_surface\0";
491pub const SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER: &[u8; 32] =
492 b"SDL.window.wayland.xdg_toplevel\0";
493pub const SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING: &[u8; 46] =
494 b"SDL.window.wayland.xdg_toplevel_export_handle\0";
495pub const SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER: &[u8; 29] = b"SDL.window.wayland.xdg_popup\0";
496pub const SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER: &[u8; 34] =
497 b"SDL.window.wayland.xdg_positioner\0";
498pub const SDL_PROP_WINDOW_X11_DISPLAY_POINTER: &[u8; 23] = b"SDL.window.x11.display\0";
499pub const SDL_PROP_WINDOW_X11_SCREEN_NUMBER: &[u8; 22] = b"SDL.window.x11.screen\0";
500pub const SDL_PROP_WINDOW_X11_WINDOW_NUMBER: &[u8; 22] = b"SDL.window.x11.window\0";
501pub const SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING: &[u8; 32] =
502 b"SDL.window.emscripten.canvas_id\0";
503pub const SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING: &[u8; 39] =
504 b"SDL.window.emscripten.keyboard_element\0";
505pub const SDL_WINDOW_SURFACE_VSYNC_DISABLED: u32 = 0;
506pub const SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE: i32 = -1;
507pub const SDL_PROP_FILE_DIALOG_FILTERS_POINTER: &[u8; 23] = b"SDL.filedialog.filters\0";
508pub const SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER: &[u8; 24] = b"SDL.filedialog.nfilters\0";
509pub const SDL_PROP_FILE_DIALOG_WINDOW_POINTER: &[u8; 22] = b"SDL.filedialog.window\0";
510pub const SDL_PROP_FILE_DIALOG_LOCATION_STRING: &[u8; 24] = b"SDL.filedialog.location\0";
511pub const SDL_PROP_FILE_DIALOG_MANY_BOOLEAN: &[u8; 20] = b"SDL.filedialog.many\0";
512pub const SDL_PROP_FILE_DIALOG_TITLE_STRING: &[u8; 21] = b"SDL.filedialog.title\0";
513pub const SDL_PROP_FILE_DIALOG_ACCEPT_STRING: &[u8; 22] = b"SDL.filedialog.accept\0";
514pub const SDL_PROP_FILE_DIALOG_CANCEL_STRING: &[u8; 22] = b"SDL.filedialog.cancel\0";
515pub const SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED: &[u8; 10] = b"suggested\0";
516pub const SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED: &[u8; 12] = b"recommended\0";
517pub const SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED: &[u8; 9] = b"required\0";
518pub const SDL_ELF_NOTE_DLOPEN_VENDOR: &[u8; 4] = b"FDO\0";
519pub const SDL_ELF_NOTE_DLOPEN_TYPE: u32 = 1081871370;
520pub const SDL_STANDARD_GRAVITY: f64 = 9.80665;
521pub const SDL_JOYSTICK_AXIS_MAX: u32 = 32767;
522pub const SDL_JOYSTICK_AXIS_MIN: i32 = -32768;
523pub const SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN: &[u8; 26] = b"SDL.joystick.cap.mono_led\0";
524pub const SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN: &[u8; 25] = b"SDL.joystick.cap.rgb_led\0";
525pub const SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN: &[u8; 28] = b"SDL.joystick.cap.player_led\0";
526pub const SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN: &[u8; 24] = b"SDL.joystick.cap.rumble\0";
527pub const SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN: &[u8; 32] =
528 b"SDL.joystick.cap.trigger_rumble\0";
529pub const SDL_HAT_CENTERED: u32 = 0;
530pub const SDL_HAT_UP: u32 = 1;
531pub const SDL_HAT_RIGHT: u32 = 2;
532pub const SDL_HAT_DOWN: u32 = 4;
533pub const SDL_HAT_LEFT: u32 = 8;
534pub const SDL_HAT_RIGHTUP: u32 = 3;
535pub const SDL_HAT_RIGHTDOWN: u32 = 6;
536pub const SDL_HAT_LEFTUP: u32 = 9;
537pub const SDL_HAT_LEFTDOWN: u32 = 12;
538pub const SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN: &[u8; 26] = b"SDL.joystick.cap.mono_led\0";
539pub const SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN: &[u8; 25] = b"SDL.joystick.cap.rgb_led\0";
540pub const SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN: &[u8; 28] = b"SDL.joystick.cap.player_led\0";
541pub const SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN: &[u8; 24] = b"SDL.joystick.cap.rumble\0";
542pub const SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN: &[u8; 32] =
543 b"SDL.joystick.cap.trigger_rumble\0";
544pub const SDLK_EXTENDED_MASK: u32 = 536870912;
545pub const SDLK_SCANCODE_MASK: u32 = 1073741824;
546pub const SDLK_UNKNOWN: u32 = 0;
547pub const SDLK_RETURN: u32 = 13;
548pub const SDLK_ESCAPE: u32 = 27;
549pub const SDLK_BACKSPACE: u32 = 8;
550pub const SDLK_TAB: u32 = 9;
551pub const SDLK_SPACE: u32 = 32;
552pub const SDLK_EXCLAIM: u32 = 33;
553pub const SDLK_DBLAPOSTROPHE: u32 = 34;
554pub const SDLK_HASH: u32 = 35;
555pub const SDLK_DOLLAR: u32 = 36;
556pub const SDLK_PERCENT: u32 = 37;
557pub const SDLK_AMPERSAND: u32 = 38;
558pub const SDLK_APOSTROPHE: u32 = 39;
559pub const SDLK_LEFTPAREN: u32 = 40;
560pub const SDLK_RIGHTPAREN: u32 = 41;
561pub const SDLK_ASTERISK: u32 = 42;
562pub const SDLK_PLUS: u32 = 43;
563pub const SDLK_COMMA: u32 = 44;
564pub const SDLK_MINUS: u32 = 45;
565pub const SDLK_PERIOD: u32 = 46;
566pub const SDLK_SLASH: u32 = 47;
567pub const SDLK_0: u32 = 48;
568pub const SDLK_1: u32 = 49;
569pub const SDLK_2: u32 = 50;
570pub const SDLK_3: u32 = 51;
571pub const SDLK_4: u32 = 52;
572pub const SDLK_5: u32 = 53;
573pub const SDLK_6: u32 = 54;
574pub const SDLK_7: u32 = 55;
575pub const SDLK_8: u32 = 56;
576pub const SDLK_9: u32 = 57;
577pub const SDLK_COLON: u32 = 58;
578pub const SDLK_SEMICOLON: u32 = 59;
579pub const SDLK_LESS: u32 = 60;
580pub const SDLK_EQUALS: u32 = 61;
581pub const SDLK_GREATER: u32 = 62;
582pub const SDLK_QUESTION: u32 = 63;
583pub const SDLK_AT: u32 = 64;
584pub const SDLK_LEFTBRACKET: u32 = 91;
585pub const SDLK_BACKSLASH: u32 = 92;
586pub const SDLK_RIGHTBRACKET: u32 = 93;
587pub const SDLK_CARET: u32 = 94;
588pub const SDLK_UNDERSCORE: u32 = 95;
589pub const SDLK_GRAVE: u32 = 96;
590pub const SDLK_A: u32 = 97;
591pub const SDLK_B: u32 = 98;
592pub const SDLK_C: u32 = 99;
593pub const SDLK_D: u32 = 100;
594pub const SDLK_E: u32 = 101;
595pub const SDLK_F: u32 = 102;
596pub const SDLK_G: u32 = 103;
597pub const SDLK_H: u32 = 104;
598pub const SDLK_I: u32 = 105;
599pub const SDLK_J: u32 = 106;
600pub const SDLK_K: u32 = 107;
601pub const SDLK_L: u32 = 108;
602pub const SDLK_M: u32 = 109;
603pub const SDLK_N: u32 = 110;
604pub const SDLK_O: u32 = 111;
605pub const SDLK_P: u32 = 112;
606pub const SDLK_Q: u32 = 113;
607pub const SDLK_R: u32 = 114;
608pub const SDLK_S: u32 = 115;
609pub const SDLK_T: u32 = 116;
610pub const SDLK_U: u32 = 117;
611pub const SDLK_V: u32 = 118;
612pub const SDLK_W: u32 = 119;
613pub const SDLK_X: u32 = 120;
614pub const SDLK_Y: u32 = 121;
615pub const SDLK_Z: u32 = 122;
616pub const SDLK_LEFTBRACE: u32 = 123;
617pub const SDLK_PIPE: u32 = 124;
618pub const SDLK_RIGHTBRACE: u32 = 125;
619pub const SDLK_TILDE: u32 = 126;
620pub const SDLK_DELETE: u32 = 127;
621pub const SDLK_PLUSMINUS: u32 = 177;
622pub const SDLK_CAPSLOCK: u32 = 1073741881;
623pub const SDLK_F1: u32 = 1073741882;
624pub const SDLK_F2: u32 = 1073741883;
625pub const SDLK_F3: u32 = 1073741884;
626pub const SDLK_F4: u32 = 1073741885;
627pub const SDLK_F5: u32 = 1073741886;
628pub const SDLK_F6: u32 = 1073741887;
629pub const SDLK_F7: u32 = 1073741888;
630pub const SDLK_F8: u32 = 1073741889;
631pub const SDLK_F9: u32 = 1073741890;
632pub const SDLK_F10: u32 = 1073741891;
633pub const SDLK_F11: u32 = 1073741892;
634pub const SDLK_F12: u32 = 1073741893;
635pub const SDLK_PRINTSCREEN: u32 = 1073741894;
636pub const SDLK_SCROLLLOCK: u32 = 1073741895;
637pub const SDLK_PAUSE: u32 = 1073741896;
638pub const SDLK_INSERT: u32 = 1073741897;
639pub const SDLK_HOME: u32 = 1073741898;
640pub const SDLK_PAGEUP: u32 = 1073741899;
641pub const SDLK_END: u32 = 1073741901;
642pub const SDLK_PAGEDOWN: u32 = 1073741902;
643pub const SDLK_RIGHT: u32 = 1073741903;
644pub const SDLK_LEFT: u32 = 1073741904;
645pub const SDLK_DOWN: u32 = 1073741905;
646pub const SDLK_UP: u32 = 1073741906;
647pub const SDLK_NUMLOCKCLEAR: u32 = 1073741907;
648pub const SDLK_KP_DIVIDE: u32 = 1073741908;
649pub const SDLK_KP_MULTIPLY: u32 = 1073741909;
650pub const SDLK_KP_MINUS: u32 = 1073741910;
651pub const SDLK_KP_PLUS: u32 = 1073741911;
652pub const SDLK_KP_ENTER: u32 = 1073741912;
653pub const SDLK_KP_1: u32 = 1073741913;
654pub const SDLK_KP_2: u32 = 1073741914;
655pub const SDLK_KP_3: u32 = 1073741915;
656pub const SDLK_KP_4: u32 = 1073741916;
657pub const SDLK_KP_5: u32 = 1073741917;
658pub const SDLK_KP_6: u32 = 1073741918;
659pub const SDLK_KP_7: u32 = 1073741919;
660pub const SDLK_KP_8: u32 = 1073741920;
661pub const SDLK_KP_9: u32 = 1073741921;
662pub const SDLK_KP_0: u32 = 1073741922;
663pub const SDLK_KP_PERIOD: u32 = 1073741923;
664pub const SDLK_APPLICATION: u32 = 1073741925;
665pub const SDLK_POWER: u32 = 1073741926;
666pub const SDLK_KP_EQUALS: u32 = 1073741927;
667pub const SDLK_F13: u32 = 1073741928;
668pub const SDLK_F14: u32 = 1073741929;
669pub const SDLK_F15: u32 = 1073741930;
670pub const SDLK_F16: u32 = 1073741931;
671pub const SDLK_F17: u32 = 1073741932;
672pub const SDLK_F18: u32 = 1073741933;
673pub const SDLK_F19: u32 = 1073741934;
674pub const SDLK_F20: u32 = 1073741935;
675pub const SDLK_F21: u32 = 1073741936;
676pub const SDLK_F22: u32 = 1073741937;
677pub const SDLK_F23: u32 = 1073741938;
678pub const SDLK_F24: u32 = 1073741939;
679pub const SDLK_EXECUTE: u32 = 1073741940;
680pub const SDLK_HELP: u32 = 1073741941;
681pub const SDLK_MENU: u32 = 1073741942;
682pub const SDLK_SELECT: u32 = 1073741943;
683pub const SDLK_STOP: u32 = 1073741944;
684pub const SDLK_AGAIN: u32 = 1073741945;
685pub const SDLK_UNDO: u32 = 1073741946;
686pub const SDLK_CUT: u32 = 1073741947;
687pub const SDLK_COPY: u32 = 1073741948;
688pub const SDLK_PASTE: u32 = 1073741949;
689pub const SDLK_FIND: u32 = 1073741950;
690pub const SDLK_MUTE: u32 = 1073741951;
691pub const SDLK_VOLUMEUP: u32 = 1073741952;
692pub const SDLK_VOLUMEDOWN: u32 = 1073741953;
693pub const SDLK_KP_COMMA: u32 = 1073741957;
694pub const SDLK_KP_EQUALSAS400: u32 = 1073741958;
695pub const SDLK_ALTERASE: u32 = 1073741977;
696pub const SDLK_SYSREQ: u32 = 1073741978;
697pub const SDLK_CANCEL: u32 = 1073741979;
698pub const SDLK_CLEAR: u32 = 1073741980;
699pub const SDLK_PRIOR: u32 = 1073741981;
700pub const SDLK_RETURN2: u32 = 1073741982;
701pub const SDLK_SEPARATOR: u32 = 1073741983;
702pub const SDLK_OUT: u32 = 1073741984;
703pub const SDLK_OPER: u32 = 1073741985;
704pub const SDLK_CLEARAGAIN: u32 = 1073741986;
705pub const SDLK_CRSEL: u32 = 1073741987;
706pub const SDLK_EXSEL: u32 = 1073741988;
707pub const SDLK_KP_00: u32 = 1073742000;
708pub const SDLK_KP_000: u32 = 1073742001;
709pub const SDLK_THOUSANDSSEPARATOR: u32 = 1073742002;
710pub const SDLK_DECIMALSEPARATOR: u32 = 1073742003;
711pub const SDLK_CURRENCYUNIT: u32 = 1073742004;
712pub const SDLK_CURRENCYSUBUNIT: u32 = 1073742005;
713pub const SDLK_KP_LEFTPAREN: u32 = 1073742006;
714pub const SDLK_KP_RIGHTPAREN: u32 = 1073742007;
715pub const SDLK_KP_LEFTBRACE: u32 = 1073742008;
716pub const SDLK_KP_RIGHTBRACE: u32 = 1073742009;
717pub const SDLK_KP_TAB: u32 = 1073742010;
718pub const SDLK_KP_BACKSPACE: u32 = 1073742011;
719pub const SDLK_KP_A: u32 = 1073742012;
720pub const SDLK_KP_B: u32 = 1073742013;
721pub const SDLK_KP_C: u32 = 1073742014;
722pub const SDLK_KP_D: u32 = 1073742015;
723pub const SDLK_KP_E: u32 = 1073742016;
724pub const SDLK_KP_F: u32 = 1073742017;
725pub const SDLK_KP_XOR: u32 = 1073742018;
726pub const SDLK_KP_POWER: u32 = 1073742019;
727pub const SDLK_KP_PERCENT: u32 = 1073742020;
728pub const SDLK_KP_LESS: u32 = 1073742021;
729pub const SDLK_KP_GREATER: u32 = 1073742022;
730pub const SDLK_KP_AMPERSAND: u32 = 1073742023;
731pub const SDLK_KP_DBLAMPERSAND: u32 = 1073742024;
732pub const SDLK_KP_VERTICALBAR: u32 = 1073742025;
733pub const SDLK_KP_DBLVERTICALBAR: u32 = 1073742026;
734pub const SDLK_KP_COLON: u32 = 1073742027;
735pub const SDLK_KP_HASH: u32 = 1073742028;
736pub const SDLK_KP_SPACE: u32 = 1073742029;
737pub const SDLK_KP_AT: u32 = 1073742030;
738pub const SDLK_KP_EXCLAM: u32 = 1073742031;
739pub const SDLK_KP_MEMSTORE: u32 = 1073742032;
740pub const SDLK_KP_MEMRECALL: u32 = 1073742033;
741pub const SDLK_KP_MEMCLEAR: u32 = 1073742034;
742pub const SDLK_KP_MEMADD: u32 = 1073742035;
743pub const SDLK_KP_MEMSUBTRACT: u32 = 1073742036;
744pub const SDLK_KP_MEMMULTIPLY: u32 = 1073742037;
745pub const SDLK_KP_MEMDIVIDE: u32 = 1073742038;
746pub const SDLK_KP_PLUSMINUS: u32 = 1073742039;
747pub const SDLK_KP_CLEAR: u32 = 1073742040;
748pub const SDLK_KP_CLEARENTRY: u32 = 1073742041;
749pub const SDLK_KP_BINARY: u32 = 1073742042;
750pub const SDLK_KP_OCTAL: u32 = 1073742043;
751pub const SDLK_KP_DECIMAL: u32 = 1073742044;
752pub const SDLK_KP_HEXADECIMAL: u32 = 1073742045;
753pub const SDLK_LCTRL: u32 = 1073742048;
754pub const SDLK_LSHIFT: u32 = 1073742049;
755pub const SDLK_LALT: u32 = 1073742050;
756pub const SDLK_LGUI: u32 = 1073742051;
757pub const SDLK_RCTRL: u32 = 1073742052;
758pub const SDLK_RSHIFT: u32 = 1073742053;
759pub const SDLK_RALT: u32 = 1073742054;
760pub const SDLK_RGUI: u32 = 1073742055;
761pub const SDLK_MODE: u32 = 1073742081;
762pub const SDLK_SLEEP: u32 = 1073742082;
763pub const SDLK_WAKE: u32 = 1073742083;
764pub const SDLK_CHANNEL_INCREMENT: u32 = 1073742084;
765pub const SDLK_CHANNEL_DECREMENT: u32 = 1073742085;
766pub const SDLK_MEDIA_PLAY: u32 = 1073742086;
767pub const SDLK_MEDIA_PAUSE: u32 = 1073742087;
768pub const SDLK_MEDIA_RECORD: u32 = 1073742088;
769pub const SDLK_MEDIA_FAST_FORWARD: u32 = 1073742089;
770pub const SDLK_MEDIA_REWIND: u32 = 1073742090;
771pub const SDLK_MEDIA_NEXT_TRACK: u32 = 1073742091;
772pub const SDLK_MEDIA_PREVIOUS_TRACK: u32 = 1073742092;
773pub const SDLK_MEDIA_STOP: u32 = 1073742093;
774pub const SDLK_MEDIA_EJECT: u32 = 1073742094;
775pub const SDLK_MEDIA_PLAY_PAUSE: u32 = 1073742095;
776pub const SDLK_MEDIA_SELECT: u32 = 1073742096;
777pub const SDLK_AC_NEW: u32 = 1073742097;
778pub const SDLK_AC_OPEN: u32 = 1073742098;
779pub const SDLK_AC_CLOSE: u32 = 1073742099;
780pub const SDLK_AC_EXIT: u32 = 1073742100;
781pub const SDLK_AC_SAVE: u32 = 1073742101;
782pub const SDLK_AC_PRINT: u32 = 1073742102;
783pub const SDLK_AC_PROPERTIES: u32 = 1073742103;
784pub const SDLK_AC_SEARCH: u32 = 1073742104;
785pub const SDLK_AC_HOME: u32 = 1073742105;
786pub const SDLK_AC_BACK: u32 = 1073742106;
787pub const SDLK_AC_FORWARD: u32 = 1073742107;
788pub const SDLK_AC_STOP: u32 = 1073742108;
789pub const SDLK_AC_REFRESH: u32 = 1073742109;
790pub const SDLK_AC_BOOKMARKS: u32 = 1073742110;
791pub const SDLK_SOFTLEFT: u32 = 1073742111;
792pub const SDLK_SOFTRIGHT: u32 = 1073742112;
793pub const SDLK_CALL: u32 = 1073742113;
794pub const SDLK_ENDCALL: u32 = 1073742114;
795pub const SDLK_LEFT_TAB: u32 = 536870913;
796pub const SDLK_LEVEL5_SHIFT: u32 = 536870914;
797pub const SDLK_MULTI_KEY_COMPOSE: u32 = 536870915;
798pub const SDLK_LMETA: u32 = 536870916;
799pub const SDLK_RMETA: u32 = 536870917;
800pub const SDLK_LHYPER: u32 = 536870918;
801pub const SDLK_RHYPER: u32 = 536870919;
802pub const SDL_KMOD_NONE: u32 = 0;
803pub const SDL_KMOD_LSHIFT: u32 = 1;
804pub const SDL_KMOD_RSHIFT: u32 = 2;
805pub const SDL_KMOD_LEVEL5: u32 = 4;
806pub const SDL_KMOD_LCTRL: u32 = 64;
807pub const SDL_KMOD_RCTRL: u32 = 128;
808pub const SDL_KMOD_LALT: u32 = 256;
809pub const SDL_KMOD_RALT: u32 = 512;
810pub const SDL_KMOD_LGUI: u32 = 1024;
811pub const SDL_KMOD_RGUI: u32 = 2048;
812pub const SDL_KMOD_NUM: u32 = 4096;
813pub const SDL_KMOD_CAPS: u32 = 8192;
814pub const SDL_KMOD_MODE: u32 = 16384;
815pub const SDL_KMOD_SCROLL: u32 = 32768;
816pub const SDL_KMOD_CTRL: u32 = 192;
817pub const SDL_KMOD_SHIFT: u32 = 3;
818pub const SDL_KMOD_ALT: u32 = 768;
819pub const SDL_KMOD_GUI: u32 = 3072;
820pub const SDL_PROP_TEXTINPUT_TYPE_NUMBER: &[u8; 19] = b"SDL.textinput.type\0";
821pub const SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER: &[u8; 29] = b"SDL.textinput.capitalization\0";
822pub const SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN: &[u8; 26] = b"SDL.textinput.autocorrect\0";
823pub const SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN: &[u8; 24] = b"SDL.textinput.multiline\0";
824pub const SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER: &[u8; 32] =
825 b"SDL.textinput.android.inputtype\0";
826pub const SDL_BUTTON_LEFT: u32 = 1;
827pub const SDL_BUTTON_MIDDLE: u32 = 2;
828pub const SDL_BUTTON_RIGHT: u32 = 3;
829pub const SDL_BUTTON_X1: u32 = 4;
830pub const SDL_BUTTON_X2: u32 = 5;
831pub const SDL_PEN_INPUT_DOWN: u32 = 1;
832pub const SDL_PEN_INPUT_BUTTON_1: u32 = 2;
833pub const SDL_PEN_INPUT_BUTTON_2: u32 = 4;
834pub const SDL_PEN_INPUT_BUTTON_3: u32 = 8;
835pub const SDL_PEN_INPUT_BUTTON_4: u32 = 16;
836pub const SDL_PEN_INPUT_BUTTON_5: u32 = 32;
837pub const SDL_PEN_INPUT_ERASER_TIP: u32 = 1073741824;
838pub const SDL_PEN_INPUT_IN_PROXIMITY: u32 = 2147483648;
839pub const SDL_GLOB_CASEINSENSITIVE: u32 = 1;
840pub const SDL_GPU_TEXTUREUSAGE_SAMPLER: u32 = 1;
841pub const SDL_GPU_TEXTUREUSAGE_COLOR_TARGET: u32 = 2;
842pub const SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET: u32 = 4;
843pub const SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ: u32 = 8;
844pub const SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ: u32 = 16;
845pub const SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE: u32 = 32;
846pub const SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE: u32 = 64;
847pub const SDL_GPU_BUFFERUSAGE_VERTEX: u32 = 1;
848pub const SDL_GPU_BUFFERUSAGE_INDEX: u32 = 2;
849pub const SDL_GPU_BUFFERUSAGE_INDIRECT: u32 = 4;
850pub const SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ: u32 = 8;
851pub const SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ: u32 = 16;
852pub const SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE: u32 = 32;
853pub const SDL_GPU_SHADERFORMAT_INVALID: u32 = 0;
854pub const SDL_GPU_SHADERFORMAT_PRIVATE: u32 = 1;
855pub const SDL_GPU_SHADERFORMAT_SPIRV: u32 = 2;
856pub const SDL_GPU_SHADERFORMAT_DXBC: u32 = 4;
857pub const SDL_GPU_SHADERFORMAT_DXIL: u32 = 8;
858pub const SDL_GPU_SHADERFORMAT_MSL: u32 = 16;
859pub const SDL_GPU_SHADERFORMAT_METALLIB: u32 = 32;
860pub const SDL_GPU_COLORCOMPONENT_R: u32 = 1;
861pub const SDL_GPU_COLORCOMPONENT_G: u32 = 2;
862pub const SDL_GPU_COLORCOMPONENT_B: u32 = 4;
863pub const SDL_GPU_COLORCOMPONENT_A: u32 = 8;
864pub const SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN: &[u8; 32] =
865 b"SDL.gpu.device.create.debugmode\0";
866pub const SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN: &[u8; 37] =
867 b"SDL.gpu.device.create.preferlowpower\0";
868pub const SDL_PROP_GPU_DEVICE_CREATE_VERBOSE_BOOLEAN: &[u8; 30] =
869 b"SDL.gpu.device.create.verbose\0";
870pub const SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING: &[u8; 27] = b"SDL.gpu.device.create.name\0";
871pub const SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN: &[u8; 44] =
872 b"SDL.gpu.device.create.feature.clip_distance\0";
873pub const SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN: &[u8; 45] =
874 b"SDL.gpu.device.create.feature.depth_clamping\0";
875pub const SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN: &[u8; 59] =
876 b"SDL.gpu.device.create.feature.indirect_draw_first_instance\0";
877pub const SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN: &[u8; 41] =
878 b"SDL.gpu.device.create.feature.anisotropy\0";
879pub const SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN: &[u8; 38] =
880 b"SDL.gpu.device.create.shaders.private\0";
881pub const SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN: &[u8; 36] =
882 b"SDL.gpu.device.create.shaders.spirv\0";
883pub const SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN: &[u8; 35] =
884 b"SDL.gpu.device.create.shaders.dxbc\0";
885pub const SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN: &[u8; 35] =
886 b"SDL.gpu.device.create.shaders.dxil\0";
887pub const SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN: &[u8; 34] =
888 b"SDL.gpu.device.create.shaders.msl\0";
889pub const SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN: &[u8; 39] =
890 b"SDL.gpu.device.create.shaders.metallib\0";
891pub const SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN: &[u8; 54] =
892 b"SDL.gpu.device.create.d3d12.allowtier1resourcebinding\0";
893pub const SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING: &[u8; 37] =
894 b"SDL.gpu.device.create.d3d12.semantic\0";
895pub const SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER: &[u8; 48] =
896 b"SDL.gpu.device.create.d3d12.agility_sdk_version\0";
897pub const SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING: &[u8; 45] =
898 b"SDL.gpu.device.create.d3d12.agility_sdk_path\0";
899pub const SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN: &[u8; 57] =
900 b"SDL.gpu.device.create.vulkan.requirehardwareacceleration\0";
901pub const SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER: &[u8; 37] =
902 b"SDL.gpu.device.create.vulkan.options\0";
903pub const SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN: &[u8; 44] =
904 b"SDL.gpu.device.create.metal.allowmacfamily1\0";
905pub const SDL_PROP_GPU_DEVICE_CREATE_XR_ENABLE_BOOLEAN: &[u8; 32] =
906 b"SDL.gpu.device.create.xr.enable\0";
907pub const SDL_PROP_GPU_DEVICE_CREATE_XR_INSTANCE_POINTER: &[u8; 38] =
908 b"SDL.gpu.device.create.xr.instance_out\0";
909pub const SDL_PROP_GPU_DEVICE_CREATE_XR_SYSTEM_ID_POINTER: &[u8; 39] =
910 b"SDL.gpu.device.create.xr.system_id_out\0";
911pub const SDL_PROP_GPU_DEVICE_CREATE_XR_VERSION_NUMBER: &[u8; 33] =
912 b"SDL.gpu.device.create.xr.version\0";
913pub const SDL_PROP_GPU_DEVICE_CREATE_XR_FORM_FACTOR_NUMBER: &[u8; 37] =
914 b"SDL.gpu.device.create.xr.form_factor\0";
915pub const SDL_PROP_GPU_DEVICE_CREATE_XR_EXTENSION_COUNT_NUMBER: &[u8; 42] =
916 b"SDL.gpu.device.create.xr.extensions.count\0";
917pub const SDL_PROP_GPU_DEVICE_CREATE_XR_EXTENSION_NAMES_POINTER: &[u8; 42] =
918 b"SDL.gpu.device.create.xr.extensions.names\0";
919pub const SDL_PROP_GPU_DEVICE_CREATE_XR_LAYER_COUNT_NUMBER: &[u8; 38] =
920 b"SDL.gpu.device.create.xr.layers.count\0";
921pub const SDL_PROP_GPU_DEVICE_CREATE_XR_LAYER_NAMES_POINTER: &[u8; 38] =
922 b"SDL.gpu.device.create.xr.layers.names\0";
923pub const SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_NAME_STRING: &[u8; 42] =
924 b"SDL.gpu.device.create.xr.application.name\0";
925pub const SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_VERSION_NUMBER: &[u8; 45] =
926 b"SDL.gpu.device.create.xr.application.version\0";
927pub const SDL_PROP_GPU_DEVICE_CREATE_XR_ENGINE_NAME_STRING: &[u8; 37] =
928 b"SDL.gpu.device.create.xr.engine.name\0";
929pub const SDL_PROP_GPU_DEVICE_CREATE_XR_ENGINE_VERSION_NUMBER: &[u8; 40] =
930 b"SDL.gpu.device.create.xr.engine.version\0";
931pub const SDL_PROP_GPU_DEVICE_NAME_STRING: &[u8; 20] = b"SDL.gpu.device.name\0";
932pub const SDL_PROP_GPU_DEVICE_DRIVER_NAME_STRING: &[u8; 27] = b"SDL.gpu.device.driver_name\0";
933pub const SDL_PROP_GPU_DEVICE_DRIVER_VERSION_STRING: &[u8; 30] = b"SDL.gpu.device.driver_version\0";
934pub const SDL_PROP_GPU_DEVICE_DRIVER_INFO_STRING: &[u8; 27] = b"SDL.gpu.device.driver_info\0";
935pub const SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING: &[u8; 36] =
936 b"SDL.gpu.computepipeline.create.name\0";
937pub const SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING: &[u8; 37] =
938 b"SDL.gpu.graphicspipeline.create.name\0";
939pub const SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING: &[u8; 28] = b"SDL.gpu.sampler.create.name\0";
940pub const SDL_PROP_GPU_SHADER_CREATE_NAME_STRING: &[u8; 27] = b"SDL.gpu.shader.create.name\0";
941pub const SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT: &[u8; 37] =
942 b"SDL.gpu.texture.create.d3d12.clear.r\0";
943pub const SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT: &[u8; 37] =
944 b"SDL.gpu.texture.create.d3d12.clear.g\0";
945pub const SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT: &[u8; 37] =
946 b"SDL.gpu.texture.create.d3d12.clear.b\0";
947pub const SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT: &[u8; 37] =
948 b"SDL.gpu.texture.create.d3d12.clear.a\0";
949pub const SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT: &[u8; 41] =
950 b"SDL.gpu.texture.create.d3d12.clear.depth\0";
951pub const SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER: &[u8; 43] =
952 b"SDL.gpu.texture.create.d3d12.clear.stencil\0";
953pub const SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING: &[u8; 28] = b"SDL.gpu.texture.create.name\0";
954pub const SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING: &[u8; 27] = b"SDL.gpu.buffer.create.name\0";
955pub const SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING: &[u8; 35] =
956 b"SDL.gpu.transferbuffer.create.name\0";
957pub const SDL_HAPTIC_INFINITY: u32 = 4294967295;
958pub const SDL_HAPTIC_CONSTANT: u32 = 1;
959pub const SDL_HAPTIC_SINE: u32 = 2;
960pub const SDL_HAPTIC_SQUARE: u32 = 4;
961pub const SDL_HAPTIC_TRIANGLE: u32 = 8;
962pub const SDL_HAPTIC_SAWTOOTHUP: u32 = 16;
963pub const SDL_HAPTIC_SAWTOOTHDOWN: u32 = 32;
964pub const SDL_HAPTIC_RAMP: u32 = 64;
965pub const SDL_HAPTIC_SPRING: u32 = 128;
966pub const SDL_HAPTIC_DAMPER: u32 = 256;
967pub const SDL_HAPTIC_INERTIA: u32 = 512;
968pub const SDL_HAPTIC_FRICTION: u32 = 1024;
969pub const SDL_HAPTIC_LEFTRIGHT: u32 = 2048;
970pub const SDL_HAPTIC_RESERVED1: u32 = 4096;
971pub const SDL_HAPTIC_RESERVED2: u32 = 8192;
972pub const SDL_HAPTIC_RESERVED3: u32 = 16384;
973pub const SDL_HAPTIC_CUSTOM: u32 = 32768;
974pub const SDL_HAPTIC_GAIN: u32 = 65536;
975pub const SDL_HAPTIC_AUTOCENTER: u32 = 131072;
976pub const SDL_HAPTIC_STATUS: u32 = 262144;
977pub const SDL_HAPTIC_PAUSE: u32 = 524288;
978pub const SDL_HAPTIC_POLAR: u32 = 0;
979pub const SDL_HAPTIC_CARTESIAN: u32 = 1;
980pub const SDL_HAPTIC_SPHERICAL: u32 = 2;
981pub const SDL_HAPTIC_STEERING_AXIS: u32 = 3;
982pub const SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER: &[u8; 32] =
983 b"SDL.hidapi.libusb.device.handle\0";
984pub const SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED: &[u8; 32] = b"SDL_ALLOW_ALT_TAB_WHILE_GRABBED\0";
985pub const SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY: &[u8; 36] =
986 b"SDL_ANDROID_ALLOW_RECREATE_ACTIVITY\0";
987pub const SDL_HINT_ANDROID_BLOCK_ON_PAUSE: &[u8; 27] = b"SDL_ANDROID_BLOCK_ON_PAUSE\0";
988pub const SDL_HINT_ANDROID_LOW_LATENCY_AUDIO: &[u8; 30] = b"SDL_ANDROID_LOW_LATENCY_AUDIO\0";
989pub const SDL_HINT_ANDROID_TRAP_BACK_BUTTON: &[u8; 29] = b"SDL_ANDROID_TRAP_BACK_BUTTON\0";
990pub const SDL_HINT_APP_ID: &[u8; 11] = b"SDL_APP_ID\0";
991pub const SDL_HINT_APP_NAME: &[u8; 13] = b"SDL_APP_NAME\0";
992pub const SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS: &[u8; 34] =
993 b"SDL_APPLE_TV_CONTROLLER_UI_EVENTS\0";
994pub const SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION: &[u8; 35] =
995 b"SDL_APPLE_TV_REMOTE_ALLOW_ROTATION\0";
996pub const SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE: &[u8; 30] = b"SDL_AUDIO_ALSA_DEFAULT_DEVICE\0";
997pub const SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE: &[u8; 39] =
998 b"SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE\0";
999pub const SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE: &[u8; 40] =
1000 b"SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE\0";
1001pub const SDL_HINT_AUDIO_CATEGORY: &[u8; 19] = b"SDL_AUDIO_CATEGORY\0";
1002pub const SDL_HINT_AUDIO_CHANNELS: &[u8; 19] = b"SDL_AUDIO_CHANNELS\0";
1003pub const SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME: &[u8; 31] = b"SDL_AUDIO_DEVICE_APP_ICON_NAME\0";
1004pub const SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES: &[u8; 31] = b"SDL_AUDIO_DEVICE_SAMPLE_FRAMES\0";
1005pub const SDL_HINT_AUDIO_DEVICE_STREAM_NAME: &[u8; 29] = b"SDL_AUDIO_DEVICE_STREAM_NAME\0";
1006pub const SDL_HINT_AUDIO_DEVICE_STREAM_ROLE: &[u8; 29] = b"SDL_AUDIO_DEVICE_STREAM_ROLE\0";
1007pub const SDL_HINT_AUDIO_DEVICE_RAW_STREAM: &[u8; 28] = b"SDL_AUDIO_DEVICE_RAW_STREAM\0";
1008pub const SDL_HINT_AUDIO_DISK_INPUT_FILE: &[u8; 26] = b"SDL_AUDIO_DISK_INPUT_FILE\0";
1009pub const SDL_HINT_AUDIO_DISK_OUTPUT_FILE: &[u8; 27] = b"SDL_AUDIO_DISK_OUTPUT_FILE\0";
1010pub const SDL_HINT_AUDIO_DISK_TIMESCALE: &[u8; 25] = b"SDL_AUDIO_DISK_TIMESCALE\0";
1011pub const SDL_HINT_AUDIO_DRIVER: &[u8; 17] = b"SDL_AUDIO_DRIVER\0";
1012pub const SDL_HINT_AUDIO_DUMMY_TIMESCALE: &[u8; 26] = b"SDL_AUDIO_DUMMY_TIMESCALE\0";
1013pub const SDL_HINT_AUDIO_FORMAT: &[u8; 17] = b"SDL_AUDIO_FORMAT\0";
1014pub const SDL_HINT_AUDIO_FREQUENCY: &[u8; 20] = b"SDL_AUDIO_FREQUENCY\0";
1015pub const SDL_HINT_AUDIO_INCLUDE_MONITORS: &[u8; 27] = b"SDL_AUDIO_INCLUDE_MONITORS\0";
1016pub const SDL_HINT_AUTO_UPDATE_JOYSTICKS: &[u8; 26] = b"SDL_AUTO_UPDATE_JOYSTICKS\0";
1017pub const SDL_HINT_AUTO_UPDATE_SENSORS: &[u8; 24] = b"SDL_AUTO_UPDATE_SENSORS\0";
1018pub const SDL_HINT_BMP_SAVE_LEGACY_FORMAT: &[u8; 27] = b"SDL_BMP_SAVE_LEGACY_FORMAT\0";
1019pub const SDL_HINT_CAMERA_DRIVER: &[u8; 18] = b"SDL_CAMERA_DRIVER\0";
1020pub const SDL_HINT_CPU_FEATURE_MASK: &[u8; 21] = b"SDL_CPU_FEATURE_MASK\0";
1021pub const SDL_HINT_JOYSTICK_DIRECTINPUT: &[u8; 25] = b"SDL_JOYSTICK_DIRECTINPUT\0";
1022pub const SDL_HINT_FILE_DIALOG_DRIVER: &[u8; 23] = b"SDL_FILE_DIALOG_DRIVER\0";
1023pub const SDL_HINT_DISPLAY_USABLE_BOUNDS: &[u8; 26] = b"SDL_DISPLAY_USABLE_BOUNDS\0";
1024pub const SDL_HINT_INVALID_PARAM_CHECKS: &[u8; 25] = b"SDL_INVALID_PARAM_CHECKS\0";
1025pub const SDL_HINT_EMSCRIPTEN_ASYNCIFY: &[u8; 24] = b"SDL_EMSCRIPTEN_ASYNCIFY\0";
1026pub const SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR: &[u8; 31] = b"SDL_EMSCRIPTEN_CANVAS_SELECTOR\0";
1027pub const SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT: &[u8; 32] = b"SDL_EMSCRIPTEN_KEYBOARD_ELEMENT\0";
1028pub const SDL_HINT_ENABLE_SCREEN_KEYBOARD: &[u8; 27] = b"SDL_ENABLE_SCREEN_KEYBOARD\0";
1029pub const SDL_HINT_EVDEV_DEVICES: &[u8; 18] = b"SDL_EVDEV_DEVICES\0";
1030pub const SDL_HINT_EVENT_LOGGING: &[u8; 18] = b"SDL_EVENT_LOGGING\0";
1031pub const SDL_HINT_FORCE_RAISEWINDOW: &[u8; 22] = b"SDL_FORCE_RAISEWINDOW\0";
1032pub const SDL_HINT_FRAMEBUFFER_ACCELERATION: &[u8; 29] = b"SDL_FRAMEBUFFER_ACCELERATION\0";
1033pub const SDL_HINT_GAMECONTROLLERCONFIG: &[u8; 25] = b"SDL_GAMECONTROLLERCONFIG\0";
1034pub const SDL_HINT_GAMECONTROLLERCONFIG_FILE: &[u8; 30] = b"SDL_GAMECONTROLLERCONFIG_FILE\0";
1035pub const SDL_HINT_GAMECONTROLLERTYPE: &[u8; 23] = b"SDL_GAMECONTROLLERTYPE\0";
1036pub const SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES: &[u8; 34] =
1037 b"SDL_GAMECONTROLLER_IGNORE_DEVICES\0";
1038pub const SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT: &[u8; 41] =
1039 b"SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT\0";
1040pub const SDL_HINT_GAMECONTROLLER_SENSOR_FUSION: &[u8; 33] = b"SDL_GAMECONTROLLER_SENSOR_FUSION\0";
1041pub const SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT: &[u8; 31] = b"SDL_GDK_TEXTINPUT_DEFAULT_TEXT\0";
1042pub const SDL_HINT_GDK_TEXTINPUT_DESCRIPTION: &[u8; 30] = b"SDL_GDK_TEXTINPUT_DESCRIPTION\0";
1043pub const SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH: &[u8; 29] = b"SDL_GDK_TEXTINPUT_MAX_LENGTH\0";
1044pub const SDL_HINT_GDK_TEXTINPUT_SCOPE: &[u8; 24] = b"SDL_GDK_TEXTINPUT_SCOPE\0";
1045pub const SDL_HINT_GDK_TEXTINPUT_TITLE: &[u8; 24] = b"SDL_GDK_TEXTINPUT_TITLE\0";
1046pub const SDL_HINT_HIDAPI_LIBUSB: &[u8; 18] = b"SDL_HIDAPI_LIBUSB\0";
1047pub const SDL_HINT_HIDAPI_LIBUSB_GAMECUBE: &[u8; 27] = b"SDL_HIDAPI_LIBUSB_GAMECUBE\0";
1048pub const SDL_HINT_HIDAPI_LIBUSB_WHITELIST: &[u8; 28] = b"SDL_HIDAPI_LIBUSB_WHITELIST\0";
1049pub const SDL_HINT_HIDAPI_UDEV: &[u8; 16] = b"SDL_HIDAPI_UDEV\0";
1050pub const SDL_HINT_GPU_DRIVER: &[u8; 15] = b"SDL_GPU_DRIVER\0";
1051pub const SDL_HINT_OPENXR_LIBRARY: &[u8; 19] = b"SDL_OPENXR_LIBRARY\0";
1052pub const SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS: &[u8; 38] =
1053 b"SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS\0";
1054pub const SDL_HINT_HIDAPI_IGNORE_DEVICES: &[u8; 26] = b"SDL_HIDAPI_IGNORE_DEVICES\0";
1055pub const SDL_HINT_IME_IMPLEMENTED_UI: &[u8; 23] = b"SDL_IME_IMPLEMENTED_UI\0";
1056pub const SDL_HINT_IOS_HIDE_HOME_INDICATOR: &[u8; 28] = b"SDL_IOS_HIDE_HOME_INDICATOR\0";
1057pub const SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS: &[u8; 37] =
1058 b"SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS\0";
1059pub const SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES: &[u8; 33] = b"SDL_JOYSTICK_ARCADESTICK_DEVICES\0";
1060pub const SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED: &[u8; 42] =
1061 b"SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED\0";
1062pub const SDL_HINT_JOYSTICK_BLACKLIST_DEVICES: &[u8; 31] = b"SDL_JOYSTICK_BLACKLIST_DEVICES\0";
1063pub const SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED: &[u8; 40] =
1064 b"SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED\0";
1065pub const SDL_HINT_JOYSTICK_DEVICE: &[u8; 20] = b"SDL_JOYSTICK_DEVICE\0";
1066pub const SDL_HINT_JOYSTICK_DRUM_DEVICES: &[u8; 26] = b"SDL_JOYSTICK_DRUM_DEVICES\0";
1067pub const SDL_HINT_JOYSTICK_ENHANCED_REPORTS: &[u8; 30] = b"SDL_JOYSTICK_ENHANCED_REPORTS\0";
1068pub const SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES: &[u8; 33] = b"SDL_JOYSTICK_FLIGHTSTICK_DEVICES\0";
1069pub const SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED: &[u8; 42] =
1070 b"SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED\0";
1071pub const SDL_HINT_JOYSTICK_GAMEINPUT: &[u8; 23] = b"SDL_JOYSTICK_GAMEINPUT\0";
1072pub const SDL_HINT_JOYSTICK_GAMECUBE_DEVICES: &[u8; 30] = b"SDL_JOYSTICK_GAMECUBE_DEVICES\0";
1073pub const SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED: &[u8; 39] =
1074 b"SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED\0";
1075pub const SDL_HINT_JOYSTICK_GUITAR_DEVICES: &[u8; 28] = b"SDL_JOYSTICK_GUITAR_DEVICES\0";
1076pub const SDL_HINT_JOYSTICK_HIDAPI: &[u8; 20] = b"SDL_JOYSTICK_HIDAPI\0";
1077pub const SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS: &[u8; 37] =
1078 b"SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS\0";
1079pub const SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE: &[u8; 29] = b"SDL_JOYSTICK_HIDAPI_GAMECUBE\0";
1080pub const SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE: &[u8; 42] =
1081 b"SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE\0";
1082pub const SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS: &[u8; 29] = b"SDL_JOYSTICK_HIDAPI_JOY_CONS\0";
1083pub const SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED: &[u8; 36] =
1084 b"SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED\0";
1085pub const SDL_HINT_JOYSTICK_HIDAPI_LUNA: &[u8; 25] = b"SDL_JOYSTICK_HIDAPI_LUNA\0";
1086pub const SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC: &[u8; 37] =
1087 b"SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC\0";
1088pub const SDL_HINT_JOYSTICK_HIDAPI_PS3: &[u8; 24] = b"SDL_JOYSTICK_HIDAPI_PS3\0";
1089pub const SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER: &[u8; 39] =
1090 b"SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER\0";
1091pub const SDL_HINT_JOYSTICK_HIDAPI_PS4: &[u8; 24] = b"SDL_JOYSTICK_HIDAPI_PS4\0";
1092pub const SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL: &[u8; 40] =
1093 b"SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL\0";
1094pub const SDL_HINT_JOYSTICK_HIDAPI_PS5: &[u8; 24] = b"SDL_JOYSTICK_HIDAPI_PS5\0";
1095pub const SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED: &[u8; 35] =
1096 b"SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED\0";
1097pub const SDL_HINT_JOYSTICK_HIDAPI_SHIELD: &[u8; 27] = b"SDL_JOYSTICK_HIDAPI_SHIELD\0";
1098pub const SDL_HINT_JOYSTICK_HIDAPI_STADIA: &[u8; 27] = b"SDL_JOYSTICK_HIDAPI_STADIA\0";
1099pub const SDL_HINT_JOYSTICK_HIDAPI_STEAM: &[u8; 26] = b"SDL_JOYSTICK_HIDAPI_STEAM\0";
1100pub const SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED: &[u8; 35] =
1101 b"SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED\0";
1102pub const SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK: &[u8; 30] = b"SDL_JOYSTICK_HIDAPI_STEAMDECK\0";
1103pub const SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI: &[u8; 31] = b"SDL_JOYSTICK_HIDAPI_STEAM_HORI\0";
1104pub const SDL_HINT_JOYSTICK_HIDAPI_LG4FF: &[u8; 26] = b"SDL_JOYSTICK_HIDAPI_LG4FF\0";
1105pub const SDL_HINT_JOYSTICK_HIDAPI_8BITDO: &[u8; 27] = b"SDL_JOYSTICK_HIDAPI_8BITDO\0";
1106pub const SDL_HINT_JOYSTICK_HIDAPI_SINPUT: &[u8; 27] = b"SDL_JOYSTICK_HIDAPI_SINPUT\0";
1107pub const SDL_HINT_JOYSTICK_HIDAPI_ZUIKI: &[u8; 26] = b"SDL_JOYSTICK_HIDAPI_ZUIKI\0";
1108pub const SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI: &[u8; 28] = b"SDL_JOYSTICK_HIDAPI_FLYDIGI\0";
1109pub const SDL_HINT_JOYSTICK_HIDAPI_GAMESIR: &[u8; 28] = b"SDL_JOYSTICK_HIDAPI_GAMESIR\0";
1110pub const SDL_HINT_JOYSTICK_HIDAPI_SWITCH: &[u8; 27] = b"SDL_JOYSTICK_HIDAPI_SWITCH\0";
1111pub const SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED: &[u8; 36] =
1112 b"SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED\0";
1113pub const SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED: &[u8; 38] =
1114 b"SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED\0";
1115pub const SDL_HINT_JOYSTICK_HIDAPI_SWITCH2: &[u8; 28] = b"SDL_JOYSTICK_HIDAPI_SWITCH2\0";
1116pub const SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS: &[u8; 38] =
1117 b"SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS\0";
1118pub const SDL_HINT_JOYSTICK_HIDAPI_WII: &[u8; 24] = b"SDL_JOYSTICK_HIDAPI_WII\0";
1119pub const SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED: &[u8; 35] =
1120 b"SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED\0";
1121pub const SDL_HINT_JOYSTICK_HIDAPI_XBOX: &[u8; 25] = b"SDL_JOYSTICK_HIDAPI_XBOX\0";
1122pub const SDL_HINT_JOYSTICK_HIDAPI_XBOX_360: &[u8; 29] = b"SDL_JOYSTICK_HIDAPI_XBOX_360\0";
1123pub const SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED: &[u8; 40] =
1124 b"SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED\0";
1125pub const SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS: &[u8; 38] =
1126 b"SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS\0";
1127pub const SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE: &[u8; 29] = b"SDL_JOYSTICK_HIDAPI_XBOX_ONE\0";
1128pub const SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED: &[u8; 38] =
1129 b"SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED\0";
1130pub const SDL_HINT_JOYSTICK_HIDAPI_GIP: &[u8; 24] = b"SDL_JOYSTICK_HIDAPI_GIP\0";
1131pub const SDL_HINT_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA: &[u8; 43] =
1132 b"SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA\0";
1133pub const SDL_HINT_JOYSTICK_IOKIT: &[u8; 19] = b"SDL_JOYSTICK_IOKIT\0";
1134pub const SDL_HINT_JOYSTICK_LINUX_CLASSIC: &[u8; 27] = b"SDL_JOYSTICK_LINUX_CLASSIC\0";
1135pub const SDL_HINT_JOYSTICK_LINUX_DEADZONES: &[u8; 29] = b"SDL_JOYSTICK_LINUX_DEADZONES\0";
1136pub const SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS: &[u8; 32] = b"SDL_JOYSTICK_LINUX_DIGITAL_HATS\0";
1137pub const SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES: &[u8; 33] = b"SDL_JOYSTICK_LINUX_HAT_DEADZONES\0";
1138pub const SDL_HINT_JOYSTICK_MFI: &[u8; 17] = b"SDL_JOYSTICK_MFI\0";
1139pub const SDL_HINT_JOYSTICK_RAWINPUT: &[u8; 22] = b"SDL_JOYSTICK_RAWINPUT\0";
1140pub const SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT: &[u8; 39] =
1141 b"SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT\0";
1142pub const SDL_HINT_JOYSTICK_ROG_CHAKRAM: &[u8; 25] = b"SDL_JOYSTICK_ROG_CHAKRAM\0";
1143pub const SDL_HINT_JOYSTICK_THREAD: &[u8; 20] = b"SDL_JOYSTICK_THREAD\0";
1144pub const SDL_HINT_JOYSTICK_THROTTLE_DEVICES: &[u8; 30] = b"SDL_JOYSTICK_THROTTLE_DEVICES\0";
1145pub const SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED: &[u8; 39] =
1146 b"SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED\0";
1147pub const SDL_HINT_JOYSTICK_WGI: &[u8; 17] = b"SDL_JOYSTICK_WGI\0";
1148pub const SDL_HINT_JOYSTICK_WHEEL_DEVICES: &[u8; 27] = b"SDL_JOYSTICK_WHEEL_DEVICES\0";
1149pub const SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED: &[u8; 36] =
1150 b"SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED\0";
1151pub const SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES: &[u8; 35] =
1152 b"SDL_JOYSTICK_ZERO_CENTERED_DEVICES\0";
1153pub const SDL_HINT_JOYSTICK_HAPTIC_AXES: &[u8; 25] = b"SDL_JOYSTICK_HAPTIC_AXES\0";
1154pub const SDL_HINT_KEYCODE_OPTIONS: &[u8; 20] = b"SDL_KEYCODE_OPTIONS\0";
1155pub const SDL_HINT_KMSDRM_DEVICE_INDEX: &[u8; 24] = b"SDL_KMSDRM_DEVICE_INDEX\0";
1156pub const SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER: &[u8; 30] = b"SDL_KMSDRM_REQUIRE_DRM_MASTER\0";
1157pub const SDL_HINT_KMSDRM_ATOMIC: &[u8; 18] = b"SDL_KMSDRM_ATOMIC\0";
1158pub const SDL_HINT_LOGGING: &[u8; 12] = b"SDL_LOGGING\0";
1159pub const SDL_HINT_MAC_BACKGROUND_APP: &[u8; 23] = b"SDL_MAC_BACKGROUND_APP\0";
1160pub const SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK: &[u8; 39] =
1161 b"SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK\0";
1162pub const SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH: &[u8; 30] = b"SDL_MAC_OPENGL_ASYNC_DISPATCH\0";
1163pub const SDL_HINT_MAC_OPTION_AS_ALT: &[u8; 22] = b"SDL_MAC_OPTION_AS_ALT\0";
1164pub const SDL_HINT_MAC_SCROLL_MOMENTUM: &[u8; 24] = b"SDL_MAC_SCROLL_MOMENTUM\0";
1165pub const SDL_HINT_MAC_PRESS_AND_HOLD: &[u8; 23] = b"SDL_MAC_PRESS_AND_HOLD\0";
1166pub const SDL_HINT_MAIN_CALLBACK_RATE: &[u8; 23] = b"SDL_MAIN_CALLBACK_RATE\0";
1167pub const SDL_HINT_MOUSE_AUTO_CAPTURE: &[u8; 23] = b"SDL_MOUSE_AUTO_CAPTURE\0";
1168pub const SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS: &[u8; 30] = b"SDL_MOUSE_DOUBLE_CLICK_RADIUS\0";
1169pub const SDL_HINT_MOUSE_DOUBLE_CLICK_TIME: &[u8; 28] = b"SDL_MOUSE_DOUBLE_CLICK_TIME\0";
1170pub const SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR: &[u8; 32] = b"SDL_MOUSE_DEFAULT_SYSTEM_CURSOR\0";
1171pub const SDL_HINT_MOUSE_DPI_SCALE_CURSORS: &[u8; 28] = b"SDL_MOUSE_DPI_SCALE_CURSORS\0";
1172pub const SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE: &[u8; 37] =
1173 b"SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE\0";
1174pub const SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH: &[u8; 29] = b"SDL_MOUSE_FOCUS_CLICKTHROUGH\0";
1175pub const SDL_HINT_MOUSE_NORMAL_SPEED_SCALE: &[u8; 29] = b"SDL_MOUSE_NORMAL_SPEED_SCALE\0";
1176pub const SDL_HINT_MOUSE_RELATIVE_MODE_CENTER: &[u8; 31] = b"SDL_MOUSE_RELATIVE_MODE_CENTER\0";
1177pub const SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE: &[u8; 31] = b"SDL_MOUSE_RELATIVE_SPEED_SCALE\0";
1178pub const SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE: &[u8; 32] = b"SDL_MOUSE_RELATIVE_SYSTEM_SCALE\0";
1179pub const SDL_HINT_MOUSE_RELATIVE_WARP_MOTION: &[u8; 31] = b"SDL_MOUSE_RELATIVE_WARP_MOTION\0";
1180pub const SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE: &[u8; 34] =
1181 b"SDL_MOUSE_RELATIVE_CURSOR_VISIBLE\0";
1182pub const SDL_HINT_MOUSE_TOUCH_EVENTS: &[u8; 23] = b"SDL_MOUSE_TOUCH_EVENTS\0";
1183pub const SDL_HINT_MUTE_CONSOLE_KEYBOARD: &[u8; 26] = b"SDL_MUTE_CONSOLE_KEYBOARD\0";
1184pub const SDL_HINT_NO_SIGNAL_HANDLERS: &[u8; 23] = b"SDL_NO_SIGNAL_HANDLERS\0";
1185pub const SDL_HINT_OPENGL_LIBRARY: &[u8; 19] = b"SDL_OPENGL_LIBRARY\0";
1186pub const SDL_HINT_EGL_LIBRARY: &[u8; 16] = b"SDL_EGL_LIBRARY\0";
1187pub const SDL_HINT_OPENGL_ES_DRIVER: &[u8; 21] = b"SDL_OPENGL_ES_DRIVER\0";
1188pub const SDL_HINT_OPENGL_FORCE_SRGB_FRAMEBUFFER: &[u8; 34] =
1189 b"SDL_OPENGL_FORCE_SRGB_FRAMEBUFFER\0";
1190pub const SDL_HINT_OPENVR_LIBRARY: &[u8; 19] = b"SDL_OPENVR_LIBRARY\0";
1191pub const SDL_HINT_ORIENTATIONS: &[u8; 17] = b"SDL_ORIENTATIONS\0";
1192pub const SDL_HINT_POLL_SENTINEL: &[u8; 18] = b"SDL_POLL_SENTINEL\0";
1193pub const SDL_HINT_PREFERRED_LOCALES: &[u8; 22] = b"SDL_PREFERRED_LOCALES\0";
1194pub const SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE: &[u8; 30] = b"SDL_QUIT_ON_LAST_WINDOW_CLOSE\0";
1195pub const SDL_HINT_RENDER_DIRECT3D_THREADSAFE: &[u8; 31] = b"SDL_RENDER_DIRECT3D_THREADSAFE\0";
1196pub const SDL_HINT_RENDER_DIRECT3D11_DEBUG: &[u8; 28] = b"SDL_RENDER_DIRECT3D11_DEBUG\0";
1197pub const SDL_HINT_RENDER_DIRECT3D11_WARP: &[u8; 27] = b"SDL_RENDER_DIRECT3D11_WARP\0";
1198pub const SDL_HINT_RENDER_VULKAN_DEBUG: &[u8; 24] = b"SDL_RENDER_VULKAN_DEBUG\0";
1199pub const SDL_HINT_RENDER_GPU_DEBUG: &[u8; 21] = b"SDL_RENDER_GPU_DEBUG\0";
1200pub const SDL_HINT_RENDER_GPU_LOW_POWER: &[u8; 25] = b"SDL_RENDER_GPU_LOW_POWER\0";
1201pub const SDL_HINT_RENDER_DRIVER: &[u8; 18] = b"SDL_RENDER_DRIVER\0";
1202pub const SDL_HINT_RENDER_LINE_METHOD: &[u8; 23] = b"SDL_RENDER_LINE_METHOD\0";
1203pub const SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE: &[u8; 41] =
1204 b"SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE\0";
1205pub const SDL_HINT_RENDER_VSYNC: &[u8; 17] = b"SDL_RENDER_VSYNC\0";
1206pub const SDL_HINT_RETURN_KEY_HIDES_IME: &[u8; 25] = b"SDL_RETURN_KEY_HIDES_IME\0";
1207pub const SDL_HINT_ROG_GAMEPAD_MICE: &[u8; 21] = b"SDL_ROG_GAMEPAD_MICE\0";
1208pub const SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED: &[u8; 30] = b"SDL_ROG_GAMEPAD_MICE_EXCLUDED\0";
1209pub const SDL_HINT_PS2_GS_WIDTH: &[u8; 17] = b"SDL_PS2_GS_WIDTH\0";
1210pub const SDL_HINT_PS2_GS_HEIGHT: &[u8; 18] = b"SDL_PS2_GS_HEIGHT\0";
1211pub const SDL_HINT_PS2_GS_PROGRESSIVE: &[u8; 23] = b"SDL_PS2_GS_PROGRESSIVE\0";
1212pub const SDL_HINT_PS2_GS_MODE: &[u8; 16] = b"SDL_PS2_GS_MODE\0";
1213pub const SDL_HINT_RPI_VIDEO_LAYER: &[u8; 20] = b"SDL_RPI_VIDEO_LAYER\0";
1214pub const SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME: &[u8; 38] =
1215 b"SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME\0";
1216pub const SDL_HINT_SHUTDOWN_DBUS_ON_QUIT: &[u8; 26] = b"SDL_SHUTDOWN_DBUS_ON_QUIT\0";
1217pub const SDL_HINT_STORAGE_TITLE_DRIVER: &[u8; 25] = b"SDL_STORAGE_TITLE_DRIVER\0";
1218pub const SDL_HINT_STORAGE_USER_DRIVER: &[u8; 24] = b"SDL_STORAGE_USER_DRIVER\0";
1219pub const SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL: &[u8; 40] =
1220 b"SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL\0";
1221pub const SDL_HINT_THREAD_PRIORITY_POLICY: &[u8; 27] = b"SDL_THREAD_PRIORITY_POLICY\0";
1222pub const SDL_HINT_TIMER_RESOLUTION: &[u8; 21] = b"SDL_TIMER_RESOLUTION\0";
1223pub const SDL_HINT_TOUCH_MOUSE_EVENTS: &[u8; 23] = b"SDL_TOUCH_MOUSE_EVENTS\0";
1224pub const SDL_HINT_TRACKPAD_IS_TOUCH_ONLY: &[u8; 27] = b"SDL_TRACKPAD_IS_TOUCH_ONLY\0";
1225pub const SDL_HINT_TV_REMOTE_AS_JOYSTICK: &[u8; 26] = b"SDL_TV_REMOTE_AS_JOYSTICK\0";
1226pub const SDL_HINT_VIDEO_ALLOW_SCREENSAVER: &[u8; 28] = b"SDL_VIDEO_ALLOW_SCREENSAVER\0";
1227pub const SDL_HINT_VIDEO_DISPLAY_PRIORITY: &[u8; 27] = b"SDL_VIDEO_DISPLAY_PRIORITY\0";
1228pub const SDL_HINT_VIDEO_DOUBLE_BUFFER: &[u8; 24] = b"SDL_VIDEO_DOUBLE_BUFFER\0";
1229pub const SDL_HINT_VIDEO_DRIVER: &[u8; 17] = b"SDL_VIDEO_DRIVER\0";
1230pub const SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES: &[u8; 28] = b"SDL_VIDEO_DUMMY_SAVE_FRAMES\0";
1231pub const SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK: &[u8; 40] =
1232 b"SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK\0";
1233pub const SDL_HINT_VIDEO_FORCE_EGL: &[u8; 20] = b"SDL_VIDEO_FORCE_EGL\0";
1234pub const SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES: &[u8; 32] = b"SDL_VIDEO_MAC_FULLSCREEN_SPACES\0";
1235pub const SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY: &[u8; 41] =
1236 b"SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY\0";
1237pub const SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE: &[u8; 37] =
1238 b"SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE\0";
1239pub const SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE: &[u8; 39] =
1240 b"SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE\0";
1241pub const SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS: &[u8; 33] = b"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS\0";
1242pub const SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES: &[u8; 32] = b"SDL_VIDEO_OFFSCREEN_SAVE_FRAMES\0";
1243pub const SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS: &[u8; 33] = b"SDL_VIDEO_SYNC_WINDOW_OPERATIONS\0";
1244pub const SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR: &[u8; 33] = b"SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR\0";
1245pub const SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION: &[u8; 33] = b"SDL_VIDEO_WAYLAND_MODE_EMULATION\0";
1246pub const SDL_HINT_VIDEO_WAYLAND_MODE_SCALING: &[u8; 31] = b"SDL_VIDEO_WAYLAND_MODE_SCALING\0";
1247pub const SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR: &[u8; 34] =
1248 b"SDL_VIDEO_WAYLAND_PREFER_LIBDECOR\0";
1249pub const SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY: &[u8; 35] =
1250 b"SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY\0";
1251pub const SDL_HINT_VIDEO_WIN_D3DCOMPILER: &[u8; 26] = b"SDL_VIDEO_WIN_D3DCOMPILER\0";
1252pub const SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT: &[u8; 36] =
1253 b"SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT\0";
1254pub const SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR: &[u8; 39] =
1255 b"SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR\0";
1256pub const SDL_HINT_VIDEO_X11_NET_WM_PING: &[u8; 26] = b"SDL_VIDEO_X11_NET_WM_PING\0";
1257pub const SDL_HINT_VIDEO_X11_NODIRECTCOLOR: &[u8; 28] = b"SDL_VIDEO_X11_NODIRECTCOLOR\0";
1258pub const SDL_HINT_VIDEO_X11_SCALING_FACTOR: &[u8; 29] = b"SDL_VIDEO_X11_SCALING_FACTOR\0";
1259pub const SDL_HINT_VIDEO_X11_VISUALID: &[u8; 23] = b"SDL_VIDEO_X11_VISUALID\0";
1260pub const SDL_HINT_VIDEO_X11_WINDOW_VISUALID: &[u8; 30] = b"SDL_VIDEO_X11_WINDOW_VISUALID\0";
1261pub const SDL_HINT_VIDEO_X11_XRANDR: &[u8; 21] = b"SDL_VIDEO_X11_XRANDR\0";
1262pub const SDL_HINT_VITA_ENABLE_BACK_TOUCH: &[u8; 27] = b"SDL_VITA_ENABLE_BACK_TOUCH\0";
1263pub const SDL_HINT_VITA_ENABLE_FRONT_TOUCH: &[u8; 28] = b"SDL_VITA_ENABLE_FRONT_TOUCH\0";
1264pub const SDL_HINT_VITA_MODULE_PATH: &[u8; 21] = b"SDL_VITA_MODULE_PATH\0";
1265pub const SDL_HINT_VITA_PVR_INIT: &[u8; 18] = b"SDL_VITA_PVR_INIT\0";
1266pub const SDL_HINT_VITA_RESOLUTION: &[u8; 20] = b"SDL_VITA_RESOLUTION\0";
1267pub const SDL_HINT_VITA_PVR_OPENGL: &[u8; 20] = b"SDL_VITA_PVR_OPENGL\0";
1268pub const SDL_HINT_VITA_TOUCH_MOUSE_DEVICE: &[u8; 28] = b"SDL_VITA_TOUCH_MOUSE_DEVICE\0";
1269pub const SDL_HINT_VULKAN_DISPLAY: &[u8; 19] = b"SDL_VULKAN_DISPLAY\0";
1270pub const SDL_HINT_VULKAN_LIBRARY: &[u8; 19] = b"SDL_VULKAN_LIBRARY\0";
1271pub const SDL_HINT_WAVE_FACT_CHUNK: &[u8; 20] = b"SDL_WAVE_FACT_CHUNK\0";
1272pub const SDL_HINT_WAVE_CHUNK_LIMIT: &[u8; 21] = b"SDL_WAVE_CHUNK_LIMIT\0";
1273pub const SDL_HINT_WAVE_RIFF_CHUNK_SIZE: &[u8; 25] = b"SDL_WAVE_RIFF_CHUNK_SIZE\0";
1274pub const SDL_HINT_WAVE_TRUNCATION: &[u8; 20] = b"SDL_WAVE_TRUNCATION\0";
1275pub const SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED: &[u8; 32] = b"SDL_WINDOW_ACTIVATE_WHEN_RAISED\0";
1276pub const SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN: &[u8; 31] = b"SDL_WINDOW_ACTIVATE_WHEN_SHOWN\0";
1277pub const SDL_HINT_WINDOW_ALLOW_TOPMOST: &[u8; 25] = b"SDL_WINDOW_ALLOW_TOPMOST\0";
1278pub const SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN: &[u8; 44] =
1279 b"SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN\0";
1280pub const SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4: &[u8; 28] = b"SDL_WINDOWS_CLOSE_ON_ALT_F4\0";
1281pub const SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS: &[u8; 34] =
1282 b"SDL_WINDOWS_ENABLE_MENU_MNEMONICS\0";
1283pub const SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP: &[u8; 31] = b"SDL_WINDOWS_ENABLE_MESSAGELOOP\0";
1284pub const SDL_HINT_WINDOWS_GAMEINPUT: &[u8; 22] = b"SDL_WINDOWS_GAMEINPUT\0";
1285pub const SDL_HINT_WINDOWS_RAW_KEYBOARD: &[u8; 25] = b"SDL_WINDOWS_RAW_KEYBOARD\0";
1286pub const SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS: &[u8; 41] =
1287 b"SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS\0";
1288pub const SDL_HINT_WINDOWS_RAW_KEYBOARD_INPUTSINK: &[u8; 35] =
1289 b"SDL_WINDOWS_RAW_KEYBOARD_INPUTSINK\0";
1290pub const SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL: &[u8; 35] =
1291 b"SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL\0";
1292pub const SDL_HINT_WINDOWS_INTRESOURCE_ICON: &[u8; 29] = b"SDL_WINDOWS_INTRESOURCE_ICON\0";
1293pub const SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL: &[u8; 35] =
1294 b"SDL_WINDOWS_INTRESOURCE_ICON_SMALL\0";
1295pub const SDL_HINT_WINDOWS_USE_D3D9EX: &[u8; 23] = b"SDL_WINDOWS_USE_D3D9EX\0";
1296pub const SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE: &[u8; 34] =
1297 b"SDL_WINDOWS_ERASE_BACKGROUND_MODE\0";
1298pub const SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT: &[u8; 32] = b"SDL_X11_FORCE_OVERRIDE_REDIRECT\0";
1299pub const SDL_HINT_X11_WINDOW_TYPE: &[u8; 20] = b"SDL_X11_WINDOW_TYPE\0";
1300pub const SDL_HINT_X11_XCB_LIBRARY: &[u8; 20] = b"SDL_X11_XCB_LIBRARY\0";
1301pub const SDL_HINT_XINPUT_ENABLED: &[u8; 19] = b"SDL_XINPUT_ENABLED\0";
1302pub const SDL_HINT_ASSERT: &[u8; 11] = b"SDL_ASSERT\0";
1303pub const SDL_HINT_PEN_MOUSE_EVENTS: &[u8; 21] = b"SDL_PEN_MOUSE_EVENTS\0";
1304pub const SDL_HINT_PEN_TOUCH_EVENTS: &[u8; 21] = b"SDL_PEN_TOUCH_EVENTS\0";
1305pub const SDL_INIT_AUDIO: u32 = 16;
1306pub const SDL_INIT_VIDEO: u32 = 32;
1307pub const SDL_INIT_JOYSTICK: u32 = 512;
1308pub const SDL_INIT_HAPTIC: u32 = 4096;
1309pub const SDL_INIT_GAMEPAD: u32 = 8192;
1310pub const SDL_INIT_EVENTS: u32 = 16384;
1311pub const SDL_INIT_SENSOR: u32 = 32768;
1312pub const SDL_INIT_CAMERA: u32 = 65536;
1313pub const SDL_PROP_APP_METADATA_NAME_STRING: &[u8; 22] = b"SDL.app.metadata.name\0";
1314pub const SDL_PROP_APP_METADATA_VERSION_STRING: &[u8; 25] = b"SDL.app.metadata.version\0";
1315pub const SDL_PROP_APP_METADATA_IDENTIFIER_STRING: &[u8; 28] = b"SDL.app.metadata.identifier\0";
1316pub const SDL_PROP_APP_METADATA_CREATOR_STRING: &[u8; 25] = b"SDL.app.metadata.creator\0";
1317pub const SDL_PROP_APP_METADATA_COPYRIGHT_STRING: &[u8; 27] = b"SDL.app.metadata.copyright\0";
1318pub const SDL_PROP_APP_METADATA_URL_STRING: &[u8; 21] = b"SDL.app.metadata.url\0";
1319pub const SDL_PROP_APP_METADATA_TYPE_STRING: &[u8; 22] = b"SDL.app.metadata.type\0";
1320pub const SDL_MESSAGEBOX_ERROR: u32 = 16;
1321pub const SDL_MESSAGEBOX_WARNING: u32 = 32;
1322pub const SDL_MESSAGEBOX_INFORMATION: u32 = 64;
1323pub const SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT: u32 = 128;
1324pub const SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT: u32 = 256;
1325pub const SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT: u32 = 1;
1326pub const SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT: u32 = 2;
1327pub const SDL_PROP_PROCESS_CREATE_ARGS_POINTER: &[u8; 24] = b"SDL.process.create.args\0";
1328pub const SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER: &[u8; 31] =
1329 b"SDL.process.create.environment\0";
1330pub const SDL_PROP_PROCESS_CREATE_WORKING_DIRECTORY_STRING: &[u8; 37] =
1331 b"SDL.process.create.working_directory\0";
1332pub const SDL_PROP_PROCESS_CREATE_STDIN_NUMBER: &[u8; 32] = b"SDL.process.create.stdin_option\0";
1333pub const SDL_PROP_PROCESS_CREATE_STDIN_POINTER: &[u8; 32] = b"SDL.process.create.stdin_source\0";
1334pub const SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER: &[u8; 33] = b"SDL.process.create.stdout_option\0";
1335pub const SDL_PROP_PROCESS_CREATE_STDOUT_POINTER: &[u8; 33] = b"SDL.process.create.stdout_source\0";
1336pub const SDL_PROP_PROCESS_CREATE_STDERR_NUMBER: &[u8; 33] = b"SDL.process.create.stderr_option\0";
1337pub const SDL_PROP_PROCESS_CREATE_STDERR_POINTER: &[u8; 33] = b"SDL.process.create.stderr_source\0";
1338pub const SDL_PROP_PROCESS_CREATE_STDERR_TO_STDOUT_BOOLEAN: &[u8; 36] =
1339 b"SDL.process.create.stderr_to_stdout\0";
1340pub const SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN: &[u8; 30] =
1341 b"SDL.process.create.background\0";
1342pub const SDL_PROP_PROCESS_CREATE_CMDLINE_STRING: &[u8; 27] = b"SDL.process.create.cmdline\0";
1343pub const SDL_PROP_PROCESS_PID_NUMBER: &[u8; 16] = b"SDL.process.pid\0";
1344pub const SDL_PROP_PROCESS_STDIN_POINTER: &[u8; 18] = b"SDL.process.stdin\0";
1345pub const SDL_PROP_PROCESS_STDOUT_POINTER: &[u8; 19] = b"SDL.process.stdout\0";
1346pub const SDL_PROP_PROCESS_STDERR_POINTER: &[u8; 19] = b"SDL.process.stderr\0";
1347pub const SDL_PROP_PROCESS_BACKGROUND_BOOLEAN: &[u8; 23] = b"SDL.process.background\0";
1348pub const SDL_SOFTWARE_RENDERER: &[u8; 9] = b"software\0";
1349pub const SDL_GPU_RENDERER: &[u8; 4] = b"gpu\0";
1350pub const SDL_PROP_RENDERER_CREATE_NAME_STRING: &[u8; 25] = b"SDL.renderer.create.name\0";
1351pub const SDL_PROP_RENDERER_CREATE_WINDOW_POINTER: &[u8; 27] = b"SDL.renderer.create.window\0";
1352pub const SDL_PROP_RENDERER_CREATE_SURFACE_POINTER: &[u8; 28] = b"SDL.renderer.create.surface\0";
1353pub const SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER: &[u8; 38] =
1354 b"SDL.renderer.create.output_colorspace\0";
1355pub const SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER: &[u8; 34] =
1356 b"SDL.renderer.create.present_vsync\0";
1357pub const SDL_PROP_RENDERER_CREATE_GPU_DEVICE_POINTER: &[u8; 31] =
1358 b"SDL.renderer.create.gpu.device\0";
1359pub const SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN: &[u8; 38] =
1360 b"SDL.renderer.create.gpu.shaders_spirv\0";
1361pub const SDL_PROP_RENDERER_CREATE_GPU_SHADERS_DXIL_BOOLEAN: &[u8; 37] =
1362 b"SDL.renderer.create.gpu.shaders_dxil\0";
1363pub const SDL_PROP_RENDERER_CREATE_GPU_SHADERS_MSL_BOOLEAN: &[u8; 36] =
1364 b"SDL.renderer.create.gpu.shaders_msl\0";
1365pub const SDL_PROP_RENDERER_CREATE_VULKAN_INSTANCE_POINTER: &[u8; 36] =
1366 b"SDL.renderer.create.vulkan.instance\0";
1367pub const SDL_PROP_RENDERER_CREATE_VULKAN_SURFACE_NUMBER: &[u8; 35] =
1368 b"SDL.renderer.create.vulkan.surface\0";
1369pub const SDL_PROP_RENDERER_CREATE_VULKAN_PHYSICAL_DEVICE_POINTER: &[u8; 43] =
1370 b"SDL.renderer.create.vulkan.physical_device\0";
1371pub const SDL_PROP_RENDERER_CREATE_VULKAN_DEVICE_POINTER: &[u8; 34] =
1372 b"SDL.renderer.create.vulkan.device\0";
1373pub const SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER: &[u8; 55] =
1374 b"SDL.renderer.create.vulkan.graphics_queue_family_index\0";
1375pub const SDL_PROP_RENDERER_CREATE_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER: &[u8; 54] =
1376 b"SDL.renderer.create.vulkan.present_queue_family_index\0";
1377pub const SDL_PROP_RENDERER_NAME_STRING: &[u8; 18] = b"SDL.renderer.name\0";
1378pub const SDL_PROP_RENDERER_WINDOW_POINTER: &[u8; 20] = b"SDL.renderer.window\0";
1379pub const SDL_PROP_RENDERER_SURFACE_POINTER: &[u8; 21] = b"SDL.renderer.surface\0";
1380pub const SDL_PROP_RENDERER_VSYNC_NUMBER: &[u8; 19] = b"SDL.renderer.vsync\0";
1381pub const SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER: &[u8; 30] = b"SDL.renderer.max_texture_size\0";
1382pub const SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER: &[u8; 29] = b"SDL.renderer.texture_formats\0";
1383pub const SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN: &[u8; 30] =
1384 b"SDL.renderer.texture_wrapping\0";
1385pub const SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER: &[u8; 31] =
1386 b"SDL.renderer.output_colorspace\0";
1387pub const SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN: &[u8; 25] = b"SDL.renderer.HDR_enabled\0";
1388pub const SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT: &[u8; 29] = b"SDL.renderer.SDR_white_point\0";
1389pub const SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT: &[u8; 26] = b"SDL.renderer.HDR_headroom\0";
1390pub const SDL_PROP_RENDERER_D3D9_DEVICE_POINTER: &[u8; 25] = b"SDL.renderer.d3d9.device\0";
1391pub const SDL_PROP_RENDERER_D3D11_DEVICE_POINTER: &[u8; 26] = b"SDL.renderer.d3d11.device\0";
1392pub const SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER: &[u8; 30] = b"SDL.renderer.d3d11.swap_chain\0";
1393pub const SDL_PROP_RENDERER_D3D12_DEVICE_POINTER: &[u8; 26] = b"SDL.renderer.d3d12.device\0";
1394pub const SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER: &[u8; 30] = b"SDL.renderer.d3d12.swap_chain\0";
1395pub const SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER: &[u8; 33] =
1396 b"SDL.renderer.d3d12.command_queue\0";
1397pub const SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER: &[u8; 29] = b"SDL.renderer.vulkan.instance\0";
1398pub const SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER: &[u8; 28] = b"SDL.renderer.vulkan.surface\0";
1399pub const SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER: &[u8; 36] =
1400 b"SDL.renderer.vulkan.physical_device\0";
1401pub const SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER: &[u8; 27] = b"SDL.renderer.vulkan.device\0";
1402pub const SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER: &[u8; 48] =
1403 b"SDL.renderer.vulkan.graphics_queue_family_index\0";
1404pub const SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER: &[u8; 47] =
1405 b"SDL.renderer.vulkan.present_queue_family_index\0";
1406pub const SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER: &[u8; 42] =
1407 b"SDL.renderer.vulkan.swapchain_image_count\0";
1408pub const SDL_PROP_RENDERER_GPU_DEVICE_POINTER: &[u8; 24] = b"SDL.renderer.gpu.device\0";
1409pub const SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER: &[u8; 30] = b"SDL.texture.create.colorspace\0";
1410pub const SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER: &[u8; 26] = b"SDL.texture.create.format\0";
1411pub const SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER: &[u8; 26] = b"SDL.texture.create.access\0";
1412pub const SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER: &[u8; 25] = b"SDL.texture.create.width\0";
1413pub const SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER: &[u8; 26] = b"SDL.texture.create.height\0";
1414pub const SDL_PROP_TEXTURE_CREATE_PALETTE_POINTER: &[u8; 27] = b"SDL.texture.create.palette\0";
1415pub const SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT: &[u8; 35] =
1416 b"SDL.texture.create.SDR_white_point\0";
1417pub const SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT: &[u8; 32] =
1418 b"SDL.texture.create.HDR_headroom\0";
1419pub const SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER: &[u8; 33] =
1420 b"SDL.texture.create.d3d11.texture\0";
1421pub const SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER: &[u8; 35] =
1422 b"SDL.texture.create.d3d11.texture_u\0";
1423pub const SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER: &[u8; 35] =
1424 b"SDL.texture.create.d3d11.texture_v\0";
1425pub const SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER: &[u8; 33] =
1426 b"SDL.texture.create.d3d12.texture\0";
1427pub const SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER: &[u8; 35] =
1428 b"SDL.texture.create.d3d12.texture_u\0";
1429pub const SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER: &[u8; 35] =
1430 b"SDL.texture.create.d3d12.texture_v\0";
1431pub const SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER: &[u8; 37] =
1432 b"SDL.texture.create.metal.pixelbuffer\0";
1433pub const SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER: &[u8; 34] =
1434 b"SDL.texture.create.opengl.texture\0";
1435pub const SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER: &[u8; 37] =
1436 b"SDL.texture.create.opengl.texture_uv\0";
1437pub const SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER: &[u8; 36] =
1438 b"SDL.texture.create.opengl.texture_u\0";
1439pub const SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER: &[u8; 36] =
1440 b"SDL.texture.create.opengl.texture_v\0";
1441pub const SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER: &[u8; 37] =
1442 b"SDL.texture.create.opengles2.texture\0";
1443pub const SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER: &[u8; 40] =
1444 b"SDL.texture.create.opengles2.texture_uv\0";
1445pub const SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER: &[u8; 39] =
1446 b"SDL.texture.create.opengles2.texture_u\0";
1447pub const SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER: &[u8; 39] =
1448 b"SDL.texture.create.opengles2.texture_v\0";
1449pub const SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER: &[u8; 34] =
1450 b"SDL.texture.create.vulkan.texture\0";
1451pub const SDL_PROP_TEXTURE_CREATE_VULKAN_LAYOUT_NUMBER: &[u8; 33] =
1452 b"SDL.texture.create.vulkan.layout\0";
1453pub const SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER: &[u8; 31] =
1454 b"SDL.texture.create.gpu.texture\0";
1455pub const SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_POINTER: &[u8; 34] =
1456 b"SDL.texture.create.gpu.texture_uv\0";
1457pub const SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_POINTER: &[u8; 33] =
1458 b"SDL.texture.create.gpu.texture_u\0";
1459pub const SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_V_POINTER: &[u8; 33] =
1460 b"SDL.texture.create.gpu.texture_v\0";
1461pub const SDL_PROP_TEXTURE_COLORSPACE_NUMBER: &[u8; 23] = b"SDL.texture.colorspace\0";
1462pub const SDL_PROP_TEXTURE_FORMAT_NUMBER: &[u8; 19] = b"SDL.texture.format\0";
1463pub const SDL_PROP_TEXTURE_ACCESS_NUMBER: &[u8; 19] = b"SDL.texture.access\0";
1464pub const SDL_PROP_TEXTURE_WIDTH_NUMBER: &[u8; 18] = b"SDL.texture.width\0";
1465pub const SDL_PROP_TEXTURE_HEIGHT_NUMBER: &[u8; 19] = b"SDL.texture.height\0";
1466pub const SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT: &[u8; 28] = b"SDL.texture.SDR_white_point\0";
1467pub const SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT: &[u8; 25] = b"SDL.texture.HDR_headroom\0";
1468pub const SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER: &[u8; 26] = b"SDL.texture.d3d11.texture\0";
1469pub const SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER: &[u8; 28] = b"SDL.texture.d3d11.texture_u\0";
1470pub const SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER: &[u8; 28] = b"SDL.texture.d3d11.texture_v\0";
1471pub const SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER: &[u8; 26] = b"SDL.texture.d3d12.texture\0";
1472pub const SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER: &[u8; 28] = b"SDL.texture.d3d12.texture_u\0";
1473pub const SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER: &[u8; 28] = b"SDL.texture.d3d12.texture_v\0";
1474pub const SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER: &[u8; 27] = b"SDL.texture.opengl.texture\0";
1475pub const SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER: &[u8; 30] = b"SDL.texture.opengl.texture_uv\0";
1476pub const SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER: &[u8; 29] = b"SDL.texture.opengl.texture_u\0";
1477pub const SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER: &[u8; 29] = b"SDL.texture.opengl.texture_v\0";
1478pub const SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER: &[u8; 26] = b"SDL.texture.opengl.target\0";
1479pub const SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT: &[u8; 25] = b"SDL.texture.opengl.tex_w\0";
1480pub const SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT: &[u8; 25] = b"SDL.texture.opengl.tex_h\0";
1481pub const SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER: &[u8; 30] = b"SDL.texture.opengles2.texture\0";
1482pub const SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER: &[u8; 33] =
1483 b"SDL.texture.opengles2.texture_uv\0";
1484pub const SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER: &[u8; 32] =
1485 b"SDL.texture.opengles2.texture_u\0";
1486pub const SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER: &[u8; 32] =
1487 b"SDL.texture.opengles2.texture_v\0";
1488pub const SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER: &[u8; 29] =
1489 b"SDL.texture.opengles2.target\0";
1490pub const SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER: &[u8; 27] = b"SDL.texture.vulkan.texture\0";
1491pub const SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER: &[u8; 24] = b"SDL.texture.gpu.texture\0";
1492pub const SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER: &[u8; 27] = b"SDL.texture.gpu.texture_uv\0";
1493pub const SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER: &[u8; 26] = b"SDL.texture.gpu.texture_u\0";
1494pub const SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER: &[u8; 26] = b"SDL.texture.gpu.texture_v\0";
1495pub const SDL_RENDERER_VSYNC_DISABLED: u32 = 0;
1496pub const SDL_RENDERER_VSYNC_ADAPTIVE: i32 = -1;
1497pub const SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE: u32 = 8;
1498pub const SDL_MS_PER_SECOND: u32 = 1000;
1499pub const SDL_US_PER_SECOND: u32 = 1000000;
1500pub const SDL_NS_PER_SECOND: u32 = 1000000000;
1501pub const SDL_NS_PER_MS: u32 = 1000000;
1502pub const SDL_NS_PER_US: u32 = 1000;
1503pub const SDL_TRAYENTRY_BUTTON: u32 = 1;
1504pub const SDL_TRAYENTRY_CHECKBOX: u32 = 2;
1505pub const SDL_TRAYENTRY_SUBMENU: u32 = 4;
1506pub const SDL_TRAYENTRY_DISABLED: u32 = 2147483648;
1507pub const SDL_TRAYENTRY_CHECKED: u32 = 1073741824;
1508pub const SDL_PROP_TRAY_CREATE_ICON_POINTER: &[u8; 21] = b"SDL.tray.create.icon\0";
1509pub const SDL_PROP_TRAY_CREATE_TOOLTIP_STRING: &[u8; 24] = b"SDL.tray.create.tooltip\0";
1510pub const SDL_PROP_TRAY_CREATE_USERDATA_POINTER: &[u8; 25] = b"SDL.tray.create.userdata\0";
1511pub const SDL_PROP_TRAY_CREATE_LEFTCLICK_CALLBACK_POINTER: &[u8; 35] =
1512 b"SDL.tray.create.leftclick_callback\0";
1513pub const SDL_PROP_TRAY_CREATE_RIGHTCLICK_CALLBACK_POINTER: &[u8; 36] =
1514 b"SDL.tray.create.rightclick_callback\0";
1515pub const SDL_PROP_TRAY_CREATE_MIDDLECLICK_CALLBACK_POINTER: &[u8; 37] =
1516 b"SDL.tray.create.middleclick_callback\0";
1517pub const SDL_MAJOR_VERSION: u32 = 3;
1518pub const SDL_MINOR_VERSION: u32 = 5;
1519pub const SDL_MICRO_VERSION: u32 = 0;
1520pub type __gnuc_va_list = __builtin_va_list;
1521pub type va_list = __builtin_va_list;
1522unsafe extern "C" {
1523 pub fn memcpy(
1524 __dest: *mut core::ffi::c_void,
1525 __src: *const core::ffi::c_void,
1526 __n: core::ffi::c_ulong,
1527 ) -> *mut core::ffi::c_void;
1528}
1529unsafe extern "C" {
1530 pub fn memmove(
1531 __dest: *mut core::ffi::c_void,
1532 __src: *const core::ffi::c_void,
1533 __n: core::ffi::c_ulong,
1534 ) -> *mut core::ffi::c_void;
1535}
1536unsafe extern "C" {
1537 pub fn memccpy(
1538 __dest: *mut core::ffi::c_void,
1539 __src: *const core::ffi::c_void,
1540 __c: core::ffi::c_int,
1541 __n: core::ffi::c_ulong,
1542 ) -> *mut core::ffi::c_void;
1543}
1544unsafe extern "C" {
1545 pub fn memset(
1546 __s: *mut core::ffi::c_void,
1547 __c: core::ffi::c_int,
1548 __n: core::ffi::c_ulong,
1549 ) -> *mut core::ffi::c_void;
1550}
1551unsafe extern "C" {
1552 pub fn memset_explicit(
1553 __s: *mut core::ffi::c_void,
1554 __c: core::ffi::c_int,
1555 __n: usize,
1556 ) -> *mut core::ffi::c_void;
1557}
1558unsafe extern "C" {
1559 pub fn memcmp(
1560 __s1: *const core::ffi::c_void,
1561 __s2: *const core::ffi::c_void,
1562 __n: core::ffi::c_ulong,
1563 ) -> core::ffi::c_int;
1564}
1565unsafe extern "C" {
1566 pub fn __memcmpeq(
1567 __s1: *const core::ffi::c_void,
1568 __s2: *const core::ffi::c_void,
1569 __n: usize,
1570 ) -> core::ffi::c_int;
1571}
1572unsafe extern "C" {
1573 pub fn memchr(
1574 __s: *const core::ffi::c_void,
1575 __c: core::ffi::c_int,
1576 __n: core::ffi::c_ulong,
1577 ) -> *mut core::ffi::c_void;
1578}
1579unsafe extern "C" {
1580 pub fn strcpy(
1581 __dest: *mut core::ffi::c_char,
1582 __src: *const core::ffi::c_char,
1583 ) -> *mut core::ffi::c_char;
1584}
1585unsafe extern "C" {
1586 pub fn strncpy(
1587 __dest: *mut core::ffi::c_char,
1588 __src: *const core::ffi::c_char,
1589 __n: core::ffi::c_ulong,
1590 ) -> *mut core::ffi::c_char;
1591}
1592unsafe extern "C" {
1593 pub fn strcat(
1594 __dest: *mut core::ffi::c_char,
1595 __src: *const core::ffi::c_char,
1596 ) -> *mut core::ffi::c_char;
1597}
1598unsafe extern "C" {
1599 pub fn strncat(
1600 __dest: *mut core::ffi::c_char,
1601 __src: *const core::ffi::c_char,
1602 __n: core::ffi::c_ulong,
1603 ) -> *mut core::ffi::c_char;
1604}
1605unsafe extern "C" {
1606 pub fn strcmp(
1607 __s1: *const core::ffi::c_char,
1608 __s2: *const core::ffi::c_char,
1609 ) -> core::ffi::c_int;
1610}
1611unsafe extern "C" {
1612 pub fn strncmp(
1613 __s1: *const core::ffi::c_char,
1614 __s2: *const core::ffi::c_char,
1615 __n: core::ffi::c_ulong,
1616 ) -> core::ffi::c_int;
1617}
1618unsafe extern "C" {
1619 pub fn strcoll(
1620 __s1: *const core::ffi::c_char,
1621 __s2: *const core::ffi::c_char,
1622 ) -> core::ffi::c_int;
1623}
1624unsafe extern "C" {
1625 pub fn strxfrm(
1626 __dest: *mut core::ffi::c_char,
1627 __src: *const core::ffi::c_char,
1628 __n: core::ffi::c_ulong,
1629 ) -> core::ffi::c_ulong;
1630}
1631#[repr(C)]
1632#[derive(Debug, Copy, Clone, Hash)]
1633pub struct __locale_struct {
1634 pub __locales: [*mut __locale_data; 13usize],
1635 pub __ctype_b: *const core::ffi::c_ushort,
1636 pub __ctype_tolower: *const core::ffi::c_int,
1637 pub __ctype_toupper: *const core::ffi::c_int,
1638 pub __names: [*const core::ffi::c_char; 13usize],
1639}
1640#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1641const _: () = {
1642 ["Size of __locale_struct"][::core::mem::size_of::<__locale_struct>() - 232usize];
1643 ["Alignment of __locale_struct"][::core::mem::align_of::<__locale_struct>() - 8usize];
1644 ["Offset of field: __locale_struct::__locales"]
1645 [::core::mem::offset_of!(__locale_struct, __locales) - 0usize];
1646 ["Offset of field: __locale_struct::__ctype_b"]
1647 [::core::mem::offset_of!(__locale_struct, __ctype_b) - 104usize];
1648 ["Offset of field: __locale_struct::__ctype_tolower"]
1649 [::core::mem::offset_of!(__locale_struct, __ctype_tolower) - 112usize];
1650 ["Offset of field: __locale_struct::__ctype_toupper"]
1651 [::core::mem::offset_of!(__locale_struct, __ctype_toupper) - 120usize];
1652 ["Offset of field: __locale_struct::__names"]
1653 [::core::mem::offset_of!(__locale_struct, __names) - 128usize];
1654};
1655impl Default for __locale_struct {
1656 fn default() -> Self {
1657 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
1658 unsafe {
1659 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1660 s.assume_init()
1661 }
1662 }
1663}
1664pub type __locale_t = *mut __locale_struct;
1665pub type locale_t = __locale_t;
1666unsafe extern "C" {
1667 pub fn strcoll_l(
1668 __s1: *const core::ffi::c_char,
1669 __s2: *const core::ffi::c_char,
1670 __l: locale_t,
1671 ) -> core::ffi::c_int;
1672}
1673unsafe extern "C" {
1674 pub fn strxfrm_l(
1675 __dest: *mut core::ffi::c_char,
1676 __src: *const core::ffi::c_char,
1677 __n: usize,
1678 __l: locale_t,
1679 ) -> usize;
1680}
1681unsafe extern "C" {
1682 pub fn strdup(__s: *const core::ffi::c_char) -> *mut core::ffi::c_char;
1683}
1684unsafe extern "C" {
1685 pub fn strndup(
1686 __string: *const core::ffi::c_char,
1687 __n: core::ffi::c_ulong,
1688 ) -> *mut core::ffi::c_char;
1689}
1690unsafe extern "C" {
1691 pub fn strchr(__s: *const core::ffi::c_char, __c: core::ffi::c_int) -> *mut core::ffi::c_char;
1692}
1693unsafe extern "C" {
1694 pub fn strrchr(__s: *const core::ffi::c_char, __c: core::ffi::c_int) -> *mut core::ffi::c_char;
1695}
1696unsafe extern "C" {
1697 pub fn strchrnul(
1698 __s: *const core::ffi::c_char,
1699 __c: core::ffi::c_int,
1700 ) -> *mut core::ffi::c_char;
1701}
1702unsafe extern "C" {
1703 pub fn strcspn(
1704 __s: *const core::ffi::c_char,
1705 __reject: *const core::ffi::c_char,
1706 ) -> core::ffi::c_ulong;
1707}
1708unsafe extern "C" {
1709 pub fn strspn(
1710 __s: *const core::ffi::c_char,
1711 __accept: *const core::ffi::c_char,
1712 ) -> core::ffi::c_ulong;
1713}
1714unsafe extern "C" {
1715 pub fn strpbrk(
1716 __s: *const core::ffi::c_char,
1717 __accept: *const core::ffi::c_char,
1718 ) -> *mut core::ffi::c_char;
1719}
1720unsafe extern "C" {
1721 pub fn strstr(
1722 __haystack: *const core::ffi::c_char,
1723 __needle: *const core::ffi::c_char,
1724 ) -> *mut core::ffi::c_char;
1725}
1726unsafe extern "C" {
1727 pub fn strtok(
1728 __s: *mut core::ffi::c_char,
1729 __delim: *const core::ffi::c_char,
1730 ) -> *mut core::ffi::c_char;
1731}
1732unsafe extern "C" {
1733 pub fn __strtok_r(
1734 __s: *mut core::ffi::c_char,
1735 __delim: *const core::ffi::c_char,
1736 __save_ptr: *mut *mut core::ffi::c_char,
1737 ) -> *mut core::ffi::c_char;
1738}
1739unsafe extern "C" {
1740 pub fn strtok_r(
1741 __s: *mut core::ffi::c_char,
1742 __delim: *const core::ffi::c_char,
1743 __save_ptr: *mut *mut core::ffi::c_char,
1744 ) -> *mut core::ffi::c_char;
1745}
1746unsafe extern "C" {
1747 pub fn strcasestr(
1748 __haystack: *const core::ffi::c_char,
1749 __needle: *const core::ffi::c_char,
1750 ) -> *mut core::ffi::c_char;
1751}
1752unsafe extern "C" {
1753 pub fn memmem(
1754 __haystack: *const core::ffi::c_void,
1755 __haystacklen: usize,
1756 __needle: *const core::ffi::c_void,
1757 __needlelen: usize,
1758 ) -> *mut core::ffi::c_void;
1759}
1760unsafe extern "C" {
1761 pub fn __mempcpy(
1762 __dest: *mut core::ffi::c_void,
1763 __src: *const core::ffi::c_void,
1764 __n: usize,
1765 ) -> *mut core::ffi::c_void;
1766}
1767unsafe extern "C" {
1768 pub fn mempcpy(
1769 __dest: *mut core::ffi::c_void,
1770 __src: *const core::ffi::c_void,
1771 __n: core::ffi::c_ulong,
1772 ) -> *mut core::ffi::c_void;
1773}
1774unsafe extern "C" {
1775 pub fn strlen(__s: *const core::ffi::c_char) -> core::ffi::c_ulong;
1776}
1777unsafe extern "C" {
1778 pub fn strnlen(__string: *const core::ffi::c_char, __maxlen: usize) -> usize;
1779}
1780unsafe extern "C" {
1781 pub fn strerror(__errnum: core::ffi::c_int) -> *mut core::ffi::c_char;
1782}
1783unsafe extern "C" {
1784 #[link_name = "\u{1}__xpg_strerror_r"]
1785 pub fn strerror_r(
1786 __errnum: core::ffi::c_int,
1787 __buf: *mut core::ffi::c_char,
1788 __buflen: usize,
1789 ) -> core::ffi::c_int;
1790}
1791unsafe extern "C" {
1792 pub fn strerror_l(__errnum: core::ffi::c_int, __l: locale_t) -> *mut core::ffi::c_char;
1793}
1794unsafe extern "C" {
1795 pub fn bcmp(
1796 __s1: *const core::ffi::c_void,
1797 __s2: *const core::ffi::c_void,
1798 __n: core::ffi::c_ulong,
1799 ) -> core::ffi::c_int;
1800}
1801unsafe extern "C" {
1802 pub fn bcopy(
1803 __src: *const core::ffi::c_void,
1804 __dest: *mut core::ffi::c_void,
1805 __n: core::ffi::c_ulong,
1806 );
1807}
1808unsafe extern "C" {
1809 pub fn bzero(__s: *mut core::ffi::c_void, __n: core::ffi::c_ulong);
1810}
1811unsafe extern "C" {
1812 pub fn index(__s: *const core::ffi::c_char, __c: core::ffi::c_int) -> *mut core::ffi::c_char;
1813}
1814unsafe extern "C" {
1815 pub fn rindex(__s: *const core::ffi::c_char, __c: core::ffi::c_int) -> *mut core::ffi::c_char;
1816}
1817unsafe extern "C" {
1818 pub fn ffs(__i: core::ffi::c_int) -> core::ffi::c_int;
1819}
1820unsafe extern "C" {
1821 pub fn ffsl(__l: core::ffi::c_long) -> core::ffi::c_int;
1822}
1823unsafe extern "C" {
1824 pub fn ffsll(__ll: core::ffi::c_longlong) -> core::ffi::c_int;
1825}
1826unsafe extern "C" {
1827 pub fn strcasecmp(
1828 __s1: *const core::ffi::c_char,
1829 __s2: *const core::ffi::c_char,
1830 ) -> core::ffi::c_int;
1831}
1832unsafe extern "C" {
1833 pub fn strncasecmp(
1834 __s1: *const core::ffi::c_char,
1835 __s2: *const core::ffi::c_char,
1836 __n: core::ffi::c_ulong,
1837 ) -> core::ffi::c_int;
1838}
1839unsafe extern "C" {
1840 pub fn strcasecmp_l(
1841 __s1: *const core::ffi::c_char,
1842 __s2: *const core::ffi::c_char,
1843 __loc: locale_t,
1844 ) -> core::ffi::c_int;
1845}
1846unsafe extern "C" {
1847 pub fn strncasecmp_l(
1848 __s1: *const core::ffi::c_char,
1849 __s2: *const core::ffi::c_char,
1850 __n: usize,
1851 __loc: locale_t,
1852 ) -> core::ffi::c_int;
1853}
1854unsafe extern "C" {
1855 pub fn explicit_bzero(__s: *mut core::ffi::c_void, __n: usize);
1856}
1857unsafe extern "C" {
1858 pub fn strsep(
1859 __stringp: *mut *mut core::ffi::c_char,
1860 __delim: *const core::ffi::c_char,
1861 ) -> *mut core::ffi::c_char;
1862}
1863unsafe extern "C" {
1864 pub fn strsignal(__sig: core::ffi::c_int) -> *mut core::ffi::c_char;
1865}
1866unsafe extern "C" {
1867 pub fn __stpcpy(
1868 __dest: *mut core::ffi::c_char,
1869 __src: *const core::ffi::c_char,
1870 ) -> *mut core::ffi::c_char;
1871}
1872unsafe extern "C" {
1873 pub fn stpcpy(
1874 __dest: *mut core::ffi::c_char,
1875 __src: *const core::ffi::c_char,
1876 ) -> *mut core::ffi::c_char;
1877}
1878unsafe extern "C" {
1879 pub fn __stpncpy(
1880 __dest: *mut core::ffi::c_char,
1881 __src: *const core::ffi::c_char,
1882 __n: usize,
1883 ) -> *mut core::ffi::c_char;
1884}
1885unsafe extern "C" {
1886 pub fn stpncpy(
1887 __dest: *mut core::ffi::c_char,
1888 __src: *const core::ffi::c_char,
1889 __n: core::ffi::c_ulong,
1890 ) -> *mut core::ffi::c_char;
1891}
1892unsafe extern "C" {
1893 pub fn strlcpy(
1894 __dest: *mut core::ffi::c_char,
1895 __src: *const core::ffi::c_char,
1896 __n: core::ffi::c_ulong,
1897 ) -> core::ffi::c_ulong;
1898}
1899unsafe extern "C" {
1900 pub fn strlcat(
1901 __dest: *mut core::ffi::c_char,
1902 __src: *const core::ffi::c_char,
1903 __n: core::ffi::c_ulong,
1904 ) -> core::ffi::c_ulong;
1905}
1906pub type __cfloat128 = __BindgenComplex<u128>;
1907pub type _Float128 = u128;
1908pub type _Float32 = f32;
1909pub type _Float64 = f64;
1910pub type _Float32x = f64;
1911pub type _Float64x = u128;
1912pub type wchar_t = core::ffi::c_int;
1913pub type wint_t = core::ffi::c_uint;
1914#[repr(C)]
1915#[derive(Copy, Clone)]
1916pub struct __mbstate_t {
1917 pub __count: core::ffi::c_int,
1918 pub __value: __mbstate_t__bindgen_ty_1,
1919}
1920#[repr(C)]
1921#[derive(Copy, Clone)]
1922pub union __mbstate_t__bindgen_ty_1 {
1923 pub __wch: core::ffi::c_uint,
1924 pub __wchb: [core::ffi::c_char; 4usize],
1925}
1926#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1927const _: () = {
1928 ["Size of __mbstate_t__bindgen_ty_1"]
1929 [::core::mem::size_of::<__mbstate_t__bindgen_ty_1>() - 4usize];
1930 ["Alignment of __mbstate_t__bindgen_ty_1"]
1931 [::core::mem::align_of::<__mbstate_t__bindgen_ty_1>() - 4usize];
1932 ["Offset of field: __mbstate_t__bindgen_ty_1::__wch"]
1933 [::core::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wch) - 0usize];
1934 ["Offset of field: __mbstate_t__bindgen_ty_1::__wchb"]
1935 [::core::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wchb) - 0usize];
1936};
1937impl Default for __mbstate_t__bindgen_ty_1 {
1938 fn default() -> Self {
1939 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
1940 unsafe {
1941 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1942 s.assume_init()
1943 }
1944 }
1945}
1946#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1947const _: () = {
1948 ["Size of __mbstate_t"][::core::mem::size_of::<__mbstate_t>() - 8usize];
1949 ["Alignment of __mbstate_t"][::core::mem::align_of::<__mbstate_t>() - 4usize];
1950 ["Offset of field: __mbstate_t::__count"]
1951 [::core::mem::offset_of!(__mbstate_t, __count) - 0usize];
1952 ["Offset of field: __mbstate_t::__value"]
1953 [::core::mem::offset_of!(__mbstate_t, __value) - 4usize];
1954};
1955impl Default for __mbstate_t {
1956 fn default() -> Self {
1957 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
1958 unsafe {
1959 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1960 s.assume_init()
1961 }
1962 }
1963}
1964pub type mbstate_t = __mbstate_t;
1965#[repr(C)]
1966#[derive(Debug, Copy, Clone)]
1967pub struct _IO_FILE {
1968 _unused: [u8; 0],
1969}
1970pub type __FILE = _IO_FILE;
1971pub type FILE = _IO_FILE;
1972#[repr(C)]
1973#[derive(Debug, Copy, Clone)]
1974pub struct tm {
1975 _unused: [u8; 0],
1976}
1977unsafe extern "C" {
1978 pub fn wcscpy(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t;
1979}
1980unsafe extern "C" {
1981 pub fn wcsncpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t;
1982}
1983unsafe extern "C" {
1984 pub fn wcslcpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> usize;
1985}
1986unsafe extern "C" {
1987 pub fn wcslcat(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> usize;
1988}
1989unsafe extern "C" {
1990 pub fn wcscat(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t;
1991}
1992unsafe extern "C" {
1993 pub fn wcsncat(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t;
1994}
1995unsafe extern "C" {
1996 pub fn wcscmp(__s1: *const core::ffi::c_int, __s2: *const core::ffi::c_int)
1997 -> core::ffi::c_int;
1998}
1999unsafe extern "C" {
2000 pub fn wcsncmp(
2001 __s1: *const core::ffi::c_int,
2002 __s2: *const core::ffi::c_int,
2003 __n: core::ffi::c_ulong,
2004 ) -> core::ffi::c_int;
2005}
2006unsafe extern "C" {
2007 pub fn wcscasecmp(__s1: *const wchar_t, __s2: *const wchar_t) -> core::ffi::c_int;
2008}
2009unsafe extern "C" {
2010 pub fn wcsncasecmp(__s1: *const wchar_t, __s2: *const wchar_t, __n: usize) -> core::ffi::c_int;
2011}
2012unsafe extern "C" {
2013 pub fn wcscasecmp_l(
2014 __s1: *const wchar_t,
2015 __s2: *const wchar_t,
2016 __loc: locale_t,
2017 ) -> core::ffi::c_int;
2018}
2019unsafe extern "C" {
2020 pub fn wcsncasecmp_l(
2021 __s1: *const wchar_t,
2022 __s2: *const wchar_t,
2023 __n: usize,
2024 __loc: locale_t,
2025 ) -> core::ffi::c_int;
2026}
2027unsafe extern "C" {
2028 pub fn wcscoll(__s1: *const wchar_t, __s2: *const wchar_t) -> core::ffi::c_int;
2029}
2030unsafe extern "C" {
2031 pub fn wcsxfrm(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> usize;
2032}
2033unsafe extern "C" {
2034 pub fn wcscoll_l(
2035 __s1: *const wchar_t,
2036 __s2: *const wchar_t,
2037 __loc: locale_t,
2038 ) -> core::ffi::c_int;
2039}
2040unsafe extern "C" {
2041 pub fn wcsxfrm_l(
2042 __s1: *mut wchar_t,
2043 __s2: *const wchar_t,
2044 __n: usize,
2045 __loc: locale_t,
2046 ) -> usize;
2047}
2048unsafe extern "C" {
2049 pub fn wcsdup(__s: *const wchar_t) -> *mut wchar_t;
2050}
2051unsafe extern "C" {
2052 pub fn wcschr(__wcs: *const core::ffi::c_int, __wc: core::ffi::c_int) -> *mut core::ffi::c_int;
2053}
2054unsafe extern "C" {
2055 pub fn wcsrchr(__wcs: *const wchar_t, __wc: wchar_t) -> *mut wchar_t;
2056}
2057unsafe extern "C" {
2058 pub fn wcscspn(__wcs: *const wchar_t, __reject: *const wchar_t) -> usize;
2059}
2060unsafe extern "C" {
2061 pub fn wcsspn(__wcs: *const wchar_t, __accept: *const wchar_t) -> usize;
2062}
2063unsafe extern "C" {
2064 pub fn wcspbrk(__wcs: *const wchar_t, __accept: *const wchar_t) -> *mut wchar_t;
2065}
2066unsafe extern "C" {
2067 pub fn wcsstr(__haystack: *const wchar_t, __needle: *const wchar_t) -> *mut wchar_t;
2068}
2069unsafe extern "C" {
2070 pub fn wcstok(
2071 __s: *mut wchar_t,
2072 __delim: *const wchar_t,
2073 __ptr: *mut *mut wchar_t,
2074 ) -> *mut wchar_t;
2075}
2076unsafe extern "C" {
2077 pub fn wcslen(__s: *const core::ffi::c_int) -> core::ffi::c_ulong;
2078}
2079unsafe extern "C" {
2080 pub fn wcsnlen(__s: *const wchar_t, __maxlen: usize) -> usize;
2081}
2082unsafe extern "C" {
2083 pub fn wmemchr(
2084 __s: *const core::ffi::c_int,
2085 __c: core::ffi::c_int,
2086 __n: core::ffi::c_ulong,
2087 ) -> *mut core::ffi::c_int;
2088}
2089unsafe extern "C" {
2090 pub fn wmemcmp(
2091 __s1: *const core::ffi::c_int,
2092 __s2: *const core::ffi::c_int,
2093 __n: core::ffi::c_ulong,
2094 ) -> core::ffi::c_int;
2095}
2096unsafe extern "C" {
2097 pub fn wmemcpy(
2098 __s1: *mut core::ffi::c_int,
2099 __s2: *const core::ffi::c_int,
2100 __n: core::ffi::c_ulong,
2101 ) -> *mut core::ffi::c_int;
2102}
2103unsafe extern "C" {
2104 pub fn wmemmove(
2105 __s1: *mut core::ffi::c_int,
2106 __s2: *const core::ffi::c_int,
2107 __n: core::ffi::c_ulong,
2108 ) -> *mut core::ffi::c_int;
2109}
2110unsafe extern "C" {
2111 pub fn wmemset(__s: *mut wchar_t, __c: wchar_t, __n: usize) -> *mut wchar_t;
2112}
2113unsafe extern "C" {
2114 pub fn btowc(__c: core::ffi::c_int) -> wint_t;
2115}
2116unsafe extern "C" {
2117 pub fn wctob(__c: wint_t) -> core::ffi::c_int;
2118}
2119unsafe extern "C" {
2120 pub fn mbsinit(__ps: *const mbstate_t) -> core::ffi::c_int;
2121}
2122unsafe extern "C" {
2123 pub fn mbrtowc(
2124 __pwc: *mut wchar_t,
2125 __s: *const core::ffi::c_char,
2126 __n: usize,
2127 __p: *mut mbstate_t,
2128 ) -> usize;
2129}
2130unsafe extern "C" {
2131 pub fn wcrtomb(__s: *mut core::ffi::c_char, __wc: wchar_t, __ps: *mut mbstate_t) -> usize;
2132}
2133unsafe extern "C" {
2134 pub fn __mbrlen(__s: *const core::ffi::c_char, __n: usize, __ps: *mut mbstate_t) -> usize;
2135}
2136unsafe extern "C" {
2137 pub fn mbrlen(__s: *const core::ffi::c_char, __n: usize, __ps: *mut mbstate_t) -> usize;
2138}
2139unsafe extern "C" {
2140 pub fn mbsrtowcs(
2141 __dst: *mut wchar_t,
2142 __src: *mut *const core::ffi::c_char,
2143 __len: usize,
2144 __ps: *mut mbstate_t,
2145 ) -> usize;
2146}
2147unsafe extern "C" {
2148 pub fn wcsrtombs(
2149 __dst: *mut core::ffi::c_char,
2150 __src: *mut *const wchar_t,
2151 __len: usize,
2152 __ps: *mut mbstate_t,
2153 ) -> usize;
2154}
2155unsafe extern "C" {
2156 pub fn mbsnrtowcs(
2157 __dst: *mut wchar_t,
2158 __src: *mut *const core::ffi::c_char,
2159 __nmc: usize,
2160 __len: usize,
2161 __ps: *mut mbstate_t,
2162 ) -> usize;
2163}
2164unsafe extern "C" {
2165 pub fn wcsnrtombs(
2166 __dst: *mut core::ffi::c_char,
2167 __src: *mut *const wchar_t,
2168 __nwc: usize,
2169 __len: usize,
2170 __ps: *mut mbstate_t,
2171 ) -> usize;
2172}
2173unsafe extern "C" {
2174 pub fn wcstod(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f64;
2175}
2176unsafe extern "C" {
2177 pub fn wcstof(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f32;
2178}
2179unsafe extern "C" {
2180 pub fn wcstold(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> u128;
2181}
2182unsafe extern "C" {
2183 pub fn wcstol(
2184 __nptr: *const wchar_t,
2185 __endptr: *mut *mut wchar_t,
2186 __base: core::ffi::c_int,
2187 ) -> core::ffi::c_long;
2188}
2189unsafe extern "C" {
2190 pub fn wcstoul(
2191 __nptr: *const wchar_t,
2192 __endptr: *mut *mut wchar_t,
2193 __base: core::ffi::c_int,
2194 ) -> core::ffi::c_ulong;
2195}
2196unsafe extern "C" {
2197 pub fn wcstoll(
2198 __nptr: *const wchar_t,
2199 __endptr: *mut *mut wchar_t,
2200 __base: core::ffi::c_int,
2201 ) -> core::ffi::c_longlong;
2202}
2203unsafe extern "C" {
2204 pub fn wcstoull(
2205 __nptr: *const wchar_t,
2206 __endptr: *mut *mut wchar_t,
2207 __base: core::ffi::c_int,
2208 ) -> core::ffi::c_ulonglong;
2209}
2210unsafe extern "C" {
2211 pub fn wcpcpy(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t;
2212}
2213unsafe extern "C" {
2214 pub fn wcpncpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t;
2215}
2216unsafe extern "C" {
2217 pub fn open_wmemstream(__bufloc: *mut *mut wchar_t, __sizeloc: *mut usize) -> *mut __FILE;
2218}
2219unsafe extern "C" {
2220 pub fn fwide(__fp: *mut __FILE, __mode: core::ffi::c_int) -> core::ffi::c_int;
2221}
2222unsafe extern "C" {
2223 pub fn fwprintf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> core::ffi::c_int;
2224}
2225unsafe extern "C" {
2226 pub fn wprintf(__format: *const wchar_t, ...) -> core::ffi::c_int;
2227}
2228unsafe extern "C" {
2229 pub fn swprintf(
2230 __s: *mut wchar_t,
2231 __n: usize,
2232 __format: *const wchar_t,
2233 ...
2234 ) -> core::ffi::c_int;
2235}
2236unsafe extern "C" {
2237 pub fn vfwprintf(
2238 __s: *mut __FILE,
2239 __format: *const wchar_t,
2240 __arg: *mut __va_list_tag,
2241 ) -> core::ffi::c_int;
2242}
2243unsafe extern "C" {
2244 pub fn vwprintf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> core::ffi::c_int;
2245}
2246unsafe extern "C" {
2247 pub fn vswprintf(
2248 __s: *mut wchar_t,
2249 __n: usize,
2250 __format: *const wchar_t,
2251 __arg: *mut __va_list_tag,
2252 ) -> core::ffi::c_int;
2253}
2254unsafe extern "C" {
2255 pub fn fwscanf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> core::ffi::c_int;
2256}
2257unsafe extern "C" {
2258 pub fn wscanf(__format: *const wchar_t, ...) -> core::ffi::c_int;
2259}
2260unsafe extern "C" {
2261 pub fn swscanf(__s: *const wchar_t, __format: *const wchar_t, ...) -> core::ffi::c_int;
2262}
2263unsafe extern "C" {
2264 #[link_name = "\u{1}__isoc99_fwscanf"]
2265 pub fn fwscanf1(__stream: *mut __FILE, __format: *const wchar_t, ...) -> core::ffi::c_int;
2266}
2267unsafe extern "C" {
2268 #[link_name = "\u{1}__isoc99_wscanf"]
2269 pub fn wscanf1(__format: *const wchar_t, ...) -> core::ffi::c_int;
2270}
2271unsafe extern "C" {
2272 #[link_name = "\u{1}__isoc99_swscanf"]
2273 pub fn swscanf1(__s: *const wchar_t, __format: *const wchar_t, ...) -> core::ffi::c_int;
2274}
2275unsafe extern "C" {
2276 pub fn vfwscanf(
2277 __s: *mut __FILE,
2278 __format: *const wchar_t,
2279 __arg: *mut __va_list_tag,
2280 ) -> core::ffi::c_int;
2281}
2282unsafe extern "C" {
2283 pub fn vwscanf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> core::ffi::c_int;
2284}
2285unsafe extern "C" {
2286 pub fn vswscanf(
2287 __s: *const wchar_t,
2288 __format: *const wchar_t,
2289 __arg: *mut __va_list_tag,
2290 ) -> core::ffi::c_int;
2291}
2292unsafe extern "C" {
2293 #[link_name = "\u{1}__isoc99_vfwscanf"]
2294 pub fn vfwscanf1(
2295 __s: *mut __FILE,
2296 __format: *const wchar_t,
2297 __arg: *mut __va_list_tag,
2298 ) -> core::ffi::c_int;
2299}
2300unsafe extern "C" {
2301 #[link_name = "\u{1}__isoc99_vwscanf"]
2302 pub fn vwscanf1(__format: *const wchar_t, __arg: *mut __va_list_tag) -> core::ffi::c_int;
2303}
2304unsafe extern "C" {
2305 #[link_name = "\u{1}__isoc99_vswscanf"]
2306 pub fn vswscanf1(
2307 __s: *const wchar_t,
2308 __format: *const wchar_t,
2309 __arg: *mut __va_list_tag,
2310 ) -> core::ffi::c_int;
2311}
2312unsafe extern "C" {
2313 pub fn fgetwc(__stream: *mut __FILE) -> wint_t;
2314}
2315unsafe extern "C" {
2316 pub fn getwc(__stream: *mut __FILE) -> wint_t;
2317}
2318unsafe extern "C" {
2319 pub fn getwchar() -> wint_t;
2320}
2321unsafe extern "C" {
2322 pub fn fputwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t;
2323}
2324unsafe extern "C" {
2325 pub fn putwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t;
2326}
2327unsafe extern "C" {
2328 pub fn putwchar(__wc: wchar_t) -> wint_t;
2329}
2330unsafe extern "C" {
2331 pub fn fgetws(__ws: *mut wchar_t, __n: core::ffi::c_int, __stream: *mut __FILE)
2332 -> *mut wchar_t;
2333}
2334unsafe extern "C" {
2335 pub fn fputws(__ws: *const wchar_t, __stream: *mut __FILE) -> core::ffi::c_int;
2336}
2337unsafe extern "C" {
2338 pub fn ungetwc(__wc: wint_t, __stream: *mut __FILE) -> wint_t;
2339}
2340unsafe extern "C" {
2341 pub fn wcsftime(
2342 __s: *mut wchar_t,
2343 __maxsize: usize,
2344 __format: *const wchar_t,
2345 __tp: *const tm,
2346 ) -> usize;
2347}
2348pub type __u_char = core::ffi::c_uchar;
2349pub type __u_short = core::ffi::c_ushort;
2350pub type __u_int = core::ffi::c_uint;
2351pub type __u_long = core::ffi::c_ulong;
2352pub type __int8_t = core::ffi::c_schar;
2353pub type __uint8_t = core::ffi::c_uchar;
2354pub type __int16_t = core::ffi::c_short;
2355pub type __uint16_t = core::ffi::c_ushort;
2356pub type __int32_t = core::ffi::c_int;
2357pub type __uint32_t = core::ffi::c_uint;
2358pub type __int64_t = core::ffi::c_long;
2359pub type __uint64_t = core::ffi::c_ulong;
2360pub type __int_least8_t = __int8_t;
2361pub type __uint_least8_t = __uint8_t;
2362pub type __int_least16_t = __int16_t;
2363pub type __uint_least16_t = __uint16_t;
2364pub type __int_least32_t = __int32_t;
2365pub type __uint_least32_t = __uint32_t;
2366pub type __int_least64_t = __int64_t;
2367pub type __uint_least64_t = __uint64_t;
2368pub type __quad_t = core::ffi::c_long;
2369pub type __u_quad_t = core::ffi::c_ulong;
2370pub type __intmax_t = core::ffi::c_long;
2371pub type __uintmax_t = core::ffi::c_ulong;
2372pub type __dev_t = core::ffi::c_ulong;
2373pub type __uid_t = core::ffi::c_uint;
2374pub type __gid_t = core::ffi::c_uint;
2375pub type __ino_t = core::ffi::c_ulong;
2376pub type __ino64_t = core::ffi::c_ulong;
2377pub type __mode_t = core::ffi::c_uint;
2378pub type __nlink_t = core::ffi::c_ulong;
2379pub type __off_t = core::ffi::c_long;
2380pub type __off64_t = core::ffi::c_long;
2381pub type __pid_t = core::ffi::c_int;
2382#[repr(C)]
2383#[derive(Debug, Default, Copy, Clone, Hash)]
2384pub struct __fsid_t {
2385 pub __val: [core::ffi::c_int; 2usize],
2386}
2387#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2388const _: () = {
2389 ["Size of __fsid_t"][::core::mem::size_of::<__fsid_t>() - 8usize];
2390 ["Alignment of __fsid_t"][::core::mem::align_of::<__fsid_t>() - 4usize];
2391 ["Offset of field: __fsid_t::__val"][::core::mem::offset_of!(__fsid_t, __val) - 0usize];
2392};
2393pub type __clock_t = core::ffi::c_long;
2394pub type __rlim_t = core::ffi::c_ulong;
2395pub type __rlim64_t = core::ffi::c_ulong;
2396pub type __id_t = core::ffi::c_uint;
2397pub type __time_t = core::ffi::c_long;
2398pub type __useconds_t = core::ffi::c_uint;
2399pub type __suseconds_t = core::ffi::c_long;
2400pub type __suseconds64_t = core::ffi::c_long;
2401pub type __daddr_t = core::ffi::c_int;
2402pub type __key_t = core::ffi::c_int;
2403pub type __clockid_t = core::ffi::c_int;
2404pub type __timer_t = *mut core::ffi::c_void;
2405pub type __blksize_t = core::ffi::c_long;
2406pub type __blkcnt_t = core::ffi::c_long;
2407pub type __blkcnt64_t = core::ffi::c_long;
2408pub type __fsblkcnt_t = core::ffi::c_ulong;
2409pub type __fsblkcnt64_t = core::ffi::c_ulong;
2410pub type __fsfilcnt_t = core::ffi::c_ulong;
2411pub type __fsfilcnt64_t = core::ffi::c_ulong;
2412pub type __fsword_t = core::ffi::c_long;
2413pub type __ssize_t = core::ffi::c_long;
2414pub type __syscall_slong_t = core::ffi::c_long;
2415pub type __syscall_ulong_t = core::ffi::c_ulong;
2416pub type __loff_t = __off64_t;
2417pub type __caddr_t = *mut core::ffi::c_char;
2418pub type __intptr_t = core::ffi::c_long;
2419pub type __socklen_t = core::ffi::c_uint;
2420pub type __sig_atomic_t = core::ffi::c_int;
2421pub type int_least8_t = __int_least8_t;
2422pub type int_least16_t = __int_least16_t;
2423pub type int_least32_t = __int_least32_t;
2424pub type int_least64_t = __int_least64_t;
2425pub type uint_least8_t = __uint_least8_t;
2426pub type uint_least16_t = __uint_least16_t;
2427pub type uint_least32_t = __uint_least32_t;
2428pub type uint_least64_t = __uint_least64_t;
2429pub type int_fast8_t = core::ffi::c_schar;
2430pub type int_fast16_t = core::ffi::c_long;
2431pub type int_fast32_t = core::ffi::c_long;
2432pub type int_fast64_t = core::ffi::c_long;
2433pub type uint_fast8_t = core::ffi::c_uchar;
2434pub type uint_fast16_t = core::ffi::c_ulong;
2435pub type uint_fast32_t = core::ffi::c_ulong;
2436pub type uint_fast64_t = core::ffi::c_ulong;
2437pub type intmax_t = __intmax_t;
2438pub type uintmax_t = __uintmax_t;
2439pub type __gwchar_t = core::ffi::c_int;
2440#[repr(C)]
2441#[derive(Debug, Default, Copy, Clone, Hash)]
2442pub struct imaxdiv_t {
2443 pub quot: core::ffi::c_long,
2444 pub rem: core::ffi::c_long,
2445}
2446#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2447const _: () = {
2448 ["Size of imaxdiv_t"][::core::mem::size_of::<imaxdiv_t>() - 16usize];
2449 ["Alignment of imaxdiv_t"][::core::mem::align_of::<imaxdiv_t>() - 8usize];
2450 ["Offset of field: imaxdiv_t::quot"][::core::mem::offset_of!(imaxdiv_t, quot) - 0usize];
2451 ["Offset of field: imaxdiv_t::rem"][::core::mem::offset_of!(imaxdiv_t, rem) - 8usize];
2452};
2453unsafe extern "C" {
2454 pub fn imaxabs(__n: intmax_t) -> intmax_t;
2455}
2456unsafe extern "C" {
2457 pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t;
2458}
2459unsafe extern "C" {
2460 pub fn strtoimax(
2461 __nptr: *const core::ffi::c_char,
2462 __endptr: *mut *mut core::ffi::c_char,
2463 __base: core::ffi::c_int,
2464 ) -> intmax_t;
2465}
2466unsafe extern "C" {
2467 pub fn strtoumax(
2468 __nptr: *const core::ffi::c_char,
2469 __endptr: *mut *mut core::ffi::c_char,
2470 __base: core::ffi::c_int,
2471 ) -> uintmax_t;
2472}
2473unsafe extern "C" {
2474 pub fn wcstoimax(
2475 __nptr: *const __gwchar_t,
2476 __endptr: *mut *mut __gwchar_t,
2477 __base: core::ffi::c_int,
2478 ) -> intmax_t;
2479}
2480unsafe extern "C" {
2481 pub fn wcstoumax(
2482 __nptr: *const __gwchar_t,
2483 __endptr: *mut *mut __gwchar_t,
2484 __base: core::ffi::c_int,
2485 ) -> uintmax_t;
2486}
2487#[doc = " A signed 8-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n"]
2488pub type Sint8 = i8;
2489#[doc = " An unsigned 8-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n"]
2490pub type Uint8 = u8;
2491#[doc = " A signed 16-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n"]
2492pub type Sint16 = i16;
2493#[doc = " An unsigned 16-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n"]
2494pub type Uint16 = u16;
2495#[doc = " A signed 32-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n"]
2496pub type Sint32 = i32;
2497#[doc = " An unsigned 32-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n"]
2498pub type Uint32 = u32;
2499#[doc = " A signed 64-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n\n **See Also:** SDL_SINT64_C\n"]
2500pub type Sint64 = i64;
2501#[doc = " An unsigned 64-bit integer type.\n\n **Available Since:** This macro is available since SDL 3.2.0.\n\n **See Also:** SDL_UINT64_C\n"]
2502pub type Uint64 = u64;
2503#[doc = " SDL times are signed, 64-bit integers representing nanoseconds since the\n Unix epoch (Jan 1, 1970).\n\n They can be converted between POSIX time_t values with SDL_NS_TO_SECONDS()\n and SDL_SECONDS_TO_NS(), and between Windows FILETIME values with\n SDL_TimeToWindows() and SDL_TimeFromWindows().\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_MAX_SINT64\n **See Also:** SDL_MIN_SINT64\n"]
2504pub type SDL_Time = Sint64;
2505#[repr(C)]
2506#[derive(Debug, Copy, Clone, Hash)]
2507pub struct SDL_alignment_test {
2508 pub a: Uint8,
2509 pub b: *mut core::ffi::c_void,
2510}
2511#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2512const _: () = {
2513 ["Size of SDL_alignment_test"][::core::mem::size_of::<SDL_alignment_test>() - 16usize];
2514 ["Alignment of SDL_alignment_test"][::core::mem::align_of::<SDL_alignment_test>() - 8usize];
2515 ["Offset of field: SDL_alignment_test::a"]
2516 [::core::mem::offset_of!(SDL_alignment_test, a) - 0usize];
2517 ["Offset of field: SDL_alignment_test::b"]
2518 [::core::mem::offset_of!(SDL_alignment_test, b) - 8usize];
2519};
2520impl Default for SDL_alignment_test {
2521 fn default() -> Self {
2522 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
2523 unsafe {
2524 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2525 s.assume_init()
2526 }
2527 }
2528}
2529impl SDL_DUMMY_ENUM {
2530 pub const DUMMY_ENUM_VALUE: SDL_DUMMY_ENUM = SDL_DUMMY_ENUM(0);
2531}
2532#[repr(transparent)]
2533#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2534pub struct SDL_DUMMY_ENUM(pub core::ffi::c_uint);
2535unsafe extern "C" {
2536 #[doc = " Allocate uninitialized memory.\n\n The allocated memory returned by this function must be freed with\n SDL_free().\n\n If `size` is 0, it will be set to 1.\n\n If the allocation is successful, the returned pointer is guaranteed to be\n aligned to either the *fundamental alignment* (`alignof(max_align_t)` in\n C11 and later) or `2 * sizeof(void *)`, whichever is smaller. Use\n SDL_aligned_alloc() if you need to allocate memory aligned to an alignment\n greater than this guarantee.\n\n **Parameter:** size the size to allocate.\n **Returns:** a pointer to the allocated memory, or NULL if allocation failed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_free\n **See Also:** SDL_calloc\n **See Also:** SDL_realloc\n **See Also:** SDL_aligned_alloc\n"]
2537 pub fn SDL_malloc(size: usize) -> *mut core::ffi::c_void;
2538}
2539unsafe extern "C" {
2540 #[doc = " Allocate a zero-initialized array.\n\n The memory returned by this function must be freed with SDL_free().\n\n If either of `nmemb` or `size` is 0, they will both be set to 1.\n\n If the allocation is successful, the returned pointer is guaranteed to be\n aligned to either the *fundamental alignment* (`alignof(max_align_t)` in\n C11 and later) or `2 * sizeof(void *)`, whichever is smaller.\n\n **Parameter:** nmemb the number of elements in the array.\n **Parameter:** size the size of each element of the array.\n **Returns:** a pointer to the allocated array, or NULL if allocation failed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_free\n **See Also:** SDL_malloc\n **See Also:** SDL_realloc\n"]
2541 pub fn SDL_calloc(nmemb: usize, size: usize) -> *mut core::ffi::c_void;
2542}
2543unsafe extern "C" {
2544 #[doc = " Change the size of allocated memory.\n\n The memory returned by this function must be freed with SDL_free().\n\n If `size` is 0, it will be set to 1. Note that this is unlike some other C\n runtime `realloc` implementations, which may treat `realloc(mem, 0)` the\n same way as `free(mem)`.\n\n If `mem` is NULL, the behavior of this function is equivalent to\n SDL_malloc(). Otherwise, the function can have one of three possible\n outcomes:\n\n - If it returns the same pointer as `mem`, it means that `mem` was resized\n in place without freeing.\n - If it returns a different non-NULL pointer, it means that `mem` was freed\n and cannot be dereferenced anymore.\n - If it returns NULL (indicating failure), then `mem` will remain valid and\n must still be freed with SDL_free().\n\n If the allocation is successfully resized, the returned pointer is\n guaranteed to be aligned to either the *fundamental alignment*\n (`alignof(max_align_t)` in C11 and later) or `2 * sizeof(void *)`,\n whichever is smaller.\n\n **Parameter:** mem a pointer to allocated memory to reallocate, or NULL.\n **Parameter:** size the new size of the memory.\n **Returns:** a pointer to the newly allocated memory, or NULL if allocation\n failed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_free\n **See Also:** SDL_malloc\n **See Also:** SDL_calloc\n"]
2545 pub fn SDL_realloc(mem: *mut core::ffi::c_void, size: usize) -> *mut core::ffi::c_void;
2546}
2547unsafe extern "C" {
2548 #[doc = " Free allocated memory.\n\n The pointer is no longer valid after this call and cannot be dereferenced\n anymore.\n\n If `mem` is NULL, this function does nothing.\n\n **Parameter:** mem a pointer to allocated memory, or NULL.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_malloc\n **See Also:** SDL_calloc\n **See Also:** SDL_realloc\n"]
2549 pub fn SDL_free(mem: *mut core::ffi::c_void);
2550}
2551#[doc = " A callback used to implement SDL_malloc().\n\n SDL will always ensure that the passed `size` is greater than 0.\n\n **Parameter:** size the size to allocate.\n **Returns:** a pointer to the allocated memory, or NULL if allocation failed.\n\n **Thread Safety:** It should be safe to call this callback from any thread.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_malloc\n **See Also:** SDL_GetOriginalMemoryFunctions\n **See Also:** SDL_GetMemoryFunctions\n **See Also:** SDL_SetMemoryFunctions\n"]
2552pub type SDL_malloc_func =
2553 ::core::option::Option<unsafe extern "C" fn(size: usize) -> *mut core::ffi::c_void>;
2554#[doc = " A callback used to implement SDL_calloc().\n\n SDL will always ensure that the passed `nmemb` and `size` are both greater\n than 0.\n\n **Parameter:** nmemb the number of elements in the array.\n **Parameter:** size the size of each element of the array.\n **Returns:** a pointer to the allocated array, or NULL if allocation failed.\n\n **Thread Safety:** It should be safe to call this callback from any thread.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_calloc\n **See Also:** SDL_GetOriginalMemoryFunctions\n **See Also:** SDL_GetMemoryFunctions\n **See Also:** SDL_SetMemoryFunctions\n"]
2555pub type SDL_calloc_func = ::core::option::Option<
2556 unsafe extern "C" fn(nmemb: usize, size: usize) -> *mut core::ffi::c_void,
2557>;
2558#[doc = " A callback used to implement SDL_realloc().\n\n SDL will always ensure that the passed `size` is greater than 0.\n\n **Parameter:** mem a pointer to allocated memory to reallocate, or NULL.\n **Parameter:** size the new size of the memory.\n **Returns:** a pointer to the newly allocated memory, or NULL if allocation\n failed.\n\n **Thread Safety:** It should be safe to call this callback from any thread.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_realloc\n **See Also:** SDL_GetOriginalMemoryFunctions\n **See Also:** SDL_GetMemoryFunctions\n **See Also:** SDL_SetMemoryFunctions\n"]
2559pub type SDL_realloc_func = ::core::option::Option<
2560 unsafe extern "C" fn(mem: *mut core::ffi::c_void, size: usize) -> *mut core::ffi::c_void,
2561>;
2562#[doc = " A callback used to implement SDL_free().\n\n SDL will always ensure that the passed `mem` is a non-NULL pointer.\n\n **Parameter:** mem a pointer to allocated memory.\n\n **Thread Safety:** It should be safe to call this callback from any thread.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_free\n **See Also:** SDL_GetOriginalMemoryFunctions\n **See Also:** SDL_GetMemoryFunctions\n **See Also:** SDL_SetMemoryFunctions\n"]
2563pub type SDL_free_func = ::core::option::Option<unsafe extern "C" fn(mem: *mut core::ffi::c_void)>;
2564unsafe extern "C" {
2565 #[doc = " Get the original set of SDL memory functions.\n\n This is what SDL_malloc and friends will use by default, if there has been\n no call to SDL_SetMemoryFunctions. This is not necessarily using the C\n runtime's `malloc` functions behind the scenes! Different platforms and\n build configurations might do any number of unexpected things.\n\n **Parameter:** malloc_func filled with malloc function.\n **Parameter:** calloc_func filled with calloc function.\n **Parameter:** realloc_func filled with realloc function.\n **Parameter:** free_func filled with free function.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2566 pub fn SDL_GetOriginalMemoryFunctions(
2567 malloc_func: *mut SDL_malloc_func,
2568 calloc_func: *mut SDL_calloc_func,
2569 realloc_func: *mut SDL_realloc_func,
2570 free_func: *mut SDL_free_func,
2571 );
2572}
2573unsafe extern "C" {
2574 #[doc = " Get the current set of SDL memory functions.\n\n **Parameter:** malloc_func filled with malloc function.\n **Parameter:** calloc_func filled with calloc function.\n **Parameter:** realloc_func filled with realloc function.\n **Parameter:** free_func filled with free function.\n\n **Thread Safety:** This does not hold a lock, so do not call this in the\n unlikely event of a background thread calling\n SDL_SetMemoryFunctions simultaneously.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetMemoryFunctions\n **See Also:** SDL_GetOriginalMemoryFunctions\n"]
2575 pub fn SDL_GetMemoryFunctions(
2576 malloc_func: *mut SDL_malloc_func,
2577 calloc_func: *mut SDL_calloc_func,
2578 realloc_func: *mut SDL_realloc_func,
2579 free_func: *mut SDL_free_func,
2580 );
2581}
2582unsafe extern "C" {
2583 #[doc = " Replace SDL's memory allocation functions with a custom set.\n\n It is not safe to call this function once any allocations have been made,\n as future calls to SDL_free will use the new allocator, even if they came\n from an SDL_malloc made with the old one!\n\n If used, usually this needs to be the first call made into the SDL library,\n if not the very first thing done at program startup time.\n\n **Parameter:** malloc_func custom malloc function.\n **Parameter:** calloc_func custom calloc function.\n **Parameter:** realloc_func custom realloc function.\n **Parameter:** free_func custom free function.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, but one\n should not replace the memory functions once any allocations\n are made!\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMemoryFunctions\n **See Also:** SDL_GetOriginalMemoryFunctions\n"]
2584 pub fn SDL_SetMemoryFunctions(
2585 malloc_func: SDL_malloc_func,
2586 calloc_func: SDL_calloc_func,
2587 realloc_func: SDL_realloc_func,
2588 free_func: SDL_free_func,
2589 ) -> bool;
2590}
2591unsafe extern "C" {
2592 #[doc = " Allocate memory aligned to a specific alignment.\n\n The memory returned by this function must be freed with SDL_aligned_free(),\n _not_ SDL_free().\n\n If `alignment` is less than the size of `void *`, it will be increased to\n match that.\n\n The returned memory address will be a multiple of the alignment value, and\n the size of the memory allocated will be a multiple of the alignment value.\n\n **Parameter:** alignment the alignment of the memory.\n **Parameter:** size the size to allocate.\n **Returns:** a pointer to the aligned memory, or NULL if allocation failed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_aligned_free\n"]
2593 pub fn SDL_aligned_alloc(alignment: usize, size: usize) -> *mut core::ffi::c_void;
2594}
2595unsafe extern "C" {
2596 #[doc = " Free memory allocated by SDL_aligned_alloc().\n\n The pointer is no longer valid after this call and cannot be dereferenced\n anymore.\n\n If `mem` is NULL, this function does nothing.\n\n **Parameter:** mem a pointer previously returned by SDL_aligned_alloc(), or NULL.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_aligned_alloc\n"]
2597 pub fn SDL_aligned_free(mem: *mut core::ffi::c_void);
2598}
2599unsafe extern "C" {
2600 #[doc = " Get the number of outstanding (unfreed) allocations.\n\n **Returns:** the number of allocations or -1 if allocation counting is\n disabled.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2601 pub fn SDL_GetNumAllocations() -> core::ffi::c_int;
2602}
2603#[repr(C)]
2604#[derive(Debug, Copy, Clone)]
2605pub struct SDL_Environment {
2606 _unused: [u8; 0],
2607}
2608unsafe extern "C" {
2609 #[doc = " Get the process environment.\n\n This is initialized at application start and is not affected by setenv()\n and unsetenv() calls after that point. Use SDL_SetEnvironmentVariable() and\n SDL_UnsetEnvironmentVariable() if you want to modify this environment, or\n SDL_setenv_unsafe() or SDL_unsetenv_unsafe() if you want changes to persist\n in the C runtime environment after SDL_Quit().\n\n **Returns:** a pointer to the environment for the process or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetEnvironmentVariable\n **See Also:** SDL_GetEnvironmentVariables\n **See Also:** SDL_SetEnvironmentVariable\n **See Also:** SDL_UnsetEnvironmentVariable\n"]
2610 pub fn SDL_GetEnvironment() -> *mut SDL_Environment;
2611}
2612unsafe extern "C" {
2613 #[doc = " Create a set of environment variables\n\n **Parameter:** populated true to initialize it from the C runtime environment,\n false to create an empty environment.\n **Returns:** a pointer to the new environment or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** If `populated` is false, it is safe to call this function\n from any thread, otherwise it is safe if no other threads are\n calling setenv() or unsetenv()\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetEnvironmentVariable\n **See Also:** SDL_GetEnvironmentVariables\n **See Also:** SDL_SetEnvironmentVariable\n **See Also:** SDL_UnsetEnvironmentVariable\n **See Also:** SDL_DestroyEnvironment\n"]
2614 pub fn SDL_CreateEnvironment(populated: bool) -> *mut SDL_Environment;
2615}
2616unsafe extern "C" {
2617 #[doc = " Get the value of a variable in the environment.\n\n **Parameter:** env the environment to query.\n **Parameter:** name the name of the variable to get.\n **Returns:** a pointer to the value of the variable or NULL if it can't be\n found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetEnvironment\n **See Also:** SDL_CreateEnvironment\n **See Also:** SDL_GetEnvironmentVariables\n **See Also:** SDL_SetEnvironmentVariable\n **See Also:** SDL_UnsetEnvironmentVariable\n"]
2618 pub fn SDL_GetEnvironmentVariable(
2619 env: *mut SDL_Environment,
2620 name: *const core::ffi::c_char,
2621 ) -> *const core::ffi::c_char;
2622}
2623unsafe extern "C" {
2624 #[doc = " Get all variables in the environment.\n\n **Parameter:** env the environment to query.\n **Returns:** a NULL terminated array of pointers to environment variables in\n the form \"variable=value\" or NULL on failure; call SDL_GetError()\n for more information. This is a single allocation that should be\n freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetEnvironment\n **See Also:** SDL_CreateEnvironment\n **See Also:** SDL_GetEnvironmentVariable\n **See Also:** SDL_SetEnvironmentVariable\n **See Also:** SDL_UnsetEnvironmentVariable\n"]
2625 pub fn SDL_GetEnvironmentVariables(env: *mut SDL_Environment) -> *mut *mut core::ffi::c_char;
2626}
2627unsafe extern "C" {
2628 #[doc = " Set the value of a variable in the environment.\n\n **Parameter:** env the environment to modify.\n **Parameter:** name the name of the variable to set.\n **Parameter:** value the value of the variable to set.\n **Parameter:** overwrite true to overwrite the variable if it exists, false to\n return success without setting the variable if it already\n exists.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetEnvironment\n **See Also:** SDL_CreateEnvironment\n **See Also:** SDL_GetEnvironmentVariable\n **See Also:** SDL_GetEnvironmentVariables\n **See Also:** SDL_UnsetEnvironmentVariable\n"]
2629 pub fn SDL_SetEnvironmentVariable(
2630 env: *mut SDL_Environment,
2631 name: *const core::ffi::c_char,
2632 value: *const core::ffi::c_char,
2633 overwrite: bool,
2634 ) -> bool;
2635}
2636unsafe extern "C" {
2637 #[doc = " Clear a variable from the environment.\n\n **Parameter:** env the environment to modify.\n **Parameter:** name the name of the variable to unset.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetEnvironment\n **See Also:** SDL_CreateEnvironment\n **See Also:** SDL_GetEnvironmentVariable\n **See Also:** SDL_GetEnvironmentVariables\n **See Also:** SDL_SetEnvironmentVariable\n **See Also:** SDL_UnsetEnvironmentVariable\n"]
2638 pub fn SDL_UnsetEnvironmentVariable(
2639 env: *mut SDL_Environment,
2640 name: *const core::ffi::c_char,
2641 ) -> bool;
2642}
2643unsafe extern "C" {
2644 #[doc = " Destroy a set of environment variables.\n\n **Parameter:** env the environment to destroy.\n\n **Thread Safety:** It is safe to call this function from any thread, as long as\n the environment is no longer in use.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateEnvironment\n"]
2645 pub fn SDL_DestroyEnvironment(env: *mut SDL_Environment);
2646}
2647unsafe extern "C" {
2648 #[doc = " Get the value of a variable in the environment.\n\n The name of the variable is case sensitive on all platforms.\n\n This function uses SDL's cached copy of the environment and is thread-safe.\n\n **Parameter:** name the name of the variable to get.\n **Returns:** a pointer to the value of the variable or NULL if it can't be\n found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2649 pub fn SDL_getenv(name: *const core::ffi::c_char) -> *const core::ffi::c_char;
2650}
2651unsafe extern "C" {
2652 #[doc = " Get the value of a variable in the environment.\n\n This function bypasses SDL's cached copy of the environment and is not\n thread-safe.\n\n On some platforms, this may make case-insensitive matches, while other\n platforms are case-sensitive. It is best to be precise with strings used\n for queries through this interface. SDL_getenv is always case-sensitive,\n however.\n\n **Parameter:** name the name of the variable to get.\n **Returns:** a pointer to the value of the variable or NULL if it can't be\n found.\n\n **Thread Safety:** This function is not thread safe, consider using SDL_getenv()\n instead.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_getenv\n"]
2653 pub fn SDL_getenv_unsafe(name: *const core::ffi::c_char) -> *const core::ffi::c_char;
2654}
2655unsafe extern "C" {
2656 #[doc = " Set the value of a variable in the environment.\n\n **Parameter:** name the name of the variable to set.\n **Parameter:** value the value of the variable to set.\n **Parameter:** overwrite 1 to overwrite the variable if it exists, 0 to return\n success without setting the variable if it already exists.\n **Returns:** 0 on success, -1 on error.\n\n **Thread Safety:** This function is not thread safe, consider using\n SDL_SetEnvironmentVariable() instead.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetEnvironmentVariable\n"]
2657 pub fn SDL_setenv_unsafe(
2658 name: *const core::ffi::c_char,
2659 value: *const core::ffi::c_char,
2660 overwrite: core::ffi::c_int,
2661 ) -> core::ffi::c_int;
2662}
2663unsafe extern "C" {
2664 #[doc = " Clear a variable from the environment.\n\n **Parameter:** name the name of the variable to unset.\n **Returns:** 0 on success, -1 on error.\n\n **Thread Safety:** This function is not thread safe, consider using\n SDL_UnsetEnvironmentVariable() instead.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UnsetEnvironmentVariable\n"]
2665 pub fn SDL_unsetenv_unsafe(name: *const core::ffi::c_char) -> core::ffi::c_int;
2666}
2667#[doc = " A callback used with SDL sorting and binary search functions.\n\n **Parameter:** a a pointer to the first element being compared.\n **Parameter:** b a pointer to the second element being compared.\n **Returns:** -1 if `a` should be sorted before `b`, 1 if `b` should be sorted\n before `a`, 0 if they are equal. If two elements are equal, their\n order in the sorted array is undefined.\n\n **Available Since:** This callback is available since SDL 3.2.0.\n\n **See Also:** SDL_bsearch\n **See Also:** SDL_qsort\n"]
2668pub type SDL_CompareCallback = ::core::option::Option<
2669 unsafe extern "C" fn(
2670 a: *const core::ffi::c_void,
2671 b: *const core::ffi::c_void,
2672 ) -> core::ffi::c_int,
2673>;
2674unsafe extern "C" {
2675 #[doc = " Sort an array.\n\n For example:\n\n ```c\n typedef struct {\n int key;\n const char *string;\n } data;\n\n int SDLCALL compare(const void *a, const void *b)\n {\n const data *A = (const data *)a;\n const data *B = (const data *)b;\n\n if (A->n < B->n) {\n return -1;\n } else if (B->n < A->n) {\n return 1;\n } else {\n return 0;\n }\n }\n\n data values[] = {\n { 3, \"third\" }, { 1, \"first\" }, { 2, \"second\" }\n };\n\n SDL_qsort(values, SDL_arraysize(values), sizeof(values[0]), compare);\n ```\n\n **Parameter:** base a pointer to the start of the array.\n **Parameter:** nmemb the number of elements in the array.\n **Parameter:** size the size of the elements in the array.\n **Parameter:** compare a function used to compare elements in the array.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_bsearch\n **See Also:** SDL_qsort_r\n"]
2676 pub fn SDL_qsort(
2677 base: *mut core::ffi::c_void,
2678 nmemb: usize,
2679 size: usize,
2680 compare: SDL_CompareCallback,
2681 );
2682}
2683unsafe extern "C" {
2684 #[doc = " Perform a binary search on a previously sorted array.\n\n For example:\n\n ```c\n typedef struct {\n int key;\n const char *string;\n } data;\n\n int SDLCALL compare(const void *a, const void *b)\n {\n const data *A = (const data *)a;\n const data *B = (const data *)b;\n\n if (A->n < B->n) {\n return -1;\n } else if (B->n < A->n) {\n return 1;\n } else {\n return 0;\n }\n }\n\n data values[] = {\n { 1, \"first\" }, { 2, \"second\" }, { 3, \"third\" }\n };\n data key = { 2, NULL };\n\n data *result = SDL_bsearch(&key, values, SDL_arraysize(values), sizeof(values[0]), compare);\n ```\n\n **Parameter:** key a pointer to a key equal to the element being searched for.\n **Parameter:** base a pointer to the start of the array.\n **Parameter:** nmemb the number of elements in the array.\n **Parameter:** size the size of the elements in the array.\n **Parameter:** compare a function used to compare elements in the array.\n **Returns:** a pointer to the matching element in the array, or NULL if not\n found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_bsearch_r\n **See Also:** SDL_qsort\n"]
2685 pub fn SDL_bsearch(
2686 key: *const core::ffi::c_void,
2687 base: *const core::ffi::c_void,
2688 nmemb: usize,
2689 size: usize,
2690 compare: SDL_CompareCallback,
2691 ) -> *mut core::ffi::c_void;
2692}
2693#[doc = " A callback used with SDL sorting and binary search functions.\n\n **Parameter:** userdata the `userdata` pointer passed to the sort function.\n **Parameter:** a a pointer to the first element being compared.\n **Parameter:** b a pointer to the second element being compared.\n **Returns:** -1 if `a` should be sorted before `b`, 1 if `b` should be sorted\n before `a`, 0 if they are equal. If two elements are equal, their\n order in the sorted array is undefined.\n\n **Available Since:** This callback is available since SDL 3.2.0.\n\n **See Also:** SDL_qsort_r\n **See Also:** SDL_bsearch_r\n"]
2694pub type SDL_CompareCallback_r = ::core::option::Option<
2695 unsafe extern "C" fn(
2696 userdata: *mut core::ffi::c_void,
2697 a: *const core::ffi::c_void,
2698 b: *const core::ffi::c_void,
2699 ) -> core::ffi::c_int,
2700>;
2701unsafe extern "C" {
2702 #[doc = " Sort an array, passing a userdata pointer to the compare function.\n\n For example:\n\n ```c\n typedef enum {\n sort_increasing,\n sort_decreasing,\n } sort_method;\n\n typedef struct {\n int key;\n const char *string;\n } data;\n\n int SDLCALL compare(const void *userdata, const void *a, const void *b)\n {\n sort_method method = (sort_method)(uintptr_t)userdata;\n const data *A = (const data *)a;\n const data *B = (const data *)b;\n\n if (A->key < B->key) {\n return (method == sort_increasing) ? -1 : 1;\n } else if (B->key < A->key) {\n return (method == sort_increasing) ? 1 : -1;\n } else {\n return 0;\n }\n }\n\n data values[] = {\n { 3, \"third\" }, { 1, \"first\" }, { 2, \"second\" }\n };\n\n SDL_qsort_r(values, SDL_arraysize(values), sizeof(values[0]), compare, (const void *)(uintptr_t)sort_increasing);\n ```\n\n **Parameter:** base a pointer to the start of the array.\n **Parameter:** nmemb the number of elements in the array.\n **Parameter:** size the size of the elements in the array.\n **Parameter:** compare a function used to compare elements in the array.\n **Parameter:** userdata a pointer to pass to the compare function.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_bsearch_r\n **See Also:** SDL_qsort\n"]
2703 pub fn SDL_qsort_r(
2704 base: *mut core::ffi::c_void,
2705 nmemb: usize,
2706 size: usize,
2707 compare: SDL_CompareCallback_r,
2708 userdata: *mut core::ffi::c_void,
2709 );
2710}
2711unsafe extern "C" {
2712 #[doc = " Perform a binary search on a previously sorted array, passing a userdata\n pointer to the compare function.\n\n For example:\n\n ```c\n typedef enum {\n sort_increasing,\n sort_decreasing,\n } sort_method;\n\n typedef struct {\n int key;\n const char *string;\n } data;\n\n int SDLCALL compare(const void *userdata, const void *a, const void *b)\n {\n sort_method method = (sort_method)(uintptr_t)userdata;\n const data *A = (const data *)a;\n const data *B = (const data *)b;\n\n if (A->key < B->key) {\n return (method == sort_increasing) ? -1 : 1;\n } else if (B->key < A->key) {\n return (method == sort_increasing) ? 1 : -1;\n } else {\n return 0;\n }\n }\n\n data values[] = {\n { 1, \"first\" }, { 2, \"second\" }, { 3, \"third\" }\n };\n data key = { 2, NULL };\n\n data *result = SDL_bsearch_r(&key, values, SDL_arraysize(values), sizeof(values[0]), compare, (const void *)(uintptr_t)sort_increasing);\n ```\n\n **Parameter:** key a pointer to a key equal to the element being searched for.\n **Parameter:** base a pointer to the start of the array.\n **Parameter:** nmemb the number of elements in the array.\n **Parameter:** size the size of the elements in the array.\n **Parameter:** compare a function used to compare elements in the array.\n **Parameter:** userdata a pointer to pass to the compare function.\n **Returns:** a pointer to the matching element in the array, or NULL if not\n found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_bsearch\n **See Also:** SDL_qsort_r\n"]
2713 pub fn SDL_bsearch_r(
2714 key: *const core::ffi::c_void,
2715 base: *const core::ffi::c_void,
2716 nmemb: usize,
2717 size: usize,
2718 compare: SDL_CompareCallback_r,
2719 userdata: *mut core::ffi::c_void,
2720 ) -> *mut core::ffi::c_void;
2721}
2722unsafe extern "C" {
2723 #[doc = " Compute the absolute value of `x`.\n\n **Parameter:** x an integer value.\n **Returns:** the absolute value of x.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2724 pub fn SDL_abs(x: core::ffi::c_int) -> core::ffi::c_int;
2725}
2726unsafe extern "C" {
2727 #[doc = " Query if a character is alphabetic (a letter).\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n for English 'a-z' and 'A-Z' as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2728 pub fn SDL_isalpha(x: core::ffi::c_int) -> core::ffi::c_int;
2729}
2730unsafe extern "C" {
2731 #[doc = " Query if a character is alphabetic (a letter) or a number.\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n for English 'a-z', 'A-Z', and '0-9' as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2732 pub fn SDL_isalnum(x: core::ffi::c_int) -> core::ffi::c_int;
2733}
2734unsafe extern "C" {
2735 #[doc = " Report if a character is blank (a space or tab).\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n 0x20 (space) or 0x9 (tab) as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2736 pub fn SDL_isblank(x: core::ffi::c_int) -> core::ffi::c_int;
2737}
2738unsafe extern "C" {
2739 #[doc = " Report if a character is a control character.\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n 0 through 0x1F, and 0x7F, as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2740 pub fn SDL_iscntrl(x: core::ffi::c_int) -> core::ffi::c_int;
2741}
2742unsafe extern "C" {
2743 #[doc = " Report if a character is a numeric digit.\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n '0' (0x30) through '9' (0x39), as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2744 pub fn SDL_isdigit(x: core::ffi::c_int) -> core::ffi::c_int;
2745}
2746unsafe extern "C" {
2747 #[doc = " Report if a character is a hexadecimal digit.\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n 'A' through 'F', 'a' through 'f', and '0' through '9', as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2748 pub fn SDL_isxdigit(x: core::ffi::c_int) -> core::ffi::c_int;
2749}
2750unsafe extern "C" {
2751 #[doc = " Report if a character is a punctuation mark.\n\n **WARNING**: Regardless of system locale, this is equivalent to\n `((SDL_isgraph(x)) && (!SDL_isalnum(x)))`.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_isgraph\n **See Also:** SDL_isalnum\n"]
2752 pub fn SDL_ispunct(x: core::ffi::c_int) -> core::ffi::c_int;
2753}
2754unsafe extern "C" {
2755 #[doc = " Report if a character is whitespace.\n\n **WARNING**: Regardless of system locale, this will only treat the\n following ASCII values as true:\n\n - space (0x20)\n - tab (0x09)\n - newline (0x0A)\n - vertical tab (0x0B)\n - form feed (0x0C)\n - return (0x0D)\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2756 pub fn SDL_isspace(x: core::ffi::c_int) -> core::ffi::c_int;
2757}
2758unsafe extern "C" {
2759 #[doc = " Report if a character is upper case.\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n 'A' through 'Z' as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2760 pub fn SDL_isupper(x: core::ffi::c_int) -> core::ffi::c_int;
2761}
2762unsafe extern "C" {
2763 #[doc = " Report if a character is lower case.\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n 'a' through 'z' as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2764 pub fn SDL_islower(x: core::ffi::c_int) -> core::ffi::c_int;
2765}
2766unsafe extern "C" {
2767 #[doc = " Report if a character is \"printable\".\n\n Be advised that \"printable\" has a definition that goes back to text\n terminals from the dawn of computing, making this a sort of special case\n function that is not suitable for Unicode (or most any) text management.\n\n **WARNING**: Regardless of system locale, this will only treat ASCII values\n ' ' (0x20) through '~' (0x7E) as true.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2768 pub fn SDL_isprint(x: core::ffi::c_int) -> core::ffi::c_int;
2769}
2770unsafe extern "C" {
2771 #[doc = " Report if a character is any \"printable\" except space.\n\n Be advised that \"printable\" has a definition that goes back to text\n terminals from the dawn of computing, making this a sort of special case\n function that is not suitable for Unicode (or most any) text management.\n\n **WARNING**: Regardless of system locale, this is equivalent to\n `(SDL_isprint(x)) && ((x) != ' ')`.\n\n **Parameter:** x character value to check.\n **Returns:** non-zero if x falls within the character class, zero otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_isprint\n"]
2772 pub fn SDL_isgraph(x: core::ffi::c_int) -> core::ffi::c_int;
2773}
2774unsafe extern "C" {
2775 #[doc = " Convert low-ASCII English letters to uppercase.\n\n **WARNING**: Regardless of system locale, this will only convert ASCII\n values 'a' through 'z' to uppercase.\n\n This function returns the uppercase equivalent of `x`. If a character\n cannot be converted, or is already uppercase, this function returns `x`.\n\n **Parameter:** x character value to check.\n **Returns:** capitalized version of x, or x if no conversion available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2776 pub fn SDL_toupper(x: core::ffi::c_int) -> core::ffi::c_int;
2777}
2778unsafe extern "C" {
2779 #[doc = " Convert low-ASCII English letters to lowercase.\n\n **WARNING**: Regardless of system locale, this will only convert ASCII\n values 'A' through 'Z' to lowercase.\n\n This function returns the lowercase equivalent of `x`. If a character\n cannot be converted, or is already lowercase, this function returns `x`.\n\n **Parameter:** x character value to check.\n **Returns:** lowercase version of x, or x if no conversion available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2780 pub fn SDL_tolower(x: core::ffi::c_int) -> core::ffi::c_int;
2781}
2782unsafe extern "C" {
2783 #[doc = " Calculate a CRC-16 value.\n\n https://en.wikipedia.org/wiki/Cyclic_redundancy_check\n\n This function can be called multiple times, to stream data to be\n checksummed in blocks. Each call must provide the previous CRC-16 return\n value to be updated with the next block. The first call to this function\n for a set of blocks should pass in a zero CRC value.\n\n **Parameter:** crc the current checksum for this data set, or 0 for a new data set.\n **Parameter:** data a new block of data to add to the checksum.\n **Parameter:** len the size, in bytes, of the new block of data.\n **Returns:** a CRC-16 checksum value of all blocks in the data set.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2784 pub fn SDL_crc16(crc: Uint16, data: *const core::ffi::c_void, len: usize) -> Uint16;
2785}
2786unsafe extern "C" {
2787 #[doc = " Calculate a CRC-32 value.\n\n https://en.wikipedia.org/wiki/Cyclic_redundancy_check\n\n This function can be called multiple times, to stream data to be\n checksummed in blocks. Each call must provide the previous CRC-32 return\n value to be updated with the next block. The first call to this function\n for a set of blocks should pass in a zero CRC value.\n\n **Parameter:** crc the current checksum for this data set, or 0 for a new data set.\n **Parameter:** data a new block of data to add to the checksum.\n **Parameter:** len the size, in bytes, of the new block of data.\n **Returns:** a CRC-32 checksum value of all blocks in the data set.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2788 pub fn SDL_crc32(crc: Uint32, data: *const core::ffi::c_void, len: usize) -> Uint32;
2789}
2790unsafe extern "C" {
2791 #[doc = " Calculate a 32-bit MurmurHash3 value for a block of data.\n\n https://en.wikipedia.org/wiki/MurmurHash\n\n A seed may be specified, which changes the final results consistently, but\n this does not work like SDL_crc16 and SDL_crc32: you can't feed a previous\n result from this function back into itself as the next seed value to\n calculate a hash in chunks; it won't produce the same hash as it would if\n the same data was provided in a single call.\n\n If you aren't sure what to provide for a seed, zero is fine. Murmur3 is not\n cryptographically secure, so it shouldn't be used for hashing top-secret\n data.\n\n **Parameter:** data the data to be hashed.\n **Parameter:** len the size of data, in bytes.\n **Parameter:** seed a value that alters the final hash value.\n **Returns:** a Murmur3 32-bit hash value.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2792 pub fn SDL_murmur3_32(data: *const core::ffi::c_void, len: usize, seed: Uint32) -> Uint32;
2793}
2794unsafe extern "C" {
2795 #[doc = " Copy non-overlapping memory.\n\n The memory regions must not overlap. If they do, use SDL_memmove() instead.\n\n **Parameter:** dst The destination memory region. Must not be NULL, and must not\n overlap with `src`.\n **Parameter:** src The source memory region. Must not be NULL, and must not overlap\n with `dst`.\n **Parameter:** len The length in bytes of both `dst` and `src`.\n **Returns:** `dst`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_memmove\n"]
2796 pub fn SDL_memcpy(
2797 dst: *mut core::ffi::c_void,
2798 src: *const core::ffi::c_void,
2799 len: usize,
2800 ) -> *mut core::ffi::c_void;
2801}
2802unsafe extern "C" {
2803 #[doc = " Copy memory ranges that might overlap.\n\n It is okay for the memory regions to overlap. If you are confident that the\n regions never overlap, using SDL_memcpy() may improve performance.\n\n **Parameter:** dst The destination memory region. Must not be NULL.\n **Parameter:** src The source memory region. Must not be NULL.\n **Parameter:** len The length in bytes of both `dst` and `src`.\n **Returns:** `dst`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_memcpy\n"]
2804 pub fn SDL_memmove(
2805 dst: *mut core::ffi::c_void,
2806 src: *const core::ffi::c_void,
2807 len: usize,
2808 ) -> *mut core::ffi::c_void;
2809}
2810unsafe extern "C" {
2811 #[doc = " Initialize all bytes of buffer of memory to a specific value.\n\n This function will set `len` bytes, pointed to by `dst`, to the value\n specified in `c`.\n\n Despite `c` being an `int` instead of a `char`, this only operates on\n bytes; `c` must be a value between 0 and 255, inclusive.\n\n **Parameter:** dst the destination memory region. Must not be NULL.\n **Parameter:** c the byte value to set.\n **Parameter:** len the length, in bytes, to set in `dst`.\n **Returns:** `dst`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2812 pub fn SDL_memset(
2813 dst: *mut core::ffi::c_void,
2814 c: core::ffi::c_int,
2815 len: usize,
2816 ) -> *mut core::ffi::c_void;
2817}
2818unsafe extern "C" {
2819 #[doc = " Initialize all 32-bit words of buffer of memory to a specific value.\n\n This function will set a buffer of `dwords` Uint32 values, pointed to by\n `dst`, to the value specified in `val`.\n\n Unlike SDL_memset, this sets 32-bit values, not bytes, so it's not limited\n to a range of 0-255.\n\n **Parameter:** dst the destination memory region. Must not be NULL.\n **Parameter:** val the Uint32 value to set.\n **Parameter:** dwords the number of Uint32 values to set in `dst`.\n **Returns:** `dst`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2820 pub fn SDL_memset4(
2821 dst: *mut core::ffi::c_void,
2822 val: Uint32,
2823 dwords: usize,
2824 ) -> *mut core::ffi::c_void;
2825}
2826unsafe extern "C" {
2827 #[doc = " Compare two buffers of memory.\n\n **Parameter:** s1 the first buffer to compare. NULL is not permitted!\n **Parameter:** s2 the second buffer to compare. NULL is not permitted!\n **Parameter:** len the number of bytes to compare between the buffers.\n **Returns:** less than zero if s1 is \"less than\" s2, greater than zero if s1 is\n \"greater than\" s2, and zero if the buffers match exactly for `len`\n bytes.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2828 pub fn SDL_memcmp(
2829 s1: *const core::ffi::c_void,
2830 s2: *const core::ffi::c_void,
2831 len: usize,
2832 ) -> core::ffi::c_int;
2833}
2834unsafe extern "C" {
2835 #[doc = " This works exactly like wcslen() but doesn't require access to a C runtime.\n\n Counts the number of wchar_t values in `wstr`, excluding the null\n terminator.\n\n Like SDL_strlen only counts bytes and not codepoints in a UTF-8 string,\n this counts wchar_t values in a string, even if the string's encoding is of\n variable width, like UTF-16.\n\n Also be aware that wchar_t is different sizes on different platforms (4\n bytes on Linux, 2 on Windows, etc).\n\n **Parameter:** wstr The null-terminated wide string to read. Must not be NULL.\n **Returns:** the length (in wchar_t values, excluding the null terminator) of\n `wstr`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_wcsnlen\n **See Also:** SDL_utf8strlen\n **See Also:** SDL_utf8strnlen\n"]
2836 pub fn SDL_wcslen(wstr: *const wchar_t) -> usize;
2837}
2838unsafe extern "C" {
2839 #[doc = " This works exactly like wcsnlen() but doesn't require access to a C\n runtime.\n\n Counts up to a maximum of `maxlen` wchar_t values in `wstr`, excluding the\n null terminator.\n\n Like SDL_strnlen only counts bytes and not codepoints in a UTF-8 string,\n this counts wchar_t values in a string, even if the string's encoding is of\n variable width, like UTF-16.\n\n Also be aware that wchar_t is different sizes on different platforms (4\n bytes on Linux, 2 on Windows, etc).\n\n Also, `maxlen` is a count of wide characters, not bytes!\n\n **Parameter:** wstr The null-terminated wide string to read. Must not be NULL.\n **Parameter:** maxlen The maximum amount of wide characters to count.\n **Returns:** the length (in wide characters, excluding the null terminator) of\n `wstr` but never more than `maxlen`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_wcslen\n **See Also:** SDL_utf8strlen\n **See Also:** SDL_utf8strnlen\n"]
2840 pub fn SDL_wcsnlen(wstr: *const wchar_t, maxlen: usize) -> usize;
2841}
2842unsafe extern "C" {
2843 #[doc = " Copy a wide string.\n\n This function copies `maxlen` - 1 wide characters from `src` to `dst`, then\n appends a null terminator.\n\n `src` and `dst` must not overlap.\n\n If `maxlen` is 0, no wide characters are copied and no null terminator is\n written.\n\n **Parameter:** dst The destination buffer. Must not be NULL, and must not overlap\n with `src`.\n **Parameter:** src The null-terminated wide string to copy. Must not be NULL, and\n must not overlap with `dst`.\n **Parameter:** maxlen The length (in wide characters) of the destination buffer.\n **Returns:** the length (in wide characters, excluding the null terminator) of\n `src`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_wcslcat\n"]
2844 pub fn SDL_wcslcpy(dst: *mut wchar_t, src: *const wchar_t, maxlen: usize) -> usize;
2845}
2846unsafe extern "C" {
2847 #[doc = " Concatenate wide strings.\n\n This function appends up to `maxlen` - SDL_wcslen(dst) - 1 wide characters\n from `src` to the end of the wide string in `dst`, then appends a null\n terminator.\n\n `src` and `dst` must not overlap.\n\n If `maxlen` - SDL_wcslen(dst) - 1 is less than or equal to 0, then `dst` is\n unmodified.\n\n **Parameter:** dst The destination buffer already containing the first\n null-terminated wide string. Must not be NULL and must not\n overlap with `src`.\n **Parameter:** src The second null-terminated wide string. Must not be NULL, and\n must not overlap with `dst`.\n **Parameter:** maxlen The length (in wide characters) of the destination buffer.\n **Returns:** the length (in wide characters, excluding the null terminator) of\n the string in `dst` plus the length of `src`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_wcslcpy\n"]
2848 pub fn SDL_wcslcat(dst: *mut wchar_t, src: *const wchar_t, maxlen: usize) -> usize;
2849}
2850unsafe extern "C" {
2851 #[doc = " Allocate a copy of a wide string.\n\n This allocates enough space for a null-terminated copy of `wstr`, using\n SDL_malloc, and then makes a copy of the string into this space.\n\n The returned string is owned by the caller, and should be passed to\n SDL_free when no longer needed.\n\n **Parameter:** wstr the string to copy.\n **Returns:** a pointer to the newly-allocated wide string.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2852 pub fn SDL_wcsdup(wstr: *const wchar_t) -> *mut wchar_t;
2853}
2854unsafe extern "C" {
2855 #[doc = " Search a wide string for the first instance of a specific substring.\n\n The search ends once it finds the requested substring, or a null terminator\n byte to end the string.\n\n Note that this looks for strings of _wide characters_, not _codepoints_, so\n it's legal to search for malformed and incomplete UTF-16 sequences.\n\n **Parameter:** haystack the wide string to search. Must not be NULL.\n **Parameter:** needle the wide string to search for. Must not be NULL.\n **Returns:** a pointer to the first instance of `needle` in the string, or NULL\n if not found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2856 pub fn SDL_wcsstr(haystack: *const wchar_t, needle: *const wchar_t) -> *mut wchar_t;
2857}
2858unsafe extern "C" {
2859 #[doc = " Search a wide string, up to n wide chars, for the first instance of a\n specific substring.\n\n The search ends once it finds the requested substring, or a null terminator\n value to end the string, or `maxlen` wide character have been examined. It\n is possible to use this function on a wide string without a null\n terminator.\n\n Note that this looks for strings of _wide characters_, not _codepoints_, so\n it's legal to search for malformed and incomplete UTF-16 sequences.\n\n **Parameter:** haystack the wide string to search. Must not be NULL.\n **Parameter:** needle the wide string to search for. Must not be NULL.\n **Parameter:** maxlen the maximum number of wide characters to search in\n `haystack`.\n **Returns:** a pointer to the first instance of `needle` in the string, or NULL\n if not found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2860 pub fn SDL_wcsnstr(
2861 haystack: *const wchar_t,
2862 needle: *const wchar_t,
2863 maxlen: usize,
2864 ) -> *mut wchar_t;
2865}
2866unsafe extern "C" {
2867 #[doc = " Compare two null-terminated wide strings.\n\n This only compares wchar_t values until it hits a null-terminating\n character; it does not care if the string is well-formed UTF-16 (or UTF-32,\n depending on your platform's wchar_t size), or uses valid Unicode values.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2868 pub fn SDL_wcscmp(str1: *const wchar_t, str2: *const wchar_t) -> core::ffi::c_int;
2869}
2870unsafe extern "C" {
2871 #[doc = " Compare two wide strings up to a number of wchar_t values.\n\n This only compares wchar_t values; it does not care if the string is\n well-formed UTF-16 (or UTF-32, depending on your platform's wchar_t size),\n or uses valid Unicode values.\n\n Note that while this function is intended to be used with UTF-16 (or\n UTF-32, depending on your platform's definition of wchar_t), it is\n comparing raw wchar_t values and not Unicode codepoints: `maxlen` specifies\n a wchar_t limit! If the limit lands in the middle of a multi-wchar UTF-16\n sequence, it will only compare a portion of the final character.\n\n `maxlen` specifies a maximum number of wchar_t to compare; if the strings\n match to this number of wide chars (or both have matched to a\n null-terminator character before this count), they will be considered\n equal.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Parameter:** maxlen the maximum number of wchar_t to compare.\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2872 pub fn SDL_wcsncmp(
2873 str1: *const wchar_t,
2874 str2: *const wchar_t,
2875 maxlen: usize,
2876 ) -> core::ffi::c_int;
2877}
2878unsafe extern "C" {
2879 #[doc = " Compare two null-terminated wide strings, case-insensitively.\n\n This will work with Unicode strings, using a technique called\n \"case-folding\" to handle the vast majority of case-sensitive human\n languages regardless of system locale. It can deal with expanding values: a\n German Eszett character can compare against two ASCII 's' chars and be\n considered a match, for example. A notable exception: it does not handle\n the Turkish 'i' character; human language is complicated!\n\n Depending on your platform, \"wchar_t\" might be 2 bytes, and expected to be\n UTF-16 encoded (like Windows), or 4 bytes in UTF-32 format. Since this\n handles Unicode, it expects the string to be well-formed and not a\n null-terminated string of arbitrary bytes. Characters that are not valid\n UTF-16 (or UTF-32) are treated as Unicode character U+FFFD (REPLACEMENT\n CHARACTER), which is to say two strings of random bits may turn out to\n match if they convert to the same amount of replacement characters.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2880 pub fn SDL_wcscasecmp(str1: *const wchar_t, str2: *const wchar_t) -> core::ffi::c_int;
2881}
2882unsafe extern "C" {
2883 #[doc = " Compare two wide strings, case-insensitively, up to a number of wchar_t.\n\n This will work with Unicode strings, using a technique called\n \"case-folding\" to handle the vast majority of case-sensitive human\n languages regardless of system locale. It can deal with expanding values: a\n German Eszett character can compare against two ASCII 's' chars and be\n considered a match, for example. A notable exception: it does not handle\n the Turkish 'i' character; human language is complicated!\n\n Depending on your platform, \"wchar_t\" might be 2 bytes, and expected to be\n UTF-16 encoded (like Windows), or 4 bytes in UTF-32 format. Since this\n handles Unicode, it expects the string to be well-formed and not a\n null-terminated string of arbitrary bytes. Characters that are not valid\n UTF-16 (or UTF-32) are treated as Unicode character U+FFFD (REPLACEMENT\n CHARACTER), which is to say two strings of random bits may turn out to\n match if they convert to the same amount of replacement characters.\n\n Note that while this function might deal with variable-sized characters,\n `maxlen` specifies a _wchar_ limit! If the limit lands in the middle of a\n multi-byte UTF-16 sequence, it may convert a portion of the final character\n to one or more Unicode character U+FFFD (REPLACEMENT CHARACTER) so as not\n to overflow a buffer.\n\n `maxlen` specifies a maximum number of wchar_t values to compare; if the\n strings match to this number of wchar_t (or both have matched to a\n null-terminator character before this number of bytes), they will be\n considered equal.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Parameter:** maxlen the maximum number of wchar_t values to compare.\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2884 pub fn SDL_wcsncasecmp(
2885 str1: *const wchar_t,
2886 str2: *const wchar_t,
2887 maxlen: usize,
2888 ) -> core::ffi::c_int;
2889}
2890unsafe extern "C" {
2891 #[doc = " Parse a `long` from a wide string.\n\n If `str` starts with whitespace, then those whitespace characters are\n skipped before attempting to parse the number.\n\n If the parsed number does not fit inside a `long`, the result is clamped to\n the minimum and maximum representable `long` values.\n\n **Parameter:** str The null-terminated wide string to read. Must not be NULL.\n **Parameter:** endp If not NULL, the address of the first invalid wide character\n (i.e. the next character after the parsed number) will be\n written to this pointer.\n **Parameter:** base The base of the integer to read. Supported values are 0 and 2\n to 36 inclusive. If 0, the base will be inferred from the\n number's prefix (0x for hexadecimal, 0 for octal, decimal\n otherwise).\n **Returns:** the parsed `long`, or 0 if no number could be parsed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strtol\n"]
2892 pub fn SDL_wcstol(
2893 str_: *const wchar_t,
2894 endp: *mut *mut wchar_t,
2895 base: core::ffi::c_int,
2896 ) -> core::ffi::c_long;
2897}
2898unsafe extern "C" {
2899 #[doc = " This works exactly like strlen() but doesn't require access to a C runtime.\n\n Counts the bytes in `str`, excluding the null terminator.\n\n If you need the length of a UTF-8 string, consider using SDL_utf8strlen().\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Returns:** the length (in bytes, excluding the null terminator) of `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strnlen\n **See Also:** SDL_utf8strlen\n **See Also:** SDL_utf8strnlen\n"]
2900 pub fn SDL_strlen(str_: *const core::ffi::c_char) -> usize;
2901}
2902unsafe extern "C" {
2903 #[doc = " This works exactly like strnlen() but doesn't require access to a C\n runtime.\n\n Counts up to a maximum of `maxlen` bytes in `str`, excluding the null\n terminator.\n\n If you need the length of a UTF-8 string, consider using SDL_utf8strnlen().\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Parameter:** maxlen The maximum amount of bytes to count.\n **Returns:** the length (in bytes, excluding the null terminator) of `src` but\n never more than `maxlen`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strlen\n **See Also:** SDL_utf8strlen\n **See Also:** SDL_utf8strnlen\n"]
2904 pub fn SDL_strnlen(str_: *const core::ffi::c_char, maxlen: usize) -> usize;
2905}
2906unsafe extern "C" {
2907 #[doc = " Copy a string.\n\n This function copies up to `maxlen` - 1 characters from `src` to `dst`,\n then appends a null terminator.\n\n If `maxlen` is 0, no characters are copied and no null terminator is\n written.\n\n If you want to copy an UTF-8 string but need to ensure that multi-byte\n sequences are not truncated, consider using SDL_utf8strlcpy().\n\n **Parameter:** dst The destination buffer. Must not be NULL, and must not overlap\n with `src`.\n **Parameter:** src The null-terminated string to copy. Must not be NULL, and must\n not overlap with `dst`.\n **Parameter:** maxlen The length (in characters) of the destination buffer.\n **Returns:** the length (in characters, excluding the null terminator) of\n `src`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strlcat\n **See Also:** SDL_utf8strlcpy\n"]
2908 pub fn SDL_strlcpy(
2909 dst: *mut core::ffi::c_char,
2910 src: *const core::ffi::c_char,
2911 maxlen: usize,
2912 ) -> usize;
2913}
2914unsafe extern "C" {
2915 #[doc = " Copy an UTF-8 string.\n\n This function copies up to `dst_bytes` - 1 bytes from `src` to `dst` while\n also ensuring that the string written to `dst` does not end in a truncated\n multi-byte sequence. Finally, it appends a null terminator.\n\n `src` and `dst` must not overlap.\n\n Note that unlike SDL_strlcpy(), this function returns the number of bytes\n written, not the length of `src`.\n\n **Parameter:** dst The destination buffer. Must not be NULL, and must not overlap\n with `src`.\n **Parameter:** src The null-terminated UTF-8 string to copy. Must not be NULL, and\n must not overlap with `dst`.\n **Parameter:** dst_bytes The length (in bytes) of the destination buffer. Must not\n be 0.\n **Returns:** the number of bytes written, excluding the null terminator.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strlcpy\n"]
2916 pub fn SDL_utf8strlcpy(
2917 dst: *mut core::ffi::c_char,
2918 src: *const core::ffi::c_char,
2919 dst_bytes: usize,
2920 ) -> usize;
2921}
2922unsafe extern "C" {
2923 #[doc = " Concatenate strings.\n\n This function appends up to `maxlen` - SDL_strlen(dst) - 1 characters from\n `src` to the end of the string in `dst`, then appends a null terminator.\n\n `src` and `dst` must not overlap.\n\n If `maxlen` - SDL_strlen(dst) - 1 is less than or equal to 0, then `dst` is\n unmodified.\n\n **Parameter:** dst The destination buffer already containing the first\n null-terminated string. Must not be NULL and must not overlap\n with `src`.\n **Parameter:** src The second null-terminated string. Must not be NULL, and must\n not overlap with `dst`.\n **Parameter:** maxlen The length (in characters) of the destination buffer.\n **Returns:** the length (in characters, excluding the null terminator) of the\n string in `dst` plus the length of `src`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strlcpy\n"]
2924 pub fn SDL_strlcat(
2925 dst: *mut core::ffi::c_char,
2926 src: *const core::ffi::c_char,
2927 maxlen: usize,
2928 ) -> usize;
2929}
2930unsafe extern "C" {
2931 #[doc = " Allocate a copy of a string.\n\n This allocates enough space for a null-terminated copy of `str`, using\n SDL_malloc, and then makes a copy of the string into this space.\n\n The returned string is owned by the caller, and should be passed to\n SDL_free when no longer needed.\n\n **Parameter:** str the string to copy.\n **Returns:** a pointer to the newly-allocated string.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2932 pub fn SDL_strdup(str_: *const core::ffi::c_char) -> *mut core::ffi::c_char;
2933}
2934unsafe extern "C" {
2935 #[doc = " Allocate a copy of a string, up to n characters.\n\n This allocates enough space for a null-terminated copy of `str`, up to\n `maxlen` bytes, using SDL_malloc, and then makes a copy of the string into\n this space.\n\n If the string is longer than `maxlen` bytes, the returned string will be\n `maxlen` bytes long, plus a null-terminator character that isn't included\n in the count.\n\n The returned string is owned by the caller, and should be passed to\n SDL_free when no longer needed.\n\n **Parameter:** str the string to copy.\n **Parameter:** maxlen the maximum length of the copied string, not counting the\n null-terminator character.\n **Returns:** a pointer to the newly-allocated string.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2936 pub fn SDL_strndup(str_: *const core::ffi::c_char, maxlen: usize) -> *mut core::ffi::c_char;
2937}
2938unsafe extern "C" {
2939 #[doc = " Reverse a string's contents.\n\n This reverses a null-terminated string in-place. Only the content of the\n string is reversed; the null-terminator character remains at the end of the\n reversed string.\n\n **WARNING**: This function reverses the _bytes_ of the string, not the\n codepoints. If `str` is a UTF-8 string with Unicode codepoints > 127, this\n will ruin the string data. You should only use this function on strings\n that are completely comprised of low ASCII characters.\n\n **Parameter:** str the string to reverse.\n **Returns:** `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2940 pub fn SDL_strrev(str_: *mut core::ffi::c_char) -> *mut core::ffi::c_char;
2941}
2942unsafe extern "C" {
2943 #[doc = " Convert a string to uppercase.\n\n **WARNING**: Regardless of system locale, this will only convert ASCII\n values 'a' through 'z' to uppercase.\n\n This function operates on a null-terminated string of bytes--even if it is\n malformed UTF-8!--and converts ASCII characters 'a' through 'z' to their\n uppercase equivalents in-place, returning the original `str` pointer.\n\n **Parameter:** str the string to convert in-place. Can not be NULL.\n **Returns:** the `str` pointer passed into this function.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strlwr\n"]
2944 pub fn SDL_strupr(str_: *mut core::ffi::c_char) -> *mut core::ffi::c_char;
2945}
2946unsafe extern "C" {
2947 #[doc = " Convert a string to lowercase.\n\n **WARNING**: Regardless of system locale, this will only convert ASCII\n values 'A' through 'Z' to lowercase.\n\n This function operates on a null-terminated string of bytes--even if it is\n malformed UTF-8!--and converts ASCII characters 'A' through 'Z' to their\n lowercase equivalents in-place, returning the original `str` pointer.\n\n **Parameter:** str the string to convert in-place. Can not be NULL.\n **Returns:** the `str` pointer passed into this function.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_strupr\n"]
2948 pub fn SDL_strlwr(str_: *mut core::ffi::c_char) -> *mut core::ffi::c_char;
2949}
2950unsafe extern "C" {
2951 #[doc = " Search a string for the first instance of a specific byte.\n\n The search ends once it finds the requested byte value, or a null\n terminator byte to end the string.\n\n Note that this looks for _bytes_, not _characters_, so you cannot match\n against a Unicode codepoint > 255, regardless of character encoding.\n\n **Parameter:** str the string to search. Must not be NULL.\n **Parameter:** c the byte value to search for.\n **Returns:** a pointer to the first instance of `c` in the string, or NULL if\n not found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2952 pub fn SDL_strchr(
2953 str_: *const core::ffi::c_char,
2954 c: core::ffi::c_int,
2955 ) -> *mut core::ffi::c_char;
2956}
2957unsafe extern "C" {
2958 #[doc = " Search a string for the last instance of a specific byte.\n\n The search must go until it finds a null terminator byte to end the string.\n\n Note that this looks for _bytes_, not _characters_, so you cannot match\n against a Unicode codepoint > 255, regardless of character encoding.\n\n **Parameter:** str the string to search. Must not be NULL.\n **Parameter:** c the byte value to search for.\n **Returns:** a pointer to the last instance of `c` in the string, or NULL if\n not found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2959 pub fn SDL_strrchr(
2960 str_: *const core::ffi::c_char,
2961 c: core::ffi::c_int,
2962 ) -> *mut core::ffi::c_char;
2963}
2964unsafe extern "C" {
2965 #[doc = " Search a string for the first instance of a specific substring.\n\n The search ends once it finds the requested substring, or a null terminator\n byte to end the string.\n\n Note that this looks for strings of _bytes_, not _characters_, so it's\n legal to search for malformed and incomplete UTF-8 sequences.\n\n **Parameter:** haystack the string to search. Must not be NULL.\n **Parameter:** needle the string to search for. Must not be NULL.\n **Returns:** a pointer to the first instance of `needle` in the string, or NULL\n if not found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2966 pub fn SDL_strstr(
2967 haystack: *const core::ffi::c_char,
2968 needle: *const core::ffi::c_char,
2969 ) -> *mut core::ffi::c_char;
2970}
2971unsafe extern "C" {
2972 #[doc = " Search a string, up to n bytes, for the first instance of a specific\n substring.\n\n The search ends once it finds the requested substring, or a null terminator\n byte to end the string, or `maxlen` bytes have been examined. It is\n possible to use this function on a string without a null terminator.\n\n Note that this looks for strings of _bytes_, not _characters_, so it's\n legal to search for malformed and incomplete UTF-8 sequences.\n\n **Parameter:** haystack the string to search. Must not be NULL.\n **Parameter:** needle the string to search for. Must not be NULL.\n **Parameter:** maxlen the maximum number of bytes to search in `haystack`.\n **Returns:** a pointer to the first instance of `needle` in the string, or NULL\n if not found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2973 pub fn SDL_strnstr(
2974 haystack: *const core::ffi::c_char,
2975 needle: *const core::ffi::c_char,
2976 maxlen: usize,
2977 ) -> *mut core::ffi::c_char;
2978}
2979unsafe extern "C" {
2980 #[doc = " Search a UTF-8 string for the first instance of a specific substring,\n case-insensitively.\n\n This will work with Unicode strings, using a technique called\n \"case-folding\" to handle the vast majority of case-sensitive human\n languages regardless of system locale. It can deal with expanding values: a\n German Eszett character can compare against two ASCII 's' chars and be\n considered a match, for example. A notable exception: it does not handle\n the Turkish 'i' character; human language is complicated!\n\n Since this handles Unicode, it expects the strings to be well-formed UTF-8\n and not a null-terminated string of arbitrary bytes. Bytes that are not\n valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT\n CHARACTER), which is to say two strings of random bits may turn out to\n match if they convert to the same amount of replacement characters.\n\n **Parameter:** haystack the string to search. Must not be NULL.\n **Parameter:** needle the string to search for. Must not be NULL.\n **Returns:** a pointer to the first instance of `needle` in the string, or NULL\n if not found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2981 pub fn SDL_strcasestr(
2982 haystack: *const core::ffi::c_char,
2983 needle: *const core::ffi::c_char,
2984 ) -> *mut core::ffi::c_char;
2985}
2986unsafe extern "C" {
2987 #[doc = " This works exactly like strtok_r() but doesn't require access to a C\n runtime.\n\n Break a string up into a series of tokens.\n\n To start tokenizing a new string, `str` should be the non-NULL address of\n the string to start tokenizing. Future calls to get the next token from the\n same string should specify a NULL.\n\n Note that this function will overwrite pieces of `str` with null chars to\n split it into tokens. This function cannot be used with const/read-only\n strings!\n\n `saveptr` just needs to point to a `char *` that can be overwritten; SDL\n will use this to save tokenizing state between calls. It is initialized if\n `str` is non-NULL, and used to resume tokenizing when `str` is NULL.\n\n **Parameter:** str the string to tokenize, or NULL to continue tokenizing.\n **Parameter:** delim the delimiter string that separates tokens.\n **Parameter:** saveptr pointer to a char *, used for ongoing state.\n **Returns:** A pointer to the next token, or NULL if no tokens remain.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
2988 pub fn SDL_strtok_r(
2989 str_: *mut core::ffi::c_char,
2990 delim: *const core::ffi::c_char,
2991 saveptr: *mut *mut core::ffi::c_char,
2992 ) -> *mut core::ffi::c_char;
2993}
2994unsafe extern "C" {
2995 #[doc = " Count the number of codepoints in a UTF-8 string.\n\n Counts the _codepoints_, not _bytes_, in `str`, excluding the null\n terminator.\n\n If you need to count the bytes in a string instead, consider using\n SDL_strlen().\n\n Since this handles Unicode, it expects the strings to be well-formed UTF-8\n and not a null-terminated string of arbitrary bytes. Bytes that are not\n valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT\n CHARACTER), so a malformed or incomplete UTF-8 sequence might increase the\n count by several replacement characters.\n\n **Parameter:** str The null-terminated UTF-8 string to read. Must not be NULL.\n **Returns:** The length (in codepoints, excluding the null terminator) of\n `src`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_utf8strnlen\n **See Also:** SDL_strlen\n"]
2996 pub fn SDL_utf8strlen(str_: *const core::ffi::c_char) -> usize;
2997}
2998unsafe extern "C" {
2999 #[doc = " Count the number of codepoints in a UTF-8 string, up to n bytes.\n\n Counts the _codepoints_, not _bytes_, in `str`, excluding the null\n terminator.\n\n If you need to count the bytes in a string instead, consider using\n SDL_strnlen().\n\n The counting stops at `bytes` bytes (not codepoints!). This seems\n counterintuitive, but makes it easy to express the total size of the\n string's buffer.\n\n Since this handles Unicode, it expects the strings to be well-formed UTF-8\n and not a null-terminated string of arbitrary bytes. Bytes that are not\n valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT\n CHARACTER), so a malformed or incomplete UTF-8 sequence might increase the\n count by several replacement characters.\n\n **Parameter:** str The null-terminated UTF-8 string to read. Must not be NULL.\n **Parameter:** bytes The maximum amount of bytes to count.\n **Returns:** The length (in codepoints, excluding the null terminator) of `src`\n but never more than `maxlen`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_utf8strlen\n **See Also:** SDL_strnlen\n"]
3000 pub fn SDL_utf8strnlen(str_: *const core::ffi::c_char, bytes: usize) -> usize;
3001}
3002unsafe extern "C" {
3003 #[doc = " Convert an integer into a string.\n\n This requires a radix to specified for string format. Specifying 10\n produces a decimal number, 16 hexadecimal, etc. Must be in the range of 2\n to 36.\n\n Note that this function will overflow a buffer if `str` is not large enough\n to hold the output! It may be safer to use SDL_snprintf to clamp output, or\n SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate\n much more space than you expect to use (and don't forget possible negative\n signs, null terminator bytes, etc).\n\n **Parameter:** value the integer to convert.\n **Parameter:** str the buffer to write the string into.\n **Parameter:** radix the radix to use for string generation.\n **Returns:** `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_uitoa\n **See Also:** SDL_ltoa\n **See Also:** SDL_lltoa\n"]
3004 pub fn SDL_itoa(
3005 value: core::ffi::c_int,
3006 str_: *mut core::ffi::c_char,
3007 radix: core::ffi::c_int,
3008 ) -> *mut core::ffi::c_char;
3009}
3010unsafe extern "C" {
3011 #[doc = " Convert an unsigned integer into a string.\n\n This requires a radix to specified for string format. Specifying 10\n produces a decimal number, 16 hexadecimal, etc. Must be in the range of 2\n to 36.\n\n Note that this function will overflow a buffer if `str` is not large enough\n to hold the output! It may be safer to use SDL_snprintf to clamp output, or\n SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate\n much more space than you expect to use (and don't forget null terminator\n bytes, etc).\n\n **Parameter:** value the unsigned integer to convert.\n **Parameter:** str the buffer to write the string into.\n **Parameter:** radix the radix to use for string generation.\n **Returns:** `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_itoa\n **See Also:** SDL_ultoa\n **See Also:** SDL_ulltoa\n"]
3012 pub fn SDL_uitoa(
3013 value: core::ffi::c_uint,
3014 str_: *mut core::ffi::c_char,
3015 radix: core::ffi::c_int,
3016 ) -> *mut core::ffi::c_char;
3017}
3018unsafe extern "C" {
3019 #[doc = " Convert a long integer into a string.\n\n This requires a radix to specified for string format. Specifying 10\n produces a decimal number, 16 hexadecimal, etc. Must be in the range of 2\n to 36.\n\n Note that this function will overflow a buffer if `str` is not large enough\n to hold the output! It may be safer to use SDL_snprintf to clamp output, or\n SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate\n much more space than you expect to use (and don't forget possible negative\n signs, null terminator bytes, etc).\n\n **Parameter:** value the long integer to convert.\n **Parameter:** str the buffer to write the string into.\n **Parameter:** radix the radix to use for string generation.\n **Returns:** `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ultoa\n **See Also:** SDL_itoa\n **See Also:** SDL_lltoa\n"]
3020 pub fn SDL_ltoa(
3021 value: core::ffi::c_long,
3022 str_: *mut core::ffi::c_char,
3023 radix: core::ffi::c_int,
3024 ) -> *mut core::ffi::c_char;
3025}
3026unsafe extern "C" {
3027 #[doc = " Convert an unsigned long integer into a string.\n\n This requires a radix to specified for string format. Specifying 10\n produces a decimal number, 16 hexadecimal, etc. Must be in the range of 2\n to 36.\n\n Note that this function will overflow a buffer if `str` is not large enough\n to hold the output! It may be safer to use SDL_snprintf to clamp output, or\n SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate\n much more space than you expect to use (and don't forget null terminator\n bytes, etc).\n\n **Parameter:** value the unsigned long integer to convert.\n **Parameter:** str the buffer to write the string into.\n **Parameter:** radix the radix to use for string generation.\n **Returns:** `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ltoa\n **See Also:** SDL_uitoa\n **See Also:** SDL_ulltoa\n"]
3028 pub fn SDL_ultoa(
3029 value: core::ffi::c_ulong,
3030 str_: *mut core::ffi::c_char,
3031 radix: core::ffi::c_int,
3032 ) -> *mut core::ffi::c_char;
3033}
3034unsafe extern "C" {
3035 #[doc = " Convert a long long integer into a string.\n\n This requires a radix to specified for string format. Specifying 10\n produces a decimal number, 16 hexadecimal, etc. Must be in the range of 2\n to 36.\n\n Note that this function will overflow a buffer if `str` is not large enough\n to hold the output! It may be safer to use SDL_snprintf to clamp output, or\n SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate\n much more space than you expect to use (and don't forget possible negative\n signs, null terminator bytes, etc).\n\n **Parameter:** value the long long integer to convert.\n **Parameter:** str the buffer to write the string into.\n **Parameter:** radix the radix to use for string generation.\n **Returns:** `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ulltoa\n **See Also:** SDL_itoa\n **See Also:** SDL_ltoa\n"]
3036 pub fn SDL_lltoa(
3037 value: core::ffi::c_longlong,
3038 str_: *mut core::ffi::c_char,
3039 radix: core::ffi::c_int,
3040 ) -> *mut core::ffi::c_char;
3041}
3042unsafe extern "C" {
3043 #[doc = " Convert an unsigned long long integer into a string.\n\n This requires a radix to specified for string format. Specifying 10\n produces a decimal number, 16 hexadecimal, etc. Must be in the range of 2\n to 36.\n\n Note that this function will overflow a buffer if `str` is not large enough\n to hold the output! It may be safer to use SDL_snprintf to clamp output, or\n SDL_asprintf to allocate a buffer. Otherwise, it doesn't hurt to allocate\n much more space than you expect to use (and don't forget null terminator\n bytes, etc).\n\n **Parameter:** value the unsigned long long integer to convert.\n **Parameter:** str the buffer to write the string into.\n **Parameter:** radix the radix to use for string generation.\n **Returns:** `str`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_lltoa\n **See Also:** SDL_uitoa\n **See Also:** SDL_ultoa\n"]
3044 pub fn SDL_ulltoa(
3045 value: core::ffi::c_ulonglong,
3046 str_: *mut core::ffi::c_char,
3047 radix: core::ffi::c_int,
3048 ) -> *mut core::ffi::c_char;
3049}
3050unsafe extern "C" {
3051 #[doc = " Parse an `int` from a string.\n\n The result of calling `SDL_atoi(str)` is equivalent to\n `(int)SDL_strtol(str, NULL, 10)`.\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Returns:** the parsed `int`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atof\n **See Also:** SDL_strtol\n **See Also:** SDL_strtoul\n **See Also:** SDL_strtoll\n **See Also:** SDL_strtoull\n **See Also:** SDL_strtod\n **See Also:** SDL_itoa\n"]
3052 pub fn SDL_atoi(str_: *const core::ffi::c_char) -> core::ffi::c_int;
3053}
3054unsafe extern "C" {
3055 #[doc = " Parse a `double` from a string.\n\n The result of calling `SDL_atof(str)` is equivalent to `SDL_strtod(str,\n NULL)`.\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Returns:** the parsed `double`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atoi\n **See Also:** SDL_strtol\n **See Also:** SDL_strtoul\n **See Also:** SDL_strtoll\n **See Also:** SDL_strtoull\n **See Also:** SDL_strtod\n"]
3056 pub fn SDL_atof(str_: *const core::ffi::c_char) -> f64;
3057}
3058unsafe extern "C" {
3059 #[doc = " Parse a `long` from a string.\n\n If `str` starts with whitespace, then those whitespace characters are\n skipped before attempting to parse the number.\n\n If the parsed number does not fit inside a `long`, the result is clamped to\n the minimum and maximum representable `long` values.\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Parameter:** endp If not NULL, the address of the first invalid character (i.e.\n the next character after the parsed number) will be written to\n this pointer.\n **Parameter:** base The base of the integer to read. Supported values are 0 and 2\n to 36 inclusive. If 0, the base will be inferred from the\n number's prefix (0x for hexadecimal, 0 for octal, decimal\n otherwise).\n **Returns:** the parsed `long`, or 0 if no number could be parsed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atoi\n **See Also:** SDL_atof\n **See Also:** SDL_strtoul\n **See Also:** SDL_strtoll\n **See Also:** SDL_strtoull\n **See Also:** SDL_strtod\n **See Also:** SDL_ltoa\n **See Also:** SDL_wcstol\n"]
3060 pub fn SDL_strtol(
3061 str_: *const core::ffi::c_char,
3062 endp: *mut *mut core::ffi::c_char,
3063 base: core::ffi::c_int,
3064 ) -> core::ffi::c_long;
3065}
3066unsafe extern "C" {
3067 #[doc = " Parse an `unsigned long` from a string.\n\n If `str` starts with whitespace, then those whitespace characters are\n skipped before attempting to parse the number.\n\n If the parsed number does not fit inside an `unsigned long`, the result is\n clamped to the maximum representable `unsigned long` value.\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Parameter:** endp If not NULL, the address of the first invalid character (i.e.\n the next character after the parsed number) will be written to\n this pointer.\n **Parameter:** base The base of the integer to read. Supported values are 0 and 2\n to 36 inclusive. If 0, the base will be inferred from the\n number's prefix (0x for hexadecimal, 0 for octal, decimal\n otherwise).\n **Returns:** the parsed `unsigned long`, or 0 if no number could be parsed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atoi\n **See Also:** SDL_atof\n **See Also:** SDL_strtol\n **See Also:** SDL_strtoll\n **See Also:** SDL_strtoull\n **See Also:** SDL_strtod\n **See Also:** SDL_ultoa\n"]
3068 pub fn SDL_strtoul(
3069 str_: *const core::ffi::c_char,
3070 endp: *mut *mut core::ffi::c_char,
3071 base: core::ffi::c_int,
3072 ) -> core::ffi::c_ulong;
3073}
3074unsafe extern "C" {
3075 #[doc = " Parse a `long long` from a string.\n\n If `str` starts with whitespace, then those whitespace characters are\n skipped before attempting to parse the number.\n\n If the parsed number does not fit inside a `long long`, the result is\n clamped to the minimum and maximum representable `long long` values.\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Parameter:** endp If not NULL, the address of the first invalid character (i.e.\n the next character after the parsed number) will be written to\n this pointer.\n **Parameter:** base The base of the integer to read. Supported values are 0 and 2\n to 36 inclusive. If 0, the base will be inferred from the\n number's prefix (0x for hexadecimal, 0 for octal, decimal\n otherwise).\n **Returns:** the parsed `long long`, or 0 if no number could be parsed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atoi\n **See Also:** SDL_atof\n **See Also:** SDL_strtol\n **See Also:** SDL_strtoul\n **See Also:** SDL_strtoull\n **See Also:** SDL_strtod\n **See Also:** SDL_lltoa\n"]
3076 pub fn SDL_strtoll(
3077 str_: *const core::ffi::c_char,
3078 endp: *mut *mut core::ffi::c_char,
3079 base: core::ffi::c_int,
3080 ) -> core::ffi::c_longlong;
3081}
3082unsafe extern "C" {
3083 #[doc = " Parse an `unsigned long long` from a string.\n\n If `str` starts with whitespace, then those whitespace characters are\n skipped before attempting to parse the number.\n\n If the parsed number does not fit inside an `unsigned long long`, the\n result is clamped to the maximum representable `unsigned long long` value.\n\n **Parameter:** str The null-terminated string to read. Must not be NULL.\n **Parameter:** endp If not NULL, the address of the first invalid character (i.e.\n the next character after the parsed number) will be written to\n this pointer.\n **Parameter:** base The base of the integer to read. Supported values are 0 and 2\n to 36 inclusive. If 0, the base will be inferred from the\n number's prefix (0x for hexadecimal, 0 for octal, decimal\n otherwise).\n **Returns:** the parsed `unsigned long long`, or 0 if no number could be\n parsed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atoi\n **See Also:** SDL_atof\n **See Also:** SDL_strtol\n **See Also:** SDL_strtoll\n **See Also:** SDL_strtoul\n **See Also:** SDL_strtod\n **See Also:** SDL_ulltoa\n"]
3084 pub fn SDL_strtoull(
3085 str_: *const core::ffi::c_char,
3086 endp: *mut *mut core::ffi::c_char,
3087 base: core::ffi::c_int,
3088 ) -> core::ffi::c_ulonglong;
3089}
3090unsafe extern "C" {
3091 #[doc = " Parse a `double` from a string.\n\n This function makes fewer guarantees than the C runtime `strtod`:\n\n - Only decimal notation is guaranteed to be supported. The handling of\n scientific and hexadecimal notation is unspecified.\n - Whether or not INF and NAN can be parsed is unspecified.\n - The precision of the result is unspecified.\n\n **Parameter:** str the null-terminated string to read. Must not be NULL.\n **Parameter:** endp if not NULL, the address of the first invalid character (i.e.\n the next character after the parsed number) will be written to\n this pointer.\n **Returns:** the parsed `double`, or 0 if no number could be parsed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atoi\n **See Also:** SDL_atof\n **See Also:** SDL_strtol\n **See Also:** SDL_strtoll\n **See Also:** SDL_strtoul\n **See Also:** SDL_strtoull\n"]
3092 pub fn SDL_strtod(str_: *const core::ffi::c_char, endp: *mut *mut core::ffi::c_char) -> f64;
3093}
3094unsafe extern "C" {
3095 #[doc = " Compare two null-terminated UTF-8 strings.\n\n Due to the nature of UTF-8 encoding, this will work with Unicode strings,\n since effectively this function just compares bytes until it hits a\n null-terminating character. Also due to the nature of UTF-8, this can be\n used with SDL_qsort() to put strings in (roughly) alphabetical order.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3096 pub fn SDL_strcmp(
3097 str1: *const core::ffi::c_char,
3098 str2: *const core::ffi::c_char,
3099 ) -> core::ffi::c_int;
3100}
3101unsafe extern "C" {
3102 #[doc = " Compare two UTF-8 strings up to a number of bytes.\n\n Due to the nature of UTF-8 encoding, this will work with Unicode strings,\n since effectively this function just compares bytes until it hits a\n null-terminating character. Also due to the nature of UTF-8, this can be\n used with SDL_qsort() to put strings in (roughly) alphabetical order.\n\n Note that while this function is intended to be used with UTF-8, it is\n doing a bytewise comparison, and `maxlen` specifies a _byte_ limit! If the\n limit lands in the middle of a multi-byte UTF-8 sequence, it will only\n compare a portion of the final character.\n\n `maxlen` specifies a maximum number of bytes to compare; if the strings\n match to this number of bytes (or both have matched to a null-terminator\n character before this number of bytes), they will be considered equal.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Parameter:** maxlen the maximum number of _bytes_ to compare.\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3103 pub fn SDL_strncmp(
3104 str1: *const core::ffi::c_char,
3105 str2: *const core::ffi::c_char,
3106 maxlen: usize,
3107 ) -> core::ffi::c_int;
3108}
3109unsafe extern "C" {
3110 #[doc = " Compare two null-terminated UTF-8 strings, case-insensitively.\n\n This will work with Unicode strings, using a technique called\n \"case-folding\" to handle the vast majority of case-sensitive human\n languages regardless of system locale. It can deal with expanding values: a\n German Eszett character can compare against two ASCII 's' chars and be\n considered a match, for example. A notable exception: it does not handle\n the Turkish 'i' character; human language is complicated!\n\n Since this handles Unicode, it expects the string to be well-formed UTF-8\n and not a null-terminated string of arbitrary bytes. Bytes that are not\n valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT\n CHARACTER), which is to say two strings of random bits may turn out to\n match if they convert to the same amount of replacement characters.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3111 pub fn SDL_strcasecmp(
3112 str1: *const core::ffi::c_char,
3113 str2: *const core::ffi::c_char,
3114 ) -> core::ffi::c_int;
3115}
3116unsafe extern "C" {
3117 #[doc = " Compare two UTF-8 strings, case-insensitively, up to a number of bytes.\n\n This will work with Unicode strings, using a technique called\n \"case-folding\" to handle the vast majority of case-sensitive human\n languages regardless of system locale. It can deal with expanding values: a\n German Eszett character can compare against two ASCII 's' chars and be\n considered a match, for example. A notable exception: it does not handle\n the Turkish 'i' character; human language is complicated!\n\n Since this handles Unicode, it expects the string to be well-formed UTF-8\n and not a null-terminated string of arbitrary bytes. Bytes that are not\n valid UTF-8 are treated as Unicode character U+FFFD (REPLACEMENT\n CHARACTER), which is to say two strings of random bits may turn out to\n match if they convert to the same amount of replacement characters.\n\n Note that while this function is intended to be used with UTF-8, `maxlen`\n specifies a _byte_ limit! If the limit lands in the middle of a multi-byte\n UTF-8 sequence, it may convert a portion of the final character to one or\n more Unicode character U+FFFD (REPLACEMENT CHARACTER) so as not to overflow\n a buffer.\n\n `maxlen` specifies a maximum number of bytes to compare; if the strings\n match to this number of bytes (or both have matched to a null-terminator\n character before this number of bytes), they will be considered equal.\n\n **Parameter:** str1 the first string to compare. NULL is not permitted!\n **Parameter:** str2 the second string to compare. NULL is not permitted!\n **Parameter:** maxlen the maximum number of bytes to compare.\n **Returns:** less than zero if str1 is \"less than\" str2, greater than zero if\n str1 is \"greater than\" str2, and zero if the strings match\n exactly.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3118 pub fn SDL_strncasecmp(
3119 str1: *const core::ffi::c_char,
3120 str2: *const core::ffi::c_char,
3121 maxlen: usize,
3122 ) -> core::ffi::c_int;
3123}
3124unsafe extern "C" {
3125 #[doc = " Searches a string for the first occurrence of any character contained in a\n breakset, and returns a pointer from the string to that character.\n\n **Parameter:** str The null-terminated string to be searched. Must not be NULL, and\n must not overlap with `breakset`.\n **Parameter:** breakset A null-terminated string containing the list of characters\n to look for. Must not be NULL, and must not overlap with\n `str`.\n **Returns:** A pointer to the location, in str, of the first occurrence of a\n character present in the breakset, or NULL if none is found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3126 pub fn SDL_strpbrk(
3127 str_: *const core::ffi::c_char,
3128 breakset: *const core::ffi::c_char,
3129 ) -> *mut core::ffi::c_char;
3130}
3131unsafe extern "C" {
3132 #[doc = " Decode a UTF-8 string, one Unicode codepoint at a time.\n\n This will return the first Unicode codepoint in the UTF-8 encoded string in\n `*pstr`, and then advance `*pstr` past any consumed bytes before returning.\n\n It will not access more than `*pslen` bytes from the string. `*pslen` will\n be adjusted, as well, subtracting the number of bytes consumed.\n\n `pslen` is allowed to be NULL, in which case the string _must_ be\n NULL-terminated, as the function will blindly read until it sees the NULL\n char.\n\n if `*pslen` is zero, it assumes the end of string is reached and returns a\n zero codepoint regardless of the contents of the string buffer.\n\n If the resulting codepoint is zero (a NULL terminator), or `*pslen` is\n zero, it will not advance `*pstr` or `*pslen` at all.\n\n Generally this function is called in a loop until it returns zero,\n adjusting its parameters each iteration.\n\n If an invalid UTF-8 sequence is encountered, this function returns\n SDL_INVALID_UNICODE_CODEPOINT and advances the string/length by one byte\n (which is to say, a multibyte sequence might produce several\n SDL_INVALID_UNICODE_CODEPOINT returns before it syncs to the next valid\n UTF-8 sequence).\n\n Several things can generate invalid UTF-8 sequences, including overlong\n encodings, the use of UTF-16 surrogate values, and truncated data. Please\n refer to\n [RFC3629](https://www.ietf.org/rfc/rfc3629.txt)\n for details.\n\n **Parameter:** pstr a pointer to a UTF-8 string pointer to be read and adjusted.\n **Parameter:** pslen a pointer to the number of bytes in the string, to be read and\n adjusted. NULL is allowed.\n **Returns:** the first Unicode codepoint in the string.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3133 pub fn SDL_StepUTF8(pstr: *mut *const core::ffi::c_char, pslen: *mut usize) -> Uint32;
3134}
3135unsafe extern "C" {
3136 #[doc = " Decode a UTF-8 string in reverse, one Unicode codepoint at a time.\n\n This will go to the start of the previous Unicode codepoint in the string,\n move `*pstr` to that location and return that codepoint.\n\n If `*pstr` is already at the start of the string), it will not advance\n `*pstr` at all.\n\n Generally this function is called in a loop until it returns zero,\n adjusting its parameter each iteration.\n\n If an invalid UTF-8 sequence is encountered, this function returns\n SDL_INVALID_UNICODE_CODEPOINT.\n\n Several things can generate invalid UTF-8 sequences, including overlong\n encodings, the use of UTF-16 surrogate values, and truncated data. Please\n refer to\n [RFC3629](https://www.ietf.org/rfc/rfc3629.txt)\n for details.\n\n **Parameter:** start a pointer to the beginning of the UTF-8 string.\n **Parameter:** pstr a pointer to a UTF-8 string pointer to be read and adjusted.\n **Returns:** the previous Unicode codepoint in the string.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3137 pub fn SDL_StepBackUTF8(
3138 start: *const core::ffi::c_char,
3139 pstr: *mut *const core::ffi::c_char,
3140 ) -> Uint32;
3141}
3142unsafe extern "C" {
3143 #[doc = " Convert a single Unicode codepoint to UTF-8.\n\n The buffer pointed to by `dst` must be at least 4 bytes long, as this\n function may generate between 1 and 4 bytes of output.\n\n This function returns the first byte _after_ the newly-written UTF-8\n sequence, which is useful for encoding multiple codepoints in a loop, or\n knowing where to write a NULL-terminator character to end the string (in\n either case, plan to have a buffer of _more_ than 4 bytes!).\n\n If `codepoint` is an invalid value (outside the Unicode range, or a UTF-16\n surrogate value, etc), this will use U+FFFD (REPLACEMENT CHARACTER) for the\n codepoint instead, and not set an error.\n\n If `dst` is NULL, this returns NULL immediately without writing to the\n pointer and without setting an error.\n\n **Parameter:** codepoint a Unicode codepoint to convert to UTF-8.\n **Parameter:** dst the location to write the encoded UTF-8. Must point to at least\n 4 bytes!\n **Returns:** the first byte past the newly-written UTF-8 sequence.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3144 pub fn SDL_UCS4ToUTF8(codepoint: Uint32, dst: *mut core::ffi::c_char)
3145 -> *mut core::ffi::c_char;
3146}
3147unsafe extern "C" {
3148 #[doc = " This works exactly like sscanf() but doesn't require access to a C runtime.\n\n Scan a string, matching a format string, converting each '%' item and\n storing it to pointers provided through variable arguments.\n\n **Parameter:** text the string to scan. Must not be NULL.\n **Parameter:** fmt a printf-style format string. Must not be NULL.\n **Parameter:** ... a list of pointers to values to be filled in with scanned items.\n **Returns:** the number of items that matched the format string.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3149 pub fn SDL_sscanf(
3150 text: *const core::ffi::c_char,
3151 fmt: *const core::ffi::c_char,
3152 ...
3153 ) -> core::ffi::c_int;
3154}
3155unsafe extern "C" {
3156 #[doc = " This works exactly like vsscanf() but doesn't require access to a C\n runtime.\n\n Functions identically to SDL_sscanf(), except it takes a `va_list` instead\n of using `...` variable arguments.\n\n **Parameter:** text the string to scan. Must not be NULL.\n **Parameter:** fmt a printf-style format string. Must not be NULL.\n **Parameter:** ap a `va_list` of pointers to values to be filled in with scanned\n items.\n **Returns:** the number of items that matched the format string.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3157 pub fn SDL_vsscanf(
3158 text: *const core::ffi::c_char,
3159 fmt: *const core::ffi::c_char,
3160 ap: *mut __va_list_tag,
3161 ) -> core::ffi::c_int;
3162}
3163unsafe extern "C" {
3164 #[doc = " This works exactly like snprintf() but doesn't require access to a C\n runtime.\n\n Format a string of up to `maxlen`-1 bytes, converting each '%' item with\n values provided through variable arguments.\n\n While some C runtimes differ on how to deal with too-large strings, this\n function null-terminates the output, by treating the null-terminator as\n part of the `maxlen` count. Note that if `maxlen` is zero, however, no\n bytes will be written at all.\n\n This function returns the number of _bytes_ (not _characters_) that should\n be written, excluding the null-terminator character. If this returns a\n number >= `maxlen`, it means the output string was truncated. A negative\n return value means an error occurred.\n\n Referencing the output string's pointer with a format item is undefined\n behavior.\n\n **Parameter:** text the buffer to write the string into. Must not be NULL.\n **Parameter:** maxlen the maximum bytes to write, including the null-terminator.\n **Parameter:** fmt a printf-style format string. Must not be NULL.\n **Parameter:** ... a list of values to be used with the format string.\n **Returns:** the number of bytes that should be written, not counting the\n null-terminator char, or a negative value on error.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3165 pub fn SDL_snprintf(
3166 text: *mut core::ffi::c_char,
3167 maxlen: usize,
3168 fmt: *const core::ffi::c_char,
3169 ...
3170 ) -> core::ffi::c_int;
3171}
3172unsafe extern "C" {
3173 #[doc = " This works exactly like swprintf() but doesn't require access to a C\n runtime.\n\n Format a wide string of up to `maxlen`-1 wchar_t values, converting each\n '%' item with values provided through variable arguments.\n\n While some C runtimes differ on how to deal with too-large strings, this\n function null-terminates the output, by treating the null-terminator as\n part of the `maxlen` count. Note that if `maxlen` is zero, however, no wide\n characters will be written at all.\n\n This function returns the number of _wide characters_ (not _codepoints_)\n that should be written, excluding the null-terminator character. If this\n returns a number >= `maxlen`, it means the output string was truncated. A\n negative return value means an error occurred.\n\n Referencing the output string's pointer with a format item is undefined\n behavior.\n\n **Parameter:** text the buffer to write the wide string into. Must not be NULL.\n **Parameter:** maxlen the maximum wchar_t values to write, including the\n null-terminator.\n **Parameter:** fmt a printf-style format string. Must not be NULL.\n **Parameter:** ... a list of values to be used with the format string.\n **Returns:** the number of wide characters that should be written, not counting\n the null-terminator char, or a negative value on error.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3174 pub fn SDL_swprintf(
3175 text: *mut wchar_t,
3176 maxlen: usize,
3177 fmt: *const wchar_t,
3178 ...
3179 ) -> core::ffi::c_int;
3180}
3181unsafe extern "C" {
3182 #[doc = " This works exactly like vsnprintf() but doesn't require access to a C\n runtime.\n\n Functions identically to SDL_snprintf(), except it takes a `va_list`\n instead of using `...` variable arguments.\n\n **Parameter:** text the buffer to write the string into. Must not be NULL.\n **Parameter:** maxlen the maximum bytes to write, including the null-terminator.\n **Parameter:** fmt a printf-style format string. Must not be NULL.\n **Parameter:** ap a `va_list` values to be used with the format string.\n **Returns:** the number of bytes that should be written, not counting the\n null-terminator char, or a negative value on error.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3183 pub fn SDL_vsnprintf(
3184 text: *mut core::ffi::c_char,
3185 maxlen: usize,
3186 fmt: *const core::ffi::c_char,
3187 ap: *mut __va_list_tag,
3188 ) -> core::ffi::c_int;
3189}
3190unsafe extern "C" {
3191 #[doc = " This works exactly like vswprintf() but doesn't require access to a C\n runtime.\n\n Functions identically to SDL_swprintf(), except it takes a `va_list`\n instead of using `...` variable arguments.\n\n **Parameter:** text the buffer to write the string into. Must not be NULL.\n **Parameter:** maxlen the maximum wide characters to write, including the\n null-terminator.\n **Parameter:** fmt a printf-style format wide string. Must not be NULL.\n **Parameter:** ap a `va_list` values to be used with the format string.\n **Returns:** the number of wide characters that should be written, not counting\n the null-terminator char, or a negative value on error.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3192 pub fn SDL_vswprintf(
3193 text: *mut wchar_t,
3194 maxlen: usize,
3195 fmt: *const wchar_t,
3196 ap: *mut __va_list_tag,
3197 ) -> core::ffi::c_int;
3198}
3199unsafe extern "C" {
3200 #[doc = " This works exactly like asprintf() but doesn't require access to a C\n runtime.\n\n Functions identically to SDL_snprintf(), except it allocates a buffer large\n enough to hold the output string on behalf of the caller.\n\n On success, this function returns the number of bytes (not characters)\n comprising the output string, not counting the null-terminator character,\n and sets `*strp` to the newly-allocated string.\n\n On error, this function returns a negative number, and the value of `*strp`\n is undefined.\n\n The returned string is owned by the caller, and should be passed to\n SDL_free when no longer needed.\n\n **Parameter:** strp on output, is set to the new string. Must not be NULL.\n **Parameter:** fmt a printf-style format string. Must not be NULL.\n **Parameter:** ... a list of values to be used with the format string.\n **Returns:** the number of bytes in the newly-allocated string, not counting\n the null-terminator char, or a negative value on error.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3201 pub fn SDL_asprintf(
3202 strp: *mut *mut core::ffi::c_char,
3203 fmt: *const core::ffi::c_char,
3204 ...
3205 ) -> core::ffi::c_int;
3206}
3207unsafe extern "C" {
3208 #[doc = " This works exactly like vasprintf() but doesn't require access to a C\n runtime.\n\n Functions identically to SDL_asprintf(), except it takes a `va_list`\n instead of using `...` variable arguments.\n\n **Parameter:** strp on output, is set to the new string. Must not be NULL.\n **Parameter:** fmt a printf-style format string. Must not be NULL.\n **Parameter:** ap a `va_list` values to be used with the format string.\n **Returns:** the number of bytes in the newly-allocated string, not counting\n the null-terminator char, or a negative value on error.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3209 pub fn SDL_vasprintf(
3210 strp: *mut *mut core::ffi::c_char,
3211 fmt: *const core::ffi::c_char,
3212 ap: *mut __va_list_tag,
3213 ) -> core::ffi::c_int;
3214}
3215unsafe extern "C" {
3216 #[doc = " Seeds the pseudo-random number generator.\n\n Reusing the seed number will cause SDL_rand() to repeat the same stream of\n 'random' numbers.\n\n **Parameter:** seed the value to use as a random number seed, or 0 to use\n SDL_GetPerformanceCounter().\n\n **Thread Safety:** This should be called on the same thread that calls\n SDL_rand()\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_rand\n **See Also:** SDL_rand_bits\n **See Also:** SDL_randf\n"]
3217 pub fn SDL_srand(seed: Uint64);
3218}
3219unsafe extern "C" {
3220 #[doc = " Generate a pseudo-random number less than n for positive n\n\n The method used is faster and of better quality than `rand() % n`. Odds are\n roughly 99.9% even for n = 1 million. Evenness is better for smaller n, and\n much worse as n gets bigger.\n\n Example: to simulate a d6 use `SDL_rand(6) + 1` The +1 converts 0..5 to\n 1..6\n\n If you want to generate a pseudo-random number in the full range of Sint32,\n you should use: (Sint32)SDL_rand_bits()\n\n If you want reproducible output, be sure to initialize with SDL_srand()\n first.\n\n There are no guarantees as to the quality of the random sequence produced,\n and this should not be used for security (cryptography, passwords) or where\n money is on the line (loot-boxes, casinos). There are many random number\n libraries available with different characteristics and you should pick one\n of those to meet any serious needs.\n\n **Parameter:** n the number of possible outcomes. n must be positive.\n **Returns:** a random value in the range of [0 .. n-1].\n\n **Thread Safety:** All calls should be made from a single thread\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_srand\n **See Also:** SDL_randf\n"]
3221 pub fn SDL_rand(n: Sint32) -> Sint32;
3222}
3223unsafe extern "C" {
3224 #[doc = " Generate a uniform pseudo-random floating point number less than 1.0\n\n If you want reproducible output, be sure to initialize with SDL_srand()\n first.\n\n There are no guarantees as to the quality of the random sequence produced,\n and this should not be used for security (cryptography, passwords) or where\n money is on the line (loot-boxes, casinos). There are many random number\n libraries available with different characteristics and you should pick one\n of those to meet any serious needs.\n\n **Returns:** a random value in the range of [0.0, 1.0).\n\n **Thread Safety:** All calls should be made from a single thread\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_srand\n **See Also:** SDL_rand\n"]
3225 pub fn SDL_randf() -> f32;
3226}
3227unsafe extern "C" {
3228 #[doc = " Generate 32 pseudo-random bits.\n\n You likely want to use SDL_rand() to get a pseudo-random number instead.\n\n There are no guarantees as to the quality of the random sequence produced,\n and this should not be used for security (cryptography, passwords) or where\n money is on the line (loot-boxes, casinos). There are many random number\n libraries available with different characteristics and you should pick one\n of those to meet any serious needs.\n\n **Returns:** a random value in the range of [0-SDL_MAX_UINT32].\n\n **Thread Safety:** All calls should be made from a single thread\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_rand\n **See Also:** SDL_randf\n **See Also:** SDL_srand\n"]
3229 pub fn SDL_rand_bits() -> Uint32;
3230}
3231unsafe extern "C" {
3232 #[doc = " Generate a pseudo-random number less than n for positive n\n\n The method used is faster and of better quality than `rand() % n`. Odds are\n roughly 99.9% even for n = 1 million. Evenness is better for smaller n, and\n much worse as n gets bigger.\n\n Example: to simulate a d6 use `SDL_rand_r(state, 6) + 1` The +1 converts\n 0..5 to 1..6\n\n If you want to generate a pseudo-random number in the full range of Sint32,\n you should use: (Sint32)SDL_rand_bits_r(state)\n\n There are no guarantees as to the quality of the random sequence produced,\n and this should not be used for security (cryptography, passwords) or where\n money is on the line (loot-boxes, casinos). There are many random number\n libraries available with different characteristics and you should pick one\n of those to meet any serious needs.\n\n **Parameter:** state a pointer to the current random number state, this may not be\n NULL.\n **Parameter:** n the number of possible outcomes. n must be positive.\n **Returns:** a random value in the range of [0 .. n-1].\n\n **Thread Safety:** This function is thread-safe, as long as the state pointer\n isn't shared between threads.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_rand\n **See Also:** SDL_rand_bits_r\n **See Also:** SDL_randf_r\n"]
3233 pub fn SDL_rand_r(state: *mut Uint64, n: Sint32) -> Sint32;
3234}
3235unsafe extern "C" {
3236 #[doc = " Generate a uniform pseudo-random floating point number less than 1.0\n\n There are no guarantees as to the quality of the random sequence produced,\n and this should not be used for security (cryptography, passwords) or where\n money is on the line (loot-boxes, casinos). There are many random number\n libraries available with different characteristics and you should pick one\n of those to meet any serious needs.\n\n **Parameter:** state a pointer to the current random number state, this may not be\n NULL.\n **Returns:** a random value in the range of [0.0, 1.0).\n\n **Thread Safety:** This function is thread-safe, as long as the state pointer\n isn't shared between threads.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_rand_bits_r\n **See Also:** SDL_rand_r\n **See Also:** SDL_randf\n"]
3237 pub fn SDL_randf_r(state: *mut Uint64) -> f32;
3238}
3239unsafe extern "C" {
3240 #[doc = " Generate 32 pseudo-random bits.\n\n You likely want to use SDL_rand_r() to get a pseudo-random number instead.\n\n There are no guarantees as to the quality of the random sequence produced,\n and this should not be used for security (cryptography, passwords) or where\n money is on the line (loot-boxes, casinos). There are many random number\n libraries available with different characteristics and you should pick one\n of those to meet any serious needs.\n\n **Parameter:** state a pointer to the current random number state, this may not be\n NULL.\n **Returns:** a random value in the range of [0-SDL_MAX_UINT32].\n\n **Thread Safety:** This function is thread-safe, as long as the state pointer\n isn't shared between threads.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_rand_r\n **See Also:** SDL_randf_r\n"]
3241 pub fn SDL_rand_bits_r(state: *mut Uint64) -> Uint32;
3242}
3243unsafe extern "C" {
3244 #[doc = " Compute the arc cosine of `x`.\n\n The definition of `y = acos(x)` is `x = cos(y)`.\n\n Domain: `-1 <= x <= 1`\n\n Range: `0 <= y <= Pi`\n\n This function operates on double-precision floating point values, use\n SDL_acosf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** arc cosine of `x`, in radians.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_acosf\n **See Also:** SDL_asin\n **See Also:** SDL_cos\n"]
3245 pub fn SDL_acos(x: f64) -> f64;
3246}
3247unsafe extern "C" {
3248 #[doc = " Compute the arc cosine of `x`.\n\n The definition of `y = acos(x)` is `x = cos(y)`.\n\n Domain: `-1 <= x <= 1`\n\n Range: `0 <= y <= Pi`\n\n This function operates on single-precision floating point values, use\n SDL_acos for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** arc cosine of `x`, in radians.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_acos\n **See Also:** SDL_asinf\n **See Also:** SDL_cosf\n"]
3249 pub fn SDL_acosf(x: f32) -> f32;
3250}
3251unsafe extern "C" {
3252 #[doc = " Compute the arc sine of `x`.\n\n The definition of `y = asin(x)` is `x = sin(y)`.\n\n Domain: `-1 <= x <= 1`\n\n Range: `-Pi/2 <= y <= Pi/2`\n\n This function operates on double-precision floating point values, use\n SDL_asinf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** arc sine of `x`, in radians.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_asinf\n **See Also:** SDL_acos\n **See Also:** SDL_sin\n"]
3253 pub fn SDL_asin(x: f64) -> f64;
3254}
3255unsafe extern "C" {
3256 #[doc = " Compute the arc sine of `x`.\n\n The definition of `y = asin(x)` is `x = sin(y)`.\n\n Domain: `-1 <= x <= 1`\n\n Range: `-Pi/2 <= y <= Pi/2`\n\n This function operates on single-precision floating point values, use\n SDL_asin for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** arc sine of `x`, in radians.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_asin\n **See Also:** SDL_acosf\n **See Also:** SDL_sinf\n"]
3257 pub fn SDL_asinf(x: f32) -> f32;
3258}
3259unsafe extern "C" {
3260 #[doc = " Compute the arc tangent of `x`.\n\n The definition of `y = atan(x)` is `x = tan(y)`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-Pi/2 <= y <= Pi/2`\n\n This function operates on double-precision floating point values, use\n SDL_atanf for single-precision floats.\n\n To calculate the arc tangent of y / x, use SDL_atan2.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** arc tangent of of `x` in radians, or 0 if `x = 0`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atanf\n **See Also:** SDL_atan2\n **See Also:** SDL_tan\n"]
3261 pub fn SDL_atan(x: f64) -> f64;
3262}
3263unsafe extern "C" {
3264 #[doc = " Compute the arc tangent of `x`.\n\n The definition of `y = atan(x)` is `x = tan(y)`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-Pi/2 <= y <= Pi/2`\n\n This function operates on single-precision floating point values, use\n SDL_atan for dboule-precision floats.\n\n To calculate the arc tangent of y / x, use SDL_atan2f.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** arc tangent of of `x` in radians, or 0 if `x = 0`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atan\n **See Also:** SDL_atan2f\n **See Also:** SDL_tanf\n"]
3265 pub fn SDL_atanf(x: f32) -> f32;
3266}
3267unsafe extern "C" {
3268 #[doc = " Compute the arc tangent of `y / x`, using the signs of x and y to adjust\n the result's quadrant.\n\n The definition of `z = atan2(x, y)` is `y = x tan(z)`, where the quadrant\n of z is determined based on the signs of x and y.\n\n Domain: `-INF <= x <= INF`, `-INF <= y <= INF`\n\n Range: `-Pi <= z <= Pi`\n\n This function operates on double-precision floating point values, use\n SDL_atan2f for single-precision floats.\n\n To calculate the arc tangent of a single value, use SDL_atan.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** y floating point value of the numerator (y coordinate).\n **Parameter:** x floating point value of the denominator (x coordinate).\n **Returns:** arc tangent of `y / x` in radians, or, if `x = 0`, either `-Pi/2`,\n `0`, or `Pi/2`, depending on the value of `y`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atan2f\n **See Also:** SDL_atan\n **See Also:** SDL_tan\n"]
3269 pub fn SDL_atan2(y: f64, x: f64) -> f64;
3270}
3271unsafe extern "C" {
3272 #[doc = " Compute the arc tangent of `y / x`, using the signs of x and y to adjust\n the result's quadrant.\n\n The definition of `z = atan2(x, y)` is `y = x tan(z)`, where the quadrant\n of z is determined based on the signs of x and y.\n\n Domain: `-INF <= x <= INF`, `-INF <= y <= INF`\n\n Range: `-Pi <= y <= Pi`\n\n This function operates on single-precision floating point values, use\n SDL_atan2 for double-precision floats.\n\n To calculate the arc tangent of a single value, use SDL_atanf.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** y floating point value of the numerator (y coordinate).\n **Parameter:** x floating point value of the denominator (x coordinate).\n **Returns:** arc tangent of of `y / x` in radians, or, if `x = 0`, either\n `-Pi/2`, `0`, or `Pi/2`, depending on the value of `y`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_atan2\n **See Also:** SDL_atan\n **See Also:** SDL_tan\n"]
3273 pub fn SDL_atan2f(y: f32, x: f32) -> f32;
3274}
3275unsafe extern "C" {
3276 #[doc = " Compute the ceiling of `x`.\n\n The ceiling of `x` is the smallest integer `y` such that `y >= x`, i.e `x`\n rounded up to the nearest integer.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on double-precision floating point values, use\n SDL_ceilf for single-precision floats.\n\n **Parameter:** x floating point value.\n **Returns:** the ceiling of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ceilf\n **See Also:** SDL_floor\n **See Also:** SDL_trunc\n **See Also:** SDL_round\n **See Also:** SDL_lround\n"]
3277 pub fn SDL_ceil(x: f64) -> f64;
3278}
3279unsafe extern "C" {
3280 #[doc = " Compute the ceiling of `x`.\n\n The ceiling of `x` is the smallest integer `y` such that `y >= x`, i.e `x`\n rounded up to the nearest integer.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on single-precision floating point values, use\n SDL_ceil for double-precision floats.\n\n **Parameter:** x floating point value.\n **Returns:** the ceiling of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ceil\n **See Also:** SDL_floorf\n **See Also:** SDL_truncf\n **See Also:** SDL_roundf\n **See Also:** SDL_lroundf\n"]
3281 pub fn SDL_ceilf(x: f32) -> f32;
3282}
3283unsafe extern "C" {
3284 #[doc = " Copy the sign of one floating-point value to another.\n\n The definition of copysign is that ``copysign(x, y) = abs(x) * sign(y)``.\n\n Domain: `-INF <= x <= INF`, ``-INF <= y <= f``\n\n Range: `-INF <= z <= INF`\n\n This function operates on double-precision floating point values, use\n SDL_copysignf for single-precision floats.\n\n **Parameter:** x floating point value to use as the magnitude.\n **Parameter:** y floating point value to use as the sign.\n **Returns:** the floating point value with the sign of y and the magnitude of\n x.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_copysignf\n **See Also:** SDL_fabs\n"]
3285 pub fn SDL_copysign(x: f64, y: f64) -> f64;
3286}
3287unsafe extern "C" {
3288 #[doc = " Copy the sign of one floating-point value to another.\n\n The definition of copysign is that ``copysign(x, y) = abs(x) * sign(y)``.\n\n Domain: `-INF <= x <= INF`, ``-INF <= y <= f``\n\n Range: `-INF <= z <= INF`\n\n This function operates on single-precision floating point values, use\n SDL_copysign for double-precision floats.\n\n **Parameter:** x floating point value to use as the magnitude.\n **Parameter:** y floating point value to use as the sign.\n **Returns:** the floating point value with the sign of y and the magnitude of\n x.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_copysign\n **See Also:** SDL_fabsf\n"]
3289 pub fn SDL_copysignf(x: f32, y: f32) -> f32;
3290}
3291unsafe extern "C" {
3292 #[doc = " Compute the cosine of `x`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-1 <= y <= 1`\n\n This function operates on double-precision floating point values, use\n SDL_cosf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value, in radians.\n **Returns:** cosine of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_cosf\n **See Also:** SDL_acos\n **See Also:** SDL_sin\n"]
3293 pub fn SDL_cos(x: f64) -> f64;
3294}
3295unsafe extern "C" {
3296 #[doc = " Compute the cosine of `x`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-1 <= y <= 1`\n\n This function operates on single-precision floating point values, use\n SDL_cos for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value, in radians.\n **Returns:** cosine of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_cos\n **See Also:** SDL_acosf\n **See Also:** SDL_sinf\n"]
3297 pub fn SDL_cosf(x: f32) -> f32;
3298}
3299unsafe extern "C" {
3300 #[doc = " Compute the exponential of `x`.\n\n The definition of `y = exp(x)` is `y = e^x`, where `e` is the base of the\n natural logarithm. The inverse is the natural logarithm, SDL_log.\n\n Domain: `-INF <= x <= INF`\n\n Range: `0 <= y <= INF`\n\n The output will overflow if `exp(x)` is too large to be represented.\n\n This function operates on double-precision floating point values, use\n SDL_expf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** value of `e^x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_expf\n **See Also:** SDL_log\n"]
3301 pub fn SDL_exp(x: f64) -> f64;
3302}
3303unsafe extern "C" {
3304 #[doc = " Compute the exponential of `x`.\n\n The definition of `y = exp(x)` is `y = e^x`, where `e` is the base of the\n natural logarithm. The inverse is the natural logarithm, SDL_logf.\n\n Domain: `-INF <= x <= INF`\n\n Range: `0 <= y <= INF`\n\n The output will overflow if `exp(x)` is too large to be represented.\n\n This function operates on single-precision floating point values, use\n SDL_exp for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value.\n **Returns:** value of `e^x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_exp\n **See Also:** SDL_logf\n"]
3305 pub fn SDL_expf(x: f32) -> f32;
3306}
3307unsafe extern "C" {
3308 #[doc = " Compute the absolute value of `x`\n\n Domain: `-INF <= x <= INF`\n\n Range: `0 <= y <= INF`\n\n This function operates on double-precision floating point values, use\n SDL_fabsf for single-precision floats.\n\n **Parameter:** x floating point value to use as the magnitude.\n **Returns:** the absolute value of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_fabsf\n"]
3309 pub fn SDL_fabs(x: f64) -> f64;
3310}
3311unsafe extern "C" {
3312 #[doc = " Compute the absolute value of `x`\n\n Domain: `-INF <= x <= INF`\n\n Range: `0 <= y <= INF`\n\n This function operates on single-precision floating point values, use\n SDL_fabs for double-precision floats.\n\n **Parameter:** x floating point value to use as the magnitude.\n **Returns:** the absolute value of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_fabs\n"]
3313 pub fn SDL_fabsf(x: f32) -> f32;
3314}
3315unsafe extern "C" {
3316 #[doc = " Compute the floor of `x`.\n\n The floor of `x` is the largest integer `y` such that `y <= x`, i.e `x`\n rounded down to the nearest integer.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on double-precision floating point values, use\n SDL_floorf for single-precision floats.\n\n **Parameter:** x floating point value.\n **Returns:** the floor of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_floorf\n **See Also:** SDL_ceil\n **See Also:** SDL_trunc\n **See Also:** SDL_round\n **See Also:** SDL_lround\n"]
3317 pub fn SDL_floor(x: f64) -> f64;
3318}
3319unsafe extern "C" {
3320 #[doc = " Compute the floor of `x`.\n\n The floor of `x` is the largest integer `y` such that `y <= x`, i.e `x`\n rounded down to the nearest integer.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on single-precision floating point values, use\n SDL_floor for double-precision floats.\n\n **Parameter:** x floating point value.\n **Returns:** the floor of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_floor\n **See Also:** SDL_ceilf\n **See Also:** SDL_truncf\n **See Also:** SDL_roundf\n **See Also:** SDL_lroundf\n"]
3321 pub fn SDL_floorf(x: f32) -> f32;
3322}
3323unsafe extern "C" {
3324 #[doc = " Truncate `x` to an integer.\n\n Rounds `x` to the next closest integer to 0. This is equivalent to removing\n the fractional part of `x`, leaving only the integer part.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on double-precision floating point values, use\n SDL_truncf for single-precision floats.\n\n **Parameter:** x floating point value.\n **Returns:** `x` truncated to an integer.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_truncf\n **See Also:** SDL_fmod\n **See Also:** SDL_ceil\n **See Also:** SDL_floor\n **See Also:** SDL_round\n **See Also:** SDL_lround\n"]
3325 pub fn SDL_trunc(x: f64) -> f64;
3326}
3327unsafe extern "C" {
3328 #[doc = " Truncate `x` to an integer.\n\n Rounds `x` to the next closest integer to 0. This is equivalent to removing\n the fractional part of `x`, leaving only the integer part.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on single-precision floating point values, use\n SDL_trunc for double-precision floats.\n\n **Parameter:** x floating point value.\n **Returns:** `x` truncated to an integer.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_trunc\n **See Also:** SDL_fmodf\n **See Also:** SDL_ceilf\n **See Also:** SDL_floorf\n **See Also:** SDL_roundf\n **See Also:** SDL_lroundf\n"]
3329 pub fn SDL_truncf(x: f32) -> f32;
3330}
3331unsafe extern "C" {
3332 #[doc = " Return the floating-point remainder of `x / y`\n\n Divides `x` by `y`, and returns the remainder.\n\n Domain: `-INF <= x <= INF`, `-INF <= y <= INF`, `y != 0`\n\n Range: `-y <= z <= y`\n\n This function operates on double-precision floating point values, use\n SDL_fmodf for single-precision floats.\n\n **Parameter:** x the numerator.\n **Parameter:** y the denominator. Must not be 0.\n **Returns:** the remainder of `x / y`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_fmodf\n **See Also:** SDL_modf\n **See Also:** SDL_trunc\n **See Also:** SDL_ceil\n **See Also:** SDL_floor\n **See Also:** SDL_round\n **See Also:** SDL_lround\n"]
3333 pub fn SDL_fmod(x: f64, y: f64) -> f64;
3334}
3335unsafe extern "C" {
3336 #[doc = " Return the floating-point remainder of `x / y`\n\n Divides `x` by `y`, and returns the remainder.\n\n Domain: `-INF <= x <= INF`, `-INF <= y <= INF`, `y != 0`\n\n Range: `-y <= z <= y`\n\n This function operates on single-precision floating point values, use\n SDL_fmod for double-precision floats.\n\n **Parameter:** x the numerator.\n **Parameter:** y the denominator. Must not be 0.\n **Returns:** the remainder of `x / y`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_fmod\n **See Also:** SDL_truncf\n **See Also:** SDL_modff\n **See Also:** SDL_ceilf\n **See Also:** SDL_floorf\n **See Also:** SDL_roundf\n **See Also:** SDL_lroundf\n"]
3337 pub fn SDL_fmodf(x: f32, y: f32) -> f32;
3338}
3339unsafe extern "C" {
3340 #[doc = " Return whether the value is infinity.\n\n **Parameter:** x double-precision floating point value.\n **Returns:** non-zero if the value is infinity, 0 otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_isinff\n"]
3341 pub fn SDL_isinf(x: f64) -> core::ffi::c_int;
3342}
3343unsafe extern "C" {
3344 #[doc = " Return whether the value is infinity.\n\n **Parameter:** x floating point value.\n **Returns:** non-zero if the value is infinity, 0 otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_isinf\n"]
3345 pub fn SDL_isinff(x: f32) -> core::ffi::c_int;
3346}
3347unsafe extern "C" {
3348 #[doc = " Return whether the value is NaN.\n\n **Parameter:** x double-precision floating point value.\n **Returns:** non-zero if the value is NaN, 0 otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_isnanf\n"]
3349 pub fn SDL_isnan(x: f64) -> core::ffi::c_int;
3350}
3351unsafe extern "C" {
3352 #[doc = " Return whether the value is NaN.\n\n **Parameter:** x floating point value.\n **Returns:** non-zero if the value is NaN, 0 otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_isnan\n"]
3353 pub fn SDL_isnanf(x: f32) -> core::ffi::c_int;
3354}
3355unsafe extern "C" {
3356 #[doc = " Compute the natural logarithm of `x`.\n\n Domain: `0 < x <= INF`\n\n Range: `-INF <= y <= INF`\n\n It is an error for `x` to be less than or equal to 0.\n\n This function operates on double-precision floating point values, use\n SDL_logf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value. Must be greater than 0.\n **Returns:** the natural logarithm of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_logf\n **See Also:** SDL_log10\n **See Also:** SDL_exp\n"]
3357 pub fn SDL_log(x: f64) -> f64;
3358}
3359unsafe extern "C" {
3360 #[doc = " Compute the natural logarithm of `x`.\n\n Domain: `0 < x <= INF`\n\n Range: `-INF <= y <= INF`\n\n It is an error for `x` to be less than or equal to 0.\n\n This function operates on single-precision floating point values, use\n SDL_log for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value. Must be greater than 0.\n **Returns:** the natural logarithm of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_log\n **See Also:** SDL_expf\n"]
3361 pub fn SDL_logf(x: f32) -> f32;
3362}
3363unsafe extern "C" {
3364 #[doc = " Compute the base-10 logarithm of `x`.\n\n Domain: `0 < x <= INF`\n\n Range: `-INF <= y <= INF`\n\n It is an error for `x` to be less than or equal to 0.\n\n This function operates on double-precision floating point values, use\n SDL_log10f for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value. Must be greater than 0.\n **Returns:** the logarithm of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_log10f\n **See Also:** SDL_log\n **See Also:** SDL_pow\n"]
3365 pub fn SDL_log10(x: f64) -> f64;
3366}
3367unsafe extern "C" {
3368 #[doc = " Compute the base-10 logarithm of `x`.\n\n Domain: `0 < x <= INF`\n\n Range: `-INF <= y <= INF`\n\n It is an error for `x` to be less than or equal to 0.\n\n This function operates on single-precision floating point values, use\n SDL_log10 for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value. Must be greater than 0.\n **Returns:** the logarithm of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_log10\n **See Also:** SDL_logf\n **See Also:** SDL_powf\n"]
3369 pub fn SDL_log10f(x: f32) -> f32;
3370}
3371unsafe extern "C" {
3372 #[doc = " Split `x` into integer and fractional parts\n\n This function operates on double-precision floating point values, use\n SDL_modff for single-precision floats.\n\n **Parameter:** x floating point value.\n **Parameter:** y output pointer to store the integer part of `x`.\n **Returns:** the fractional part of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_modff\n **See Also:** SDL_trunc\n **See Also:** SDL_fmod\n"]
3373 pub fn SDL_modf(x: f64, y: *mut f64) -> f64;
3374}
3375unsafe extern "C" {
3376 #[doc = " Split `x` into integer and fractional parts\n\n This function operates on single-precision floating point values, use\n SDL_modf for double-precision floats.\n\n **Parameter:** x floating point value.\n **Parameter:** y output pointer to store the integer part of `x`.\n **Returns:** the fractional part of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_modf\n **See Also:** SDL_truncf\n **See Also:** SDL_fmodf\n"]
3377 pub fn SDL_modff(x: f32, y: *mut f32) -> f32;
3378}
3379unsafe extern "C" {
3380 #[doc = " Raise `x` to the power `y`\n\n Domain: `-INF <= x <= INF`, `-INF <= y <= INF`\n\n Range: `-INF <= z <= INF`\n\n If `y` is the base of the natural logarithm (e), consider using SDL_exp\n instead.\n\n This function operates on double-precision floating point values, use\n SDL_powf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x the base.\n **Parameter:** y the exponent.\n **Returns:** `x` raised to the power `y`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_powf\n **See Also:** SDL_exp\n **See Also:** SDL_log\n"]
3381 pub fn SDL_pow(x: f64, y: f64) -> f64;
3382}
3383unsafe extern "C" {
3384 #[doc = " Raise `x` to the power `y`\n\n Domain: `-INF <= x <= INF`, `-INF <= y <= INF`\n\n Range: `-INF <= z <= INF`\n\n If `y` is the base of the natural logarithm (e), consider using SDL_exp\n instead.\n\n This function operates on single-precision floating point values, use\n SDL_pow for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x the base.\n **Parameter:** y the exponent.\n **Returns:** `x` raised to the power `y`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_pow\n **See Also:** SDL_expf\n **See Also:** SDL_logf\n"]
3385 pub fn SDL_powf(x: f32, y: f32) -> f32;
3386}
3387unsafe extern "C" {
3388 #[doc = " Round `x` to the nearest integer.\n\n Rounds `x` to the nearest integer. Values halfway between integers will be\n rounded away from zero.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on double-precision floating point values, use\n SDL_roundf for single-precision floats. To get the result as an integer\n type, use SDL_lround.\n\n **Parameter:** x floating point value.\n **Returns:** the nearest integer to `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_roundf\n **See Also:** SDL_lround\n **See Also:** SDL_floor\n **See Also:** SDL_ceil\n **See Also:** SDL_trunc\n"]
3389 pub fn SDL_round(x: f64) -> f64;
3390}
3391unsafe extern "C" {
3392 #[doc = " Round `x` to the nearest integer.\n\n Rounds `x` to the nearest integer. Values halfway between integers will be\n rounded away from zero.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`, y integer\n\n This function operates on single-precision floating point values, use\n SDL_round for double-precision floats. To get the result as an integer\n type, use SDL_lroundf.\n\n **Parameter:** x floating point value.\n **Returns:** the nearest integer to `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_round\n **See Also:** SDL_lroundf\n **See Also:** SDL_floorf\n **See Also:** SDL_ceilf\n **See Also:** SDL_truncf\n"]
3393 pub fn SDL_roundf(x: f32) -> f32;
3394}
3395unsafe extern "C" {
3396 #[doc = " Round `x` to the nearest integer representable as a long\n\n Rounds `x` to the nearest integer. Values halfway between integers will be\n rounded away from zero.\n\n Domain: `-INF <= x <= INF`\n\n Range: `MIN_LONG <= y <= MAX_LONG`\n\n This function operates on double-precision floating point values, use\n SDL_lroundf for single-precision floats. To get the result as a\n floating-point type, use SDL_round.\n\n **Parameter:** x floating point value.\n **Returns:** the nearest integer to `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_lroundf\n **See Also:** SDL_round\n **See Also:** SDL_floor\n **See Also:** SDL_ceil\n **See Also:** SDL_trunc\n"]
3397 pub fn SDL_lround(x: f64) -> core::ffi::c_long;
3398}
3399unsafe extern "C" {
3400 #[doc = " Round `x` to the nearest integer representable as a long\n\n Rounds `x` to the nearest integer. Values halfway between integers will be\n rounded away from zero.\n\n Domain: `-INF <= x <= INF`\n\n Range: `MIN_LONG <= y <= MAX_LONG`\n\n This function operates on single-precision floating point values, use\n SDL_lround for double-precision floats. To get the result as a\n floating-point type, use SDL_roundf.\n\n **Parameter:** x floating point value.\n **Returns:** the nearest integer to `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_lround\n **See Also:** SDL_roundf\n **See Also:** SDL_floorf\n **See Also:** SDL_ceilf\n **See Also:** SDL_truncf\n"]
3401 pub fn SDL_lroundf(x: f32) -> core::ffi::c_long;
3402}
3403unsafe extern "C" {
3404 #[doc = " Scale `x` by an integer power of two.\n\n Multiplies `x` by the `n`th power of the floating point radix (always 2).\n\n Domain: `-INF <= x <= INF`, `n` integer\n\n Range: `-INF <= y <= INF`\n\n This function operates on double-precision floating point values, use\n SDL_scalbnf for single-precision floats.\n\n **Parameter:** x floating point value to be scaled.\n **Parameter:** n integer exponent.\n **Returns:** `x * 2^n`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_scalbnf\n **See Also:** SDL_pow\n"]
3405 pub fn SDL_scalbn(x: f64, n: core::ffi::c_int) -> f64;
3406}
3407unsafe extern "C" {
3408 #[doc = " Scale `x` by an integer power of two.\n\n Multiplies `x` by the `n`th power of the floating point radix (always 2).\n\n Domain: `-INF <= x <= INF`, `n` integer\n\n Range: `-INF <= y <= INF`\n\n This function operates on single-precision floating point values, use\n SDL_scalbn for double-precision floats.\n\n **Parameter:** x floating point value to be scaled.\n **Parameter:** n integer exponent.\n **Returns:** `x * 2^n`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_scalbn\n **See Also:** SDL_powf\n"]
3409 pub fn SDL_scalbnf(x: f32, n: core::ffi::c_int) -> f32;
3410}
3411unsafe extern "C" {
3412 #[doc = " Compute the sine of `x`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-1 <= y <= 1`\n\n This function operates on double-precision floating point values, use\n SDL_sinf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value, in radians.\n **Returns:** sine of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_sinf\n **See Also:** SDL_asin\n **See Also:** SDL_cos\n"]
3413 pub fn SDL_sin(x: f64) -> f64;
3414}
3415unsafe extern "C" {
3416 #[doc = " Compute the sine of `x`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-1 <= y <= 1`\n\n This function operates on single-precision floating point values, use\n SDL_sin for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value, in radians.\n **Returns:** sine of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_sin\n **See Also:** SDL_asinf\n **See Also:** SDL_cosf\n"]
3417 pub fn SDL_sinf(x: f32) -> f32;
3418}
3419unsafe extern "C" {
3420 #[doc = " Compute the square root of `x`.\n\n Domain: `0 <= x <= INF`\n\n Range: `0 <= y <= INF`\n\n This function operates on double-precision floating point values, use\n SDL_sqrtf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value. Must be greater than or equal to 0.\n **Returns:** square root of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_sqrtf\n"]
3421 pub fn SDL_sqrt(x: f64) -> f64;
3422}
3423unsafe extern "C" {
3424 #[doc = " Compute the square root of `x`.\n\n Domain: `0 <= x <= INF`\n\n Range: `0 <= y <= INF`\n\n This function operates on single-precision floating point values, use\n SDL_sqrt for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value. Must be greater than or equal to 0.\n **Returns:** square root of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_sqrt\n"]
3425 pub fn SDL_sqrtf(x: f32) -> f32;
3426}
3427unsafe extern "C" {
3428 #[doc = " Compute the tangent of `x`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`\n\n This function operates on double-precision floating point values, use\n SDL_tanf for single-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value, in radians.\n **Returns:** tangent of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_tanf\n **See Also:** SDL_sin\n **See Also:** SDL_cos\n **See Also:** SDL_atan\n **See Also:** SDL_atan2\n"]
3429 pub fn SDL_tan(x: f64) -> f64;
3430}
3431unsafe extern "C" {
3432 #[doc = " Compute the tangent of `x`.\n\n Domain: `-INF <= x <= INF`\n\n Range: `-INF <= y <= INF`\n\n This function operates on single-precision floating point values, use\n SDL_tan for double-precision floats.\n\n This function may use a different approximation across different versions,\n platforms and configurations. i.e, it can return a different value given\n the same input on different machines or operating systems, or if SDL is\n updated.\n\n **Parameter:** x floating point value, in radians.\n **Returns:** tangent of `x`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_tan\n **See Also:** SDL_sinf\n **See Also:** SDL_cosf\n **See Also:** SDL_atanf\n **See Also:** SDL_atan2f\n"]
3433 pub fn SDL_tanf(x: f32) -> f32;
3434}
3435#[repr(C)]
3436#[derive(Debug, Copy, Clone)]
3437pub struct SDL_iconv_data_t {
3438 _unused: [u8; 0],
3439}
3440#[doc = " An opaque handle representing string encoding conversion state.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_iconv_open\n"]
3441pub type SDL_iconv_t = *mut SDL_iconv_data_t;
3442unsafe extern "C" {
3443 #[doc = " This function allocates a context for the specified character set\n conversion.\n\n **Parameter:** tocode The target character encoding, must not be NULL.\n **Parameter:** fromcode The source character encoding, must not be NULL.\n **Returns:** a handle that must be freed with SDL_iconv_close, or\n SDL_ICONV_ERROR on failure.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_iconv\n **See Also:** SDL_iconv_close\n **See Also:** SDL_iconv_string\n"]
3444 pub fn SDL_iconv_open(
3445 tocode: *const core::ffi::c_char,
3446 fromcode: *const core::ffi::c_char,
3447 ) -> SDL_iconv_t;
3448}
3449unsafe extern "C" {
3450 #[doc = " This function frees a context used for character set conversion.\n\n **Parameter:** cd The character set conversion handle.\n **Returns:** 0 on success, or -1 on failure.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_iconv\n **See Also:** SDL_iconv_open\n **See Also:** SDL_iconv_string\n"]
3451 pub fn SDL_iconv_close(cd: SDL_iconv_t) -> core::ffi::c_int;
3452}
3453unsafe extern "C" {
3454 #[doc = " This function converts text between encodings, reading from and writing to\n a buffer.\n\n It returns the number of successful conversions on success. On error,\n SDL_ICONV_E2BIG is returned when the output buffer is too small, or\n SDL_ICONV_EILSEQ is returned when an invalid input sequence is encountered,\n or SDL_ICONV_EINVAL is returned when an incomplete input sequence is\n encountered.\n\n On exit:\n\n - inbuf will point to the beginning of the next multibyte sequence. On\n error, this is the location of the problematic input sequence. On\n success, this is the end of the input sequence.\n - inbytesleft will be set to the number of bytes left to convert, which\n will be 0 on success.\n - outbuf will point to the location where to store the next output byte.\n - outbytesleft will be set to the number of bytes left in the output\n buffer.\n\n **Parameter:** cd The character set conversion context, created in\n SDL_iconv_open().\n **Parameter:** inbuf Address of variable that points to the first character of the\n input sequence.\n **Parameter:** inbytesleft The number of bytes in the input buffer.\n **Parameter:** outbuf Address of variable that points to the output buffer.\n **Parameter:** outbytesleft The number of bytes in the output buffer.\n **Returns:** the number of conversions on success, or a negative error code.\n\n **Thread Safety:** Do not use the same SDL_iconv_t from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_iconv_open\n **See Also:** SDL_iconv_close\n **See Also:** SDL_iconv_string\n"]
3455 pub fn SDL_iconv(
3456 cd: SDL_iconv_t,
3457 inbuf: *mut *const core::ffi::c_char,
3458 inbytesleft: *mut usize,
3459 outbuf: *mut *mut core::ffi::c_char,
3460 outbytesleft: *mut usize,
3461 ) -> usize;
3462}
3463unsafe extern "C" {
3464 #[doc = " Helper function to convert a string's encoding in one call.\n\n This function converts a buffer or string between encodings in one pass.\n\n The string does not need to be NULL-terminated; this function operates on\n the number of bytes specified in `inbytesleft` whether there is a NULL\n character anywhere in the buffer.\n\n The returned string is owned by the caller, and should be passed to\n SDL_free when no longer needed.\n\n **Parameter:** tocode the character encoding of the output string. Examples are\n \"UTF-8\", \"UCS-4\", etc.\n **Parameter:** fromcode the character encoding of data in `inbuf`.\n **Parameter:** inbuf the string to convert to a different encoding.\n **Parameter:** inbytesleft the size of the input string _in bytes_.\n **Returns:** a new string, converted to the new encoding, or NULL on error.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_iconv_open\n **See Also:** SDL_iconv_close\n **See Also:** SDL_iconv\n"]
3465 pub fn SDL_iconv_string(
3466 tocode: *const core::ffi::c_char,
3467 fromcode: *const core::ffi::c_char,
3468 inbuf: *const core::ffi::c_char,
3469 inbytesleft: usize,
3470 ) -> *mut core::ffi::c_char;
3471}
3472unsafe extern "C" {
3473 #[doc = " Multiply two integers, checking for overflow.\n\n If `a * b` would overflow, return false.\n\n Otherwise store `a * b` via ret and return true.\n\n **Parameter:** a the multiplicand.\n **Parameter:** b the multiplier.\n **Parameter:** ret on non-overflow output, stores the multiplication result, may\n not be NULL.\n **Returns:** false on overflow, true if result is multiplied without overflow.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3474 #[link_name = "SDL_size_mul_check_overflow__extern"]
3475 pub fn SDL_size_mul_check_overflow(a: usize, b: usize, ret: *mut usize) -> bool;
3476}
3477unsafe extern "C" {
3478 #[link_name = "SDL_size_mul_check_overflow_builtin__extern"]
3479 pub fn SDL_size_mul_check_overflow_builtin(a: usize, b: usize, ret: *mut usize) -> bool;
3480}
3481unsafe extern "C" {
3482 #[doc = " Add two integers, checking for overflow.\n\n If `a + b` would overflow, return false.\n\n Otherwise store `a + b` via ret and return true.\n\n **Parameter:** a the first addend.\n **Parameter:** b the second addend.\n **Parameter:** ret on non-overflow output, stores the addition result, may not be\n NULL.\n **Returns:** false on overflow, true if result is added without overflow.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3483 #[link_name = "SDL_size_add_check_overflow__extern"]
3484 pub fn SDL_size_add_check_overflow(a: usize, b: usize, ret: *mut usize) -> bool;
3485}
3486unsafe extern "C" {
3487 #[link_name = "SDL_size_add_check_overflow_builtin__extern"]
3488 pub fn SDL_size_add_check_overflow_builtin(a: usize, b: usize, ret: *mut usize) -> bool;
3489}
3490pub type SDL_FunctionPointer = ::core::option::Option<unsafe extern "C" fn()>;
3491impl SDL_AssertState {
3492 #[doc = "< Retry the assert immediately.\n"]
3493 pub const SDL_ASSERTION_RETRY: SDL_AssertState = SDL_AssertState(0);
3494 #[doc = "< Make the debugger trigger a breakpoint.\n"]
3495 pub const SDL_ASSERTION_BREAK: SDL_AssertState = SDL_AssertState(1);
3496 #[doc = "< Terminate the program.\n"]
3497 pub const SDL_ASSERTION_ABORT: SDL_AssertState = SDL_AssertState(2);
3498 #[doc = "< Ignore the assert.\n"]
3499 pub const SDL_ASSERTION_IGNORE: SDL_AssertState = SDL_AssertState(3);
3500 #[doc = "< Ignore the assert from now on.\n"]
3501 pub const SDL_ASSERTION_ALWAYS_IGNORE: SDL_AssertState = SDL_AssertState(4);
3502}
3503#[repr(transparent)]
3504#[doc = " Possible outcomes from a triggered assertion.\n\n When an enabled assertion triggers, it may call the assertion handler\n (possibly one provided by the app via SDL_SetAssertionHandler), which will\n return one of these values, possibly after asking the user.\n\n Then SDL will respond based on this outcome (loop around to retry the\n condition, try to break in a debugger, kill the program, or ignore the\n problem).\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
3505#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3506pub struct SDL_AssertState(pub core::ffi::c_uint);
3507#[doc = " Information about an assertion failure.\n\n This structure is filled in with information about a triggered assertion,\n used by the assertion handler, then added to the assertion report. This is\n returned as a linked list from SDL_GetAssertionReport().\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
3508#[repr(C)]
3509#[derive(Debug, Copy, Clone, Hash)]
3510pub struct SDL_AssertData {
3511 #[doc = "< true if app should always continue when assertion is triggered.\n"]
3512 pub always_ignore: bool,
3513 #[doc = "< Number of times this assertion has been triggered.\n"]
3514 pub trigger_count: core::ffi::c_uint,
3515 #[doc = "< A string of this assert's test code.\n"]
3516 pub condition: *const core::ffi::c_char,
3517 #[doc = "< The source file where this assert lives.\n"]
3518 pub filename: *const core::ffi::c_char,
3519 #[doc = "< The line in `filename` where this assert lives.\n"]
3520 pub linenum: core::ffi::c_int,
3521 #[doc = "< The name of the function where this assert lives.\n"]
3522 pub function: *const core::ffi::c_char,
3523 #[doc = "< next item in the linked list.\n"]
3524 pub next: *const SDL_AssertData,
3525}
3526#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3527const _: () = {
3528 ["Size of SDL_AssertData"][::core::mem::size_of::<SDL_AssertData>() - 48usize];
3529 ["Alignment of SDL_AssertData"][::core::mem::align_of::<SDL_AssertData>() - 8usize];
3530 ["Offset of field: SDL_AssertData::always_ignore"]
3531 [::core::mem::offset_of!(SDL_AssertData, always_ignore) - 0usize];
3532 ["Offset of field: SDL_AssertData::trigger_count"]
3533 [::core::mem::offset_of!(SDL_AssertData, trigger_count) - 4usize];
3534 ["Offset of field: SDL_AssertData::condition"]
3535 [::core::mem::offset_of!(SDL_AssertData, condition) - 8usize];
3536 ["Offset of field: SDL_AssertData::filename"]
3537 [::core::mem::offset_of!(SDL_AssertData, filename) - 16usize];
3538 ["Offset of field: SDL_AssertData::linenum"]
3539 [::core::mem::offset_of!(SDL_AssertData, linenum) - 24usize];
3540 ["Offset of field: SDL_AssertData::function"]
3541 [::core::mem::offset_of!(SDL_AssertData, function) - 32usize];
3542 ["Offset of field: SDL_AssertData::next"]
3543 [::core::mem::offset_of!(SDL_AssertData, next) - 40usize];
3544};
3545impl Default for SDL_AssertData {
3546 fn default() -> Self {
3547 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
3548 unsafe {
3549 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3550 s.assume_init()
3551 }
3552 }
3553}
3554unsafe extern "C" {
3555 #[doc = " Never call this directly.\n\n Use the SDL_assert macros instead.\n\n **Parameter:** data assert data structure.\n **Parameter:** func function name.\n **Parameter:** file file name.\n **Parameter:** line line number.\n **Returns:** assert state.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3556 pub fn SDL_ReportAssertion(
3557 data: *mut SDL_AssertData,
3558 func: *const core::ffi::c_char,
3559 file: *const core::ffi::c_char,
3560 line: core::ffi::c_int,
3561 ) -> SDL_AssertState;
3562}
3563#[doc = " A callback that fires when an SDL assertion fails.\n\n **Parameter:** data a pointer to the SDL_AssertData structure corresponding to the\n current assertion.\n **Parameter:** userdata what was passed as `userdata` to SDL_SetAssertionHandler().\n **Returns:** an SDL_AssertState value indicating how to handle the failure.\n\n **Thread Safety:** This callback may be called from any thread that triggers an\n assert at any time.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
3564pub type SDL_AssertionHandler = ::core::option::Option<
3565 unsafe extern "C" fn(
3566 data: *const SDL_AssertData,
3567 userdata: *mut core::ffi::c_void,
3568 ) -> SDL_AssertState,
3569>;
3570unsafe extern "C" {
3571 #[doc = " Set an application-defined assertion handler.\n\n This function allows an application to show its own assertion UI and/or\n force the response to an assertion failure. If the application doesn't\n provide this, SDL will try to do the right thing, popping up a\n system-specific GUI dialog, and probably minimizing any fullscreen windows.\n\n This callback may fire from any thread, but it runs wrapped in a mutex, so\n it will only fire from one thread at a time.\n\n This callback is NOT reset to SDL's internal handler upon SDL_Quit()!\n\n **Parameter:** handler the SDL_AssertionHandler function to call when an assertion\n fails or NULL for the default handler.\n **Parameter:** userdata a pointer that is passed to `handler`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAssertionHandler\n"]
3572 pub fn SDL_SetAssertionHandler(handler: SDL_AssertionHandler, userdata: *mut core::ffi::c_void);
3573}
3574unsafe extern "C" {
3575 #[doc = " Get the default assertion handler.\n\n This returns the function pointer that is called by default when an\n assertion is triggered. This is an internal function provided by SDL, that\n is used for assertions when SDL_SetAssertionHandler() hasn't been used to\n provide a different function.\n\n **Returns:** the default SDL_AssertionHandler that is called when an assert\n triggers.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAssertionHandler\n"]
3576 pub fn SDL_GetDefaultAssertionHandler() -> SDL_AssertionHandler;
3577}
3578unsafe extern "C" {
3579 #[doc = " Get the current assertion handler.\n\n This returns the function pointer that is called when an assertion is\n triggered. This is either the value last passed to\n SDL_SetAssertionHandler(), or if no application-specified function is set,\n is equivalent to calling SDL_GetDefaultAssertionHandler().\n\n The parameter `puserdata` is a pointer to a void*, which will store the\n \"userdata\" pointer that was passed to SDL_SetAssertionHandler(). This value\n will always be NULL for the default handler. If you don't care about this\n data, it is safe to pass a NULL pointer to this function to ignore it.\n\n **Parameter:** puserdata pointer which is filled with the \"userdata\" pointer that\n was passed to SDL_SetAssertionHandler().\n **Returns:** the SDL_AssertionHandler that is called when an assert triggers.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAssertionHandler\n"]
3580 pub fn SDL_GetAssertionHandler(puserdata: *mut *mut core::ffi::c_void) -> SDL_AssertionHandler;
3581}
3582unsafe extern "C" {
3583 #[doc = " Get a list of all assertion failures.\n\n This function gets all assertions triggered since the last call to\n SDL_ResetAssertionReport(), or the start of the program.\n\n The proper way to examine this data looks something like this:\n\n ```c\n const SDL_AssertData *item = SDL_GetAssertionReport();\n while (item) {\n printf(\"'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\\\n\",\n item->condition, item->function, item->filename,\n item->linenum, item->trigger_count,\n item->always_ignore ? \"yes\" : \"no\");\n item = item->next;\n }\n ```\n\n **Returns:** a list of all failed assertions or NULL if the list is empty. This\n memory should not be modified or freed by the application. This\n pointer remains valid until the next call to SDL_Quit() or\n SDL_ResetAssertionReport().\n\n **Thread Safety:** This function is not thread safe. Other threads calling\n SDL_ResetAssertionReport() simultaneously, may render the\n returned pointer invalid.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ResetAssertionReport\n"]
3584 pub fn SDL_GetAssertionReport() -> *const SDL_AssertData;
3585}
3586unsafe extern "C" {
3587 #[doc = " Clear the list of all assertion failures.\n\n This function will clear the list of all assertions triggered up to that\n point. Immediately following this call, SDL_GetAssertionReport will return\n no items. In addition, any previously-triggered assertions will be reset to\n a trigger_count of zero, and their always_ignore state will be false.\n\n **Thread Safety:** This function is not thread safe. Other threads triggering an\n assertion, or simultaneously calling this function may cause\n memory leaks or crashes.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAssertionReport\n"]
3588 pub fn SDL_ResetAssertionReport();
3589}
3590#[repr(C)]
3591#[derive(Debug, Copy, Clone)]
3592pub struct SDL_AsyncIO {
3593 _unused: [u8; 0],
3594}
3595impl SDL_AsyncIOTaskType {
3596 #[doc = "< A read operation.\n"]
3597 pub const SDL_ASYNCIO_TASK_READ: SDL_AsyncIOTaskType = SDL_AsyncIOTaskType(0);
3598 #[doc = "< A write operation.\n"]
3599 pub const SDL_ASYNCIO_TASK_WRITE: SDL_AsyncIOTaskType = SDL_AsyncIOTaskType(1);
3600 #[doc = "< A close operation.\n"]
3601 pub const SDL_ASYNCIO_TASK_CLOSE: SDL_AsyncIOTaskType = SDL_AsyncIOTaskType(2);
3602}
3603#[repr(transparent)]
3604#[doc = " Types of asynchronous I/O tasks.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
3605#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3606pub struct SDL_AsyncIOTaskType(pub core::ffi::c_uint);
3607impl SDL_AsyncIOResult {
3608 #[doc = "< request was completed without error\n"]
3609 pub const SDL_ASYNCIO_COMPLETE: SDL_AsyncIOResult = SDL_AsyncIOResult(0);
3610 #[doc = "< request failed for some reason; check SDL_GetError()!\n"]
3611 pub const SDL_ASYNCIO_FAILURE: SDL_AsyncIOResult = SDL_AsyncIOResult(1);
3612 #[doc = "< request was canceled before completing.\n"]
3613 pub const SDL_ASYNCIO_CANCELED: SDL_AsyncIOResult = SDL_AsyncIOResult(2);
3614}
3615#[repr(transparent)]
3616#[doc = " Possible outcomes of an asynchronous I/O task.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
3617#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3618pub struct SDL_AsyncIOResult(pub core::ffi::c_uint);
3619#[doc = " Information about a completed asynchronous I/O request.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
3620#[repr(C)]
3621#[derive(Debug, Copy, Clone, Hash)]
3622pub struct SDL_AsyncIOOutcome {
3623 #[doc = "< what generated this task. This pointer will be invalid if it was closed!\n"]
3624 pub asyncio: *mut SDL_AsyncIO,
3625 #[doc = "< What sort of task was this? Read, write, etc?\n"]
3626 pub type_: SDL_AsyncIOTaskType,
3627 #[doc = "< the result of the work (success, failure, cancellation).\n"]
3628 pub result: SDL_AsyncIOResult,
3629 #[doc = "< buffer where data was read/written.\n"]
3630 pub buffer: *mut core::ffi::c_void,
3631 #[doc = "< offset in the SDL_AsyncIO where data was read/written.\n"]
3632 pub offset: Uint64,
3633 #[doc = "< number of bytes the task was to read/write.\n"]
3634 pub bytes_requested: Uint64,
3635 #[doc = "< actual number of bytes that were read/written.\n"]
3636 pub bytes_transferred: Uint64,
3637 #[doc = "< pointer provided by the app when starting the task\n"]
3638 pub userdata: *mut core::ffi::c_void,
3639}
3640#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3641const _: () = {
3642 ["Size of SDL_AsyncIOOutcome"][::core::mem::size_of::<SDL_AsyncIOOutcome>() - 56usize];
3643 ["Alignment of SDL_AsyncIOOutcome"][::core::mem::align_of::<SDL_AsyncIOOutcome>() - 8usize];
3644 ["Offset of field: SDL_AsyncIOOutcome::asyncio"]
3645 [::core::mem::offset_of!(SDL_AsyncIOOutcome, asyncio) - 0usize];
3646 ["Offset of field: SDL_AsyncIOOutcome::type_"]
3647 [::core::mem::offset_of!(SDL_AsyncIOOutcome, type_) - 8usize];
3648 ["Offset of field: SDL_AsyncIOOutcome::result"]
3649 [::core::mem::offset_of!(SDL_AsyncIOOutcome, result) - 12usize];
3650 ["Offset of field: SDL_AsyncIOOutcome::buffer"]
3651 [::core::mem::offset_of!(SDL_AsyncIOOutcome, buffer) - 16usize];
3652 ["Offset of field: SDL_AsyncIOOutcome::offset"]
3653 [::core::mem::offset_of!(SDL_AsyncIOOutcome, offset) - 24usize];
3654 ["Offset of field: SDL_AsyncIOOutcome::bytes_requested"]
3655 [::core::mem::offset_of!(SDL_AsyncIOOutcome, bytes_requested) - 32usize];
3656 ["Offset of field: SDL_AsyncIOOutcome::bytes_transferred"]
3657 [::core::mem::offset_of!(SDL_AsyncIOOutcome, bytes_transferred) - 40usize];
3658 ["Offset of field: SDL_AsyncIOOutcome::userdata"]
3659 [::core::mem::offset_of!(SDL_AsyncIOOutcome, userdata) - 48usize];
3660};
3661impl Default for SDL_AsyncIOOutcome {
3662 fn default() -> Self {
3663 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
3664 unsafe {
3665 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3666 s.assume_init()
3667 }
3668 }
3669}
3670#[repr(C)]
3671#[derive(Debug, Copy, Clone)]
3672pub struct SDL_AsyncIOQueue {
3673 _unused: [u8; 0],
3674}
3675unsafe extern "C" {
3676 #[doc = " Use this function to create a new SDL_AsyncIO object for reading from\n and/or writing to a named file.\n\n The `mode` string understands the following values:\n\n - \"r\": Open a file for reading only. It must exist.\n - \"w\": Open a file for writing only. It will create missing files or\n truncate existing ones.\n - \"r+\": Open a file for update both reading and writing. The file must\n exist.\n - \"w+\": Create an empty file for both reading and writing. If a file with\n the same name already exists its content is erased and the file is\n treated as a new empty file.\n\n There is no \"b\" mode, as there is only \"binary\" style I/O, and no \"a\" mode\n for appending, since you specify the position when starting a task.\n\n This function supports Unicode filenames, but they must be encoded in UTF-8\n format, regardless of the underlying operating system.\n\n This call is _not_ asynchronous; it will open the file before returning,\n under the assumption that doing so is generally a fast operation. Future\n reads and writes to the opened file will be async, however.\n\n **Parameter:** file a UTF-8 string representing the filename to open.\n **Parameter:** mode an ASCII string representing the mode to be used for opening\n the file.\n **Returns:** a pointer to the SDL_AsyncIO structure that is created or NULL on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseAsyncIO\n **See Also:** SDL_ReadAsyncIO\n **See Also:** SDL_WriteAsyncIO\n"]
3677 pub fn SDL_AsyncIOFromFile(
3678 file: *const core::ffi::c_char,
3679 mode: *const core::ffi::c_char,
3680 ) -> *mut SDL_AsyncIO;
3681}
3682unsafe extern "C" {
3683 #[doc = " Use this function to get the size of the data stream in an SDL_AsyncIO.\n\n This call is _not_ asynchronous; it assumes that obtaining this info is a\n non-blocking operation in most reasonable cases.\n\n **Parameter:** asyncio the SDL_AsyncIO to get the size of the data stream from.\n **Returns:** the size of the data stream in the SDL_IOStream on success or a\n negative error code on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3684 pub fn SDL_GetAsyncIOSize(asyncio: *mut SDL_AsyncIO) -> Sint64;
3685}
3686unsafe extern "C" {
3687 #[doc = " Start an async read.\n\n This function reads up to `size` bytes from `offset` position in the data\n source to the area pointed at by `ptr`. This function may read less bytes\n than requested.\n\n This function returns as quickly as possible; it does not wait for the read\n to complete. On a successful return, this work will continue in the\n background. If the work begins, even failure is asynchronous: a failing\n return value from this function only means the work couldn't start at all.\n\n `ptr` must remain available until the work is done, and may be accessed by\n the system at any time until then. Do not allocate it on the stack, as this\n might take longer than the life of the calling function to complete!\n\n An SDL_AsyncIOQueue must be specified. The newly-created task will be added\n to it when it completes its work.\n\n **Parameter:** asyncio a pointer to an SDL_AsyncIO structure.\n **Parameter:** ptr a pointer to a buffer to read data into.\n **Parameter:** offset the position to start reading in the data source.\n **Parameter:** size the number of bytes to read from the data source.\n **Parameter:** queue a queue to add the new SDL_AsyncIO to.\n **Parameter:** userdata an app-defined pointer that will be provided with the task\n results.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WriteAsyncIO\n **See Also:** SDL_CreateAsyncIOQueue\n"]
3688 pub fn SDL_ReadAsyncIO(
3689 asyncio: *mut SDL_AsyncIO,
3690 ptr: *mut core::ffi::c_void,
3691 offset: Uint64,
3692 size: Uint64,
3693 queue: *mut SDL_AsyncIOQueue,
3694 userdata: *mut core::ffi::c_void,
3695 ) -> bool;
3696}
3697unsafe extern "C" {
3698 #[doc = " Start an async write.\n\n This function writes `size` bytes from `offset` position in the data source\n to the area pointed at by `ptr`.\n\n This function returns as quickly as possible; it does not wait for the\n write to complete. On a successful return, this work will continue in the\n background. If the work begins, even failure is asynchronous: a failing\n return value from this function only means the work couldn't start at all.\n\n `ptr` must remain available until the work is done, and may be accessed by\n the system at any time until then. Do not allocate it on the stack, as this\n might take longer than the life of the calling function to complete!\n\n An SDL_AsyncIOQueue must be specified. The newly-created task will be added\n to it when it completes its work.\n\n **Parameter:** asyncio a pointer to an SDL_AsyncIO structure.\n **Parameter:** ptr a pointer to a buffer to write data from.\n **Parameter:** offset the position to start writing to the data source.\n **Parameter:** size the number of bytes to write to the data source.\n **Parameter:** queue a queue to add the new SDL_AsyncIO to.\n **Parameter:** userdata an app-defined pointer that will be provided with the task\n results.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ReadAsyncIO\n **See Also:** SDL_CreateAsyncIOQueue\n"]
3699 pub fn SDL_WriteAsyncIO(
3700 asyncio: *mut SDL_AsyncIO,
3701 ptr: *mut core::ffi::c_void,
3702 offset: Uint64,
3703 size: Uint64,
3704 queue: *mut SDL_AsyncIOQueue,
3705 userdata: *mut core::ffi::c_void,
3706 ) -> bool;
3707}
3708unsafe extern "C" {
3709 #[doc = " Close and free any allocated resources for an async I/O object.\n\n Closing a file is _also_ an asynchronous task! If a write failure were to\n happen during the closing process, for example, the task results will\n report it as usual.\n\n Closing a file that has been written to does not guarantee the data has\n made it to physical media; it may remain in the operating system's file\n cache, for later writing to disk. This means that a successfully-closed\n file can be lost if the system crashes or loses power in this small window.\n To prevent this, call this function with the `flush` parameter set to true.\n This will make the operation take longer, and perhaps increase system load\n in general, but a successful result guarantees that the data has made it to\n physical storage. Don't use this for temporary files, caches, and\n unimportant data, and definitely use it for crucial irreplaceable files,\n like game saves.\n\n This function guarantees that the close will happen after any other pending\n tasks to `asyncio`, so it's safe to open a file, start several operations,\n close the file immediately, then check for all results later. This function\n will not block until the tasks have completed.\n\n Once this function returns true, `asyncio` is no longer valid, regardless\n of any future outcomes. Any completed tasks might still contain this\n pointer in their SDL_AsyncIOOutcome data, in case the app was using this\n value to track information, but it should not be used again.\n\n If this function returns false, the close wasn't started at all, and it's\n safe to attempt to close again later.\n\n An SDL_AsyncIOQueue must be specified. The newly-created task will be added\n to it when it completes its work.\n\n **Parameter:** asyncio a pointer to an SDL_AsyncIO structure to close.\n **Parameter:** flush true if data should sync to disk before the task completes.\n **Parameter:** queue a queue to add the new SDL_AsyncIO to.\n **Parameter:** userdata an app-defined pointer that will be provided with the task\n results.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, but two\n threads should not attempt to close the same object.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3710 pub fn SDL_CloseAsyncIO(
3711 asyncio: *mut SDL_AsyncIO,
3712 flush: bool,
3713 queue: *mut SDL_AsyncIOQueue,
3714 userdata: *mut core::ffi::c_void,
3715 ) -> bool;
3716}
3717unsafe extern "C" {
3718 #[doc = " Create a task queue for tracking multiple I/O operations.\n\n Async I/O operations are assigned to a queue when started. The queue can be\n checked for completed tasks thereafter.\n\n **Returns:** a new task queue object or NULL if there was an error; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyAsyncIOQueue\n **See Also:** SDL_GetAsyncIOResult\n **See Also:** SDL_WaitAsyncIOResult\n"]
3719 pub fn SDL_CreateAsyncIOQueue() -> *mut SDL_AsyncIOQueue;
3720}
3721unsafe extern "C" {
3722 #[doc = " Destroy a previously-created async I/O task queue.\n\n If there are still tasks pending for this queue, this call will block until\n those tasks are finished. All those tasks will be deallocated. Their\n results will be lost to the app.\n\n Any pending reads from SDL_LoadFileAsync() that are still in this queue\n will have their buffers deallocated by this function, to prevent a memory\n leak.\n\n Once this function is called, the queue is no longer valid and should not\n be used, including by other threads that might access it while destruction\n is blocking on pending tasks.\n\n Do not destroy a queue that still has threads waiting on it through\n SDL_WaitAsyncIOResult(). You can call SDL_SignalAsyncIOQueue() first to\n unblock those threads, and take measures (such as SDL_WaitThread()) to make\n sure they have finished their wait and won't wait on the queue again.\n\n **Parameter:** queue the task queue to destroy.\n\n **Thread Safety:** It is safe to call this function from any thread, so long as\n no other thread is waiting on the queue with\n SDL_WaitAsyncIOResult.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3723 pub fn SDL_DestroyAsyncIOQueue(queue: *mut SDL_AsyncIOQueue);
3724}
3725unsafe extern "C" {
3726 #[doc = " Query an async I/O task queue for completed tasks.\n\n If a task assigned to this queue has finished, this will return true and\n fill in `outcome` with the details of the task. If no task in the queue has\n finished, this function will return false. This function does not block.\n\n If a task has completed, this function will free its resources and the task\n pointer will no longer be valid. The task will be removed from the queue.\n\n It is safe for multiple threads to call this function on the same queue at\n once; a completed task will only go to one of the threads.\n\n **Parameter:** queue the async I/O task queue to query.\n **Parameter:** outcome details of a finished task will be written here. May not be\n NULL.\n **Returns:** true if a task has completed, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WaitAsyncIOResult\n"]
3727 pub fn SDL_GetAsyncIOResult(
3728 queue: *mut SDL_AsyncIOQueue,
3729 outcome: *mut SDL_AsyncIOOutcome,
3730 ) -> bool;
3731}
3732unsafe extern "C" {
3733 #[doc = " Block until an async I/O task queue has a completed task.\n\n This function puts the calling thread to sleep until there a task assigned\n to the queue that has finished.\n\n If a task assigned to the queue has finished, this will return true and\n fill in `outcome` with the details of the task. If no task in the queue has\n finished, this function will return false.\n\n If a task has completed, this function will free its resources and the task\n pointer will no longer be valid. The task will be removed from the queue.\n\n It is safe for multiple threads to call this function on the same queue at\n once; a completed task will only go to one of the threads.\n\n Note that by the nature of various platforms, more than one waiting thread\n may wake to handle a single task, but only one will obtain it, so\n `timeoutMS` is a _maximum_ wait time, and this function may return false\n sooner.\n\n This function may return false if there was a system error, the OS\n inadvertently awoke multiple threads, or if SDL_SignalAsyncIOQueue() was\n called to wake up all waiting threads without a finished task.\n\n A timeout can be used to specify a maximum wait time, but rather than\n polling, it is possible to have a timeout of -1 to wait forever, and use\n SDL_SignalAsyncIOQueue() to wake up the waiting threads later.\n\n **Parameter:** queue the async I/O task queue to wait on.\n **Parameter:** outcome details of a finished task will be written here. May not be\n NULL.\n **Parameter:** timeoutMS the maximum time to wait, in milliseconds, or -1 to wait\n indefinitely.\n **Returns:** true if task has completed, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SignalAsyncIOQueue\n"]
3734 pub fn SDL_WaitAsyncIOResult(
3735 queue: *mut SDL_AsyncIOQueue,
3736 outcome: *mut SDL_AsyncIOOutcome,
3737 timeoutMS: Sint32,
3738 ) -> bool;
3739}
3740unsafe extern "C" {
3741 #[doc = " Wake up any threads that are blocking in SDL_WaitAsyncIOResult().\n\n This will unblock any threads that are sleeping in a call to\n SDL_WaitAsyncIOResult for the specified queue, and cause them to return\n from that function.\n\n This can be useful when destroying a queue to make sure nothing is touching\n it indefinitely. In this case, once this call completes, the caller should\n take measures to make sure any previously-blocked threads have returned\n from their wait and will not touch the queue again (perhaps by setting a\n flag to tell the threads to terminate and then using SDL_WaitThread() to\n make sure they've done so).\n\n **Parameter:** queue the async I/O task queue to signal.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WaitAsyncIOResult\n"]
3742 pub fn SDL_SignalAsyncIOQueue(queue: *mut SDL_AsyncIOQueue);
3743}
3744unsafe extern "C" {
3745 #[doc = " Load all the data from a file path, asynchronously.\n\n This function returns as quickly as possible; it does not wait for the read\n to complete. On a successful return, this work will continue in the\n background. If the work begins, even failure is asynchronous: a failing\n return value from this function only means the work couldn't start at all.\n\n The data is allocated with a zero byte at the end (null terminated) for\n convenience. This extra byte is not included in SDL_AsyncIOOutcome's\n bytes_transferred value.\n\n This function will allocate the buffer to contain the file. It must be\n deallocated by calling SDL_free() on SDL_AsyncIOOutcome's buffer field\n after completion.\n\n An SDL_AsyncIOQueue must be specified. The newly-created task will be added\n to it when it completes its work.\n\n **Parameter:** file the path to read all available data from.\n **Parameter:** queue a queue to add the new SDL_AsyncIO to.\n **Parameter:** userdata an app-defined pointer that will be provided with the task\n results.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadFile_IO\n"]
3746 pub fn SDL_LoadFileAsync(
3747 file: *const core::ffi::c_char,
3748 queue: *mut SDL_AsyncIOQueue,
3749 userdata: *mut core::ffi::c_void,
3750 ) -> bool;
3751}
3752#[doc = " An atomic spinlock.\n\n The atomic locks are efficient spinlocks using CPU instructions, but are\n vulnerable to starvation and can spin forever if a thread holding a lock\n has been terminated. For this reason you should minimize the code executed\n inside an atomic lock and never do expensive things like API or system\n calls while holding them.\n\n They are also vulnerable to starvation if the thread holding the lock is\n lower priority than other threads and doesn't get scheduled. In general you\n should use mutexes instead, since they have better performance and\n contention behavior.\n\n The atomic locks are not safe to lock recursively.\n\n Porting Note: The spin lock functions and type are required and can not be\n emulated because they are used in the atomic emulation code.\n"]
3753pub type SDL_SpinLock = core::ffi::c_int;
3754unsafe extern "C" {
3755 #[doc = " Try to lock a spin lock by setting it to a non-zero value.\n\n ***Please note that spinlocks are dangerous if you don't know what you're\n doing. Please be careful using any sort of spinlock!***\n\n **Parameter:** lock a pointer to a lock variable.\n **Returns:** true if the lock succeeded, false if the lock is already held.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockSpinlock\n **See Also:** SDL_UnlockSpinlock\n"]
3756 pub fn SDL_TryLockSpinlock(lock: *mut SDL_SpinLock) -> bool;
3757}
3758unsafe extern "C" {
3759 #[doc = " Lock a spin lock by setting it to a non-zero value.\n\n ***Please note that spinlocks are dangerous if you don't know what you're\n doing. Please be careful using any sort of spinlock!***\n\n **Parameter:** lock a pointer to a lock variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_TryLockSpinlock\n **See Also:** SDL_UnlockSpinlock\n"]
3760 pub fn SDL_LockSpinlock(lock: *mut SDL_SpinLock);
3761}
3762unsafe extern "C" {
3763 #[doc = " Unlock a spin lock by setting it to 0.\n\n Always returns immediately.\n\n ***Please note that spinlocks are dangerous if you don't know what you're\n doing. Please be careful using any sort of spinlock!***\n\n **Parameter:** lock a pointer to a lock variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockSpinlock\n **See Also:** SDL_TryLockSpinlock\n"]
3764 pub fn SDL_UnlockSpinlock(lock: *mut SDL_SpinLock);
3765}
3766unsafe extern "C" {
3767 #[doc = " Insert a memory release barrier (function version).\n\n Please refer to SDL_MemoryBarrierRelease for details. This is a function\n version, which might be useful if you need to use this functionality from a\n scripting language, etc. Also, some of the macro versions call this\n function behind the scenes, where more heavy lifting can happen inside of\n SDL. Generally, though, an app written in C/C++/etc should use the macro\n version, as it will be more efficient.\n\n **Thread Safety:** Obviously this function is safe to use from any thread at any\n time, but if you find yourself needing this, you are probably\n dealing with some very sensitive code; be careful!\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MemoryBarrierRelease\n"]
3768 pub fn SDL_MemoryBarrierReleaseFunction();
3769}
3770unsafe extern "C" {
3771 #[doc = " Insert a memory acquire barrier (function version).\n\n Please refer to SDL_MemoryBarrierRelease for details. This is a function\n version, which might be useful if you need to use this functionality from a\n scripting language, etc. Also, some of the macro versions call this\n function behind the scenes, where more heavy lifting can happen inside of\n SDL. Generally, though, an app written in C/C++/etc should use the macro\n version, as it will be more efficient.\n\n **Thread Safety:** Obviously this function is safe to use from any thread at any\n time, but if you find yourself needing this, you are probably\n dealing with some very sensitive code; be careful!\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MemoryBarrierAcquire\n"]
3772 pub fn SDL_MemoryBarrierAcquireFunction();
3773}
3774#[doc = " A type representing an atomic integer value.\n\n This can be used to manage a value that is synchronized across multiple\n CPUs without a race condition; when an app sets a value with\n SDL_SetAtomicInt all other threads, regardless of the CPU it is running on,\n will see that value when retrieved with SDL_GetAtomicInt, regardless of CPU\n caches, etc.\n\n This is also useful for atomic compare-and-swap operations: a thread can\n change the value as long as its current value matches expectations. When\n done in a loop, one can guarantee data consistency across threads without a\n lock (but the usual warnings apply: if you don't know what you're doing, or\n you don't do it carefully, you can confidently cause any number of\n disasters with this, so in most cases, you _should_ use a mutex instead of\n this!).\n\n This is a struct so people don't accidentally use numeric operations on it\n directly. You have to use SDL atomic functions.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CompareAndSwapAtomicInt\n **See Also:** SDL_GetAtomicInt\n **See Also:** SDL_SetAtomicInt\n **See Also:** SDL_AddAtomicInt\n"]
3775#[repr(C)]
3776#[derive(Debug, Default, Copy, Clone, Hash)]
3777pub struct SDL_AtomicInt {
3778 pub value: core::ffi::c_int,
3779}
3780#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3781const _: () = {
3782 ["Size of SDL_AtomicInt"][::core::mem::size_of::<SDL_AtomicInt>() - 4usize];
3783 ["Alignment of SDL_AtomicInt"][::core::mem::align_of::<SDL_AtomicInt>() - 4usize];
3784 ["Offset of field: SDL_AtomicInt::value"]
3785 [::core::mem::offset_of!(SDL_AtomicInt, value) - 0usize];
3786};
3787unsafe extern "C" {
3788 #[doc = " Set an atomic variable to a new value if it is currently an old value.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicInt variable to be modified.\n **Parameter:** oldval the old value.\n **Parameter:** newval the new value.\n **Returns:** true if the atomic variable was set, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAtomicInt\n **See Also:** SDL_SetAtomicInt\n"]
3789 pub fn SDL_CompareAndSwapAtomicInt(
3790 a: *mut SDL_AtomicInt,
3791 oldval: core::ffi::c_int,
3792 newval: core::ffi::c_int,
3793 ) -> bool;
3794}
3795unsafe extern "C" {
3796 #[doc = " Set an atomic variable to a value.\n\n This function also acts as a full memory barrier.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicInt variable to be modified.\n **Parameter:** v the desired value.\n **Returns:** the previous value of the atomic variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAtomicInt\n"]
3797 pub fn SDL_SetAtomicInt(a: *mut SDL_AtomicInt, v: core::ffi::c_int) -> core::ffi::c_int;
3798}
3799unsafe extern "C" {
3800 #[doc = " Get the value of an atomic variable.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicInt variable.\n **Returns:** the current value of an atomic variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAtomicInt\n"]
3801 pub fn SDL_GetAtomicInt(a: *mut SDL_AtomicInt) -> core::ffi::c_int;
3802}
3803unsafe extern "C" {
3804 #[doc = " Add to an atomic variable.\n\n This function also acts as a full memory barrier.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicInt variable to be modified.\n **Parameter:** v the desired value to add.\n **Returns:** the previous value of the atomic variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AtomicDecRef\n **See Also:** SDL_AtomicIncRef\n"]
3805 pub fn SDL_AddAtomicInt(a: *mut SDL_AtomicInt, v: core::ffi::c_int) -> core::ffi::c_int;
3806}
3807#[doc = " A type representing an atomic unsigned 32-bit value.\n\n This can be used to manage a value that is synchronized across multiple\n CPUs without a race condition; when an app sets a value with\n SDL_SetAtomicU32 all other threads, regardless of the CPU it is running on,\n will see that value when retrieved with SDL_GetAtomicU32, regardless of CPU\n caches, etc.\n\n This is also useful for atomic compare-and-swap operations: a thread can\n change the value as long as its current value matches expectations. When\n done in a loop, one can guarantee data consistency across threads without a\n lock (but the usual warnings apply: if you don't know what you're doing, or\n you don't do it carefully, you can confidently cause any number of\n disasters with this, so in most cases, you _should_ use a mutex instead of\n this!).\n\n This is a struct so people don't accidentally use numeric operations on it\n directly. You have to use SDL atomic functions.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CompareAndSwapAtomicU32\n **See Also:** SDL_GetAtomicU32\n **See Also:** SDL_SetAtomicU32\n"]
3808#[repr(C)]
3809#[derive(Debug, Default, Copy, Clone, Hash)]
3810pub struct SDL_AtomicU32 {
3811 pub value: Uint32,
3812}
3813#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3814const _: () = {
3815 ["Size of SDL_AtomicU32"][::core::mem::size_of::<SDL_AtomicU32>() - 4usize];
3816 ["Alignment of SDL_AtomicU32"][::core::mem::align_of::<SDL_AtomicU32>() - 4usize];
3817 ["Offset of field: SDL_AtomicU32::value"]
3818 [::core::mem::offset_of!(SDL_AtomicU32, value) - 0usize];
3819};
3820unsafe extern "C" {
3821 #[doc = " Set an atomic variable to a new value if it is currently an old value.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicU32 variable to be modified.\n **Parameter:** oldval the old value.\n **Parameter:** newval the new value.\n **Returns:** true if the atomic variable was set, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAtomicU32\n **See Also:** SDL_SetAtomicU32\n"]
3822 pub fn SDL_CompareAndSwapAtomicU32(
3823 a: *mut SDL_AtomicU32,
3824 oldval: Uint32,
3825 newval: Uint32,
3826 ) -> bool;
3827}
3828unsafe extern "C" {
3829 #[doc = " Set an atomic variable to a value.\n\n This function also acts as a full memory barrier.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicU32 variable to be modified.\n **Parameter:** v the desired value.\n **Returns:** the previous value of the atomic variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAtomicU32\n"]
3830 pub fn SDL_SetAtomicU32(a: *mut SDL_AtomicU32, v: Uint32) -> Uint32;
3831}
3832unsafe extern "C" {
3833 #[doc = " Get the value of an atomic variable.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicU32 variable.\n **Returns:** the current value of an atomic variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAtomicU32\n"]
3834 pub fn SDL_GetAtomicU32(a: *mut SDL_AtomicU32) -> Uint32;
3835}
3836unsafe extern "C" {
3837 #[doc = " Add to an atomic variable.\n\n This function also acts as a full memory barrier.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to an SDL_AtomicU32 variable to be modified.\n **Parameter:** v the desired value to add or subtract.\n **Returns:** the previous value of the atomic variable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
3838 pub fn SDL_AddAtomicU32(a: *mut SDL_AtomicU32, v: core::ffi::c_int) -> Uint32;
3839}
3840unsafe extern "C" {
3841 #[doc = " Set a pointer to a new value if it is currently an old value.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to a pointer.\n **Parameter:** oldval the old pointer value.\n **Parameter:** newval the new pointer value.\n **Returns:** true if the pointer was set, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CompareAndSwapAtomicInt\n **See Also:** SDL_GetAtomicPointer\n **See Also:** SDL_SetAtomicPointer\n"]
3842 pub fn SDL_CompareAndSwapAtomicPointer(
3843 a: *mut *mut core::ffi::c_void,
3844 oldval: *mut core::ffi::c_void,
3845 newval: *mut core::ffi::c_void,
3846 ) -> bool;
3847}
3848unsafe extern "C" {
3849 #[doc = " Set a pointer to a value atomically.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to a pointer.\n **Parameter:** v the desired pointer value.\n **Returns:** the previous value of the pointer.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CompareAndSwapAtomicPointer\n **See Also:** SDL_GetAtomicPointer\n"]
3850 pub fn SDL_SetAtomicPointer(
3851 a: *mut *mut core::ffi::c_void,
3852 v: *mut core::ffi::c_void,
3853 ) -> *mut core::ffi::c_void;
3854}
3855unsafe extern "C" {
3856 #[doc = " Get the value of a pointer atomically.\n\n ***Note: If you don't know what this function is for, you shouldn't use\n it!***\n\n **Parameter:** a a pointer to a pointer.\n **Returns:** the current value of a pointer.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CompareAndSwapAtomicPointer\n **See Also:** SDL_SetAtomicPointer\n"]
3857 pub fn SDL_GetAtomicPointer(a: *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void;
3858}
3859unsafe extern "C" {
3860 #[link_name = "__bswap_16__extern"]
3861 pub fn __bswap_16(__bsx: __uint16_t) -> __uint16_t;
3862}
3863unsafe extern "C" {
3864 #[link_name = "__bswap_32__extern"]
3865 pub fn __bswap_32(__bsx: __uint32_t) -> __uint32_t;
3866}
3867unsafe extern "C" {
3868 #[link_name = "__bswap_64__extern"]
3869 pub fn __bswap_64(__bsx: __uint64_t) -> __uint64_t;
3870}
3871unsafe extern "C" {
3872 #[link_name = "__uint16_identity__extern"]
3873 pub fn __uint16_identity(__x: __uint16_t) -> __uint16_t;
3874}
3875unsafe extern "C" {
3876 #[link_name = "__uint32_identity__extern"]
3877 pub fn __uint32_identity(__x: __uint32_t) -> __uint32_t;
3878}
3879unsafe extern "C" {
3880 #[link_name = "__uint64_identity__extern"]
3881 pub fn __uint64_identity(__x: __uint64_t) -> __uint64_t;
3882}
3883unsafe extern "C" {
3884 #[doc = " Byte-swap a floating point number.\n\n This will always byte-swap the value, whether it's currently in the native\n byteorder of the system or not. You should use SDL_SwapFloatLE or\n SDL_SwapFloatBE instead, in most cases.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** x the value to byte-swap.\n **Returns:** x, with its bytes in the opposite endian order.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3885 #[link_name = "SDL_SwapFloat__extern"]
3886 pub fn SDL_SwapFloat(x: f32) -> f32;
3887}
3888unsafe extern "C" {
3889 #[doc = " Set the SDL error message for the current thread.\n\n Calling this function will replace any previous error message that was set.\n\n This function always returns false, since SDL frequently uses false to\n signify a failing result, leading to this idiom:\n\n ```c\n if (error_code) {\n return SDL_SetError(\"This operation has failed: %d\", error_code);\n }\n ```\n\n **Parameter:** fmt a printf()-style message format string.\n **Parameter:** ... additional parameters matching % tokens in the `fmt` string, if\n any.\n **Returns:** false.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClearError\n **See Also:** SDL_GetError\n **See Also:** SDL_SetErrorV\n"]
3890 pub fn SDL_SetError(fmt: *const core::ffi::c_char, ...) -> bool;
3891}
3892unsafe extern "C" {
3893 #[doc = " Set the SDL error message for the current thread.\n\n Calling this function will replace any previous error message that was set.\n\n **Parameter:** fmt a printf()-style message format string.\n **Parameter:** ap a variable argument list.\n **Returns:** false.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClearError\n **See Also:** SDL_GetError\n **See Also:** SDL_SetError\n"]
3894 pub fn SDL_SetErrorV(fmt: *const core::ffi::c_char, ap: *mut __va_list_tag) -> bool;
3895}
3896unsafe extern "C" {
3897 #[doc = " Set an error indicating that memory allocation failed.\n\n This function does not do any memory allocation.\n\n **Returns:** false.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3898 pub fn SDL_OutOfMemory() -> bool;
3899}
3900unsafe extern "C" {
3901 #[doc = " Retrieve a message about the last error that occurred on the current\n thread.\n\n It is possible for multiple errors to occur before calling SDL_GetError().\n Only the last error is returned.\n\n The message is only applicable when an SDL function has signaled an error.\n You must check the return values of SDL function calls to determine when to\n appropriately call SDL_GetError(). You should *not* use the results of\n SDL_GetError() to decide if an error has occurred! Sometimes SDL will set\n an error string even when reporting success.\n\n SDL will *not* clear the error string for successful API calls. You *must*\n check return values for failure cases before you can assume the error\n string applies.\n\n Error strings are set per-thread, so an error set in a different thread\n will not interfere with the current thread's operation.\n\n The returned value is a thread-local string which will remain valid until\n the current thread's error string is changed. The caller should make a copy\n if the value is needed after the next SDL API call.\n\n **Returns:** a message with information about the specific error that occurred,\n or an empty string if there hasn't been an error message set since\n the last call to SDL_ClearError().\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClearError\n **See Also:** SDL_SetError\n"]
3902 pub fn SDL_GetError() -> *const core::ffi::c_char;
3903}
3904unsafe extern "C" {
3905 #[doc = " Clear any previous error message for this thread.\n\n **Returns:** true.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetError\n **See Also:** SDL_SetError\n"]
3906 pub fn SDL_ClearError() -> bool;
3907}
3908#[doc = " An ID that represents a properties set.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
3909pub type SDL_PropertiesID = Uint32;
3910impl SDL_PropertyType {
3911 pub const SDL_PROPERTY_TYPE_INVALID: SDL_PropertyType = SDL_PropertyType(0);
3912 pub const SDL_PROPERTY_TYPE_POINTER: SDL_PropertyType = SDL_PropertyType(1);
3913 pub const SDL_PROPERTY_TYPE_STRING: SDL_PropertyType = SDL_PropertyType(2);
3914 pub const SDL_PROPERTY_TYPE_NUMBER: SDL_PropertyType = SDL_PropertyType(3);
3915 pub const SDL_PROPERTY_TYPE_FLOAT: SDL_PropertyType = SDL_PropertyType(4);
3916 pub const SDL_PROPERTY_TYPE_BOOLEAN: SDL_PropertyType = SDL_PropertyType(5);
3917}
3918#[repr(transparent)]
3919#[doc = " SDL property type\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
3920#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3921pub struct SDL_PropertyType(pub core::ffi::c_uint);
3922unsafe extern "C" {
3923 #[doc = " Get the global SDL properties.\n\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3924 pub fn SDL_GetGlobalProperties() -> SDL_PropertiesID;
3925}
3926unsafe extern "C" {
3927 #[doc = " Create a group of properties.\n\n All properties are automatically destroyed when SDL_Quit() is called.\n\n **Returns:** an ID for a new group of properties, or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyProperties\n"]
3928 pub fn SDL_CreateProperties() -> SDL_PropertiesID;
3929}
3930unsafe extern "C" {
3931 #[doc = " Copy a group of properties.\n\n Copy all the properties from one group of properties to another, with the\n exception of properties requiring cleanup (set using\n SDL_SetPointerPropertyWithCleanup()), which will not be copied. Any\n property that already exists on `dst` will be overwritten.\n\n **Parameter:** src the properties to copy.\n **Parameter:** dst the destination properties.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread. This\n function acquires simultaneous mutex locks on both the source\n and destination property sets.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
3932 pub fn SDL_CopyProperties(src: SDL_PropertiesID, dst: SDL_PropertiesID) -> bool;
3933}
3934unsafe extern "C" {
3935 #[doc = " Lock a group of properties.\n\n Obtain a multi-threaded lock for these properties. Other threads will wait\n while trying to lock these properties until they are unlocked. Properties\n must be unlocked before they are destroyed.\n\n The lock is automatically taken when setting individual properties, this\n function is only needed when you want to set several properties atomically\n or want to guarantee that properties being queried aren't freed in another\n thread.\n\n **Parameter:** props the properties to lock.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UnlockProperties\n"]
3936 pub fn SDL_LockProperties(props: SDL_PropertiesID) -> bool;
3937}
3938unsafe extern "C" {
3939 #[doc = " Unlock a group of properties.\n\n **Parameter:** props the properties to unlock.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockProperties\n"]
3940 pub fn SDL_UnlockProperties(props: SDL_PropertiesID);
3941}
3942#[doc = " A callback used to free resources when a property is deleted.\n\n This should release any resources associated with `value` that are no\n longer needed.\n\n This callback is set per-property. Different properties in the same group\n can have different cleanup callbacks.\n\n This callback will be called _during_ SDL_SetPointerPropertyWithCleanup if\n the function fails for any reason.\n\n **Parameter:** userdata an app-defined pointer passed to the callback.\n **Parameter:** value the pointer assigned to the property to clean up.\n\n **Thread Safety:** This callback may fire without any locks held; if this is a\n concern, the app should provide its own locking.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_SetPointerPropertyWithCleanup\n"]
3943pub type SDL_CleanupPropertyCallback = ::core::option::Option<
3944 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, value: *mut core::ffi::c_void),
3945>;
3946unsafe extern "C" {
3947 #[doc = " Set a pointer property in a group of properties with a cleanup function\n that is called when the property is deleted.\n\n The cleanup function is also called if setting the property fails for any\n reason.\n\n For simply setting basic data types, like numbers, bools, or strings, use\n SDL_SetNumberProperty, SDL_SetBooleanProperty, or SDL_SetStringProperty\n instead, as those functions will handle cleanup on your behalf. This\n function is only for more complex, custom data.\n\n **Parameter:** props the properties to modify.\n **Parameter:** name the name of the property to modify.\n **Parameter:** value the new value of the property, or NULL to delete the property.\n **Parameter:** cleanup the function to call when this property is deleted, or NULL\n if no cleanup is necessary.\n **Parameter:** userdata a pointer that is passed to the cleanup function.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPointerProperty\n **See Also:** SDL_SetPointerProperty\n **See Also:** SDL_CleanupPropertyCallback\n"]
3948 pub fn SDL_SetPointerPropertyWithCleanup(
3949 props: SDL_PropertiesID,
3950 name: *const core::ffi::c_char,
3951 value: *mut core::ffi::c_void,
3952 cleanup: SDL_CleanupPropertyCallback,
3953 userdata: *mut core::ffi::c_void,
3954 ) -> bool;
3955}
3956unsafe extern "C" {
3957 #[doc = " Set a pointer property in a group of properties.\n\n **Parameter:** props the properties to modify.\n **Parameter:** name the name of the property to modify.\n **Parameter:** value the new value of the property, or NULL to delete the property.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPointerProperty\n **See Also:** SDL_HasProperty\n **See Also:** SDL_SetBooleanProperty\n **See Also:** SDL_SetFloatProperty\n **See Also:** SDL_SetNumberProperty\n **See Also:** SDL_SetPointerPropertyWithCleanup\n **See Also:** SDL_SetStringProperty\n"]
3958 pub fn SDL_SetPointerProperty(
3959 props: SDL_PropertiesID,
3960 name: *const core::ffi::c_char,
3961 value: *mut core::ffi::c_void,
3962 ) -> bool;
3963}
3964unsafe extern "C" {
3965 #[doc = " Set a string property in a group of properties.\n\n This function makes a copy of the string; the caller does not have to\n preserve the data after this call completes.\n\n **Parameter:** props the properties to modify.\n **Parameter:** name the name of the property to modify.\n **Parameter:** value the new value of the property, or NULL to delete the property.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetStringProperty\n"]
3966 pub fn SDL_SetStringProperty(
3967 props: SDL_PropertiesID,
3968 name: *const core::ffi::c_char,
3969 value: *const core::ffi::c_char,
3970 ) -> bool;
3971}
3972unsafe extern "C" {
3973 #[doc = " Set an integer property in a group of properties.\n\n **Parameter:** props the properties to modify.\n **Parameter:** name the name of the property to modify.\n **Parameter:** value the new value of the property.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumberProperty\n"]
3974 pub fn SDL_SetNumberProperty(
3975 props: SDL_PropertiesID,
3976 name: *const core::ffi::c_char,
3977 value: Sint64,
3978 ) -> bool;
3979}
3980unsafe extern "C" {
3981 #[doc = " Set a floating point property in a group of properties.\n\n **Parameter:** props the properties to modify.\n **Parameter:** name the name of the property to modify.\n **Parameter:** value the new value of the property.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetFloatProperty\n"]
3982 pub fn SDL_SetFloatProperty(
3983 props: SDL_PropertiesID,
3984 name: *const core::ffi::c_char,
3985 value: f32,
3986 ) -> bool;
3987}
3988unsafe extern "C" {
3989 #[doc = " Set a boolean property in a group of properties.\n\n **Parameter:** props the properties to modify.\n **Parameter:** name the name of the property to modify.\n **Parameter:** value the new value of the property.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetBooleanProperty\n"]
3990 pub fn SDL_SetBooleanProperty(
3991 props: SDL_PropertiesID,
3992 name: *const core::ffi::c_char,
3993 value: bool,
3994 ) -> bool;
3995}
3996unsafe extern "C" {
3997 #[doc = " Return whether a property exists in a group of properties.\n\n **Parameter:** props the properties to query.\n **Parameter:** name the name of the property to query.\n **Returns:** true if the property exists, or false if it doesn't.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPropertyType\n"]
3998 pub fn SDL_HasProperty(props: SDL_PropertiesID, name: *const core::ffi::c_char) -> bool;
3999}
4000unsafe extern "C" {
4001 #[doc = " Get the type of a property in a group of properties.\n\n **Parameter:** props the properties to query.\n **Parameter:** name the name of the property to query.\n **Returns:** the type of the property, or SDL_PROPERTY_TYPE_INVALID if it is\n not set.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasProperty\n"]
4002 pub fn SDL_GetPropertyType(
4003 props: SDL_PropertiesID,
4004 name: *const core::ffi::c_char,
4005 ) -> SDL_PropertyType;
4006}
4007unsafe extern "C" {
4008 #[doc = " Get a pointer property from a group of properties.\n\n By convention, the names of properties that SDL exposes on objects will\n start with \"SDL.\", and properties that SDL uses internally will start with\n \"SDL.internal.\". These should be considered read-only and should not be\n modified by applications.\n\n **Parameter:** props the properties to query.\n **Parameter:** name the name of the property to query.\n **Parameter:** default_value the default value of the property.\n **Returns:** the value of the property, or `default_value` if it is not set or\n not a pointer property.\n\n **Thread Safety:** It is safe to call this function from any thread, although\n the data returned is not protected and could potentially be\n freed if you call SDL_SetPointerProperty() or\n SDL_ClearProperty() on these properties from another thread.\n If you need to avoid this, use SDL_LockProperties() and\n SDL_UnlockProperties().\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetBooleanProperty\n **See Also:** SDL_GetFloatProperty\n **See Also:** SDL_GetNumberProperty\n **See Also:** SDL_GetPropertyType\n **See Also:** SDL_GetStringProperty\n **See Also:** SDL_HasProperty\n **See Also:** SDL_SetPointerProperty\n"]
4009 pub fn SDL_GetPointerProperty(
4010 props: SDL_PropertiesID,
4011 name: *const core::ffi::c_char,
4012 default_value: *mut core::ffi::c_void,
4013 ) -> *mut core::ffi::c_void;
4014}
4015unsafe extern "C" {
4016 #[doc = " Get a string property from a group of properties.\n\n **Parameter:** props the properties to query.\n **Parameter:** name the name of the property to query.\n **Parameter:** default_value the default value of the property.\n **Returns:** the value of the property, or `default_value` if it is not set or\n not a string property.\n\n **Thread Safety:** It is safe to call this function from any thread, although\n the data returned is not protected and could potentially be\n freed if you call SDL_SetStringProperty() or\n SDL_ClearProperty() on these properties from another thread.\n If you need to avoid this, use SDL_LockProperties() and\n SDL_UnlockProperties().\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPropertyType\n **See Also:** SDL_HasProperty\n **See Also:** SDL_SetStringProperty\n"]
4017 pub fn SDL_GetStringProperty(
4018 props: SDL_PropertiesID,
4019 name: *const core::ffi::c_char,
4020 default_value: *const core::ffi::c_char,
4021 ) -> *const core::ffi::c_char;
4022}
4023unsafe extern "C" {
4024 #[doc = " Get a number property from a group of properties.\n\n You can use SDL_GetPropertyType() to query whether the property exists and\n is a number property.\n\n **Parameter:** props the properties to query.\n **Parameter:** name the name of the property to query.\n **Parameter:** default_value the default value of the property.\n **Returns:** the value of the property, or `default_value` if it is not set or\n not a number property.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPropertyType\n **See Also:** SDL_HasProperty\n **See Also:** SDL_SetNumberProperty\n"]
4025 pub fn SDL_GetNumberProperty(
4026 props: SDL_PropertiesID,
4027 name: *const core::ffi::c_char,
4028 default_value: Sint64,
4029 ) -> Sint64;
4030}
4031unsafe extern "C" {
4032 #[doc = " Get a floating point property from a group of properties.\n\n You can use SDL_GetPropertyType() to query whether the property exists and\n is a floating point property.\n\n **Parameter:** props the properties to query.\n **Parameter:** name the name of the property to query.\n **Parameter:** default_value the default value of the property.\n **Returns:** the value of the property, or `default_value` if it is not set or\n not a float property.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPropertyType\n **See Also:** SDL_HasProperty\n **See Also:** SDL_SetFloatProperty\n"]
4033 pub fn SDL_GetFloatProperty(
4034 props: SDL_PropertiesID,
4035 name: *const core::ffi::c_char,
4036 default_value: f32,
4037 ) -> f32;
4038}
4039unsafe extern "C" {
4040 #[doc = " Get a boolean property from a group of properties.\n\n You can use SDL_GetPropertyType() to query whether the property exists and\n is a boolean property.\n\n **Parameter:** props the properties to query.\n **Parameter:** name the name of the property to query.\n **Parameter:** default_value the default value of the property.\n **Returns:** the value of the property, or `default_value` if it is not set or\n not a boolean property.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPropertyType\n **See Also:** SDL_HasProperty\n **See Also:** SDL_SetBooleanProperty\n"]
4041 pub fn SDL_GetBooleanProperty(
4042 props: SDL_PropertiesID,
4043 name: *const core::ffi::c_char,
4044 default_value: bool,
4045 ) -> bool;
4046}
4047unsafe extern "C" {
4048 #[doc = " Clear a property from a group of properties.\n\n **Parameter:** props the properties to modify.\n **Parameter:** name the name of the property to clear.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4049 pub fn SDL_ClearProperty(props: SDL_PropertiesID, name: *const core::ffi::c_char) -> bool;
4050}
4051#[doc = " A callback used to enumerate all the properties in a group of properties.\n\n This callback is called from SDL_EnumerateProperties(), and is called once\n per property in the set.\n\n **Parameter:** userdata an app-defined pointer passed to the callback.\n **Parameter:** props the SDL_PropertiesID that is being enumerated.\n **Parameter:** name the next property name in the enumeration.\n\n **Thread Safety:** SDL_EnumerateProperties holds a lock on `props` during this\n callback.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_EnumerateProperties\n"]
4052pub type SDL_EnumeratePropertiesCallback = ::core::option::Option<
4053 unsafe extern "C" fn(
4054 userdata: *mut core::ffi::c_void,
4055 props: SDL_PropertiesID,
4056 name: *const core::ffi::c_char,
4057 ),
4058>;
4059unsafe extern "C" {
4060 #[doc = " Enumerate the properties contained in a group of properties.\n\n The callback function is called for each property in the group of\n properties. The properties are locked during enumeration.\n\n **Parameter:** props the properties to query.\n **Parameter:** callback the function to call for each property.\n **Parameter:** userdata a pointer that is passed to `callback`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4061 pub fn SDL_EnumerateProperties(
4062 props: SDL_PropertiesID,
4063 callback: SDL_EnumeratePropertiesCallback,
4064 userdata: *mut core::ffi::c_void,
4065 ) -> bool;
4066}
4067unsafe extern "C" {
4068 #[doc = " Destroy a group of properties.\n\n All properties are deleted and their cleanup functions will be called, if\n any.\n\n **Parameter:** props the properties to destroy.\n\n **Thread Safety:** This function should not be called while these properties are\n locked or other threads might be setting or getting values\n from these properties.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProperties\n"]
4069 pub fn SDL_DestroyProperties(props: SDL_PropertiesID);
4070}
4071#[repr(C)]
4072#[derive(Debug, Copy, Clone)]
4073pub struct SDL_Thread {
4074 _unused: [u8; 0],
4075}
4076#[doc = " A unique numeric ID that identifies a thread.\n\n These are different from SDL_Thread objects, which are generally what an\n application will operate on, but having a way to uniquely identify a thread\n can be useful at times.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_GetThreadID\n **See Also:** SDL_GetCurrentThreadID\n"]
4077pub type SDL_ThreadID = Uint64;
4078#[doc = " Thread local storage ID.\n\n 0 is the invalid ID. An app can create these and then set data for these\n IDs that is unique to each thread.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTLS\n **See Also:** SDL_SetTLS\n"]
4079pub type SDL_TLSID = SDL_AtomicInt;
4080impl SDL_ThreadPriority {
4081 pub const SDL_THREAD_PRIORITY_LOW: SDL_ThreadPriority = SDL_ThreadPriority(0);
4082 pub const SDL_THREAD_PRIORITY_NORMAL: SDL_ThreadPriority = SDL_ThreadPriority(1);
4083 pub const SDL_THREAD_PRIORITY_HIGH: SDL_ThreadPriority = SDL_ThreadPriority(2);
4084 pub const SDL_THREAD_PRIORITY_TIME_CRITICAL: SDL_ThreadPriority = SDL_ThreadPriority(3);
4085}
4086#[repr(transparent)]
4087#[doc = " The SDL thread priority.\n\n SDL will make system changes as necessary in order to apply the thread\n priority. Code which attempts to control thread state related to priority\n should be aware that calling SDL_SetCurrentThreadPriority may alter such\n state. SDL_HINT_THREAD_PRIORITY_POLICY can be used to control aspects of\n this behavior.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
4088#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4089pub struct SDL_ThreadPriority(pub core::ffi::c_uint);
4090impl SDL_ThreadState {
4091 #[doc = "< The thread is not valid\n"]
4092 pub const SDL_THREAD_UNKNOWN: SDL_ThreadState = SDL_ThreadState(0);
4093 #[doc = "< The thread is currently running\n"]
4094 pub const SDL_THREAD_ALIVE: SDL_ThreadState = SDL_ThreadState(1);
4095 #[doc = "< The thread is detached and can't be waited on\n"]
4096 pub const SDL_THREAD_DETACHED: SDL_ThreadState = SDL_ThreadState(2);
4097 #[doc = "< The thread has finished and should be cleaned up with SDL_WaitThread()\n"]
4098 pub const SDL_THREAD_COMPLETE: SDL_ThreadState = SDL_ThreadState(3);
4099}
4100#[repr(transparent)]
4101#[doc = " The SDL thread state.\n\n The current state of a thread can be checked by calling SDL_GetThreadState.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_GetThreadState\n"]
4102#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4103pub struct SDL_ThreadState(pub core::ffi::c_uint);
4104#[doc = " The function passed to SDL_CreateThread() as the new thread's entry point.\n\n **Parameter:** data what was passed as `data` to SDL_CreateThread().\n **Returns:** a value that can be reported through SDL_WaitThread().\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
4105pub type SDL_ThreadFunction =
4106 ::core::option::Option<unsafe extern "C" fn(data: *mut core::ffi::c_void) -> core::ffi::c_int>;
4107unsafe extern "C" {
4108 #[doc = " The actual entry point for SDL_CreateThread.\n\n **Parameter:** fn the SDL_ThreadFunction function to call in the new thread\n **Parameter:** name the name of the thread\n **Parameter:** data a pointer that is passed to `fn`\n **Parameter:** pfnBeginThread the C runtime's _beginthreadex (or whatnot). Can be NULL.\n **Parameter:** pfnEndThread the C runtime's _endthreadex (or whatnot). Can be NULL.\n **Returns:** an opaque pointer to the new thread object on success, NULL if the\n new thread could not be created; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4109 pub fn SDL_CreateThreadRuntime(
4110 fn_: SDL_ThreadFunction,
4111 name: *const core::ffi::c_char,
4112 data: *mut core::ffi::c_void,
4113 pfnBeginThread: SDL_FunctionPointer,
4114 pfnEndThread: SDL_FunctionPointer,
4115 ) -> *mut SDL_Thread;
4116}
4117unsafe extern "C" {
4118 #[doc = " The actual entry point for SDL_CreateThreadWithProperties.\n\n **Parameter:** props the properties to use\n **Parameter:** pfnBeginThread the C runtime's _beginthreadex (or whatnot). Can be NULL.\n **Parameter:** pfnEndThread the C runtime's _endthreadex (or whatnot). Can be NULL.\n **Returns:** an opaque pointer to the new thread object on success, NULL if the\n new thread could not be created; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4119 pub fn SDL_CreateThreadWithPropertiesRuntime(
4120 props: SDL_PropertiesID,
4121 pfnBeginThread: SDL_FunctionPointer,
4122 pfnEndThread: SDL_FunctionPointer,
4123 ) -> *mut SDL_Thread;
4124}
4125unsafe extern "C" {
4126 #[doc = " Get the thread name as it was specified in SDL_CreateThread().\n\n **Parameter:** thread the thread to query.\n **Returns:** a pointer to a UTF-8 string that names the specified thread, or\n NULL if it doesn't have a name.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4127 pub fn SDL_GetThreadName(thread: *mut SDL_Thread) -> *const core::ffi::c_char;
4128}
4129unsafe extern "C" {
4130 #[doc = " Get the thread identifier for the current thread.\n\n This thread identifier is as reported by the underlying operating system.\n If SDL is running on a platform that does not support threads the return\n value will always be zero.\n\n This function also returns a valid thread ID when called from the main\n thread.\n\n **Returns:** the ID of the current thread.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetThreadID\n"]
4131 pub fn SDL_GetCurrentThreadID() -> SDL_ThreadID;
4132}
4133unsafe extern "C" {
4134 #[doc = " Get the thread identifier for the specified thread.\n\n This thread identifier is as reported by the underlying operating system.\n If SDL is running on a platform that does not support threads the return\n value will always be zero.\n\n **Parameter:** thread the thread to query.\n **Returns:** the ID of the specified thread, or the ID of the current thread if\n `thread` is NULL.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCurrentThreadID\n"]
4135 pub fn SDL_GetThreadID(thread: *mut SDL_Thread) -> SDL_ThreadID;
4136}
4137unsafe extern "C" {
4138 #[doc = " Set the priority for the current thread.\n\n Note that some platforms will not let you alter the priority (or at least,\n promote the thread to a higher priority) at all, and some require you to be\n an administrator account. Be prepared for this to fail.\n\n **Parameter:** priority the SDL_ThreadPriority to set.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4139 pub fn SDL_SetCurrentThreadPriority(priority: SDL_ThreadPriority) -> bool;
4140}
4141unsafe extern "C" {
4142 #[doc = " Wait for a thread to finish.\n\n Threads that haven't been detached will remain until this function cleans\n them up. Not doing so is a resource leak.\n\n Once a thread has been cleaned up through this function, the SDL_Thread\n that references it becomes invalid and should not be referenced again. As\n such, only one thread may call SDL_WaitThread() on another.\n\n The return code from the thread function is placed in the area pointed to\n by `status`, if `status` is not NULL.\n\n You may not wait on a thread that has been used in a call to\n SDL_DetachThread(). Use either that function or this one, but not both, or\n behavior is undefined.\n\n It is safe to pass a NULL thread to this function; it is a no-op.\n\n Note that the thread pointer is freed by this function and is not valid\n afterward.\n\n **Parameter:** thread the SDL_Thread pointer that was returned from the\n SDL_CreateThread() call that started this thread.\n **Parameter:** status a pointer filled in with the value returned from the thread\n function by its 'return', or -1 if the thread has been\n detached or isn't valid, may be NULL.\n\n **Thread Safety:** It is safe to call this function from any thread, but only a\n single thread can wait any specific thread to finish.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateThread\n **See Also:** SDL_DetachThread\n"]
4143 pub fn SDL_WaitThread(thread: *mut SDL_Thread, status: *mut core::ffi::c_int);
4144}
4145unsafe extern "C" {
4146 #[doc = " Get the current state of a thread.\n\n **Parameter:** thread the thread to query.\n **Returns:** the current state of a thread, or SDL_THREAD_UNKNOWN if the thread\n isn't valid.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ThreadState\n"]
4147 pub fn SDL_GetThreadState(thread: *mut SDL_Thread) -> SDL_ThreadState;
4148}
4149unsafe extern "C" {
4150 #[doc = " Let a thread clean up on exit without intervention.\n\n A thread may be \"detached\" to signify that it should not remain until\n another thread has called SDL_WaitThread() on it. Detaching a thread is\n useful for long-running threads that nothing needs to synchronize with or\n further manage. When a detached thread is done, it simply goes away.\n\n There is no way to recover the return code of a detached thread. If you\n need this, don't detach the thread and instead use SDL_WaitThread().\n\n Once a thread is detached, you should usually assume the SDL_Thread isn't\n safe to reference again, as it will become invalid immediately upon the\n detached thread's exit, instead of remaining until someone has called\n SDL_WaitThread() to finally clean it up. As such, don't detach the same\n thread more than once.\n\n If a thread has already exited when passed to SDL_DetachThread(), it will\n stop waiting for a call to SDL_WaitThread() and clean up immediately. It is\n not safe to detach a thread that might be used with SDL_WaitThread().\n\n You may not call SDL_WaitThread() on a thread that has been detached. Use\n either that function or this one, but not both, or behavior is undefined.\n\n It is safe to pass NULL to this function; it is a no-op.\n\n **Parameter:** thread the SDL_Thread pointer that was returned from the\n SDL_CreateThread() call that started this thread.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateThread\n **See Also:** SDL_WaitThread\n"]
4151 pub fn SDL_DetachThread(thread: *mut SDL_Thread);
4152}
4153unsafe extern "C" {
4154 #[doc = " Get the current thread's value associated with a thread local storage ID.\n\n **Parameter:** id a pointer to the thread local storage ID, may not be NULL.\n **Returns:** the value associated with the ID for the current thread or NULL if\n no value has been set; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTLS\n"]
4155 pub fn SDL_GetTLS(id: *mut SDL_TLSID) -> *mut core::ffi::c_void;
4156}
4157#[doc = " The callback used to cleanup data passed to SDL_SetTLS.\n\n This is called when a thread exits, to allow an app to free any resources.\n\n **Parameter:** value a pointer previously handed to SDL_SetTLS.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTLS\n"]
4158pub type SDL_TLSDestructorCallback =
4159 ::core::option::Option<unsafe extern "C" fn(value: *mut core::ffi::c_void)>;
4160unsafe extern "C" {
4161 #[doc = " Set the current thread's value associated with a thread local storage ID.\n\n If the thread local storage ID is not initialized (the value is 0), a new\n ID will be created in a thread-safe way, so all calls using a pointer to\n the same ID will refer to the same local storage.\n\n Note that replacing a value from a previous call to this function on the\n same thread does _not_ call the previous value's destructor!\n\n `destructor` can be NULL; it is assumed that `value` does not need to be\n cleaned up if so.\n\n **Parameter:** id a pointer to the thread local storage ID, may not be NULL.\n **Parameter:** value the value to associate with the ID for the current thread.\n **Parameter:** destructor a function called when the thread exits, to free the\n value, may be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTLS\n"]
4162 pub fn SDL_SetTLS(
4163 id: *mut SDL_TLSID,
4164 value: *const core::ffi::c_void,
4165 destructor: SDL_TLSDestructorCallback,
4166 ) -> bool;
4167}
4168unsafe extern "C" {
4169 #[doc = " Cleanup all TLS data for this thread.\n\n If you are creating your threads outside of SDL and then calling SDL\n functions, you should call this function before your thread exits, to\n properly clean up SDL memory.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4170 pub fn SDL_CleanupTLS();
4171}
4172#[repr(C)]
4173#[derive(Debug, Copy, Clone)]
4174pub struct SDL_Mutex {
4175 _unused: [u8; 0],
4176}
4177unsafe extern "C" {
4178 #[doc = " Create a new mutex.\n\n All newly-created mutexes begin in the _unlocked_ state.\n\n Calls to SDL_LockMutex() will not return while the mutex is locked by\n another thread. See SDL_TryLockMutex() to attempt to lock without blocking.\n\n SDL mutexes are reentrant.\n\n **Returns:** the initialized and unlocked mutex or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyMutex\n **See Also:** SDL_LockMutex\n **See Also:** SDL_TryLockMutex\n **See Also:** SDL_UnlockMutex\n"]
4179 pub fn SDL_CreateMutex() -> *mut SDL_Mutex;
4180}
4181unsafe extern "C" {
4182 #[doc = " Lock the mutex.\n\n This will block until the mutex is available, which is to say it is in the\n unlocked state and the OS has chosen the caller as the next thread to lock\n it. Of all threads waiting to lock the mutex, only one may do so at a time.\n\n It is legal for the owning thread to lock an already-locked mutex. It must\n unlock it the same number of times before it is actually made available for\n other threads in the system (this is known as a \"recursive mutex\").\n\n This function does not fail; if mutex is NULL, it will return immediately\n having locked nothing. If the mutex is valid, this function will always\n block until it can lock the mutex, and return with it locked.\n\n **Parameter:** mutex the mutex to lock.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_TryLockMutex\n **See Also:** SDL_UnlockMutex\n"]
4183 pub fn SDL_LockMutex(mutex: *mut SDL_Mutex);
4184}
4185unsafe extern "C" {
4186 #[doc = " Try to lock a mutex without blocking.\n\n This works just like SDL_LockMutex(), but if the mutex is not available,\n this function returns false immediately.\n\n This technique is useful if you need exclusive access to a resource but\n don't want to wait for it, and will return to it to try again later.\n\n This function returns true if passed a NULL mutex.\n\n **Parameter:** mutex the mutex to try to lock.\n **Returns:** true on success, false if the mutex would block.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockMutex\n **See Also:** SDL_UnlockMutex\n"]
4187 pub fn SDL_TryLockMutex(mutex: *mut SDL_Mutex) -> bool;
4188}
4189unsafe extern "C" {
4190 #[doc = " Unlock the mutex.\n\n It is legal for the owning thread to lock an already-locked mutex. It must\n unlock it the same number of times before it is actually made available for\n other threads in the system (this is known as a \"recursive mutex\").\n\n It is illegal to unlock a mutex that has not been locked by the current\n thread, and doing so results in undefined behavior.\n\n **Parameter:** mutex the mutex to unlock.\n\n **Thread Safety:** This call must be paired with a previous locking call on the\n same thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockMutex\n **See Also:** SDL_TryLockMutex\n"]
4191 pub fn SDL_UnlockMutex(mutex: *mut SDL_Mutex);
4192}
4193unsafe extern "C" {
4194 #[doc = " Destroy a mutex created with SDL_CreateMutex().\n\n This function must be called on any mutex that is no longer needed. Failure\n to destroy a mutex will result in a system memory or resource leak. While\n it is safe to destroy a mutex that is _unlocked_, it is not safe to attempt\n to destroy a locked mutex, and may result in undefined behavior depending\n on the platform.\n\n **Parameter:** mutex the mutex to destroy.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateMutex\n"]
4195 pub fn SDL_DestroyMutex(mutex: *mut SDL_Mutex);
4196}
4197#[repr(C)]
4198#[derive(Debug, Copy, Clone)]
4199pub struct SDL_RWLock {
4200 _unused: [u8; 0],
4201}
4202unsafe extern "C" {
4203 #[doc = " Create a new read/write lock.\n\n A read/write lock is useful for situations where you have multiple threads\n trying to access a resource that is rarely updated. All threads requesting\n a read-only lock will be allowed to run in parallel; if a thread requests a\n write lock, it will be provided exclusive access. This makes it safe for\n multiple threads to use a resource at the same time if they promise not to\n change it, and when it has to be changed, the rwlock will serve as a\n gateway to make sure those changes can be made safely.\n\n In the right situation, a rwlock can be more efficient than a mutex, which\n only lets a single thread proceed at a time, even if it won't be modifying\n the data.\n\n All newly-created read/write locks begin in the _unlocked_ state.\n\n Calls to SDL_LockRWLockForReading() and SDL_LockRWLockForWriting will not\n return while the rwlock is locked _for writing_ by another thread. See\n SDL_TryLockRWLockForReading() and SDL_TryLockRWLockForWriting() to attempt\n to lock without blocking.\n\n SDL read/write locks are only recursive for read-only locks! They are not\n guaranteed to be fair, or provide access in a FIFO manner! They are not\n guaranteed to favor writers. You may not lock a rwlock for both read-only\n and write access at the same time from the same thread (so you can't\n promote your read-only lock to a write lock without unlocking first).\n\n **Returns:** the initialized and unlocked read/write lock or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyRWLock\n **See Also:** SDL_LockRWLockForReading\n **See Also:** SDL_LockRWLockForWriting\n **See Also:** SDL_TryLockRWLockForReading\n **See Also:** SDL_TryLockRWLockForWriting\n **See Also:** SDL_UnlockRWLock\n"]
4204 pub fn SDL_CreateRWLock() -> *mut SDL_RWLock;
4205}
4206unsafe extern "C" {
4207 #[doc = " Lock the read/write lock for _read only_ operations.\n\n This will block until the rwlock is available, which is to say it is not\n locked for writing by any other thread. Of all threads waiting to lock the\n rwlock, all may do so at the same time as long as they are requesting\n read-only access; if a thread wants to lock for writing, only one may do so\n at a time, and no other threads, read-only or not, may hold the lock at the\n same time.\n\n It is legal for the owning thread to lock an already-locked rwlock for\n reading. It must unlock it the same number of times before it is actually\n made available for other threads in the system (this is known as a\n \"recursive rwlock\").\n\n Note that locking for writing is not recursive (this is only available to\n read-only locks).\n\n It is illegal to request a read-only lock from a thread that already holds\n the write lock. Doing so results in undefined behavior. Unlock the write\n lock before requesting a read-only lock. (But, of course, if you have the\n write lock, you don't need further locks to read in any case.)\n\n This function does not fail; if rwlock is NULL, it will return immediately\n having locked nothing. If the rwlock is valid, this function will always\n block until it can lock the mutex, and return with it locked.\n\n **Parameter:** rwlock the read/write lock to lock.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockRWLockForWriting\n **See Also:** SDL_TryLockRWLockForReading\n **See Also:** SDL_UnlockRWLock\n"]
4208 pub fn SDL_LockRWLockForReading(rwlock: *mut SDL_RWLock);
4209}
4210unsafe extern "C" {
4211 #[doc = " Lock the read/write lock for _write_ operations.\n\n This will block until the rwlock is available, which is to say it is not\n locked for reading or writing by any other thread. Only one thread may hold\n the lock when it requests write access; all other threads, whether they\n also want to write or only want read-only access, must wait until the\n writer thread has released the lock.\n\n It is illegal for the owning thread to lock an already-locked rwlock for\n writing (read-only may be locked recursively, writing can not). Doing so\n results in undefined behavior.\n\n It is illegal to request a write lock from a thread that already holds a\n read-only lock. Doing so results in undefined behavior. Unlock the\n read-only lock before requesting a write lock.\n\n This function does not fail; if rwlock is NULL, it will return immediately\n having locked nothing. If the rwlock is valid, this function will always\n block until it can lock the mutex, and return with it locked.\n\n **Parameter:** rwlock the read/write lock to lock.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockRWLockForReading\n **See Also:** SDL_TryLockRWLockForWriting\n **See Also:** SDL_UnlockRWLock\n"]
4212 pub fn SDL_LockRWLockForWriting(rwlock: *mut SDL_RWLock);
4213}
4214unsafe extern "C" {
4215 #[doc = " Try to lock a read/write lock _for reading_ without blocking.\n\n This works just like SDL_LockRWLockForReading(), but if the rwlock is not\n available, then this function returns false immediately.\n\n This technique is useful if you need access to a resource but don't want to\n wait for it, and will return to it to try again later.\n\n Trying to lock for read-only access can succeed if other threads are\n holding read-only locks, as this won't prevent access.\n\n This function returns true if passed a NULL rwlock.\n\n **Parameter:** rwlock the rwlock to try to lock.\n **Returns:** true on success, false if the lock would block.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockRWLockForReading\n **See Also:** SDL_TryLockRWLockForWriting\n **See Also:** SDL_UnlockRWLock\n"]
4216 pub fn SDL_TryLockRWLockForReading(rwlock: *mut SDL_RWLock) -> bool;
4217}
4218unsafe extern "C" {
4219 #[doc = " Try to lock a read/write lock _for writing_ without blocking.\n\n This works just like SDL_LockRWLockForWriting(), but if the rwlock is not\n available, then this function returns false immediately.\n\n This technique is useful if you need exclusive access to a resource but\n don't want to wait for it, and will return to it to try again later.\n\n It is illegal for the owning thread to lock an already-locked rwlock for\n writing (read-only may be locked recursively, writing can not). Doing so\n results in undefined behavior.\n\n It is illegal to request a write lock from a thread that already holds a\n read-only lock. Doing so results in undefined behavior. Unlock the\n read-only lock before requesting a write lock.\n\n This function returns true if passed a NULL rwlock.\n\n **Parameter:** rwlock the rwlock to try to lock.\n **Returns:** true on success, false if the lock would block.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockRWLockForWriting\n **See Also:** SDL_TryLockRWLockForReading\n **See Also:** SDL_UnlockRWLock\n"]
4220 pub fn SDL_TryLockRWLockForWriting(rwlock: *mut SDL_RWLock) -> bool;
4221}
4222unsafe extern "C" {
4223 #[doc = " Unlock the read/write lock.\n\n Use this function to unlock the rwlock, whether it was locked for read-only\n or write operations.\n\n It is legal for the owning thread to lock an already-locked read-only lock.\n It must unlock it the same number of times before it is actually made\n available for other threads in the system (this is known as a \"recursive\n rwlock\").\n\n It is illegal to unlock a rwlock that has not been locked by the current\n thread, and doing so results in undefined behavior.\n\n **Parameter:** rwlock the rwlock to unlock.\n\n **Thread Safety:** This call must be paired with a previous locking call on the\n same thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockRWLockForReading\n **See Also:** SDL_LockRWLockForWriting\n **See Also:** SDL_TryLockRWLockForReading\n **See Also:** SDL_TryLockRWLockForWriting\n"]
4224 pub fn SDL_UnlockRWLock(rwlock: *mut SDL_RWLock);
4225}
4226unsafe extern "C" {
4227 #[doc = " Destroy a read/write lock created with SDL_CreateRWLock().\n\n This function must be called on any read/write lock that is no longer\n needed. Failure to destroy a rwlock will result in a system memory or\n resource leak. While it is safe to destroy a rwlock that is _unlocked_, it\n is not safe to attempt to destroy a locked rwlock, and may result in\n undefined behavior depending on the platform.\n\n **Parameter:** rwlock the rwlock to destroy.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateRWLock\n"]
4228 pub fn SDL_DestroyRWLock(rwlock: *mut SDL_RWLock);
4229}
4230#[repr(C)]
4231#[derive(Debug, Copy, Clone)]
4232pub struct SDL_Semaphore {
4233 _unused: [u8; 0],
4234}
4235unsafe extern "C" {
4236 #[doc = " Create a semaphore.\n\n This function creates a new semaphore and initializes it with the value\n `initial_value`. Each wait operation on the semaphore will atomically\n decrement the semaphore value and potentially block if the semaphore value\n is 0. Each post operation will atomically increment the semaphore value and\n wake waiting threads and allow them to retry the wait operation.\n\n **Parameter:** initial_value the starting value of the semaphore.\n **Returns:** a new semaphore or NULL on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroySemaphore\n **See Also:** SDL_SignalSemaphore\n **See Also:** SDL_TryWaitSemaphore\n **See Also:** SDL_GetSemaphoreValue\n **See Also:** SDL_WaitSemaphore\n **See Also:** SDL_WaitSemaphoreTimeout\n"]
4237 pub fn SDL_CreateSemaphore(initial_value: Uint32) -> *mut SDL_Semaphore;
4238}
4239unsafe extern "C" {
4240 #[doc = " Destroy a semaphore.\n\n It is not safe to destroy a semaphore if there are threads currently\n waiting on it.\n\n **Parameter:** sem the semaphore to destroy.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateSemaphore\n"]
4241 pub fn SDL_DestroySemaphore(sem: *mut SDL_Semaphore);
4242}
4243unsafe extern "C" {
4244 #[doc = " Wait until a semaphore has a positive value and then decrements it.\n\n This function suspends the calling thread until the semaphore pointed to by\n `sem` has a positive value, and then atomically decrement the semaphore\n value.\n\n This function is the equivalent of calling SDL_WaitSemaphoreTimeout() with\n a time length of -1.\n\n **Parameter:** sem the semaphore wait on.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SignalSemaphore\n **See Also:** SDL_TryWaitSemaphore\n **See Also:** SDL_WaitSemaphoreTimeout\n"]
4245 pub fn SDL_WaitSemaphore(sem: *mut SDL_Semaphore);
4246}
4247unsafe extern "C" {
4248 #[doc = " See if a semaphore has a positive value and decrement it if it does.\n\n This function checks to see if the semaphore pointed to by `sem` has a\n positive value and atomically decrements the semaphore value if it does. If\n the semaphore doesn't have a positive value, the function immediately\n returns false.\n\n **Parameter:** sem the semaphore to wait on.\n **Returns:** true if the wait succeeds, false if the wait would block.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SignalSemaphore\n **See Also:** SDL_WaitSemaphore\n **See Also:** SDL_WaitSemaphoreTimeout\n"]
4249 pub fn SDL_TryWaitSemaphore(sem: *mut SDL_Semaphore) -> bool;
4250}
4251unsafe extern "C" {
4252 #[doc = " Wait until a semaphore has a positive value and then decrements it.\n\n This function suspends the calling thread until either the semaphore\n pointed to by `sem` has a positive value or the specified time has elapsed.\n If the call is successful it will atomically decrement the semaphore value.\n\n **Parameter:** sem the semaphore to wait on.\n **Parameter:** timeoutMS the length of the timeout, in milliseconds, or -1 to wait\n indefinitely.\n **Returns:** true if the wait succeeds or false if the wait times out.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SignalSemaphore\n **See Also:** SDL_TryWaitSemaphore\n **See Also:** SDL_WaitSemaphore\n"]
4253 pub fn SDL_WaitSemaphoreTimeout(sem: *mut SDL_Semaphore, timeoutMS: Sint32) -> bool;
4254}
4255unsafe extern "C" {
4256 #[doc = " Atomically increment a semaphore's value and wake waiting threads.\n\n **Parameter:** sem the semaphore to increment.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_TryWaitSemaphore\n **See Also:** SDL_WaitSemaphore\n **See Also:** SDL_WaitSemaphoreTimeout\n"]
4257 pub fn SDL_SignalSemaphore(sem: *mut SDL_Semaphore);
4258}
4259unsafe extern "C" {
4260 #[doc = " Get the current value of a semaphore.\n\n **Parameter:** sem the semaphore to query.\n **Returns:** the current value of the semaphore.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4261 pub fn SDL_GetSemaphoreValue(sem: *mut SDL_Semaphore) -> Uint32;
4262}
4263#[repr(C)]
4264#[derive(Debug, Copy, Clone)]
4265pub struct SDL_Condition {
4266 _unused: [u8; 0],
4267}
4268unsafe extern "C" {
4269 #[doc = " Create a condition variable.\n\n **Returns:** a new condition variable or NULL on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BroadcastCondition\n **See Also:** SDL_SignalCondition\n **See Also:** SDL_WaitCondition\n **See Also:** SDL_WaitConditionTimeout\n **See Also:** SDL_DestroyCondition\n"]
4270 pub fn SDL_CreateCondition() -> *mut SDL_Condition;
4271}
4272unsafe extern "C" {
4273 #[doc = " Destroy a condition variable.\n\n **Parameter:** cond the condition variable to destroy.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateCondition\n"]
4274 pub fn SDL_DestroyCondition(cond: *mut SDL_Condition);
4275}
4276unsafe extern "C" {
4277 #[doc = " Restart one of the threads that are waiting on the condition variable.\n\n **Parameter:** cond the condition variable to signal.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BroadcastCondition\n **See Also:** SDL_WaitCondition\n **See Also:** SDL_WaitConditionTimeout\n"]
4278 pub fn SDL_SignalCondition(cond: *mut SDL_Condition);
4279}
4280unsafe extern "C" {
4281 #[doc = " Restart all threads that are waiting on the condition variable.\n\n **Parameter:** cond the condition variable to signal.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SignalCondition\n **See Also:** SDL_WaitCondition\n **See Also:** SDL_WaitConditionTimeout\n"]
4282 pub fn SDL_BroadcastCondition(cond: *mut SDL_Condition);
4283}
4284unsafe extern "C" {
4285 #[doc = " Wait until a condition variable is signaled.\n\n This function unlocks the specified `mutex` and waits for another thread to\n call SDL_SignalCondition() or SDL_BroadcastCondition() on the condition\n variable `cond`. Once the condition variable is signaled, the mutex is\n re-locked and the function returns.\n\n The mutex must be locked before calling this function. Locking the mutex\n recursively (more than once) is not supported and leads to undefined\n behavior.\n\n This function is the equivalent of calling SDL_WaitConditionTimeout() with\n a time length of -1.\n\n **Parameter:** cond the condition variable to wait on.\n **Parameter:** mutex the mutex used to coordinate thread access.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BroadcastCondition\n **See Also:** SDL_SignalCondition\n **See Also:** SDL_WaitConditionTimeout\n"]
4286 pub fn SDL_WaitCondition(cond: *mut SDL_Condition, mutex: *mut SDL_Mutex);
4287}
4288unsafe extern "C" {
4289 #[doc = " Wait until a condition variable is signaled or a certain time has passed.\n\n This function unlocks the specified `mutex` and waits for another thread to\n call SDL_SignalCondition() or SDL_BroadcastCondition() on the condition\n variable `cond`, or for the specified time to elapse. Once the condition\n variable is signaled or the time elapsed, the mutex is re-locked and the\n function returns.\n\n The mutex must be locked before calling this function. Locking the mutex\n recursively (more than once) is not supported and leads to undefined\n behavior.\n\n **Parameter:** cond the condition variable to wait on.\n **Parameter:** mutex the mutex used to coordinate thread access.\n **Parameter:** timeoutMS the maximum time to wait, in milliseconds, or -1 to wait\n indefinitely.\n **Returns:** true if the condition variable is signaled, false if the condition\n is not signaled in the allotted time.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BroadcastCondition\n **See Also:** SDL_SignalCondition\n **See Also:** SDL_WaitCondition\n"]
4290 pub fn SDL_WaitConditionTimeout(
4291 cond: *mut SDL_Condition,
4292 mutex: *mut SDL_Mutex,
4293 timeoutMS: Sint32,
4294 ) -> bool;
4295}
4296impl SDL_InitStatus {
4297 pub const SDL_INIT_STATUS_UNINITIALIZED: SDL_InitStatus = SDL_InitStatus(0);
4298 pub const SDL_INIT_STATUS_INITIALIZING: SDL_InitStatus = SDL_InitStatus(1);
4299 pub const SDL_INIT_STATUS_INITIALIZED: SDL_InitStatus = SDL_InitStatus(2);
4300 pub const SDL_INIT_STATUS_UNINITIALIZING: SDL_InitStatus = SDL_InitStatus(3);
4301}
4302#[repr(transparent)]
4303#[doc = " The current status of an SDL_InitState structure.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
4304#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4305pub struct SDL_InitStatus(pub core::ffi::c_uint);
4306#[doc = " A structure used for thread-safe initialization and shutdown.\n\n Here is an example of using this:\n\n ```c\n static SDL_InitState init;\n\n bool InitSystem(void)\n {\n if (!SDL_ShouldInit(&init)) {\n // The system is initialized\n return true;\n }\n\n // At this point, you should not leave this function without calling SDL_SetInitialized()\n\n bool initialized = DoInitTasks();\n SDL_SetInitialized(&init, initialized);\n return initialized;\n }\n\n bool UseSubsystem(void)\n {\n if (SDL_ShouldInit(&init)) {\n // Error, the subsystem isn't initialized\n SDL_SetInitialized(&init, false);\n return false;\n }\n\n // Do work using the initialized subsystem\n\n return true;\n }\n\n void QuitSystem(void)\n {\n if (!SDL_ShouldQuit(&init)) {\n // The system is not initialized\n return;\n }\n\n // At this point, you should not leave this function without calling SDL_SetInitialized()\n\n DoQuitTasks();\n SDL_SetInitialized(&init, false);\n }\n ```\n\n Note that this doesn't protect any resources created during initialization,\n or guarantee that nobody is using those resources during cleanup. You\n should use other mechanisms to protect those, if that's a concern for your\n code.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
4307#[repr(C)]
4308#[derive(Debug, Copy, Clone, Hash)]
4309pub struct SDL_InitState {
4310 pub status: SDL_AtomicInt,
4311 pub thread: SDL_ThreadID,
4312 pub reserved: *mut core::ffi::c_void,
4313}
4314#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4315const _: () = {
4316 ["Size of SDL_InitState"][::core::mem::size_of::<SDL_InitState>() - 24usize];
4317 ["Alignment of SDL_InitState"][::core::mem::align_of::<SDL_InitState>() - 8usize];
4318 ["Offset of field: SDL_InitState::status"]
4319 [::core::mem::offset_of!(SDL_InitState, status) - 0usize];
4320 ["Offset of field: SDL_InitState::thread"]
4321 [::core::mem::offset_of!(SDL_InitState, thread) - 8usize];
4322 ["Offset of field: SDL_InitState::reserved"]
4323 [::core::mem::offset_of!(SDL_InitState, reserved) - 16usize];
4324};
4325impl Default for SDL_InitState {
4326 fn default() -> Self {
4327 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
4328 unsafe {
4329 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4330 s.assume_init()
4331 }
4332 }
4333}
4334unsafe extern "C" {
4335 #[doc = " Return whether initialization should be done.\n\n This function checks the passed in state and if initialization should be\n done, sets the status to `SDL_INIT_STATUS_INITIALIZING` and returns true.\n If another thread is already modifying this state, it will wait until\n that's done before returning.\n\n If this function returns true, the calling code must call\n SDL_SetInitialized() to complete the initialization.\n\n **Parameter:** state the initialization state to check.\n **Returns:** true if initialization needs to be done, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetInitialized\n **See Also:** SDL_ShouldQuit\n"]
4336 pub fn SDL_ShouldInit(state: *mut SDL_InitState) -> bool;
4337}
4338unsafe extern "C" {
4339 #[doc = " Return whether cleanup should be done.\n\n This function checks the passed in state and if cleanup should be done,\n sets the status to `SDL_INIT_STATUS_UNINITIALIZING` and returns true.\n\n If this function returns true, the calling code must call\n SDL_SetInitialized() to complete the cleanup.\n\n **Parameter:** state the initialization state to check.\n **Returns:** true if cleanup needs to be done, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetInitialized\n **See Also:** SDL_ShouldInit\n"]
4340 pub fn SDL_ShouldQuit(state: *mut SDL_InitState) -> bool;
4341}
4342unsafe extern "C" {
4343 #[doc = " Finish an initialization state transition.\n\n This function sets the status of the passed in state to\n `SDL_INIT_STATUS_INITIALIZED` or `SDL_INIT_STATUS_UNINITIALIZED` and allows\n any threads waiting for the status to proceed.\n\n **Parameter:** state the initialization state to check.\n **Parameter:** initialized the new initialization state.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ShouldInit\n **See Also:** SDL_ShouldQuit\n"]
4344 pub fn SDL_SetInitialized(state: *mut SDL_InitState, initialized: bool);
4345}
4346impl SDL_IOStatus {
4347 #[doc = "< Everything is ready (no errors and not EOF).\n"]
4348 pub const SDL_IO_STATUS_READY: SDL_IOStatus = SDL_IOStatus(0);
4349 #[doc = "< Read or write I/O error\n"]
4350 pub const SDL_IO_STATUS_ERROR: SDL_IOStatus = SDL_IOStatus(1);
4351 #[doc = "< End of file\n"]
4352 pub const SDL_IO_STATUS_EOF: SDL_IOStatus = SDL_IOStatus(2);
4353 #[doc = "< Non blocking I/O, not ready\n"]
4354 pub const SDL_IO_STATUS_NOT_READY: SDL_IOStatus = SDL_IOStatus(3);
4355 #[doc = "< Tried to write a read-only buffer\n"]
4356 pub const SDL_IO_STATUS_READONLY: SDL_IOStatus = SDL_IOStatus(4);
4357 #[doc = "< Tried to read a write-only buffer\n"]
4358 pub const SDL_IO_STATUS_WRITEONLY: SDL_IOStatus = SDL_IOStatus(5);
4359}
4360#[repr(transparent)]
4361#[doc = " SDL_IOStream status, set by a read or write operation.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
4362#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4363pub struct SDL_IOStatus(pub core::ffi::c_uint);
4364impl SDL_IOWhence {
4365 #[doc = "< Seek from the beginning of data\n"]
4366 pub const SDL_IO_SEEK_SET: SDL_IOWhence = SDL_IOWhence(0);
4367 #[doc = "< Seek relative to current read point\n"]
4368 pub const SDL_IO_SEEK_CUR: SDL_IOWhence = SDL_IOWhence(1);
4369 #[doc = "< Seek relative to the end of data\n"]
4370 pub const SDL_IO_SEEK_END: SDL_IOWhence = SDL_IOWhence(2);
4371}
4372#[repr(transparent)]
4373#[doc = " Possible `whence` values for SDL_IOStream seeking.\n\n These map to the same \"whence\" concept that `fseek` or `lseek` use in the\n standard C runtime.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
4374#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4375pub struct SDL_IOWhence(pub core::ffi::c_uint);
4376#[doc = " The function pointers that drive an SDL_IOStream.\n\n Applications can provide this struct to SDL_OpenIO() to create their own\n implementation of SDL_IOStream. This is not necessarily required, as SDL\n already offers several common types of I/O streams, via functions like\n SDL_IOFromFile() and SDL_IOFromMem().\n\n This structure should be initialized using SDL_INIT_INTERFACE()\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_INIT_INTERFACE\n"]
4377#[repr(C)]
4378#[derive(Debug, Default, Copy, Clone, Hash)]
4379pub struct SDL_IOStreamInterface {
4380 pub version: Uint32,
4381 #[doc = " Return the number of bytes in this SDL_IOStream\n\n **Returns:** the total size of the data stream, or -1 on error.\n"]
4382 pub size:
4383 ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void) -> Sint64>,
4384 #[doc = " Seek to `offset` relative to `whence`, one of stdio's whence values:\n SDL_IO_SEEK_SET, SDL_IO_SEEK_CUR, SDL_IO_SEEK_END\n\n **Returns:** the final offset in the data stream, or -1 on error.\n"]
4385 pub seek: ::core::option::Option<
4386 unsafe extern "C" fn(
4387 userdata: *mut core::ffi::c_void,
4388 offset: Sint64,
4389 whence: SDL_IOWhence,
4390 ) -> Sint64,
4391 >,
4392 #[doc = " Read up to `size` bytes from the data stream to the area pointed\n at by `ptr`. `size` will always be > 0.\n\n On an incomplete read, you should set `*status` to a value from the\n SDL_IOStatus enum. You do not have to explicitly set this on\n a complete, successful read.\n\n **Returns:** the number of bytes read\n"]
4393 pub read: ::core::option::Option<
4394 unsafe extern "C" fn(
4395 userdata: *mut core::ffi::c_void,
4396 ptr: *mut core::ffi::c_void,
4397 size: usize,
4398 status: *mut SDL_IOStatus,
4399 ) -> usize,
4400 >,
4401 #[doc = " Write exactly `size` bytes from the area pointed at by `ptr`\n to data stream. `size` will always be > 0.\n\n On an incomplete write, you should set `*status` to a value from the\n SDL_IOStatus enum. You do not have to explicitly set this on\n a complete, successful write.\n\n **Returns:** the number of bytes written\n"]
4402 pub write: ::core::option::Option<
4403 unsafe extern "C" fn(
4404 userdata: *mut core::ffi::c_void,
4405 ptr: *const core::ffi::c_void,
4406 size: usize,
4407 status: *mut SDL_IOStatus,
4408 ) -> usize,
4409 >,
4410 #[doc = " If the stream is buffering, make sure the data is written out.\n\n On failure, you should set `*status` to a value from the\n SDL_IOStatus enum. You do not have to explicitly set this on\n a successful flush.\n\n **Returns:** true if successful or false on write error when flushing data.\n"]
4411 pub flush: ::core::option::Option<
4412 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, status: *mut SDL_IOStatus) -> bool,
4413 >,
4414 #[doc = " Close and free any allocated resources.\n\n This does not guarantee file writes will sync to physical media; they\n can be in the system's file cache, waiting to go to disk.\n\n The SDL_IOStream is still destroyed even if this fails, so clean up anything\n even if flushing buffers, etc, returns an error.\n\n **Returns:** true if successful or false on write error when flushing data.\n"]
4415 pub close:
4416 ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void) -> bool>,
4417}
4418#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4419const _: () = {
4420 ["Size of SDL_IOStreamInterface"][::core::mem::size_of::<SDL_IOStreamInterface>() - 56usize];
4421 ["Alignment of SDL_IOStreamInterface"]
4422 [::core::mem::align_of::<SDL_IOStreamInterface>() - 8usize];
4423 ["Offset of field: SDL_IOStreamInterface::version"]
4424 [::core::mem::offset_of!(SDL_IOStreamInterface, version) - 0usize];
4425 ["Offset of field: SDL_IOStreamInterface::size"]
4426 [::core::mem::offset_of!(SDL_IOStreamInterface, size) - 8usize];
4427 ["Offset of field: SDL_IOStreamInterface::seek"]
4428 [::core::mem::offset_of!(SDL_IOStreamInterface, seek) - 16usize];
4429 ["Offset of field: SDL_IOStreamInterface::read"]
4430 [::core::mem::offset_of!(SDL_IOStreamInterface, read) - 24usize];
4431 ["Offset of field: SDL_IOStreamInterface::write"]
4432 [::core::mem::offset_of!(SDL_IOStreamInterface, write) - 32usize];
4433 ["Offset of field: SDL_IOStreamInterface::flush"]
4434 [::core::mem::offset_of!(SDL_IOStreamInterface, flush) - 40usize];
4435 ["Offset of field: SDL_IOStreamInterface::close"]
4436 [::core::mem::offset_of!(SDL_IOStreamInterface, close) - 48usize];
4437};
4438#[repr(C)]
4439#[derive(Debug, Copy, Clone)]
4440pub struct SDL_IOStream {
4441 _unused: [u8; 0],
4442}
4443unsafe extern "C" {
4444 #[doc = " Use this function to create a new SDL_IOStream structure for reading from\n and/or writing to a named file.\n\n The `mode` string is treated roughly the same as in a call to the C\n library's fopen(), even if SDL doesn't happen to use fopen() behind the\n scenes.\n\n Available `mode` strings:\n\n - \"r\": Open a file for reading. The file must exist.\n - \"w\": Create an empty file for writing. If a file with the same name\n already exists its content is erased and the file is treated as a new\n empty file.\n - \"wx\": Create an empty file for writing. If a file with the same name\n already exists, the call fails.\n - \"a\": Append to a file. Writing operations append data at the end of the\n file. The file is created if it does not exist.\n - \"r+\": Open a file for update both reading and writing. The file must\n exist.\n - \"w+\": Create an empty file for both reading and writing. If a file with\n the same name already exists its content is erased and the file is\n treated as a new empty file.\n - \"w+x\": Create an empty file for both reading and writing. If a file with\n the same name already exists, the call fails.\n - \"a+\": Open a file for reading and appending. All writing operations are\n performed at the end of the file, protecting the previous content to be\n overwritten. You can reposition (fseek, rewind) the internal pointer to\n anywhere in the file for reading, but writing operations will move it\n back to the end of file. The file is created if it does not exist.\n\n **NOTE**: In order to open a file as a binary file, a \"b\" character has to\n be included in the `mode` string. This additional \"b\" character can either\n be appended at the end of the string (thus making the following compound\n modes: \"rb\", \"wb\", \"ab\", \"r+b\", \"w+b\", \"a+b\") or be inserted between the\n letter and the \"+\" sign for the mixed modes (\"rb+\", \"wb+\", \"ab+\").\n Additional characters may follow the sequence, although they should have no\n effect. For example, \"t\" is sometimes appended to make explicit the file is\n a text file.\n\n This function supports Unicode filenames, but they must be encoded in UTF-8\n format, regardless of the underlying operating system.\n\n In Android, SDL_IOFromFile() can be used to open content:// URIs. As a\n fallback, SDL_IOFromFile() will transparently open a matching filename in\n the app's `assets`.\n\n Closing the SDL_IOStream will close SDL's internal file handle.\n\n The following properties may be set at creation time by SDL:\n\n - `SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER`: a pointer, that can be cast\n to a win32 `HANDLE`, that this SDL_IOStream is using to access the\n filesystem. If the program isn't running on Windows, or SDL used some\n other method to access the filesystem, this property will not be set.\n - `SDL_PROP_IOSTREAM_STDIO_FILE_POINTER`: a pointer, that can be cast to a\n stdio `FILE *`, that this SDL_IOStream is using to access the filesystem.\n If SDL used some other method to access the filesystem, this property\n will not be set. PLEASE NOTE that if SDL is using a different C runtime\n than your app, trying to use this pointer will almost certainly result in\n a crash! This is mostly a problem on Windows; make sure you build SDL and\n your app with the same compiler and settings to avoid it.\n - `SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER`: a file descriptor that this\n SDL_IOStream is using to access the filesystem.\n - `SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER`: a pointer, that can be cast\n to an Android NDK `AAsset *`, that this SDL_IOStream is using to access\n the filesystem. If SDL used some other method to access the filesystem,\n this property will not be set.\n\n **Parameter:** file a UTF-8 string representing the filename to open.\n **Parameter:** mode an ASCII string representing the mode to be used for opening\n the file.\n **Returns:** a pointer to the SDL_IOStream structure that is created or NULL on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseIO\n **See Also:** SDL_FlushIO\n **See Also:** SDL_ReadIO\n **See Also:** SDL_SeekIO\n **See Also:** SDL_TellIO\n **See Also:** SDL_WriteIO\n"]
4445 pub fn SDL_IOFromFile(
4446 file: *const core::ffi::c_char,
4447 mode: *const core::ffi::c_char,
4448 ) -> *mut SDL_IOStream;
4449}
4450unsafe extern "C" {
4451 #[doc = " Use this function to prepare a read-write memory buffer for use with\n SDL_IOStream.\n\n This function sets up an SDL_IOStream struct based on a memory area of a\n certain size, for both read and write access.\n\n This memory buffer is not copied by the SDL_IOStream; the pointer you\n provide must remain valid until you close the stream.\n\n If you need to make sure the SDL_IOStream never writes to the memory\n buffer, you should use SDL_IOFromConstMem() with a read-only buffer of\n memory instead.\n\n The following properties will be set at creation time by SDL:\n\n - `SDL_PROP_IOSTREAM_MEMORY_POINTER`: this will be the `mem` parameter that\n was passed to this function.\n - `SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER`: this will be the `size` parameter\n that was passed to this function.\n\n Additionally, the following properties are recognized:\n\n - `SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER`: if this property is set to\n a non-NULL value it will be interpreted as a function of SDL_free_func\n type and called with the passed `mem` pointer when closing the stream. By\n default it is unset, i.e., the memory will not be freed.\n\n **Parameter:** mem a pointer to a buffer to feed an SDL_IOStream stream.\n **Parameter:** size the buffer size, in bytes.\n **Returns:** a pointer to a new SDL_IOStream structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_IOFromConstMem\n **See Also:** SDL_CloseIO\n **See Also:** SDL_FlushIO\n **See Also:** SDL_ReadIO\n **See Also:** SDL_SeekIO\n **See Also:** SDL_TellIO\n **See Also:** SDL_WriteIO\n"]
4452 pub fn SDL_IOFromMem(mem: *mut core::ffi::c_void, size: usize) -> *mut SDL_IOStream;
4453}
4454unsafe extern "C" {
4455 #[doc = " Use this function to prepare a read-only memory buffer for use with\n SDL_IOStream.\n\n This function sets up an SDL_IOStream struct based on a memory area of a\n certain size. It assumes the memory area is not writable.\n\n Attempting to write to this SDL_IOStream stream will report an error\n without writing to the memory buffer.\n\n This memory buffer is not copied by the SDL_IOStream; the pointer you\n provide must remain valid until you close the stream.\n\n If you need to write to a memory buffer, you should use SDL_IOFromMem()\n with a writable buffer of memory instead.\n\n The following properties will be set at creation time by SDL:\n\n - `SDL_PROP_IOSTREAM_MEMORY_POINTER`: this will be the `mem` parameter that\n was passed to this function.\n - `SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER`: this will be the `size` parameter\n that was passed to this function.\n\n Additionally, the following properties are recognized:\n\n - `SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER`: if this property is set to\n a non-NULL value it will be interpreted as a function of SDL_free_func\n type and called with the passed `mem` pointer when closing the stream. By\n default it is unset, i.e., the memory will not be freed.\n\n **Parameter:** mem a pointer to a read-only buffer to feed an SDL_IOStream stream.\n **Parameter:** size the buffer size, in bytes.\n **Returns:** a pointer to a new SDL_IOStream structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_IOFromMem\n **See Also:** SDL_CloseIO\n **See Also:** SDL_ReadIO\n **See Also:** SDL_SeekIO\n **See Also:** SDL_TellIO\n"]
4456 pub fn SDL_IOFromConstMem(mem: *const core::ffi::c_void, size: usize) -> *mut SDL_IOStream;
4457}
4458unsafe extern "C" {
4459 #[doc = " Use this function to create an SDL_IOStream that is backed by dynamically\n allocated memory.\n\n This supports the following properties to provide access to the memory and\n control over allocations:\n\n - `SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER`: a pointer to the internal\n memory of the stream. This can be set to NULL to transfer ownership of\n the memory to the application, which should free the memory with\n SDL_free(). If this is done, the next operation on the stream must be\n SDL_CloseIO().\n - `SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER`: memory will be allocated in\n multiples of this size, defaulting to 1024.\n\n **Returns:** a pointer to a new SDL_IOStream structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseIO\n **See Also:** SDL_ReadIO\n **See Also:** SDL_SeekIO\n **See Also:** SDL_TellIO\n **See Also:** SDL_WriteIO\n"]
4460 pub fn SDL_IOFromDynamicMem() -> *mut SDL_IOStream;
4461}
4462unsafe extern "C" {
4463 #[doc = " Create a custom SDL_IOStream.\n\n Applications do not need to use this function unless they are providing\n their own SDL_IOStream implementation. If you just need an SDL_IOStream to\n read/write a common data source, you should use the built-in\n implementations in SDL, like SDL_IOFromFile() or SDL_IOFromMem(), etc.\n\n This function makes a copy of `iface` and the caller does not need to keep\n it around after this call.\n\n **Parameter:** iface the interface that implements this SDL_IOStream, initialized\n using SDL_INIT_INTERFACE().\n **Parameter:** userdata the pointer that will be passed to the interface functions.\n **Returns:** a pointer to the allocated memory on success or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseIO\n **See Also:** SDL_INIT_INTERFACE\n **See Also:** SDL_IOFromConstMem\n **See Also:** SDL_IOFromFile\n **See Also:** SDL_IOFromMem\n"]
4464 pub fn SDL_OpenIO(
4465 iface: *const SDL_IOStreamInterface,
4466 userdata: *mut core::ffi::c_void,
4467 ) -> *mut SDL_IOStream;
4468}
4469unsafe extern "C" {
4470 #[doc = " Close and free an allocated SDL_IOStream structure.\n\n SDL_CloseIO() closes and cleans up the SDL_IOStream stream. It releases any\n resources used by the stream and frees the SDL_IOStream itself. This\n returns true on success, or false if the stream failed to flush to its\n output (e.g. to disk).\n\n Note that if this fails to flush the stream for any reason, this function\n reports an error, but the SDL_IOStream is still invalid once this function\n returns.\n\n This call flushes any buffered writes to the operating system, but there\n are no guarantees that those writes have gone to physical media; they might\n be in the OS's file cache, waiting to go to disk later. If it's absolutely\n crucial that writes go to disk immediately, so they are definitely stored\n even if the power fails before the file cache would have caught up, one\n should call SDL_FlushIO() before closing. Note that flushing takes time and\n makes the system and your app operate less efficiently, so do so sparingly.\n\n **Parameter:** context SDL_IOStream structure to close.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenIO\n"]
4471 pub fn SDL_CloseIO(context: *mut SDL_IOStream) -> bool;
4472}
4473unsafe extern "C" {
4474 #[doc = " Get the properties associated with an SDL_IOStream.\n\n **Parameter:** context a pointer to an SDL_IOStream structure.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4475 pub fn SDL_GetIOProperties(context: *mut SDL_IOStream) -> SDL_PropertiesID;
4476}
4477unsafe extern "C" {
4478 #[doc = " Query the stream status of an SDL_IOStream.\n\n This information can be useful to decide if a short read or write was due\n to an error, an EOF, or a non-blocking operation that isn't yet ready to\n complete.\n\n An SDL_IOStream's status is only expected to change after a SDL_ReadIO or\n SDL_WriteIO call; don't expect it to change if you just call this query\n function in a tight loop.\n\n **Parameter:** context the SDL_IOStream to query.\n **Returns:** an SDL_IOStatus enum with the current state.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4479 pub fn SDL_GetIOStatus(context: *mut SDL_IOStream) -> SDL_IOStatus;
4480}
4481unsafe extern "C" {
4482 #[doc = " Use this function to get the size of the data stream in an SDL_IOStream.\n\n **Parameter:** context the SDL_IOStream to get the size of the data stream from.\n **Returns:** the size of the data stream in the SDL_IOStream on success or a\n negative error code on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4483 pub fn SDL_GetIOSize(context: *mut SDL_IOStream) -> Sint64;
4484}
4485unsafe extern "C" {
4486 #[doc = " Seek within an SDL_IOStream data stream.\n\n This function seeks to byte `offset`, relative to `whence`.\n\n `whence` may be any of the following values:\n\n - `SDL_IO_SEEK_SET`: seek from the beginning of data\n - `SDL_IO_SEEK_CUR`: seek relative to current read point\n - `SDL_IO_SEEK_END`: seek relative to the end of data\n\n If this stream can not seek, it will return -1.\n\n **Parameter:** context a pointer to an SDL_IOStream structure.\n **Parameter:** offset an offset in bytes, relative to `whence` location; can be\n negative.\n **Parameter:** whence any of `SDL_IO_SEEK_SET`, `SDL_IO_SEEK_CUR`,\n `SDL_IO_SEEK_END`.\n **Returns:** the final offset in the data stream after the seek or -1 on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_TellIO\n"]
4487 pub fn SDL_SeekIO(context: *mut SDL_IOStream, offset: Sint64, whence: SDL_IOWhence) -> Sint64;
4488}
4489unsafe extern "C" {
4490 #[doc = " Determine the current read/write offset in an SDL_IOStream data stream.\n\n SDL_TellIO is actually a wrapper function that calls the SDL_IOStream's\n `seek` method, with an offset of 0 bytes from `SDL_IO_SEEK_CUR`, to\n simplify application development.\n\n **Parameter:** context an SDL_IOStream data stream object from which to get the\n current offset.\n **Returns:** the current offset in the stream, or -1 if the information can not\n be determined.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SeekIO\n"]
4491 pub fn SDL_TellIO(context: *mut SDL_IOStream) -> Sint64;
4492}
4493unsafe extern "C" {
4494 #[doc = " Read from a data source.\n\n This function reads up `size` bytes from the data source to the area\n pointed at by `ptr`. This function may read less bytes than requested.\n\n This function will return zero when the data stream is completely read, and\n SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If zero is returned and\n the stream is not at EOF, SDL_GetIOStatus() will return a different error\n value and SDL_GetError() will offer a human-readable message.\n\n A request for zero bytes on a valid stream will return zero immediately\n without accessing the stream, so the stream status (EOF, err, etc) will not\n change.\n\n **Parameter:** context a pointer to an SDL_IOStream structure.\n **Parameter:** ptr a pointer to a buffer to read data into.\n **Parameter:** size the number of bytes to read from the data source.\n **Returns:** the number of bytes read, or 0 on end of file or other failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WriteIO\n **See Also:** SDL_GetIOStatus\n"]
4495 pub fn SDL_ReadIO(
4496 context: *mut SDL_IOStream,
4497 ptr: *mut core::ffi::c_void,
4498 size: usize,
4499 ) -> usize;
4500}
4501unsafe extern "C" {
4502 #[doc = " Write to an SDL_IOStream data stream.\n\n This function writes exactly `size` bytes from the area pointed at by `ptr`\n to the stream. If this fails for any reason, it'll return less than `size`\n to demonstrate how far the write progressed. On success, it returns `size`.\n\n On error, this function still attempts to write as much as possible, so it\n might return a positive value less than the requested write size.\n\n The caller can use SDL_GetIOStatus() to determine if the problem is\n recoverable, such as a non-blocking write that can simply be retried later,\n or a fatal error.\n\n A request for zero bytes on a valid stream will return zero immediately\n without accessing the stream, so the stream status (EOF, err, etc) will not\n change.\n\n **Parameter:** context a pointer to an SDL_IOStream structure.\n **Parameter:** ptr a pointer to a buffer containing data to write.\n **Parameter:** size the number of bytes to write.\n **Returns:** the number of bytes written, which will be less than `size` on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_IOprintf\n **See Also:** SDL_ReadIO\n **See Also:** SDL_SeekIO\n **See Also:** SDL_FlushIO\n **See Also:** SDL_GetIOStatus\n"]
4503 pub fn SDL_WriteIO(
4504 context: *mut SDL_IOStream,
4505 ptr: *const core::ffi::c_void,
4506 size: usize,
4507 ) -> usize;
4508}
4509unsafe extern "C" {
4510 #[doc = " Print to an SDL_IOStream data stream.\n\n This function does formatted printing to the stream.\n\n **Parameter:** context a pointer to an SDL_IOStream structure.\n **Parameter:** fmt a printf() style format string.\n **Parameter:** ... additional parameters matching % tokens in the `fmt` string, if\n any.\n **Returns:** the number of bytes written or 0 on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_IOvprintf\n **See Also:** SDL_WriteIO\n"]
4511 pub fn SDL_IOprintf(context: *mut SDL_IOStream, fmt: *const core::ffi::c_char, ...) -> usize;
4512}
4513unsafe extern "C" {
4514 #[doc = " Print to an SDL_IOStream data stream.\n\n This function does formatted printing to the stream.\n\n **Parameter:** context a pointer to an SDL_IOStream structure.\n **Parameter:** fmt a printf() style format string.\n **Parameter:** ap a variable argument list.\n **Returns:** the number of bytes written or 0 on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_IOprintf\n **See Also:** SDL_WriteIO\n"]
4515 pub fn SDL_IOvprintf(
4516 context: *mut SDL_IOStream,
4517 fmt: *const core::ffi::c_char,
4518 ap: *mut __va_list_tag,
4519 ) -> usize;
4520}
4521unsafe extern "C" {
4522 #[doc = " Flush any buffered data in the stream.\n\n This function makes sure that any buffered data is written to the stream.\n Normally this isn't necessary but if the stream is a pipe or socket it\n guarantees that any pending data is sent.\n\n **Parameter:** context SDL_IOStream structure to flush.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenIO\n **See Also:** SDL_WriteIO\n"]
4523 pub fn SDL_FlushIO(context: *mut SDL_IOStream) -> bool;
4524}
4525unsafe extern "C" {
4526 #[doc = " Load all the data from an SDL data stream.\n\n The data is allocated with a zero byte at the end (null terminated) for\n convenience. This extra byte is not included in the value reported via\n `datasize`.\n\n The data should be freed with SDL_free().\n\n **Parameter:** src the SDL_IOStream to read all available data from.\n **Parameter:** datasize a pointer filled in with the number of bytes read, may be\n NULL.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `src` before returning, even\n in the case of an error.\n **Returns:** the data or NULL on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadFile\n **See Also:** SDL_SaveFile_IO\n"]
4527 pub fn SDL_LoadFile_IO(
4528 src: *mut SDL_IOStream,
4529 datasize: *mut usize,
4530 closeio: bool,
4531 ) -> *mut core::ffi::c_void;
4532}
4533unsafe extern "C" {
4534 #[doc = " Load all the data from a file path.\n\n The data is allocated with a zero byte at the end (null terminated) for\n convenience. This extra byte is not included in the value reported via\n `datasize`.\n\n The data should be freed with SDL_free().\n\n **Parameter:** file the path to read all available data from.\n **Parameter:** datasize if not NULL, will store the number of bytes read.\n **Returns:** the data or NULL on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadFile_IO\n **See Also:** SDL_SaveFile\n"]
4535 pub fn SDL_LoadFile(
4536 file: *const core::ffi::c_char,
4537 datasize: *mut usize,
4538 ) -> *mut core::ffi::c_void;
4539}
4540unsafe extern "C" {
4541 #[doc = " Save all the data into an SDL data stream.\n\n **Parameter:** src the SDL_IOStream to write all data to.\n **Parameter:** data the data to be written. If datasize is 0, may be NULL or a\n invalid pointer.\n **Parameter:** datasize the number of bytes to be written.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `src` before returning, even\n in the case of an error.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SaveFile\n **See Also:** SDL_LoadFile_IO\n"]
4542 pub fn SDL_SaveFile_IO(
4543 src: *mut SDL_IOStream,
4544 data: *const core::ffi::c_void,
4545 datasize: usize,
4546 closeio: bool,
4547 ) -> bool;
4548}
4549unsafe extern "C" {
4550 #[doc = " Save all the data into a file path.\n\n **Parameter:** file the path to write all available data into.\n **Parameter:** data the data to be written. If datasize is 0, may be NULL or a\n invalid pointer.\n **Parameter:** datasize the number of bytes to be written.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SaveFile_IO\n **See Also:** SDL_LoadFile\n"]
4551 pub fn SDL_SaveFile(
4552 file: *const core::ffi::c_char,
4553 data: *const core::ffi::c_void,
4554 datasize: usize,
4555 ) -> bool;
4556}
4557unsafe extern "C" {
4558 #[doc = " Use this function to read a byte from an SDL_IOStream.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the SDL_IOStream to read from.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on success or false on failure or EOF; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4559 pub fn SDL_ReadU8(src: *mut SDL_IOStream, value: *mut Uint8) -> bool;
4560}
4561unsafe extern "C" {
4562 #[doc = " Use this function to read a signed byte from an SDL_IOStream.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the SDL_IOStream to read from.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4563 pub fn SDL_ReadS8(src: *mut SDL_IOStream, value: *mut Sint8) -> bool;
4564}
4565unsafe extern "C" {
4566 #[doc = " Use this function to read 16 bits of little-endian data from an\n SDL_IOStream and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4567 pub fn SDL_ReadU16LE(src: *mut SDL_IOStream, value: *mut Uint16) -> bool;
4568}
4569unsafe extern "C" {
4570 #[doc = " Use this function to read 16 bits of little-endian data from an\n SDL_IOStream and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4571 pub fn SDL_ReadS16LE(src: *mut SDL_IOStream, value: *mut Sint16) -> bool;
4572}
4573unsafe extern "C" {
4574 #[doc = " Use this function to read 16 bits of big-endian data from an SDL_IOStream\n and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4575 pub fn SDL_ReadU16BE(src: *mut SDL_IOStream, value: *mut Uint16) -> bool;
4576}
4577unsafe extern "C" {
4578 #[doc = " Use this function to read 16 bits of big-endian data from an SDL_IOStream\n and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4579 pub fn SDL_ReadS16BE(src: *mut SDL_IOStream, value: *mut Sint16) -> bool;
4580}
4581unsafe extern "C" {
4582 #[doc = " Use this function to read 32 bits of little-endian data from an\n SDL_IOStream and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4583 pub fn SDL_ReadU32LE(src: *mut SDL_IOStream, value: *mut Uint32) -> bool;
4584}
4585unsafe extern "C" {
4586 #[doc = " Use this function to read 32 bits of little-endian data from an\n SDL_IOStream and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4587 pub fn SDL_ReadS32LE(src: *mut SDL_IOStream, value: *mut Sint32) -> bool;
4588}
4589unsafe extern "C" {
4590 #[doc = " Use this function to read 32 bits of big-endian data from an SDL_IOStream\n and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4591 pub fn SDL_ReadU32BE(src: *mut SDL_IOStream, value: *mut Uint32) -> bool;
4592}
4593unsafe extern "C" {
4594 #[doc = " Use this function to read 32 bits of big-endian data from an SDL_IOStream\n and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4595 pub fn SDL_ReadS32BE(src: *mut SDL_IOStream, value: *mut Sint32) -> bool;
4596}
4597unsafe extern "C" {
4598 #[doc = " Use this function to read 64 bits of little-endian data from an\n SDL_IOStream and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4599 pub fn SDL_ReadU64LE(src: *mut SDL_IOStream, value: *mut Uint64) -> bool;
4600}
4601unsafe extern "C" {
4602 #[doc = " Use this function to read 64 bits of little-endian data from an\n SDL_IOStream and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4603 pub fn SDL_ReadS64LE(src: *mut SDL_IOStream, value: *mut Sint64) -> bool;
4604}
4605unsafe extern "C" {
4606 #[doc = " Use this function to read 64 bits of big-endian data from an SDL_IOStream\n and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4607 pub fn SDL_ReadU64BE(src: *mut SDL_IOStream, value: *mut Uint64) -> bool;
4608}
4609unsafe extern "C" {
4610 #[doc = " Use this function to read 64 bits of big-endian data from an SDL_IOStream\n and return in native format.\n\n SDL byteswaps the data only if necessary, so the data returned will be in\n the native byte order.\n\n This function will return false when the data stream is completely read,\n and SDL_GetIOStatus() will return SDL_IO_STATUS_EOF. If false is returned\n and the stream is not at EOF, SDL_GetIOStatus() will return a different\n error value and SDL_GetError() will offer a human-readable message.\n\n **Parameter:** src the stream from which to read data.\n **Parameter:** value a pointer filled in with the data read.\n **Returns:** true on successful read or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4611 pub fn SDL_ReadS64BE(src: *mut SDL_IOStream, value: *mut Sint64) -> bool;
4612}
4613unsafe extern "C" {
4614 #[doc = " Use this function to write a byte to an SDL_IOStream.\n\n **Parameter:** dst the SDL_IOStream to write to.\n **Parameter:** value the byte value to write.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4615 pub fn SDL_WriteU8(dst: *mut SDL_IOStream, value: Uint8) -> bool;
4616}
4617unsafe extern "C" {
4618 #[doc = " Use this function to write a signed byte to an SDL_IOStream.\n\n **Parameter:** dst the SDL_IOStream to write to.\n **Parameter:** value the byte value to write.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4619 pub fn SDL_WriteS8(dst: *mut SDL_IOStream, value: Sint8) -> bool;
4620}
4621unsafe extern "C" {
4622 #[doc = " Use this function to write 16 bits in native format to an SDL_IOStream as\n little-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in little-endian\n format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4623 pub fn SDL_WriteU16LE(dst: *mut SDL_IOStream, value: Uint16) -> bool;
4624}
4625unsafe extern "C" {
4626 #[doc = " Use this function to write 16 bits in native format to an SDL_IOStream as\n little-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in little-endian\n format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4627 pub fn SDL_WriteS16LE(dst: *mut SDL_IOStream, value: Sint16) -> bool;
4628}
4629unsafe extern "C" {
4630 #[doc = " Use this function to write 16 bits in native format to an SDL_IOStream as\n big-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in big-endian format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4631 pub fn SDL_WriteU16BE(dst: *mut SDL_IOStream, value: Uint16) -> bool;
4632}
4633unsafe extern "C" {
4634 #[doc = " Use this function to write 16 bits in native format to an SDL_IOStream as\n big-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in big-endian format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4635 pub fn SDL_WriteS16BE(dst: *mut SDL_IOStream, value: Sint16) -> bool;
4636}
4637unsafe extern "C" {
4638 #[doc = " Use this function to write 32 bits in native format to an SDL_IOStream as\n little-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in little-endian\n format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4639 pub fn SDL_WriteU32LE(dst: *mut SDL_IOStream, value: Uint32) -> bool;
4640}
4641unsafe extern "C" {
4642 #[doc = " Use this function to write 32 bits in native format to an SDL_IOStream as\n little-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in little-endian\n format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4643 pub fn SDL_WriteS32LE(dst: *mut SDL_IOStream, value: Sint32) -> bool;
4644}
4645unsafe extern "C" {
4646 #[doc = " Use this function to write 32 bits in native format to an SDL_IOStream as\n big-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in big-endian format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4647 pub fn SDL_WriteU32BE(dst: *mut SDL_IOStream, value: Uint32) -> bool;
4648}
4649unsafe extern "C" {
4650 #[doc = " Use this function to write 32 bits in native format to an SDL_IOStream as\n big-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in big-endian format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4651 pub fn SDL_WriteS32BE(dst: *mut SDL_IOStream, value: Sint32) -> bool;
4652}
4653unsafe extern "C" {
4654 #[doc = " Use this function to write 64 bits in native format to an SDL_IOStream as\n little-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in little-endian\n format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4655 pub fn SDL_WriteU64LE(dst: *mut SDL_IOStream, value: Uint64) -> bool;
4656}
4657unsafe extern "C" {
4658 #[doc = " Use this function to write 64 bits in native format to an SDL_IOStream as\n little-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in little-endian\n format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4659 pub fn SDL_WriteS64LE(dst: *mut SDL_IOStream, value: Sint64) -> bool;
4660}
4661unsafe extern "C" {
4662 #[doc = " Use this function to write 64 bits in native format to an SDL_IOStream as\n big-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in big-endian format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4663 pub fn SDL_WriteU64BE(dst: *mut SDL_IOStream, value: Uint64) -> bool;
4664}
4665unsafe extern "C" {
4666 #[doc = " Use this function to write 64 bits in native format to an SDL_IOStream as\n big-endian data.\n\n SDL byteswaps the data only if necessary, so the application always\n specifies native format, and the data written will be in big-endian format.\n\n **Parameter:** dst the stream to which data will be written.\n **Parameter:** value the data to be written, in native format.\n **Returns:** true on successful write or false on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** Do not use the same SDL_IOStream from two threads at once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4667 pub fn SDL_WriteS64BE(dst: *mut SDL_IOStream, value: Sint64) -> bool;
4668}
4669impl SDL_AudioFormat {
4670 #[doc = "< Unspecified audio format\n"]
4671 pub const SDL_AUDIO_UNKNOWN: SDL_AudioFormat = SDL_AudioFormat(0);
4672 #[doc = "< Unsigned 8-bit samples\n"]
4673 pub const SDL_AUDIO_U8: SDL_AudioFormat = SDL_AudioFormat(8);
4674 #[doc = "< Signed 8-bit samples\n"]
4675 pub const SDL_AUDIO_S8: SDL_AudioFormat = SDL_AudioFormat(32776);
4676 #[doc = "< Signed 16-bit samples\n"]
4677 pub const SDL_AUDIO_S16LE: SDL_AudioFormat = SDL_AudioFormat(32784);
4678 #[doc = "< As above, but big-endian byte order\n"]
4679 pub const SDL_AUDIO_S16BE: SDL_AudioFormat = SDL_AudioFormat(36880);
4680 #[doc = "< 32-bit integer samples\n"]
4681 pub const SDL_AUDIO_S32LE: SDL_AudioFormat = SDL_AudioFormat(32800);
4682 #[doc = "< As above, but big-endian byte order\n"]
4683 pub const SDL_AUDIO_S32BE: SDL_AudioFormat = SDL_AudioFormat(36896);
4684 #[doc = "< 32-bit floating point samples\n"]
4685 pub const SDL_AUDIO_F32LE: SDL_AudioFormat = SDL_AudioFormat(33056);
4686 #[doc = "< As above, but big-endian byte order\n"]
4687 pub const SDL_AUDIO_F32BE: SDL_AudioFormat = SDL_AudioFormat(37152);
4688 pub const SDL_AUDIO_S16: SDL_AudioFormat = SDL_AudioFormat(32784);
4689 pub const SDL_AUDIO_S32: SDL_AudioFormat = SDL_AudioFormat(32800);
4690 pub const SDL_AUDIO_F32: SDL_AudioFormat = SDL_AudioFormat(33056);
4691}
4692#[repr(transparent)]
4693#[doc = " Audio format.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_AUDIO_BITSIZE\n **See Also:** SDL_AUDIO_BYTESIZE\n **See Also:** SDL_AUDIO_ISINT\n **See Also:** SDL_AUDIO_ISFLOAT\n **See Also:** SDL_AUDIO_ISBIGENDIAN\n **See Also:** SDL_AUDIO_ISLITTLEENDIAN\n **See Also:** SDL_AUDIO_ISSIGNED\n **See Also:** SDL_AUDIO_ISUNSIGNED\n"]
4694#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4695pub struct SDL_AudioFormat(pub core::ffi::c_uint);
4696#[doc = " SDL Audio Device instance IDs.\n\n Zero is used to signify an invalid/null device.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
4697pub type SDL_AudioDeviceID = Uint32;
4698#[doc = " Format specifier for audio data.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_AudioFormat\n"]
4699#[repr(C)]
4700#[derive(Debug, Copy, Clone, Hash)]
4701pub struct SDL_AudioSpec {
4702 #[doc = "< Audio data format\n"]
4703 pub format: SDL_AudioFormat,
4704 #[doc = "< Number of channels: 1 mono, 2 stereo, etc\n"]
4705 pub channels: core::ffi::c_int,
4706 #[doc = "< sample rate: sample frames per second\n"]
4707 pub freq: core::ffi::c_int,
4708}
4709#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4710const _: () = {
4711 ["Size of SDL_AudioSpec"][::core::mem::size_of::<SDL_AudioSpec>() - 12usize];
4712 ["Alignment of SDL_AudioSpec"][::core::mem::align_of::<SDL_AudioSpec>() - 4usize];
4713 ["Offset of field: SDL_AudioSpec::format"]
4714 [::core::mem::offset_of!(SDL_AudioSpec, format) - 0usize];
4715 ["Offset of field: SDL_AudioSpec::channels"]
4716 [::core::mem::offset_of!(SDL_AudioSpec, channels) - 4usize];
4717 ["Offset of field: SDL_AudioSpec::freq"][::core::mem::offset_of!(SDL_AudioSpec, freq) - 8usize];
4718};
4719impl Default for SDL_AudioSpec {
4720 fn default() -> Self {
4721 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
4722 unsafe {
4723 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4724 s.assume_init()
4725 }
4726 }
4727}
4728#[repr(C)]
4729#[derive(Debug, Copy, Clone)]
4730pub struct SDL_AudioStream {
4731 _unused: [u8; 0],
4732}
4733unsafe extern "C" {
4734 #[doc = " Use this function to get the number of built-in audio drivers.\n\n This function returns a hardcoded number. This never returns a negative\n value; if there are no drivers compiled into this build of SDL, this\n function returns zero. The presence of a driver in this list does not mean\n it will function, it just means SDL is capable of interacting with that\n interface. For example, a build of SDL might have esound support, but if\n there's no esound server available, SDL's esound driver would fail if used.\n\n By default, SDL tries all drivers, in its preferred order, until one is\n found to be usable.\n\n **Returns:** the number of built-in audio drivers.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioDriver\n"]
4735 pub fn SDL_GetNumAudioDrivers() -> core::ffi::c_int;
4736}
4737unsafe extern "C" {
4738 #[doc = " Use this function to get the name of a built in audio driver.\n\n The list of audio drivers is given in the order that they are normally\n initialized by default; the drivers that seem more reasonable to choose\n first (as far as the SDL developers believe) are earlier in the list.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"alsa\",\n \"coreaudio\" or \"wasapi\". These never have Unicode characters, and are not\n meant to be proper names.\n\n **Parameter:** index the index of the audio driver; the value ranges from 0 to\n SDL_GetNumAudioDrivers() - 1.\n **Returns:** the name of the audio driver at the requested index, or NULL if an\n invalid index was specified.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumAudioDrivers\n"]
4739 pub fn SDL_GetAudioDriver(index: core::ffi::c_int) -> *const core::ffi::c_char;
4740}
4741unsafe extern "C" {
4742 #[doc = " Get the name of the current audio driver.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"alsa\",\n \"coreaudio\" or \"wasapi\". These never have Unicode characters, and are not\n meant to be proper names.\n\n **Returns:** the name of the current audio driver or NULL if no driver has been\n initialized.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4743 pub fn SDL_GetCurrentAudioDriver() -> *const core::ffi::c_char;
4744}
4745unsafe extern "C" {
4746 #[doc = " Get a list of currently-connected audio playback devices.\n\n This returns of list of available devices that play sound, perhaps to\n speakers or headphones (\"playback\" devices). If you want devices that\n record audio, like a microphone (\"recording\" devices), use\n SDL_GetAudioRecordingDevices() instead.\n\n This only returns a list of physical devices; it will not have any device\n IDs returned by SDL_OpenAudioDevice().\n\n If this function returns NULL, to signify an error, `*count` will be set to\n zero.\n\n **Parameter:** count a pointer filled in with the number of devices returned, may\n be NULL.\n **Returns:** a 0 terminated array of device instance IDs or NULL on error; call\n SDL_GetError() for more information. This should be freed with\n SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenAudioDevice\n **See Also:** SDL_GetAudioRecordingDevices\n"]
4747 pub fn SDL_GetAudioPlaybackDevices(count: *mut core::ffi::c_int) -> *mut SDL_AudioDeviceID;
4748}
4749unsafe extern "C" {
4750 #[doc = " Get a list of currently-connected audio recording devices.\n\n This returns of list of available devices that record audio, like a\n microphone (\"recording\" devices). If you want devices that play sound,\n perhaps to speakers or headphones (\"playback\" devices), use\n SDL_GetAudioPlaybackDevices() instead.\n\n This only returns a list of physical devices; it will not have any device\n IDs returned by SDL_OpenAudioDevice().\n\n If this function returns NULL, to signify an error, `*count` will be set to\n zero.\n\n **Parameter:** count a pointer filled in with the number of devices returned, may\n be NULL.\n **Returns:** a 0 terminated array of device instance IDs, or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenAudioDevice\n **See Also:** SDL_GetAudioPlaybackDevices\n"]
4751 pub fn SDL_GetAudioRecordingDevices(count: *mut core::ffi::c_int) -> *mut SDL_AudioDeviceID;
4752}
4753unsafe extern "C" {
4754 #[doc = " Get the human-readable name of a specific audio device.\n\n **WARNING**: this function will work with SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK\n and SDL_AUDIO_DEVICE_DEFAULT_RECORDING, returning the current default\n physical devices' names. However, as the default device may change at any\n time, it is likely better to show a generic name to the user, like \"System\n default audio device\" or perhaps \"default [currently %s]\". Do not store\n this name to disk to reidentify the device in a later run of the program,\n as the default might change in general, and the string will be the name of\n a specific device and not the abstract system default.\n\n **Parameter:** devid the instance ID of the device to query.\n **Returns:** the name of the audio device, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioPlaybackDevices\n **See Also:** SDL_GetAudioRecordingDevices\n"]
4755 pub fn SDL_GetAudioDeviceName(devid: SDL_AudioDeviceID) -> *const core::ffi::c_char;
4756}
4757unsafe extern "C" {
4758 #[doc = " Get the current audio format of a specific audio device.\n\n For an opened device, this will report the format the device is currently\n using. If the device isn't yet opened, this will report the device's\n preferred format (or a reasonable default if this can't be determined).\n\n You may also specify SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or\n SDL_AUDIO_DEVICE_DEFAULT_RECORDING here, which is useful for getting a\n reasonable recommendation before opening the system-recommended default\n device.\n\n You can also use this to request the current device buffer size. This is\n specified in sample frames and represents the amount of data SDL will feed\n to the physical hardware in each chunk. This can be converted to\n milliseconds of audio with the following equation:\n\n `ms = (int) ((((Sint64) frames) * 1000) / spec.freq);`\n\n Buffer size is only important if you need low-level control over the audio\n playback timing. Most apps do not need this.\n\n **Parameter:** devid the instance ID of the device to query.\n **Parameter:** spec on return, will be filled with device details.\n **Parameter:** sample_frames pointer to store device buffer size, in sample frames.\n Can be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4759 pub fn SDL_GetAudioDeviceFormat(
4760 devid: SDL_AudioDeviceID,
4761 spec: *mut SDL_AudioSpec,
4762 sample_frames: *mut core::ffi::c_int,
4763 ) -> bool;
4764}
4765unsafe extern "C" {
4766 #[doc = " Get the current channel map of an audio device.\n\n Channel maps are optional; most things do not need them, instead passing\n data in the [order that SDL expects](CategoryAudio#channel-layouts).\n\n Audio devices usually have no remapping applied. This is represented by\n returning NULL, and does not signify an error.\n\n **Parameter:** devid the instance ID of the device to query.\n **Parameter:** count On output, set to number of channels in the map. Can be NULL.\n **Returns:** an array of the current channel mapping, with as many elements as\n the current output spec's channels, or NULL if default. This\n should be freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamInputChannelMap\n"]
4767 pub fn SDL_GetAudioDeviceChannelMap(
4768 devid: SDL_AudioDeviceID,
4769 count: *mut core::ffi::c_int,
4770 ) -> *mut core::ffi::c_int;
4771}
4772unsafe extern "C" {
4773 #[doc = " Open a specific audio device.\n\n You can open both playback and recording devices through this function.\n Playback devices will take data from bound audio streams, mix it, and send\n it to the hardware. Recording devices will feed any bound audio streams\n with a copy of any incoming data.\n\n An opened audio device starts out with no audio streams bound. To start\n audio playing, bind a stream and supply audio data to it. Unlike SDL2,\n there is no audio callback; you only bind audio streams and make sure they\n have data flowing into them (however, you can simulate SDL2's semantics\n fairly closely by using SDL_OpenAudioDeviceStream instead of this\n function).\n\n If you don't care about opening a specific device, pass a `devid` of either\n `SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK` or\n `SDL_AUDIO_DEVICE_DEFAULT_RECORDING`. In this case, SDL will try to pick\n the most reasonable default, and may also switch between physical devices\n seamlessly later, if the most reasonable default changes during the\n lifetime of this opened device (user changed the default in the OS's system\n preferences, the default got unplugged so the system jumped to a new\n default, the user plugged in headphones on a mobile device, etc). Unless\n you have a good reason to choose a specific device, this is probably what\n you want.\n\n You may request a specific format for the audio device, but there is no\n promise the device will honor that request for several reasons. As such,\n it's only meant to be a hint as to what data your app will provide. Audio\n streams will accept data in whatever format you specify and manage\n conversion for you as appropriate. SDL_GetAudioDeviceFormat can tell you\n the preferred format for the device before opening and the actual format\n the device is using after opening.\n\n It's legal to open the same device ID more than once; each successful open\n will generate a new logical SDL_AudioDeviceID that is managed separately\n from others on the same physical device. This allows libraries to open a\n device separately from the main app and bind its own streams without\n conflicting.\n\n It is also legal to open a device ID returned by a previous call to this\n function; doing so just creates another logical device on the same physical\n device. This may be useful for making logical groupings of audio streams.\n\n This function returns the opened device ID on success. This is a new,\n unique SDL_AudioDeviceID that represents a logical device.\n\n Some backends might offer arbitrary devices (for example, a networked audio\n protocol that can connect to an arbitrary server). For these, as a change\n from SDL2, you should open a default device ID and use an SDL hint to\n specify the target if you care, or otherwise let the backend figure out a\n reasonable default. Most backends don't offer anything like this, and often\n this would be an end user setting an environment variable for their custom\n need, and not something an application should specifically manage.\n\n When done with an audio device, possibly at the end of the app's life, one\n should call SDL_CloseAudioDevice() on the returned device id.\n\n **Parameter:** devid the device instance id to open, or\n SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK or\n SDL_AUDIO_DEVICE_DEFAULT_RECORDING for the most reasonable\n default device.\n **Parameter:** spec the requested device configuration. Can be NULL to use\n reasonable defaults.\n **Returns:** the device ID on success or 0 on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseAudioDevice\n **See Also:** SDL_GetAudioDeviceFormat\n"]
4774 pub fn SDL_OpenAudioDevice(
4775 devid: SDL_AudioDeviceID,
4776 spec: *const SDL_AudioSpec,
4777 ) -> SDL_AudioDeviceID;
4778}
4779unsafe extern "C" {
4780 #[doc = " Determine if an audio device is physical (instead of logical).\n\n An SDL_AudioDeviceID that represents physical hardware is a physical\n device; there is one for each piece of hardware that SDL can see. Logical\n devices are created by calling SDL_OpenAudioDevice or\n SDL_OpenAudioDeviceStream, and while each is associated with a physical\n device, there can be any number of logical devices on one physical device.\n\n For the most part, logical and physical IDs are interchangeable--if you try\n to open a logical device, SDL understands to assign that effort to the\n underlying physical device, etc. However, it might be useful to know if an\n arbitrary device ID is physical or logical. This function reports which.\n\n This function may return either true or false for invalid device IDs.\n\n **Parameter:** devid the device ID to query.\n **Returns:** true if devid is a physical device, false if it is logical.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4781 pub fn SDL_IsAudioDevicePhysical(devid: SDL_AudioDeviceID) -> bool;
4782}
4783unsafe extern "C" {
4784 #[doc = " Determine if an audio device is a playback device (instead of recording).\n\n This function may return either true or false for invalid device IDs.\n\n **Parameter:** devid the device ID to query.\n **Returns:** true if devid is a playback device, false if it is recording.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4785 pub fn SDL_IsAudioDevicePlayback(devid: SDL_AudioDeviceID) -> bool;
4786}
4787unsafe extern "C" {
4788 #[doc = " Use this function to pause audio playback on a specified device.\n\n This function pauses audio processing for a given device. Any bound audio\n streams will not progress, and no audio will be generated. Pausing one\n device does not prevent other unpaused devices from running.\n\n Unlike in SDL2, audio devices start in an _unpaused_ state, since an app\n has to bind a stream before any audio will flow. Pausing a paused device is\n a legal no-op.\n\n Pausing a device can be useful to halt all audio without unbinding all the\n audio streams. This might be useful while a game is paused, or a level is\n loading, etc.\n\n Physical devices can not be paused or unpaused, only logical devices\n created through SDL_OpenAudioDevice() can be.\n\n **Parameter:** devid a device opened by SDL_OpenAudioDevice().\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ResumeAudioDevice\n **See Also:** SDL_AudioDevicePaused\n"]
4789 pub fn SDL_PauseAudioDevice(devid: SDL_AudioDeviceID) -> bool;
4790}
4791unsafe extern "C" {
4792 #[doc = " Use this function to unpause audio playback on a specified device.\n\n This function unpauses audio processing for a given device that has\n previously been paused with SDL_PauseAudioDevice(). Once unpaused, any\n bound audio streams will begin to progress again, and audio can be\n generated.\n\n Unlike in SDL2, audio devices start in an _unpaused_ state, since an app\n has to bind a stream before any audio will flow. Unpausing an unpaused\n device is a legal no-op.\n\n Physical devices can not be paused or unpaused, only logical devices\n created through SDL_OpenAudioDevice() can be.\n\n **Parameter:** devid a device opened by SDL_OpenAudioDevice().\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AudioDevicePaused\n **See Also:** SDL_PauseAudioDevice\n"]
4793 pub fn SDL_ResumeAudioDevice(devid: SDL_AudioDeviceID) -> bool;
4794}
4795unsafe extern "C" {
4796 #[doc = " Use this function to query if an audio device is paused.\n\n Unlike in SDL2, audio devices start in an _unpaused_ state, since an app\n has to bind a stream before any audio will flow.\n\n Physical devices can not be paused or unpaused, only logical devices\n created through SDL_OpenAudioDevice() can be. Physical and invalid device\n IDs will report themselves as unpaused here.\n\n **Parameter:** devid a device opened by SDL_OpenAudioDevice().\n **Returns:** true if device is valid and paused, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PauseAudioDevice\n **See Also:** SDL_ResumeAudioDevice\n"]
4797 pub fn SDL_AudioDevicePaused(devid: SDL_AudioDeviceID) -> bool;
4798}
4799unsafe extern "C" {
4800 #[doc = " Get the gain of an audio device.\n\n The gain of a device is its volume; a larger gain means a louder output,\n with a gain of zero being silence.\n\n Audio devices default to a gain of 1.0f (no change in output).\n\n Physical devices may not have their gain changed, only logical devices, and\n this function will always return -1.0f when used on physical devices.\n\n **Parameter:** devid the audio device to query.\n **Returns:** the gain of the device or -1.0f on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioDeviceGain\n"]
4801 pub fn SDL_GetAudioDeviceGain(devid: SDL_AudioDeviceID) -> f32;
4802}
4803unsafe extern "C" {
4804 #[doc = " Change the gain of an audio device.\n\n The gain of a device is its volume; a larger gain means a louder output,\n with a gain of zero being silence.\n\n Audio devices default to a gain of 1.0f (no change in output).\n\n Physical devices may not have their gain changed, only logical devices, and\n this function will always return false when used on physical devices. While\n it might seem attractive to adjust several logical devices at once in this\n way, it would allow an app or library to interfere with another portion of\n the program's otherwise-isolated devices.\n\n This is applied, along with any per-audiostream gain, during playback to\n the hardware, and can be continuously changed to create various effects. On\n recording devices, this will adjust the gain before passing the data into\n an audiostream; that recording audiostream can then adjust its gain further\n when outputting the data elsewhere, if it likes, but that second gain is\n not applied until the data leaves the audiostream again.\n\n **Parameter:** devid the audio device on which to change gain.\n **Parameter:** gain the gain. 1.0f is no change, 0.0f is silence.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioDeviceGain\n"]
4805 pub fn SDL_SetAudioDeviceGain(devid: SDL_AudioDeviceID, gain: f32) -> bool;
4806}
4807unsafe extern "C" {
4808 #[doc = " Close a previously-opened audio device.\n\n The application should close open audio devices once they are no longer\n needed.\n\n This function may block briefly while pending audio data is played by the\n hardware, so that applications don't drop the last buffer of data they\n supplied if terminating immediately afterwards.\n\n **Parameter:** devid an audio device id previously returned by\n SDL_OpenAudioDevice().\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenAudioDevice\n"]
4809 pub fn SDL_CloseAudioDevice(devid: SDL_AudioDeviceID);
4810}
4811unsafe extern "C" {
4812 #[doc = " Bind a list of audio streams to an audio device.\n\n Audio data will flow through any bound streams. For a playback device, data\n for all bound streams will be mixed together and fed to the device. For a\n recording device, a copy of recorded data will be provided to each bound\n stream.\n\n Audio streams can only be bound to an open device. This operation is\n atomic--all streams bound in the same call will start processing at the\n same time, so they can stay in sync. Also: either all streams will be bound\n or none of them will be.\n\n It is an error to bind an already-bound stream; it must be explicitly\n unbound first.\n\n Binding a stream to a device will set its output format for playback\n devices, and its input format for recording devices, so they match the\n device's settings. The caller is welcome to change the other end of the\n stream's format at any time with SDL_SetAudioStreamFormat(). If the other\n end of the stream's format has never been set (the audio stream was created\n with a NULL audio spec), this function will set it to match the device\n end's format.\n\n **Parameter:** devid an audio device to bind a stream to.\n **Parameter:** streams an array of audio streams to bind.\n **Parameter:** num_streams number streams listed in the `streams` array.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BindAudioStreams\n **See Also:** SDL_UnbindAudioStream\n **See Also:** SDL_GetAudioStreamDevice\n"]
4813 pub fn SDL_BindAudioStreams(
4814 devid: SDL_AudioDeviceID,
4815 streams: *const *mut SDL_AudioStream,
4816 num_streams: core::ffi::c_int,
4817 ) -> bool;
4818}
4819unsafe extern "C" {
4820 #[doc = " Bind a single audio stream to an audio device.\n\n This is a convenience function, equivalent to calling\n `SDL_BindAudioStreams(devid, &stream, 1)`.\n\n **Parameter:** devid an audio device to bind a stream to.\n **Parameter:** stream an audio stream to bind to a device.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BindAudioStreams\n **See Also:** SDL_UnbindAudioStream\n **See Also:** SDL_GetAudioStreamDevice\n"]
4821 pub fn SDL_BindAudioStream(devid: SDL_AudioDeviceID, stream: *mut SDL_AudioStream) -> bool;
4822}
4823unsafe extern "C" {
4824 #[doc = " Unbind a list of audio streams from their audio devices.\n\n The streams being unbound do not all have to be on the same device. All\n streams on the same device will be unbound atomically (data will stop\n flowing through all unbound streams on the same device at the same time).\n\n Unbinding a stream that isn't bound to a device is a legal no-op.\n\n **Parameter:** streams an array of audio streams to unbind. Can be NULL or contain\n NULL.\n **Parameter:** num_streams number streams listed in the `streams` array.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BindAudioStreams\n"]
4825 pub fn SDL_UnbindAudioStreams(
4826 streams: *const *mut SDL_AudioStream,
4827 num_streams: core::ffi::c_int,
4828 );
4829}
4830unsafe extern "C" {
4831 #[doc = " Unbind a single audio stream from its audio device.\n\n This is a convenience function, equivalent to calling\n `SDL_UnbindAudioStreams(&stream, 1)`.\n\n **Parameter:** stream an audio stream to unbind from a device. Can be NULL.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BindAudioStream\n"]
4832 pub fn SDL_UnbindAudioStream(stream: *mut SDL_AudioStream);
4833}
4834unsafe extern "C" {
4835 #[doc = " Query an audio stream for its currently-bound device.\n\n This reports the logical audio device that an audio stream is currently\n bound to.\n\n If not bound, or invalid, this returns zero, which is not a valid device\n ID.\n\n **Parameter:** stream the audio stream to query.\n **Returns:** the bound audio device, or 0 if not bound or invalid.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BindAudioStream\n **See Also:** SDL_BindAudioStreams\n"]
4836 pub fn SDL_GetAudioStreamDevice(stream: *mut SDL_AudioStream) -> SDL_AudioDeviceID;
4837}
4838unsafe extern "C" {
4839 #[doc = " Create a new audio stream.\n\n **Parameter:** src_spec the format details of the input audio.\n **Parameter:** dst_spec the format details of the output audio.\n **Returns:** a new audio stream on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PutAudioStreamData\n **See Also:** SDL_GetAudioStreamData\n **See Also:** SDL_GetAudioStreamAvailable\n **See Also:** SDL_FlushAudioStream\n **See Also:** SDL_ClearAudioStream\n **See Also:** SDL_SetAudioStreamFormat\n **See Also:** SDL_DestroyAudioStream\n"]
4840 pub fn SDL_CreateAudioStream(
4841 src_spec: *const SDL_AudioSpec,
4842 dst_spec: *const SDL_AudioSpec,
4843 ) -> *mut SDL_AudioStream;
4844}
4845unsafe extern "C" {
4846 #[doc = " Get the properties associated with an audio stream.\n\n The application can hang any data it wants here, but the following\n properties are understood by SDL:\n\n - `SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN`: if true (the default), the\n stream be automatically cleaned up when the audio subsystem quits. If set\n to false, the streams will persist beyond that. This property is ignored\n for streams created through SDL_OpenAudioDeviceStream(), and will always\n be cleaned up. Streams that are not cleaned up will still be unbound from\n devices when the audio subsystem quits. This property was added in SDL\n 3.4.0.\n\n **Parameter:** stream the SDL_AudioStream to query.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
4847 pub fn SDL_GetAudioStreamProperties(stream: *mut SDL_AudioStream) -> SDL_PropertiesID;
4848}
4849unsafe extern "C" {
4850 #[doc = " Query the current format of an audio stream.\n\n **Parameter:** stream the SDL_AudioStream to query.\n **Parameter:** src_spec where to store the input audio format; ignored if NULL.\n **Parameter:** dst_spec where to store the output audio format; ignored if NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamFormat\n"]
4851 pub fn SDL_GetAudioStreamFormat(
4852 stream: *mut SDL_AudioStream,
4853 src_spec: *mut SDL_AudioSpec,
4854 dst_spec: *mut SDL_AudioSpec,
4855 ) -> bool;
4856}
4857unsafe extern "C" {
4858 #[doc = " Change the input and output formats of an audio stream.\n\n Future calls to and SDL_GetAudioStreamAvailable and SDL_GetAudioStreamData\n will reflect the new format, and future calls to SDL_PutAudioStreamData\n must provide data in the new input formats.\n\n Data that was previously queued in the stream will still be operated on in\n the format that was current when it was added, which is to say you can put\n the end of a sound file in one format to a stream, change formats for the\n next sound file, and start putting that new data while the previous sound\n file is still queued, and everything will still play back correctly.\n\n If a stream is bound to a device, then the format of the side of the stream\n bound to a device cannot be changed (src_spec for recording devices,\n dst_spec for playback devices). Attempts to make a change to this side will\n be ignored, but this will not report an error. The other side's format can\n be changed.\n\n **Parameter:** stream the stream the format is being changed.\n **Parameter:** src_spec the new format of the audio input; if NULL, it is not\n changed.\n **Parameter:** dst_spec the new format of the audio output; if NULL, it is not\n changed.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioStreamFormat\n **See Also:** SDL_SetAudioStreamFrequencyRatio\n"]
4859 pub fn SDL_SetAudioStreamFormat(
4860 stream: *mut SDL_AudioStream,
4861 src_spec: *const SDL_AudioSpec,
4862 dst_spec: *const SDL_AudioSpec,
4863 ) -> bool;
4864}
4865unsafe extern "C" {
4866 #[doc = " Get the frequency ratio of an audio stream.\n\n **Parameter:** stream the SDL_AudioStream to query.\n **Returns:** the frequency ratio of the stream or 0.0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamFrequencyRatio\n"]
4867 pub fn SDL_GetAudioStreamFrequencyRatio(stream: *mut SDL_AudioStream) -> f32;
4868}
4869unsafe extern "C" {
4870 #[doc = " Change the frequency ratio of an audio stream.\n\n The frequency ratio is used to adjust the rate at which input data is\n consumed. Changing this effectively modifies the speed and pitch of the\n audio. A value greater than 1.0f will play the audio faster, and at a\n higher pitch. A value less than 1.0f will play the audio slower, and at a\n lower pitch. 1.0f means play at normal speed.\n\n This is applied during SDL_GetAudioStreamData, and can be continuously\n changed to create various effects.\n\n **Parameter:** stream the stream on which the frequency ratio is being changed.\n **Parameter:** ratio the frequency ratio. 1.0 is normal speed. Must be between 0.01\n and 100.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioStreamFrequencyRatio\n **See Also:** SDL_SetAudioStreamFormat\n"]
4871 pub fn SDL_SetAudioStreamFrequencyRatio(stream: *mut SDL_AudioStream, ratio: f32) -> bool;
4872}
4873unsafe extern "C" {
4874 #[doc = " Get the gain of an audio stream.\n\n The gain of a stream is its volume; a larger gain means a louder output,\n with a gain of zero being silence.\n\n Audio streams default to a gain of 1.0f (no change in output).\n\n **Parameter:** stream the SDL_AudioStream to query.\n **Returns:** the gain of the stream or -1.0f on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamGain\n"]
4875 pub fn SDL_GetAudioStreamGain(stream: *mut SDL_AudioStream) -> f32;
4876}
4877unsafe extern "C" {
4878 #[doc = " Change the gain of an audio stream.\n\n The gain of a stream is its volume; a larger gain means a louder output,\n with a gain of zero being silence.\n\n Audio streams default to a gain of 1.0f (no change in output).\n\n This is applied during SDL_GetAudioStreamData, and can be continuously\n changed to create various effects.\n\n **Parameter:** stream the stream on which the gain is being changed.\n **Parameter:** gain the gain. 1.0f is no change, 0.0f is silence.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioStreamGain\n"]
4879 pub fn SDL_SetAudioStreamGain(stream: *mut SDL_AudioStream, gain: f32) -> bool;
4880}
4881unsafe extern "C" {
4882 #[doc = " Get the current input channel map of an audio stream.\n\n Channel maps are optional; most things do not need them, instead passing\n data in the [order that SDL expects](CategoryAudio#channel-layouts).\n\n Audio streams default to no remapping applied. This is represented by\n returning NULL, and does not signify an error.\n\n **Parameter:** stream the SDL_AudioStream to query.\n **Parameter:** count On output, set to number of channels in the map. Can be NULL.\n **Returns:** an array of the current channel mapping, with as many elements as\n the current output spec's channels, or NULL if default. This\n should be freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamInputChannelMap\n"]
4883 pub fn SDL_GetAudioStreamInputChannelMap(
4884 stream: *mut SDL_AudioStream,
4885 count: *mut core::ffi::c_int,
4886 ) -> *mut core::ffi::c_int;
4887}
4888unsafe extern "C" {
4889 #[doc = " Get the current output channel map of an audio stream.\n\n Channel maps are optional; most things do not need them, instead passing\n data in the [order that SDL expects](CategoryAudio#channel-layouts).\n\n Audio streams default to no remapping applied. This is represented by\n returning NULL, and does not signify an error.\n\n **Parameter:** stream the SDL_AudioStream to query.\n **Parameter:** count On output, set to number of channels in the map. Can be NULL.\n **Returns:** an array of the current channel mapping, with as many elements as\n the current output spec's channels, or NULL if default. This\n should be freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamInputChannelMap\n"]
4890 pub fn SDL_GetAudioStreamOutputChannelMap(
4891 stream: *mut SDL_AudioStream,
4892 count: *mut core::ffi::c_int,
4893 ) -> *mut core::ffi::c_int;
4894}
4895unsafe extern "C" {
4896 #[doc = " Set the current input channel map of an audio stream.\n\n Channel maps are optional; most things do not need them, instead passing\n data in the [order that SDL expects](CategoryAudio#channel-layouts).\n\n The input channel map reorders data that is added to a stream via\n SDL_PutAudioStreamData. Future calls to SDL_PutAudioStreamData must provide\n data in the new channel order.\n\n Each item in the array represents an input channel, and its value is the\n channel that it should be remapped to. To reverse a stereo signal's left\n and right values, you'd have an array of `{ 1, 0 }`. It is legal to remap\n multiple channels to the same thing, so `{ 1, 1 }` would duplicate the\n right channel to both channels of a stereo signal. An element in the\n channel map set to -1 instead of a valid channel will mute that channel,\n setting it to a silence value.\n\n You cannot change the number of channels through a channel map, just\n reorder/mute them.\n\n Data that was previously queued in the stream will still be operated on in\n the order that was current when it was added, which is to say you can put\n the end of a sound file in one order to a stream, change orders for the\n next sound file, and start putting that new data while the previous sound\n file is still queued, and everything will still play back correctly.\n\n Audio streams default to no remapping applied. Passing a NULL channel map\n is legal, and turns off remapping.\n\n SDL will copy the channel map; the caller does not have to save this array\n after this call.\n\n If `count` is not equal to the current number of channels in the audio\n stream's format, this will fail. This is a safety measure to make sure a\n race condition hasn't changed the format while this call is setting the\n channel map.\n\n Unlike attempting to change the stream's format, the input channel map on a\n stream bound to a recording device is permitted to change at any time; any\n data added to the stream from the device after this call will have the new\n mapping, but previously-added data will still have the prior mapping.\n\n **Parameter:** stream the SDL_AudioStream to change.\n **Parameter:** chmap the new channel map, NULL to reset to default.\n **Parameter:** count The number of channels in the map.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running. Don't change the\n stream's format to have a different number of channels from a\n different thread at the same time, though!\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamOutputChannelMap\n"]
4897 pub fn SDL_SetAudioStreamInputChannelMap(
4898 stream: *mut SDL_AudioStream,
4899 chmap: *const core::ffi::c_int,
4900 count: core::ffi::c_int,
4901 ) -> bool;
4902}
4903unsafe extern "C" {
4904 #[doc = " Set the current output channel map of an audio stream.\n\n Channel maps are optional; most things do not need them, instead passing\n data in the [order that SDL expects](CategoryAudio#channel-layouts).\n\n The output channel map reorders data that is leaving a stream via\n SDL_GetAudioStreamData.\n\n Each item in the array represents an input channel, and its value is the\n channel that it should be remapped to. To reverse a stereo signal's left\n and right values, you'd have an array of `{ 1, 0 }`. It is legal to remap\n multiple channels to the same thing, so `{ 1, 1 }` would duplicate the\n right channel to both channels of a stereo signal. An element in the\n channel map set to -1 instead of a valid channel will mute that channel,\n setting it to a silence value.\n\n You cannot change the number of channels through a channel map, just\n reorder/mute them.\n\n The output channel map can be changed at any time, as output remapping is\n applied during SDL_GetAudioStreamData.\n\n Audio streams default to no remapping applied. Passing a NULL channel map\n is legal, and turns off remapping.\n\n SDL will copy the channel map; the caller does not have to save this array\n after this call.\n\n If `count` is not equal to the current number of channels in the audio\n stream's format, this will fail. This is a safety measure to make sure a\n race condition hasn't changed the format while this call is setting the\n channel map.\n\n Unlike attempting to change the stream's format, the output channel map on\n a stream bound to a recording device is permitted to change at any time;\n any data added to the stream after this call will have the new mapping, but\n previously-added data will still have the prior mapping. When the channel\n map doesn't match the hardware's channel layout, SDL will convert the data\n before feeding it to the device for playback.\n\n **Parameter:** stream the SDL_AudioStream to change.\n **Parameter:** chmap the new channel map, NULL to reset to default.\n **Parameter:** count The number of channels in the map.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as it holds\n a stream-specific mutex while running. Don't change the\n stream's format to have a different number of channels from a\n a different thread at the same time, though!\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamInputChannelMap\n"]
4905 pub fn SDL_SetAudioStreamOutputChannelMap(
4906 stream: *mut SDL_AudioStream,
4907 chmap: *const core::ffi::c_int,
4908 count: core::ffi::c_int,
4909 ) -> bool;
4910}
4911unsafe extern "C" {
4912 #[doc = " Add data to the stream.\n\n This data must match the format/channels/samplerate specified in the latest\n call to SDL_SetAudioStreamFormat, or the format specified when creating the\n stream if it hasn't been changed.\n\n Note that this call simply copies the unconverted data for later. This is\n different than SDL2, where data was converted during the Put call and the\n Get call would just dequeue the previously-converted data.\n\n **Parameter:** stream the stream the audio data is being added to.\n **Parameter:** buf a pointer to the audio data to add.\n **Parameter:** len the number of bytes to write to the stream.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, but if the\n stream has a callback set, the caller might need to manage\n extra locking.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClearAudioStream\n **See Also:** SDL_FlushAudioStream\n **See Also:** SDL_GetAudioStreamData\n **See Also:** SDL_GetAudioStreamQueued\n"]
4913 pub fn SDL_PutAudioStreamData(
4914 stream: *mut SDL_AudioStream,
4915 buf: *const core::ffi::c_void,
4916 len: core::ffi::c_int,
4917 ) -> bool;
4918}
4919#[doc = " A callback that fires for completed SDL_PutAudioStreamDataNoCopy() data.\n\n When using SDL_PutAudioStreamDataNoCopy() to provide data to an\n SDL_AudioStream, it's not safe to dispose of the data until the stream has\n completely consumed it. Often times it's difficult to know exactly when\n this has happened.\n\n This callback fires once when the stream no longer needs the buffer,\n allowing the app to easily free or reuse it.\n\n **Parameter:** userdata an opaque pointer provided by the app for their personal\n use.\n **Parameter:** buf the pointer provided to SDL_PutAudioStreamDataNoCopy().\n **Parameter:** buflen the size of buffer, in bytes, provided to\n SDL_PutAudioStreamDataNoCopy().\n\n **Thread Safety:** This callbacks may run from any thread, so if you need to\n protect shared data, you should use SDL_LockAudioStream to\n serialize access; this lock will be held before your callback\n is called, so your callback does not need to manage the lock\n explicitly.\n\n **Available Since:** This datatype is available since SDL 3.4.0.\n\n **See Also:** SDL_SetAudioStreamGetCallback\n **See Also:** SDL_SetAudioStreamPutCallback\n"]
4920pub type SDL_AudioStreamDataCompleteCallback = ::core::option::Option<
4921 unsafe extern "C" fn(
4922 userdata: *mut core::ffi::c_void,
4923 buf: *const core::ffi::c_void,
4924 buflen: core::ffi::c_int,
4925 ),
4926>;
4927unsafe extern "C" {
4928 #[doc = " Add external data to an audio stream without copying it.\n\n Unlike SDL_PutAudioStreamData(), this function does not make a copy of the\n provided data, instead storing the provided pointer. This means that the\n put operation does not need to allocate and copy the data, but the original\n data must remain available until the stream is done with it, either by\n being read from the stream in its entirety, or a call to\n SDL_ClearAudioStream() or SDL_DestroyAudioStream().\n\n The data must match the format/channels/samplerate specified in the latest\n call to SDL_SetAudioStreamFormat, or the format specified when creating the\n stream if it hasn't been changed.\n\n An optional callback may be provided, which is called when the stream no\n longer needs the data. Once this callback fires, the stream will not access\n the data again. This callback will fire for any reason the data is no\n longer needed, including clearing or destroying the stream.\n\n Note that there is still an allocation to store tracking information, so\n this function is more efficient for larger blocks of data. If you're\n planning to put a few samples at a time, it will be more efficient to use\n SDL_PutAudioStreamData(), which allocates and buffers in blocks.\n\n **Parameter:** stream the stream the audio data is being added to.\n **Parameter:** buf a pointer to the audio data to add.\n **Parameter:** len the number of bytes to add to the stream.\n **Parameter:** callback the callback function to call when the data is no longer\n needed by the stream. May be NULL.\n **Parameter:** userdata an opaque pointer provided to the callback for its own\n personal use.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, but if the\n stream has a callback set, the caller might need to manage\n extra locking.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_ClearAudioStream\n **See Also:** SDL_FlushAudioStream\n **See Also:** SDL_GetAudioStreamData\n **See Also:** SDL_GetAudioStreamQueued\n"]
4929 pub fn SDL_PutAudioStreamDataNoCopy(
4930 stream: *mut SDL_AudioStream,
4931 buf: *const core::ffi::c_void,
4932 len: core::ffi::c_int,
4933 callback: SDL_AudioStreamDataCompleteCallback,
4934 userdata: *mut core::ffi::c_void,
4935 ) -> bool;
4936}
4937unsafe extern "C" {
4938 #[doc = " Add data to the stream with each channel in a separate array.\n\n This data must match the format/channels/samplerate specified in the latest\n call to SDL_SetAudioStreamFormat, or the format specified when creating the\n stream if it hasn't been changed.\n\n The data will be interleaved and queued. Note that SDL_AudioStream only\n operates on interleaved data, so this is simply a convenience function for\n easily queueing data from sources that provide separate arrays. There is no\n equivalent function to retrieve planar data.\n\n The arrays in `channel_buffers` are ordered as they are to be interleaved;\n the first array will be the first sample in the interleaved data. Any\n individual array may be NULL; in this case, silence will be interleaved for\n that channel.\n\n `num_channels` specifies how many arrays are in `channel_buffers`. This can\n be used as a safety to prevent overflow, in case the stream format has\n changed elsewhere. If more channels are specified than the current input\n spec, they are ignored. If less channels are specified, the missing arrays\n are treated as if they are NULL (silence is written to those channels). If\n the count is -1, SDL will assume the array count matches the current input\n spec.\n\n Note that `num_samples` is the number of _samples per array_. This can also\n be thought of as the number of _sample frames_ to be queued. A value of 1\n with stereo arrays will queue two samples to the stream. This is different\n than SDL_PutAudioStreamData, which wants the size of a single array in\n bytes.\n\n **Parameter:** stream the stream the audio data is being added to.\n **Parameter:** channel_buffers a pointer to an array of arrays, one array per\n channel.\n **Parameter:** num_channels the number of arrays in `channel_buffers` or -1.\n **Parameter:** num_samples the number of _samples_ per array to write to the\n stream.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, but if the\n stream has a callback set, the caller might need to manage\n extra locking.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_ClearAudioStream\n **See Also:** SDL_FlushAudioStream\n **See Also:** SDL_GetAudioStreamData\n **See Also:** SDL_GetAudioStreamQueued\n"]
4939 pub fn SDL_PutAudioStreamPlanarData(
4940 stream: *mut SDL_AudioStream,
4941 channel_buffers: *const *const core::ffi::c_void,
4942 num_channels: core::ffi::c_int,
4943 num_samples: core::ffi::c_int,
4944 ) -> bool;
4945}
4946unsafe extern "C" {
4947 #[doc = " Get converted/resampled data from the stream.\n\n The input/output data format/channels/samplerate is specified when creating\n the stream, and can be changed after creation by calling\n SDL_SetAudioStreamFormat.\n\n Note that any conversion and resampling necessary is done during this call,\n and SDL_PutAudioStreamData simply queues unconverted data for later. This\n is different than SDL2, where that work was done while inputting new data\n to the stream and requesting the output just copied the converted data.\n\n **Parameter:** stream the stream the audio is being requested from.\n **Parameter:** buf a buffer to fill with audio data.\n **Parameter:** len the maximum number of bytes to fill.\n **Returns:** the number of bytes read from the stream or -1 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread, but if the\n stream has a callback set, the caller might need to manage\n extra locking.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClearAudioStream\n **See Also:** SDL_GetAudioStreamAvailable\n **See Also:** SDL_PutAudioStreamData\n"]
4948 pub fn SDL_GetAudioStreamData(
4949 stream: *mut SDL_AudioStream,
4950 buf: *mut core::ffi::c_void,
4951 len: core::ffi::c_int,
4952 ) -> core::ffi::c_int;
4953}
4954unsafe extern "C" {
4955 #[doc = " Get the number of converted/resampled bytes available.\n\n The stream may be buffering data behind the scenes until it has enough to\n resample correctly, so this number might be lower than what you expect, or\n even be zero. Add more data or flush the stream if you need the data now.\n\n If the stream has so much data that it would overflow an int, the return\n value is clamped to a maximum value, but no queued data is lost; if there\n are gigabytes of data queued, the app might need to read some of it with\n SDL_GetAudioStreamData before this function's return value is no longer\n clamped.\n\n **Parameter:** stream the audio stream to query.\n **Returns:** the number of converted/resampled bytes available or -1 on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioStreamData\n **See Also:** SDL_PutAudioStreamData\n"]
4956 pub fn SDL_GetAudioStreamAvailable(stream: *mut SDL_AudioStream) -> core::ffi::c_int;
4957}
4958unsafe extern "C" {
4959 #[doc = " Get the number of bytes currently queued.\n\n This is the number of bytes put into a stream as input, not the number that\n can be retrieved as output. Because of several details, it's not possible\n to calculate one number directly from the other. If you need to know how\n much usable data can be retrieved right now, you should use\n SDL_GetAudioStreamAvailable() and not this function.\n\n Note that audio streams can change their input format at any time, even if\n there is still data queued in a different format, so the returned byte\n count will not necessarily match the number of _sample frames_ available.\n Users of this API should be aware of format changes they make when feeding\n a stream and plan accordingly.\n\n Queued data is not converted until it is consumed by\n SDL_GetAudioStreamData, so this value should be representative of the exact\n data that was put into the stream.\n\n If the stream has so much data that it would overflow an int, the return\n value is clamped to a maximum value, but no queued data is lost; if there\n are gigabytes of data queued, the app might need to read some of it with\n SDL_GetAudioStreamData before this function's return value is no longer\n clamped.\n\n **Parameter:** stream the audio stream to query.\n **Returns:** the number of bytes queued or -1 on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PutAudioStreamData\n **See Also:** SDL_ClearAudioStream\n"]
4960 pub fn SDL_GetAudioStreamQueued(stream: *mut SDL_AudioStream) -> core::ffi::c_int;
4961}
4962unsafe extern "C" {
4963 #[doc = " Tell the stream that you're done sending data, and anything being buffered\n should be converted/resampled and made available immediately.\n\n It is legal to add more data to a stream after flushing, but there may be\n audio gaps in the output. Generally this is intended to signal the end of\n input, so the complete output becomes available.\n\n **Parameter:** stream the audio stream to flush.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PutAudioStreamData\n"]
4964 pub fn SDL_FlushAudioStream(stream: *mut SDL_AudioStream) -> bool;
4965}
4966unsafe extern "C" {
4967 #[doc = " Clear any pending data in the stream.\n\n This drops any queued data, so there will be nothing to read from the\n stream until more is added.\n\n **Parameter:** stream the audio stream to clear.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioStreamAvailable\n **See Also:** SDL_GetAudioStreamData\n **See Also:** SDL_GetAudioStreamQueued\n **See Also:** SDL_PutAudioStreamData\n"]
4968 pub fn SDL_ClearAudioStream(stream: *mut SDL_AudioStream) -> bool;
4969}
4970unsafe extern "C" {
4971 #[doc = " Use this function to pause audio playback on the audio device associated\n with an audio stream.\n\n This function pauses audio processing for a given device. Any bound audio\n streams will not progress, and no audio will be generated. Pausing one\n device does not prevent other unpaused devices from running.\n\n Pausing a device can be useful to halt all audio without unbinding all the\n audio streams. This might be useful while a game is paused, or a level is\n loading, etc.\n\n **Parameter:** stream the audio stream associated with the audio device to pause.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ResumeAudioStreamDevice\n"]
4972 pub fn SDL_PauseAudioStreamDevice(stream: *mut SDL_AudioStream) -> bool;
4973}
4974unsafe extern "C" {
4975 #[doc = " Use this function to unpause audio playback on the audio device associated\n with an audio stream.\n\n This function unpauses audio processing for a given device that has\n previously been paused. Once unpaused, any bound audio streams will begin\n to progress again, and audio can be generated.\n\n SDL_OpenAudioDeviceStream opens audio devices in a paused state, so this\n function call is required for audio playback to begin on such devices.\n\n **Parameter:** stream the audio stream associated with the audio device to resume.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PauseAudioStreamDevice\n"]
4976 pub fn SDL_ResumeAudioStreamDevice(stream: *mut SDL_AudioStream) -> bool;
4977}
4978unsafe extern "C" {
4979 #[doc = " Use this function to query if an audio device associated with a stream is\n paused.\n\n Unlike in SDL2, audio devices start in an _unpaused_ state, since an app\n has to bind a stream before any audio will flow.\n\n **Parameter:** stream the audio stream associated with the audio device to query.\n **Returns:** true if device is valid and paused, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PauseAudioStreamDevice\n **See Also:** SDL_ResumeAudioStreamDevice\n"]
4980 pub fn SDL_AudioStreamDevicePaused(stream: *mut SDL_AudioStream) -> bool;
4981}
4982unsafe extern "C" {
4983 #[doc = " Lock an audio stream for serialized access.\n\n Each SDL_AudioStream has an internal mutex it uses to protect its data\n structures from threading conflicts. This function allows an app to lock\n that mutex, which could be useful if registering callbacks on this stream.\n\n One does not need to lock a stream to use in it most cases, as the stream\n manages this lock internally. However, this lock is held during callbacks,\n which may run from arbitrary threads at any time, so if an app needs to\n protect shared data during those callbacks, locking the stream guarantees\n that the callback is not running while the lock is held.\n\n As this is just a wrapper over SDL_LockMutex for an internal lock; it has\n all the same attributes (recursive locks are allowed, etc).\n\n **Parameter:** stream the audio stream to lock.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UnlockAudioStream\n"]
4984 pub fn SDL_LockAudioStream(stream: *mut SDL_AudioStream) -> bool;
4985}
4986unsafe extern "C" {
4987 #[doc = " Unlock an audio stream for serialized access.\n\n This unlocks an audio stream after a call to SDL_LockAudioStream.\n\n **Parameter:** stream the audio stream to unlock.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** You should only call this from the same thread that\n previously called SDL_LockAudioStream.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockAudioStream\n"]
4988 pub fn SDL_UnlockAudioStream(stream: *mut SDL_AudioStream) -> bool;
4989}
4990#[doc = " A callback that fires when data passes through an SDL_AudioStream.\n\n Apps can (optionally) register a callback with an audio stream that is\n called when data is added with SDL_PutAudioStreamData, or requested with\n SDL_GetAudioStreamData.\n\n Two values are offered here: one is the amount of additional data needed to\n satisfy the immediate request (which might be zero if the stream already\n has enough data queued) and the other is the total amount being requested.\n In a Get call triggering a Put callback, these values can be different. In\n a Put call triggering a Get callback, these values are always the same.\n\n Byte counts might be slightly overestimated due to buffering or resampling,\n and may change from call to call.\n\n This callback is not required to do anything. Generally this is useful for\n adding/reading data on demand, and the app will often put/get data as\n appropriate, but the system goes on with the data currently available to it\n if this callback does nothing.\n\n **Parameter:** stream the SDL audio stream associated with this callback.\n **Parameter:** additional_amount the amount of data, in bytes, that is needed right\n now.\n **Parameter:** total_amount the total amount of data requested, in bytes, that is\n requested or available.\n **Parameter:** userdata an opaque pointer provided by the app for their personal\n use.\n\n **Thread Safety:** This callbacks may run from any thread, so if you need to\n protect shared data, you should use SDL_LockAudioStream to\n serialize access; this lock will be held before your callback\n is called, so your callback does not need to manage the lock\n explicitly.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamGetCallback\n **See Also:** SDL_SetAudioStreamPutCallback\n"]
4991pub type SDL_AudioStreamCallback = ::core::option::Option<
4992 unsafe extern "C" fn(
4993 userdata: *mut core::ffi::c_void,
4994 stream: *mut SDL_AudioStream,
4995 additional_amount: core::ffi::c_int,
4996 total_amount: core::ffi::c_int,
4997 ),
4998>;
4999unsafe extern "C" {
5000 #[doc = " Set a callback that runs when data is requested from an audio stream.\n\n This callback is called _before_ data is obtained from the stream, giving\n the callback the chance to add more on-demand.\n\n The callback can (optionally) call SDL_PutAudioStreamData() to add more\n audio to the stream during this call; if needed, the request that triggered\n this callback will obtain the new data immediately.\n\n The callback's `additional_amount` argument is roughly how many bytes of\n _unconverted_ data (in the stream's input format) is needed by the caller,\n although this may overestimate a little for safety. This takes into account\n how much is already in the stream and only asks for any extra necessary to\n resolve the request, which means the callback may be asked for zero bytes,\n and a different amount on each call.\n\n The callback is not required to supply exact amounts; it is allowed to\n supply too much or too little or none at all. The caller will get what's\n available, up to the amount they requested, regardless of this callback's\n outcome.\n\n Clearing or flushing an audio stream does not call this callback.\n\n This function obtains the stream's lock, which means any existing callback\n (get or put) in progress will finish running before setting the new\n callback.\n\n Setting a NULL function turns off the callback.\n\n **Parameter:** stream the audio stream to set the new callback on.\n **Parameter:** callback the new callback function to call when data is requested\n from the stream.\n **Parameter:** userdata an opaque pointer provided to the callback for its own\n personal use.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information. This only fails if `stream` is NULL.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamPutCallback\n"]
5001 pub fn SDL_SetAudioStreamGetCallback(
5002 stream: *mut SDL_AudioStream,
5003 callback: SDL_AudioStreamCallback,
5004 userdata: *mut core::ffi::c_void,
5005 ) -> bool;
5006}
5007unsafe extern "C" {
5008 #[doc = " Set a callback that runs when data is added to an audio stream.\n\n This callback is called _after_ the data is added to the stream, giving the\n callback the chance to obtain it immediately.\n\n The callback can (optionally) call SDL_GetAudioStreamData() to obtain audio\n from the stream during this call.\n\n The callback's `additional_amount` argument is how many bytes of\n _converted_ data (in the stream's output format) was provided by the\n caller, although this may underestimate a little for safety. This value\n might be less than what is currently available in the stream, if data was\n already there, and might be less than the caller provided if the stream\n needs to keep a buffer to aid in resampling. Which means the callback may\n be provided with zero bytes, and a different amount on each call.\n\n The callback may call SDL_GetAudioStreamAvailable to see the total amount\n currently available to read from the stream, instead of the total provided\n by the current call.\n\n The callback is not required to obtain all data. It is allowed to read less\n or none at all. Anything not read now simply remains in the stream for\n later access.\n\n Clearing or flushing an audio stream does not call this callback.\n\n This function obtains the stream's lock, which means any existing callback\n (get or put) in progress will finish running before setting the new\n callback.\n\n Setting a NULL function turns off the callback.\n\n **Parameter:** stream the audio stream to set the new callback on.\n **Parameter:** callback the new callback function to call when data is added to the\n stream.\n **Parameter:** userdata an opaque pointer provided to the callback for its own\n personal use.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information. This only fails if `stream` is NULL.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioStreamGetCallback\n"]
5009 pub fn SDL_SetAudioStreamPutCallback(
5010 stream: *mut SDL_AudioStream,
5011 callback: SDL_AudioStreamCallback,
5012 userdata: *mut core::ffi::c_void,
5013 ) -> bool;
5014}
5015unsafe extern "C" {
5016 #[doc = " Free an audio stream.\n\n This will release all allocated data, including any audio that is still\n queued. You do not need to manually clear the stream first.\n\n If this stream was bound to an audio device, it is unbound during this\n call. If this stream was created with SDL_OpenAudioDeviceStream, the audio\n device that was opened alongside this stream's creation will be closed,\n too.\n\n **Parameter:** stream the audio stream to destroy.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateAudioStream\n"]
5017 pub fn SDL_DestroyAudioStream(stream: *mut SDL_AudioStream);
5018}
5019unsafe extern "C" {
5020 #[doc = " Convenience function for straightforward audio init for the common case.\n\n If all your app intends to do is provide a single source of PCM audio, this\n function allows you to do all your audio setup in a single call.\n\n This is also intended to be a clean means to migrate apps from SDL2.\n\n This function will open an audio device, create a stream and bind it.\n Unlike other methods of setup, the audio device will be closed when this\n stream is destroyed, so the app can treat the returned SDL_AudioStream as\n the only object needed to manage audio playback.\n\n Also unlike other functions, the audio device begins paused. This is to map\n more closely to SDL2-style behavior, since there is no extra step here to\n bind a stream to begin audio flowing. The audio device should be resumed\n with SDL_ResumeAudioStreamDevice().\n\n This function works with both playback and recording devices.\n\n The `spec` parameter represents the app's side of the audio stream. That\n is, for recording audio, this will be the output format, and for playing\n audio, this will be the input format. If spec is NULL, the system will\n choose the format, and the app can use SDL_GetAudioStreamFormat() to obtain\n this information later.\n\n If you don't care about opening a specific audio device, you can (and\n probably _should_), use SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK for playback and\n SDL_AUDIO_DEVICE_DEFAULT_RECORDING for recording.\n\n One can optionally provide a callback function; if NULL, the app is\n expected to queue audio data for playback (or unqueue audio data if\n capturing). Otherwise, the callback will begin to fire once the device is\n unpaused.\n\n Destroying the returned stream with SDL_DestroyAudioStream will also close\n the audio device associated with this stream.\n\n **Parameter:** devid an audio device to open, or SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK\n or SDL_AUDIO_DEVICE_DEFAULT_RECORDING.\n **Parameter:** spec the audio stream's data format. Can be NULL.\n **Parameter:** callback a callback where the app will provide new data for\n playback, or receive new data for recording. Can be NULL,\n in which case the app will need to call\n SDL_PutAudioStreamData or SDL_GetAudioStreamData as\n necessary.\n **Parameter:** userdata app-controlled pointer passed to callback. Can be NULL.\n Ignored if callback is NULL.\n **Returns:** an audio stream on success, ready to use, or NULL on failure; call\n SDL_GetError() for more information. When done with this stream,\n call SDL_DestroyAudioStream to free resources and close the\n device.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAudioStreamDevice\n **See Also:** SDL_ResumeAudioStreamDevice\n"]
5021 pub fn SDL_OpenAudioDeviceStream(
5022 devid: SDL_AudioDeviceID,
5023 spec: *const SDL_AudioSpec,
5024 callback: SDL_AudioStreamCallback,
5025 userdata: *mut core::ffi::c_void,
5026 ) -> *mut SDL_AudioStream;
5027}
5028#[doc = " A callback that fires when data is about to be fed to an audio device.\n\n This is useful for accessing the final mix, perhaps for writing a\n visualizer or applying a final effect to the audio data before playback.\n\n This callback should run as quickly as possible and not block for any\n significant time, as this callback delays submission of data to the audio\n device, which can cause audio playback problems.\n\n The postmix callback _must_ be able to handle any audio data format\n specified in `spec`, which can change between callbacks if the audio device\n changed. However, this only covers frequency and channel count; data is\n always provided here in SDL_AUDIO_F32 format.\n\n The postmix callback runs _after_ logical device gain and audiostream gain\n have been applied, which is to say you can make the output data louder at\n this point than the gain settings would suggest.\n\n **Parameter:** userdata a pointer provided by the app through\n SDL_SetAudioPostmixCallback, for its own use.\n **Parameter:** spec the current format of audio that is to be submitted to the\n audio device.\n **Parameter:** buffer the buffer of audio samples to be submitted. The callback can\n inspect and/or modify this data.\n **Parameter:** buflen the size of `buffer` in bytes.\n\n **Thread Safety:** This will run from a background thread owned by SDL. The\n application is responsible for locking resources the callback\n touches that need to be protected.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAudioPostmixCallback\n"]
5029pub type SDL_AudioPostmixCallback = ::core::option::Option<
5030 unsafe extern "C" fn(
5031 userdata: *mut core::ffi::c_void,
5032 spec: *const SDL_AudioSpec,
5033 buffer: *mut f32,
5034 buflen: core::ffi::c_int,
5035 ),
5036>;
5037unsafe extern "C" {
5038 #[doc = " Set a callback that fires when data is about to be fed to an audio device.\n\n This is useful for accessing the final mix, perhaps for writing a\n visualizer or applying a final effect to the audio data before playback.\n\n The buffer is the final mix of all bound audio streams on an opened device;\n this callback will fire regularly for any device that is both opened and\n unpaused. If there is no new data to mix, either because no streams are\n bound to the device or all the streams are empty, this callback will still\n fire with the entire buffer set to silence.\n\n This callback is allowed to make changes to the data; the contents of the\n buffer after this call is what is ultimately passed along to the hardware.\n\n The callback is always provided the data in float format (values from -1.0f\n to 1.0f), but the number of channels or sample rate may be different than\n the format the app requested when opening the device; SDL might have had to\n manage a conversion behind the scenes, or the playback might have jumped to\n new physical hardware when a system default changed, etc. These details may\n change between calls. Accordingly, the size of the buffer might change\n between calls as well.\n\n This callback can run at any time, and from any thread; if you need to\n serialize access to your app's data, you should provide and use a mutex or\n other synchronization device.\n\n All of this to say: there are specific needs this callback can fulfill, but\n it is not the simplest interface. Apps should generally provide audio in\n their preferred format through an SDL_AudioStream and let SDL handle the\n difference.\n\n This function is extremely time-sensitive; the callback should do the least\n amount of work possible and return as quickly as it can. The longer the\n callback runs, the higher the risk of audio dropouts or other problems.\n\n This function will block until the audio device is in between iterations,\n so any existing callback that might be running will finish before this\n function sets the new callback and returns.\n\n Setting a NULL callback function disables any previously-set callback.\n\n **Parameter:** devid the ID of an opened audio device.\n **Parameter:** callback a callback function to be called. Can be NULL.\n **Parameter:** userdata app-controlled pointer passed to callback. Can be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5039 pub fn SDL_SetAudioPostmixCallback(
5040 devid: SDL_AudioDeviceID,
5041 callback: SDL_AudioPostmixCallback,
5042 userdata: *mut core::ffi::c_void,
5043 ) -> bool;
5044}
5045unsafe extern "C" {
5046 #[doc = " Load the audio data of a WAVE file into memory.\n\n Loading a WAVE file requires `src`, `spec`, `audio_buf` and `audio_len` to\n be valid pointers. The entire data portion of the file is then loaded into\n memory and decoded if necessary.\n\n Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and\n 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and\n A-law and mu-law (8 bits). Other formats are currently unsupported and\n cause an error.\n\n If this function succeeds, the return value is zero and the pointer to the\n audio data allocated by the function is written to `audio_buf` and its\n length in bytes to `audio_len`. The SDL_AudioSpec members `freq`,\n `channels`, and `format` are set to the values of the audio data in the\n buffer.\n\n It's necessary to use SDL_free() to free the audio data returned in\n `audio_buf` when it is no longer used.\n\n Because of the underspecification of the .WAV format, there are many\n problematic files in the wild that cause issues with strict decoders. To\n provide compatibility with these files, this decoder is lenient in regards\n to the truncation of the file, the fact chunk, and the size of the RIFF\n chunk. The hints `SDL_HINT_WAVE_RIFF_CHUNK_SIZE`,\n `SDL_HINT_WAVE_TRUNCATION`, and `SDL_HINT_WAVE_FACT_CHUNK` can be used to\n tune the behavior of the loading process.\n\n Any file that is invalid (due to truncation, corruption, or wrong values in\n the headers), too big, or unsupported causes an error. Additionally, any\n critical I/O error from the data source will terminate the loading process\n with an error. The function returns NULL on error and in all cases (with\n the exception of `src` being NULL), an appropriate error message will be\n set.\n\n It is required that the data source supports seeking.\n\n Example:\n\n ```c\n SDL_LoadWAV_IO(SDL_IOFromFile(\"sample.wav\", \"rb\"), true, &spec, &buf, &len);\n ```\n\n Note that the SDL_LoadWAV function does this same thing for you, but in a\n less messy way:\n\n ```c\n SDL_LoadWAV(\"sample.wav\", &spec, &buf, &len);\n ```\n\n **Parameter:** src the data source for the WAVE data.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `src` before returning, even\n in the case of an error.\n **Parameter:** spec a pointer to an SDL_AudioSpec that will be set to the WAVE\n data's format details on successful return.\n **Parameter:** audio_buf a pointer filled with the audio data, allocated by the\n function.\n **Parameter:** audio_len a pointer filled with the length of the audio data buffer\n in bytes.\n **Returns:** true on success. `audio_buf` will be filled with a pointer to an\n allocated buffer containing the audio data, and `audio_len` is\n filled with the length of that audio buffer in bytes.\n\n This function returns false if the .WAV file cannot be opened,\n uses an unknown data format, or is corrupt; call SDL_GetError()\n for more information.\n\n When the application is done with the data returned in\n `audio_buf`, it should call SDL_free() to dispose of it.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_free\n **See Also:** SDL_LoadWAV\n"]
5047 pub fn SDL_LoadWAV_IO(
5048 src: *mut SDL_IOStream,
5049 closeio: bool,
5050 spec: *mut SDL_AudioSpec,
5051 audio_buf: *mut *mut Uint8,
5052 audio_len: *mut Uint32,
5053 ) -> bool;
5054}
5055unsafe extern "C" {
5056 #[doc = " Loads a WAV from a file path.\n\n This is a convenience function that is effectively the same as:\n\n ```c\n SDL_LoadWAV_IO(SDL_IOFromFile(path, \"rb\"), true, spec, audio_buf, audio_len);\n ```\n\n **Parameter:** path the file path of the WAV file to open.\n **Parameter:** spec a pointer to an SDL_AudioSpec that will be set to the WAVE\n data's format details on successful return.\n **Parameter:** audio_buf a pointer filled with the audio data, allocated by the\n function.\n **Parameter:** audio_len a pointer filled with the length of the audio data buffer\n in bytes.\n **Returns:** true on success. `audio_buf` will be filled with a pointer to an\n allocated buffer containing the audio data, and `audio_len` is\n filled with the length of that audio buffer in bytes.\n\n This function returns false if the .WAV file cannot be opened,\n uses an unknown data format, or is corrupt; call SDL_GetError()\n for more information.\n\n When the application is done with the data returned in\n `audio_buf`, it should call SDL_free() to dispose of it.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_free\n **See Also:** SDL_LoadWAV_IO\n"]
5057 pub fn SDL_LoadWAV(
5058 path: *const core::ffi::c_char,
5059 spec: *mut SDL_AudioSpec,
5060 audio_buf: *mut *mut Uint8,
5061 audio_len: *mut Uint32,
5062 ) -> bool;
5063}
5064unsafe extern "C" {
5065 #[doc = " Mix audio data in a specified format.\n\n This takes an audio buffer `src` of `len` bytes of `format` data and mixes\n it into `dst`, performing addition, volume adjustment, and overflow\n clipping. The buffer pointed to by `dst` must also be `len` bytes of\n `format` data.\n\n This is provided for convenience -- you can mix your own audio data.\n\n Do not use this function for mixing together more than two streams of\n sample data. The output from repeated application of this function may be\n distorted by clipping, because there is no accumulator with greater range\n than the input (not to mention this being an inefficient way of doing it).\n\n It is a common misconception that this function is required to write audio\n data to an output stream in an audio callback. While you can do that,\n SDL_MixAudio() is really only needed when you're mixing a single audio\n stream with a volume adjustment.\n\n **Parameter:** dst the destination for the mixed audio.\n **Parameter:** src the source audio buffer to be mixed.\n **Parameter:** format the SDL_AudioFormat structure representing the desired audio\n format.\n **Parameter:** len the length of the audio buffer in bytes.\n **Parameter:** volume ranges from 0.0 - 1.0, and should be set to 1.0 for full\n audio volume.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5066 pub fn SDL_MixAudio(
5067 dst: *mut Uint8,
5068 src: *const Uint8,
5069 format: SDL_AudioFormat,
5070 len: Uint32,
5071 volume: f32,
5072 ) -> bool;
5073}
5074unsafe extern "C" {
5075 #[doc = " Convert some audio data of one format to another format.\n\n Please note that this function is for convenience, but should not be used\n to resample audio in blocks, as it will introduce audio artifacts on the\n boundaries. You should only use this function if you are converting audio\n data in its entirety in one call. If you want to convert audio in smaller\n chunks, use an SDL_AudioStream, which is designed for this situation.\n\n Internally, this function creates and destroys an SDL_AudioStream on each\n use, so it's also less efficient than using one directly, if you need to\n convert multiple times.\n\n **Parameter:** src_spec the format details of the input audio.\n **Parameter:** src_data the audio data to be converted.\n **Parameter:** src_len the len of src_data.\n **Parameter:** dst_spec the format details of the output audio.\n **Parameter:** dst_data will be filled with a pointer to converted audio data,\n which should be freed with SDL_free(). On error, it will be\n NULL.\n **Parameter:** dst_len will be filled with the len of dst_data.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5076 pub fn SDL_ConvertAudioSamples(
5077 src_spec: *const SDL_AudioSpec,
5078 src_data: *const Uint8,
5079 src_len: core::ffi::c_int,
5080 dst_spec: *const SDL_AudioSpec,
5081 dst_data: *mut *mut Uint8,
5082 dst_len: *mut core::ffi::c_int,
5083 ) -> bool;
5084}
5085unsafe extern "C" {
5086 #[doc = " Get the human readable name of an audio format.\n\n **Parameter:** format the audio format to query.\n **Returns:** the human readable name of the specified audio format or\n \"SDL_AUDIO_UNKNOWN\" if the format isn't recognized.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5087 pub fn SDL_GetAudioFormatName(format: SDL_AudioFormat) -> *const core::ffi::c_char;
5088}
5089unsafe extern "C" {
5090 #[doc = " Get the appropriate memset value for silencing an audio format.\n\n The value returned by this function can be used as the second argument to\n memset (or SDL_memset) to set an audio buffer in a specific format to\n silence.\n\n **Parameter:** format the audio data format to query.\n **Returns:** a byte value that can be passed to memset.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5091 pub fn SDL_GetSilenceValueForFormat(format: SDL_AudioFormat) -> core::ffi::c_int;
5092}
5093unsafe extern "C" {
5094 #[doc = " Get the index of the most significant (set) bit in a 32-bit number.\n\n Result is undefined when called with 0. This operation can also be stated\n as \"count leading zeroes\" and \"log base 2\".\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** x the 32-bit value to examine.\n **Returns:** the index of the most significant bit, or -1 if the value is 0.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5095 #[link_name = "SDL_MostSignificantBitIndex32__extern"]
5096 pub fn SDL_MostSignificantBitIndex32(x: Uint32) -> core::ffi::c_int;
5097}
5098unsafe extern "C" {
5099 #[doc = " Determine if a unsigned 32-bit value has exactly one bit set.\n\n If there are no bits set (`x` is zero), or more than one bit set, this\n returns false. If any one bit is exclusively set, this returns true.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** x the 32-bit value to examine.\n **Returns:** true if exactly one bit is set in `x`, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5100 #[link_name = "SDL_HasExactlyOneBitSet32__extern"]
5101 pub fn SDL_HasExactlyOneBitSet32(x: Uint32) -> bool;
5102}
5103#[doc = " A set of blend modes used in drawing operations.\n\n These predefined blend modes are supported everywhere.\n\n Additional values may be obtained from SDL_ComposeCustomBlendMode.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_ComposeCustomBlendMode\n"]
5104pub type SDL_BlendMode = Uint32;
5105impl SDL_BlendOperation {
5106 #[doc = "< dst + src: supported by all renderers\n"]
5107 pub const SDL_BLENDOPERATION_ADD: SDL_BlendOperation = SDL_BlendOperation(1);
5108 #[doc = "< src - dst : supported by D3D, OpenGL, OpenGLES, and Vulkan\n"]
5109 pub const SDL_BLENDOPERATION_SUBTRACT: SDL_BlendOperation = SDL_BlendOperation(2);
5110 #[doc = "< dst - src : supported by D3D, OpenGL, OpenGLES, and Vulkan\n"]
5111 pub const SDL_BLENDOPERATION_REV_SUBTRACT: SDL_BlendOperation = SDL_BlendOperation(3);
5112 #[doc = "< min(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan\n"]
5113 pub const SDL_BLENDOPERATION_MINIMUM: SDL_BlendOperation = SDL_BlendOperation(4);
5114 #[doc = "< max(dst, src) : supported by D3D, OpenGL, OpenGLES, and Vulkan\n"]
5115 pub const SDL_BLENDOPERATION_MAXIMUM: SDL_BlendOperation = SDL_BlendOperation(5);
5116}
5117#[repr(transparent)]
5118#[doc = " The blend operation used when combining source and destination pixel\n components.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5119#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5120pub struct SDL_BlendOperation(pub core::ffi::c_uint);
5121impl SDL_BlendFactor {
5122 #[doc = "< 0, 0, 0, 0\n"]
5123 pub const SDL_BLENDFACTOR_ZERO: SDL_BlendFactor = SDL_BlendFactor(1);
5124 #[doc = "< 1, 1, 1, 1\n"]
5125 pub const SDL_BLENDFACTOR_ONE: SDL_BlendFactor = SDL_BlendFactor(2);
5126 #[doc = "< srcR, srcG, srcB, srcA\n"]
5127 pub const SDL_BLENDFACTOR_SRC_COLOR: SDL_BlendFactor = SDL_BlendFactor(3);
5128 #[doc = "< 1-srcR, 1-srcG, 1-srcB, 1-srcA\n"]
5129 pub const SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR: SDL_BlendFactor = SDL_BlendFactor(4);
5130 #[doc = "< srcA, srcA, srcA, srcA\n"]
5131 pub const SDL_BLENDFACTOR_SRC_ALPHA: SDL_BlendFactor = SDL_BlendFactor(5);
5132 #[doc = "< 1-srcA, 1-srcA, 1-srcA, 1-srcA\n"]
5133 pub const SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA: SDL_BlendFactor = SDL_BlendFactor(6);
5134 #[doc = "< dstR, dstG, dstB, dstA\n"]
5135 pub const SDL_BLENDFACTOR_DST_COLOR: SDL_BlendFactor = SDL_BlendFactor(7);
5136 #[doc = "< 1-dstR, 1-dstG, 1-dstB, 1-dstA\n"]
5137 pub const SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR: SDL_BlendFactor = SDL_BlendFactor(8);
5138 #[doc = "< dstA, dstA, dstA, dstA\n"]
5139 pub const SDL_BLENDFACTOR_DST_ALPHA: SDL_BlendFactor = SDL_BlendFactor(9);
5140 #[doc = "< 1-dstA, 1-dstA, 1-dstA, 1-dstA\n"]
5141 pub const SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA: SDL_BlendFactor = SDL_BlendFactor(10);
5142}
5143#[repr(transparent)]
5144#[doc = " The normalized factor used to multiply pixel components.\n\n The blend factors are multiplied with the pixels from a drawing operation\n (src) and the pixels from the render target (dst) before the blend\n operation. The comma-separated factors listed above are always applied in\n the component order red, green, blue, and alpha.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5145#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5146pub struct SDL_BlendFactor(pub core::ffi::c_uint);
5147unsafe extern "C" {
5148 #[doc = " Compose a custom blend mode for renderers.\n\n The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept\n the SDL_BlendMode returned by this function if the renderer supports it.\n\n A blend mode controls how the pixels from a drawing operation (source) get\n combined with the pixels from the render target (destination). First, the\n components of the source and destination pixels get multiplied with their\n blend factors. Then, the blend operation takes the two products and\n calculates the result that will get stored in the render target.\n\n Expressed in pseudocode, it would look like this:\n\n ```c\n dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);\n dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);\n ```\n\n Where the functions `colorOperation(src, dst)` and `alphaOperation(src,\n dst)` can return one of the following:\n\n - `src + dst`\n - `src - dst`\n - `dst - src`\n - `min(src, dst)`\n - `max(src, dst)`\n\n The red, green, and blue components are always multiplied with the first,\n second, and third components of the SDL_BlendFactor, respectively. The\n fourth component is not used.\n\n The alpha component is always multiplied with the fourth component of the\n SDL_BlendFactor. The other components are not used in the alpha\n calculation.\n\n Support for these blend modes varies for each renderer. To check if a\n specific SDL_BlendMode is supported, create a renderer and pass it to\n either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will\n return with an error if the blend mode is not supported.\n\n This list describes the support of custom blend modes for each renderer.\n All renderers support the four blend modes listed in the SDL_BlendMode\n enumeration.\n\n - **direct3d**: Supports all operations with all factors. However, some\n factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and\n `SDL_BLENDOPERATION_MAXIMUM`.\n - **direct3d11**: Same as Direct3D 9.\n - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all\n factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly here.\n - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,\n `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`\n operations with all factors.\n - **psp**: No custom blend mode support.\n - **software**: No custom blend mode support.\n\n Some renderers do not provide an alpha component for the default render\n target. The `SDL_BLENDFACTOR_DST_ALPHA` and\n `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this\n case.\n\n **Parameter:** srcColorFactor the SDL_BlendFactor applied to the red, green, and\n blue components of the source pixels.\n **Parameter:** dstColorFactor the SDL_BlendFactor applied to the red, green, and\n blue components of the destination pixels.\n **Parameter:** colorOperation the SDL_BlendOperation used to combine the red,\n green, and blue components of the source and\n destination pixels.\n **Parameter:** srcAlphaFactor the SDL_BlendFactor applied to the alpha component of\n the source pixels.\n **Parameter:** dstAlphaFactor the SDL_BlendFactor applied to the alpha component of\n the destination pixels.\n **Parameter:** alphaOperation the SDL_BlendOperation used to combine the alpha\n component of the source and destination pixels.\n **Returns:** an SDL_BlendMode that represents the chosen factors and\n operations.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderDrawBlendMode\n **See Also:** SDL_GetRenderDrawBlendMode\n **See Also:** SDL_SetTextureBlendMode\n **See Also:** SDL_GetTextureBlendMode\n"]
5149 pub fn SDL_ComposeCustomBlendMode(
5150 srcColorFactor: SDL_BlendFactor,
5151 dstColorFactor: SDL_BlendFactor,
5152 colorOperation: SDL_BlendOperation,
5153 srcAlphaFactor: SDL_BlendFactor,
5154 dstAlphaFactor: SDL_BlendFactor,
5155 alphaOperation: SDL_BlendOperation,
5156 ) -> SDL_BlendMode;
5157}
5158impl SDL_PixelType {
5159 pub const SDL_PIXELTYPE_UNKNOWN: SDL_PixelType = SDL_PixelType(0);
5160 pub const SDL_PIXELTYPE_INDEX1: SDL_PixelType = SDL_PixelType(1);
5161 pub const SDL_PIXELTYPE_INDEX4: SDL_PixelType = SDL_PixelType(2);
5162 pub const SDL_PIXELTYPE_INDEX8: SDL_PixelType = SDL_PixelType(3);
5163 pub const SDL_PIXELTYPE_PACKED8: SDL_PixelType = SDL_PixelType(4);
5164 pub const SDL_PIXELTYPE_PACKED16: SDL_PixelType = SDL_PixelType(5);
5165 pub const SDL_PIXELTYPE_PACKED32: SDL_PixelType = SDL_PixelType(6);
5166 pub const SDL_PIXELTYPE_ARRAYU8: SDL_PixelType = SDL_PixelType(7);
5167 pub const SDL_PIXELTYPE_ARRAYU16: SDL_PixelType = SDL_PixelType(8);
5168 pub const SDL_PIXELTYPE_ARRAYU32: SDL_PixelType = SDL_PixelType(9);
5169 pub const SDL_PIXELTYPE_ARRAYF16: SDL_PixelType = SDL_PixelType(10);
5170 pub const SDL_PIXELTYPE_ARRAYF32: SDL_PixelType = SDL_PixelType(11);
5171 pub const SDL_PIXELTYPE_INDEX2: SDL_PixelType = SDL_PixelType(12);
5172}
5173#[repr(transparent)]
5174#[doc = " Pixel type.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5175#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5176pub struct SDL_PixelType(pub core::ffi::c_uint);
5177impl SDL_BitmapOrder {
5178 pub const SDL_BITMAPORDER_NONE: SDL_BitmapOrder = SDL_BitmapOrder(0);
5179 pub const SDL_BITMAPORDER_4321: SDL_BitmapOrder = SDL_BitmapOrder(1);
5180 pub const SDL_BITMAPORDER_1234: SDL_BitmapOrder = SDL_BitmapOrder(2);
5181}
5182#[repr(transparent)]
5183#[doc = " Bitmap pixel order, high bit -> low bit.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5184#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5185pub struct SDL_BitmapOrder(pub core::ffi::c_uint);
5186impl SDL_PackedOrder {
5187 pub const SDL_PACKEDORDER_NONE: SDL_PackedOrder = SDL_PackedOrder(0);
5188 pub const SDL_PACKEDORDER_XRGB: SDL_PackedOrder = SDL_PackedOrder(1);
5189 pub const SDL_PACKEDORDER_RGBX: SDL_PackedOrder = SDL_PackedOrder(2);
5190 pub const SDL_PACKEDORDER_ARGB: SDL_PackedOrder = SDL_PackedOrder(3);
5191 pub const SDL_PACKEDORDER_RGBA: SDL_PackedOrder = SDL_PackedOrder(4);
5192 pub const SDL_PACKEDORDER_XBGR: SDL_PackedOrder = SDL_PackedOrder(5);
5193 pub const SDL_PACKEDORDER_BGRX: SDL_PackedOrder = SDL_PackedOrder(6);
5194 pub const SDL_PACKEDORDER_ABGR: SDL_PackedOrder = SDL_PackedOrder(7);
5195 pub const SDL_PACKEDORDER_BGRA: SDL_PackedOrder = SDL_PackedOrder(8);
5196}
5197#[repr(transparent)]
5198#[doc = " Packed component order, high bit -> low bit.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5199#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5200pub struct SDL_PackedOrder(pub core::ffi::c_uint);
5201impl SDL_ArrayOrder {
5202 pub const SDL_ARRAYORDER_NONE: SDL_ArrayOrder = SDL_ArrayOrder(0);
5203 pub const SDL_ARRAYORDER_RGB: SDL_ArrayOrder = SDL_ArrayOrder(1);
5204 pub const SDL_ARRAYORDER_RGBA: SDL_ArrayOrder = SDL_ArrayOrder(2);
5205 pub const SDL_ARRAYORDER_ARGB: SDL_ArrayOrder = SDL_ArrayOrder(3);
5206 pub const SDL_ARRAYORDER_BGR: SDL_ArrayOrder = SDL_ArrayOrder(4);
5207 pub const SDL_ARRAYORDER_BGRA: SDL_ArrayOrder = SDL_ArrayOrder(5);
5208 pub const SDL_ARRAYORDER_ABGR: SDL_ArrayOrder = SDL_ArrayOrder(6);
5209}
5210#[repr(transparent)]
5211#[doc = " Array component order, low byte -> high byte.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5212#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5213pub struct SDL_ArrayOrder(pub core::ffi::c_uint);
5214impl SDL_PackedLayout {
5215 pub const SDL_PACKEDLAYOUT_NONE: SDL_PackedLayout = SDL_PackedLayout(0);
5216 pub const SDL_PACKEDLAYOUT_332: SDL_PackedLayout = SDL_PackedLayout(1);
5217 pub const SDL_PACKEDLAYOUT_4444: SDL_PackedLayout = SDL_PackedLayout(2);
5218 pub const SDL_PACKEDLAYOUT_1555: SDL_PackedLayout = SDL_PackedLayout(3);
5219 pub const SDL_PACKEDLAYOUT_5551: SDL_PackedLayout = SDL_PackedLayout(4);
5220 pub const SDL_PACKEDLAYOUT_565: SDL_PackedLayout = SDL_PackedLayout(5);
5221 pub const SDL_PACKEDLAYOUT_8888: SDL_PackedLayout = SDL_PackedLayout(6);
5222 pub const SDL_PACKEDLAYOUT_2101010: SDL_PackedLayout = SDL_PackedLayout(7);
5223 pub const SDL_PACKEDLAYOUT_1010102: SDL_PackedLayout = SDL_PackedLayout(8);
5224}
5225#[repr(transparent)]
5226#[doc = " Packed component layout.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5227#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5228pub struct SDL_PackedLayout(pub core::ffi::c_uint);
5229impl SDL_PixelFormat {
5230 pub const SDL_PIXELFORMAT_UNKNOWN: SDL_PixelFormat = SDL_PixelFormat(0);
5231 pub const SDL_PIXELFORMAT_INDEX1LSB: SDL_PixelFormat = SDL_PixelFormat(286261504);
5232 pub const SDL_PIXELFORMAT_INDEX1MSB: SDL_PixelFormat = SDL_PixelFormat(287310080);
5233 pub const SDL_PIXELFORMAT_INDEX2LSB: SDL_PixelFormat = SDL_PixelFormat(470811136);
5234 pub const SDL_PIXELFORMAT_INDEX2MSB: SDL_PixelFormat = SDL_PixelFormat(471859712);
5235 pub const SDL_PIXELFORMAT_INDEX4LSB: SDL_PixelFormat = SDL_PixelFormat(303039488);
5236 pub const SDL_PIXELFORMAT_INDEX4MSB: SDL_PixelFormat = SDL_PixelFormat(304088064);
5237 pub const SDL_PIXELFORMAT_INDEX8: SDL_PixelFormat = SDL_PixelFormat(318769153);
5238 pub const SDL_PIXELFORMAT_RGB332: SDL_PixelFormat = SDL_PixelFormat(336660481);
5239 pub const SDL_PIXELFORMAT_XRGB4444: SDL_PixelFormat = SDL_PixelFormat(353504258);
5240 pub const SDL_PIXELFORMAT_XBGR4444: SDL_PixelFormat = SDL_PixelFormat(357698562);
5241 pub const SDL_PIXELFORMAT_XRGB1555: SDL_PixelFormat = SDL_PixelFormat(353570562);
5242 pub const SDL_PIXELFORMAT_XBGR1555: SDL_PixelFormat = SDL_PixelFormat(357764866);
5243 pub const SDL_PIXELFORMAT_ARGB4444: SDL_PixelFormat = SDL_PixelFormat(355602434);
5244 pub const SDL_PIXELFORMAT_RGBA4444: SDL_PixelFormat = SDL_PixelFormat(356651010);
5245 pub const SDL_PIXELFORMAT_ABGR4444: SDL_PixelFormat = SDL_PixelFormat(359796738);
5246 pub const SDL_PIXELFORMAT_BGRA4444: SDL_PixelFormat = SDL_PixelFormat(360845314);
5247 pub const SDL_PIXELFORMAT_ARGB1555: SDL_PixelFormat = SDL_PixelFormat(355667970);
5248 pub const SDL_PIXELFORMAT_RGBA5551: SDL_PixelFormat = SDL_PixelFormat(356782082);
5249 pub const SDL_PIXELFORMAT_ABGR1555: SDL_PixelFormat = SDL_PixelFormat(359862274);
5250 pub const SDL_PIXELFORMAT_BGRA5551: SDL_PixelFormat = SDL_PixelFormat(360976386);
5251 pub const SDL_PIXELFORMAT_RGB565: SDL_PixelFormat = SDL_PixelFormat(353701890);
5252 pub const SDL_PIXELFORMAT_BGR565: SDL_PixelFormat = SDL_PixelFormat(357896194);
5253 pub const SDL_PIXELFORMAT_RGB24: SDL_PixelFormat = SDL_PixelFormat(386930691);
5254 pub const SDL_PIXELFORMAT_BGR24: SDL_PixelFormat = SDL_PixelFormat(390076419);
5255 pub const SDL_PIXELFORMAT_XRGB8888: SDL_PixelFormat = SDL_PixelFormat(370546692);
5256 pub const SDL_PIXELFORMAT_RGBX8888: SDL_PixelFormat = SDL_PixelFormat(371595268);
5257 pub const SDL_PIXELFORMAT_XBGR8888: SDL_PixelFormat = SDL_PixelFormat(374740996);
5258 pub const SDL_PIXELFORMAT_BGRX8888: SDL_PixelFormat = SDL_PixelFormat(375789572);
5259 pub const SDL_PIXELFORMAT_ARGB8888: SDL_PixelFormat = SDL_PixelFormat(372645892);
5260 pub const SDL_PIXELFORMAT_RGBA8888: SDL_PixelFormat = SDL_PixelFormat(373694468);
5261 pub const SDL_PIXELFORMAT_ABGR8888: SDL_PixelFormat = SDL_PixelFormat(376840196);
5262 pub const SDL_PIXELFORMAT_BGRA8888: SDL_PixelFormat = SDL_PixelFormat(377888772);
5263 pub const SDL_PIXELFORMAT_XRGB2101010: SDL_PixelFormat = SDL_PixelFormat(370614276);
5264 pub const SDL_PIXELFORMAT_XBGR2101010: SDL_PixelFormat = SDL_PixelFormat(374808580);
5265 pub const SDL_PIXELFORMAT_ARGB2101010: SDL_PixelFormat = SDL_PixelFormat(372711428);
5266 pub const SDL_PIXELFORMAT_ABGR2101010: SDL_PixelFormat = SDL_PixelFormat(376905732);
5267 pub const SDL_PIXELFORMAT_RGB48: SDL_PixelFormat = SDL_PixelFormat(403714054);
5268 pub const SDL_PIXELFORMAT_BGR48: SDL_PixelFormat = SDL_PixelFormat(406859782);
5269 pub const SDL_PIXELFORMAT_RGBA64: SDL_PixelFormat = SDL_PixelFormat(404766728);
5270 pub const SDL_PIXELFORMAT_ARGB64: SDL_PixelFormat = SDL_PixelFormat(405815304);
5271 pub const SDL_PIXELFORMAT_BGRA64: SDL_PixelFormat = SDL_PixelFormat(407912456);
5272 pub const SDL_PIXELFORMAT_ABGR64: SDL_PixelFormat = SDL_PixelFormat(408961032);
5273 pub const SDL_PIXELFORMAT_RGB48_FLOAT: SDL_PixelFormat = SDL_PixelFormat(437268486);
5274 pub const SDL_PIXELFORMAT_BGR48_FLOAT: SDL_PixelFormat = SDL_PixelFormat(440414214);
5275 pub const SDL_PIXELFORMAT_RGBA64_FLOAT: SDL_PixelFormat = SDL_PixelFormat(438321160);
5276 pub const SDL_PIXELFORMAT_ARGB64_FLOAT: SDL_PixelFormat = SDL_PixelFormat(439369736);
5277 pub const SDL_PIXELFORMAT_BGRA64_FLOAT: SDL_PixelFormat = SDL_PixelFormat(441466888);
5278 pub const SDL_PIXELFORMAT_ABGR64_FLOAT: SDL_PixelFormat = SDL_PixelFormat(442515464);
5279 pub const SDL_PIXELFORMAT_RGB96_FLOAT: SDL_PixelFormat = SDL_PixelFormat(454057996);
5280 pub const SDL_PIXELFORMAT_BGR96_FLOAT: SDL_PixelFormat = SDL_PixelFormat(457203724);
5281 pub const SDL_PIXELFORMAT_RGBA128_FLOAT: SDL_PixelFormat = SDL_PixelFormat(455114768);
5282 pub const SDL_PIXELFORMAT_ARGB128_FLOAT: SDL_PixelFormat = SDL_PixelFormat(456163344);
5283 pub const SDL_PIXELFORMAT_BGRA128_FLOAT: SDL_PixelFormat = SDL_PixelFormat(458260496);
5284 pub const SDL_PIXELFORMAT_ABGR128_FLOAT: SDL_PixelFormat = SDL_PixelFormat(459309072);
5285 #[doc = "< Planar mode: Y + V + U (3 planes)\n"]
5286 pub const SDL_PIXELFORMAT_YV12: SDL_PixelFormat = SDL_PixelFormat(842094169);
5287 #[doc = "< Planar mode: Y + U + V (3 planes)\n"]
5288 pub const SDL_PIXELFORMAT_IYUV: SDL_PixelFormat = SDL_PixelFormat(1448433993);
5289 #[doc = "< Packed mode: Y0+U0+Y1+V0 (1 plane)\n"]
5290 pub const SDL_PIXELFORMAT_YUY2: SDL_PixelFormat = SDL_PixelFormat(844715353);
5291 #[doc = "< Packed mode: U0+Y0+V0+Y1 (1 plane)\n"]
5292 pub const SDL_PIXELFORMAT_UYVY: SDL_PixelFormat = SDL_PixelFormat(1498831189);
5293 #[doc = "< Packed mode: Y0+V0+Y1+U0 (1 plane)\n"]
5294 pub const SDL_PIXELFORMAT_YVYU: SDL_PixelFormat = SDL_PixelFormat(1431918169);
5295 #[doc = "< Planar mode: Y + U/V interleaved (2 planes)\n"]
5296 pub const SDL_PIXELFORMAT_NV12: SDL_PixelFormat = SDL_PixelFormat(842094158);
5297 #[doc = "< Planar mode: Y + V/U interleaved (2 planes)\n"]
5298 pub const SDL_PIXELFORMAT_NV21: SDL_PixelFormat = SDL_PixelFormat(825382478);
5299 #[doc = "< Planar mode: Y + U/V interleaved (2 planes)\n"]
5300 pub const SDL_PIXELFORMAT_P010: SDL_PixelFormat = SDL_PixelFormat(808530000);
5301 #[doc = "< Android video texture format\n"]
5302 pub const SDL_PIXELFORMAT_EXTERNAL_OES: SDL_PixelFormat = SDL_PixelFormat(542328143);
5303 #[doc = "< Motion JPEG\n"]
5304 pub const SDL_PIXELFORMAT_MJPG: SDL_PixelFormat = SDL_PixelFormat(1196444237);
5305 pub const SDL_PIXELFORMAT_RGBA32: SDL_PixelFormat = SDL_PixelFormat(376840196);
5306 pub const SDL_PIXELFORMAT_ARGB32: SDL_PixelFormat = SDL_PixelFormat(377888772);
5307 pub const SDL_PIXELFORMAT_BGRA32: SDL_PixelFormat = SDL_PixelFormat(372645892);
5308 pub const SDL_PIXELFORMAT_ABGR32: SDL_PixelFormat = SDL_PixelFormat(373694468);
5309 pub const SDL_PIXELFORMAT_RGBX32: SDL_PixelFormat = SDL_PixelFormat(374740996);
5310 pub const SDL_PIXELFORMAT_XRGB32: SDL_PixelFormat = SDL_PixelFormat(375789572);
5311 pub const SDL_PIXELFORMAT_BGRX32: SDL_PixelFormat = SDL_PixelFormat(370546692);
5312 pub const SDL_PIXELFORMAT_XBGR32: SDL_PixelFormat = SDL_PixelFormat(371595268);
5313}
5314#[repr(transparent)]
5315#[doc = " Pixel format.\n\n SDL's pixel formats have the following naming convention:\n\n - Names with a list of components and a single bit count, such as RGB24 and\n ABGR32, define a platform-independent encoding into bytes in the order\n specified. For example, in RGB24 data, each pixel is encoded in 3 bytes\n (red, green, blue) in that order, and in ABGR32 data, each pixel is\n encoded in 4 bytes (alpha, blue, green, red) in that order. Use these\n names if the property of a format that is important to you is the order\n of the bytes in memory or on disk.\n - Names with a bit count per component, such as ARGB8888 and XRGB1555, are\n \"packed\" into an appropriately-sized integer in the platform's native\n endianness. For example, ARGB8888 is a sequence of 32-bit integers; in\n each integer, the most significant bits are alpha, and the least\n significant bits are blue. On a little-endian CPU such as x86, the least\n significant bits of each integer are arranged first in memory, but on a\n big-endian CPU such as s390x, the most significant bits are arranged\n first. Use these names if the property of a format that is important to\n you is the meaning of each bit position within a native-endianness\n integer.\n - In indexed formats such as INDEX4LSB, each pixel is represented by\n encoding an index into the palette into the indicated number of bits,\n with multiple pixels packed into each byte if appropriate. In LSB\n formats, the first (leftmost) pixel is stored in the least-significant\n bits of the byte; in MSB formats, it's stored in the most-significant\n bits. INDEX8 does not need LSB/MSB variants, because each pixel exactly\n fills one byte.\n\n The 32-bit byte-array encodings such as RGBA32 are aliases for the\n appropriate 8888 encoding for the current platform. For example, RGBA32 is\n an alias for ABGR8888 on little-endian CPUs like x86, or an alias for\n RGBA8888 on big-endian CPUs.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5316#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5317pub struct SDL_PixelFormat(pub core::ffi::c_uint);
5318impl SDL_ColorType {
5319 pub const SDL_COLOR_TYPE_UNKNOWN: SDL_ColorType = SDL_ColorType(0);
5320 pub const SDL_COLOR_TYPE_RGB: SDL_ColorType = SDL_ColorType(1);
5321 pub const SDL_COLOR_TYPE_YCBCR: SDL_ColorType = SDL_ColorType(2);
5322}
5323#[repr(transparent)]
5324#[doc = " Colorspace color type.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5325#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5326pub struct SDL_ColorType(pub core::ffi::c_uint);
5327impl SDL_ColorRange {
5328 pub const SDL_COLOR_RANGE_UNKNOWN: SDL_ColorRange = SDL_ColorRange(0);
5329 #[doc = "< Narrow range, e.g. 16-235 for 8-bit RGB and luma, and 16-240 for 8-bit chroma\n"]
5330 pub const SDL_COLOR_RANGE_LIMITED: SDL_ColorRange = SDL_ColorRange(1);
5331 #[doc = "< Full range, e.g. 0-255 for 8-bit RGB and luma, and 1-255 for 8-bit chroma\n"]
5332 pub const SDL_COLOR_RANGE_FULL: SDL_ColorRange = SDL_ColorRange(2);
5333}
5334#[repr(transparent)]
5335#[doc = " Colorspace color range, as described by\n https://www.itu.int/rec/R-REC-BT.2100-2-201807-I/en\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5336#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5337pub struct SDL_ColorRange(pub core::ffi::c_uint);
5338impl SDL_ColorPrimaries {
5339 pub const SDL_COLOR_PRIMARIES_UNKNOWN: SDL_ColorPrimaries = SDL_ColorPrimaries(0);
5340 #[doc = "< ITU-R BT.709-6\n"]
5341 pub const SDL_COLOR_PRIMARIES_BT709: SDL_ColorPrimaries = SDL_ColorPrimaries(1);
5342 pub const SDL_COLOR_PRIMARIES_UNSPECIFIED: SDL_ColorPrimaries = SDL_ColorPrimaries(2);
5343 #[doc = "< ITU-R BT.470-6 System M\n"]
5344 pub const SDL_COLOR_PRIMARIES_BT470M: SDL_ColorPrimaries = SDL_ColorPrimaries(4);
5345 #[doc = "< ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625\n"]
5346 pub const SDL_COLOR_PRIMARIES_BT470BG: SDL_ColorPrimaries = SDL_ColorPrimaries(5);
5347 #[doc = "< ITU-R BT.601-7 525, SMPTE 170M\n"]
5348 pub const SDL_COLOR_PRIMARIES_BT601: SDL_ColorPrimaries = SDL_ColorPrimaries(6);
5349 #[doc = "< SMPTE 240M, functionally the same as SDL_COLOR_PRIMARIES_BT601\n"]
5350 pub const SDL_COLOR_PRIMARIES_SMPTE240: SDL_ColorPrimaries = SDL_ColorPrimaries(7);
5351 #[doc = "< Generic film (color filters using Illuminant C)\n"]
5352 pub const SDL_COLOR_PRIMARIES_GENERIC_FILM: SDL_ColorPrimaries = SDL_ColorPrimaries(8);
5353 #[doc = "< ITU-R BT.2020-2 / ITU-R BT.2100-0\n"]
5354 pub const SDL_COLOR_PRIMARIES_BT2020: SDL_ColorPrimaries = SDL_ColorPrimaries(9);
5355 #[doc = "< SMPTE ST 428-1\n"]
5356 pub const SDL_COLOR_PRIMARIES_XYZ: SDL_ColorPrimaries = SDL_ColorPrimaries(10);
5357 #[doc = "< SMPTE RP 431-2\n"]
5358 pub const SDL_COLOR_PRIMARIES_SMPTE431: SDL_ColorPrimaries = SDL_ColorPrimaries(11);
5359 #[doc = "< SMPTE EG 432-1 / DCI P3\n"]
5360 pub const SDL_COLOR_PRIMARIES_SMPTE432: SDL_ColorPrimaries = SDL_ColorPrimaries(12);
5361 #[doc = "< EBU Tech. 3213-E\n"]
5362 pub const SDL_COLOR_PRIMARIES_EBU3213: SDL_ColorPrimaries = SDL_ColorPrimaries(22);
5363 pub const SDL_COLOR_PRIMARIES_CUSTOM: SDL_ColorPrimaries = SDL_ColorPrimaries(31);
5364}
5365#[repr(transparent)]
5366#[doc = " Colorspace color primaries, as described by\n https://www.itu.int/rec/T-REC-H.273-201612-S/en\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5367#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5368pub struct SDL_ColorPrimaries(pub core::ffi::c_uint);
5369impl SDL_TransferCharacteristics {
5370 pub const SDL_TRANSFER_CHARACTERISTICS_UNKNOWN: SDL_TransferCharacteristics =
5371 SDL_TransferCharacteristics(0);
5372 #[doc = "< Rec. ITU-R BT.709-6 / ITU-R BT1361\n"]
5373 pub const SDL_TRANSFER_CHARACTERISTICS_BT709: SDL_TransferCharacteristics =
5374 SDL_TransferCharacteristics(1);
5375 pub const SDL_TRANSFER_CHARACTERISTICS_UNSPECIFIED: SDL_TransferCharacteristics =
5376 SDL_TransferCharacteristics(2);
5377 #[doc = "< ITU-R BT.470-6 System M / ITU-R BT1700 625 PAL & SECAM\n"]
5378 pub const SDL_TRANSFER_CHARACTERISTICS_GAMMA22: SDL_TransferCharacteristics =
5379 SDL_TransferCharacteristics(4);
5380 #[doc = "< ITU-R BT.470-6 System B, G\n"]
5381 pub const SDL_TRANSFER_CHARACTERISTICS_GAMMA28: SDL_TransferCharacteristics =
5382 SDL_TransferCharacteristics(5);
5383 #[doc = "< SMPTE ST 170M / ITU-R BT.601-7 525 or 625\n"]
5384 pub const SDL_TRANSFER_CHARACTERISTICS_BT601: SDL_TransferCharacteristics =
5385 SDL_TransferCharacteristics(6);
5386 #[doc = "< SMPTE ST 240M\n"]
5387 pub const SDL_TRANSFER_CHARACTERISTICS_SMPTE240: SDL_TransferCharacteristics =
5388 SDL_TransferCharacteristics(7);
5389 pub const SDL_TRANSFER_CHARACTERISTICS_LINEAR: SDL_TransferCharacteristics =
5390 SDL_TransferCharacteristics(8);
5391 pub const SDL_TRANSFER_CHARACTERISTICS_LOG100: SDL_TransferCharacteristics =
5392 SDL_TransferCharacteristics(9);
5393 pub const SDL_TRANSFER_CHARACTERISTICS_LOG100_SQRT10: SDL_TransferCharacteristics =
5394 SDL_TransferCharacteristics(10);
5395 #[doc = "< IEC 61966-2-4\n"]
5396 pub const SDL_TRANSFER_CHARACTERISTICS_IEC61966: SDL_TransferCharacteristics =
5397 SDL_TransferCharacteristics(11);
5398 #[doc = "< ITU-R BT1361 Extended Colour Gamut\n"]
5399 pub const SDL_TRANSFER_CHARACTERISTICS_BT1361: SDL_TransferCharacteristics =
5400 SDL_TransferCharacteristics(12);
5401 #[doc = "< IEC 61966-2-1 (sRGB or sYCC)\n"]
5402 pub const SDL_TRANSFER_CHARACTERISTICS_SRGB: SDL_TransferCharacteristics =
5403 SDL_TransferCharacteristics(13);
5404 #[doc = "< ITU-R BT2020 for 10-bit system\n"]
5405 pub const SDL_TRANSFER_CHARACTERISTICS_BT2020_10BIT: SDL_TransferCharacteristics =
5406 SDL_TransferCharacteristics(14);
5407 #[doc = "< ITU-R BT2020 for 12-bit system\n"]
5408 pub const SDL_TRANSFER_CHARACTERISTICS_BT2020_12BIT: SDL_TransferCharacteristics =
5409 SDL_TransferCharacteristics(15);
5410 #[doc = "< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems\n"]
5411 pub const SDL_TRANSFER_CHARACTERISTICS_PQ: SDL_TransferCharacteristics =
5412 SDL_TransferCharacteristics(16);
5413 #[doc = "< SMPTE ST 428-1\n"]
5414 pub const SDL_TRANSFER_CHARACTERISTICS_SMPTE428: SDL_TransferCharacteristics =
5415 SDL_TransferCharacteristics(17);
5416 #[doc = "< ARIB STD-B67, known as \"hybrid log-gamma\" (HLG)\n"]
5417 pub const SDL_TRANSFER_CHARACTERISTICS_HLG: SDL_TransferCharacteristics =
5418 SDL_TransferCharacteristics(18);
5419 pub const SDL_TRANSFER_CHARACTERISTICS_CUSTOM: SDL_TransferCharacteristics =
5420 SDL_TransferCharacteristics(31);
5421}
5422#[repr(transparent)]
5423#[doc = " Colorspace transfer characteristics.\n\n These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5424#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5425pub struct SDL_TransferCharacteristics(pub core::ffi::c_uint);
5426impl SDL_MatrixCoefficients {
5427 pub const SDL_MATRIX_COEFFICIENTS_IDENTITY: SDL_MatrixCoefficients = SDL_MatrixCoefficients(0);
5428 #[doc = "< ITU-R BT.709-6\n"]
5429 pub const SDL_MATRIX_COEFFICIENTS_BT709: SDL_MatrixCoefficients = SDL_MatrixCoefficients(1);
5430 pub const SDL_MATRIX_COEFFICIENTS_UNSPECIFIED: SDL_MatrixCoefficients =
5431 SDL_MatrixCoefficients(2);
5432 #[doc = "< US FCC Title 47\n"]
5433 pub const SDL_MATRIX_COEFFICIENTS_FCC: SDL_MatrixCoefficients = SDL_MatrixCoefficients(4);
5434 #[doc = "< ITU-R BT.470-6 System B, G / ITU-R BT.601-7 625, functionally the same as SDL_MATRIX_COEFFICIENTS_BT601\n"]
5435 pub const SDL_MATRIX_COEFFICIENTS_BT470BG: SDL_MatrixCoefficients = SDL_MatrixCoefficients(5);
5436 #[doc = "< ITU-R BT.601-7 525\n"]
5437 pub const SDL_MATRIX_COEFFICIENTS_BT601: SDL_MatrixCoefficients = SDL_MatrixCoefficients(6);
5438 #[doc = "< SMPTE 240M\n"]
5439 pub const SDL_MATRIX_COEFFICIENTS_SMPTE240: SDL_MatrixCoefficients = SDL_MatrixCoefficients(7);
5440 pub const SDL_MATRIX_COEFFICIENTS_YCGCO: SDL_MatrixCoefficients = SDL_MatrixCoefficients(8);
5441 #[doc = "< ITU-R BT.2020-2 non-constant luminance\n"]
5442 pub const SDL_MATRIX_COEFFICIENTS_BT2020_NCL: SDL_MatrixCoefficients =
5443 SDL_MatrixCoefficients(9);
5444 #[doc = "< ITU-R BT.2020-2 constant luminance\n"]
5445 pub const SDL_MATRIX_COEFFICIENTS_BT2020_CL: SDL_MatrixCoefficients =
5446 SDL_MatrixCoefficients(10);
5447 #[doc = "< SMPTE ST 2085\n"]
5448 pub const SDL_MATRIX_COEFFICIENTS_SMPTE2085: SDL_MatrixCoefficients =
5449 SDL_MatrixCoefficients(11);
5450 pub const SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_NCL: SDL_MatrixCoefficients =
5451 SDL_MatrixCoefficients(12);
5452 pub const SDL_MATRIX_COEFFICIENTS_CHROMA_DERIVED_CL: SDL_MatrixCoefficients =
5453 SDL_MatrixCoefficients(13);
5454 #[doc = "< ITU-R BT.2100-0 ICTCP\n"]
5455 pub const SDL_MATRIX_COEFFICIENTS_ICTCP: SDL_MatrixCoefficients = SDL_MatrixCoefficients(14);
5456 pub const SDL_MATRIX_COEFFICIENTS_CUSTOM: SDL_MatrixCoefficients = SDL_MatrixCoefficients(31);
5457}
5458#[repr(transparent)]
5459#[doc = " Colorspace matrix coefficients.\n\n These are as described by https://www.itu.int/rec/T-REC-H.273-201612-S/en\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5460#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5461pub struct SDL_MatrixCoefficients(pub core::ffi::c_uint);
5462impl SDL_ChromaLocation {
5463 #[doc = "< RGB, no chroma sampling\n"]
5464 pub const SDL_CHROMA_LOCATION_NONE: SDL_ChromaLocation = SDL_ChromaLocation(0);
5465 #[doc = "< In MPEG-2, MPEG-4, and AVC, Cb and Cr are taken on midpoint of the left-edge of the 2x2 square. In other words, they have the same horizontal location as the top-left pixel, but is shifted one-half pixel down vertically.\n"]
5466 pub const SDL_CHROMA_LOCATION_LEFT: SDL_ChromaLocation = SDL_ChromaLocation(1);
5467 #[doc = "< In JPEG/JFIF, H.261, and MPEG-1, Cb and Cr are taken at the center of the 2x2 square. In other words, they are offset one-half pixel to the right and one-half pixel down compared to the top-left pixel.\n"]
5468 pub const SDL_CHROMA_LOCATION_CENTER: SDL_ChromaLocation = SDL_ChromaLocation(2);
5469 #[doc = "< In HEVC for BT.2020 and BT.2100 content (in particular on Blu-rays), Cb and Cr are sampled at the same location as the group's top-left Y pixel (\"co-sited\", \"co-located\").\n"]
5470 pub const SDL_CHROMA_LOCATION_TOPLEFT: SDL_ChromaLocation = SDL_ChromaLocation(3);
5471}
5472#[repr(transparent)]
5473#[doc = " Colorspace chroma sample location.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5474#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5475pub struct SDL_ChromaLocation(pub core::ffi::c_uint);
5476impl SDL_Colorspace {
5477 pub const SDL_COLORSPACE_UNKNOWN: SDL_Colorspace = SDL_Colorspace(0);
5478 #[doc = "< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709\n"]
5479 pub const SDL_COLORSPACE_SRGB: SDL_Colorspace = SDL_Colorspace(301991328);
5480 #[doc = "< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709\n"]
5481 pub const SDL_COLORSPACE_SRGB_LINEAR: SDL_Colorspace = SDL_Colorspace(301991168);
5482 #[doc = "< Equivalent to DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020\n"]
5483 pub const SDL_COLORSPACE_HDR10: SDL_Colorspace = SDL_Colorspace(301999616);
5484 #[doc = "< Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601\n"]
5485 pub const SDL_COLORSPACE_JPEG: SDL_Colorspace = SDL_Colorspace(570426566);
5486 #[doc = "< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601\n"]
5487 pub const SDL_COLORSPACE_BT601_LIMITED: SDL_Colorspace = SDL_Colorspace(554703046);
5488 #[doc = "< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601\n"]
5489 pub const SDL_COLORSPACE_BT601_FULL: SDL_Colorspace = SDL_Colorspace(571480262);
5490 #[doc = "< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709\n"]
5491 pub const SDL_COLORSPACE_BT709_LIMITED: SDL_Colorspace = SDL_Colorspace(554697761);
5492 #[doc = "< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709\n"]
5493 pub const SDL_COLORSPACE_BT709_FULL: SDL_Colorspace = SDL_Colorspace(571474977);
5494 #[doc = "< Equivalent to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020\n"]
5495 pub const SDL_COLORSPACE_BT2020_LIMITED: SDL_Colorspace = SDL_Colorspace(554706441);
5496 #[doc = "< Equivalent to DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020\n"]
5497 pub const SDL_COLORSPACE_BT2020_FULL: SDL_Colorspace = SDL_Colorspace(571483657);
5498 #[doc = "< The default colorspace for RGB surfaces if no colorspace is specified\n"]
5499 pub const SDL_COLORSPACE_RGB_DEFAULT: SDL_Colorspace = SDL_Colorspace(301991328);
5500 #[doc = "< The default colorspace for YUV surfaces if no colorspace is specified\n"]
5501 pub const SDL_COLORSPACE_YUV_DEFAULT: SDL_Colorspace = SDL_Colorspace(554703046);
5502}
5503#[repr(transparent)]
5504#[doc = " Colorspace definitions.\n\n Since similar colorspaces may vary in their details (matrix, transfer\n function, etc.), this is not an exhaustive list, but rather a\n representative sample of the kinds of colorspaces supported in SDL.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_ColorPrimaries\n **See Also:** SDL_ColorRange\n **See Also:** SDL_ColorType\n **See Also:** SDL_MatrixCoefficients\n **See Also:** SDL_TransferCharacteristics\n"]
5505#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5506pub struct SDL_Colorspace(pub core::ffi::c_uint);
5507#[doc = " A structure that represents a color as RGBA components.\n\n The bits of this structure can be directly reinterpreted as an\n integer-packed color which uses the SDL_PIXELFORMAT_RGBA32 format\n (SDL_PIXELFORMAT_ABGR8888 on little-endian systems and\n SDL_PIXELFORMAT_RGBA8888 on big-endian systems).\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
5508#[repr(C)]
5509#[derive(Debug, Default, Copy, Clone, Hash)]
5510pub struct SDL_Color {
5511 pub r: Uint8,
5512 pub g: Uint8,
5513 pub b: Uint8,
5514 pub a: Uint8,
5515}
5516#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5517const _: () = {
5518 ["Size of SDL_Color"][::core::mem::size_of::<SDL_Color>() - 4usize];
5519 ["Alignment of SDL_Color"][::core::mem::align_of::<SDL_Color>() - 1usize];
5520 ["Offset of field: SDL_Color::r"][::core::mem::offset_of!(SDL_Color, r) - 0usize];
5521 ["Offset of field: SDL_Color::g"][::core::mem::offset_of!(SDL_Color, g) - 1usize];
5522 ["Offset of field: SDL_Color::b"][::core::mem::offset_of!(SDL_Color, b) - 2usize];
5523 ["Offset of field: SDL_Color::a"][::core::mem::offset_of!(SDL_Color, a) - 3usize];
5524};
5525#[doc = " The bits of this structure can be directly reinterpreted as a float-packed\n color which uses the SDL_PIXELFORMAT_RGBA128_FLOAT format\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
5526#[repr(C)]
5527#[derive(Debug, Default, Copy, Clone)]
5528pub struct SDL_FColor {
5529 pub r: f32,
5530 pub g: f32,
5531 pub b: f32,
5532 pub a: f32,
5533}
5534#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5535const _: () = {
5536 ["Size of SDL_FColor"][::core::mem::size_of::<SDL_FColor>() - 16usize];
5537 ["Alignment of SDL_FColor"][::core::mem::align_of::<SDL_FColor>() - 4usize];
5538 ["Offset of field: SDL_FColor::r"][::core::mem::offset_of!(SDL_FColor, r) - 0usize];
5539 ["Offset of field: SDL_FColor::g"][::core::mem::offset_of!(SDL_FColor, g) - 4usize];
5540 ["Offset of field: SDL_FColor::b"][::core::mem::offset_of!(SDL_FColor, b) - 8usize];
5541 ["Offset of field: SDL_FColor::a"][::core::mem::offset_of!(SDL_FColor, a) - 12usize];
5542};
5543#[doc = " A set of indexed colors representing a palette.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_SetPaletteColors\n"]
5544#[repr(C)]
5545#[derive(Debug, Copy, Clone, Hash)]
5546pub struct SDL_Palette {
5547 #[doc = "< number of elements in `colors`.\n"]
5548 pub ncolors: core::ffi::c_int,
5549 #[doc = "< an array of colors, `ncolors` long.\n"]
5550 pub colors: *mut SDL_Color,
5551 #[doc = "< internal use only, do not touch.\n"]
5552 pub version: Uint32,
5553 #[doc = "< internal use only, do not touch.\n"]
5554 pub refcount: core::ffi::c_int,
5555}
5556#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5557const _: () = {
5558 ["Size of SDL_Palette"][::core::mem::size_of::<SDL_Palette>() - 24usize];
5559 ["Alignment of SDL_Palette"][::core::mem::align_of::<SDL_Palette>() - 8usize];
5560 ["Offset of field: SDL_Palette::ncolors"]
5561 [::core::mem::offset_of!(SDL_Palette, ncolors) - 0usize];
5562 ["Offset of field: SDL_Palette::colors"][::core::mem::offset_of!(SDL_Palette, colors) - 8usize];
5563 ["Offset of field: SDL_Palette::version"]
5564 [::core::mem::offset_of!(SDL_Palette, version) - 16usize];
5565 ["Offset of field: SDL_Palette::refcount"]
5566 [::core::mem::offset_of!(SDL_Palette, refcount) - 20usize];
5567};
5568impl Default for SDL_Palette {
5569 fn default() -> Self {
5570 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
5571 unsafe {
5572 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5573 s.assume_init()
5574 }
5575 }
5576}
5577#[doc = " Details about the format of a pixel.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
5578#[repr(C)]
5579#[derive(Debug, Copy, Clone, Hash)]
5580pub struct SDL_PixelFormatDetails {
5581 pub format: SDL_PixelFormat,
5582 pub bits_per_pixel: Uint8,
5583 pub bytes_per_pixel: Uint8,
5584 pub padding: [Uint8; 2usize],
5585 pub Rmask: Uint32,
5586 pub Gmask: Uint32,
5587 pub Bmask: Uint32,
5588 pub Amask: Uint32,
5589 pub Rbits: Uint8,
5590 pub Gbits: Uint8,
5591 pub Bbits: Uint8,
5592 pub Abits: Uint8,
5593 pub Rshift: Uint8,
5594 pub Gshift: Uint8,
5595 pub Bshift: Uint8,
5596 pub Ashift: Uint8,
5597}
5598#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5599const _: () = {
5600 ["Size of SDL_PixelFormatDetails"][::core::mem::size_of::<SDL_PixelFormatDetails>() - 32usize];
5601 ["Alignment of SDL_PixelFormatDetails"]
5602 [::core::mem::align_of::<SDL_PixelFormatDetails>() - 4usize];
5603 ["Offset of field: SDL_PixelFormatDetails::format"]
5604 [::core::mem::offset_of!(SDL_PixelFormatDetails, format) - 0usize];
5605 ["Offset of field: SDL_PixelFormatDetails::bits_per_pixel"]
5606 [::core::mem::offset_of!(SDL_PixelFormatDetails, bits_per_pixel) - 4usize];
5607 ["Offset of field: SDL_PixelFormatDetails::bytes_per_pixel"]
5608 [::core::mem::offset_of!(SDL_PixelFormatDetails, bytes_per_pixel) - 5usize];
5609 ["Offset of field: SDL_PixelFormatDetails::padding"]
5610 [::core::mem::offset_of!(SDL_PixelFormatDetails, padding) - 6usize];
5611 ["Offset of field: SDL_PixelFormatDetails::Rmask"]
5612 [::core::mem::offset_of!(SDL_PixelFormatDetails, Rmask) - 8usize];
5613 ["Offset of field: SDL_PixelFormatDetails::Gmask"]
5614 [::core::mem::offset_of!(SDL_PixelFormatDetails, Gmask) - 12usize];
5615 ["Offset of field: SDL_PixelFormatDetails::Bmask"]
5616 [::core::mem::offset_of!(SDL_PixelFormatDetails, Bmask) - 16usize];
5617 ["Offset of field: SDL_PixelFormatDetails::Amask"]
5618 [::core::mem::offset_of!(SDL_PixelFormatDetails, Amask) - 20usize];
5619 ["Offset of field: SDL_PixelFormatDetails::Rbits"]
5620 [::core::mem::offset_of!(SDL_PixelFormatDetails, Rbits) - 24usize];
5621 ["Offset of field: SDL_PixelFormatDetails::Gbits"]
5622 [::core::mem::offset_of!(SDL_PixelFormatDetails, Gbits) - 25usize];
5623 ["Offset of field: SDL_PixelFormatDetails::Bbits"]
5624 [::core::mem::offset_of!(SDL_PixelFormatDetails, Bbits) - 26usize];
5625 ["Offset of field: SDL_PixelFormatDetails::Abits"]
5626 [::core::mem::offset_of!(SDL_PixelFormatDetails, Abits) - 27usize];
5627 ["Offset of field: SDL_PixelFormatDetails::Rshift"]
5628 [::core::mem::offset_of!(SDL_PixelFormatDetails, Rshift) - 28usize];
5629 ["Offset of field: SDL_PixelFormatDetails::Gshift"]
5630 [::core::mem::offset_of!(SDL_PixelFormatDetails, Gshift) - 29usize];
5631 ["Offset of field: SDL_PixelFormatDetails::Bshift"]
5632 [::core::mem::offset_of!(SDL_PixelFormatDetails, Bshift) - 30usize];
5633 ["Offset of field: SDL_PixelFormatDetails::Ashift"]
5634 [::core::mem::offset_of!(SDL_PixelFormatDetails, Ashift) - 31usize];
5635};
5636impl Default for SDL_PixelFormatDetails {
5637 fn default() -> Self {
5638 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
5639 unsafe {
5640 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5641 s.assume_init()
5642 }
5643 }
5644}
5645unsafe extern "C" {
5646 #[doc = " Get the human readable name of a pixel format.\n\n **Parameter:** format the pixel format to query.\n **Returns:** the human readable name of the specified pixel format or\n \"SDL_PIXELFORMAT_UNKNOWN\" if the format isn't recognized.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5647 pub fn SDL_GetPixelFormatName(format: SDL_PixelFormat) -> *const core::ffi::c_char;
5648}
5649unsafe extern "C" {
5650 #[doc = " Convert one of the enumerated pixel formats to a bpp value and RGBA masks.\n\n **Parameter:** format one of the SDL_PixelFormat values.\n **Parameter:** bpp a bits per pixel value; usually 15, 16, or 32.\n **Parameter:** Rmask a pointer filled in with the red mask for the format.\n **Parameter:** Gmask a pointer filled in with the green mask for the format.\n **Parameter:** Bmask a pointer filled in with the blue mask for the format.\n **Parameter:** Amask a pointer filled in with the alpha mask for the format.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPixelFormatForMasks\n"]
5651 pub fn SDL_GetMasksForPixelFormat(
5652 format: SDL_PixelFormat,
5653 bpp: *mut core::ffi::c_int,
5654 Rmask: *mut Uint32,
5655 Gmask: *mut Uint32,
5656 Bmask: *mut Uint32,
5657 Amask: *mut Uint32,
5658 ) -> bool;
5659}
5660unsafe extern "C" {
5661 #[doc = " Convert a bpp value and RGBA masks to an enumerated pixel format.\n\n This will return `SDL_PIXELFORMAT_UNKNOWN` if the conversion wasn't\n possible.\n\n **Parameter:** bpp a bits per pixel value; usually 15, 16, or 32.\n **Parameter:** Rmask the red mask for the format.\n **Parameter:** Gmask the green mask for the format.\n **Parameter:** Bmask the blue mask for the format.\n **Parameter:** Amask the alpha mask for the format.\n **Returns:** the SDL_PixelFormat value corresponding to the format masks, or\n SDL_PIXELFORMAT_UNKNOWN if there isn't a match.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMasksForPixelFormat\n"]
5662 pub fn SDL_GetPixelFormatForMasks(
5663 bpp: core::ffi::c_int,
5664 Rmask: Uint32,
5665 Gmask: Uint32,
5666 Bmask: Uint32,
5667 Amask: Uint32,
5668 ) -> SDL_PixelFormat;
5669}
5670unsafe extern "C" {
5671 #[doc = " Create an SDL_PixelFormatDetails structure corresponding to a pixel format.\n\n Returned structure may come from a shared global cache (i.e. not newly\n allocated), and hence should not be modified, especially the palette. Weird\n errors such as `Blit combination not supported` may occur.\n\n **Parameter:** format one of the SDL_PixelFormat values.\n **Returns:** a pointer to a SDL_PixelFormatDetails structure or NULL on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5672 pub fn SDL_GetPixelFormatDetails(format: SDL_PixelFormat) -> *const SDL_PixelFormatDetails;
5673}
5674unsafe extern "C" {
5675 #[doc = " Create a palette structure with the specified number of color entries.\n\n The palette entries are initialized to white.\n\n **Parameter:** ncolors represents the number of color entries in the color palette.\n **Returns:** a new SDL_Palette structure on success or NULL on failure (e.g. if\n there wasn't enough memory); call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyPalette\n **See Also:** SDL_SetPaletteColors\n **See Also:** SDL_SetSurfacePalette\n"]
5676 pub fn SDL_CreatePalette(ncolors: core::ffi::c_int) -> *mut SDL_Palette;
5677}
5678unsafe extern "C" {
5679 #[doc = " Set a range of colors in a palette.\n\n **Parameter:** palette the SDL_Palette structure to modify.\n **Parameter:** colors an array of SDL_Color structures to copy into the palette.\n **Parameter:** firstcolor the index of the first palette entry to modify.\n **Parameter:** ncolors the number of entries to modify.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, as long as\n the palette is not modified or destroyed in another thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5680 pub fn SDL_SetPaletteColors(
5681 palette: *mut SDL_Palette,
5682 colors: *const SDL_Color,
5683 firstcolor: core::ffi::c_int,
5684 ncolors: core::ffi::c_int,
5685 ) -> bool;
5686}
5687unsafe extern "C" {
5688 #[doc = " Free a palette created with SDL_CreatePalette().\n\n **Parameter:** palette the SDL_Palette structure to be freed.\n\n **Thread Safety:** It is safe to call this function from any thread, as long as\n the palette is not modified or destroyed in another thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreatePalette\n"]
5689 pub fn SDL_DestroyPalette(palette: *mut SDL_Palette);
5690}
5691unsafe extern "C" {
5692 #[doc = " Map an RGB triple to an opaque pixel value for a given pixel format.\n\n This function maps the RGB color value to the specified pixel format and\n returns the pixel value best approximating the given RGB color value for\n the given pixel format.\n\n If the format has a palette (8-bit) the index of the closest matching color\n in the palette will be returned.\n\n If the specified pixel format has an alpha component it will be returned as\n all 1 bits (fully opaque).\n\n If the pixel format bpp (color depth) is less than 32-bpp then the unused\n upper bits of the return value can safely be ignored (e.g., with a 16-bpp\n format the return value can be assigned to a Uint16, and similarly a Uint8\n for an 8-bpp format).\n\n **Parameter:** format a pointer to SDL_PixelFormatDetails describing the pixel\n format.\n **Parameter:** palette an optional palette for indexed formats, may be NULL.\n **Parameter:** r the red component of the pixel in the range 0-255.\n **Parameter:** g the green component of the pixel in the range 0-255.\n **Parameter:** b the blue component of the pixel in the range 0-255.\n **Returns:** a pixel value.\n\n **Thread Safety:** It is safe to call this function from any thread, as long as\n the palette is not modified.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPixelFormatDetails\n **See Also:** SDL_GetRGB\n **See Also:** SDL_MapRGBA\n **See Also:** SDL_MapSurfaceRGB\n"]
5693 pub fn SDL_MapRGB(
5694 format: *const SDL_PixelFormatDetails,
5695 palette: *const SDL_Palette,
5696 r: Uint8,
5697 g: Uint8,
5698 b: Uint8,
5699 ) -> Uint32;
5700}
5701unsafe extern "C" {
5702 #[doc = " Map an RGBA quadruple to a pixel value for a given pixel format.\n\n This function maps the RGBA color value to the specified pixel format and\n returns the pixel value best approximating the given RGBA color value for\n the given pixel format.\n\n If the specified pixel format has no alpha component the alpha value will\n be ignored (as it will be in formats with a palette).\n\n If the format has a palette (8-bit) the index of the closest matching color\n in the palette will be returned.\n\n If the pixel format bpp (color depth) is less than 32-bpp then the unused\n upper bits of the return value can safely be ignored (e.g., with a 16-bpp\n format the return value can be assigned to a Uint16, and similarly a Uint8\n for an 8-bpp format).\n\n **Parameter:** format a pointer to SDL_PixelFormatDetails describing the pixel\n format.\n **Parameter:** palette an optional palette for indexed formats, may be NULL.\n **Parameter:** r the red component of the pixel in the range 0-255.\n **Parameter:** g the green component of the pixel in the range 0-255.\n **Parameter:** b the blue component of the pixel in the range 0-255.\n **Parameter:** a the alpha component of the pixel in the range 0-255.\n **Returns:** a pixel value.\n\n **Thread Safety:** It is safe to call this function from any thread, as long as\n the palette is not modified.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPixelFormatDetails\n **See Also:** SDL_GetRGBA\n **See Also:** SDL_MapRGB\n **See Also:** SDL_MapSurfaceRGBA\n"]
5703 pub fn SDL_MapRGBA(
5704 format: *const SDL_PixelFormatDetails,
5705 palette: *const SDL_Palette,
5706 r: Uint8,
5707 g: Uint8,
5708 b: Uint8,
5709 a: Uint8,
5710 ) -> Uint32;
5711}
5712unsafe extern "C" {
5713 #[doc = " Get RGB values from a pixel in the specified format.\n\n This function uses the entire 8-bit [0..255] range when converting color\n components from pixel formats with less than 8-bits per RGB component\n (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,\n 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).\n\n **Parameter:** pixelvalue a pixel value.\n **Parameter:** format a pointer to SDL_PixelFormatDetails describing the pixel\n format.\n **Parameter:** palette an optional palette for indexed formats, may be NULL.\n **Parameter:** r a pointer filled in with the red component, may be NULL.\n **Parameter:** g a pointer filled in with the green component, may be NULL.\n **Parameter:** b a pointer filled in with the blue component, may be NULL.\n\n **Thread Safety:** It is safe to call this function from any thread, as long as\n the palette is not modified.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPixelFormatDetails\n **See Also:** SDL_GetRGBA\n **See Also:** SDL_MapRGB\n **See Also:** SDL_MapRGBA\n"]
5714 pub fn SDL_GetRGB(
5715 pixelvalue: Uint32,
5716 format: *const SDL_PixelFormatDetails,
5717 palette: *const SDL_Palette,
5718 r: *mut Uint8,
5719 g: *mut Uint8,
5720 b: *mut Uint8,
5721 );
5722}
5723unsafe extern "C" {
5724 #[doc = " Get RGBA values from a pixel in the specified format.\n\n This function uses the entire 8-bit [0..255] range when converting color\n components from pixel formats with less than 8-bits per RGB component\n (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff,\n 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).\n\n If the surface has no alpha component, the alpha will be returned as 0xff\n (100% opaque).\n\n **Parameter:** pixelvalue a pixel value.\n **Parameter:** format a pointer to SDL_PixelFormatDetails describing the pixel\n format.\n **Parameter:** palette an optional palette for indexed formats, may be NULL.\n **Parameter:** r a pointer filled in with the red component, may be NULL.\n **Parameter:** g a pointer filled in with the green component, may be NULL.\n **Parameter:** b a pointer filled in with the blue component, may be NULL.\n **Parameter:** a a pointer filled in with the alpha component, may be NULL.\n\n **Thread Safety:** It is safe to call this function from any thread, as long as\n the palette is not modified.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPixelFormatDetails\n **See Also:** SDL_GetRGB\n **See Also:** SDL_MapRGB\n **See Also:** SDL_MapRGBA\n"]
5725 pub fn SDL_GetRGBA(
5726 pixelvalue: Uint32,
5727 format: *const SDL_PixelFormatDetails,
5728 palette: *const SDL_Palette,
5729 r: *mut Uint8,
5730 g: *mut Uint8,
5731 b: *mut Uint8,
5732 a: *mut Uint8,
5733 );
5734}
5735#[doc = " The structure that defines a point (using integers).\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRectEnclosingPoints\n **See Also:** SDL_PointInRect\n"]
5736#[repr(C)]
5737#[derive(Debug, Default, Copy, Clone, Hash)]
5738pub struct SDL_Point {
5739 pub x: core::ffi::c_int,
5740 pub y: core::ffi::c_int,
5741}
5742#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5743const _: () = {
5744 ["Size of SDL_Point"][::core::mem::size_of::<SDL_Point>() - 8usize];
5745 ["Alignment of SDL_Point"][::core::mem::align_of::<SDL_Point>() - 4usize];
5746 ["Offset of field: SDL_Point::x"][::core::mem::offset_of!(SDL_Point, x) - 0usize];
5747 ["Offset of field: SDL_Point::y"][::core::mem::offset_of!(SDL_Point, y) - 4usize];
5748};
5749#[doc = " The structure that defines a point (using floating point values).\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRectEnclosingPointsFloat\n **See Also:** SDL_PointInRectFloat\n"]
5750#[repr(C)]
5751#[derive(Debug, Default, Copy, Clone)]
5752pub struct SDL_FPoint {
5753 pub x: f32,
5754 pub y: f32,
5755}
5756#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5757const _: () = {
5758 ["Size of SDL_FPoint"][::core::mem::size_of::<SDL_FPoint>() - 8usize];
5759 ["Alignment of SDL_FPoint"][::core::mem::align_of::<SDL_FPoint>() - 4usize];
5760 ["Offset of field: SDL_FPoint::x"][::core::mem::offset_of!(SDL_FPoint, x) - 0usize];
5761 ["Offset of field: SDL_FPoint::y"][::core::mem::offset_of!(SDL_FPoint, y) - 4usize];
5762};
5763#[doc = " A rectangle, with the origin at the upper left (using integers).\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_RectEmpty\n **See Also:** SDL_RectsEqual\n **See Also:** SDL_HasRectIntersection\n **See Also:** SDL_GetRectIntersection\n **See Also:** SDL_GetRectAndLineIntersection\n **See Also:** SDL_GetRectUnion\n **See Also:** SDL_GetRectEnclosingPoints\n"]
5764#[repr(C)]
5765#[derive(Debug, Default, Copy, Clone, Hash)]
5766pub struct SDL_Rect {
5767 pub x: core::ffi::c_int,
5768 pub y: core::ffi::c_int,
5769 pub w: core::ffi::c_int,
5770 pub h: core::ffi::c_int,
5771}
5772#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5773const _: () = {
5774 ["Size of SDL_Rect"][::core::mem::size_of::<SDL_Rect>() - 16usize];
5775 ["Alignment of SDL_Rect"][::core::mem::align_of::<SDL_Rect>() - 4usize];
5776 ["Offset of field: SDL_Rect::x"][::core::mem::offset_of!(SDL_Rect, x) - 0usize];
5777 ["Offset of field: SDL_Rect::y"][::core::mem::offset_of!(SDL_Rect, y) - 4usize];
5778 ["Offset of field: SDL_Rect::w"][::core::mem::offset_of!(SDL_Rect, w) - 8usize];
5779 ["Offset of field: SDL_Rect::h"][::core::mem::offset_of!(SDL_Rect, h) - 12usize];
5780};
5781#[doc = " A rectangle stored using floating point values.\n\n The origin of the coordinate space is in the top-left, with increasing\n values moving down and right. The properties `x` and `y` represent the\n coordinates of the top-left corner of the rectangle.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_RectEmptyFloat\n **See Also:** SDL_RectsEqualFloat\n **See Also:** SDL_RectsEqualEpsilon\n **See Also:** SDL_HasRectIntersectionFloat\n **See Also:** SDL_GetRectIntersectionFloat\n **See Also:** SDL_GetRectAndLineIntersectionFloat\n **See Also:** SDL_GetRectUnionFloat\n **See Also:** SDL_GetRectEnclosingPointsFloat\n **See Also:** SDL_PointInRectFloat\n"]
5782#[repr(C)]
5783#[derive(Debug, Default, Copy, Clone)]
5784pub struct SDL_FRect {
5785 pub x: f32,
5786 pub y: f32,
5787 pub w: f32,
5788 pub h: f32,
5789}
5790#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5791const _: () = {
5792 ["Size of SDL_FRect"][::core::mem::size_of::<SDL_FRect>() - 16usize];
5793 ["Alignment of SDL_FRect"][::core::mem::align_of::<SDL_FRect>() - 4usize];
5794 ["Offset of field: SDL_FRect::x"][::core::mem::offset_of!(SDL_FRect, x) - 0usize];
5795 ["Offset of field: SDL_FRect::y"][::core::mem::offset_of!(SDL_FRect, y) - 4usize];
5796 ["Offset of field: SDL_FRect::w"][::core::mem::offset_of!(SDL_FRect, w) - 8usize];
5797 ["Offset of field: SDL_FRect::h"][::core::mem::offset_of!(SDL_FRect, h) - 12usize];
5798};
5799unsafe extern "C" {
5800 #[doc = " Convert an SDL_Rect to SDL_FRect\n\n **Parameter:** rect a pointer to an SDL_Rect.\n **Parameter:** frect a pointer filled in with the floating point representation of\n `rect`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5801 #[link_name = "SDL_RectToFRect__extern"]
5802 pub fn SDL_RectToFRect(rect: *const SDL_Rect, frect: *mut SDL_FRect);
5803}
5804unsafe extern "C" {
5805 #[doc = " Determine whether a point resides inside a rectangle.\n\n A point is considered part of a rectangle if both `p` and `r` are not NULL,\n and `p`'s x and y coordinates are >= to the rectangle's top left corner,\n and < the rectangle's x+w and y+h. So a 1x1 rectangle considers point (0,0)\n as \"inside\" and (0,1) as not.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** p the point to test.\n **Parameter:** r the rectangle to test.\n **Returns:** true if `p` is contained by `r`, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5806 #[link_name = "SDL_PointInRect__extern"]
5807 pub fn SDL_PointInRect(p: *const SDL_Point, r: *const SDL_Rect) -> bool;
5808}
5809unsafe extern "C" {
5810 #[doc = " Determine whether a rectangle has no area.\n\n A rectangle is considered \"empty\" for this function if `r` is NULL, or if\n `r`'s width and/or height are <= 0.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** r the rectangle to test.\n **Returns:** true if the rectangle is \"empty\", false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5811 #[link_name = "SDL_RectEmpty__extern"]
5812 pub fn SDL_RectEmpty(r: *const SDL_Rect) -> bool;
5813}
5814unsafe extern "C" {
5815 #[doc = " Determine whether two rectangles are equal.\n\n Rectangles are considered equal if both are not NULL and each of their x,\n y, width and height match.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** a the first rectangle to test.\n **Parameter:** b the second rectangle to test.\n **Returns:** true if the rectangles are equal, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5816 #[link_name = "SDL_RectsEqual__extern"]
5817 pub fn SDL_RectsEqual(a: *const SDL_Rect, b: *const SDL_Rect) -> bool;
5818}
5819unsafe extern "C" {
5820 #[doc = " Determine whether two rectangles intersect.\n\n If either pointer is NULL the function will return false.\n\n **Parameter:** A an SDL_Rect structure representing the first rectangle.\n **Parameter:** B an SDL_Rect structure representing the second rectangle.\n **Returns:** true if there is an intersection, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRectIntersection\n"]
5821 pub fn SDL_HasRectIntersection(A: *const SDL_Rect, B: *const SDL_Rect) -> bool;
5822}
5823unsafe extern "C" {
5824 #[doc = " Calculate the intersection of two rectangles.\n\n If `result` is NULL then this function will return false.\n\n **Parameter:** A an SDL_Rect structure representing the first rectangle.\n **Parameter:** B an SDL_Rect structure representing the second rectangle.\n **Parameter:** result an SDL_Rect structure filled in with the intersection of\n rectangles `A` and `B`.\n **Returns:** true if there is an intersection, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasRectIntersection\n"]
5825 pub fn SDL_GetRectIntersection(
5826 A: *const SDL_Rect,
5827 B: *const SDL_Rect,
5828 result: *mut SDL_Rect,
5829 ) -> bool;
5830}
5831unsafe extern "C" {
5832 #[doc = " Calculate the union of two rectangles.\n\n **Parameter:** A an SDL_Rect structure representing the first rectangle.\n **Parameter:** B an SDL_Rect structure representing the second rectangle.\n **Parameter:** result an SDL_Rect structure filled in with the union of rectangles\n `A` and `B`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5833 pub fn SDL_GetRectUnion(A: *const SDL_Rect, B: *const SDL_Rect, result: *mut SDL_Rect) -> bool;
5834}
5835unsafe extern "C" {
5836 #[doc = " Calculate a minimal rectangle enclosing a set of points.\n\n If `clip` is not NULL then only points inside of the clipping rectangle are\n considered.\n\n **Parameter:** points an array of SDL_Point structures representing points to be\n enclosed.\n **Parameter:** count the number of structures in the `points` array.\n **Parameter:** clip an SDL_Rect used for clipping or NULL to enclose all points.\n **Parameter:** result an SDL_Rect structure filled in with the minimal enclosing\n rectangle.\n **Returns:** true if any points were enclosed or false if all the points were\n outside of the clipping rectangle.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5837 pub fn SDL_GetRectEnclosingPoints(
5838 points: *const SDL_Point,
5839 count: core::ffi::c_int,
5840 clip: *const SDL_Rect,
5841 result: *mut SDL_Rect,
5842 ) -> bool;
5843}
5844unsafe extern "C" {
5845 #[doc = " Calculate the intersection of a rectangle and line segment.\n\n This function is used to clip a line segment to a rectangle. A line segment\n contained entirely within the rectangle or that does not intersect will\n remain unchanged. A line segment that crosses the rectangle at either or\n both ends will be clipped to the boundary of the rectangle and the new\n coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.\n\n **Parameter:** rect an SDL_Rect structure representing the rectangle to intersect.\n **Parameter:** X1 a pointer to the starting X-coordinate of the line.\n **Parameter:** Y1 a pointer to the starting Y-coordinate of the line.\n **Parameter:** X2 a pointer to the ending X-coordinate of the line.\n **Parameter:** Y2 a pointer to the ending Y-coordinate of the line.\n **Returns:** true if there is an intersection, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5846 pub fn SDL_GetRectAndLineIntersection(
5847 rect: *const SDL_Rect,
5848 X1: *mut core::ffi::c_int,
5849 Y1: *mut core::ffi::c_int,
5850 X2: *mut core::ffi::c_int,
5851 Y2: *mut core::ffi::c_int,
5852 ) -> bool;
5853}
5854unsafe extern "C" {
5855 #[doc = " Determine whether a point resides inside a floating point rectangle.\n\n A point is considered part of a rectangle if both `p` and `r` are not NULL,\n and `p`'s x and y coordinates are >= to the rectangle's top left corner,\n and <= the rectangle's x+w and y+h. So a 1x1 rectangle considers point\n (0,0) and (0,1) as \"inside\" and (0,2) as not.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** p the point to test.\n **Parameter:** r the rectangle to test.\n **Returns:** true if `p` is contained by `r`, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5856 #[link_name = "SDL_PointInRectFloat__extern"]
5857 pub fn SDL_PointInRectFloat(p: *const SDL_FPoint, r: *const SDL_FRect) -> bool;
5858}
5859unsafe extern "C" {
5860 #[doc = " Determine whether a floating point rectangle takes no space.\n\n A rectangle is considered \"empty\" for this function if `r` is NULL, or if\n `r`'s width and/or height are < 0.0f.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** r the rectangle to test.\n **Returns:** true if the rectangle is \"empty\", false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5861 #[link_name = "SDL_RectEmptyFloat__extern"]
5862 pub fn SDL_RectEmptyFloat(r: *const SDL_FRect) -> bool;
5863}
5864unsafe extern "C" {
5865 #[doc = " Determine whether two floating point rectangles are equal, within some\n given epsilon.\n\n Rectangles are considered equal if both are not NULL and each of their x,\n y, width and height are within `epsilon` of each other. If you don't know\n what value to use for `epsilon`, you should call the SDL_RectsEqualFloat\n function instead.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** a the first rectangle to test.\n **Parameter:** b the second rectangle to test.\n **Parameter:** epsilon the epsilon value for comparison.\n **Returns:** true if the rectangles are equal, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RectsEqualFloat\n"]
5866 #[link_name = "SDL_RectsEqualEpsilon__extern"]
5867 pub fn SDL_RectsEqualEpsilon(a: *const SDL_FRect, b: *const SDL_FRect, epsilon: f32) -> bool;
5868}
5869unsafe extern "C" {
5870 #[doc = " Determine whether two floating point rectangles are equal, within a default\n epsilon.\n\n Rectangles are considered equal if both are not NULL and each of their x,\n y, width and height are within SDL_FLT_EPSILON of each other. This is often\n a reasonable way to compare two floating point rectangles and deal with the\n slight precision variations in floating point calculations that tend to pop\n up.\n\n Note that this is a forced-inline function in a header, and not a public\n API function available in the SDL library (which is to say, the code is\n embedded in the calling program and the linker and dynamic loader will not\n be able to find this function inside SDL itself).\n\n **Parameter:** a the first rectangle to test.\n **Parameter:** b the second rectangle to test.\n **Returns:** true if the rectangles are equal, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RectsEqualEpsilon\n"]
5871 #[link_name = "SDL_RectsEqualFloat__extern"]
5872 pub fn SDL_RectsEqualFloat(a: *const SDL_FRect, b: *const SDL_FRect) -> bool;
5873}
5874unsafe extern "C" {
5875 #[doc = " Determine whether two rectangles intersect with float precision.\n\n If either pointer is NULL the function will return false.\n\n **Parameter:** A an SDL_FRect structure representing the first rectangle.\n **Parameter:** B an SDL_FRect structure representing the second rectangle.\n **Returns:** true if there is an intersection, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRectIntersectionFloat\n"]
5876 pub fn SDL_HasRectIntersectionFloat(A: *const SDL_FRect, B: *const SDL_FRect) -> bool;
5877}
5878unsafe extern "C" {
5879 #[doc = " Calculate the intersection of two rectangles with float precision.\n\n If `result` is NULL then this function will return false.\n\n **Parameter:** A an SDL_FRect structure representing the first rectangle.\n **Parameter:** B an SDL_FRect structure representing the second rectangle.\n **Parameter:** result an SDL_FRect structure filled in with the intersection of\n rectangles `A` and `B`.\n **Returns:** true if there is an intersection, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasRectIntersectionFloat\n"]
5880 pub fn SDL_GetRectIntersectionFloat(
5881 A: *const SDL_FRect,
5882 B: *const SDL_FRect,
5883 result: *mut SDL_FRect,
5884 ) -> bool;
5885}
5886unsafe extern "C" {
5887 #[doc = " Calculate the union of two rectangles with float precision.\n\n **Parameter:** A an SDL_FRect structure representing the first rectangle.\n **Parameter:** B an SDL_FRect structure representing the second rectangle.\n **Parameter:** result an SDL_FRect structure filled in with the union of rectangles\n `A` and `B`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5888 pub fn SDL_GetRectUnionFloat(
5889 A: *const SDL_FRect,
5890 B: *const SDL_FRect,
5891 result: *mut SDL_FRect,
5892 ) -> bool;
5893}
5894unsafe extern "C" {
5895 #[doc = " Calculate a minimal rectangle enclosing a set of points with float\n precision.\n\n If `clip` is not NULL then only points inside of the clipping rectangle are\n considered.\n\n **Parameter:** points an array of SDL_FPoint structures representing points to be\n enclosed.\n **Parameter:** count the number of structures in the `points` array.\n **Parameter:** clip an SDL_FRect used for clipping or NULL to enclose all points.\n **Parameter:** result an SDL_FRect structure filled in with the minimal enclosing\n rectangle.\n **Returns:** true if any points were enclosed or false if all the points were\n outside of the clipping rectangle.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5896 pub fn SDL_GetRectEnclosingPointsFloat(
5897 points: *const SDL_FPoint,
5898 count: core::ffi::c_int,
5899 clip: *const SDL_FRect,
5900 result: *mut SDL_FRect,
5901 ) -> bool;
5902}
5903unsafe extern "C" {
5904 #[doc = " Calculate the intersection of a rectangle and line segment with float\n precision.\n\n This function is used to clip a line segment to a rectangle. A line segment\n contained entirely within the rectangle or that does not intersect will\n remain unchanged. A line segment that crosses the rectangle at either or\n both ends will be clipped to the boundary of the rectangle and the new\n coordinates saved in `X1`, `Y1`, `X2`, and/or `Y2` as necessary.\n\n **Parameter:** rect an SDL_FRect structure representing the rectangle to intersect.\n **Parameter:** X1 a pointer to the starting X-coordinate of the line.\n **Parameter:** Y1 a pointer to the starting Y-coordinate of the line.\n **Parameter:** X2 a pointer to the ending X-coordinate of the line.\n **Parameter:** Y2 a pointer to the ending Y-coordinate of the line.\n **Returns:** true if there is an intersection, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
5905 pub fn SDL_GetRectAndLineIntersectionFloat(
5906 rect: *const SDL_FRect,
5907 X1: *mut f32,
5908 Y1: *mut f32,
5909 X2: *mut f32,
5910 Y2: *mut f32,
5911 ) -> bool;
5912}
5913#[doc = " The flags on an SDL_Surface.\n\n These are generally considered read-only.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
5914pub type SDL_SurfaceFlags = Uint32;
5915impl SDL_ScaleMode {
5916 pub const SDL_SCALEMODE_INVALID: SDL_ScaleMode = SDL_ScaleMode(-1);
5917 #[doc = "< nearest pixel sampling\n"]
5918 pub const SDL_SCALEMODE_NEAREST: SDL_ScaleMode = SDL_ScaleMode(0);
5919 #[doc = "< linear filtering\n"]
5920 pub const SDL_SCALEMODE_LINEAR: SDL_ScaleMode = SDL_ScaleMode(1);
5921 #[doc = "< nearest pixel sampling with improved scaling for pixel art, available since SDL 3.4.0\n"]
5922 pub const SDL_SCALEMODE_PIXELART: SDL_ScaleMode = SDL_ScaleMode(2);
5923}
5924#[repr(transparent)]
5925#[doc = " The scaling mode.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5926#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5927pub struct SDL_ScaleMode(pub core::ffi::c_int);
5928impl SDL_FlipMode {
5929 #[doc = "< Do not flip\n"]
5930 pub const SDL_FLIP_NONE: SDL_FlipMode = SDL_FlipMode(0);
5931 #[doc = "< flip horizontally\n"]
5932 pub const SDL_FLIP_HORIZONTAL: SDL_FlipMode = SDL_FlipMode(1);
5933 #[doc = "< flip vertically\n"]
5934 pub const SDL_FLIP_VERTICAL: SDL_FlipMode = SDL_FlipMode(2);
5935 #[doc = "< flip horizontally and vertically (not a diagonal flip)\n"]
5936 pub const SDL_FLIP_HORIZONTAL_AND_VERTICAL: SDL_FlipMode = SDL_FlipMode(3);
5937}
5938#[repr(transparent)]
5939#[doc = " The flip mode.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
5940#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5941pub struct SDL_FlipMode(pub core::ffi::c_uint);
5942#[doc = " A collection of pixels used in software blitting.\n\n Pixels are arranged in memory in rows, with the top row first. Each row\n occupies an amount of memory given by the pitch (sometimes known as the row\n stride in non-SDL APIs).\n\n Within each row, pixels are arranged from left to right until the width is\n reached. Each pixel occupies a number of bits appropriate for its format,\n with most formats representing each pixel as one or more whole bytes (in\n some indexed formats, instead multiple pixels are packed into each byte),\n and a byte order given by the format. After encoding all pixels, any\n remaining bytes to reach the pitch are used as padding to reach a desired\n alignment, and have undefined contents.\n\n When a surface holds YUV format data, the planes are assumed to be\n contiguous without padding between them, e.g. a 32x32 surface in NV12\n format with a pitch of 32 would consist of 32x32 bytes of Y plane followed\n by 32x16 bytes of UV plane.\n\n When a surface holds MJPG format data, pixels points at the compressed JPEG\n image and pitch is the length of that data.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateSurface\n **See Also:** SDL_DestroySurface\n"]
5943#[repr(C)]
5944#[derive(Debug, Copy, Clone, Hash)]
5945pub struct SDL_Surface {
5946 #[doc = "< The flags of the surface, read-only\n"]
5947 pub flags: SDL_SurfaceFlags,
5948 #[doc = "< The format of the surface, read-only\n"]
5949 pub format: SDL_PixelFormat,
5950 #[doc = "< The width of the surface, read-only.\n"]
5951 pub w: core::ffi::c_int,
5952 #[doc = "< The height of the surface, read-only.\n"]
5953 pub h: core::ffi::c_int,
5954 #[doc = "< The distance in bytes between rows of pixels, read-only\n"]
5955 pub pitch: core::ffi::c_int,
5956 #[doc = "< A pointer to the pixels of the surface, the pixels are writeable if non-NULL\n"]
5957 pub pixels: *mut core::ffi::c_void,
5958 #[doc = "< Application reference count, used when freeing surface\n"]
5959 pub refcount: core::ffi::c_int,
5960 #[doc = "< Reserved for internal use\n"]
5961 pub reserved: *mut core::ffi::c_void,
5962}
5963#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5964const _: () = {
5965 ["Size of SDL_Surface"][::core::mem::size_of::<SDL_Surface>() - 48usize];
5966 ["Alignment of SDL_Surface"][::core::mem::align_of::<SDL_Surface>() - 8usize];
5967 ["Offset of field: SDL_Surface::flags"][::core::mem::offset_of!(SDL_Surface, flags) - 0usize];
5968 ["Offset of field: SDL_Surface::format"][::core::mem::offset_of!(SDL_Surface, format) - 4usize];
5969 ["Offset of field: SDL_Surface::w"][::core::mem::offset_of!(SDL_Surface, w) - 8usize];
5970 ["Offset of field: SDL_Surface::h"][::core::mem::offset_of!(SDL_Surface, h) - 12usize];
5971 ["Offset of field: SDL_Surface::pitch"][::core::mem::offset_of!(SDL_Surface, pitch) - 16usize];
5972 ["Offset of field: SDL_Surface::pixels"]
5973 [::core::mem::offset_of!(SDL_Surface, pixels) - 24usize];
5974 ["Offset of field: SDL_Surface::refcount"]
5975 [::core::mem::offset_of!(SDL_Surface, refcount) - 32usize];
5976 ["Offset of field: SDL_Surface::reserved"]
5977 [::core::mem::offset_of!(SDL_Surface, reserved) - 40usize];
5978};
5979impl Default for SDL_Surface {
5980 fn default() -> Self {
5981 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
5982 unsafe {
5983 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5984 s.assume_init()
5985 }
5986 }
5987}
5988unsafe extern "C" {
5989 #[doc = " Allocate a new surface with a specific pixel format.\n\n The pixels of the new surface are initialized to zero.\n\n **Parameter:** width the width of the surface.\n **Parameter:** height the height of the surface.\n **Parameter:** format the SDL_PixelFormat for the new surface's pixel format.\n **Returns:** the new SDL_Surface structure that is created or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateSurfaceFrom\n **See Also:** SDL_DestroySurface\n"]
5990 pub fn SDL_CreateSurface(
5991 width: core::ffi::c_int,
5992 height: core::ffi::c_int,
5993 format: SDL_PixelFormat,
5994 ) -> *mut SDL_Surface;
5995}
5996unsafe extern "C" {
5997 #[doc = " Allocate a new surface with a specific pixel format and existing pixel\n data.\n\n No copy is made of the pixel data. Pixel data is not managed automatically;\n you must free the surface before you free the pixel data.\n\n Pitch is the offset in bytes from one row of pixels to the next, e.g.\n `width*4` for `SDL_PIXELFORMAT_RGBA8888`.\n\n You may pass NULL for pixels and 0 for pitch to create a surface that you\n will fill in with valid values later.\n\n **Parameter:** width the width of the surface.\n **Parameter:** height the height of the surface.\n **Parameter:** format the SDL_PixelFormat for the new surface's pixel format.\n **Parameter:** pixels a pointer to existing pixel data.\n **Parameter:** pitch the number of bytes between each row, including padding.\n **Returns:** the new SDL_Surface structure that is created or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateSurface\n **See Also:** SDL_DestroySurface\n"]
5998 pub fn SDL_CreateSurfaceFrom(
5999 width: core::ffi::c_int,
6000 height: core::ffi::c_int,
6001 format: SDL_PixelFormat,
6002 pixels: *mut core::ffi::c_void,
6003 pitch: core::ffi::c_int,
6004 ) -> *mut SDL_Surface;
6005}
6006unsafe extern "C" {
6007 #[doc = " Free a surface.\n\n It is safe to pass NULL to this function.\n\n **Parameter:** surface the SDL_Surface to free.\n\n **Thread Safety:** No other thread should be using the surface when it is freed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateSurface\n **See Also:** SDL_CreateSurfaceFrom\n"]
6008 pub fn SDL_DestroySurface(surface: *mut SDL_Surface);
6009}
6010unsafe extern "C" {
6011 #[doc = " Get the properties associated with a surface.\n\n The following properties are understood by SDL:\n\n - `SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating point\n surfaces, this defines the value of 100% diffuse white, with higher\n values being displayed in the High Dynamic Range headroom. This defaults\n to 203 for HDR10 surfaces and 1.0 for floating point surfaces.\n - `SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT`: for HDR10 and floating point\n surfaces, this defines the maximum dynamic range used by the content, in\n terms of the SDR white point. This defaults to 0.0, which disables tone\n mapping.\n - `SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING`: the tone mapping operator\n used when compressing from a surface with high dynamic range to another\n with lower dynamic range. Currently this supports \"chrome\", which uses\n the same tone mapping that Chrome uses for HDR content, the form \"*=N\",\n where N is a floating point scale factor applied in linear space, and\n \"none\", which disables tone mapping. This defaults to \"chrome\".\n - `SDL_PROP_SURFACE_HOTSPOT_X_NUMBER`: the hotspot pixel offset from the\n left edge of the image, if this surface is being used as a cursor.\n - `SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER`: the hotspot pixel offset from the\n top edge of the image, if this surface is being used as a cursor.\n - `SDL_PROP_SURFACE_ROTATION_FLOAT`: the number of degrees a surface's data\n is meant to be rotated clockwise to make the image right-side up. Default\n 0. This is used by the camera API, if a mobile device is oriented\n differently than what its camera provides (i.e. - the camera always\n provides portrait images but the phone is being held in landscape\n orientation). Since SDL 3.4.0.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6012 pub fn SDL_GetSurfaceProperties(surface: *mut SDL_Surface) -> SDL_PropertiesID;
6013}
6014unsafe extern "C" {
6015 #[doc = " Set the colorspace used by a surface.\n\n Setting the colorspace doesn't change the pixels, only how they are\n interpreted in color operations.\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Parameter:** colorspace an SDL_Colorspace value describing the surface\n colorspace.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceColorspace\n"]
6016 pub fn SDL_SetSurfaceColorspace(surface: *mut SDL_Surface, colorspace: SDL_Colorspace) -> bool;
6017}
6018unsafe extern "C" {
6019 #[doc = " Get the colorspace used by a surface.\n\n The colorspace defaults to SDL_COLORSPACE_SRGB_LINEAR for floating point\n formats, SDL_COLORSPACE_HDR10 for 10-bit formats, SDL_COLORSPACE_SRGB for\n other RGB surfaces and SDL_COLORSPACE_BT709_FULL for YUV textures.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Returns:** the colorspace used by the surface, or SDL_COLORSPACE_UNKNOWN if\n the surface is NULL.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetSurfaceColorspace\n"]
6020 pub fn SDL_GetSurfaceColorspace(surface: *mut SDL_Surface) -> SDL_Colorspace;
6021}
6022unsafe extern "C" {
6023 #[doc = " Create a palette and associate it with a surface.\n\n This function creates a palette compatible with the provided surface. The\n palette is then returned for you to modify, and the surface will\n automatically use the new palette in future operations. You do not need to\n destroy the returned palette, it will be freed when the reference count\n reaches 0, usually when the surface is destroyed.\n\n Bitmap surfaces (with format SDL_PIXELFORMAT_INDEX1LSB or\n SDL_PIXELFORMAT_INDEX1MSB) will have the palette initialized with 0 as\n white and 1 as black. Other surfaces will get a palette initialized with\n white in every entry.\n\n If this function is called for a surface that already has a palette, a new\n palette will be created to replace it.\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Returns:** a new SDL_Palette structure on success or NULL on failure (e.g. if\n the surface didn't have an index format); call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetPaletteColors\n"]
6024 pub fn SDL_CreateSurfacePalette(surface: *mut SDL_Surface) -> *mut SDL_Palette;
6025}
6026unsafe extern "C" {
6027 #[doc = " Set the palette used by a surface.\n\n Setting the palette keeps an internal reference to the palette, which can\n be safely destroyed afterwards.\n\n A single palette can be shared with many surfaces.\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Parameter:** palette the SDL_Palette structure to use.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreatePalette\n **See Also:** SDL_GetSurfacePalette\n"]
6028 pub fn SDL_SetSurfacePalette(surface: *mut SDL_Surface, palette: *mut SDL_Palette) -> bool;
6029}
6030unsafe extern "C" {
6031 #[doc = " Get the palette used by a surface.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Returns:** a pointer to the palette used by the surface, or NULL if there is\n no palette used.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetSurfacePalette\n"]
6032 pub fn SDL_GetSurfacePalette(surface: *mut SDL_Surface) -> *mut SDL_Palette;
6033}
6034unsafe extern "C" {
6035 #[doc = " Add an alternate version of a surface.\n\n This function adds an alternate version of this surface, usually used for\n content with high DPI representations like cursors or icons. The size,\n format, and content do not need to match the original surface, and these\n alternate versions will not be updated when the original surface changes.\n\n This function adds a reference to the alternate version, so you should call\n SDL_DestroySurface() on the image after this call.\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Parameter:** image a pointer to an alternate SDL_Surface to associate with this\n surface.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RemoveSurfaceAlternateImages\n **See Also:** SDL_GetSurfaceImages\n **See Also:** SDL_SurfaceHasAlternateImages\n"]
6036 pub fn SDL_AddSurfaceAlternateImage(surface: *mut SDL_Surface, image: *mut SDL_Surface)
6037 -> bool;
6038}
6039unsafe extern "C" {
6040 #[doc = " Return whether a surface has alternate versions available.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Returns:** true if alternate versions are available or false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddSurfaceAlternateImage\n **See Also:** SDL_RemoveSurfaceAlternateImages\n **See Also:** SDL_GetSurfaceImages\n"]
6041 pub fn SDL_SurfaceHasAlternateImages(surface: *mut SDL_Surface) -> bool;
6042}
6043unsafe extern "C" {
6044 #[doc = " Get an array including all versions of a surface.\n\n This returns all versions of a surface, with the surface being queried as\n the first element in the returned array.\n\n Freeing the array of surfaces does not affect the surfaces in the array.\n They are still referenced by the surface being queried and will be cleaned\n up normally.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Parameter:** count a pointer filled in with the number of surface pointers\n returned, may be NULL.\n **Returns:** a NULL terminated array of SDL_Surface pointers or NULL on\n failure; call SDL_GetError() for more information. This should be\n freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddSurfaceAlternateImage\n **See Also:** SDL_RemoveSurfaceAlternateImages\n **See Also:** SDL_SurfaceHasAlternateImages\n"]
6045 pub fn SDL_GetSurfaceImages(
6046 surface: *mut SDL_Surface,
6047 count: *mut core::ffi::c_int,
6048 ) -> *mut *mut SDL_Surface;
6049}
6050unsafe extern "C" {
6051 #[doc = " Remove all alternate versions of a surface.\n\n This function removes a reference from all the alternative versions,\n destroying them if this is the last reference to them.\n\n **Parameter:** surface the SDL_Surface structure to update.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddSurfaceAlternateImage\n **See Also:** SDL_GetSurfaceImages\n **See Also:** SDL_SurfaceHasAlternateImages\n"]
6052 pub fn SDL_RemoveSurfaceAlternateImages(surface: *mut SDL_Surface);
6053}
6054unsafe extern "C" {
6055 #[doc = " Set up a surface for directly accessing the pixels.\n\n Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write to\n and read from `surface->pixels`, using the pixel format stored in\n `surface->format`. Once you are done accessing the surface, you should use\n SDL_UnlockSurface() to release it.\n\n Not all surfaces require locking. If `SDL_MUSTLOCK(surface)` evaluates to\n 0, then you can read and write to the surface at any time, and the pixel\n format of the surface will not change.\n\n **Parameter:** surface the SDL_Surface structure to be locked.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces. The locking referred to by this function\n is making the pixels available for direct access, not\n thread-safe locking.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MUSTLOCK\n **See Also:** SDL_UnlockSurface\n"]
6056 pub fn SDL_LockSurface(surface: *mut SDL_Surface) -> bool;
6057}
6058unsafe extern "C" {
6059 #[doc = " Release a surface after directly accessing the pixels.\n\n **Parameter:** surface the SDL_Surface structure to be unlocked.\n\n **Thread Safety:** This function is not thread safe. The locking referred to by\n this function is making the pixels available for direct\n access, not thread-safe locking.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockSurface\n"]
6060 pub fn SDL_UnlockSurface(surface: *mut SDL_Surface);
6061}
6062unsafe extern "C" {
6063 #[doc = " Load a BMP or PNG image from a seekable SDL data stream.\n\n The new surface should be freed with SDL_DestroySurface(). Not doing so\n will result in a memory leak.\n\n **Parameter:** src the data stream for the surface.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `src` before returning, even\n in the case of an error.\n **Returns:** a pointer to a new SDL_Surface structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_DestroySurface\n **See Also:** SDL_LoadSurface\n"]
6064 pub fn SDL_LoadSurface_IO(src: *mut SDL_IOStream, closeio: bool) -> *mut SDL_Surface;
6065}
6066unsafe extern "C" {
6067 #[doc = " Load a BMP or PNG image from a file.\n\n The new surface should be freed with SDL_DestroySurface(). Not doing so\n will result in a memory leak.\n\n **Parameter:** file the file to load.\n **Returns:** a pointer to a new SDL_Surface structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_DestroySurface\n **See Also:** SDL_LoadSurface_IO\n"]
6068 pub fn SDL_LoadSurface(file: *const core::ffi::c_char) -> *mut SDL_Surface;
6069}
6070unsafe extern "C" {
6071 #[doc = " Load a BMP image from a seekable SDL data stream.\n\n The new surface should be freed with SDL_DestroySurface(). Not doing so\n will result in a memory leak.\n\n **Parameter:** src the data stream for the surface.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `src` before returning, even\n in the case of an error.\n **Returns:** a pointer to a new SDL_Surface structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroySurface\n **See Also:** SDL_LoadBMP\n **See Also:** SDL_SaveBMP_IO\n"]
6072 pub fn SDL_LoadBMP_IO(src: *mut SDL_IOStream, closeio: bool) -> *mut SDL_Surface;
6073}
6074unsafe extern "C" {
6075 #[doc = " Load a BMP image from a file.\n\n The new surface should be freed with SDL_DestroySurface(). Not doing so\n will result in a memory leak.\n\n **Parameter:** file the BMP file to load.\n **Returns:** a pointer to a new SDL_Surface structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroySurface\n **See Also:** SDL_LoadBMP_IO\n **See Also:** SDL_SaveBMP\n"]
6076 pub fn SDL_LoadBMP(file: *const core::ffi::c_char) -> *mut SDL_Surface;
6077}
6078unsafe extern "C" {
6079 #[doc = " Save a surface to a seekable SDL data stream in BMP format.\n\n Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the\n BMP directly. Other RGB formats with 8-bit or higher get converted to a\n 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit\n surface before they are saved. YUV and paletted 1-bit and 4-bit formats are\n not supported.\n\n **Parameter:** surface the SDL_Surface structure containing the image to be saved.\n **Parameter:** dst a data stream to save to.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `dst` before returning, even\n in the case of an error.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadBMP_IO\n **See Also:** SDL_SaveBMP\n"]
6080 pub fn SDL_SaveBMP_IO(surface: *mut SDL_Surface, dst: *mut SDL_IOStream, closeio: bool)
6081 -> bool;
6082}
6083unsafe extern "C" {
6084 #[doc = " Save a surface to a file in BMP format.\n\n Surfaces with a 24-bit, 32-bit and paletted 8-bit format get saved in the\n BMP directly. Other RGB formats with 8-bit or higher get converted to a\n 24-bit surface or, if they have an alpha mask or a colorkey, to a 32-bit\n surface before they are saved. YUV and paletted 1-bit and 4-bit formats are\n not supported.\n\n **Parameter:** surface the SDL_Surface structure containing the image to be saved.\n **Parameter:** file a file to save to.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadBMP\n **See Also:** SDL_SaveBMP_IO\n"]
6085 pub fn SDL_SaveBMP(surface: *mut SDL_Surface, file: *const core::ffi::c_char) -> bool;
6086}
6087unsafe extern "C" {
6088 #[doc = " Load a PNG image from a seekable SDL data stream.\n\n This is intended as a convenience function for loading images from trusted\n sources. If you want to load arbitrary images you should use libpng or\n another image loading library designed with security in mind.\n\n The new surface should be freed with SDL_DestroySurface(). Not doing so\n will result in a memory leak.\n\n **Parameter:** src the data stream for the surface.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `src` before returning, even\n in the case of an error.\n **Returns:** a pointer to a new SDL_Surface structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_DestroySurface\n **See Also:** SDL_LoadPNG\n **See Also:** SDL_SavePNG_IO\n"]
6089 pub fn SDL_LoadPNG_IO(src: *mut SDL_IOStream, closeio: bool) -> *mut SDL_Surface;
6090}
6091unsafe extern "C" {
6092 #[doc = " Load a PNG image from a file.\n\n This is intended as a convenience function for loading images from trusted\n sources. If you want to load arbitrary images you should use libpng or\n another image loading library designed with security in mind.\n\n The new surface should be freed with SDL_DestroySurface(). Not doing so\n will result in a memory leak.\n\n **Parameter:** file the PNG file to load.\n **Returns:** a pointer to a new SDL_Surface structure or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_DestroySurface\n **See Also:** SDL_LoadPNG_IO\n **See Also:** SDL_SavePNG\n"]
6093 pub fn SDL_LoadPNG(file: *const core::ffi::c_char) -> *mut SDL_Surface;
6094}
6095unsafe extern "C" {
6096 #[doc = " Save a surface to a seekable SDL data stream in PNG format.\n\n **Parameter:** surface the SDL_Surface structure containing the image to be saved.\n **Parameter:** dst a data stream to save to.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `dst` before returning, even\n in the case of an error.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_LoadPNG_IO\n **See Also:** SDL_SavePNG\n"]
6097 pub fn SDL_SavePNG_IO(surface: *mut SDL_Surface, dst: *mut SDL_IOStream, closeio: bool)
6098 -> bool;
6099}
6100unsafe extern "C" {
6101 #[doc = " Save a surface to a file in PNG format.\n\n **Parameter:** surface the SDL_Surface structure containing the image to be saved.\n **Parameter:** file a file to save to.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_LoadPNG\n **See Also:** SDL_SavePNG_IO\n"]
6102 pub fn SDL_SavePNG(surface: *mut SDL_Surface, file: *const core::ffi::c_char) -> bool;
6103}
6104unsafe extern "C" {
6105 #[doc = " Set the RLE acceleration hint for a surface.\n\n If RLE is enabled, color key and alpha blending blits are much faster, but\n the surface must be locked before directly accessing the pixels.\n\n **Parameter:** surface the SDL_Surface structure to optimize.\n **Parameter:** enabled true to enable RLE acceleration, false to disable it.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurface\n **See Also:** SDL_LockSurface\n **See Also:** SDL_UnlockSurface\n"]
6106 pub fn SDL_SetSurfaceRLE(surface: *mut SDL_Surface, enabled: bool) -> bool;
6107}
6108unsafe extern "C" {
6109 #[doc = " Returns whether the surface is RLE enabled.\n\n It is safe to pass a NULL `surface` here; it will return false.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Returns:** true if the surface is RLE enabled, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetSurfaceRLE\n"]
6110 pub fn SDL_SurfaceHasRLE(surface: *mut SDL_Surface) -> bool;
6111}
6112unsafe extern "C" {
6113 #[doc = " Set the color key (transparent pixel) in a surface.\n\n The color key defines a pixel value that will be treated as transparent in\n a blit. For example, one can use this to specify that cyan pixels should be\n considered transparent, and therefore not rendered.\n\n It is a pixel of the format used by the surface, as generated by\n SDL_MapRGB().\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Parameter:** enabled true to enable color key, false to disable color key.\n **Parameter:** key the transparent pixel.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceColorKey\n **See Also:** SDL_SetSurfaceRLE\n **See Also:** SDL_SurfaceHasColorKey\n"]
6114 pub fn SDL_SetSurfaceColorKey(surface: *mut SDL_Surface, enabled: bool, key: Uint32) -> bool;
6115}
6116unsafe extern "C" {
6117 #[doc = " Returns whether the surface has a color key.\n\n It is safe to pass a NULL `surface` here; it will return false.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Returns:** true if the surface has a color key, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetSurfaceColorKey\n **See Also:** SDL_GetSurfaceColorKey\n"]
6118 pub fn SDL_SurfaceHasColorKey(surface: *mut SDL_Surface) -> bool;
6119}
6120unsafe extern "C" {
6121 #[doc = " Get the color key (transparent pixel) for a surface.\n\n The color key is a pixel of the format used by the surface, as generated by\n SDL_MapRGB().\n\n If the surface doesn't have color key enabled this function returns false.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Parameter:** key a pointer filled in with the transparent pixel.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetSurfaceColorKey\n **See Also:** SDL_SurfaceHasColorKey\n"]
6122 pub fn SDL_GetSurfaceColorKey(surface: *mut SDL_Surface, key: *mut Uint32) -> bool;
6123}
6124unsafe extern "C" {
6125 #[doc = " Set an additional color value multiplied into blit operations.\n\n When this surface is blitted, during the blit operation each source color\n channel is modulated by the appropriate color value according to the\n following formula:\n\n `srcC = srcC * (color / 255)`\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Parameter:** r the red color value multiplied into blit operations.\n **Parameter:** g the green color value multiplied into blit operations.\n **Parameter:** b the blue color value multiplied into blit operations.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceColorMod\n **See Also:** SDL_SetSurfaceAlphaMod\n"]
6126 pub fn SDL_SetSurfaceColorMod(surface: *mut SDL_Surface, r: Uint8, g: Uint8, b: Uint8) -> bool;
6127}
6128unsafe extern "C" {
6129 #[doc = " Get the additional color value multiplied into blit operations.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Parameter:** r a pointer filled in with the current red color value.\n **Parameter:** g a pointer filled in with the current green color value.\n **Parameter:** b a pointer filled in with the current blue color value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceAlphaMod\n **See Also:** SDL_SetSurfaceColorMod\n"]
6130 pub fn SDL_GetSurfaceColorMod(
6131 surface: *mut SDL_Surface,
6132 r: *mut Uint8,
6133 g: *mut Uint8,
6134 b: *mut Uint8,
6135 ) -> bool;
6136}
6137unsafe extern "C" {
6138 #[doc = " Set an additional alpha value used in blit operations.\n\n When this surface is blitted, during the blit operation the source alpha\n value is modulated by this alpha value according to the following formula:\n\n `srcA = srcA * (alpha / 255)`\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Parameter:** alpha the alpha value multiplied into blit operations.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceAlphaMod\n **See Also:** SDL_SetSurfaceColorMod\n"]
6139 pub fn SDL_SetSurfaceAlphaMod(surface: *mut SDL_Surface, alpha: Uint8) -> bool;
6140}
6141unsafe extern "C" {
6142 #[doc = " Get the additional alpha value used in blit operations.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Parameter:** alpha a pointer filled in with the current alpha value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceColorMod\n **See Also:** SDL_SetSurfaceAlphaMod\n"]
6143 pub fn SDL_GetSurfaceAlphaMod(surface: *mut SDL_Surface, alpha: *mut Uint8) -> bool;
6144}
6145unsafe extern "C" {
6146 #[doc = " Set the blend mode used for blit operations.\n\n To copy a surface to another surface (or texture) without blending with the\n existing data, the blendmode of the SOURCE surface should be set to\n `SDL_BLENDMODE_NONE`.\n\n **Parameter:** surface the SDL_Surface structure to update.\n **Parameter:** blendMode the SDL_BlendMode to use for blit blending.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceBlendMode\n"]
6147 pub fn SDL_SetSurfaceBlendMode(surface: *mut SDL_Surface, blendMode: SDL_BlendMode) -> bool;
6148}
6149unsafe extern "C" {
6150 #[doc = " Get the blend mode used for blit operations.\n\n **Parameter:** surface the SDL_Surface structure to query.\n **Parameter:** blendMode a pointer filled in with the current SDL_BlendMode.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetSurfaceBlendMode\n"]
6151 pub fn SDL_GetSurfaceBlendMode(
6152 surface: *mut SDL_Surface,
6153 blendMode: *mut SDL_BlendMode,
6154 ) -> bool;
6155}
6156unsafe extern "C" {
6157 #[doc = " Set the clipping rectangle for a surface.\n\n When `surface` is the destination of a blit, only the area within the clip\n rectangle is drawn into.\n\n Note that blits are automatically clipped to the edges of the source and\n destination surfaces.\n\n **Parameter:** surface the SDL_Surface structure to be clipped.\n **Parameter:** rect the SDL_Rect structure representing the clipping rectangle, or\n NULL to disable clipping.\n **Returns:** true if the rectangle intersects the surface, otherwise false and\n blits will be completely clipped.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetSurfaceClipRect\n"]
6158 pub fn SDL_SetSurfaceClipRect(surface: *mut SDL_Surface, rect: *const SDL_Rect) -> bool;
6159}
6160unsafe extern "C" {
6161 #[doc = " Get the clipping rectangle for a surface.\n\n When `surface` is the destination of a blit, only the area within the clip\n rectangle is drawn into.\n\n **Parameter:** surface the SDL_Surface structure representing the surface to be\n clipped.\n **Parameter:** rect an SDL_Rect structure filled in with the clipping rectangle for\n the surface.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetSurfaceClipRect\n"]
6162 pub fn SDL_GetSurfaceClipRect(surface: *mut SDL_Surface, rect: *mut SDL_Rect) -> bool;
6163}
6164unsafe extern "C" {
6165 #[doc = " Flip a surface vertically or horizontally.\n\n **Parameter:** surface the surface to flip.\n **Parameter:** flip the direction to flip.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6166 pub fn SDL_FlipSurface(surface: *mut SDL_Surface, flip: SDL_FlipMode) -> bool;
6167}
6168unsafe extern "C" {
6169 #[doc = " Return a copy of a surface rotated clockwise a number of degrees.\n\n The angle of rotation can be negative for counter-clockwise rotation.\n\n When the rotation isn't a multiple of 90 degrees, the resulting surface is\n larger than the original, with the background filled in with the colorkey,\n if available, or RGBA 255/255/255/0 if not.\n\n If `surface` has the SDL_PROP_SURFACE_ROTATION_FLOAT property set on it,\n the new copy will have the adjusted value set: if the rotation property is\n 90 and `angle` was 30, the new surface will have a property value of 60\n (that is: to be upright vs gravity, this surface needs to rotate 60 more\n degrees). However, note that further rotations on the new surface in this\n example will produce unexpected results, since the image will have resized\n and padded to accommodate the not-90 degree angle.\n\n **Parameter:** surface the surface to rotate.\n **Parameter:** angle the rotation angle, in degrees.\n **Returns:** a rotated copy of the surface or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
6170 pub fn SDL_RotateSurface(surface: *mut SDL_Surface, angle: f32) -> *mut SDL_Surface;
6171}
6172unsafe extern "C" {
6173 #[doc = " Creates a new surface identical to the existing surface.\n\n If the original surface has alternate images, the new surface will have a\n reference to them as well.\n\n The returned surface should be freed with SDL_DestroySurface().\n\n **Parameter:** surface the surface to duplicate.\n **Returns:** a copy of the surface or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroySurface\n"]
6174 pub fn SDL_DuplicateSurface(surface: *mut SDL_Surface) -> *mut SDL_Surface;
6175}
6176unsafe extern "C" {
6177 #[doc = " Creates a new surface identical to the existing surface, scaled to the\n desired size.\n\n The returned surface should be freed with SDL_DestroySurface().\n\n **Parameter:** surface the surface to duplicate and scale.\n **Parameter:** width the width of the new surface.\n **Parameter:** height the height of the new surface.\n **Parameter:** scaleMode the SDL_ScaleMode to be used.\n **Returns:** a copy of the surface or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroySurface\n"]
6178 pub fn SDL_ScaleSurface(
6179 surface: *mut SDL_Surface,
6180 width: core::ffi::c_int,
6181 height: core::ffi::c_int,
6182 scaleMode: SDL_ScaleMode,
6183 ) -> *mut SDL_Surface;
6184}
6185unsafe extern "C" {
6186 #[doc = " Copy an existing surface to a new surface of the specified format.\n\n This function is used to optimize images for faster *repeat* blitting. This\n is accomplished by converting the original and storing the result as a new\n surface. The new, optimized surface can then be used as the source for\n future blits, making them faster.\n\n If you are converting to an indexed surface and want to map colors to a\n palette, you can use SDL_ConvertSurfaceAndColorspace() instead.\n\n If the original surface has alternate images, the new surface will have a\n reference to them as well.\n\n **Parameter:** surface the existing SDL_Surface structure to convert.\n **Parameter:** format the new pixel format.\n **Returns:** the new SDL_Surface structure that is created or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ConvertSurfaceAndColorspace\n **See Also:** SDL_DestroySurface\n"]
6187 pub fn SDL_ConvertSurface(
6188 surface: *mut SDL_Surface,
6189 format: SDL_PixelFormat,
6190 ) -> *mut SDL_Surface;
6191}
6192unsafe extern "C" {
6193 #[doc = " Copy an existing surface to a new surface of the specified format and\n colorspace.\n\n This function converts an existing surface to a new format and colorspace\n and returns the new surface. This will perform any pixel format and\n colorspace conversion needed.\n\n If the original surface has alternate images, the new surface will have a\n reference to them as well.\n\n **Parameter:** surface the existing SDL_Surface structure to convert.\n **Parameter:** format the new pixel format.\n **Parameter:** palette an optional palette to use for indexed formats, may be NULL.\n **Parameter:** colorspace the new colorspace.\n **Parameter:** props an SDL_PropertiesID with additional color properties, or 0.\n **Returns:** the new SDL_Surface structure that is created or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ConvertSurface\n **See Also:** SDL_DestroySurface\n"]
6194 pub fn SDL_ConvertSurfaceAndColorspace(
6195 surface: *mut SDL_Surface,
6196 format: SDL_PixelFormat,
6197 palette: *mut SDL_Palette,
6198 colorspace: SDL_Colorspace,
6199 props: SDL_PropertiesID,
6200 ) -> *mut SDL_Surface;
6201}
6202unsafe extern "C" {
6203 #[doc = " Copy a block of pixels of one format to another format.\n\n **Parameter:** width the width of the block to copy, in pixels.\n **Parameter:** height the height of the block to copy, in pixels.\n **Parameter:** src_format an SDL_PixelFormat value of the `src` pixels format.\n **Parameter:** src a pointer to the source pixels.\n **Parameter:** src_pitch the pitch of the source pixels, in bytes.\n **Parameter:** dst_format an SDL_PixelFormat value of the `dst` pixels format.\n **Parameter:** dst a pointer to be filled in with new pixel data.\n **Parameter:** dst_pitch the pitch of the destination pixels, in bytes.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** The same destination pixels should not be used from two\n threads at once. It is safe to use the same source pixels\n from multiple threads.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ConvertPixelsAndColorspace\n"]
6204 pub fn SDL_ConvertPixels(
6205 width: core::ffi::c_int,
6206 height: core::ffi::c_int,
6207 src_format: SDL_PixelFormat,
6208 src: *const core::ffi::c_void,
6209 src_pitch: core::ffi::c_int,
6210 dst_format: SDL_PixelFormat,
6211 dst: *mut core::ffi::c_void,
6212 dst_pitch: core::ffi::c_int,
6213 ) -> bool;
6214}
6215unsafe extern "C" {
6216 #[doc = " Copy a block of pixels of one format and colorspace to another format and\n colorspace.\n\n **Parameter:** width the width of the block to copy, in pixels.\n **Parameter:** height the height of the block to copy, in pixels.\n **Parameter:** src_format an SDL_PixelFormat value of the `src` pixels format.\n **Parameter:** src_colorspace an SDL_Colorspace value describing the colorspace of\n the `src` pixels.\n **Parameter:** src_properties an SDL_PropertiesID with additional source color\n properties, or 0.\n **Parameter:** src a pointer to the source pixels.\n **Parameter:** src_pitch the pitch of the source pixels, in bytes.\n **Parameter:** dst_format an SDL_PixelFormat value of the `dst` pixels format.\n **Parameter:** dst_colorspace an SDL_Colorspace value describing the colorspace of\n the `dst` pixels.\n **Parameter:** dst_properties an SDL_PropertiesID with additional destination color\n properties, or 0.\n **Parameter:** dst a pointer to be filled in with new pixel data.\n **Parameter:** dst_pitch the pitch of the destination pixels, in bytes.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** The same destination pixels should not be used from two\n threads at once. It is safe to use the same source pixels\n from multiple threads.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ConvertPixels\n"]
6217 pub fn SDL_ConvertPixelsAndColorspace(
6218 width: core::ffi::c_int,
6219 height: core::ffi::c_int,
6220 src_format: SDL_PixelFormat,
6221 src_colorspace: SDL_Colorspace,
6222 src_properties: SDL_PropertiesID,
6223 src: *const core::ffi::c_void,
6224 src_pitch: core::ffi::c_int,
6225 dst_format: SDL_PixelFormat,
6226 dst_colorspace: SDL_Colorspace,
6227 dst_properties: SDL_PropertiesID,
6228 dst: *mut core::ffi::c_void,
6229 dst_pitch: core::ffi::c_int,
6230 ) -> bool;
6231}
6232unsafe extern "C" {
6233 #[doc = " Premultiply the alpha on a block of pixels.\n\n This is safe to use with src == dst, but not for other overlapping areas.\n\n **Parameter:** width the width of the block to convert, in pixels.\n **Parameter:** height the height of the block to convert, in pixels.\n **Parameter:** src_format an SDL_PixelFormat value of the `src` pixels format.\n **Parameter:** src a pointer to the source pixels.\n **Parameter:** src_pitch the pitch of the source pixels, in bytes.\n **Parameter:** dst_format an SDL_PixelFormat value of the `dst` pixels format.\n **Parameter:** dst a pointer to be filled in with premultiplied pixel data.\n **Parameter:** dst_pitch the pitch of the destination pixels, in bytes.\n **Parameter:** linear true to convert from sRGB to linear space for the alpha\n multiplication, false to do multiplication in sRGB space.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** The same destination pixels should not be used from two\n threads at once. It is safe to use the same source pixels\n from multiple threads.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6234 pub fn SDL_PremultiplyAlpha(
6235 width: core::ffi::c_int,
6236 height: core::ffi::c_int,
6237 src_format: SDL_PixelFormat,
6238 src: *const core::ffi::c_void,
6239 src_pitch: core::ffi::c_int,
6240 dst_format: SDL_PixelFormat,
6241 dst: *mut core::ffi::c_void,
6242 dst_pitch: core::ffi::c_int,
6243 linear: bool,
6244 ) -> bool;
6245}
6246unsafe extern "C" {
6247 #[doc = " Premultiply the alpha in a surface.\n\n This is safe to use with src == dst, but not for other overlapping areas.\n\n **Parameter:** surface the surface to modify.\n **Parameter:** linear true to convert from sRGB to linear space for the alpha\n multiplication, false to do multiplication in sRGB space.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6248 pub fn SDL_PremultiplySurfaceAlpha(surface: *mut SDL_Surface, linear: bool) -> bool;
6249}
6250unsafe extern "C" {
6251 #[doc = " Clear a surface with a specific color, with floating point precision.\n\n This function handles all surface formats, and ignores any clip rectangle.\n\n If the surface is YUV, the color is assumed to be in the sRGB colorspace,\n otherwise the color is assumed to be in the colorspace of the surface.\n\n **Parameter:** surface the SDL_Surface to clear.\n **Parameter:** r the red component of the pixel, normally in the range 0-1.\n **Parameter:** g the green component of the pixel, normally in the range 0-1.\n **Parameter:** b the blue component of the pixel, normally in the range 0-1.\n **Parameter:** a the alpha component of the pixel, normally in the range 0-1.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6252 pub fn SDL_ClearSurface(surface: *mut SDL_Surface, r: f32, g: f32, b: f32, a: f32) -> bool;
6253}
6254unsafe extern "C" {
6255 #[doc = " Perform a fast fill of a rectangle with a specific color.\n\n `color` should be a pixel of the format used by the surface, and can be\n generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an\n alpha component then the destination is simply filled with that alpha\n information, no blending takes place.\n\n If there is a clip rectangle set on the destination (set via\n SDL_SetSurfaceClipRect()), then this function will fill based on the\n intersection of the clip rectangle and `rect`.\n\n **Parameter:** dst the SDL_Surface structure that is the drawing target.\n **Parameter:** rect the SDL_Rect structure representing the rectangle to fill, or\n NULL to fill the entire surface.\n **Parameter:** color the color to fill with.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_FillSurfaceRects\n"]
6256 pub fn SDL_FillSurfaceRect(dst: *mut SDL_Surface, rect: *const SDL_Rect, color: Uint32)
6257 -> bool;
6258}
6259unsafe extern "C" {
6260 #[doc = " Perform a fast fill of a set of rectangles with a specific color.\n\n `color` should be a pixel of the format used by the surface, and can be\n generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an\n alpha component then the destination is simply filled with that alpha\n information, no blending takes place.\n\n If there is a clip rectangle set on the destination (set via\n SDL_SetSurfaceClipRect()), then this function will fill based on the\n intersection of the clip rectangle and `rect`.\n\n **Parameter:** dst the SDL_Surface structure that is the drawing target.\n **Parameter:** rects an array of SDL_Rects representing the rectangles to fill.\n **Parameter:** count the number of rectangles in the array.\n **Parameter:** color the color to fill with.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_FillSurfaceRect\n"]
6261 pub fn SDL_FillSurfaceRects(
6262 dst: *mut SDL_Surface,
6263 rects: *const SDL_Rect,
6264 count: core::ffi::c_int,
6265 color: Uint32,
6266 ) -> bool;
6267}
6268unsafe extern "C" {
6269 #[doc = " Performs a fast blit from the source surface to the destination surface\n with clipping.\n\n If either `srcrect` or `dstrect` are NULL, the entire surface (`src` or\n `dst`) is copied while ensuring clipping to `dst->clip_rect`.\n\n The blit function should not be called on a locked surface.\n\n The blit semantics for surfaces with and without blending and colorkey are\n defined as follows:\n\n ```\n RGBA->RGB:\n Source surface blend mode set to SDL_BLENDMODE_BLEND:\n alpha-blend (using the source alpha-channel and per-surface alpha)\n SDL_SRCCOLORKEY ignored.\n Source surface blend mode set to SDL_BLENDMODE_NONE:\n copy RGB.\n if SDL_SRCCOLORKEY set, only copy the pixels that do not match the\n RGB values of the source color key, ignoring alpha in the\n comparison.\n\n RGB->RGBA:\n Source surface blend mode set to SDL_BLENDMODE_BLEND:\n alpha-blend (using the source per-surface alpha)\n Source surface blend mode set to SDL_BLENDMODE_NONE:\n copy RGB, set destination alpha to source per-surface alpha value.\n both:\n if SDL_SRCCOLORKEY set, only copy the pixels that do not match the\n source color key.\n\n RGBA->RGBA:\n Source surface blend mode set to SDL_BLENDMODE_BLEND:\n alpha-blend (using the source alpha-channel and per-surface alpha)\n SDL_SRCCOLORKEY ignored.\n Source surface blend mode set to SDL_BLENDMODE_NONE:\n copy all of RGBA to the destination.\n if SDL_SRCCOLORKEY set, only copy the pixels that do not match the\n RGB values of the source color key, ignoring alpha in the\n comparison.\n\n RGB->RGB:\n Source surface blend mode set to SDL_BLENDMODE_BLEND:\n alpha-blend (using the source per-surface alpha)\n Source surface blend mode set to SDL_BLENDMODE_NONE:\n copy RGB.\n both:\n if SDL_SRCCOLORKEY set, only copy the pixels that do not match the\n source color key.\n ```\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be\n copied, or NULL to copy the entire surface.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the x and y position in\n the destination surface, or NULL for (0,0). The width and\n height are ignored, and are copied from `srcrect`. If you\n want a specific width and height, you should use\n SDL_BlitSurfaceScaled().\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurfaceScaled\n"]
6270 pub fn SDL_BlitSurface(
6271 src: *mut SDL_Surface,
6272 srcrect: *const SDL_Rect,
6273 dst: *mut SDL_Surface,
6274 dstrect: *const SDL_Rect,
6275 ) -> bool;
6276}
6277unsafe extern "C" {
6278 #[doc = " Perform low-level surface blitting only.\n\n This is a semi-private blit function and it performs low-level surface\n blitting, assuming the input rectangles have already been clipped.\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be\n copied, may not be NULL.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the target rectangle in\n the destination surface, may not be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurface\n"]
6279 pub fn SDL_BlitSurfaceUnchecked(
6280 src: *mut SDL_Surface,
6281 srcrect: *const SDL_Rect,
6282 dst: *mut SDL_Surface,
6283 dstrect: *const SDL_Rect,
6284 ) -> bool;
6285}
6286unsafe extern "C" {
6287 #[doc = " Perform a scaled blit to a destination surface, which may be of a different\n format.\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be\n copied, or NULL to copy the entire surface.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the target rectangle in\n the destination surface, or NULL to fill the entire\n destination surface.\n **Parameter:** scaleMode the SDL_ScaleMode to be used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurface\n"]
6288 pub fn SDL_BlitSurfaceScaled(
6289 src: *mut SDL_Surface,
6290 srcrect: *const SDL_Rect,
6291 dst: *mut SDL_Surface,
6292 dstrect: *const SDL_Rect,
6293 scaleMode: SDL_ScaleMode,
6294 ) -> bool;
6295}
6296unsafe extern "C" {
6297 #[doc = " Perform low-level surface scaled blitting only.\n\n This is a semi-private function and it performs low-level surface blitting,\n assuming the input rectangles have already been clipped.\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be\n copied, may not be NULL.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the target rectangle in\n the destination surface, may not be NULL.\n **Parameter:** scaleMode the SDL_ScaleMode to be used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurfaceScaled\n"]
6298 pub fn SDL_BlitSurfaceUncheckedScaled(
6299 src: *mut SDL_Surface,
6300 srcrect: *const SDL_Rect,
6301 dst: *mut SDL_Surface,
6302 dstrect: *const SDL_Rect,
6303 scaleMode: SDL_ScaleMode,
6304 ) -> bool;
6305}
6306unsafe extern "C" {
6307 #[doc = " Perform a stretched pixel copy from one surface to another.\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be\n copied, or NULL to copy the entire surface.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the target rectangle in\n the destination surface, or NULL to fill the entire\n destination surface.\n **Parameter:** scaleMode the SDL_ScaleMode to be used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_BlitSurfaceScaled\n"]
6308 pub fn SDL_StretchSurface(
6309 src: *mut SDL_Surface,
6310 srcrect: *const SDL_Rect,
6311 dst: *mut SDL_Surface,
6312 dstrect: *const SDL_Rect,
6313 scaleMode: SDL_ScaleMode,
6314 ) -> bool;
6315}
6316unsafe extern "C" {
6317 #[doc = " Perform a tiled blit to a destination surface, which may be of a different\n format.\n\n The pixels in `srcrect` will be repeated as many times as needed to\n completely fill `dstrect`.\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be\n copied, or NULL to copy the entire surface.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the target rectangle in\n the destination surface, or NULL to fill the entire surface.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurface\n"]
6318 pub fn SDL_BlitSurfaceTiled(
6319 src: *mut SDL_Surface,
6320 srcrect: *const SDL_Rect,
6321 dst: *mut SDL_Surface,
6322 dstrect: *const SDL_Rect,
6323 ) -> bool;
6324}
6325unsafe extern "C" {
6326 #[doc = " Perform a scaled and tiled blit to a destination surface, which may be of a\n different format.\n\n The pixels in `srcrect` will be scaled and repeated as many times as needed\n to completely fill `dstrect`.\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be\n copied, or NULL to copy the entire surface.\n **Parameter:** scale the scale used to transform srcrect into the destination\n rectangle, e.g. a 32x32 texture with a scale of 2 would fill\n 64x64 tiles.\n **Parameter:** scaleMode scale algorithm to be used.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the target rectangle in\n the destination surface, or NULL to fill the entire surface.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurface\n"]
6327 pub fn SDL_BlitSurfaceTiledWithScale(
6328 src: *mut SDL_Surface,
6329 srcrect: *const SDL_Rect,
6330 scale: f32,
6331 scaleMode: SDL_ScaleMode,
6332 dst: *mut SDL_Surface,
6333 dstrect: *const SDL_Rect,
6334 ) -> bool;
6335}
6336unsafe extern "C" {
6337 #[doc = " Perform a scaled blit using the 9-grid algorithm to a destination surface,\n which may be of a different format.\n\n The pixels in the source surface are split into a 3x3 grid, using the\n different corner sizes for each corner, and the sides and center making up\n the remaining pixels. The corners are then scaled using `scale` and fit\n into the corners of the destination rectangle. The sides and center are\n then stretched into place to cover the remaining destination rectangle.\n\n **Parameter:** src the SDL_Surface structure to be copied from.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be used\n for the 9-grid, or NULL to use the entire surface.\n **Parameter:** left_width the width, in pixels, of the left corners in `srcrect`.\n **Parameter:** right_width the width, in pixels, of the right corners in `srcrect`.\n **Parameter:** top_height the height, in pixels, of the top corners in `srcrect`.\n **Parameter:** bottom_height the height, in pixels, of the bottom corners in\n `srcrect`.\n **Parameter:** scale the scale used to transform the corner of `srcrect` into the\n corner of `dstrect`, or 0.0f for an unscaled blit.\n **Parameter:** scaleMode scale algorithm to be used.\n **Parameter:** dst the SDL_Surface structure that is the blit target.\n **Parameter:** dstrect the SDL_Rect structure representing the target rectangle in\n the destination surface, or NULL to fill the entire surface.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** Only one thread should be using the `src` and `dst` surfaces\n at any given time.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitSurface\n"]
6338 pub fn SDL_BlitSurface9Grid(
6339 src: *mut SDL_Surface,
6340 srcrect: *const SDL_Rect,
6341 left_width: core::ffi::c_int,
6342 right_width: core::ffi::c_int,
6343 top_height: core::ffi::c_int,
6344 bottom_height: core::ffi::c_int,
6345 scale: f32,
6346 scaleMode: SDL_ScaleMode,
6347 dst: *mut SDL_Surface,
6348 dstrect: *const SDL_Rect,
6349 ) -> bool;
6350}
6351unsafe extern "C" {
6352 #[doc = " Map an RGB triple to an opaque pixel value for a surface.\n\n This function maps the RGB color value to the specified pixel format and\n returns the pixel value best approximating the given RGB color value for\n the given pixel format.\n\n If the surface has a palette, the index of the closest matching color in\n the palette will be returned.\n\n If the surface pixel format has an alpha component it will be returned as\n all 1 bits (fully opaque).\n\n If the pixel format bpp (color depth) is less than 32-bpp then the unused\n upper bits of the return value can safely be ignored (e.g., with a 16-bpp\n format the return value can be assigned to a Uint16, and similarly a Uint8\n for an 8-bpp format).\n\n **Parameter:** surface the surface to use for the pixel format and palette.\n **Parameter:** r the red component of the pixel in the range 0-255.\n **Parameter:** g the green component of the pixel in the range 0-255.\n **Parameter:** b the blue component of the pixel in the range 0-255.\n **Returns:** a pixel value.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MapSurfaceRGBA\n"]
6353 pub fn SDL_MapSurfaceRGB(surface: *mut SDL_Surface, r: Uint8, g: Uint8, b: Uint8) -> Uint32;
6354}
6355unsafe extern "C" {
6356 #[doc = " Map an RGBA quadruple to a pixel value for a surface.\n\n This function maps the RGBA color value to the specified pixel format and\n returns the pixel value best approximating the given RGBA color value for\n the given pixel format.\n\n If the surface pixel format has no alpha component the alpha value will be\n ignored (as it will be in formats with a palette).\n\n If the surface has a palette, the index of the closest matching color in\n the palette will be returned.\n\n If the pixel format bpp (color depth) is less than 32-bpp then the unused\n upper bits of the return value can safely be ignored (e.g., with a 16-bpp\n format the return value can be assigned to a Uint16, and similarly a Uint8\n for an 8-bpp format).\n\n **Parameter:** surface the surface to use for the pixel format and palette.\n **Parameter:** r the red component of the pixel in the range 0-255.\n **Parameter:** g the green component of the pixel in the range 0-255.\n **Parameter:** b the blue component of the pixel in the range 0-255.\n **Parameter:** a the alpha component of the pixel in the range 0-255.\n **Returns:** a pixel value.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MapSurfaceRGB\n"]
6357 pub fn SDL_MapSurfaceRGBA(
6358 surface: *mut SDL_Surface,
6359 r: Uint8,
6360 g: Uint8,
6361 b: Uint8,
6362 a: Uint8,
6363 ) -> Uint32;
6364}
6365unsafe extern "C" {
6366 #[doc = " Retrieves a single pixel from a surface.\n\n This function prioritizes correctness over speed: it is suitable for unit\n tests, but is not intended for use in a game engine.\n\n Like SDL_GetRGBA, this uses the entire 0..255 range when converting color\n components from pixel formats with less than 8 bits per RGB component.\n\n **Parameter:** surface the surface to read.\n **Parameter:** x the horizontal coordinate, 0 <= x < width.\n **Parameter:** y the vertical coordinate, 0 <= y < height.\n **Parameter:** r a pointer filled in with the red channel, 0-255, or NULL to ignore\n this channel.\n **Parameter:** g a pointer filled in with the green channel, 0-255, or NULL to\n ignore this channel.\n **Parameter:** b a pointer filled in with the blue channel, 0-255, or NULL to\n ignore this channel.\n **Parameter:** a a pointer filled in with the alpha channel, 0-255, or NULL to\n ignore this channel.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6367 pub fn SDL_ReadSurfacePixel(
6368 surface: *mut SDL_Surface,
6369 x: core::ffi::c_int,
6370 y: core::ffi::c_int,
6371 r: *mut Uint8,
6372 g: *mut Uint8,
6373 b: *mut Uint8,
6374 a: *mut Uint8,
6375 ) -> bool;
6376}
6377unsafe extern "C" {
6378 #[doc = " Retrieves a single pixel from a surface.\n\n This function prioritizes correctness over speed: it is suitable for unit\n tests, but is not intended for use in a game engine.\n\n **Parameter:** surface the surface to read.\n **Parameter:** x the horizontal coordinate, 0 <= x < width.\n **Parameter:** y the vertical coordinate, 0 <= y < height.\n **Parameter:** r a pointer filled in with the red channel, normally in the range\n 0-1, or NULL to ignore this channel.\n **Parameter:** g a pointer filled in with the green channel, normally in the range\n 0-1, or NULL to ignore this channel.\n **Parameter:** b a pointer filled in with the blue channel, normally in the range\n 0-1, or NULL to ignore this channel.\n **Parameter:** a a pointer filled in with the alpha channel, normally in the range\n 0-1, or NULL to ignore this channel.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6379 pub fn SDL_ReadSurfacePixelFloat(
6380 surface: *mut SDL_Surface,
6381 x: core::ffi::c_int,
6382 y: core::ffi::c_int,
6383 r: *mut f32,
6384 g: *mut f32,
6385 b: *mut f32,
6386 a: *mut f32,
6387 ) -> bool;
6388}
6389unsafe extern "C" {
6390 #[doc = " Writes a single pixel to a surface.\n\n This function prioritizes correctness over speed: it is suitable for unit\n tests, but is not intended for use in a game engine.\n\n Like SDL_MapRGBA, this uses the entire 0..255 range when converting color\n components from pixel formats with less than 8 bits per RGB component.\n\n **Parameter:** surface the surface to write.\n **Parameter:** x the horizontal coordinate, 0 <= x < width.\n **Parameter:** y the vertical coordinate, 0 <= y < height.\n **Parameter:** r the red channel value, 0-255.\n **Parameter:** g the green channel value, 0-255.\n **Parameter:** b the blue channel value, 0-255.\n **Parameter:** a the alpha channel value, 0-255.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6391 pub fn SDL_WriteSurfacePixel(
6392 surface: *mut SDL_Surface,
6393 x: core::ffi::c_int,
6394 y: core::ffi::c_int,
6395 r: Uint8,
6396 g: Uint8,
6397 b: Uint8,
6398 a: Uint8,
6399 ) -> bool;
6400}
6401unsafe extern "C" {
6402 #[doc = " Writes a single pixel to a surface.\n\n This function prioritizes correctness over speed: it is suitable for unit\n tests, but is not intended for use in a game engine.\n\n **Parameter:** surface the surface to write.\n **Parameter:** x the horizontal coordinate, 0 <= x < width.\n **Parameter:** y the vertical coordinate, 0 <= y < height.\n **Parameter:** r the red channel value, normally in the range 0-1.\n **Parameter:** g the green channel value, normally in the range 0-1.\n **Parameter:** b the blue channel value, normally in the range 0-1.\n **Parameter:** a the alpha channel value, normally in the range 0-1.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function can be called on different threads with\n different surfaces.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6403 pub fn SDL_WriteSurfacePixelFloat(
6404 surface: *mut SDL_Surface,
6405 x: core::ffi::c_int,
6406 y: core::ffi::c_int,
6407 r: f32,
6408 g: f32,
6409 b: f32,
6410 a: f32,
6411 ) -> bool;
6412}
6413#[doc = " This is a unique ID for a camera device for the time it is connected to the\n system, and is never reused for the lifetime of the application.\n\n If the device is disconnected and reconnected, it will get a new ID.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameras\n"]
6414pub type SDL_CameraID = Uint32;
6415#[repr(C)]
6416#[derive(Debug, Copy, Clone)]
6417pub struct SDL_Camera {
6418 _unused: [u8; 0],
6419}
6420#[doc = " The details of an output format for a camera device.\n\n Cameras often support multiple formats; each one will be encapsulated in\n this struct.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameraSupportedFormats\n **See Also:** SDL_GetCameraFormat\n"]
6421#[repr(C)]
6422#[derive(Debug, Copy, Clone, Hash)]
6423pub struct SDL_CameraSpec {
6424 #[doc = "< Frame format\n"]
6425 pub format: SDL_PixelFormat,
6426 #[doc = "< Frame colorspace\n"]
6427 pub colorspace: SDL_Colorspace,
6428 #[doc = "< Frame width\n"]
6429 pub width: core::ffi::c_int,
6430 #[doc = "< Frame height\n"]
6431 pub height: core::ffi::c_int,
6432 #[doc = "< Frame rate numerator ((num / denom) == FPS, (denom / num) == duration in seconds)\n"]
6433 pub framerate_numerator: core::ffi::c_int,
6434 #[doc = "< Frame rate denominator ((num / denom) == FPS, (denom / num) == duration in seconds)\n"]
6435 pub framerate_denominator: core::ffi::c_int,
6436}
6437#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6438const _: () = {
6439 ["Size of SDL_CameraSpec"][::core::mem::size_of::<SDL_CameraSpec>() - 24usize];
6440 ["Alignment of SDL_CameraSpec"][::core::mem::align_of::<SDL_CameraSpec>() - 4usize];
6441 ["Offset of field: SDL_CameraSpec::format"]
6442 [::core::mem::offset_of!(SDL_CameraSpec, format) - 0usize];
6443 ["Offset of field: SDL_CameraSpec::colorspace"]
6444 [::core::mem::offset_of!(SDL_CameraSpec, colorspace) - 4usize];
6445 ["Offset of field: SDL_CameraSpec::width"]
6446 [::core::mem::offset_of!(SDL_CameraSpec, width) - 8usize];
6447 ["Offset of field: SDL_CameraSpec::height"]
6448 [::core::mem::offset_of!(SDL_CameraSpec, height) - 12usize];
6449 ["Offset of field: SDL_CameraSpec::framerate_numerator"]
6450 [::core::mem::offset_of!(SDL_CameraSpec, framerate_numerator) - 16usize];
6451 ["Offset of field: SDL_CameraSpec::framerate_denominator"]
6452 [::core::mem::offset_of!(SDL_CameraSpec, framerate_denominator) - 20usize];
6453};
6454impl Default for SDL_CameraSpec {
6455 fn default() -> Self {
6456 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
6457 unsafe {
6458 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6459 s.assume_init()
6460 }
6461 }
6462}
6463impl SDL_CameraPosition {
6464 pub const SDL_CAMERA_POSITION_UNKNOWN: SDL_CameraPosition = SDL_CameraPosition(0);
6465 pub const SDL_CAMERA_POSITION_FRONT_FACING: SDL_CameraPosition = SDL_CameraPosition(1);
6466 pub const SDL_CAMERA_POSITION_BACK_FACING: SDL_CameraPosition = SDL_CameraPosition(2);
6467}
6468#[repr(transparent)]
6469#[doc = " The position of camera in relation to system device.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameraPosition\n"]
6470#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6471pub struct SDL_CameraPosition(pub core::ffi::c_uint);
6472impl SDL_CameraPermissionState {
6473 pub const SDL_CAMERA_PERMISSION_STATE_DENIED: SDL_CameraPermissionState =
6474 SDL_CameraPermissionState(-1);
6475 pub const SDL_CAMERA_PERMISSION_STATE_PENDING: SDL_CameraPermissionState =
6476 SDL_CameraPermissionState(0);
6477 pub const SDL_CAMERA_PERMISSION_STATE_APPROVED: SDL_CameraPermissionState =
6478 SDL_CameraPermissionState(1);
6479}
6480#[repr(transparent)]
6481#[doc = " The current state of a request for camera access.\n\n **Available Since:** This enum is available since SDL 3.4.0.\n\n **See Also:** SDL_GetCameraPermissionState\n"]
6482#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6483pub struct SDL_CameraPermissionState(pub core::ffi::c_int);
6484unsafe extern "C" {
6485 #[doc = " Use this function to get the number of built-in camera drivers.\n\n This function returns a hardcoded number. This never returns a negative\n value; if there are no drivers compiled into this build of SDL, this\n function returns zero. The presence of a driver in this list does not mean\n it will function, it just means SDL is capable of interacting with that\n interface. For example, a build of SDL might have v4l2 support, but if\n there's no kernel support available, SDL's v4l2 driver would fail if used.\n\n By default, SDL tries all drivers, in its preferred order, until one is\n found to be usable.\n\n **Returns:** the number of built-in camera drivers.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameraDriver\n"]
6486 pub fn SDL_GetNumCameraDrivers() -> core::ffi::c_int;
6487}
6488unsafe extern "C" {
6489 #[doc = " Use this function to get the name of a built in camera driver.\n\n The list of camera drivers is given in the order that they are normally\n initialized by default; the drivers that seem more reasonable to choose\n first (as far as the SDL developers believe) are earlier in the list.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"v4l2\",\n \"coremedia\" or \"android\". These never have Unicode characters, and are not\n meant to be proper names.\n\n **Parameter:** index the index of the camera driver; the value ranges from 0 to\n SDL_GetNumCameraDrivers() - 1.\n **Returns:** the name of the camera driver at the requested index, or NULL if\n an invalid index was specified.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumCameraDrivers\n"]
6490 pub fn SDL_GetCameraDriver(index: core::ffi::c_int) -> *const core::ffi::c_char;
6491}
6492unsafe extern "C" {
6493 #[doc = " Get the name of the current camera driver.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"v4l2\",\n \"coremedia\" or \"android\". These never have Unicode characters, and are not\n meant to be proper names.\n\n **Returns:** the name of the current camera driver or NULL if no driver has\n been initialized.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6494 pub fn SDL_GetCurrentCameraDriver() -> *const core::ffi::c_char;
6495}
6496unsafe extern "C" {
6497 #[doc = " Get a list of currently connected camera devices.\n\n **Parameter:** count a pointer filled in with the number of cameras returned, may\n be NULL.\n **Returns:** a 0 terminated array of camera instance IDs or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenCamera\n"]
6498 pub fn SDL_GetCameras(count: *mut core::ffi::c_int) -> *mut SDL_CameraID;
6499}
6500unsafe extern "C" {
6501 #[doc = " Get the list of native formats/sizes a camera supports.\n\n This returns a list of all formats and frame sizes that a specific camera\n can offer. This is useful if your app can accept a variety of image formats\n and sizes and so want to find the optimal spec that doesn't require\n conversion.\n\n This function isn't strictly required; if you call SDL_OpenCamera with a\n NULL spec, SDL will choose a native format for you, and if you instead\n specify a desired format, it will transparently convert to the requested\n format on your behalf.\n\n If `count` is not NULL, it will be filled with the number of elements in\n the returned array.\n\n Note that it's legal for a camera to supply an empty list. This is what\n will happen on Emscripten builds, since that platform won't tell _anything_\n about available cameras until you've opened one, and won't even tell if\n there _is_ a camera until the user has given you permission to check\n through a scary warning popup.\n\n **Parameter:** instance_id the camera device instance ID.\n **Parameter:** count a pointer filled in with the number of elements in the list,\n may be NULL.\n **Returns:** a NULL terminated array of pointers to SDL_CameraSpec or NULL on\n failure; call SDL_GetError() for more information. This is a\n single allocation that should be freed with SDL_free() when it is\n no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameras\n **See Also:** SDL_OpenCamera\n"]
6502 pub fn SDL_GetCameraSupportedFormats(
6503 instance_id: SDL_CameraID,
6504 count: *mut core::ffi::c_int,
6505 ) -> *mut *mut SDL_CameraSpec;
6506}
6507unsafe extern "C" {
6508 #[doc = " Get the human-readable device name for a camera.\n\n **Parameter:** instance_id the camera device instance ID.\n **Returns:** a human-readable device name or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameras\n"]
6509 pub fn SDL_GetCameraName(instance_id: SDL_CameraID) -> *const core::ffi::c_char;
6510}
6511unsafe extern "C" {
6512 #[doc = " Get the position of the camera in relation to the system.\n\n Most platforms will report UNKNOWN, but mobile devices, like phones, can\n often make a distinction between cameras on the front of the device (that\n points towards the user, for taking \"selfies\") and cameras on the back (for\n filming in the direction the user is facing).\n\n **Parameter:** instance_id the camera device instance ID.\n **Returns:** the position of the camera on the system hardware.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameras\n"]
6513 pub fn SDL_GetCameraPosition(instance_id: SDL_CameraID) -> SDL_CameraPosition;
6514}
6515unsafe extern "C" {
6516 #[doc = " Open a video recording device (a \"camera\").\n\n You can open the device with any reasonable spec, and if the hardware can't\n directly support it, it will convert data seamlessly to the requested\n format. This might incur overhead, including scaling of image data.\n\n If you would rather accept whatever format the device offers, you can pass\n a NULL spec here and it will choose one for you (and you can use\n SDL_Surface's conversion/scaling functions directly if necessary).\n\n You can call SDL_GetCameraFormat() to get the actual data format if passing\n a NULL spec here. You can see the exact specs a device can support without\n conversion with SDL_GetCameraSupportedFormats().\n\n SDL will not attempt to emulate framerate; it will try to set the hardware\n to the rate closest to the requested speed, but it won't attempt to limit\n or duplicate frames artificially; call SDL_GetCameraFormat() to see the\n actual framerate of the opened the device, and check your timestamps if\n this is crucial to your app!\n\n Note that the camera is not usable until the user approves its use! On some\n platforms, the operating system will prompt the user to permit access to\n the camera, and they can choose Yes or No at that point. Until they do, the\n camera will not be usable. The app should either wait for an\n SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event,\n or poll SDL_GetCameraPermissionState() occasionally until it returns\n non-zero. On platforms that don't require explicit user approval (and\n perhaps in places where the user previously permitted access), the approval\n event might come immediately, but it might come seconds, minutes, or hours\n later!\n\n **Parameter:** instance_id the camera device instance ID.\n **Parameter:** spec the desired format for data the device will provide. Can be\n NULL.\n **Returns:** an SDL_Camera object or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCameras\n **See Also:** SDL_GetCameraFormat\n"]
6517 pub fn SDL_OpenCamera(
6518 instance_id: SDL_CameraID,
6519 spec: *const SDL_CameraSpec,
6520 ) -> *mut SDL_Camera;
6521}
6522unsafe extern "C" {
6523 #[doc = " Query if camera access has been approved by the user.\n\n Cameras will not function between when the device is opened by the app and\n when the user permits access to the hardware. On some platforms, this\n presents as a popup dialog where the user has to explicitly approve access;\n on others the approval might be implicit and not alert the user at all.\n\n This function can be used to check the status of that approval. It will\n return SDL_CAMERA_PERMISSION_STATE_PENDING if waiting for user response,\n SDL_CAMERA_PERMISSION_STATE_APPROVED if the camera is approved for use, and\n SDL_CAMERA_PERMISSION_STATE_DENIED if the user denied access.\n\n Instead of polling with this function, you can wait for a\n SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event\n in the standard SDL event loop, which is guaranteed to be sent once when\n permission to use the camera is decided.\n\n If a camera is declined, there's nothing to be done but call\n SDL_CloseCamera() to dispose of it.\n\n **Parameter:** camera the opened camera device to query.\n **Returns:** an SDL_CameraPermissionState value indicating if access is\n granted, or `SDL_CAMERA_PERMISSION_STATE_PENDING` if the decision\n is still pending.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenCamera\n **See Also:** SDL_CloseCamera\n"]
6524 pub fn SDL_GetCameraPermissionState(camera: *mut SDL_Camera) -> SDL_CameraPermissionState;
6525}
6526unsafe extern "C" {
6527 #[doc = " Get the instance ID of an opened camera.\n\n **Parameter:** camera an SDL_Camera to query.\n **Returns:** the instance ID of the specified camera on success or 0 on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenCamera\n"]
6528 pub fn SDL_GetCameraID(camera: *mut SDL_Camera) -> SDL_CameraID;
6529}
6530unsafe extern "C" {
6531 #[doc = " Get the properties associated with an opened camera.\n\n **Parameter:** camera the SDL_Camera obtained from SDL_OpenCamera().\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6532 pub fn SDL_GetCameraProperties(camera: *mut SDL_Camera) -> SDL_PropertiesID;
6533}
6534unsafe extern "C" {
6535 #[doc = " Get the spec that a camera is using when generating images.\n\n Note that this might not be the native format of the hardware, as SDL might\n be converting to this format behind the scenes.\n\n If the system is waiting for the user to approve access to the camera, as\n some platforms require, this will return false, but this isn't necessarily\n a fatal error; you should either wait for an\n SDL_EVENT_CAMERA_DEVICE_APPROVED (or SDL_EVENT_CAMERA_DEVICE_DENIED) event,\n or poll SDL_GetCameraPermissionState() occasionally until it returns\n non-zero.\n\n **Parameter:** camera opened camera device.\n **Parameter:** spec the SDL_CameraSpec to be initialized by this function.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenCamera\n"]
6536 pub fn SDL_GetCameraFormat(camera: *mut SDL_Camera, spec: *mut SDL_CameraSpec) -> bool;
6537}
6538unsafe extern "C" {
6539 #[doc = " Acquire a frame.\n\n The frame is a memory pointer to the image data, whose size and format are\n given by the spec requested when opening the device.\n\n This is a non blocking API. If there is a frame available, a non-NULL\n surface is returned, and timestampNS will be filled with a non-zero value.\n\n Note that an error case can also return NULL, but a NULL by itself is\n normal and just signifies that a new frame is not yet available. Note that\n even if a camera device fails outright (a USB camera is unplugged while in\n use, etc), SDL will send an event separately to notify the app, but\n continue to provide blank frames at ongoing intervals until\n SDL_CloseCamera() is called, so real failure here is almost always an out\n of memory condition.\n\n After use, the frame should be released with SDL_ReleaseCameraFrame(). If\n you don't do this, the system may stop providing more video!\n\n Do not call SDL_DestroySurface() on the returned surface! It must be given\n back to the camera subsystem with SDL_ReleaseCameraFrame!\n\n If the system is waiting for the user to approve access to the camera, as\n some platforms require, this will return NULL (no frames available); you\n should either wait for an SDL_EVENT_CAMERA_DEVICE_APPROVED (or\n SDL_EVENT_CAMERA_DEVICE_DENIED) event, or poll\n SDL_GetCameraPermissionState() occasionally until it returns non-zero.\n\n **Parameter:** camera opened camera device.\n **Parameter:** timestampNS a pointer filled in with the frame's timestamp, or 0 on\n error. Can be NULL.\n **Returns:** a new frame of video on success, NULL if none is currently\n available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ReleaseCameraFrame\n"]
6540 pub fn SDL_AcquireCameraFrame(
6541 camera: *mut SDL_Camera,
6542 timestampNS: *mut Uint64,
6543 ) -> *mut SDL_Surface;
6544}
6545unsafe extern "C" {
6546 #[doc = " Release a frame of video acquired from a camera.\n\n Let the back-end reuse the internal buffer for camera.\n\n This function _must_ be called only on surface objects returned by\n SDL_AcquireCameraFrame(). This function should be called as quickly as\n possible after acquisition, as SDL keeps a small FIFO queue of surfaces for\n video frames; if surfaces aren't released in a timely manner, SDL may drop\n upcoming video frames from the camera.\n\n If the app needs to keep the surface for a significant time, they should\n make a copy of it and release the original.\n\n The app should not use the surface again after calling this function;\n assume the surface is freed and the pointer is invalid.\n\n **Parameter:** camera opened camera device.\n **Parameter:** frame the video frame surface to release.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AcquireCameraFrame\n"]
6547 pub fn SDL_ReleaseCameraFrame(camera: *mut SDL_Camera, frame: *mut SDL_Surface);
6548}
6549unsafe extern "C" {
6550 #[doc = " Use this function to shut down camera processing and close the camera\n device.\n\n **Parameter:** camera opened camera device.\n\n **Thread Safety:** It is safe to call this function from any thread, but no\n thread may reference `device` once this function is called.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenCamera\n"]
6551 pub fn SDL_CloseCamera(camera: *mut SDL_Camera);
6552}
6553unsafe extern "C" {
6554 #[doc = " Put UTF-8 text into the clipboard.\n\n **Parameter:** text the text to store in the clipboard.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetClipboardText\n **See Also:** SDL_HasClipboardText\n"]
6555 pub fn SDL_SetClipboardText(text: *const core::ffi::c_char) -> bool;
6556}
6557unsafe extern "C" {
6558 #[doc = " Get UTF-8 text from the clipboard.\n\n This function returns an empty string if there is not enough memory left\n for a copy of the clipboard's content.\n\n **Returns:** the clipboard text on success or an empty string on failure; call\n SDL_GetError() for more information. This should be freed with\n SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasClipboardText\n **See Also:** SDL_SetClipboardText\n"]
6559 pub fn SDL_GetClipboardText() -> *mut core::ffi::c_char;
6560}
6561unsafe extern "C" {
6562 #[doc = " Query whether the clipboard exists and contains a non-empty text string.\n\n **Returns:** true if the clipboard has text, or false if it does not.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetClipboardText\n **See Also:** SDL_SetClipboardText\n"]
6563 pub fn SDL_HasClipboardText() -> bool;
6564}
6565unsafe extern "C" {
6566 #[doc = " Put UTF-8 text into the primary selection.\n\n **Parameter:** text the text to store in the primary selection.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPrimarySelectionText\n **See Also:** SDL_HasPrimarySelectionText\n"]
6567 pub fn SDL_SetPrimarySelectionText(text: *const core::ffi::c_char) -> bool;
6568}
6569unsafe extern "C" {
6570 #[doc = " Get UTF-8 text from the primary selection.\n\n This function returns an empty string if there is not enough memory left\n for a copy of the primary selection's content.\n\n **Returns:** the primary selection text on success or an empty string on\n failure; call SDL_GetError() for more information. This should be\n freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasPrimarySelectionText\n **See Also:** SDL_SetPrimarySelectionText\n"]
6571 pub fn SDL_GetPrimarySelectionText() -> *mut core::ffi::c_char;
6572}
6573unsafe extern "C" {
6574 #[doc = " Query whether the primary selection exists and contains a non-empty text\n string.\n\n **Returns:** true if the primary selection has text, or false if it does not.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPrimarySelectionText\n **See Also:** SDL_SetPrimarySelectionText\n"]
6575 pub fn SDL_HasPrimarySelectionText() -> bool;
6576}
6577#[doc = " Callback function that will be called when data for the specified mime-type\n is requested by the OS.\n\n The callback function is called with NULL as the mime_type when the\n clipboard is cleared or new data is set. The clipboard is automatically\n cleared in SDL_Quit().\n\n **Parameter:** userdata a pointer to the provided user data.\n **Parameter:** mime_type the requested mime-type.\n **Parameter:** size a pointer filled in with the length of the returned data.\n **Returns:** a pointer to the data for the provided mime-type. Returning NULL\n or setting the length to 0 will cause zero length data to be sent\n to the \"receiver\", which should be able to handle this. The\n returned data will not be freed, so it needs to be retained and\n dealt with internally.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetClipboardData\n"]
6578pub type SDL_ClipboardDataCallback = ::core::option::Option<
6579 unsafe extern "C" fn(
6580 userdata: *mut core::ffi::c_void,
6581 mime_type: *const core::ffi::c_char,
6582 size: *mut usize,
6583 ) -> *const core::ffi::c_void,
6584>;
6585#[doc = " Callback function that will be called when the clipboard is cleared, or\n when new data is set.\n\n **Parameter:** userdata a pointer to the provided user data.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetClipboardData\n"]
6586pub type SDL_ClipboardCleanupCallback =
6587 ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void)>;
6588unsafe extern "C" {
6589 #[doc = " Offer clipboard data to the OS.\n\n Tell the operating system that the application is offering clipboard data\n for each of the provided mime-types. Once another application requests the\n data the callback function will be called, allowing it to generate and\n respond with the data for the requested mime-type.\n\n The size of text data does not include any terminator, and the text does\n not need to be null-terminated (e.g., you can directly copy a portion of a\n document).\n\n **Parameter:** callback a function pointer to the function that provides the\n clipboard data.\n **Parameter:** cleanup a function pointer to the function that cleans up the\n clipboard data.\n **Parameter:** userdata an opaque pointer that will be forwarded to the callbacks.\n **Parameter:** mime_types a list of mime-types that are being offered. SDL copies\n the given list.\n **Parameter:** num_mime_types the number of mime-types in the mime_types list.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClearClipboardData\n **See Also:** SDL_GetClipboardData\n **See Also:** SDL_HasClipboardData\n"]
6590 pub fn SDL_SetClipboardData(
6591 callback: SDL_ClipboardDataCallback,
6592 cleanup: SDL_ClipboardCleanupCallback,
6593 userdata: *mut core::ffi::c_void,
6594 mime_types: *mut *const core::ffi::c_char,
6595 num_mime_types: usize,
6596 ) -> bool;
6597}
6598unsafe extern "C" {
6599 #[doc = " Clear the clipboard data.\n\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetClipboardData\n"]
6600 pub fn SDL_ClearClipboardData() -> bool;
6601}
6602unsafe extern "C" {
6603 #[doc = " Get the data from the clipboard for a given mime type.\n\n The size of text data does not include the terminator, but the text is\n guaranteed to be null-terminated.\n\n **Parameter:** mime_type the mime type to read from the clipboard.\n **Parameter:** size a pointer filled in with the length of the returned data.\n **Returns:** the retrieved data buffer or NULL on failure; call SDL_GetError()\n for more information. This should be freed with SDL_free() when it\n is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasClipboardData\n **See Also:** SDL_SetClipboardData\n"]
6604 pub fn SDL_GetClipboardData(
6605 mime_type: *const core::ffi::c_char,
6606 size: *mut usize,
6607 ) -> *mut core::ffi::c_void;
6608}
6609unsafe extern "C" {
6610 #[doc = " Query whether there is data in the clipboard for the provided mime type.\n\n **Parameter:** mime_type the mime type to check for data.\n **Returns:** true if data exists in the clipboard for the provided mime type,\n false if it does not.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetClipboardData\n **See Also:** SDL_GetClipboardData\n"]
6611 pub fn SDL_HasClipboardData(mime_type: *const core::ffi::c_char) -> bool;
6612}
6613unsafe extern "C" {
6614 #[doc = " Retrieve the list of mime types available in the clipboard.\n\n **Parameter:** num_mime_types a pointer filled with the number of mime types, may\n be NULL.\n **Returns:** a null-terminated array of strings with mime types, or NULL on\n failure; call SDL_GetError() for more information. This should be\n freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetClipboardData\n"]
6615 pub fn SDL_GetClipboardMimeTypes(num_mime_types: *mut usize) -> *mut *mut core::ffi::c_char;
6616}
6617unsafe extern "C" {
6618 #[doc = " Get the number of logical CPU cores available.\n\n **Returns:** the total number of logical CPU cores. On CPUs that include\n technologies such as hyperthreading, the number of logical cores\n may be more than the number of physical cores.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6619 pub fn SDL_GetNumLogicalCPUCores() -> core::ffi::c_int;
6620}
6621unsafe extern "C" {
6622 #[doc = " Determine the L1 cache line size of the CPU.\n\n This is useful for determining multi-threaded structure padding or SIMD\n prefetch sizes.\n\n **Returns:** the L1 cache line size of the CPU, in bytes.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6623 pub fn SDL_GetCPUCacheLineSize() -> core::ffi::c_int;
6624}
6625unsafe extern "C" {
6626 #[doc = " Determine whether the CPU has AltiVec features.\n\n This always returns false on CPUs that aren't using PowerPC instruction\n sets.\n\n **Returns:** true if the CPU has AltiVec features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6627 pub fn SDL_HasAltiVec() -> bool;
6628}
6629unsafe extern "C" {
6630 #[doc = " Determine whether the CPU has MMX features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has MMX features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6631 pub fn SDL_HasMMX() -> bool;
6632}
6633unsafe extern "C" {
6634 #[doc = " Determine whether the CPU has SSE features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has SSE features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasSSE2\n **See Also:** SDL_HasSSE3\n **See Also:** SDL_HasSSE41\n **See Also:** SDL_HasSSE42\n"]
6635 pub fn SDL_HasSSE() -> bool;
6636}
6637unsafe extern "C" {
6638 #[doc = " Determine whether the CPU has SSE2 features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has SSE2 features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasSSE\n **See Also:** SDL_HasSSE3\n **See Also:** SDL_HasSSE41\n **See Also:** SDL_HasSSE42\n"]
6639 pub fn SDL_HasSSE2() -> bool;
6640}
6641unsafe extern "C" {
6642 #[doc = " Determine whether the CPU has SSE3 features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has SSE3 features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasSSE\n **See Also:** SDL_HasSSE2\n **See Also:** SDL_HasSSE41\n **See Also:** SDL_HasSSE42\n"]
6643 pub fn SDL_HasSSE3() -> bool;
6644}
6645unsafe extern "C" {
6646 #[doc = " Determine whether the CPU has SSE4.1 features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has SSE4.1 features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasSSE\n **See Also:** SDL_HasSSE2\n **See Also:** SDL_HasSSE3\n **See Also:** SDL_HasSSE42\n"]
6647 pub fn SDL_HasSSE41() -> bool;
6648}
6649unsafe extern "C" {
6650 #[doc = " Determine whether the CPU has SSE4.2 features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has SSE4.2 features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasSSE\n **See Also:** SDL_HasSSE2\n **See Also:** SDL_HasSSE3\n **See Also:** SDL_HasSSE41\n"]
6651 pub fn SDL_HasSSE42() -> bool;
6652}
6653unsafe extern "C" {
6654 #[doc = " Determine whether the CPU has AVX features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has AVX features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasAVX2\n **See Also:** SDL_HasAVX512F\n"]
6655 pub fn SDL_HasAVX() -> bool;
6656}
6657unsafe extern "C" {
6658 #[doc = " Determine whether the CPU has AVX2 features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has AVX2 features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasAVX\n **See Also:** SDL_HasAVX512F\n"]
6659 pub fn SDL_HasAVX2() -> bool;
6660}
6661unsafe extern "C" {
6662 #[doc = " Determine whether the CPU has AVX-512F (foundation) features.\n\n This always returns false on CPUs that aren't using Intel instruction sets.\n\n **Returns:** true if the CPU has AVX-512F features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasAVX\n **See Also:** SDL_HasAVX2\n"]
6663 pub fn SDL_HasAVX512F() -> bool;
6664}
6665unsafe extern "C" {
6666 #[doc = " Determine whether the CPU has ARM SIMD (ARMv6) features.\n\n This is different from ARM NEON, which is a different instruction set.\n\n This always returns false on CPUs that aren't using ARM instruction sets.\n\n **Returns:** true if the CPU has ARM SIMD features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasNEON\n"]
6667 pub fn SDL_HasARMSIMD() -> bool;
6668}
6669unsafe extern "C" {
6670 #[doc = " Determine whether the CPU has NEON (ARM SIMD) features.\n\n This always returns false on CPUs that aren't using ARM instruction sets.\n\n **Returns:** true if the CPU has ARM NEON features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6671 pub fn SDL_HasNEON() -> bool;
6672}
6673unsafe extern "C" {
6674 #[doc = " Determine whether the CPU has LSX (LOONGARCH SIMD) features.\n\n This always returns false on CPUs that aren't using LOONGARCH instruction\n sets.\n\n **Returns:** true if the CPU has LOONGARCH LSX features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6675 pub fn SDL_HasLSX() -> bool;
6676}
6677unsafe extern "C" {
6678 #[doc = " Determine whether the CPU has LASX (LOONGARCH SIMD) features.\n\n This always returns false on CPUs that aren't using LOONGARCH instruction\n sets.\n\n **Returns:** true if the CPU has LOONGARCH LASX features or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6679 pub fn SDL_HasLASX() -> bool;
6680}
6681unsafe extern "C" {
6682 #[doc = " Get the amount of RAM configured in the system.\n\n **Returns:** the amount of RAM configured in the system in MiB.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6683 pub fn SDL_GetSystemRAM() -> core::ffi::c_int;
6684}
6685unsafe extern "C" {
6686 #[doc = " Report the alignment this system needs for SIMD allocations.\n\n This will return the minimum number of bytes to which a pointer must be\n aligned to be compatible with SIMD instructions on the current machine. For\n example, if the machine supports SSE only, it will return 16, but if it\n supports AVX-512F, it'll return 64 (etc). This only reports values for\n instruction sets SDL knows about, so if your SDL build doesn't have\n SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and\n not 64 for the AVX-512 instructions that exist but SDL doesn't know about.\n Plan accordingly.\n\n **Returns:** the alignment in bytes needed for available, known SIMD\n instructions.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_aligned_alloc\n **See Also:** SDL_aligned_free\n"]
6687 pub fn SDL_GetSIMDAlignment() -> usize;
6688}
6689unsafe extern "C" {
6690 #[doc = " Report the size of a page of memory.\n\n Different platforms might have different memory page sizes. In current\n times, 4 kilobytes is not unusual, but newer systems are moving to larger\n page sizes, and esoteric platforms might have any unexpected size.\n\n Note that this function can return 0, which means SDL can't determine the\n page size on this platform. It will _not_ set an error string to be\n retrieved with SDL_GetError() in this case! In this case, defaulting to\n 4096 is often a reasonable option.\n\n **Returns:** the size of a single page of memory, in bytes, or 0 if SDL can't\n determine this information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
6691 pub fn SDL_GetSystemPageSize() -> core::ffi::c_int;
6692}
6693#[doc = " This is a unique ID for a display for the time it is connected to the\n system, and is never reused for the lifetime of the application.\n\n If the display is disconnected and reconnected, it will get a new ID.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6694pub type SDL_DisplayID = Uint32;
6695#[doc = " This is a unique ID for a window.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6696pub type SDL_WindowID = Uint32;
6697impl SDL_SystemTheme {
6698 #[doc = "< Unknown system theme\n"]
6699 pub const SDL_SYSTEM_THEME_UNKNOWN: SDL_SystemTheme = SDL_SystemTheme(0);
6700 #[doc = "< Light colored system theme\n"]
6701 pub const SDL_SYSTEM_THEME_LIGHT: SDL_SystemTheme = SDL_SystemTheme(1);
6702 #[doc = "< Dark colored system theme\n"]
6703 pub const SDL_SYSTEM_THEME_DARK: SDL_SystemTheme = SDL_SystemTheme(2);
6704}
6705#[repr(transparent)]
6706#[doc = " System theme.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
6707#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6708pub struct SDL_SystemTheme(pub core::ffi::c_uint);
6709#[repr(C)]
6710#[derive(Debug, Copy, Clone)]
6711pub struct SDL_DisplayModeData {
6712 _unused: [u8; 0],
6713}
6714#[doc = " The structure that defines a display mode.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GetFullscreenDisplayModes\n **See Also:** SDL_GetDesktopDisplayMode\n **See Also:** SDL_GetCurrentDisplayMode\n **See Also:** SDL_SetWindowFullscreenMode\n **See Also:** SDL_GetWindowFullscreenMode\n"]
6715#[repr(C)]
6716#[derive(Debug, Copy, Clone)]
6717pub struct SDL_DisplayMode {
6718 #[doc = "< the display this mode is associated with\n"]
6719 pub displayID: SDL_DisplayID,
6720 #[doc = "< pixel format\n"]
6721 pub format: SDL_PixelFormat,
6722 #[doc = "< width\n"]
6723 pub w: core::ffi::c_int,
6724 #[doc = "< height\n"]
6725 pub h: core::ffi::c_int,
6726 #[doc = "< scale converting size to pixels (e.g. a 1920x1080 mode with 2.0 scale would have 3840x2160 pixels)\n"]
6727 pub pixel_density: f32,
6728 #[doc = "< refresh rate (or 0.0f for unspecified)\n"]
6729 pub refresh_rate: f32,
6730 #[doc = "< precise refresh rate numerator (or 0 for unspecified)\n"]
6731 pub refresh_rate_numerator: core::ffi::c_int,
6732 #[doc = "< precise refresh rate denominator\n"]
6733 pub refresh_rate_denominator: core::ffi::c_int,
6734 #[doc = "< Private\n"]
6735 pub internal: *mut SDL_DisplayModeData,
6736}
6737#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6738const _: () = {
6739 ["Size of SDL_DisplayMode"][::core::mem::size_of::<SDL_DisplayMode>() - 40usize];
6740 ["Alignment of SDL_DisplayMode"][::core::mem::align_of::<SDL_DisplayMode>() - 8usize];
6741 ["Offset of field: SDL_DisplayMode::displayID"]
6742 [::core::mem::offset_of!(SDL_DisplayMode, displayID) - 0usize];
6743 ["Offset of field: SDL_DisplayMode::format"]
6744 [::core::mem::offset_of!(SDL_DisplayMode, format) - 4usize];
6745 ["Offset of field: SDL_DisplayMode::w"][::core::mem::offset_of!(SDL_DisplayMode, w) - 8usize];
6746 ["Offset of field: SDL_DisplayMode::h"][::core::mem::offset_of!(SDL_DisplayMode, h) - 12usize];
6747 ["Offset of field: SDL_DisplayMode::pixel_density"]
6748 [::core::mem::offset_of!(SDL_DisplayMode, pixel_density) - 16usize];
6749 ["Offset of field: SDL_DisplayMode::refresh_rate"]
6750 [::core::mem::offset_of!(SDL_DisplayMode, refresh_rate) - 20usize];
6751 ["Offset of field: SDL_DisplayMode::refresh_rate_numerator"]
6752 [::core::mem::offset_of!(SDL_DisplayMode, refresh_rate_numerator) - 24usize];
6753 ["Offset of field: SDL_DisplayMode::refresh_rate_denominator"]
6754 [::core::mem::offset_of!(SDL_DisplayMode, refresh_rate_denominator) - 28usize];
6755 ["Offset of field: SDL_DisplayMode::internal"]
6756 [::core::mem::offset_of!(SDL_DisplayMode, internal) - 32usize];
6757};
6758impl Default for SDL_DisplayMode {
6759 fn default() -> Self {
6760 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
6761 unsafe {
6762 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6763 s.assume_init()
6764 }
6765 }
6766}
6767impl SDL_DisplayOrientation {
6768 #[doc = "< The display orientation can't be determined\n"]
6769 pub const SDL_ORIENTATION_UNKNOWN: SDL_DisplayOrientation = SDL_DisplayOrientation(0);
6770 #[doc = "< The display is in landscape mode, with the right side up, relative to portrait mode\n"]
6771 pub const SDL_ORIENTATION_LANDSCAPE: SDL_DisplayOrientation = SDL_DisplayOrientation(1);
6772 #[doc = "< The display is in landscape mode, with the left side up, relative to portrait mode\n"]
6773 pub const SDL_ORIENTATION_LANDSCAPE_FLIPPED: SDL_DisplayOrientation = SDL_DisplayOrientation(2);
6774 #[doc = "< The display is in portrait mode\n"]
6775 pub const SDL_ORIENTATION_PORTRAIT: SDL_DisplayOrientation = SDL_DisplayOrientation(3);
6776 #[doc = "< The display is in portrait mode, upside down\n"]
6777 pub const SDL_ORIENTATION_PORTRAIT_FLIPPED: SDL_DisplayOrientation = SDL_DisplayOrientation(4);
6778}
6779#[repr(transparent)]
6780#[doc = " Display orientation values; the way a display is rotated.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
6781#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6782pub struct SDL_DisplayOrientation(pub core::ffi::c_uint);
6783#[repr(C)]
6784#[derive(Debug, Copy, Clone)]
6785pub struct SDL_Window {
6786 _unused: [u8; 0],
6787}
6788#[doc = " The flags on a window.\n\n These cover a lot of true/false, or on/off, window state. Some of it is\n immutable after being set through SDL_CreateWindow(), some of it can be\n changed on existing windows by the app, and some of it might be altered by\n the user or system outside of the app's control.\n\n When creating windows with `SDL_WINDOW_RESIZABLE`, SDL will constrain\n resizable windows to the dimensions recommended by the compositor to fit it\n within the usable desktop space, although some compositors will do this\n automatically without intervention as well. Use `SDL_SetWindowResizable`\n after creation instead if you wish to create a window with a specific size.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowFlags\n"]
6789pub type SDL_WindowFlags = Uint64;
6790impl SDL_FlashOperation {
6791 #[doc = "< Cancel any window flash state\n"]
6792 pub const SDL_FLASH_CANCEL: SDL_FlashOperation = SDL_FlashOperation(0);
6793 #[doc = "< Flash the window briefly to get attention\n"]
6794 pub const SDL_FLASH_BRIEFLY: SDL_FlashOperation = SDL_FlashOperation(1);
6795 #[doc = "< Flash the window until it gets focus\n"]
6796 pub const SDL_FLASH_UNTIL_FOCUSED: SDL_FlashOperation = SDL_FlashOperation(2);
6797}
6798#[repr(transparent)]
6799#[doc = " Window flash operation.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
6800#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6801pub struct SDL_FlashOperation(pub core::ffi::c_uint);
6802impl SDL_ProgressState {
6803 #[doc = "< An invalid progress state indicating an error; check SDL_GetError()\n"]
6804 pub const SDL_PROGRESS_STATE_INVALID: SDL_ProgressState = SDL_ProgressState(-1);
6805 #[doc = "< No progress bar is shown\n"]
6806 pub const SDL_PROGRESS_STATE_NONE: SDL_ProgressState = SDL_ProgressState(0);
6807 #[doc = "< The progress bar is shown in a indeterminate state\n"]
6808 pub const SDL_PROGRESS_STATE_INDETERMINATE: SDL_ProgressState = SDL_ProgressState(1);
6809 #[doc = "< The progress bar is shown in a normal state\n"]
6810 pub const SDL_PROGRESS_STATE_NORMAL: SDL_ProgressState = SDL_ProgressState(2);
6811 #[doc = "< The progress bar is shown in a paused state\n"]
6812 pub const SDL_PROGRESS_STATE_PAUSED: SDL_ProgressState = SDL_ProgressState(3);
6813 #[doc = "< The progress bar is shown in a state indicating the application had an error\n"]
6814 pub const SDL_PROGRESS_STATE_ERROR: SDL_ProgressState = SDL_ProgressState(4);
6815}
6816#[repr(transparent)]
6817#[doc = " Window progress state\n\n **Available Since:** This enum is available since SDL 3.2.8.\n"]
6818#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6819pub struct SDL_ProgressState(pub core::ffi::c_int);
6820#[repr(C)]
6821#[derive(Debug, Copy, Clone)]
6822pub struct SDL_GLContextState {
6823 _unused: [u8; 0],
6824}
6825#[doc = " An opaque handle to an OpenGL context.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_CreateContext\n **See Also:** SDL_GL_SetAttribute\n **See Also:** SDL_GL_MakeCurrent\n **See Also:** SDL_GL_DestroyContext\n"]
6826pub type SDL_GLContext = *mut SDL_GLContextState;
6827#[doc = " Opaque type for an EGL display.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6828pub type SDL_EGLDisplay = *mut core::ffi::c_void;
6829#[doc = " Opaque type for an EGL config.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6830pub type SDL_EGLConfig = *mut core::ffi::c_void;
6831#[doc = " Opaque type for an EGL surface.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6832pub type SDL_EGLSurface = *mut core::ffi::c_void;
6833#[doc = " An EGL attribute, used when creating an EGL context.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6834pub type SDL_EGLAttrib = isize;
6835#[doc = " An EGL integer attribute, used when creating an EGL surface.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6836pub type SDL_EGLint = core::ffi::c_int;
6837#[doc = " EGL platform attribute initialization callback.\n\n This is called when SDL is attempting to create an EGL context, to let the\n app add extra attributes to its eglGetPlatformDisplay() call.\n\n The callback should return a pointer to an EGL attribute array terminated\n with `EGL_NONE`. If this function returns NULL, the SDL_CreateWindow\n process will fail gracefully.\n\n The returned pointer should be allocated with SDL_malloc() and will be\n passed to SDL_free().\n\n The arrays returned by each callback will be appended to the existing\n attribute arrays defined by SDL.\n\n **Parameter:** userdata an app-controlled pointer that is passed to the callback.\n **Returns:** a newly-allocated array of attributes, terminated with `EGL_NONE`.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_EGL_SetAttributeCallbacks\n"]
6838pub type SDL_EGLAttribArrayCallback = ::core::option::Option<
6839 unsafe extern "C" fn(userdata: *mut core::ffi::c_void) -> *mut SDL_EGLAttrib,
6840>;
6841#[doc = " EGL surface/context attribute initialization callback types.\n\n This is called when SDL is attempting to create an EGL surface, to let the\n app add extra attributes to its eglCreateWindowSurface() or\n eglCreateContext calls.\n\n For convenience, the EGLDisplay and EGLConfig to use are provided to the\n callback.\n\n The callback should return a pointer to an EGL attribute array terminated\n with `EGL_NONE`. If this function returns NULL, the SDL_CreateWindow\n process will fail gracefully.\n\n The returned pointer should be allocated with SDL_malloc() and will be\n passed to SDL_free().\n\n The arrays returned by each callback will be appended to the existing\n attribute arrays defined by SDL.\n\n **Parameter:** userdata an app-controlled pointer that is passed to the callback.\n **Parameter:** display the EGL display to be used.\n **Parameter:** config the EGL config to be used.\n **Returns:** a newly-allocated array of attributes, terminated with `EGL_NONE`.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_EGL_SetAttributeCallbacks\n"]
6842pub type SDL_EGLIntArrayCallback = ::core::option::Option<
6843 unsafe extern "C" fn(
6844 userdata: *mut core::ffi::c_void,
6845 display: SDL_EGLDisplay,
6846 config: SDL_EGLConfig,
6847 ) -> *mut SDL_EGLint,
6848>;
6849impl SDL_GLAttr {
6850 #[doc = "< the minimum number of bits for the red channel of the color buffer; defaults to 8.\n"]
6851 pub const SDL_GL_RED_SIZE: SDL_GLAttr = SDL_GLAttr(0);
6852 #[doc = "< the minimum number of bits for the green channel of the color buffer; defaults to 8.\n"]
6853 pub const SDL_GL_GREEN_SIZE: SDL_GLAttr = SDL_GLAttr(1);
6854 #[doc = "< the minimum number of bits for the blue channel of the color buffer; defaults to 8.\n"]
6855 pub const SDL_GL_BLUE_SIZE: SDL_GLAttr = SDL_GLAttr(2);
6856 #[doc = "< the minimum number of bits for the alpha channel of the color buffer; defaults to 8.\n"]
6857 pub const SDL_GL_ALPHA_SIZE: SDL_GLAttr = SDL_GLAttr(3);
6858 #[doc = "< the minimum number of bits for frame buffer size; defaults to 0.\n"]
6859 pub const SDL_GL_BUFFER_SIZE: SDL_GLAttr = SDL_GLAttr(4);
6860 #[doc = "< whether the output is single or double buffered; defaults to double buffering on.\n"]
6861 pub const SDL_GL_DOUBLEBUFFER: SDL_GLAttr = SDL_GLAttr(5);
6862 #[doc = "< the minimum number of bits in the depth buffer; defaults to 16.\n"]
6863 pub const SDL_GL_DEPTH_SIZE: SDL_GLAttr = SDL_GLAttr(6);
6864 #[doc = "< the minimum number of bits in the stencil buffer; defaults to 0.\n"]
6865 pub const SDL_GL_STENCIL_SIZE: SDL_GLAttr = SDL_GLAttr(7);
6866 #[doc = "< the minimum number of bits for the red channel of the accumulation buffer; defaults to 0.\n"]
6867 pub const SDL_GL_ACCUM_RED_SIZE: SDL_GLAttr = SDL_GLAttr(8);
6868 #[doc = "< the minimum number of bits for the green channel of the accumulation buffer; defaults to 0.\n"]
6869 pub const SDL_GL_ACCUM_GREEN_SIZE: SDL_GLAttr = SDL_GLAttr(9);
6870 #[doc = "< the minimum number of bits for the blue channel of the accumulation buffer; defaults to 0.\n"]
6871 pub const SDL_GL_ACCUM_BLUE_SIZE: SDL_GLAttr = SDL_GLAttr(10);
6872 #[doc = "< the minimum number of bits for the alpha channel of the accumulation buffer; defaults to 0.\n"]
6873 pub const SDL_GL_ACCUM_ALPHA_SIZE: SDL_GLAttr = SDL_GLAttr(11);
6874 #[doc = "< whether the output is stereo 3D; defaults to off.\n"]
6875 pub const SDL_GL_STEREO: SDL_GLAttr = SDL_GLAttr(12);
6876 #[doc = "< the number of buffers used for multisample anti-aliasing; defaults to 0.\n"]
6877 pub const SDL_GL_MULTISAMPLEBUFFERS: SDL_GLAttr = SDL_GLAttr(13);
6878 #[doc = "< the number of samples used around the current pixel used for multisample anti-aliasing.\n"]
6879 pub const SDL_GL_MULTISAMPLESAMPLES: SDL_GLAttr = SDL_GLAttr(14);
6880 #[doc = "< set to 1 to require hardware acceleration, set to 0 to force software rendering; defaults to allow either.\n"]
6881 pub const SDL_GL_ACCELERATED_VISUAL: SDL_GLAttr = SDL_GLAttr(15);
6882 #[doc = "< not used (deprecated).\n"]
6883 pub const SDL_GL_RETAINED_BACKING: SDL_GLAttr = SDL_GLAttr(16);
6884 #[doc = "< OpenGL context major version.\n"]
6885 pub const SDL_GL_CONTEXT_MAJOR_VERSION: SDL_GLAttr = SDL_GLAttr(17);
6886 #[doc = "< OpenGL context minor version.\n"]
6887 pub const SDL_GL_CONTEXT_MINOR_VERSION: SDL_GLAttr = SDL_GLAttr(18);
6888 #[doc = "< some combination of 0 or more of elements of the SDL_GLContextFlag enumeration; defaults to 0.\n"]
6889 pub const SDL_GL_CONTEXT_FLAGS: SDL_GLAttr = SDL_GLAttr(19);
6890 #[doc = "< type of GL context (Core, Compatibility, ES). See SDL_GLProfile; default value depends on platform.\n"]
6891 pub const SDL_GL_CONTEXT_PROFILE_MASK: SDL_GLAttr = SDL_GLAttr(20);
6892 #[doc = "< OpenGL context sharing; defaults to 0.\n"]
6893 pub const SDL_GL_SHARE_WITH_CURRENT_CONTEXT: SDL_GLAttr = SDL_GLAttr(21);
6894 #[doc = "< requests sRGB capable visual; defaults to 0.\n"]
6895 pub const SDL_GL_FRAMEBUFFER_SRGB_CAPABLE: SDL_GLAttr = SDL_GLAttr(22);
6896 #[doc = "< sets context the release behavior. See SDL_GLContextReleaseFlag; defaults to FLUSH.\n"]
6897 pub const SDL_GL_CONTEXT_RELEASE_BEHAVIOR: SDL_GLAttr = SDL_GLAttr(23);
6898 #[doc = "< set context reset notification. See SDL_GLContextResetNotification; defaults to NO_NOTIFICATION.\n"]
6899 pub const SDL_GL_CONTEXT_RESET_NOTIFICATION: SDL_GLAttr = SDL_GLAttr(24);
6900 pub const SDL_GL_CONTEXT_NO_ERROR: SDL_GLAttr = SDL_GLAttr(25);
6901 pub const SDL_GL_FLOATBUFFERS: SDL_GLAttr = SDL_GLAttr(26);
6902 pub const SDL_GL_EGL_PLATFORM: SDL_GLAttr = SDL_GLAttr(27);
6903}
6904#[repr(transparent)]
6905#[doc = " An enumeration of OpenGL configuration attributes.\n\n While you can set most OpenGL attributes normally, the attributes listed\n above must be known before SDL creates the window that will be used with\n the OpenGL context. These attributes are set and read with\n SDL_GL_SetAttribute() and SDL_GL_GetAttribute().\n\n In some cases, these attributes are minimum requests; the GL does not\n promise to give you exactly what you asked for. It's possible to ask for a\n 16-bit depth buffer and get a 24-bit one instead, for example, or to ask\n for no stencil buffer and still have one available. Context creation should\n fail if the GL can't provide your requested attributes at a minimum, but\n you should check to see exactly what you got.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
6906#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6907pub struct SDL_GLAttr(pub core::ffi::c_uint);
6908#[doc = " Possible values to be set for the SDL_GL_CONTEXT_PROFILE_MASK attribute.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6909pub type SDL_GLProfile = Uint32;
6910#[doc = " Possible flags to be set for the SDL_GL_CONTEXT_FLAGS attribute.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6911pub type SDL_GLContextFlag = Uint32;
6912#[doc = " Possible values to be set for the SDL_GL_CONTEXT_RELEASE_BEHAVIOR\n attribute.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6913pub type SDL_GLContextReleaseFlag = Uint32;
6914#[doc = " Possible values to be set SDL_GL_CONTEXT_RESET_NOTIFICATION attribute.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
6915pub type SDL_GLContextResetNotification = Uint32;
6916unsafe extern "C" {
6917 #[doc = " Get the number of video drivers compiled into SDL.\n\n **Returns:** the number of built in video drivers.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetVideoDriver\n"]
6918 pub fn SDL_GetNumVideoDrivers() -> core::ffi::c_int;
6919}
6920unsafe extern "C" {
6921 #[doc = " Get the name of a built in video driver.\n\n The video drivers are presented in the order in which they are normally\n checked during initialization.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"cocoa\",\n \"x11\" or \"windows\". These never have Unicode characters, and are not meant\n to be proper names.\n\n **Parameter:** index the index of a video driver.\n **Returns:** the name of the video driver with the given **index**, or NULL if\n index is out of bounds.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumVideoDrivers\n"]
6922 pub fn SDL_GetVideoDriver(index: core::ffi::c_int) -> *const core::ffi::c_char;
6923}
6924unsafe extern "C" {
6925 #[doc = " Get the name of the currently initialized video driver.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"cocoa\",\n \"x11\" or \"windows\". These never have Unicode characters, and are not meant\n to be proper names.\n\n **Returns:** the name of the current video driver or NULL if no driver has been\n initialized.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumVideoDrivers\n **See Also:** SDL_GetVideoDriver\n"]
6926 pub fn SDL_GetCurrentVideoDriver() -> *const core::ffi::c_char;
6927}
6928unsafe extern "C" {
6929 #[doc = " Get the current system theme.\n\n **Returns:** the current system theme, light, dark, or unknown.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6930 pub fn SDL_GetSystemTheme() -> SDL_SystemTheme;
6931}
6932unsafe extern "C" {
6933 #[doc = " Get a list of currently connected displays.\n\n **Parameter:** count a pointer filled in with the number of displays returned, may\n be NULL.\n **Returns:** a 0 terminated array of display instance IDs or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6934 pub fn SDL_GetDisplays(count: *mut core::ffi::c_int) -> *mut SDL_DisplayID;
6935}
6936unsafe extern "C" {
6937 #[doc = " Return the primary display.\n\n **Returns:** the instance ID of the primary display on success or 0 on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplays\n"]
6938 pub fn SDL_GetPrimaryDisplay() -> SDL_DisplayID;
6939}
6940unsafe extern "C" {
6941 #[doc = " Get the properties associated with a display.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN`: true if the display has HDR\n headroom above the SDR white point. This is for informational and\n diagnostic purposes only, as not all platforms provide this information\n at the display level.\n\n On KMS/DRM:\n\n - `SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER`: the \"panel\n orientation\" property for the display in degrees of clockwise rotation.\n Note that this is provided only as a hint, and the application is\n responsible for any coordinate transformations needed to conform to the\n requested display orientation.\n\n On Wayland:\n\n - `SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER`: the wl_output associated\n with the display\n\n On Windows:\n\n - `SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER`: the monitor handle\n (HMONITOR) associated with the display\n\n **Parameter:** displayID the instance ID of the display to query.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
6942 pub fn SDL_GetDisplayProperties(displayID: SDL_DisplayID) -> SDL_PropertiesID;
6943}
6944unsafe extern "C" {
6945 #[doc = " Get the name of a display in UTF-8 encoding.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Returns:** the name of a display or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplays\n"]
6946 pub fn SDL_GetDisplayName(displayID: SDL_DisplayID) -> *const core::ffi::c_char;
6947}
6948unsafe extern "C" {
6949 #[doc = " Get the desktop area represented by a display.\n\n The primary display is often located at (0,0), but may be placed at a\n different location depending on monitor layout.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Parameter:** rect the SDL_Rect structure filled in with the display bounds.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplayUsableBounds\n **See Also:** SDL_GetDisplays\n"]
6950 pub fn SDL_GetDisplayBounds(displayID: SDL_DisplayID, rect: *mut SDL_Rect) -> bool;
6951}
6952unsafe extern "C" {
6953 #[doc = " Get the usable desktop area represented by a display, in screen\n coordinates.\n\n This is the same area as SDL_GetDisplayBounds() reports, but with portions\n reserved by the system removed. For example, on Apple's macOS, this\n subtracts the area occupied by the menu bar and dock.\n\n Setting a window to be fullscreen generally bypasses these unusable areas,\n so these are good guidelines for the maximum space available to a\n non-fullscreen window.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Parameter:** rect the SDL_Rect structure filled in with the display bounds.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplayBounds\n **See Also:** SDL_GetDisplays\n"]
6954 pub fn SDL_GetDisplayUsableBounds(displayID: SDL_DisplayID, rect: *mut SDL_Rect) -> bool;
6955}
6956unsafe extern "C" {
6957 #[doc = " Get the orientation of a display when it is unrotated.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Returns:** the SDL_DisplayOrientation enum value of the display, or\n `SDL_ORIENTATION_UNKNOWN` if it isn't available.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplays\n"]
6958 pub fn SDL_GetNaturalDisplayOrientation(displayID: SDL_DisplayID) -> SDL_DisplayOrientation;
6959}
6960unsafe extern "C" {
6961 #[doc = " Get the orientation of a display.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Returns:** the SDL_DisplayOrientation enum value of the display, or\n `SDL_ORIENTATION_UNKNOWN` if it isn't available.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplays\n"]
6962 pub fn SDL_GetCurrentDisplayOrientation(displayID: SDL_DisplayID) -> SDL_DisplayOrientation;
6963}
6964unsafe extern "C" {
6965 #[doc = " Get the content scale of a display.\n\n The content scale is the expected scale for content based on the DPI\n settings of the display. For example, a 4K display might have a 2.0 (200%)\n display scale, which means that the user expects UI elements to be twice as\n big on this display, to aid in readability.\n\n After window creation, SDL_GetWindowDisplayScale() should be used to query\n the content scale factor for individual windows instead of querying the\n display for a window and calling this function, as the per-window content\n scale factor may differ from the base value of the display it is on,\n particularly on high-DPI and/or multi-monitor desktop configurations.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Returns:** the content scale of the display, or 0.0f on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowDisplayScale\n **See Also:** SDL_GetDisplays\n"]
6966 pub fn SDL_GetDisplayContentScale(displayID: SDL_DisplayID) -> f32;
6967}
6968unsafe extern "C" {
6969 #[doc = " Get a list of fullscreen display modes available on a display.\n\n The display modes are sorted in this priority:\n\n - w -> largest to smallest\n - h -> largest to smallest\n - bits per pixel -> more colors to fewer colors\n - packed pixel layout -> largest to smallest\n - refresh rate -> highest to lowest\n - pixel density -> lowest to highest\n\n **Parameter:** displayID the instance ID of the display to query.\n **Parameter:** count a pointer filled in with the number of display modes returned,\n may be NULL.\n **Returns:** a NULL terminated array of display mode pointers or NULL on\n failure; call SDL_GetError() for more information. This is a\n single allocation that should be freed with SDL_free() when it is\n no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplays\n"]
6970 pub fn SDL_GetFullscreenDisplayModes(
6971 displayID: SDL_DisplayID,
6972 count: *mut core::ffi::c_int,
6973 ) -> *mut *mut SDL_DisplayMode;
6974}
6975unsafe extern "C" {
6976 #[doc = " Get the closest match to the requested display mode.\n\n The available display modes are scanned and `closest` is filled in with the\n closest mode matching the requested mode and returned. The mode format and\n refresh rate default to the desktop mode if they are set to 0. The modes\n are scanned with size being first priority, format being second priority,\n and finally checking the refresh rate. If all the available modes are too\n small, then false is returned.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Parameter:** w the width in pixels of the desired display mode.\n **Parameter:** h the height in pixels of the desired display mode.\n **Parameter:** refresh_rate the refresh rate of the desired display mode, or 0.0f\n for the desktop refresh rate.\n **Parameter:** include_high_density_modes boolean to include high density modes in\n the search.\n **Parameter:** closest a pointer filled in with the closest display mode equal to\n or larger than the desired mode.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplays\n **See Also:** SDL_GetFullscreenDisplayModes\n"]
6977 pub fn SDL_GetClosestFullscreenDisplayMode(
6978 displayID: SDL_DisplayID,
6979 w: core::ffi::c_int,
6980 h: core::ffi::c_int,
6981 refresh_rate: f32,
6982 include_high_density_modes: bool,
6983 closest: *mut SDL_DisplayMode,
6984 ) -> bool;
6985}
6986unsafe extern "C" {
6987 #[doc = " Get information about the desktop's display mode.\n\n There's a difference between this function and SDL_GetCurrentDisplayMode()\n when SDL runs fullscreen and has changed the resolution. In that case this\n function will return the previous native display mode, and not the current\n display mode.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Returns:** a pointer to the desktop display mode or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCurrentDisplayMode\n **See Also:** SDL_GetDisplays\n"]
6988 pub fn SDL_GetDesktopDisplayMode(displayID: SDL_DisplayID) -> *const SDL_DisplayMode;
6989}
6990unsafe extern "C" {
6991 #[doc = " Get information about the current display mode.\n\n There's a difference between this function and SDL_GetDesktopDisplayMode()\n when SDL runs fullscreen and has changed the resolution. In that case this\n function will return the current display mode, and not the previous native\n display mode.\n\n **Parameter:** displayID the instance ID of the display to query.\n **Returns:** a pointer to the desktop display mode or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDesktopDisplayMode\n **See Also:** SDL_GetDisplays\n"]
6992 pub fn SDL_GetCurrentDisplayMode(displayID: SDL_DisplayID) -> *const SDL_DisplayMode;
6993}
6994unsafe extern "C" {
6995 #[doc = " Get the display containing a point.\n\n **Parameter:** point the point to query.\n **Returns:** the instance ID of the display containing the point or 0 on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplayBounds\n **See Also:** SDL_GetDisplays\n"]
6996 pub fn SDL_GetDisplayForPoint(point: *const SDL_Point) -> SDL_DisplayID;
6997}
6998unsafe extern "C" {
6999 #[doc = " Get the display primarily containing a rect.\n\n **Parameter:** rect the rect to query.\n **Returns:** the instance ID of the display entirely containing the rect or\n closest to the center of the rect on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplayBounds\n **See Also:** SDL_GetDisplays\n"]
7000 pub fn SDL_GetDisplayForRect(rect: *const SDL_Rect) -> SDL_DisplayID;
7001}
7002unsafe extern "C" {
7003 #[doc = " Get the display associated with a window.\n\n **Parameter:** window the window to query.\n **Returns:** the instance ID of the display containing the center of the window\n on success or 0 on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDisplayBounds\n **See Also:** SDL_GetDisplays\n"]
7004 pub fn SDL_GetDisplayForWindow(window: *mut SDL_Window) -> SDL_DisplayID;
7005}
7006unsafe extern "C" {
7007 #[doc = " Get the pixel density of a window.\n\n This is a ratio of pixel size to window size. For example, if the window is\n 1920x1080 and it has a high density back buffer of 3840x2160 pixels, it\n would have a pixel density of 2.0.\n\n **Parameter:** window the window to query.\n **Returns:** the pixel density or 0.0f on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowDisplayScale\n"]
7008 pub fn SDL_GetWindowPixelDensity(window: *mut SDL_Window) -> f32;
7009}
7010unsafe extern "C" {
7011 #[doc = " Get the content display scale relative to a window's pixel size.\n\n This is a combination of the window pixel density and the display content\n scale, and is the expected scale for displaying content in this window. For\n example, if a 3840x2160 window had a display scale of 2.0, the user expects\n the content to take twice as many pixels and be the same physical size as\n if it were being displayed in a 1920x1080 window with a display scale of\n 1.0.\n\n Conceptually this value corresponds to the scale display setting, and is\n updated when that setting is changed, or the window moves to a display with\n a different scale setting.\n\n **Parameter:** window the window to query.\n **Returns:** the display scale, or 0.0f on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7012 pub fn SDL_GetWindowDisplayScale(window: *mut SDL_Window) -> f32;
7013}
7014unsafe extern "C" {
7015 #[doc = " Set the display mode to use when a window is visible and fullscreen.\n\n This only affects the display mode used when the window is fullscreen. To\n change the window size when the window is not fullscreen, use\n SDL_SetWindowSize().\n\n If the window is currently in the fullscreen state, this request is\n asynchronous on some windowing systems and the new mode dimensions may not\n be applied immediately upon the return of this function. If an immediate\n change is required, call SDL_SyncWindow() to block until the changes have\n taken effect.\n\n When the new mode takes effect, an SDL_EVENT_WINDOW_RESIZED and/or an\n SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event will be emitted with the new mode\n dimensions.\n\n **Parameter:** window the window to affect.\n **Parameter:** mode a pointer to the display mode to use, which can be NULL for\n borderless fullscreen desktop mode, or one of the fullscreen\n modes returned by SDL_GetFullscreenDisplayModes() to set an\n exclusive fullscreen mode.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowFullscreenMode\n **See Also:** SDL_SetWindowFullscreen\n **See Also:** SDL_SyncWindow\n"]
7016 pub fn SDL_SetWindowFullscreenMode(
7017 window: *mut SDL_Window,
7018 mode: *const SDL_DisplayMode,
7019 ) -> bool;
7020}
7021unsafe extern "C" {
7022 #[doc = " Query the display mode to use when a window is visible at fullscreen.\n\n **Parameter:** window the window to query.\n **Returns:** a pointer to the exclusive fullscreen mode to use or NULL for\n borderless fullscreen desktop mode.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowFullscreenMode\n **See Also:** SDL_SetWindowFullscreen\n"]
7023 pub fn SDL_GetWindowFullscreenMode(window: *mut SDL_Window) -> *const SDL_DisplayMode;
7024}
7025unsafe extern "C" {
7026 #[doc = " Get the raw ICC profile data for the screen the window is currently on.\n\n **Parameter:** window the window to query.\n **Parameter:** size the size of the ICC profile.\n **Returns:** the raw ICC profile data on success or NULL on failure; call\n SDL_GetError() for more information. This should be freed with\n SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7027 pub fn SDL_GetWindowICCProfile(
7028 window: *mut SDL_Window,
7029 size: *mut usize,
7030 ) -> *mut core::ffi::c_void;
7031}
7032unsafe extern "C" {
7033 #[doc = " Get the pixel format associated with the window.\n\n **Parameter:** window the window to query.\n **Returns:** the pixel format of the window on success or\n SDL_PIXELFORMAT_UNKNOWN on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7034 pub fn SDL_GetWindowPixelFormat(window: *mut SDL_Window) -> SDL_PixelFormat;
7035}
7036unsafe extern "C" {
7037 #[doc = " Get a list of valid windows.\n\n **Parameter:** count a pointer filled in with the number of windows returned, may\n be NULL.\n **Returns:** a NULL terminated array of SDL_Window pointers or NULL on failure;\n call SDL_GetError() for more information. This is a single\n allocation that should be freed with SDL_free() when it is no\n longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7038 pub fn SDL_GetWindows(count: *mut core::ffi::c_int) -> *mut *mut SDL_Window;
7039}
7040unsafe extern "C" {
7041 #[doc = " Create a window with the specified dimensions and flags.\n\n The window size is a request and may be different than expected based on\n the desktop layout and window manager policies. Your application should be\n prepared to handle a window of any size.\n\n `flags` may be any of the following OR'd together:\n\n - `SDL_WINDOW_FULLSCREEN`: fullscreen window at desktop resolution\n - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context\n - `SDL_WINDOW_HIDDEN`: window is not visible\n - `SDL_WINDOW_BORDERLESS`: no window decoration\n - `SDL_WINDOW_RESIZABLE`: window can be resized\n - `SDL_WINDOW_MINIMIZED`: window is minimized\n - `SDL_WINDOW_MAXIMIZED`: window is maximized\n - `SDL_WINDOW_MOUSE_GRABBED`: window has grabbed mouse focus\n - `SDL_WINDOW_INPUT_FOCUS`: window has input focus\n - `SDL_WINDOW_MOUSE_FOCUS`: window has mouse focus\n - `SDL_WINDOW_EXTERNAL`: window not created by SDL\n - `SDL_WINDOW_MODAL`: window is modal\n - `SDL_WINDOW_HIGH_PIXEL_DENSITY`: window uses high pixel density back\n buffer if possible\n - `SDL_WINDOW_MOUSE_CAPTURE`: window has mouse captured (unrelated to\n MOUSE_GRABBED)\n - `SDL_WINDOW_ALWAYS_ON_TOP`: window should always be above others\n - `SDL_WINDOW_UTILITY`: window should be treated as a utility window, not\n showing in the task bar and window list\n - `SDL_WINDOW_TOOLTIP`: window should be treated as a tooltip and does not\n get mouse or keyboard focus, requires a parent window\n - `SDL_WINDOW_POPUP_MENU`: window should be treated as a popup menu,\n requires a parent window\n - `SDL_WINDOW_KEYBOARD_GRABBED`: window has grabbed keyboard input\n - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance\n - `SDL_WINDOW_METAL`: window usable with a Metal instance\n - `SDL_WINDOW_TRANSPARENT`: window with transparent buffer\n - `SDL_WINDOW_NOT_FOCUSABLE`: window should not be focusable\n\n The SDL_Window will be shown if SDL_WINDOW_HIDDEN is not set. If hidden at\n creation time, SDL_ShowWindow() can be used to show it later.\n\n On Apple's macOS, you **must** set the NSHighResolutionCapable Info.plist\n property to YES, otherwise you will not receive a High-DPI OpenGL canvas.\n\n The window pixel size may differ from its window coordinate size if the\n window is on a high pixel density display. Use SDL_GetWindowSize() to query\n the client area's size in window coordinates, and\n SDL_GetWindowSizeInPixels() or SDL_GetRenderOutputSize() to query the\n drawable size in pixels. Note that the drawable size can vary after the\n window is created and should be queried again if you get an\n SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED event.\n\n If the window is created with any of the SDL_WINDOW_OPENGL or\n SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function\n (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the\n corresponding UnloadLibrary function is called by SDL_DestroyWindow().\n\n If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,\n SDL_CreateWindow() will fail, because SDL_Vulkan_LoadLibrary() will fail.\n\n If SDL_WINDOW_METAL is specified on an OS that does not support Metal,\n SDL_CreateWindow() will fail.\n\n If you intend to use this window with an SDL_Renderer, you should use\n SDL_CreateWindowAndRenderer() instead of this function, to avoid window\n flicker.\n\n On non-Apple devices, SDL requires you to either not link to the Vulkan\n loader or link to a dynamic library version. This limitation may be removed\n in a future version of SDL.\n\n **Parameter:** title the title of the window, in UTF-8 encoding.\n **Parameter:** w the width of the window.\n **Parameter:** h the height of the window.\n **Parameter:** flags 0, or one or more SDL_WindowFlags OR'd together.\n **Returns:** the window that was created or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateWindowAndRenderer\n **See Also:** SDL_CreatePopupWindow\n **See Also:** SDL_CreateWindowWithProperties\n **See Also:** SDL_DestroyWindow\n"]
7042 pub fn SDL_CreateWindow(
7043 title: *const core::ffi::c_char,
7044 w: core::ffi::c_int,
7045 h: core::ffi::c_int,
7046 flags: SDL_WindowFlags,
7047 ) -> *mut SDL_Window;
7048}
7049unsafe extern "C" {
7050 #[doc = " Create a child popup window of the specified parent window.\n\n The window size is a request and may be different than expected based on\n the desktop layout and window manager policies. Your application should be\n prepared to handle a window of any size.\n\n The flags parameter **must** contain at least one of the following:\n\n - `SDL_WINDOW_TOOLTIP`: The popup window is a tooltip and will not pass any\n input events.\n - `SDL_WINDOW_POPUP_MENU`: The popup window is a popup menu. The topmost\n popup menu will implicitly gain the keyboard focus.\n\n The following flags are not relevant to popup window creation and will be\n ignored:\n\n - `SDL_WINDOW_MINIMIZED`\n - `SDL_WINDOW_MAXIMIZED`\n - `SDL_WINDOW_FULLSCREEN`\n - `SDL_WINDOW_BORDERLESS`\n\n The following flags are incompatible with popup window creation and will\n cause it to fail:\n\n - `SDL_WINDOW_UTILITY`\n - `SDL_WINDOW_MODAL`\n\n The parent parameter **must** be non-null and a valid window. The parent of\n a popup window can be either a regular, toplevel window, or another popup\n window.\n\n Popup windows cannot be minimized, maximized, made fullscreen, raised,\n flash, be made a modal window, be the parent of a toplevel window, or grab\n the mouse and/or keyboard. Attempts to do so will fail.\n\n Popup windows implicitly do not have a border/decorations and do not appear\n on the taskbar/dock or in lists of windows such as alt-tab menus.\n\n By default, popup window positions will automatically be constrained to\n keep the entire window within display bounds. This can be overridden with\n the `SDL_PROP_WINDOW_CREATE_CONSTRAIN_POPUP_BOOLEAN` property.\n\n By default, popup menus will automatically grab keyboard focus from the\n parent when shown. This behavior can be overridden by setting the\n `SDL_WINDOW_NOT_FOCUSABLE` flag, setting the\n `SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN` property to false, or toggling\n it after creation via the `SDL_SetWindowFocusable()` function.\n\n If a parent window is hidden or destroyed, any child popup windows will be\n recursively hidden or destroyed as well. Child popup windows not explicitly\n hidden will be restored when the parent is shown.\n\n **Parameter:** parent the parent of the window, must not be NULL.\n **Parameter:** offset_x the x position of the popup window relative to the origin\n of the parent.\n **Parameter:** offset_y the y position of the popup window relative to the origin\n of the parent window.\n **Parameter:** w the width of the window.\n **Parameter:** h the height of the window.\n **Parameter:** flags SDL_WINDOW_TOOLTIP or SDL_WINDOW_POPUP_MENU, and zero or more\n additional SDL_WindowFlags OR'd together.\n **Returns:** the window that was created or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateWindow\n **See Also:** SDL_CreateWindowWithProperties\n **See Also:** SDL_DestroyWindow\n **See Also:** SDL_GetWindowParent\n"]
7051 pub fn SDL_CreatePopupWindow(
7052 parent: *mut SDL_Window,
7053 offset_x: core::ffi::c_int,
7054 offset_y: core::ffi::c_int,
7055 w: core::ffi::c_int,
7056 h: core::ffi::c_int,
7057 flags: SDL_WindowFlags,
7058 ) -> *mut SDL_Window;
7059}
7060unsafe extern "C" {
7061 #[doc = " Create a window with the specified properties.\n\n The window size is a request and may be different than expected based on\n the desktop layout and window manager policies. Your application should be\n prepared to handle a window of any size.\n\n These are the supported properties:\n\n - `SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN`: true if the window should\n be always on top\n - `SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN`: true if the window has no\n window decoration\n - `SDL_PROP_WINDOW_CREATE_CONSTRAIN_POPUP_BOOLEAN`: true if the \"tooltip\"\n and \"menu\" window types should be automatically constrained to be\n entirely within display bounds (default), false if no constraints on the\n position are desired.\n - `SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN`: true if the\n window will be used with an externally managed graphics context.\n - `SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN`: true if the window should\n accept keyboard input (defaults true)\n - `SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN`: true if the window should\n start in fullscreen mode at desktop resolution\n - `SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER`: the height of the window\n - `SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN`: true if the window should start\n hidden\n - `SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN`: true if the window\n uses a high pixel density buffer if possible\n - `SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN`: true if the window should\n start maximized\n - `SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN`: true if the window is a popup menu\n - `SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN`: true if the window will be used\n with Metal rendering\n - `SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN`: true if the window should\n start minimized\n - `SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN`: true if the window is modal to\n its parent\n - `SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN`: true if the window starts\n with grabbed mouse focus\n - `SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN`: true if the window will be used\n with OpenGL rendering\n - `SDL_PROP_WINDOW_CREATE_PARENT_POINTER`: an SDL_Window that will be the\n parent of this window, required for windows with the \"tooltip\", \"menu\",\n and \"modal\" properties\n - `SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN`: true if the window should be\n resizable\n - `SDL_PROP_WINDOW_CREATE_TITLE_STRING`: the title of the window, in UTF-8\n encoding\n - `SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN`: true if the window show\n transparent in the areas with alpha of 0\n - `SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN`: true if the window is a tooltip\n - `SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN`: true if the window is a utility\n window, not showing in the task bar and window list\n - `SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN`: true if the window will be used\n with Vulkan rendering\n - `SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER`: the width of the window\n - `SDL_PROP_WINDOW_CREATE_X_NUMBER`: the x position of the window, or\n `SDL_WINDOWPOS_CENTERED`, defaults to `SDL_WINDOWPOS_UNDEFINED`. This is\n relative to the parent for windows with the \"tooltip\" or \"menu\" property\n set.\n - `SDL_PROP_WINDOW_CREATE_Y_NUMBER`: the y position of the window, or\n `SDL_WINDOWPOS_CENTERED`, defaults to `SDL_WINDOWPOS_UNDEFINED`. This is\n relative to the parent for windows with the \"tooltip\" or \"menu\" property\n set.\n\n These are additional supported properties on macOS:\n\n - `SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER`: the\n `(__unsafe_unretained)` NSWindow associated with the window, if you want\n to wrap an existing window.\n - `SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER`: the `(__unsafe_unretained)`\n NSView associated with the window, defaults to `[window contentView]`\n\n These are additional supported properties on iOS, tvOS, and visionOS:\n\n - `SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER`: the `(__unsafe_unretained)`\n UIWindowScene associated with the window, defaults to the active window\n scene.\n\n These are additional supported properties on Wayland:\n\n - `SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN` - true if\n the application wants to use the Wayland surface for a custom role and\n does not want it attached to an XDG toplevel window. See\n [README-wayland](README-wayland) for more information on using custom\n surfaces.\n - `SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN` - true if the\n application wants an associated `wl_egl_window` object to be created and\n attached to the window, even if the window does not have the OpenGL\n property or `SDL_WINDOW_OPENGL` flag set.\n - `SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER` - the wl_surface\n associated with the window, if you want to wrap an existing window. See\n [README-wayland](README-wayland) for more information.\n\n These are additional supported properties on Windows:\n\n - `SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER`: the HWND associated with the\n window, if you want to wrap an existing window.\n - `SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER`: optional,\n another window to share pixel format with, useful for OpenGL windows\n\n These are additional supported properties with X11:\n\n - `SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER`: the X11 Window associated\n with the window, if you want to wrap an existing window.\n\n The window is implicitly shown if the \"hidden\" property is not set.\n\n These are additional supported properties with Emscripten:\n\n - `SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING`: the id given to the\n canvas element. This should start with a '#' sign\n - `SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING`: override the\n binding element for keyboard inputs for this canvas. The variable can be\n one of:\n - \"#window\": the javascript window object (default)\n - \"#document\": the javascript document object\n - \"#screen\": the javascript window.screen object\n - \"#canvas\": the WebGL canvas element\n - \"#none\": Don't bind anything at all\n - any other string without a leading # sign applies to the element on the\n page with that ID. Windows with the \"tooltip\" and \"menu\" properties are\n popup windows and have the behaviors and guidelines outlined in\n SDL_CreatePopupWindow().\n\n If this window is being created to be used with an SDL_Renderer, you should\n not add a graphics API specific property\n (`SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN`, etc), as SDL will handle that\n internally when it chooses a renderer. However, SDL might need to recreate\n your window at that point, which may cause the window to appear briefly,\n and then flicker as it is recreated. The correct approach to this is to\n create the window with the `SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN` property\n set to true, then create the renderer, then show the window with\n SDL_ShowWindow().\n\n **Parameter:** props the properties to use.\n **Returns:** the window that was created or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProperties\n **See Also:** SDL_CreateWindow\n **See Also:** SDL_DestroyWindow\n"]
7062 pub fn SDL_CreateWindowWithProperties(props: SDL_PropertiesID) -> *mut SDL_Window;
7063}
7064unsafe extern "C" {
7065 #[doc = " Get the numeric ID of a window.\n\n The numeric ID is what SDL_WindowEvent references, and is necessary to map\n these events to specific SDL_Window objects.\n\n **Parameter:** window the window to query.\n **Returns:** the ID of the window on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowFromID\n"]
7066 pub fn SDL_GetWindowID(window: *mut SDL_Window) -> SDL_WindowID;
7067}
7068unsafe extern "C" {
7069 #[doc = " Get a window from a stored ID.\n\n The numeric ID is what SDL_WindowEvent references, and is necessary to map\n these events to specific SDL_Window objects.\n\n **Parameter:** id the ID of the window.\n **Returns:** the window associated with `id` or NULL if it doesn't exist; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowID\n"]
7070 pub fn SDL_GetWindowFromID(id: SDL_WindowID) -> *mut SDL_Window;
7071}
7072unsafe extern "C" {
7073 #[doc = " Get parent of a window.\n\n **Parameter:** window the window to query.\n **Returns:** the parent of the window on success or NULL if the window has no\n parent.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreatePopupWindow\n"]
7074 pub fn SDL_GetWindowParent(window: *mut SDL_Window) -> *mut SDL_Window;
7075}
7076unsafe extern "C" {
7077 #[doc = " Get the properties associated with a window.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_WINDOW_SHAPE_POINTER`: the surface associated with a shaped\n window\n - `SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN`: true if the window has HDR\n headroom above the SDR white point. This property can change dynamically\n when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.\n - `SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT`: the value of SDR white in the\n SDL_COLORSPACE_SRGB_LINEAR colorspace. On Windows this corresponds to the\n SDR white level in scRGB colorspace, and on Apple platforms this is\n always 1.0 for EDR content. This property can change dynamically when\n SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.\n - `SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT`: the additional high dynamic range\n that can be displayed, in terms of the SDR white point. When HDR is not\n enabled, this will be 1.0. This property can change dynamically when\n SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.\n\n On Android:\n\n - `SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER`: the ANativeWindow associated\n with the window\n - `SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER`: the EGLSurface associated with\n the window\n\n On iOS:\n\n - `SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER`: the `(__unsafe_unretained)`\n UIWindow associated with the window\n - `SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER`: the NSInteger tag\n associated with metal views on the window\n - `SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER`: the OpenGL view's\n framebuffer object. It must be bound when rendering to the screen using\n OpenGL.\n - `SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER`: the OpenGL view's\n renderbuffer object. It must be bound when SDL_GL_SwapWindow is called.\n - `SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER`: the OpenGL\n view's resolve framebuffer, when MSAA is used.\n\n On KMS/DRM:\n\n - `SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER`: the device index associated\n with the window (e.g. the X in /dev/dri/cardX)\n - `SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER`: the DRM FD associated with the\n window\n - `SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER`: the GBM device associated\n with the window\n\n On macOS:\n\n - `SDL_PROP_WINDOW_COCOA_WINDOW_POINTER`: the `(__unsafe_unretained)`\n NSWindow associated with the window\n - `SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER`: the NSInteger tag\n associated with metal views on the window\n\n On OpenVR:\n\n - `SDL_PROP_WINDOW_OPENVR_OVERLAY_ID_NUMBER`: the OpenVR Overlay Handle ID\n for the associated overlay window.\n\n On QNX:\n\n - `SDL_PROP_WINDOW_QNX_WINDOW_POINTER`: the screen_window_t associated with\n the window.\n - `SDL_PROP_WINDOW_QNX_SURFACE_POINTER`: the EGLSurface associated with the\n window\n\n On Vivante:\n\n - `SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER`: the EGLNativeDisplayType\n associated with the window\n - `SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER`: the EGLNativeWindowType\n associated with the window\n - `SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER`: the EGLSurface associated with\n the window\n\n On Windows:\n\n - `SDL_PROP_WINDOW_WIN32_HWND_POINTER`: the HWND associated with the window\n - `SDL_PROP_WINDOW_WIN32_HDC_POINTER`: the HDC associated with the window\n - `SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER`: the HINSTANCE associated with\n the window\n\n On Wayland:\n\n Note: The `xdg_*` window objects do not internally persist across window\n show/hide calls. They will be null if the window is hidden and must be\n queried each time it is shown.\n\n - `SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER`: the wl_display associated with\n the window\n - `SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER`: the wl_surface associated with\n the window\n - `SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER`: the wp_viewport associated\n with the window\n - `SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER`: the wl_egl_window\n associated with the window\n - `SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER`: the xdg_surface associated\n with the window\n - `SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER`: the xdg_toplevel role\n associated with the window\n - 'SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING': the export\n handle associated with the window\n - `SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER`: the xdg_popup role\n associated with the window\n - `SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER`: the xdg_positioner\n associated with the window, in popup mode\n\n On X11:\n\n - `SDL_PROP_WINDOW_X11_DISPLAY_POINTER`: the X11 Display associated with\n the window\n - `SDL_PROP_WINDOW_X11_SCREEN_NUMBER`: the screen number associated with\n the window\n - `SDL_PROP_WINDOW_X11_WINDOW_NUMBER`: the X11 Window associated with the\n window\n\n On Emscripten:\n\n - `SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING`: the id the canvas element\n will have\n - `SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING`: the keyboard\n element that associates keyboard events to this window\n\n **Parameter:** window the window to query.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7078 pub fn SDL_GetWindowProperties(window: *mut SDL_Window) -> SDL_PropertiesID;
7079}
7080unsafe extern "C" {
7081 #[doc = " Get the window flags.\n\n **Parameter:** window the window to query.\n **Returns:** a mask of the SDL_WindowFlags associated with `window`.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateWindow\n **See Also:** SDL_HideWindow\n **See Also:** SDL_MaximizeWindow\n **See Also:** SDL_MinimizeWindow\n **See Also:** SDL_SetWindowFullscreen\n **See Also:** SDL_SetWindowMouseGrab\n **See Also:** SDL_SetWindowFillDocument\n **See Also:** SDL_ShowWindow\n"]
7082 pub fn SDL_GetWindowFlags(window: *mut SDL_Window) -> SDL_WindowFlags;
7083}
7084unsafe extern "C" {
7085 #[doc = " Set the title of a window.\n\n This string is expected to be in UTF-8 encoding.\n\n **Parameter:** window the window to change.\n **Parameter:** title the desired window title in UTF-8 format.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowTitle\n"]
7086 pub fn SDL_SetWindowTitle(window: *mut SDL_Window, title: *const core::ffi::c_char) -> bool;
7087}
7088unsafe extern "C" {
7089 #[doc = " Get the title of a window.\n\n **Parameter:** window the window to query.\n **Returns:** the title of the window in UTF-8 format or \"\" if there is no\n title.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowTitle\n"]
7090 pub fn SDL_GetWindowTitle(window: *mut SDL_Window) -> *const core::ffi::c_char;
7091}
7092unsafe extern "C" {
7093 #[doc = " Set the icon for a window.\n\n If this function is passed a surface with alternate representations added\n using SDL_AddSurfaceAlternateImage(), the surface will be interpreted as\n the content to be used for 100% display scale, and the alternate\n representations will be used for high DPI situations. For example, if the\n original surface is 32x32, then on a 2x macOS display or 200% display scale\n on Windows, a 64x64 version of the image will be used, if available. If a\n matching version of the image isn't available, the closest larger size\n image will be downscaled to the appropriate size and be used instead, if\n available. Otherwise, the closest smaller image will be upscaled and be\n used instead.\n\n **Parameter:** window the window to change.\n **Parameter:** icon an SDL_Surface structure containing the icon for the window.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddSurfaceAlternateImage\n"]
7094 pub fn SDL_SetWindowIcon(window: *mut SDL_Window, icon: *mut SDL_Surface) -> bool;
7095}
7096unsafe extern "C" {
7097 #[doc = " Request that the window's position be set.\n\n If the window is in an exclusive fullscreen or maximized state, this\n request has no effect.\n\n This can be used to reposition fullscreen-desktop windows onto a different\n display, however, as exclusive fullscreen windows are locked to a specific\n display, they can only be repositioned programmatically via\n SDL_SetWindowFullscreenMode().\n\n On some windowing systems this request is asynchronous and the new\n coordinates may not have have been applied immediately upon the return of\n this function. If an immediate change is required, call SDL_SyncWindow() to\n block until the changes have taken effect.\n\n When the window position changes, an SDL_EVENT_WINDOW_MOVED event will be\n emitted with the window's new coordinates. Note that the new coordinates\n may not match the exact coordinates requested, as some windowing systems\n can restrict the position of the window in certain scenarios (e.g.\n constraining the position so the window is always within desktop bounds).\n Additionally, as this is just a request, it can be denied by the windowing\n system.\n\n **Parameter:** window the window to reposition.\n **Parameter:** x the x coordinate of the window, or `SDL_WINDOWPOS_CENTERED` or\n `SDL_WINDOWPOS_UNDEFINED`.\n **Parameter:** y the y coordinate of the window, or `SDL_WINDOWPOS_CENTERED` or\n `SDL_WINDOWPOS_UNDEFINED`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowPosition\n **See Also:** SDL_SyncWindow\n"]
7098 pub fn SDL_SetWindowPosition(
7099 window: *mut SDL_Window,
7100 x: core::ffi::c_int,
7101 y: core::ffi::c_int,
7102 ) -> bool;
7103}
7104unsafe extern "C" {
7105 #[doc = " Get the position of a window.\n\n This is the current position of the window as last reported by the\n windowing system.\n\n If you do not need the value for one of the positions a NULL may be passed\n in the `x` or `y` parameter.\n\n **Parameter:** window the window to query.\n **Parameter:** x a pointer filled in with the x position of the window, may be\n NULL.\n **Parameter:** y a pointer filled in with the y position of the window, may be\n NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowPosition\n"]
7106 pub fn SDL_GetWindowPosition(
7107 window: *mut SDL_Window,
7108 x: *mut core::ffi::c_int,
7109 y: *mut core::ffi::c_int,
7110 ) -> bool;
7111}
7112unsafe extern "C" {
7113 #[doc = " Request that the size of a window's client area be set.\n\n If the window is in a fullscreen or maximized state, this request has no\n effect.\n\n To change the exclusive fullscreen mode of a window, use\n SDL_SetWindowFullscreenMode().\n\n On some windowing systems, this request is asynchronous and the new window\n size may not have have been applied immediately upon the return of this\n function. If an immediate change is required, call SDL_SyncWindow() to\n block until the changes have taken effect.\n\n When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be\n emitted with the new window dimensions. Note that the new dimensions may\n not match the exact size requested, as some windowing systems can restrict\n the window size in certain scenarios (e.g. constraining the size of the\n content area to remain within the usable desktop bounds). Additionally, as\n this is just a request, it can be denied by the windowing system.\n\n **Parameter:** window the window to change.\n **Parameter:** w the width of the window, must be > 0.\n **Parameter:** h the height of the window, must be > 0.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowSize\n **See Also:** SDL_SetWindowFullscreenMode\n **See Also:** SDL_SyncWindow\n"]
7114 pub fn SDL_SetWindowSize(
7115 window: *mut SDL_Window,
7116 w: core::ffi::c_int,
7117 h: core::ffi::c_int,
7118 ) -> bool;
7119}
7120unsafe extern "C" {
7121 #[doc = " Get the size of a window's client area.\n\n The window pixel size may differ from its window coordinate size if the\n window is on a high pixel density display. Use SDL_GetWindowSizeInPixels()\n or SDL_GetRenderOutputSize() to get the real client area size in pixels.\n\n **Parameter:** window the window to query the width and height from.\n **Parameter:** w a pointer filled in with the width of the window, may be NULL.\n **Parameter:** h a pointer filled in with the height of the window, may be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderOutputSize\n **See Also:** SDL_GetWindowSizeInPixels\n **See Also:** SDL_SetWindowSize\n **See Also:** SDL_EVENT_WINDOW_RESIZED\n"]
7122 pub fn SDL_GetWindowSize(
7123 window: *mut SDL_Window,
7124 w: *mut core::ffi::c_int,
7125 h: *mut core::ffi::c_int,
7126 ) -> bool;
7127}
7128unsafe extern "C" {
7129 #[doc = " Get the safe area for this window.\n\n Some devices have portions of the screen which are partially obscured or\n not interactive, possibly due to on-screen controls, curved edges, camera\n notches, TV overscan, etc. This function provides the area of the window\n which is safe to have interactable content. You should continue rendering\n into the rest of the window, but it should not contain visually important\n or interactable content.\n\n **Parameter:** window the window to query.\n **Parameter:** rect a pointer filled in with the client area that is safe for\n interactive content.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7130 pub fn SDL_GetWindowSafeArea(window: *mut SDL_Window, rect: *mut SDL_Rect) -> bool;
7131}
7132unsafe extern "C" {
7133 #[doc = " Request that the aspect ratio of a window's client area be set.\n\n The aspect ratio is the ratio of width divided by height, e.g. 2560x1600\n would be 1.6. Larger aspect ratios are wider and smaller aspect ratios are\n narrower.\n\n If, at the time of this request, the window in a fixed-size state, such as\n maximized or fullscreen, the request will be deferred until the window\n exits this state and becomes resizable again.\n\n On some windowing systems, this request is asynchronous and the new window\n aspect ratio may not have have been applied immediately upon the return of\n this function. If an immediate change is required, call SDL_SyncWindow() to\n block until the changes have taken effect.\n\n When the window size changes, an SDL_EVENT_WINDOW_RESIZED event will be\n emitted with the new window dimensions. Note that the new dimensions may\n not match the exact aspect ratio requested, as some windowing systems can\n restrict the window size in certain scenarios (e.g. constraining the size\n of the content area to remain within the usable desktop bounds).\n Additionally, as this is just a request, it can be denied by the windowing\n system.\n\n **Parameter:** window the window to change.\n **Parameter:** min_aspect the minimum aspect ratio of the window, or 0.0f for no\n limit.\n **Parameter:** max_aspect the maximum aspect ratio of the window, or 0.0f for no\n limit.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowAspectRatio\n **See Also:** SDL_SyncWindow\n"]
7134 pub fn SDL_SetWindowAspectRatio(
7135 window: *mut SDL_Window,
7136 min_aspect: f32,
7137 max_aspect: f32,
7138 ) -> bool;
7139}
7140unsafe extern "C" {
7141 #[doc = " Get the aspect ratio of a window's client area.\n\n **Parameter:** window the window to query the width and height from.\n **Parameter:** min_aspect a pointer filled in with the minimum aspect ratio of the\n window, may be NULL.\n **Parameter:** max_aspect a pointer filled in with the maximum aspect ratio of the\n window, may be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowAspectRatio\n"]
7142 pub fn SDL_GetWindowAspectRatio(
7143 window: *mut SDL_Window,
7144 min_aspect: *mut f32,
7145 max_aspect: *mut f32,
7146 ) -> bool;
7147}
7148unsafe extern "C" {
7149 #[doc = " Get the size of a window's borders (decorations) around the client area.\n\n Note: If this function fails (returns false), the size values will be\n initialized to 0, 0, 0, 0 (if a non-NULL pointer is provided), as if the\n window in question was borderless.\n\n Note: This function may fail on systems where the window has not yet been\n decorated by the display server (for example, immediately after calling\n SDL_CreateWindow). It is recommended that you wait at least until the\n window has been presented and composited, so that the window system has a\n chance to decorate the window and provide the border dimensions to SDL.\n\n This function also returns false if getting the information is not\n supported.\n\n **Parameter:** window the window to query the size values of the border\n (decorations) from.\n **Parameter:** top pointer to variable for storing the size of the top border; NULL\n is permitted.\n **Parameter:** left pointer to variable for storing the size of the left border;\n NULL is permitted.\n **Parameter:** bottom pointer to variable for storing the size of the bottom\n border; NULL is permitted.\n **Parameter:** right pointer to variable for storing the size of the right border;\n NULL is permitted.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowSize\n"]
7150 pub fn SDL_GetWindowBordersSize(
7151 window: *mut SDL_Window,
7152 top: *mut core::ffi::c_int,
7153 left: *mut core::ffi::c_int,
7154 bottom: *mut core::ffi::c_int,
7155 right: *mut core::ffi::c_int,
7156 ) -> bool;
7157}
7158unsafe extern "C" {
7159 #[doc = " Get the size of a window's client area, in pixels.\n\n **Parameter:** window the window from which the drawable size should be queried.\n **Parameter:** w a pointer to variable for storing the width in pixels, may be\n NULL.\n **Parameter:** h a pointer to variable for storing the height in pixels, may be\n NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateWindow\n **See Also:** SDL_GetWindowSize\n"]
7160 pub fn SDL_GetWindowSizeInPixels(
7161 window: *mut SDL_Window,
7162 w: *mut core::ffi::c_int,
7163 h: *mut core::ffi::c_int,
7164 ) -> bool;
7165}
7166unsafe extern "C" {
7167 #[doc = " Set the minimum size of a window's client area.\n\n **Parameter:** window the window to change.\n **Parameter:** min_w the minimum width of the window, or 0 for no limit.\n **Parameter:** min_h the minimum height of the window, or 0 for no limit.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowMinimumSize\n **See Also:** SDL_SetWindowMaximumSize\n"]
7168 pub fn SDL_SetWindowMinimumSize(
7169 window: *mut SDL_Window,
7170 min_w: core::ffi::c_int,
7171 min_h: core::ffi::c_int,
7172 ) -> bool;
7173}
7174unsafe extern "C" {
7175 #[doc = " Get the minimum size of a window's client area.\n\n **Parameter:** window the window to query.\n **Parameter:** w a pointer filled in with the minimum width of the window, may be\n NULL.\n **Parameter:** h a pointer filled in with the minimum height of the window, may be\n NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowMaximumSize\n **See Also:** SDL_SetWindowMinimumSize\n"]
7176 pub fn SDL_GetWindowMinimumSize(
7177 window: *mut SDL_Window,
7178 w: *mut core::ffi::c_int,
7179 h: *mut core::ffi::c_int,
7180 ) -> bool;
7181}
7182unsafe extern "C" {
7183 #[doc = " Set the maximum size of a window's client area.\n\n **Parameter:** window the window to change.\n **Parameter:** max_w the maximum width of the window, or 0 for no limit.\n **Parameter:** max_h the maximum height of the window, or 0 for no limit.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowMaximumSize\n **See Also:** SDL_SetWindowMinimumSize\n"]
7184 pub fn SDL_SetWindowMaximumSize(
7185 window: *mut SDL_Window,
7186 max_w: core::ffi::c_int,
7187 max_h: core::ffi::c_int,
7188 ) -> bool;
7189}
7190unsafe extern "C" {
7191 #[doc = " Get the maximum size of a window's client area.\n\n **Parameter:** window the window to query.\n **Parameter:** w a pointer filled in with the maximum width of the window, may be\n NULL.\n **Parameter:** h a pointer filled in with the maximum height of the window, may be\n NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowMinimumSize\n **See Also:** SDL_SetWindowMaximumSize\n"]
7192 pub fn SDL_GetWindowMaximumSize(
7193 window: *mut SDL_Window,
7194 w: *mut core::ffi::c_int,
7195 h: *mut core::ffi::c_int,
7196 ) -> bool;
7197}
7198unsafe extern "C" {
7199 #[doc = " Set the border state of a window.\n\n This will add or remove the window's `SDL_WINDOW_BORDERLESS` flag and add\n or remove the border from the actual window. This is a no-op if the\n window's border already matches the requested state.\n\n You can't change the border state of a fullscreen window.\n\n **Parameter:** window the window of which to change the border state.\n **Parameter:** bordered false to remove border, true to add border.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowFlags\n"]
7200 pub fn SDL_SetWindowBordered(window: *mut SDL_Window, bordered: bool) -> bool;
7201}
7202unsafe extern "C" {
7203 #[doc = " Set the user-resizable state of a window.\n\n This will add or remove the window's `SDL_WINDOW_RESIZABLE` flag and\n allow/disallow user resizing of the window. This is a no-op if the window's\n resizable state already matches the requested state.\n\n You can't change the resizable state of a fullscreen window.\n\n **Parameter:** window the window of which to change the resizable state.\n **Parameter:** resizable true to allow resizing, false to disallow.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowFlags\n"]
7204 pub fn SDL_SetWindowResizable(window: *mut SDL_Window, resizable: bool) -> bool;
7205}
7206unsafe extern "C" {
7207 #[doc = " Set the window to always be above the others.\n\n This will add or remove the window's `SDL_WINDOW_ALWAYS_ON_TOP` flag. This\n will bring the window to the front and keep the window above the rest.\n\n **Parameter:** window the window of which to change the always on top state.\n **Parameter:** on_top true to set the window always on top, false to disable.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowFlags\n"]
7208 pub fn SDL_SetWindowAlwaysOnTop(window: *mut SDL_Window, on_top: bool) -> bool;
7209}
7210unsafe extern "C" {
7211 #[doc = " Set the window to fill the current document space (Emscripten only).\n\n This will add or remove the window's `SDL_WINDOW_FILL_DOCUMENT` flag.\n\n Currently this flag only applies to the Emscripten target.\n\n When enabled, the canvas element fills the entire document. Resize events\n will be generated as the browser window is resized, as that will adjust the\n canvas size as well. The canvas will cover anything else on the page,\n including any controls provided by Emscripten in its generated HTML file\n (in fact, any elements on the page that aren't the canvas will be moved\n into a hidden `div` element).\n\n Often times this is desirable for a browser-based game, but it means\n several things that we expect of an SDL window on other platforms might not\n work as expected, such as minimum window sizes and aspect ratios.\n\n **Parameter:** window the window of which to change the fill-document state.\n **Parameter:** fill true to set the window to fill the document, false to disable.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_GetWindowFlags\n"]
7212 pub fn SDL_SetWindowFillDocument(window: *mut SDL_Window, fill: bool) -> bool;
7213}
7214unsafe extern "C" {
7215 #[doc = " Show a window.\n\n **Parameter:** window the window to show.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HideWindow\n **See Also:** SDL_RaiseWindow\n"]
7216 pub fn SDL_ShowWindow(window: *mut SDL_Window) -> bool;
7217}
7218unsafe extern "C" {
7219 #[doc = " Hide a window.\n\n **Parameter:** window the window to hide.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ShowWindow\n **See Also:** SDL_WINDOW_HIDDEN\n"]
7220 pub fn SDL_HideWindow(window: *mut SDL_Window) -> bool;
7221}
7222unsafe extern "C" {
7223 #[doc = " Request that a window be raised above other windows and gain the input\n focus.\n\n The result of this request is subject to desktop window manager policy,\n particularly if raising the requested window would result in stealing focus\n from another application. If the window is successfully raised and gains\n input focus, an SDL_EVENT_WINDOW_FOCUS_GAINED event will be emitted, and\n the window will have the SDL_WINDOW_INPUT_FOCUS flag set.\n\n **Parameter:** window the window to raise.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7224 pub fn SDL_RaiseWindow(window: *mut SDL_Window) -> bool;
7225}
7226unsafe extern "C" {
7227 #[doc = " Request that the window be made as large as possible.\n\n Non-resizable windows can't be maximized. The window must have the\n SDL_WINDOW_RESIZABLE flag set, or this will have no effect.\n\n On some windowing systems this request is asynchronous and the new window\n state may not have have been applied immediately upon the return of this\n function. If an immediate change is required, call SDL_SyncWindow() to\n block until the changes have taken effect.\n\n When the window state changes, an SDL_EVENT_WINDOW_MAXIMIZED event will be\n emitted. Note that, as this is just a request, the windowing system can\n deny the state change.\n\n When maximizing a window, whether the constraints set via\n SDL_SetWindowMaximumSize() are honored depends on the policy of the window\n manager. Win32 and macOS enforce the constraints when maximizing, while X11\n and Wayland window managers may vary.\n\n **Parameter:** window the window to maximize.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MinimizeWindow\n **See Also:** SDL_RestoreWindow\n **See Also:** SDL_SyncWindow\n"]
7228 pub fn SDL_MaximizeWindow(window: *mut SDL_Window) -> bool;
7229}
7230unsafe extern "C" {
7231 #[doc = " Request that the window be minimized to an iconic representation.\n\n If the window is in a fullscreen state, this request has no direct effect.\n It may alter the state the window is returned to when leaving fullscreen.\n\n On some windowing systems this request is asynchronous and the new window\n state may not have been applied immediately upon the return of this\n function. If an immediate change is required, call SDL_SyncWindow() to\n block until the changes have taken effect.\n\n When the window state changes, an SDL_EVENT_WINDOW_MINIMIZED event will be\n emitted. Note that, as this is just a request, the windowing system can\n deny the state change.\n\n **Parameter:** window the window to minimize.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MaximizeWindow\n **See Also:** SDL_RestoreWindow\n **See Also:** SDL_SyncWindow\n"]
7232 pub fn SDL_MinimizeWindow(window: *mut SDL_Window) -> bool;
7233}
7234unsafe extern "C" {
7235 #[doc = " Request that the size and position of a minimized or maximized window be\n restored.\n\n If the window is in a fullscreen state, this request has no direct effect.\n It may alter the state the window is returned to when leaving fullscreen.\n\n On some windowing systems this request is asynchronous and the new window\n state may not have have been applied immediately upon the return of this\n function. If an immediate change is required, call SDL_SyncWindow() to\n block until the changes have taken effect.\n\n When the window state changes, an SDL_EVENT_WINDOW_RESTORED event will be\n emitted. Note that, as this is just a request, the windowing system can\n deny the state change.\n\n **Parameter:** window the window to restore.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_MaximizeWindow\n **See Also:** SDL_MinimizeWindow\n **See Also:** SDL_SyncWindow\n"]
7236 pub fn SDL_RestoreWindow(window: *mut SDL_Window) -> bool;
7237}
7238unsafe extern "C" {
7239 #[doc = " Request that the window's fullscreen state be changed.\n\n By default a window in fullscreen state uses borderless fullscreen desktop\n mode, but a specific exclusive display mode can be set using\n SDL_SetWindowFullscreenMode().\n\n On some windowing systems this request is asynchronous and the new\n fullscreen state may not have have been applied immediately upon the return\n of this function. If an immediate change is required, call SDL_SyncWindow()\n to block until the changes have taken effect.\n\n When the window state changes, an SDL_EVENT_WINDOW_ENTER_FULLSCREEN or\n SDL_EVENT_WINDOW_LEAVE_FULLSCREEN event will be emitted. Note that, as this\n is just a request, it can be denied by the windowing system.\n\n **Parameter:** window the window to change.\n **Parameter:** fullscreen true for fullscreen mode, false for windowed mode.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowFullscreenMode\n **See Also:** SDL_SetWindowFullscreenMode\n **See Also:** SDL_SyncWindow\n **See Also:** SDL_WINDOW_FULLSCREEN\n"]
7240 pub fn SDL_SetWindowFullscreen(window: *mut SDL_Window, fullscreen: bool) -> bool;
7241}
7242unsafe extern "C" {
7243 #[doc = " Block until any pending window state is finalized.\n\n On asynchronous windowing systems, this acts as a synchronization barrier\n for pending window state. It will attempt to wait until any pending window\n state has been applied and is guaranteed to return within finite time. Note\n that for how long it can potentially block depends on the underlying window\n system, as window state changes may involve somewhat lengthy animations\n that must complete before the window is in its final requested state.\n\n On windowing systems where changes are immediate, this does nothing.\n\n **Parameter:** window the window for which to wait for the pending state to be\n applied.\n **Returns:** true on success or false if the operation timed out before the\n window was in the requested state.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowSize\n **See Also:** SDL_SetWindowPosition\n **See Also:** SDL_SetWindowFullscreen\n **See Also:** SDL_MinimizeWindow\n **See Also:** SDL_MaximizeWindow\n **See Also:** SDL_RestoreWindow\n **See Also:** SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS\n"]
7244 pub fn SDL_SyncWindow(window: *mut SDL_Window) -> bool;
7245}
7246unsafe extern "C" {
7247 #[doc = " Return whether the window has a surface associated with it.\n\n **Parameter:** window the window to query.\n **Returns:** true if there is a surface associated with the window, or false\n otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowSurface\n"]
7248 pub fn SDL_WindowHasSurface(window: *mut SDL_Window) -> bool;
7249}
7250unsafe extern "C" {
7251 #[doc = " Get the SDL surface associated with the window.\n\n A new surface will be created with the optimal format for the window, if\n necessary. This surface will be freed when the window is destroyed. Do not\n free this surface.\n\n This surface will be invalidated if the window is resized. After resizing a\n window this function must be called again to return a valid surface.\n\n You may not combine this with 3D or the rendering API on this window.\n\n This function is affected by `SDL_HINT_FRAMEBUFFER_ACCELERATION`.\n\n **Parameter:** window the window to query.\n **Returns:** the surface associated with the window, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyWindowSurface\n **See Also:** SDL_WindowHasSurface\n **See Also:** SDL_UpdateWindowSurface\n **See Also:** SDL_UpdateWindowSurfaceRects\n"]
7252 pub fn SDL_GetWindowSurface(window: *mut SDL_Window) -> *mut SDL_Surface;
7253}
7254unsafe extern "C" {
7255 #[doc = " Toggle VSync for the window surface.\n\n When a window surface is created, vsync defaults to\n SDL_WINDOW_SURFACE_VSYNC_DISABLED.\n\n The `vsync` parameter can be 1 to synchronize present with every vertical\n refresh, 2 to synchronize present with every second vertical refresh, etc.,\n SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync),\n or SDL_WINDOW_SURFACE_VSYNC_DISABLED to disable. Not every value is\n supported by every driver, so you should check the return value to see\n whether the requested setting is supported.\n\n **Parameter:** window the window.\n **Parameter:** vsync the vertical refresh sync interval.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowSurfaceVSync\n"]
7256 pub fn SDL_SetWindowSurfaceVSync(window: *mut SDL_Window, vsync: core::ffi::c_int) -> bool;
7257}
7258unsafe extern "C" {
7259 #[doc = " Get VSync for the window surface.\n\n **Parameter:** window the window to query.\n **Parameter:** vsync an int filled with the current vertical refresh sync interval.\n See SDL_SetWindowSurfaceVSync() for the meaning of the value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowSurfaceVSync\n"]
7260 pub fn SDL_GetWindowSurfaceVSync(window: *mut SDL_Window, vsync: *mut core::ffi::c_int)
7261 -> bool;
7262}
7263unsafe extern "C" {
7264 #[doc = " Copy the window surface to the screen.\n\n This is the function you use to reflect any changes to the surface on the\n screen.\n\n This function is equivalent to the SDL 1.2 API SDL_Flip().\n\n **Parameter:** window the window to update.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowSurface\n **See Also:** SDL_UpdateWindowSurfaceRects\n"]
7265 pub fn SDL_UpdateWindowSurface(window: *mut SDL_Window) -> bool;
7266}
7267unsafe extern "C" {
7268 #[doc = " Copy areas of the window surface to the screen.\n\n This is the function you use to reflect changes to portions of the surface\n on the screen.\n\n This function is equivalent to the SDL 1.2 API SDL_UpdateRects().\n\n Note that this function will update _at least_ the rectangles specified,\n but this is only intended as an optimization; in practice, this might\n update more of the screen (or all of the screen!), depending on what method\n SDL uses to send pixels to the system.\n\n **Parameter:** window the window to update.\n **Parameter:** rects an array of SDL_Rect structures representing areas of the\n surface to copy, in pixels.\n **Parameter:** numrects the number of rectangles.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowSurface\n **See Also:** SDL_UpdateWindowSurface\n"]
7269 pub fn SDL_UpdateWindowSurfaceRects(
7270 window: *mut SDL_Window,
7271 rects: *const SDL_Rect,
7272 numrects: core::ffi::c_int,
7273 ) -> bool;
7274}
7275unsafe extern "C" {
7276 #[doc = " Destroy the surface associated with the window.\n\n **Parameter:** window the window to update.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowSurface\n **See Also:** SDL_WindowHasSurface\n"]
7277 pub fn SDL_DestroyWindowSurface(window: *mut SDL_Window) -> bool;
7278}
7279unsafe extern "C" {
7280 #[doc = " Set a window's keyboard grab mode.\n\n Keyboard grab enables capture of system keyboard shortcuts like Alt+Tab or\n the Meta/Super key. Note that not all system keyboard shortcuts can be\n captured by applications (one example is Ctrl+Alt+Del on Windows).\n\n This is primarily intended for specialized applications such as VNC clients\n or VM frontends. Normal games should not use keyboard grab.\n\n When keyboard grab is enabled, SDL will continue to handle Alt+Tab when the\n window is full-screen to ensure the user is not trapped in your\n application. If you have a custom keyboard shortcut to exit fullscreen\n mode, you may suppress this behavior with\n `SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED`.\n\n If the caller enables a grab while another window is currently grabbed, the\n other window loses its grab in favor of the caller's window.\n\n **Parameter:** window the window for which the keyboard grab mode should be set.\n **Parameter:** grabbed this is true to grab keyboard, and false to release.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowKeyboardGrab\n **See Also:** SDL_SetWindowMouseGrab\n"]
7281 pub fn SDL_SetWindowKeyboardGrab(window: *mut SDL_Window, grabbed: bool) -> bool;
7282}
7283unsafe extern "C" {
7284 #[doc = " Set a window's mouse grab mode.\n\n Mouse grab confines the mouse cursor to the window.\n\n **Parameter:** window the window for which the mouse grab mode should be set.\n **Parameter:** grabbed this is true to grab mouse, and false to release.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowMouseRect\n **See Also:** SDL_SetWindowMouseRect\n **See Also:** SDL_SetWindowKeyboardGrab\n"]
7285 pub fn SDL_SetWindowMouseGrab(window: *mut SDL_Window, grabbed: bool) -> bool;
7286}
7287unsafe extern "C" {
7288 #[doc = " Get a window's keyboard grab mode.\n\n **Parameter:** window the window to query.\n **Returns:** true if keyboard is grabbed, and false otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowKeyboardGrab\n"]
7289 pub fn SDL_GetWindowKeyboardGrab(window: *mut SDL_Window) -> bool;
7290}
7291unsafe extern "C" {
7292 #[doc = " Get a window's mouse grab mode.\n\n **Parameter:** window the window to query.\n **Returns:** true if mouse is grabbed, and false otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowMouseRect\n **See Also:** SDL_SetWindowMouseRect\n **See Also:** SDL_SetWindowMouseGrab\n **See Also:** SDL_SetWindowKeyboardGrab\n"]
7293 pub fn SDL_GetWindowMouseGrab(window: *mut SDL_Window) -> bool;
7294}
7295unsafe extern "C" {
7296 #[doc = " Get the window that currently has an input grab enabled.\n\n **Returns:** the window if input is grabbed or NULL otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowMouseGrab\n **See Also:** SDL_SetWindowKeyboardGrab\n"]
7297 pub fn SDL_GetGrabbedWindow() -> *mut SDL_Window;
7298}
7299unsafe extern "C" {
7300 #[doc = " Confines the cursor to the specified area of a window.\n\n Note that this does NOT grab the cursor, it only defines the area a cursor\n is restricted to when the window has mouse focus.\n\n **Parameter:** window the window that will be associated with the barrier.\n **Parameter:** rect a rectangle area in window-relative coordinates. If NULL the\n barrier for the specified window will be destroyed.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowMouseRect\n **See Also:** SDL_GetWindowMouseGrab\n **See Also:** SDL_SetWindowMouseGrab\n"]
7301 pub fn SDL_SetWindowMouseRect(window: *mut SDL_Window, rect: *const SDL_Rect) -> bool;
7302}
7303unsafe extern "C" {
7304 #[doc = " Get the mouse confinement rectangle of a window.\n\n **Parameter:** window the window to query.\n **Returns:** a pointer to the mouse confinement rectangle of a window, or NULL\n if there isn't one.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowMouseRect\n **See Also:** SDL_GetWindowMouseGrab\n **See Also:** SDL_SetWindowMouseGrab\n"]
7305 pub fn SDL_GetWindowMouseRect(window: *mut SDL_Window) -> *const SDL_Rect;
7306}
7307unsafe extern "C" {
7308 #[doc = " Set the opacity for a window.\n\n The parameter `opacity` will be clamped internally between 0.0f\n (transparent) and 1.0f (opaque).\n\n This function also returns false if setting the opacity isn't supported.\n\n **Parameter:** window the window which will be made transparent or opaque.\n **Parameter:** opacity the opacity value (0.0f - transparent, 1.0f - opaque).\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowOpacity\n"]
7309 pub fn SDL_SetWindowOpacity(window: *mut SDL_Window, opacity: f32) -> bool;
7310}
7311unsafe extern "C" {
7312 #[doc = " Get the opacity of a window.\n\n If transparency isn't supported on this platform, opacity will be returned\n as 1.0f without error.\n\n **Parameter:** window the window to get the current opacity value from.\n **Returns:** the opacity, (0.0f - transparent, 1.0f - opaque), or -1.0f on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowOpacity\n"]
7313 pub fn SDL_GetWindowOpacity(window: *mut SDL_Window) -> f32;
7314}
7315unsafe extern "C" {
7316 #[doc = " Set the window as a child of a parent window.\n\n If the window is already the child of an existing window, it will be\n reparented to the new owner. Setting the parent window to NULL unparents\n the window and removes child window status.\n\n If a parent window is hidden or destroyed, the operation will be\n recursively applied to child windows. Child windows hidden with the parent\n that did not have their hidden status explicitly set will be restored when\n the parent is shown.\n\n Attempting to set the parent of a window that is currently in the modal\n state will fail. Use SDL_SetWindowModal() to cancel the modal status before\n attempting to change the parent.\n\n Popup windows cannot change parents and attempts to do so will fail.\n\n Setting a parent window that is currently the sibling or descendent of the\n child window results in undefined behavior.\n\n **Parameter:** window the window that should become the child of a parent.\n **Parameter:** parent the new parent window for the child window.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowModal\n"]
7317 pub fn SDL_SetWindowParent(window: *mut SDL_Window, parent: *mut SDL_Window) -> bool;
7318}
7319unsafe extern "C" {
7320 #[doc = " Toggle the state of the window as modal.\n\n To enable modal status on a window, the window must currently be the child\n window of a parent, or toggling modal status on will fail.\n\n **Parameter:** window the window on which to set the modal state.\n **Parameter:** modal true to toggle modal status on, false to toggle it off.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowParent\n **See Also:** SDL_WINDOW_MODAL\n"]
7321 pub fn SDL_SetWindowModal(window: *mut SDL_Window, modal: bool) -> bool;
7322}
7323unsafe extern "C" {
7324 #[doc = " Set whether the window may have input focus.\n\n **Parameter:** window the window to set focusable state.\n **Parameter:** focusable true to allow input focus, false to not allow input focus.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7325 pub fn SDL_SetWindowFocusable(window: *mut SDL_Window, focusable: bool) -> bool;
7326}
7327unsafe extern "C" {
7328 #[doc = " Display the system-level window menu.\n\n This default window menu is provided by the system and on some platforms\n provides functionality for setting or changing privileged state on the\n window, such as moving it between workspaces or displays, or toggling the\n always-on-top property.\n\n On platforms or desktops where this is unsupported, this function does\n nothing.\n\n **Parameter:** window the window for which the menu will be displayed.\n **Parameter:** x the x coordinate of the menu, relative to the origin (top-left) of\n the client area.\n **Parameter:** y the y coordinate of the menu, relative to the origin (top-left) of\n the client area.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7329 pub fn SDL_ShowWindowSystemMenu(
7330 window: *mut SDL_Window,
7331 x: core::ffi::c_int,
7332 y: core::ffi::c_int,
7333 ) -> bool;
7334}
7335impl SDL_HitTestResult {
7336 #[doc = "< Region is normal. No special properties.\n"]
7337 pub const SDL_HITTEST_NORMAL: SDL_HitTestResult = SDL_HitTestResult(0);
7338 #[doc = "< Region can drag entire window.\n"]
7339 pub const SDL_HITTEST_DRAGGABLE: SDL_HitTestResult = SDL_HitTestResult(1);
7340 #[doc = "< Region is the resizable top-left corner border.\n"]
7341 pub const SDL_HITTEST_RESIZE_TOPLEFT: SDL_HitTestResult = SDL_HitTestResult(2);
7342 #[doc = "< Region is the resizable top border.\n"]
7343 pub const SDL_HITTEST_RESIZE_TOP: SDL_HitTestResult = SDL_HitTestResult(3);
7344 #[doc = "< Region is the resizable top-right corner border.\n"]
7345 pub const SDL_HITTEST_RESIZE_TOPRIGHT: SDL_HitTestResult = SDL_HitTestResult(4);
7346 #[doc = "< Region is the resizable right border.\n"]
7347 pub const SDL_HITTEST_RESIZE_RIGHT: SDL_HitTestResult = SDL_HitTestResult(5);
7348 #[doc = "< Region is the resizable bottom-right corner border.\n"]
7349 pub const SDL_HITTEST_RESIZE_BOTTOMRIGHT: SDL_HitTestResult = SDL_HitTestResult(6);
7350 #[doc = "< Region is the resizable bottom border.\n"]
7351 pub const SDL_HITTEST_RESIZE_BOTTOM: SDL_HitTestResult = SDL_HitTestResult(7);
7352 #[doc = "< Region is the resizable bottom-left corner border.\n"]
7353 pub const SDL_HITTEST_RESIZE_BOTTOMLEFT: SDL_HitTestResult = SDL_HitTestResult(8);
7354 #[doc = "< Region is the resizable left border.\n"]
7355 pub const SDL_HITTEST_RESIZE_LEFT: SDL_HitTestResult = SDL_HitTestResult(9);
7356}
7357#[repr(transparent)]
7358#[doc = " Possible return values from the SDL_HitTest callback.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_HitTest\n"]
7359#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7360pub struct SDL_HitTestResult(pub core::ffi::c_uint);
7361#[doc = " Callback used for hit-testing.\n\n **Parameter:** win the SDL_Window where hit-testing was set on.\n **Parameter:** area an SDL_Point which should be hit-tested.\n **Parameter:** data what was passed as `callback_data` to SDL_SetWindowHitTest().\n **Returns:** an SDL_HitTestResult value.\n\n **See Also:** SDL_SetWindowHitTest\n"]
7362pub type SDL_HitTest = ::core::option::Option<
7363 unsafe extern "C" fn(
7364 win: *mut SDL_Window,
7365 area: *const SDL_Point,
7366 data: *mut core::ffi::c_void,
7367 ) -> SDL_HitTestResult,
7368>;
7369unsafe extern "C" {
7370 #[doc = " Provide a callback that decides if a window region has special properties.\n\n Normally windows are dragged and resized by decorations provided by the\n system window manager (a title bar, borders, etc), but for some apps, it\n makes sense to drag them from somewhere else inside the window itself; for\n example, one might have a borderless window that wants to be draggable from\n any part, or simulate its own title bar, etc.\n\n This function lets the app provide a callback that designates pieces of a\n given window as special. This callback is run during event processing if we\n need to tell the OS to treat a region of the window specially; the use of\n this callback is known as \"hit testing.\"\n\n Mouse input may not be delivered to your application if it is within a\n special area; the OS will often apply that input to moving the window or\n resizing the window and not deliver it to the application.\n\n Specifying NULL for a callback disables hit-testing. Hit-testing is\n disabled by default.\n\n Platforms that don't support this functionality will return false\n unconditionally, even if you're attempting to disable hit-testing.\n\n Your callback may fire at any time, and its firing does not indicate any\n specific behavior (for example, on Windows, this certainly might fire when\n the OS is deciding whether to drag your window, but it fires for lots of\n other reasons, too, some unrelated to anything you probably care about _and\n when the mouse isn't actually at the location it is testing_). Since this\n can fire at any time, you should try to keep your callback efficient,\n devoid of allocations, etc.\n\n **Parameter:** window the window to set hit-testing on.\n **Parameter:** callback the function to call when doing a hit-test.\n **Parameter:** callback_data an app-defined void pointer passed to **callback**.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7371 pub fn SDL_SetWindowHitTest(
7372 window: *mut SDL_Window,
7373 callback: SDL_HitTest,
7374 callback_data: *mut core::ffi::c_void,
7375 ) -> bool;
7376}
7377unsafe extern "C" {
7378 #[doc = " Set the shape of a transparent window.\n\n This sets the alpha channel of a transparent window and any fully\n transparent areas are also transparent to mouse clicks. If you are using\n something besides the SDL render API, then you are responsible for drawing\n the alpha channel of the window to match the shape alpha channel to get\n consistent cross-platform results.\n\n The shape is copied inside this function, so you can free it afterwards. If\n your shape surface changes, you should call SDL_SetWindowShape() again to\n update the window. This is an expensive operation, so should be done\n sparingly.\n\n The window must have been created with the SDL_WINDOW_TRANSPARENT flag.\n\n **Parameter:** window the window.\n **Parameter:** shape the surface representing the shape of the window, or NULL to\n remove any current shape.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7379 pub fn SDL_SetWindowShape(window: *mut SDL_Window, shape: *mut SDL_Surface) -> bool;
7380}
7381unsafe extern "C" {
7382 #[doc = " Request a window to demand attention from the user.\n\n **Parameter:** window the window to be flashed.\n **Parameter:** operation the operation to perform.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7383 pub fn SDL_FlashWindow(window: *mut SDL_Window, operation: SDL_FlashOperation) -> bool;
7384}
7385unsafe extern "C" {
7386 #[doc = " Sets the state of the progress bar for the given window’s taskbar icon.\n\n **Parameter:** window the window whose progress state is to be modified.\n **Parameter:** state the progress state. `SDL_PROGRESS_STATE_NONE` stops displaying\n the progress bar.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
7387 pub fn SDL_SetWindowProgressState(window: *mut SDL_Window, state: SDL_ProgressState) -> bool;
7388}
7389unsafe extern "C" {
7390 #[doc = " Get the state of the progress bar for the given window’s taskbar icon.\n\n **Parameter:** window the window to get the current progress state from.\n **Returns:** the progress state, or `SDL_PROGRESS_STATE_INVALID` on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
7391 pub fn SDL_GetWindowProgressState(window: *mut SDL_Window) -> SDL_ProgressState;
7392}
7393unsafe extern "C" {
7394 #[doc = " Sets the value of the progress bar for the given window’s taskbar icon.\n\n **Parameter:** window the window whose progress value is to be modified.\n **Parameter:** value the progress value in the range of [0.0f - 1.0f]. If the value\n is outside the valid range, it gets clamped.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
7395 pub fn SDL_SetWindowProgressValue(window: *mut SDL_Window, value: f32) -> bool;
7396}
7397unsafe extern "C" {
7398 #[doc = " Get the value of the progress bar for the given window’s taskbar icon.\n\n **Parameter:** window the window to get the current progress value from.\n **Returns:** the progress value in the range of [0.0f - 1.0f], or -1.0f on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
7399 pub fn SDL_GetWindowProgressValue(window: *mut SDL_Window) -> f32;
7400}
7401unsafe extern "C" {
7402 #[doc = " Destroy a window.\n\n Any child windows owned by the window will be recursively destroyed as\n well.\n\n Note that on some platforms, the visible window may not actually be removed\n from the screen until the SDL event loop is pumped again, even though the\n SDL_Window is no longer valid after this call.\n\n **Parameter:** window the window to destroy.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreatePopupWindow\n **See Also:** SDL_CreateWindow\n **See Also:** SDL_CreateWindowWithProperties\n"]
7403 pub fn SDL_DestroyWindow(window: *mut SDL_Window);
7404}
7405unsafe extern "C" {
7406 #[doc = " Check whether the screensaver is currently enabled.\n\n The screensaver is disabled by default.\n\n The default can also be changed using `SDL_HINT_VIDEO_ALLOW_SCREENSAVER`.\n\n **Returns:** true if the screensaver is enabled, false if it is disabled.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DisableScreenSaver\n **See Also:** SDL_EnableScreenSaver\n"]
7407 pub fn SDL_ScreenSaverEnabled() -> bool;
7408}
7409unsafe extern "C" {
7410 #[doc = " Allow the screen to be blanked by a screen saver.\n\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DisableScreenSaver\n **See Also:** SDL_ScreenSaverEnabled\n"]
7411 pub fn SDL_EnableScreenSaver() -> bool;
7412}
7413unsafe extern "C" {
7414 #[doc = " Prevent the screen from being blanked by a screen saver.\n\n If you disable the screensaver, it is automatically re-enabled when SDL\n quits.\n\n The screensaver is disabled by default, but this may by changed by\n SDL_HINT_VIDEO_ALLOW_SCREENSAVER.\n\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_EnableScreenSaver\n **See Also:** SDL_ScreenSaverEnabled\n"]
7415 pub fn SDL_DisableScreenSaver() -> bool;
7416}
7417unsafe extern "C" {
7418 #[doc = " Dynamically load an OpenGL library.\n\n This should be done after initializing the video driver, but before\n creating any OpenGL windows. If no OpenGL library is loaded, the default\n library will be loaded upon creation of the first OpenGL window.\n\n If you do this, you need to retrieve all of the GL functions used in your\n program from the dynamic library using SDL_GL_GetProcAddress().\n\n **Parameter:** path the platform dependent OpenGL library name, or NULL to open the\n default OpenGL library.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_GetProcAddress\n **See Also:** SDL_GL_UnloadLibrary\n"]
7419 pub fn SDL_GL_LoadLibrary(path: *const core::ffi::c_char) -> bool;
7420}
7421unsafe extern "C" {
7422 #[doc = " Get an OpenGL function by name.\n\n If the GL library is loaded at runtime with SDL_GL_LoadLibrary(), then all\n GL functions must be retrieved this way. Usually this is used to retrieve\n function pointers to OpenGL extensions.\n\n There are some quirks to looking up OpenGL functions that require some\n extra care from the application. If you code carefully, you can handle\n these quirks without any platform-specific code, though:\n\n - On Windows, function pointers are specific to the current GL context;\n this means you need to have created a GL context and made it current\n before calling SDL_GL_GetProcAddress(). If you recreate your context or\n create a second context, you should assume that any existing function\n pointers aren't valid to use with it. This is (currently) a\n Windows-specific limitation, and in practice lots of drivers don't suffer\n this limitation, but it is still the way the wgl API is documented to\n work and you should expect crashes if you don't respect it. Store a copy\n of the function pointers that comes and goes with context lifespan.\n - On X11, function pointers returned by this function are valid for any\n context, and can even be looked up before a context is created at all.\n This means that, for at least some common OpenGL implementations, if you\n look up a function that doesn't exist, you'll get a non-NULL result that\n is _NOT_ safe to call. You must always make sure the function is actually\n available for a given GL context before calling it, by checking for the\n existence of the appropriate extension with SDL_GL_ExtensionSupported(),\n or verifying that the version of OpenGL you're using offers the function\n as core functionality.\n - Some OpenGL drivers, on all platforms, *will* return NULL if a function\n isn't supported, but you can't count on this behavior. Check for\n extensions you use, and if you get a NULL anyway, act as if that\n extension wasn't available. This is probably a bug in the driver, but you\n can code defensively for this scenario anyhow.\n - Just because you're on Linux/Unix, don't assume you'll be using X11.\n Next-gen display servers are waiting to replace it, and may or may not\n make the same promises about function pointers.\n - OpenGL function pointers must be declared `APIENTRY` as in the example\n code. This will ensure the proper calling convention is followed on\n platforms where this matters (Win32) thereby avoiding stack corruption.\n\n **Parameter:** proc the name of an OpenGL function.\n **Returns:** a pointer to the named OpenGL function. The returned pointer\n should be cast to the appropriate function signature.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_ExtensionSupported\n **See Also:** SDL_GL_LoadLibrary\n **See Also:** SDL_GL_UnloadLibrary\n"]
7423 pub fn SDL_GL_GetProcAddress(proc_: *const core::ffi::c_char) -> SDL_FunctionPointer;
7424}
7425unsafe extern "C" {
7426 #[doc = " Get an EGL library function by name.\n\n If an EGL library is loaded, this function allows applications to get entry\n points for EGL functions. This is useful to provide to an EGL API and\n extension loader.\n\n **Parameter:** proc the name of an EGL function.\n **Returns:** a pointer to the named EGL function. The returned pointer should\n be cast to the appropriate function signature.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_EGL_GetCurrentDisplay\n"]
7427 pub fn SDL_EGL_GetProcAddress(proc_: *const core::ffi::c_char) -> SDL_FunctionPointer;
7428}
7429unsafe extern "C" {
7430 #[doc = " Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_LoadLibrary\n"]
7431 pub fn SDL_GL_UnloadLibrary();
7432}
7433unsafe extern "C" {
7434 #[doc = " Check if an OpenGL extension is supported for the current context.\n\n This function operates on the current GL context; you must have created a\n context and it must be current before calling this function. Do not assume\n that all contexts you create will have the same set of extensions\n available, or that recreating an existing context will offer the same\n extensions again.\n\n While it's probably not a massive overhead, this function is not an O(1)\n operation. Check the extensions you care about after creating the GL\n context and save that information somewhere instead of calling the function\n every time you need to know.\n\n **Parameter:** extension the name of the extension to check.\n **Returns:** true if the extension is supported, false otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7435 pub fn SDL_GL_ExtensionSupported(extension: *const core::ffi::c_char) -> bool;
7436}
7437unsafe extern "C" {
7438 #[doc = " Reset all previously set OpenGL context attributes to their default values.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_GetAttribute\n **See Also:** SDL_GL_SetAttribute\n"]
7439 pub fn SDL_GL_ResetAttributes();
7440}
7441unsafe extern "C" {
7442 #[doc = " Set an OpenGL window attribute before window creation.\n\n This function sets the OpenGL attribute `attr` to `value`. The requested\n attributes should be set before creating an OpenGL window. You should use\n SDL_GL_GetAttribute() to check the values after creating the OpenGL\n context, since the values obtained can differ from the requested ones.\n\n **Parameter:** attr an enum value specifying the OpenGL attribute to set.\n **Parameter:** value the desired value for the attribute.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_CreateContext\n **See Also:** SDL_GL_GetAttribute\n **See Also:** SDL_GL_ResetAttributes\n"]
7443 pub fn SDL_GL_SetAttribute(attr: SDL_GLAttr, value: core::ffi::c_int) -> bool;
7444}
7445unsafe extern "C" {
7446 #[doc = " Get the actual value for an attribute from the current context.\n\n **Parameter:** attr an SDL_GLAttr enum value specifying the OpenGL attribute to\n get.\n **Parameter:** value a pointer filled in with the current value of `attr`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_ResetAttributes\n **See Also:** SDL_GL_SetAttribute\n"]
7447 pub fn SDL_GL_GetAttribute(attr: SDL_GLAttr, value: *mut core::ffi::c_int) -> bool;
7448}
7449unsafe extern "C" {
7450 #[doc = " Create an OpenGL context for an OpenGL window, and make it current.\n\n The OpenGL context will be created with the current states set through\n SDL_GL_SetAttribute().\n\n The SDL_Window specified must have been created with the SDL_WINDOW_OPENGL\n flag, or context creation will fail.\n\n Windows users new to OpenGL should note that, for historical reasons, GL\n functions added after OpenGL version 1.1 are not available by default.\n Those functions must be loaded at run-time, either with an OpenGL\n extension-handling library or with SDL_GL_GetProcAddress() and its related\n functions.\n\n SDL_GLContext is opaque to the application.\n\n **Parameter:** window the window to associate with the context.\n **Returns:** the OpenGL context associated with `window` or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_DestroyContext\n **See Also:** SDL_GL_MakeCurrent\n"]
7451 pub fn SDL_GL_CreateContext(window: *mut SDL_Window) -> SDL_GLContext;
7452}
7453unsafe extern "C" {
7454 #[doc = " Set up an OpenGL context for rendering into an OpenGL window.\n\n The context must have been created with a compatible window.\n\n **Parameter:** window the window to associate with the context.\n **Parameter:** context the OpenGL context to associate with the window.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_CreateContext\n"]
7455 pub fn SDL_GL_MakeCurrent(window: *mut SDL_Window, context: SDL_GLContext) -> bool;
7456}
7457unsafe extern "C" {
7458 #[doc = " Get the currently active OpenGL window.\n\n **Returns:** the currently active OpenGL window on success or NULL on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7459 pub fn SDL_GL_GetCurrentWindow() -> *mut SDL_Window;
7460}
7461unsafe extern "C" {
7462 #[doc = " Get the currently active OpenGL context.\n\n **Returns:** the currently active OpenGL context or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_MakeCurrent\n"]
7463 pub fn SDL_GL_GetCurrentContext() -> SDL_GLContext;
7464}
7465unsafe extern "C" {
7466 #[doc = " Get the currently active EGL display.\n\n **Returns:** the currently active EGL display or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7467 pub fn SDL_EGL_GetCurrentDisplay() -> SDL_EGLDisplay;
7468}
7469unsafe extern "C" {
7470 #[doc = " Get the currently active EGL config.\n\n **Returns:** the currently active EGL config or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7471 pub fn SDL_EGL_GetCurrentConfig() -> SDL_EGLConfig;
7472}
7473unsafe extern "C" {
7474 #[doc = " Get the EGL surface associated with the window.\n\n **Parameter:** window the window to query.\n **Returns:** the EGLSurface pointer associated with the window, or NULL on\n failure.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7475 pub fn SDL_EGL_GetWindowSurface(window: *mut SDL_Window) -> SDL_EGLSurface;
7476}
7477unsafe extern "C" {
7478 #[doc = " Sets the callbacks for defining custom EGLAttrib arrays for EGL\n initialization.\n\n Callbacks that aren't needed can be set to NULL.\n\n NOTE: These callback pointers will be reset after SDL_GL_ResetAttributes.\n\n **Parameter:** platformAttribCallback callback for attributes to pass to\n eglGetPlatformDisplay. May be NULL.\n **Parameter:** surfaceAttribCallback callback for attributes to pass to\n eglCreateSurface. May be NULL.\n **Parameter:** contextAttribCallback callback for attributes to pass to\n eglCreateContext. May be NULL.\n **Parameter:** userdata a pointer that is passed to the callbacks.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7479 pub fn SDL_EGL_SetAttributeCallbacks(
7480 platformAttribCallback: SDL_EGLAttribArrayCallback,
7481 surfaceAttribCallback: SDL_EGLIntArrayCallback,
7482 contextAttribCallback: SDL_EGLIntArrayCallback,
7483 userdata: *mut core::ffi::c_void,
7484 );
7485}
7486unsafe extern "C" {
7487 #[doc = " Set the swap interval for the current OpenGL context.\n\n Some systems allow specifying -1 for the interval, to enable adaptive\n vsync. Adaptive vsync works the same as vsync, but if you've already missed\n the vertical retrace for a given frame, it swaps buffers immediately, which\n might be less jarring for the user during occasional framerate drops. If an\n application requests adaptive vsync and the system does not support it,\n this function will fail and return false. In such a case, you should\n probably retry the call with 1 for the interval.\n\n Adaptive vsync is implemented for some glX drivers with\n GLX_EXT_swap_control_tear, and for some Windows drivers with\n WGL_EXT_swap_control_tear.\n\n Read more on the Khronos wiki:\n https://www.khronos.org/opengl/wiki/Swap_Interval#Adaptive_Vsync\n\n **Parameter:** interval 0 for immediate updates, 1 for updates synchronized with\n the vertical retrace, -1 for adaptive vsync.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_GetSwapInterval\n"]
7488 pub fn SDL_GL_SetSwapInterval(interval: core::ffi::c_int) -> bool;
7489}
7490unsafe extern "C" {
7491 #[doc = " Get the swap interval for the current OpenGL context.\n\n If the system can't determine the swap interval, or there isn't a valid\n current context, this function will set *interval to 0 as a safe default.\n\n **Parameter:** interval output interval value. 0 if there is no vertical retrace\n synchronization, 1 if the buffer swap is synchronized with\n the vertical retrace, and -1 if late swaps happen\n immediately instead of waiting for the next retrace.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_SetSwapInterval\n"]
7492 pub fn SDL_GL_GetSwapInterval(interval: *mut core::ffi::c_int) -> bool;
7493}
7494unsafe extern "C" {
7495 #[doc = " Update a window with OpenGL rendering.\n\n This is used with double-buffered OpenGL contexts, which are the default.\n\n On macOS, make sure you bind 0 to the draw framebuffer before swapping the\n window, otherwise nothing will happen. If you aren't using\n glBindFramebuffer(), this is the default and you won't have to do anything\n extra.\n\n **Parameter:** window the window to change.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7496 pub fn SDL_GL_SwapWindow(window: *mut SDL_Window) -> bool;
7497}
7498unsafe extern "C" {
7499 #[doc = " Delete an OpenGL context.\n\n **Parameter:** context the OpenGL context to be deleted.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GL_CreateContext\n"]
7500 pub fn SDL_GL_DestroyContext(context: SDL_GLContext) -> bool;
7501}
7502#[doc = " An entry for filters for file dialogs.\n\n `name` is a user-readable label for the filter (for example, \"Office\n document\").\n\n `pattern` is a semicolon-separated list of file extensions (for example,\n \"doc;docx\"). File extensions may only contain alphanumeric characters,\n hyphens, underscores and periods. Alternatively, the whole string can be a\n single asterisk (\"*\"), which serves as an \"All files\" filter.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_DialogFileCallback\n **See Also:** SDL_ShowOpenFileDialog\n **See Also:** SDL_ShowSaveFileDialog\n **See Also:** SDL_ShowOpenFolderDialog\n **See Also:** SDL_ShowFileDialogWithProperties\n"]
7503#[repr(C)]
7504#[derive(Debug, Copy, Clone, Hash)]
7505pub struct SDL_DialogFileFilter {
7506 pub name: *const core::ffi::c_char,
7507 pub pattern: *const core::ffi::c_char,
7508}
7509#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7510const _: () = {
7511 ["Size of SDL_DialogFileFilter"][::core::mem::size_of::<SDL_DialogFileFilter>() - 16usize];
7512 ["Alignment of SDL_DialogFileFilter"][::core::mem::align_of::<SDL_DialogFileFilter>() - 8usize];
7513 ["Offset of field: SDL_DialogFileFilter::name"]
7514 [::core::mem::offset_of!(SDL_DialogFileFilter, name) - 0usize];
7515 ["Offset of field: SDL_DialogFileFilter::pattern"]
7516 [::core::mem::offset_of!(SDL_DialogFileFilter, pattern) - 8usize];
7517};
7518impl Default for SDL_DialogFileFilter {
7519 fn default() -> Self {
7520 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
7521 unsafe {
7522 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
7523 s.assume_init()
7524 }
7525 }
7526}
7527#[doc = " Callback used by file dialog functions.\n\n The specific usage is described in each function.\n\n If `filelist` is:\n\n - NULL, an error occurred. Details can be obtained with SDL_GetError().\n - A pointer to NULL, the user either didn't choose any file or canceled the\n dialog.\n - A pointer to non-`NULL`, the user chose one or more files. The argument\n is a null-terminated array of pointers to UTF-8 encoded strings, each\n containing a path.\n\n The filelist argument should not be freed; it will automatically be freed\n when the callback returns.\n\n The filter argument is the index of the filter that was selected, or -1 if\n no filter was selected or if the platform or method doesn't support\n fetching the selected filter.\n\n In Android, the `filelist` are `content://` URIs. They should be opened\n using SDL_IOFromFile() with appropriate modes. This applies both to open\n and save file dialog.\n\n **Parameter:** userdata an app-provided pointer, for the callback's use.\n **Parameter:** filelist the file(s) chosen by the user.\n **Parameter:** filter index of the selected filter.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_DialogFileFilter\n **See Also:** SDL_ShowOpenFileDialog\n **See Also:** SDL_ShowSaveFileDialog\n **See Also:** SDL_ShowOpenFolderDialog\n **See Also:** SDL_ShowFileDialogWithProperties\n"]
7528pub type SDL_DialogFileCallback = ::core::option::Option<
7529 unsafe extern "C" fn(
7530 userdata: *mut core::ffi::c_void,
7531 filelist: *const *const core::ffi::c_char,
7532 filter: core::ffi::c_int,
7533 ),
7534>;
7535unsafe extern "C" {
7536 #[doc = " Displays a dialog that lets the user select a file on their filesystem.\n\n This is an asynchronous function; it will return immediately, and the\n result will be passed to the callback.\n\n The callback will be invoked with a null-terminated list of files the user\n chose. The list will be empty if the user canceled the dialog, and it will\n be NULL if an error occurred.\n\n Note that the callback may be called from a different thread than the one\n the function was invoked on.\n\n Depending on the platform, the user may be allowed to input paths that\n don't yet exist.\n\n On Linux, dialogs may require XDG Portals, which requires DBus, which\n requires an event-handling loop. Apps that do not use SDL to handle events\n should add a call to SDL_PumpEvents in their main loop.\n\n **Parameter:** callback a function pointer to be invoked when the user selects a\n file and accepts, or cancels the dialog, or an error\n occurs.\n **Parameter:** userdata an optional pointer to pass extra data to the callback when\n it will be invoked.\n **Parameter:** window the window that the dialog should be modal for, may be NULL.\n Not all platforms support this option.\n **Parameter:** filters a list of filters, may be NULL. Not all platforms support\n this option, and platforms that do support it may allow the\n user to ignore the filters. If non-NULL, it must remain\n valid at least until the callback is invoked.\n **Parameter:** nfilters the number of filters. Ignored if filters is NULL.\n **Parameter:** default_location the default folder or file to start the dialog at,\n may be NULL. Not all platforms support this option.\n **Parameter:** allow_many if non-zero, the user will be allowed to select multiple\n entries. Not all platforms support this option.\n\n **Thread Safety:** This function should be called only from the main thread. The\n callback may be invoked from the same thread or from a\n different one, depending on the OS's constraints.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DialogFileCallback\n **See Also:** SDL_DialogFileFilter\n **See Also:** SDL_ShowSaveFileDialog\n **See Also:** SDL_ShowOpenFolderDialog\n **See Also:** SDL_ShowFileDialogWithProperties\n"]
7537 pub fn SDL_ShowOpenFileDialog(
7538 callback: SDL_DialogFileCallback,
7539 userdata: *mut core::ffi::c_void,
7540 window: *mut SDL_Window,
7541 filters: *const SDL_DialogFileFilter,
7542 nfilters: core::ffi::c_int,
7543 default_location: *const core::ffi::c_char,
7544 allow_many: bool,
7545 );
7546}
7547unsafe extern "C" {
7548 #[doc = " Displays a dialog that lets the user choose a new or existing file on their\n filesystem.\n\n This is an asynchronous function; it will return immediately, and the\n result will be passed to the callback.\n\n The callback will be invoked with a null-terminated list of files the user\n chose. The list will be empty if the user canceled the dialog, and it will\n be NULL if an error occurred.\n\n Note that the callback may be called from a different thread than the one\n the function was invoked on.\n\n The chosen file may or may not already exist.\n\n On Linux, dialogs may require XDG Portals, which requires DBus, which\n requires an event-handling loop. Apps that do not use SDL to handle events\n should add a call to SDL_PumpEvents in their main loop.\n\n **Parameter:** callback a function pointer to be invoked when the user selects a\n file and accepts, or cancels the dialog, or an error\n occurs.\n **Parameter:** userdata an optional pointer to pass extra data to the callback when\n it will be invoked.\n **Parameter:** window the window that the dialog should be modal for, may be NULL.\n Not all platforms support this option.\n **Parameter:** filters a list of filters, may be NULL. Not all platforms support\n this option, and platforms that do support it may allow the\n user to ignore the filters. If non-NULL, it must remain\n valid at least until the callback is invoked.\n **Parameter:** nfilters the number of filters. Ignored if filters is NULL.\n **Parameter:** default_location the default folder or file to start the dialog at,\n may be NULL. Not all platforms support this option.\n\n **Thread Safety:** This function should be called only from the main thread. The\n callback may be invoked from the same thread or from a\n different one, depending on the OS's constraints.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DialogFileCallback\n **See Also:** SDL_DialogFileFilter\n **See Also:** SDL_ShowOpenFileDialog\n **See Also:** SDL_ShowOpenFolderDialog\n **See Also:** SDL_ShowFileDialogWithProperties\n"]
7549 pub fn SDL_ShowSaveFileDialog(
7550 callback: SDL_DialogFileCallback,
7551 userdata: *mut core::ffi::c_void,
7552 window: *mut SDL_Window,
7553 filters: *const SDL_DialogFileFilter,
7554 nfilters: core::ffi::c_int,
7555 default_location: *const core::ffi::c_char,
7556 );
7557}
7558unsafe extern "C" {
7559 #[doc = " Displays a dialog that lets the user select a folder on their filesystem.\n\n This is an asynchronous function; it will return immediately, and the\n result will be passed to the callback.\n\n The callback will be invoked with a null-terminated list of files the user\n chose. The list will be empty if the user canceled the dialog, and it will\n be NULL if an error occurred.\n\n Note that the callback may be called from a different thread than the one\n the function was invoked on.\n\n Depending on the platform, the user may be allowed to input paths that\n don't yet exist.\n\n On Linux, dialogs may require XDG Portals, which requires DBus, which\n requires an event-handling loop. Apps that do not use SDL to handle events\n should add a call to SDL_PumpEvents in their main loop.\n\n **Parameter:** callback a function pointer to be invoked when the user selects a\n file and accepts, or cancels the dialog, or an error\n occurs.\n **Parameter:** userdata an optional pointer to pass extra data to the callback when\n it will be invoked.\n **Parameter:** window the window that the dialog should be modal for, may be NULL.\n Not all platforms support this option.\n **Parameter:** default_location the default folder or file to start the dialog at,\n may be NULL. Not all platforms support this option.\n **Parameter:** allow_many if non-zero, the user will be allowed to select multiple\n entries. Not all platforms support this option.\n\n **Thread Safety:** This function should be called only from the main thread. The\n callback may be invoked from the same thread or from a\n different one, depending on the OS's constraints.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DialogFileCallback\n **See Also:** SDL_ShowOpenFileDialog\n **See Also:** SDL_ShowSaveFileDialog\n **See Also:** SDL_ShowFileDialogWithProperties\n"]
7560 pub fn SDL_ShowOpenFolderDialog(
7561 callback: SDL_DialogFileCallback,
7562 userdata: *mut core::ffi::c_void,
7563 window: *mut SDL_Window,
7564 default_location: *const core::ffi::c_char,
7565 allow_many: bool,
7566 );
7567}
7568impl SDL_FileDialogType {
7569 pub const SDL_FILEDIALOG_OPENFILE: SDL_FileDialogType = SDL_FileDialogType(0);
7570 pub const SDL_FILEDIALOG_SAVEFILE: SDL_FileDialogType = SDL_FileDialogType(1);
7571 pub const SDL_FILEDIALOG_OPENFOLDER: SDL_FileDialogType = SDL_FileDialogType(2);
7572}
7573#[repr(transparent)]
7574#[doc = " Various types of file dialogs.\n\n This is used by SDL_ShowFileDialogWithProperties() to decide what kind of\n dialog to present to the user.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_ShowFileDialogWithProperties\n"]
7575#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7576pub struct SDL_FileDialogType(pub core::ffi::c_uint);
7577unsafe extern "C" {
7578 #[doc = " Create and launch a file dialog with the specified properties.\n\n These are the supported properties:\n\n - `SDL_PROP_FILE_DIALOG_FILTERS_POINTER`: a pointer to a list of\n SDL_DialogFileFilter structs, which will be used as filters for\n file-based selections. Ignored if the dialog is an \"Open Folder\" dialog.\n If non-NULL, the array of filters must remain valid at least until the\n callback is invoked.\n - `SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER`: the number of filters in the\n array of filters, if it exists.\n - `SDL_PROP_FILE_DIALOG_WINDOW_POINTER`: the window that the dialog should\n be modal for.\n - `SDL_PROP_FILE_DIALOG_LOCATION_STRING`: the default folder or file to\n start the dialog at.\n - `SDL_PROP_FILE_DIALOG_MANY_BOOLEAN`: true to allow the user to select\n more than one entry.\n - `SDL_PROP_FILE_DIALOG_TITLE_STRING`: the title for the dialog.\n - `SDL_PROP_FILE_DIALOG_ACCEPT_STRING`: the label that the accept button\n should have.\n - `SDL_PROP_FILE_DIALOG_CANCEL_STRING`: the label that the cancel button\n should have.\n\n Note that each platform may or may not support any of the properties.\n\n **Parameter:** type the type of file dialog.\n **Parameter:** callback a function pointer to be invoked when the user selects a\n file and accepts, or cancels the dialog, or an error\n occurs.\n **Parameter:** userdata an optional pointer to pass extra data to the callback when\n it will be invoked.\n **Parameter:** props the properties to use.\n\n **Thread Safety:** This function should be called only from the main thread. The\n callback may be invoked from the same thread or from a\n different one, depending on the OS's constraints.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_FileDialogType\n **See Also:** SDL_DialogFileCallback\n **See Also:** SDL_DialogFileFilter\n **See Also:** SDL_ShowOpenFileDialog\n **See Also:** SDL_ShowSaveFileDialog\n **See Also:** SDL_ShowOpenFolderDialog\n"]
7579 pub fn SDL_ShowFileDialogWithProperties(
7580 type_: SDL_FileDialogType,
7581 callback: SDL_DialogFileCallback,
7582 userdata: *mut core::ffi::c_void,
7583 props: SDL_PropertiesID,
7584 );
7585}
7586#[doc = " An SDL_GUID is a 128-bit identifier for an input device that identifies\n that device across runs of SDL programs on the same platform.\n\n If the device is detached and then re-attached to a different port, or if\n the base system is rebooted, the device should still report the same GUID.\n\n GUIDs are as precise as possible but are not guaranteed to distinguish\n physically distinct but equivalent devices. For example, two game\n controllers from the same vendor with the same product ID and revision may\n have the same GUID.\n\n GUIDs may be platform-dependent (i.e., the same device may report different\n GUIDs on different operating systems).\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
7587#[repr(C)]
7588#[derive(Debug, Default, Copy, Clone, Hash)]
7589pub struct SDL_GUID {
7590 pub data: [Uint8; 16usize],
7591}
7592#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7593const _: () = {
7594 ["Size of SDL_GUID"][::core::mem::size_of::<SDL_GUID>() - 16usize];
7595 ["Alignment of SDL_GUID"][::core::mem::align_of::<SDL_GUID>() - 1usize];
7596 ["Offset of field: SDL_GUID::data"][::core::mem::offset_of!(SDL_GUID, data) - 0usize];
7597};
7598unsafe extern "C" {
7599 #[doc = " Get an ASCII string representation for a given SDL_GUID.\n\n **Parameter:** guid the SDL_GUID you wish to convert to string.\n **Parameter:** pszGUID buffer in which to write the ASCII string.\n **Parameter:** cbGUID the size of pszGUID, should be at least 33 bytes.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StringToGUID\n"]
7600 pub fn SDL_GUIDToString(
7601 guid: SDL_GUID,
7602 pszGUID: *mut core::ffi::c_char,
7603 cbGUID: core::ffi::c_int,
7604 );
7605}
7606unsafe extern "C" {
7607 #[doc = " Convert a GUID string into a SDL_GUID structure.\n\n Performs no error checking. If this function is given a string containing\n an invalid GUID, the function will silently succeed, but the GUID generated\n will not be useful.\n\n **Parameter:** pchGUID string containing an ASCII representation of a GUID.\n **Returns:** a SDL_GUID structure.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GUIDToString\n"]
7608 pub fn SDL_StringToGUID(pchGUID: *const core::ffi::c_char) -> SDL_GUID;
7609}
7610impl SDL_PowerState {
7611 #[doc = "< error determining power status\n"]
7612 pub const SDL_POWERSTATE_ERROR: SDL_PowerState = SDL_PowerState(-1);
7613 #[doc = "< cannot determine power status\n"]
7614 pub const SDL_POWERSTATE_UNKNOWN: SDL_PowerState = SDL_PowerState(0);
7615 #[doc = "< Not plugged in, running on the battery\n"]
7616 pub const SDL_POWERSTATE_ON_BATTERY: SDL_PowerState = SDL_PowerState(1);
7617 #[doc = "< Plugged in, no battery available\n"]
7618 pub const SDL_POWERSTATE_NO_BATTERY: SDL_PowerState = SDL_PowerState(2);
7619 #[doc = "< Plugged in, charging battery\n"]
7620 pub const SDL_POWERSTATE_CHARGING: SDL_PowerState = SDL_PowerState(3);
7621 #[doc = "< Plugged in, battery charged\n"]
7622 pub const SDL_POWERSTATE_CHARGED: SDL_PowerState = SDL_PowerState(4);
7623}
7624#[repr(transparent)]
7625#[doc = " The basic state for the system's power supply.\n\n These are results returned by SDL_GetPowerInfo().\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
7626#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7627pub struct SDL_PowerState(pub core::ffi::c_int);
7628unsafe extern "C" {
7629 #[doc = " Get the current power supply details.\n\n You should never take a battery status as absolute truth. Batteries\n (especially failing batteries) are delicate hardware, and the values\n reported here are best estimates based on what that hardware reports. It's\n not uncommon for older batteries to lose stored power much faster than it\n reports, or completely drain when reporting it has 20 percent left, etc.\n\n Battery status can change at any time; if you are concerned with power\n state, you should call this function frequently, and perhaps ignore changes\n until they seem to be stable for a few seconds.\n\n It's possible a platform can only report battery percentage or time left\n but not both.\n\n On some platforms, retrieving power supply details might be expensive. If\n you want to display continuous status you could call this function every\n minute or so.\n\n **Parameter:** seconds a pointer filled in with the seconds of battery life left,\n or NULL to ignore. This will be filled in with -1 if we\n can't determine a value or there is no battery.\n **Parameter:** percent a pointer filled in with the percentage of battery life\n left, between 0 and 100, or NULL to ignore. This will be\n filled in with -1 when we can't determine a value or there\n is no battery.\n **Returns:** the current battery state or `SDL_POWERSTATE_ERROR` on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7630 pub fn SDL_GetPowerInfo(
7631 seconds: *mut core::ffi::c_int,
7632 percent: *mut core::ffi::c_int,
7633 ) -> SDL_PowerState;
7634}
7635#[repr(C)]
7636#[derive(Debug, Copy, Clone)]
7637pub struct SDL_Sensor {
7638 _unused: [u8; 0],
7639}
7640#[doc = " This is a unique ID for a sensor for the time it is connected to the\n system, and is never reused for the lifetime of the application.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
7641pub type SDL_SensorID = Uint32;
7642impl SDL_SensorType {
7643 #[doc = "< Returned for an invalid sensor\n"]
7644 pub const SDL_SENSOR_INVALID: SDL_SensorType = SDL_SensorType(-1);
7645 #[doc = "< Unknown sensor type\n"]
7646 pub const SDL_SENSOR_UNKNOWN: SDL_SensorType = SDL_SensorType(0);
7647 #[doc = "< Accelerometer\n"]
7648 pub const SDL_SENSOR_ACCEL: SDL_SensorType = SDL_SensorType(1);
7649 #[doc = "< Gyroscope\n"]
7650 pub const SDL_SENSOR_GYRO: SDL_SensorType = SDL_SensorType(2);
7651 #[doc = "< Accelerometer for left Joy-Con controller and Wii nunchuk\n"]
7652 pub const SDL_SENSOR_ACCEL_L: SDL_SensorType = SDL_SensorType(3);
7653 #[doc = "< Gyroscope for left Joy-Con controller\n"]
7654 pub const SDL_SENSOR_GYRO_L: SDL_SensorType = SDL_SensorType(4);
7655 #[doc = "< Accelerometer for right Joy-Con controller\n"]
7656 pub const SDL_SENSOR_ACCEL_R: SDL_SensorType = SDL_SensorType(5);
7657 #[doc = "< Gyroscope for right Joy-Con controller\n"]
7658 pub const SDL_SENSOR_GYRO_R: SDL_SensorType = SDL_SensorType(6);
7659 pub const SDL_SENSOR_COUNT: SDL_SensorType = SDL_SensorType(7);
7660}
7661#[repr(transparent)]
7662#[doc = " The different sensors defined by SDL.\n\n Additional sensors may be available, using platform dependent semantics.\n\n Here are the additional Android sensors:\n\n https://developer.android.com/reference/android/hardware/SensorEvent.html#values\n\n Accelerometer sensor notes:\n\n The accelerometer returns the current acceleration in SI meters per second\n squared. This measurement includes the force of gravity, so a device at\n rest will have an value of SDL_STANDARD_GRAVITY away from the center of the\n earth, which is a positive Y value.\n\n - `values[0]`: Acceleration on the x axis\n - `values[1]`: Acceleration on the y axis\n - `values[2]`: Acceleration on the z axis\n\n For phones and tablets held in natural orientation and game controllers\n held in front of you, the axes are defined as follows:\n\n - -X ... +X : left ... right\n - -Y ... +Y : bottom ... top\n - -Z ... +Z : farther ... closer\n\n The accelerometer axis data is not changed when the device is rotated.\n\n Gyroscope sensor notes:\n\n The gyroscope returns the current rate of rotation in radians per second.\n The rotation is positive in the counter-clockwise direction. That is, an\n observer looking from a positive location on one of the axes would see\n positive rotation on that axis when it appeared to be rotating\n counter-clockwise.\n\n - `values[0]`: Angular speed around the x axis (pitch)\n - `values[1]`: Angular speed around the y axis (yaw)\n - `values[2]`: Angular speed around the z axis (roll)\n\n For phones and tablets held in natural orientation and game controllers\n held in front of you, the axes are defined as follows:\n\n - -X ... +X : left ... right\n - -Y ... +Y : bottom ... top\n - -Z ... +Z : farther ... closer\n\n The gyroscope axis data is not changed when the device is rotated.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCurrentDisplayOrientation\n"]
7663#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7664pub struct SDL_SensorType(pub core::ffi::c_int);
7665unsafe extern "C" {
7666 #[doc = " Get a list of currently connected sensors.\n\n **Parameter:** count a pointer filled in with the number of sensors returned, may\n be NULL.\n **Returns:** a 0 terminated array of sensor instance IDs or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7667 pub fn SDL_GetSensors(count: *mut core::ffi::c_int) -> *mut SDL_SensorID;
7668}
7669unsafe extern "C" {
7670 #[doc = " Get the implementation dependent name of a sensor.\n\n This can be called before any sensors are opened.\n\n **Parameter:** instance_id the sensor instance ID.\n **Returns:** the sensor name, or NULL if `instance_id` is not valid.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7671 pub fn SDL_GetSensorNameForID(instance_id: SDL_SensorID) -> *const core::ffi::c_char;
7672}
7673unsafe extern "C" {
7674 #[doc = " Get the type of a sensor.\n\n This can be called before any sensors are opened.\n\n **Parameter:** instance_id the sensor instance ID.\n **Returns:** the SDL_SensorType, or `SDL_SENSOR_INVALID` if `instance_id` is\n not valid.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7675 pub fn SDL_GetSensorTypeForID(instance_id: SDL_SensorID) -> SDL_SensorType;
7676}
7677unsafe extern "C" {
7678 #[doc = " Get the platform dependent type of a sensor.\n\n This can be called before any sensors are opened.\n\n **Parameter:** instance_id the sensor instance ID.\n **Returns:** the sensor platform dependent type, or -1 if `instance_id` is not\n valid.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7679 pub fn SDL_GetSensorNonPortableTypeForID(instance_id: SDL_SensorID) -> core::ffi::c_int;
7680}
7681unsafe extern "C" {
7682 #[doc = " Open a sensor for use.\n\n **Parameter:** instance_id the sensor instance ID.\n **Returns:** an SDL_Sensor object or NULL on failure; call SDL_GetError() for\n more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7683 pub fn SDL_OpenSensor(instance_id: SDL_SensorID) -> *mut SDL_Sensor;
7684}
7685unsafe extern "C" {
7686 #[doc = " Return the SDL_Sensor associated with an instance ID.\n\n **Parameter:** instance_id the sensor instance ID.\n **Returns:** an SDL_Sensor object or NULL on failure; call SDL_GetError() for\n more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7687 pub fn SDL_GetSensorFromID(instance_id: SDL_SensorID) -> *mut SDL_Sensor;
7688}
7689unsafe extern "C" {
7690 #[doc = " Get the properties associated with a sensor.\n\n **Parameter:** sensor the SDL_Sensor object.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7691 pub fn SDL_GetSensorProperties(sensor: *mut SDL_Sensor) -> SDL_PropertiesID;
7692}
7693unsafe extern "C" {
7694 #[doc = " Get the implementation dependent name of a sensor.\n\n **Parameter:** sensor the SDL_Sensor object.\n **Returns:** the sensor name or NULL on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7695 pub fn SDL_GetSensorName(sensor: *mut SDL_Sensor) -> *const core::ffi::c_char;
7696}
7697unsafe extern "C" {
7698 #[doc = " Get the type of a sensor.\n\n **Parameter:** sensor the SDL_Sensor object to inspect.\n **Returns:** the SDL_SensorType type, or `SDL_SENSOR_INVALID` if `sensor` is\n NULL.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7699 pub fn SDL_GetSensorType(sensor: *mut SDL_Sensor) -> SDL_SensorType;
7700}
7701unsafe extern "C" {
7702 #[doc = " Get the platform dependent type of a sensor.\n\n **Parameter:** sensor the SDL_Sensor object to inspect.\n **Returns:** the sensor platform dependent type, or -1 if `sensor` is NULL.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7703 pub fn SDL_GetSensorNonPortableType(sensor: *mut SDL_Sensor) -> core::ffi::c_int;
7704}
7705unsafe extern "C" {
7706 #[doc = " Get the instance ID of a sensor.\n\n **Parameter:** sensor the SDL_Sensor object to inspect.\n **Returns:** the sensor instance ID, or 0 on failure; call SDL_GetError() for\n more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7707 pub fn SDL_GetSensorID(sensor: *mut SDL_Sensor) -> SDL_SensorID;
7708}
7709unsafe extern "C" {
7710 #[doc = " Get the current state of an opened sensor.\n\n The number of values and interpretation of the data is sensor dependent.\n\n **Parameter:** sensor the SDL_Sensor object to query.\n **Parameter:** data a pointer filled with the current sensor state.\n **Parameter:** num_values the number of values to write to data.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7711 pub fn SDL_GetSensorData(
7712 sensor: *mut SDL_Sensor,
7713 data: *mut f32,
7714 num_values: core::ffi::c_int,
7715 ) -> bool;
7716}
7717unsafe extern "C" {
7718 #[doc = " Close a sensor previously opened with SDL_OpenSensor().\n\n **Parameter:** sensor the SDL_Sensor object to close.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7719 pub fn SDL_CloseSensor(sensor: *mut SDL_Sensor);
7720}
7721unsafe extern "C" {
7722 #[doc = " Update the current state of the open sensors.\n\n This is called automatically by the event loop if sensor events are\n enabled.\n\n This needs to be called from the thread that initialized the sensor\n subsystem.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7723 pub fn SDL_UpdateSensors();
7724}
7725#[repr(C)]
7726#[derive(Debug, Copy, Clone)]
7727pub struct SDL_Joystick {
7728 _unused: [u8; 0],
7729}
7730#[doc = " This is a unique ID for a joystick for the time it is connected to the\n system, and is never reused for the lifetime of the application.\n\n If the joystick is disconnected and reconnected, it will get a new ID.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
7731pub type SDL_JoystickID = Uint32;
7732impl SDL_JoystickType {
7733 pub const SDL_JOYSTICK_TYPE_UNKNOWN: SDL_JoystickType = SDL_JoystickType(0);
7734 pub const SDL_JOYSTICK_TYPE_GAMEPAD: SDL_JoystickType = SDL_JoystickType(1);
7735 pub const SDL_JOYSTICK_TYPE_WHEEL: SDL_JoystickType = SDL_JoystickType(2);
7736 pub const SDL_JOYSTICK_TYPE_ARCADE_STICK: SDL_JoystickType = SDL_JoystickType(3);
7737 pub const SDL_JOYSTICK_TYPE_FLIGHT_STICK: SDL_JoystickType = SDL_JoystickType(4);
7738 pub const SDL_JOYSTICK_TYPE_DANCE_PAD: SDL_JoystickType = SDL_JoystickType(5);
7739 pub const SDL_JOYSTICK_TYPE_GUITAR: SDL_JoystickType = SDL_JoystickType(6);
7740 pub const SDL_JOYSTICK_TYPE_DRUM_KIT: SDL_JoystickType = SDL_JoystickType(7);
7741 pub const SDL_JOYSTICK_TYPE_ARCADE_PAD: SDL_JoystickType = SDL_JoystickType(8);
7742 pub const SDL_JOYSTICK_TYPE_THROTTLE: SDL_JoystickType = SDL_JoystickType(9);
7743 pub const SDL_JOYSTICK_TYPE_COUNT: SDL_JoystickType = SDL_JoystickType(10);
7744}
7745#[repr(transparent)]
7746#[doc = " An enum of some common joystick types.\n\n In some cases, SDL can identify a low-level joystick as being a certain\n type of device, and will report it through SDL_GetJoystickType (or\n SDL_GetJoystickTypeForID).\n\n This is by no means a complete list of everything that can be plugged into\n a computer.\n\n You may refer to\n [XInput Controller Types](https://learn.microsoft.com/en-us/windows/win32/xinput/xinput-and-controller-subtypes)\n table for a general understanding of each joystick type.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
7747#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7748pub struct SDL_JoystickType(pub core::ffi::c_uint);
7749impl SDL_JoystickConnectionState {
7750 pub const SDL_JOYSTICK_CONNECTION_INVALID: SDL_JoystickConnectionState =
7751 SDL_JoystickConnectionState(-1);
7752 pub const SDL_JOYSTICK_CONNECTION_UNKNOWN: SDL_JoystickConnectionState =
7753 SDL_JoystickConnectionState(0);
7754 pub const SDL_JOYSTICK_CONNECTION_WIRED: SDL_JoystickConnectionState =
7755 SDL_JoystickConnectionState(1);
7756 pub const SDL_JOYSTICK_CONNECTION_WIRELESS: SDL_JoystickConnectionState =
7757 SDL_JoystickConnectionState(2);
7758}
7759#[repr(transparent)]
7760#[doc = " Possible connection states for a joystick device.\n\n This is used by SDL_GetJoystickConnectionState to report how a device is\n connected to the system.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
7761#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7762pub struct SDL_JoystickConnectionState(pub core::ffi::c_int);
7763unsafe extern "C" {
7764 #[doc = " Locking for atomic access to the joystick API.\n\n The SDL joystick functions are thread-safe, however you can lock the\n joysticks while processing to guarantee that the joystick list won't change\n and joystick and gamepad events will not be delivered.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7765 pub fn SDL_LockJoysticks();
7766}
7767unsafe extern "C" {
7768 #[doc = " Locking for atomic access to the joystick API.\n\n The SDL joystick functions are thread-safe, however you can lock the\n joysticks while processing to guarantee that the joystick list won't change\n and joystick and gamepad events will not be delivered.\n\n **Returns:** true if the joysticks were successfully locked, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.6.0.\n"]
7769 pub fn SDL_TryLockJoysticks() -> bool;
7770}
7771unsafe extern "C" {
7772 #[doc = " Unlocking for atomic access to the joystick API.\n\n **Thread Safety:** This should be called from the same thread that called\n SDL_LockJoysticks().\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7773 pub fn SDL_UnlockJoysticks();
7774}
7775unsafe extern "C" {
7776 #[doc = " Return whether a joystick is currently connected.\n\n **Returns:** true if a joystick is connected, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoysticks\n"]
7777 pub fn SDL_HasJoystick() -> bool;
7778}
7779unsafe extern "C" {
7780 #[doc = " Get a list of currently connected joysticks.\n\n **Parameter:** count a pointer filled in with the number of joysticks returned, may\n be NULL.\n **Returns:** a 0 terminated array of joystick instance IDs or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasJoystick\n **See Also:** SDL_OpenJoystick\n"]
7781 pub fn SDL_GetJoysticks(count: *mut core::ffi::c_int) -> *mut SDL_JoystickID;
7782}
7783unsafe extern "C" {
7784 #[doc = " Get the implementation dependent name of a joystick.\n\n This can be called before any joysticks are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the name of the selected joystick. If no name can be found, this\n function returns NULL; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickName\n **See Also:** SDL_GetJoysticks\n"]
7785 pub fn SDL_GetJoystickNameForID(instance_id: SDL_JoystickID) -> *const core::ffi::c_char;
7786}
7787unsafe extern "C" {
7788 #[doc = " Get the implementation dependent path of a joystick.\n\n This can be called before any joysticks are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the path of the selected joystick. If no path can be found, this\n function returns NULL; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickPath\n **See Also:** SDL_GetJoysticks\n"]
7789 pub fn SDL_GetJoystickPathForID(instance_id: SDL_JoystickID) -> *const core::ffi::c_char;
7790}
7791unsafe extern "C" {
7792 #[doc = " Get the player index of a joystick.\n\n This can be called before any joysticks are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the player index of a joystick, or -1 if it's not available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickPlayerIndex\n **See Also:** SDL_GetJoysticks\n"]
7793 pub fn SDL_GetJoystickPlayerIndexForID(instance_id: SDL_JoystickID) -> core::ffi::c_int;
7794}
7795unsafe extern "C" {
7796 #[doc = " Get the implementation-dependent GUID of a joystick.\n\n This can be called before any joysticks are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the GUID of the selected joystick. If called with an invalid\n instance_id, this function returns a zero GUID.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickGUID\n **See Also:** SDL_GUIDToString\n"]
7797 pub fn SDL_GetJoystickGUIDForID(instance_id: SDL_JoystickID) -> SDL_GUID;
7798}
7799unsafe extern "C" {
7800 #[doc = " Get the USB vendor ID of a joystick, if available.\n\n This can be called before any joysticks are opened. If the vendor ID isn't\n available this function returns 0.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the USB vendor ID of the selected joystick. If called with an\n invalid instance_id, this function returns 0.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickVendor\n **See Also:** SDL_GetJoysticks\n"]
7801 pub fn SDL_GetJoystickVendorForID(instance_id: SDL_JoystickID) -> Uint16;
7802}
7803unsafe extern "C" {
7804 #[doc = " Get the USB product ID of a joystick, if available.\n\n This can be called before any joysticks are opened. If the product ID isn't\n available this function returns 0.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the USB product ID of the selected joystick. If called with an\n invalid instance_id, this function returns 0.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickProduct\n **See Also:** SDL_GetJoysticks\n"]
7805 pub fn SDL_GetJoystickProductForID(instance_id: SDL_JoystickID) -> Uint16;
7806}
7807unsafe extern "C" {
7808 #[doc = " Get the product version of a joystick, if available.\n\n This can be called before any joysticks are opened. If the product version\n isn't available this function returns 0.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the product version of the selected joystick. If called with an\n invalid instance_id, this function returns 0.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickProductVersion\n **See Also:** SDL_GetJoysticks\n"]
7809 pub fn SDL_GetJoystickProductVersionForID(instance_id: SDL_JoystickID) -> Uint16;
7810}
7811unsafe extern "C" {
7812 #[doc = " Get the type of a joystick, if available.\n\n This can be called before any joysticks are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the SDL_JoystickType of the selected joystick. If called with an\n invalid instance_id, this function returns\n `SDL_JOYSTICK_TYPE_UNKNOWN`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickType\n **See Also:** SDL_GetJoysticks\n"]
7813 pub fn SDL_GetJoystickTypeForID(instance_id: SDL_JoystickID) -> SDL_JoystickType;
7814}
7815unsafe extern "C" {
7816 #[doc = " Open a joystick for use.\n\n The joystick subsystem must be initialized before a joystick can be opened\n for use.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** a joystick identifier or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseJoystick\n"]
7817 pub fn SDL_OpenJoystick(instance_id: SDL_JoystickID) -> *mut SDL_Joystick;
7818}
7819unsafe extern "C" {
7820 #[doc = " Get the SDL_Joystick associated with an instance ID, if it has been opened.\n\n **Parameter:** instance_id the instance ID to get the SDL_Joystick for.\n **Returns:** an SDL_Joystick on success or NULL on failure or if it hasn't been\n opened yet; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
7821 pub fn SDL_GetJoystickFromID(instance_id: SDL_JoystickID) -> *mut SDL_Joystick;
7822}
7823unsafe extern "C" {
7824 #[doc = " Get the SDL_Joystick associated with a player index.\n\n **Parameter:** player_index the player index to get the SDL_Joystick for.\n **Returns:** an SDL_Joystick on success or NULL on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickPlayerIndex\n **See Also:** SDL_SetJoystickPlayerIndex\n"]
7825 pub fn SDL_GetJoystickFromPlayerIndex(player_index: core::ffi::c_int) -> *mut SDL_Joystick;
7826}
7827#[doc = " The structure that describes a virtual joystick touchpad.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_VirtualJoystickDesc\n"]
7828#[repr(C)]
7829#[derive(Debug, Default, Copy, Clone, Hash)]
7830pub struct SDL_VirtualJoystickTouchpadDesc {
7831 #[doc = "< the number of simultaneous fingers on this touchpad\n"]
7832 pub nfingers: Uint16,
7833 pub padding: [Uint16; 3usize],
7834}
7835#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7836const _: () = {
7837 ["Size of SDL_VirtualJoystickTouchpadDesc"]
7838 [::core::mem::size_of::<SDL_VirtualJoystickTouchpadDesc>() - 8usize];
7839 ["Alignment of SDL_VirtualJoystickTouchpadDesc"]
7840 [::core::mem::align_of::<SDL_VirtualJoystickTouchpadDesc>() - 2usize];
7841 ["Offset of field: SDL_VirtualJoystickTouchpadDesc::nfingers"]
7842 [::core::mem::offset_of!(SDL_VirtualJoystickTouchpadDesc, nfingers) - 0usize];
7843 ["Offset of field: SDL_VirtualJoystickTouchpadDesc::padding"]
7844 [::core::mem::offset_of!(SDL_VirtualJoystickTouchpadDesc, padding) - 2usize];
7845};
7846#[doc = " The structure that describes a virtual joystick sensor.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_VirtualJoystickDesc\n"]
7847#[repr(C)]
7848#[derive(Debug, Copy, Clone)]
7849pub struct SDL_VirtualJoystickSensorDesc {
7850 #[doc = "< the type of this sensor\n"]
7851 pub type_: SDL_SensorType,
7852 #[doc = "< the update frequency of this sensor, may be 0.0f\n"]
7853 pub rate: f32,
7854}
7855#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7856const _: () = {
7857 ["Size of SDL_VirtualJoystickSensorDesc"]
7858 [::core::mem::size_of::<SDL_VirtualJoystickSensorDesc>() - 8usize];
7859 ["Alignment of SDL_VirtualJoystickSensorDesc"]
7860 [::core::mem::align_of::<SDL_VirtualJoystickSensorDesc>() - 4usize];
7861 ["Offset of field: SDL_VirtualJoystickSensorDesc::type_"]
7862 [::core::mem::offset_of!(SDL_VirtualJoystickSensorDesc, type_) - 0usize];
7863 ["Offset of field: SDL_VirtualJoystickSensorDesc::rate"]
7864 [::core::mem::offset_of!(SDL_VirtualJoystickSensorDesc, rate) - 4usize];
7865};
7866impl Default for SDL_VirtualJoystickSensorDesc {
7867 fn default() -> Self {
7868 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
7869 unsafe {
7870 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
7871 s.assume_init()
7872 }
7873 }
7874}
7875#[doc = " The structure that describes a virtual joystick.\n\n This structure should be initialized using SDL_INIT_INTERFACE(). All\n elements of this structure are optional.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_AttachVirtualJoystick\n **See Also:** SDL_INIT_INTERFACE\n **See Also:** SDL_VirtualJoystickSensorDesc\n **See Also:** SDL_VirtualJoystickTouchpadDesc\n"]
7876#[repr(C)]
7877#[derive(Debug, Copy, Clone, Hash)]
7878pub struct SDL_VirtualJoystickDesc {
7879 #[doc = "< the version of this interface\n"]
7880 pub version: Uint32,
7881 #[doc = "< `SDL_JoystickType`\n"]
7882 pub type_: Uint16,
7883 #[doc = "< unused\n"]
7884 pub padding: Uint16,
7885 #[doc = "< the USB vendor ID of this joystick\n"]
7886 pub vendor_id: Uint16,
7887 #[doc = "< the USB product ID of this joystick\n"]
7888 pub product_id: Uint16,
7889 #[doc = "< the number of axes on this joystick\n"]
7890 pub naxes: Uint16,
7891 #[doc = "< the number of buttons on this joystick\n"]
7892 pub nbuttons: Uint16,
7893 #[doc = "< the number of balls on this joystick\n"]
7894 pub nballs: Uint16,
7895 #[doc = "< the number of hats on this joystick\n"]
7896 pub nhats: Uint16,
7897 #[doc = "< the number of touchpads on this joystick, requires `touchpads` to point at valid descriptions\n"]
7898 pub ntouchpads: Uint16,
7899 #[doc = "< the number of sensors on this joystick, requires `sensors` to point at valid descriptions\n"]
7900 pub nsensors: Uint16,
7901 #[doc = "< unused\n"]
7902 pub padding2: [Uint16; 2usize],
7903 #[doc = "< A mask of which buttons are valid for this controller\ne.g. (1 << SDL_GAMEPAD_BUTTON_SOUTH)\n"]
7904 pub button_mask: Uint32,
7905 #[doc = "< A mask of which axes are valid for this controller\ne.g. (1 << SDL_GAMEPAD_AXIS_LEFTX)\n"]
7906 pub axis_mask: Uint32,
7907 #[doc = "< the name of the joystick\n"]
7908 pub name: *const core::ffi::c_char,
7909 #[doc = "< A pointer to an array of touchpad descriptions, required if `ntouchpads` is > 0\n"]
7910 pub touchpads: *const SDL_VirtualJoystickTouchpadDesc,
7911 #[doc = "< A pointer to an array of sensor descriptions, required if `nsensors` is > 0\n"]
7912 pub sensors: *const SDL_VirtualJoystickSensorDesc,
7913 #[doc = "< User data pointer passed to callbacks\n"]
7914 pub userdata: *mut core::ffi::c_void,
7915 #[doc = "< Called when the joystick state should be updated\n"]
7916 pub Update: ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void)>,
7917 #[doc = "< Called when the player index is set\n"]
7918 pub SetPlayerIndex: ::core::option::Option<
7919 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, player_index: core::ffi::c_int),
7920 >,
7921 #[doc = "< Implements SDL_RumbleJoystick()\n"]
7922 pub Rumble: ::core::option::Option<
7923 unsafe extern "C" fn(
7924 userdata: *mut core::ffi::c_void,
7925 low_frequency_rumble: Uint16,
7926 high_frequency_rumble: Uint16,
7927 ) -> bool,
7928 >,
7929 #[doc = "< Implements SDL_RumbleJoystickTriggers()\n"]
7930 pub RumbleTriggers: ::core::option::Option<
7931 unsafe extern "C" fn(
7932 userdata: *mut core::ffi::c_void,
7933 left_rumble: Uint16,
7934 right_rumble: Uint16,
7935 ) -> bool,
7936 >,
7937 #[doc = "< Implements SDL_SetJoystickLED()\n"]
7938 pub SetLED: ::core::option::Option<
7939 unsafe extern "C" fn(
7940 userdata: *mut core::ffi::c_void,
7941 red: Uint8,
7942 green: Uint8,
7943 blue: Uint8,
7944 ) -> bool,
7945 >,
7946 #[doc = "< Implements SDL_SendJoystickEffect()\n"]
7947 pub SendEffect: ::core::option::Option<
7948 unsafe extern "C" fn(
7949 userdata: *mut core::ffi::c_void,
7950 data: *const core::ffi::c_void,
7951 size: core::ffi::c_int,
7952 ) -> bool,
7953 >,
7954 #[doc = "< Implements SDL_SetGamepadSensorEnabled()\n"]
7955 pub SetSensorsEnabled: ::core::option::Option<
7956 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, enabled: bool) -> bool,
7957 >,
7958 #[doc = "< Cleans up the userdata when the joystick is detached\n"]
7959 pub Cleanup: ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void)>,
7960}
7961#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7962const _: () = {
7963 ["Size of SDL_VirtualJoystickDesc"]
7964 [::core::mem::size_of::<SDL_VirtualJoystickDesc>() - 136usize];
7965 ["Alignment of SDL_VirtualJoystickDesc"]
7966 [::core::mem::align_of::<SDL_VirtualJoystickDesc>() - 8usize];
7967 ["Offset of field: SDL_VirtualJoystickDesc::version"]
7968 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, version) - 0usize];
7969 ["Offset of field: SDL_VirtualJoystickDesc::type_"]
7970 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, type_) - 4usize];
7971 ["Offset of field: SDL_VirtualJoystickDesc::padding"]
7972 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, padding) - 6usize];
7973 ["Offset of field: SDL_VirtualJoystickDesc::vendor_id"]
7974 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, vendor_id) - 8usize];
7975 ["Offset of field: SDL_VirtualJoystickDesc::product_id"]
7976 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, product_id) - 10usize];
7977 ["Offset of field: SDL_VirtualJoystickDesc::naxes"]
7978 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, naxes) - 12usize];
7979 ["Offset of field: SDL_VirtualJoystickDesc::nbuttons"]
7980 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, nbuttons) - 14usize];
7981 ["Offset of field: SDL_VirtualJoystickDesc::nballs"]
7982 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, nballs) - 16usize];
7983 ["Offset of field: SDL_VirtualJoystickDesc::nhats"]
7984 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, nhats) - 18usize];
7985 ["Offset of field: SDL_VirtualJoystickDesc::ntouchpads"]
7986 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, ntouchpads) - 20usize];
7987 ["Offset of field: SDL_VirtualJoystickDesc::nsensors"]
7988 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, nsensors) - 22usize];
7989 ["Offset of field: SDL_VirtualJoystickDesc::padding2"]
7990 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, padding2) - 24usize];
7991 ["Offset of field: SDL_VirtualJoystickDesc::button_mask"]
7992 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, button_mask) - 28usize];
7993 ["Offset of field: SDL_VirtualJoystickDesc::axis_mask"]
7994 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, axis_mask) - 32usize];
7995 ["Offset of field: SDL_VirtualJoystickDesc::name"]
7996 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, name) - 40usize];
7997 ["Offset of field: SDL_VirtualJoystickDesc::touchpads"]
7998 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, touchpads) - 48usize];
7999 ["Offset of field: SDL_VirtualJoystickDesc::sensors"]
8000 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, sensors) - 56usize];
8001 ["Offset of field: SDL_VirtualJoystickDesc::userdata"]
8002 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, userdata) - 64usize];
8003 ["Offset of field: SDL_VirtualJoystickDesc::Update"]
8004 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, Update) - 72usize];
8005 ["Offset of field: SDL_VirtualJoystickDesc::SetPlayerIndex"]
8006 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, SetPlayerIndex) - 80usize];
8007 ["Offset of field: SDL_VirtualJoystickDesc::Rumble"]
8008 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, Rumble) - 88usize];
8009 ["Offset of field: SDL_VirtualJoystickDesc::RumbleTriggers"]
8010 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, RumbleTriggers) - 96usize];
8011 ["Offset of field: SDL_VirtualJoystickDesc::SetLED"]
8012 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, SetLED) - 104usize];
8013 ["Offset of field: SDL_VirtualJoystickDesc::SendEffect"]
8014 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, SendEffect) - 112usize];
8015 ["Offset of field: SDL_VirtualJoystickDesc::SetSensorsEnabled"]
8016 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, SetSensorsEnabled) - 120usize];
8017 ["Offset of field: SDL_VirtualJoystickDesc::Cleanup"]
8018 [::core::mem::offset_of!(SDL_VirtualJoystickDesc, Cleanup) - 128usize];
8019};
8020impl Default for SDL_VirtualJoystickDesc {
8021 fn default() -> Self {
8022 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
8023 unsafe {
8024 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8025 s.assume_init()
8026 }
8027 }
8028}
8029unsafe extern "C" {
8030 #[doc = " Attach a new virtual joystick.\n\n Apps can create virtual joysticks, that exist without hardware directly\n backing them, and have program-supplied inputs. Once attached, a virtual\n joystick looks like any other joystick that SDL can access. These can be\n used to make other things look like joysticks, or provide pre-recorded\n input, etc.\n\n Once attached, the app can send joystick inputs to the new virtual joystick\n using SDL_SetJoystickVirtualAxis(), etc.\n\n When no longer needed, the virtual joystick can be removed by calling\n SDL_DetachVirtualJoystick().\n\n **Parameter:** desc joystick description, initialized using SDL_INIT_INTERFACE().\n **Returns:** the joystick instance ID, or 0 on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DetachVirtualJoystick\n **See Also:** SDL_SetJoystickVirtualAxis\n **See Also:** SDL_SetJoystickVirtualButton\n **See Also:** SDL_SetJoystickVirtualBall\n **See Also:** SDL_SetJoystickVirtualHat\n **See Also:** SDL_SetJoystickVirtualTouchpad\n **See Also:** SDL_SetJoystickVirtualSensorData\n"]
8031 pub fn SDL_AttachVirtualJoystick(desc: *const SDL_VirtualJoystickDesc) -> SDL_JoystickID;
8032}
8033unsafe extern "C" {
8034 #[doc = " Detach a virtual joystick.\n\n **Parameter:** instance_id the joystick instance ID, previously returned from\n SDL_AttachVirtualJoystick().\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AttachVirtualJoystick\n"]
8035 pub fn SDL_DetachVirtualJoystick(instance_id: SDL_JoystickID) -> bool;
8036}
8037unsafe extern "C" {
8038 #[doc = " Query whether or not a joystick is virtual.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** true if the joystick is virtual, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8039 pub fn SDL_IsJoystickVirtual(instance_id: SDL_JoystickID) -> bool;
8040}
8041unsafe extern "C" {
8042 #[doc = " Set the state of an axis on an opened virtual joystick.\n\n Please note that values set here will not be applied until the next call to\n SDL_UpdateJoysticks, which can either be called directly, or can be called\n indirectly through various other SDL APIs, including, but not limited to\n the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,\n SDL_WaitEvent.\n\n Note that when sending trigger axes, you should scale the value to the full\n range of Sint16. For example, a trigger at rest would have the value of\n `SDL_JOYSTICK_AXIS_MIN`.\n\n **Parameter:** joystick the virtual joystick on which to set state.\n **Parameter:** axis the index of the axis on the virtual joystick to update.\n **Parameter:** value the new value for the specified axis.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickVirtualButton\n **See Also:** SDL_SetJoystickVirtualBall\n **See Also:** SDL_SetJoystickVirtualHat\n **See Also:** SDL_SetJoystickVirtualTouchpad\n **See Also:** SDL_SetJoystickVirtualSensorData\n"]
8043 pub fn SDL_SetJoystickVirtualAxis(
8044 joystick: *mut SDL_Joystick,
8045 axis: core::ffi::c_int,
8046 value: Sint16,
8047 ) -> bool;
8048}
8049unsafe extern "C" {
8050 #[doc = " Generate ball motion on an opened virtual joystick.\n\n Please note that values set here will not be applied until the next call to\n SDL_UpdateJoysticks, which can either be called directly, or can be called\n indirectly through various other SDL APIs, including, but not limited to\n the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,\n SDL_WaitEvent.\n\n **Parameter:** joystick the virtual joystick on which to set state.\n **Parameter:** ball the index of the ball on the virtual joystick to update.\n **Parameter:** xrel the relative motion on the X axis.\n **Parameter:** yrel the relative motion on the Y axis.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickVirtualAxis\n **See Also:** SDL_SetJoystickVirtualButton\n **See Also:** SDL_SetJoystickVirtualHat\n **See Also:** SDL_SetJoystickVirtualTouchpad\n **See Also:** SDL_SetJoystickVirtualSensorData\n"]
8051 pub fn SDL_SetJoystickVirtualBall(
8052 joystick: *mut SDL_Joystick,
8053 ball: core::ffi::c_int,
8054 xrel: Sint16,
8055 yrel: Sint16,
8056 ) -> bool;
8057}
8058unsafe extern "C" {
8059 #[doc = " Set the state of a button on an opened virtual joystick.\n\n Please note that values set here will not be applied until the next call to\n SDL_UpdateJoysticks, which can either be called directly, or can be called\n indirectly through various other SDL APIs, including, but not limited to\n the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,\n SDL_WaitEvent.\n\n **Parameter:** joystick the virtual joystick on which to set state.\n **Parameter:** button the index of the button on the virtual joystick to update.\n **Parameter:** down true if the button is pressed, false otherwise.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickVirtualAxis\n **See Also:** SDL_SetJoystickVirtualBall\n **See Also:** SDL_SetJoystickVirtualHat\n **See Also:** SDL_SetJoystickVirtualTouchpad\n **See Also:** SDL_SetJoystickVirtualSensorData\n"]
8060 pub fn SDL_SetJoystickVirtualButton(
8061 joystick: *mut SDL_Joystick,
8062 button: core::ffi::c_int,
8063 down: bool,
8064 ) -> bool;
8065}
8066unsafe extern "C" {
8067 #[doc = " Set the state of a hat on an opened virtual joystick.\n\n Please note that values set here will not be applied until the next call to\n SDL_UpdateJoysticks, which can either be called directly, or can be called\n indirectly through various other SDL APIs, including, but not limited to\n the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,\n SDL_WaitEvent.\n\n **Parameter:** joystick the virtual joystick on which to set state.\n **Parameter:** hat the index of the hat on the virtual joystick to update.\n **Parameter:** value the new value for the specified hat.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickVirtualAxis\n **See Also:** SDL_SetJoystickVirtualButton\n **See Also:** SDL_SetJoystickVirtualBall\n **See Also:** SDL_SetJoystickVirtualTouchpad\n **See Also:** SDL_SetJoystickVirtualSensorData\n"]
8068 pub fn SDL_SetJoystickVirtualHat(
8069 joystick: *mut SDL_Joystick,
8070 hat: core::ffi::c_int,
8071 value: Uint8,
8072 ) -> bool;
8073}
8074unsafe extern "C" {
8075 #[doc = " Set touchpad finger state on an opened virtual joystick.\n\n Please note that values set here will not be applied until the next call to\n SDL_UpdateJoysticks, which can either be called directly, or can be called\n indirectly through various other SDL APIs, including, but not limited to\n the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,\n SDL_WaitEvent.\n\n **Parameter:** joystick the virtual joystick on which to set state.\n **Parameter:** touchpad the index of the touchpad on the virtual joystick to\n update.\n **Parameter:** finger the index of the finger on the touchpad to set.\n **Parameter:** down true if the finger is pressed, false if the finger is released.\n **Parameter:** x the x coordinate of the finger on the touchpad, normalized 0 to 1,\n with the origin in the upper left.\n **Parameter:** y the y coordinate of the finger on the touchpad, normalized 0 to 1,\n with the origin in the upper left.\n **Parameter:** pressure the pressure of the finger.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickVirtualAxis\n **See Also:** SDL_SetJoystickVirtualButton\n **See Also:** SDL_SetJoystickVirtualBall\n **See Also:** SDL_SetJoystickVirtualHat\n **See Also:** SDL_SetJoystickVirtualSensorData\n"]
8076 pub fn SDL_SetJoystickVirtualTouchpad(
8077 joystick: *mut SDL_Joystick,
8078 touchpad: core::ffi::c_int,
8079 finger: core::ffi::c_int,
8080 down: bool,
8081 x: f32,
8082 y: f32,
8083 pressure: f32,
8084 ) -> bool;
8085}
8086unsafe extern "C" {
8087 #[doc = " Send a sensor update for an opened virtual joystick.\n\n Please note that values set here will not be applied until the next call to\n SDL_UpdateJoysticks, which can either be called directly, or can be called\n indirectly through various other SDL APIs, including, but not limited to\n the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,\n SDL_WaitEvent.\n\n **Parameter:** joystick the virtual joystick on which to set state.\n **Parameter:** type the type of the sensor on the virtual joystick to update.\n **Parameter:** sensor_timestamp a 64-bit timestamp in nanoseconds associated with\n the sensor reading.\n **Parameter:** data the data associated with the sensor reading.\n **Parameter:** num_values the number of values pointed to by `data`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickVirtualAxis\n **See Also:** SDL_SetJoystickVirtualButton\n **See Also:** SDL_SetJoystickVirtualBall\n **See Also:** SDL_SetJoystickVirtualHat\n **See Also:** SDL_SetJoystickVirtualTouchpad\n"]
8088 pub fn SDL_SendJoystickVirtualSensorData(
8089 joystick: *mut SDL_Joystick,
8090 type_: SDL_SensorType,
8091 sensor_timestamp: Uint64,
8092 data: *const f32,
8093 num_values: core::ffi::c_int,
8094 ) -> bool;
8095}
8096unsafe extern "C" {
8097 #[doc = " Get the properties associated with a joystick.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN`: true if this joystick has an\n LED that has adjustable brightness\n - `SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN`: true if this joystick has an LED\n that has adjustable color\n - `SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN`: true if this joystick has a\n player LED\n - `SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN`: true if this joystick has\n left/right rumble\n - `SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN`: true if this joystick has\n simple trigger rumble\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8098 pub fn SDL_GetJoystickProperties(joystick: *mut SDL_Joystick) -> SDL_PropertiesID;
8099}
8100unsafe extern "C" {
8101 #[doc = " Get the implementation dependent name of a joystick.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the name of the selected joystick. If no name can be found, this\n function returns NULL; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickNameForID\n"]
8102 pub fn SDL_GetJoystickName(joystick: *mut SDL_Joystick) -> *const core::ffi::c_char;
8103}
8104unsafe extern "C" {
8105 #[doc = " Get the implementation dependent path of a joystick.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the path of the selected joystick. If no path can be found, this\n function returns NULL; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickPathForID\n"]
8106 pub fn SDL_GetJoystickPath(joystick: *mut SDL_Joystick) -> *const core::ffi::c_char;
8107}
8108unsafe extern "C" {
8109 #[doc = " Get the player index of an opened joystick.\n\n For XInput controllers this returns the XInput user index. Many joysticks\n will not be able to supply this information.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the player index, or -1 if it's not available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickPlayerIndex\n"]
8110 pub fn SDL_GetJoystickPlayerIndex(joystick: *mut SDL_Joystick) -> core::ffi::c_int;
8111}
8112unsafe extern "C" {
8113 #[doc = " Set the player index of an opened joystick.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Parameter:** player_index player index to assign to this joystick, or -1 to clear\n the player index and turn off player LEDs.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickPlayerIndex\n"]
8114 pub fn SDL_SetJoystickPlayerIndex(
8115 joystick: *mut SDL_Joystick,
8116 player_index: core::ffi::c_int,
8117 ) -> bool;
8118}
8119unsafe extern "C" {
8120 #[doc = " Get the implementation-dependent GUID for the joystick.\n\n This function requires an open joystick.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the GUID of the given joystick. If called on an invalid index,\n this function returns a zero GUID; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickGUIDForID\n **See Also:** SDL_GUIDToString\n"]
8121 pub fn SDL_GetJoystickGUID(joystick: *mut SDL_Joystick) -> SDL_GUID;
8122}
8123unsafe extern "C" {
8124 #[doc = " Get the USB vendor ID of an opened joystick, if available.\n\n If the vendor ID isn't available this function returns 0.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the USB vendor ID of the selected joystick, or 0 if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickVendorForID\n"]
8125 pub fn SDL_GetJoystickVendor(joystick: *mut SDL_Joystick) -> Uint16;
8126}
8127unsafe extern "C" {
8128 #[doc = " Get the USB product ID of an opened joystick, if available.\n\n If the product ID isn't available this function returns 0.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the USB product ID of the selected joystick, or 0 if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickProductForID\n"]
8129 pub fn SDL_GetJoystickProduct(joystick: *mut SDL_Joystick) -> Uint16;
8130}
8131unsafe extern "C" {
8132 #[doc = " Get the product version of an opened joystick, if available.\n\n If the product version isn't available this function returns 0.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the product version of the selected joystick, or 0 if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickProductVersionForID\n"]
8133 pub fn SDL_GetJoystickProductVersion(joystick: *mut SDL_Joystick) -> Uint16;
8134}
8135unsafe extern "C" {
8136 #[doc = " Get the firmware version of an opened joystick, if available.\n\n If the firmware version isn't available this function returns 0.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the firmware version of the selected joystick, or 0 if\n unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8137 pub fn SDL_GetJoystickFirmwareVersion(joystick: *mut SDL_Joystick) -> Uint16;
8138}
8139unsafe extern "C" {
8140 #[doc = " Get the serial number of an opened joystick, if available.\n\n Returns the serial number of the joystick, or NULL if it is not available.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the serial number of the selected joystick, or NULL if\n unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8141 pub fn SDL_GetJoystickSerial(joystick: *mut SDL_Joystick) -> *const core::ffi::c_char;
8142}
8143unsafe extern "C" {
8144 #[doc = " Get the type of an opened joystick.\n\n **Parameter:** joystick the SDL_Joystick obtained from SDL_OpenJoystick().\n **Returns:** the SDL_JoystickType of the selected joystick.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickTypeForID\n"]
8145 pub fn SDL_GetJoystickType(joystick: *mut SDL_Joystick) -> SDL_JoystickType;
8146}
8147unsafe extern "C" {
8148 #[doc = " Get the device information encoded in a SDL_GUID structure.\n\n **Parameter:** guid the SDL_GUID you wish to get info about.\n **Parameter:** vendor a pointer filled in with the device VID, or 0 if not\n available.\n **Parameter:** product a pointer filled in with the device PID, or 0 if not\n available.\n **Parameter:** version a pointer filled in with the device version, or 0 if not\n available.\n **Parameter:** crc16 a pointer filled in with a CRC used to distinguish different\n products with the same VID/PID, or 0 if not available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickGUIDForID\n"]
8149 pub fn SDL_GetJoystickGUIDInfo(
8150 guid: SDL_GUID,
8151 vendor: *mut Uint16,
8152 product: *mut Uint16,
8153 version: *mut Uint16,
8154 crc16: *mut Uint16,
8155 );
8156}
8157unsafe extern "C" {
8158 #[doc = " Get the status of a specified joystick.\n\n **Parameter:** joystick the joystick to query.\n **Returns:** true if the joystick has been opened, false if it has not; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8159 pub fn SDL_JoystickConnected(joystick: *mut SDL_Joystick) -> bool;
8160}
8161unsafe extern "C" {
8162 #[doc = " Get the instance ID of an opened joystick.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Returns:** the instance ID of the specified joystick on success or 0 on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8163 pub fn SDL_GetJoystickID(joystick: *mut SDL_Joystick) -> SDL_JoystickID;
8164}
8165unsafe extern "C" {
8166 #[doc = " Get the number of general axis controls on a joystick.\n\n Often, the directional pad on a game controller will either look like 4\n separate buttons or a POV hat, and not axes, but all of this is up to the\n device and platform.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Returns:** the number of axis controls/number of axes on success or -1 on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickAxis\n **See Also:** SDL_GetNumJoystickBalls\n **See Also:** SDL_GetNumJoystickButtons\n **See Also:** SDL_GetNumJoystickHats\n"]
8167 pub fn SDL_GetNumJoystickAxes(joystick: *mut SDL_Joystick) -> core::ffi::c_int;
8168}
8169unsafe extern "C" {
8170 #[doc = " Get the number of trackballs on a joystick.\n\n Joystick trackballs have only relative motion events associated with them\n and their state cannot be polled.\n\n Most joysticks do not have trackballs.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Returns:** the number of trackballs on success or -1 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickBall\n **See Also:** SDL_GetNumJoystickAxes\n **See Also:** SDL_GetNumJoystickButtons\n **See Also:** SDL_GetNumJoystickHats\n"]
8171 pub fn SDL_GetNumJoystickBalls(joystick: *mut SDL_Joystick) -> core::ffi::c_int;
8172}
8173unsafe extern "C" {
8174 #[doc = " Get the number of POV hats on a joystick.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Returns:** the number of POV hats on success or -1 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickHat\n **See Also:** SDL_GetNumJoystickAxes\n **See Also:** SDL_GetNumJoystickBalls\n **See Also:** SDL_GetNumJoystickButtons\n"]
8175 pub fn SDL_GetNumJoystickHats(joystick: *mut SDL_Joystick) -> core::ffi::c_int;
8176}
8177unsafe extern "C" {
8178 #[doc = " Get the number of buttons on a joystick.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Returns:** the number of buttons on success or -1 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickButton\n **See Also:** SDL_GetNumJoystickAxes\n **See Also:** SDL_GetNumJoystickBalls\n **See Also:** SDL_GetNumJoystickHats\n"]
8179 pub fn SDL_GetNumJoystickButtons(joystick: *mut SDL_Joystick) -> core::ffi::c_int;
8180}
8181unsafe extern "C" {
8182 #[doc = " Set the state of joystick event processing.\n\n If joystick events are disabled, you must call SDL_UpdateJoysticks()\n yourself and check the state of the joystick when you want joystick\n information.\n\n **Parameter:** enabled whether to process joystick events or not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_JoystickEventsEnabled\n **See Also:** SDL_UpdateJoysticks\n"]
8183 pub fn SDL_SetJoystickEventsEnabled(enabled: bool);
8184}
8185unsafe extern "C" {
8186 #[doc = " Query the state of joystick event processing.\n\n If joystick events are disabled, you must call SDL_UpdateJoysticks()\n yourself and check the state of the joystick when you want joystick\n information.\n\n **Returns:** true if joystick events are being processed, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetJoystickEventsEnabled\n"]
8187 pub fn SDL_JoystickEventsEnabled() -> bool;
8188}
8189unsafe extern "C" {
8190 #[doc = " Update the current state of the open joysticks.\n\n This is called automatically by the event loop if any joystick events are\n enabled and SDL_HINT_AUTO_UPDATE_JOYSTICKS hasn't been set to \"0\".\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8191 pub fn SDL_UpdateJoysticks();
8192}
8193unsafe extern "C" {
8194 #[doc = " Get the current state of an axis control on a joystick.\n\n SDL makes no promises about what part of the joystick any given axis refers\n to. Your game should have some sort of configuration UI to let users\n specify what each axis should be bound to. Alternately, SDL's higher-level\n Game Controller API makes a great effort to apply order to this lower-level\n interface, so you know that a specific axis is the \"left thumb stick,\" etc.\n\n The value returned by SDL_GetJoystickAxis() is a signed integer (-32768 to\n 32767) representing the current position of the axis. It may be necessary\n to impose certain tolerances on these values to account for jitter.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Parameter:** axis the axis to query; the axis indices start at index 0.\n **Returns:** a 16-bit signed integer representing the current position of the\n axis or 0 on failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumJoystickAxes\n"]
8195 pub fn SDL_GetJoystickAxis(joystick: *mut SDL_Joystick, axis: core::ffi::c_int) -> Sint16;
8196}
8197unsafe extern "C" {
8198 #[doc = " Get the initial state of an axis control on a joystick.\n\n The state is a value ranging from -32768 to 32767.\n\n The axis indices start at index 0.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Parameter:** axis the axis to query; the axis indices start at index 0.\n **Parameter:** state upon return, the initial value is supplied here.\n **Returns:** true if this axis has any initial value, or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8199 pub fn SDL_GetJoystickAxisInitialState(
8200 joystick: *mut SDL_Joystick,
8201 axis: core::ffi::c_int,
8202 state: *mut Sint16,
8203 ) -> bool;
8204}
8205unsafe extern "C" {
8206 #[doc = " Get the ball axis change since the last poll.\n\n Trackballs can only return relative motion since the last call to\n SDL_GetJoystickBall(), these motion deltas are placed into `dx` and `dy`.\n\n Most joysticks do not have trackballs.\n\n **Parameter:** joystick the SDL_Joystick to query.\n **Parameter:** ball the ball index to query; ball indices start at index 0.\n **Parameter:** dx stores the difference in the x axis position since the last poll.\n **Parameter:** dy stores the difference in the y axis position since the last poll.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumJoystickBalls\n"]
8207 pub fn SDL_GetJoystickBall(
8208 joystick: *mut SDL_Joystick,
8209 ball: core::ffi::c_int,
8210 dx: *mut core::ffi::c_int,
8211 dy: *mut core::ffi::c_int,
8212 ) -> bool;
8213}
8214unsafe extern "C" {
8215 #[doc = " Get the current state of a POV hat on a joystick.\n\n The returned value will be one of the `SDL_HAT_*` values.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Parameter:** hat the hat index to get the state from; indices start at index 0.\n **Returns:** the current hat position.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumJoystickHats\n"]
8216 pub fn SDL_GetJoystickHat(joystick: *mut SDL_Joystick, hat: core::ffi::c_int) -> Uint8;
8217}
8218unsafe extern "C" {
8219 #[doc = " Get the current state of a button on a joystick.\n\n **Parameter:** joystick an SDL_Joystick structure containing joystick information.\n **Parameter:** button the button index to get the state from; indices start at\n index 0.\n **Returns:** true if the button is pressed, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumJoystickButtons\n"]
8220 pub fn SDL_GetJoystickButton(joystick: *mut SDL_Joystick, button: core::ffi::c_int) -> bool;
8221}
8222unsafe extern "C" {
8223 #[doc = " Start a rumble effect.\n\n Each call to this function cancels any previous rumble effect, and calling\n it with 0 intensity stops any rumbling.\n\n This function requires you to process SDL events or call\n SDL_UpdateJoysticks() to update rumble state.\n\n **Parameter:** joystick the joystick to vibrate.\n **Parameter:** low_frequency_rumble the intensity of the low frequency (left)\n rumble motor, from 0 to 0xFFFF.\n **Parameter:** high_frequency_rumble the intensity of the high frequency (right)\n rumble motor, from 0 to 0xFFFF.\n **Parameter:** duration_ms the duration of the rumble effect, in milliseconds.\n **Returns:** true, or false if rumble isn't supported on this joystick.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8224 pub fn SDL_RumbleJoystick(
8225 joystick: *mut SDL_Joystick,
8226 low_frequency_rumble: Uint16,
8227 high_frequency_rumble: Uint16,
8228 duration_ms: Uint32,
8229 ) -> bool;
8230}
8231unsafe extern "C" {
8232 #[doc = " Start a rumble effect in the joystick's triggers.\n\n Each call to this function cancels any previous trigger rumble effect, and\n calling it with 0 intensity stops any rumbling.\n\n Note that this is rumbling of the _triggers_ and not the game controller as\n a whole. This is currently only supported on Xbox One controllers. If you\n want the (more common) whole-controller rumble, use SDL_RumbleJoystick()\n instead.\n\n This function requires you to process SDL events or call\n SDL_UpdateJoysticks() to update rumble state.\n\n **Parameter:** joystick the joystick to vibrate.\n **Parameter:** left_rumble the intensity of the left trigger rumble motor, from 0\n to 0xFFFF.\n **Parameter:** right_rumble the intensity of the right trigger rumble motor, from 0\n to 0xFFFF.\n **Parameter:** duration_ms the duration of the rumble effect, in milliseconds.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RumbleJoystick\n"]
8233 pub fn SDL_RumbleJoystickTriggers(
8234 joystick: *mut SDL_Joystick,
8235 left_rumble: Uint16,
8236 right_rumble: Uint16,
8237 duration_ms: Uint32,
8238 ) -> bool;
8239}
8240unsafe extern "C" {
8241 #[doc = " Update a joystick's LED color.\n\n An example of a joystick LED is the light on the back of a PlayStation 4's\n DualShock 4 controller.\n\n For joysticks with a single color LED, the maximum of the RGB values will\n be used as the LED brightness.\n\n **Parameter:** joystick the joystick to update.\n **Parameter:** red the intensity of the red LED.\n **Parameter:** green the intensity of the green LED.\n **Parameter:** blue the intensity of the blue LED.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8242 pub fn SDL_SetJoystickLED(
8243 joystick: *mut SDL_Joystick,
8244 red: Uint8,
8245 green: Uint8,
8246 blue: Uint8,
8247 ) -> bool;
8248}
8249unsafe extern "C" {
8250 #[doc = " Send a joystick specific effect packet.\n\n **Parameter:** joystick the joystick to affect.\n **Parameter:** data the data to send to the joystick.\n **Parameter:** size the size of the data to send to the joystick.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8251 pub fn SDL_SendJoystickEffect(
8252 joystick: *mut SDL_Joystick,
8253 data: *const core::ffi::c_void,
8254 size: core::ffi::c_int,
8255 ) -> bool;
8256}
8257unsafe extern "C" {
8258 #[doc = " Close a joystick previously opened with SDL_OpenJoystick().\n\n **Parameter:** joystick the joystick device to close.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenJoystick\n"]
8259 pub fn SDL_CloseJoystick(joystick: *mut SDL_Joystick);
8260}
8261unsafe extern "C" {
8262 #[doc = " Get the connection state of a joystick.\n\n **Parameter:** joystick the joystick to query.\n **Returns:** the connection state on success or\n `SDL_JOYSTICK_CONNECTION_INVALID` on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8263 pub fn SDL_GetJoystickConnectionState(
8264 joystick: *mut SDL_Joystick,
8265 ) -> SDL_JoystickConnectionState;
8266}
8267unsafe extern "C" {
8268 #[doc = " Get the battery state of a joystick.\n\n You should never take a battery status as absolute truth. Batteries\n (especially failing batteries) are delicate hardware, and the values\n reported here are best estimates based on what that hardware reports. It's\n not uncommon for older batteries to lose stored power much faster than it\n reports, or completely drain when reporting it has 20 percent left, etc.\n\n **Parameter:** joystick the joystick to query.\n **Parameter:** percent a pointer filled in with the percentage of battery life\n left, between 0 and 100, or NULL to ignore. This will be\n filled in with -1 we can't determine a value or there is no\n battery.\n **Returns:** the current battery state or `SDL_POWERSTATE_ERROR` on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8269 pub fn SDL_GetJoystickPowerInfo(
8270 joystick: *mut SDL_Joystick,
8271 percent: *mut core::ffi::c_int,
8272 ) -> SDL_PowerState;
8273}
8274#[repr(C)]
8275#[derive(Debug, Copy, Clone)]
8276pub struct SDL_Gamepad {
8277 _unused: [u8; 0],
8278}
8279impl SDL_GamepadType {
8280 pub const SDL_GAMEPAD_TYPE_UNKNOWN: SDL_GamepadType = SDL_GamepadType(0);
8281 pub const SDL_GAMEPAD_TYPE_STANDARD: SDL_GamepadType = SDL_GamepadType(1);
8282 pub const SDL_GAMEPAD_TYPE_XBOX360: SDL_GamepadType = SDL_GamepadType(2);
8283 pub const SDL_GAMEPAD_TYPE_XBOXONE: SDL_GamepadType = SDL_GamepadType(3);
8284 pub const SDL_GAMEPAD_TYPE_PS3: SDL_GamepadType = SDL_GamepadType(4);
8285 pub const SDL_GAMEPAD_TYPE_PS4: SDL_GamepadType = SDL_GamepadType(5);
8286 pub const SDL_GAMEPAD_TYPE_PS5: SDL_GamepadType = SDL_GamepadType(6);
8287 pub const SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO: SDL_GamepadType = SDL_GamepadType(7);
8288 pub const SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT: SDL_GamepadType = SDL_GamepadType(8);
8289 pub const SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT: SDL_GamepadType = SDL_GamepadType(9);
8290 pub const SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR: SDL_GamepadType = SDL_GamepadType(10);
8291 pub const SDL_GAMEPAD_TYPE_GAMECUBE: SDL_GamepadType = SDL_GamepadType(11);
8292 pub const SDL_GAMEPAD_TYPE_COUNT: SDL_GamepadType = SDL_GamepadType(12);
8293}
8294#[repr(transparent)]
8295#[doc = " Standard gamepad types.\n\n This type does not necessarily map to first-party controllers from\n Microsoft/Sony/Nintendo; in many cases, third-party controllers can report\n as these, either because they were designed for a specific console, or they\n simply most closely match that console's controllers (does it have A/B/X/Y\n buttons or X/O/Square/Triangle? Does it have a touchpad? etc).\n"]
8296#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
8297pub struct SDL_GamepadType(pub core::ffi::c_uint);
8298impl SDL_GamepadButton {
8299 pub const SDL_GAMEPAD_BUTTON_INVALID: SDL_GamepadButton = SDL_GamepadButton(-1);
8300 #[doc = "< Bottom face button (e.g. Xbox A button)\n"]
8301 pub const SDL_GAMEPAD_BUTTON_SOUTH: SDL_GamepadButton = SDL_GamepadButton(0);
8302 #[doc = "< Right face button (e.g. Xbox B button)\n"]
8303 pub const SDL_GAMEPAD_BUTTON_EAST: SDL_GamepadButton = SDL_GamepadButton(1);
8304 #[doc = "< Left face button (e.g. Xbox X button)\n"]
8305 pub const SDL_GAMEPAD_BUTTON_WEST: SDL_GamepadButton = SDL_GamepadButton(2);
8306 #[doc = "< Top face button (e.g. Xbox Y button)\n"]
8307 pub const SDL_GAMEPAD_BUTTON_NORTH: SDL_GamepadButton = SDL_GamepadButton(3);
8308 pub const SDL_GAMEPAD_BUTTON_BACK: SDL_GamepadButton = SDL_GamepadButton(4);
8309 pub const SDL_GAMEPAD_BUTTON_GUIDE: SDL_GamepadButton = SDL_GamepadButton(5);
8310 pub const SDL_GAMEPAD_BUTTON_START: SDL_GamepadButton = SDL_GamepadButton(6);
8311 pub const SDL_GAMEPAD_BUTTON_LEFT_STICK: SDL_GamepadButton = SDL_GamepadButton(7);
8312 pub const SDL_GAMEPAD_BUTTON_RIGHT_STICK: SDL_GamepadButton = SDL_GamepadButton(8);
8313 pub const SDL_GAMEPAD_BUTTON_LEFT_SHOULDER: SDL_GamepadButton = SDL_GamepadButton(9);
8314 pub const SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER: SDL_GamepadButton = SDL_GamepadButton(10);
8315 pub const SDL_GAMEPAD_BUTTON_DPAD_UP: SDL_GamepadButton = SDL_GamepadButton(11);
8316 pub const SDL_GAMEPAD_BUTTON_DPAD_DOWN: SDL_GamepadButton = SDL_GamepadButton(12);
8317 pub const SDL_GAMEPAD_BUTTON_DPAD_LEFT: SDL_GamepadButton = SDL_GamepadButton(13);
8318 pub const SDL_GAMEPAD_BUTTON_DPAD_RIGHT: SDL_GamepadButton = SDL_GamepadButton(14);
8319 #[doc = "< Additional button (e.g. Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button, Google Stadia capture button)\n"]
8320 pub const SDL_GAMEPAD_BUTTON_MISC1: SDL_GamepadButton = SDL_GamepadButton(15);
8321 #[doc = "< Upper or primary paddle, under your right hand (e.g. Xbox Elite paddle P1, DualSense Edge RB button, Right Joy-Con SR button)\n"]
8322 pub const SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1: SDL_GamepadButton = SDL_GamepadButton(16);
8323 #[doc = "< Upper or primary paddle, under your left hand (e.g. Xbox Elite paddle P3, DualSense Edge LB button, Left Joy-Con SL button)\n"]
8324 pub const SDL_GAMEPAD_BUTTON_LEFT_PADDLE1: SDL_GamepadButton = SDL_GamepadButton(17);
8325 #[doc = "< Lower or secondary paddle, under your right hand (e.g. Xbox Elite paddle P2, DualSense Edge right Fn button, Right Joy-Con SL button)\n"]
8326 pub const SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2: SDL_GamepadButton = SDL_GamepadButton(18);
8327 #[doc = "< Lower or secondary paddle, under your left hand (e.g. Xbox Elite paddle P4, DualSense Edge left Fn button, Left Joy-Con SR button)\n"]
8328 pub const SDL_GAMEPAD_BUTTON_LEFT_PADDLE2: SDL_GamepadButton = SDL_GamepadButton(19);
8329 #[doc = "< PS4/PS5 touchpad button\n"]
8330 pub const SDL_GAMEPAD_BUTTON_TOUCHPAD: SDL_GamepadButton = SDL_GamepadButton(20);
8331 #[doc = "< Additional button\n"]
8332 pub const SDL_GAMEPAD_BUTTON_MISC2: SDL_GamepadButton = SDL_GamepadButton(21);
8333 #[doc = "< Additional button (e.g. Nintendo GameCube left trigger click)\n"]
8334 pub const SDL_GAMEPAD_BUTTON_MISC3: SDL_GamepadButton = SDL_GamepadButton(22);
8335 #[doc = "< Additional button (e.g. Nintendo GameCube right trigger click)\n"]
8336 pub const SDL_GAMEPAD_BUTTON_MISC4: SDL_GamepadButton = SDL_GamepadButton(23);
8337 #[doc = "< Additional button\n"]
8338 pub const SDL_GAMEPAD_BUTTON_MISC5: SDL_GamepadButton = SDL_GamepadButton(24);
8339 #[doc = "< Additional button\n"]
8340 pub const SDL_GAMEPAD_BUTTON_MISC6: SDL_GamepadButton = SDL_GamepadButton(25);
8341 pub const SDL_GAMEPAD_BUTTON_COUNT: SDL_GamepadButton = SDL_GamepadButton(26);
8342}
8343#[repr(transparent)]
8344#[doc = " The list of buttons available on a gamepad\n\n For controllers that use a diamond pattern for the face buttons, the\n south/east/west/north buttons below correspond to the locations in the\n diamond pattern. For Xbox controllers, this would be A/B/X/Y, for Nintendo\n Switch controllers, this would be B/A/Y/X, for GameCube controllers this\n would be A/X/B/Y, for PlayStation controllers this would be\n Cross/Circle/Square/Triangle.\n\n For controllers that don't use a diamond pattern for the face buttons, the\n south/east/west/north buttons indicate the buttons labeled A, B, C, D, or\n 1, 2, 3, 4, or for controllers that aren't labeled, they are the primary,\n secondary, etc. buttons.\n\n The activate action is often the south button and the cancel action is\n often the east button, but in some regions this is reversed, so your game\n should allow remapping actions based on user preferences.\n\n You can query the labels for the face buttons using\n SDL_GetGamepadButtonLabel()\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
8345#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
8346pub struct SDL_GamepadButton(pub core::ffi::c_int);
8347impl SDL_GamepadButtonLabel {
8348 pub const SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(0);
8349 pub const SDL_GAMEPAD_BUTTON_LABEL_A: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(1);
8350 pub const SDL_GAMEPAD_BUTTON_LABEL_B: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(2);
8351 pub const SDL_GAMEPAD_BUTTON_LABEL_X: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(3);
8352 pub const SDL_GAMEPAD_BUTTON_LABEL_Y: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(4);
8353 pub const SDL_GAMEPAD_BUTTON_LABEL_CROSS: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(5);
8354 pub const SDL_GAMEPAD_BUTTON_LABEL_CIRCLE: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(6);
8355 pub const SDL_GAMEPAD_BUTTON_LABEL_SQUARE: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(7);
8356 pub const SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE: SDL_GamepadButtonLabel = SDL_GamepadButtonLabel(8);
8357}
8358#[repr(transparent)]
8359#[doc = " The set of gamepad button labels\n\n This isn't a complete set, just the face buttons to make it easy to show\n button prompts.\n\n For a complete set, you should look at the button and gamepad type and have\n a set of symbols that work well with your art style.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
8360#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
8361pub struct SDL_GamepadButtonLabel(pub core::ffi::c_uint);
8362impl SDL_GamepadAxis {
8363 pub const SDL_GAMEPAD_AXIS_INVALID: SDL_GamepadAxis = SDL_GamepadAxis(-1);
8364 pub const SDL_GAMEPAD_AXIS_LEFTX: SDL_GamepadAxis = SDL_GamepadAxis(0);
8365 pub const SDL_GAMEPAD_AXIS_LEFTY: SDL_GamepadAxis = SDL_GamepadAxis(1);
8366 pub const SDL_GAMEPAD_AXIS_RIGHTX: SDL_GamepadAxis = SDL_GamepadAxis(2);
8367 pub const SDL_GAMEPAD_AXIS_RIGHTY: SDL_GamepadAxis = SDL_GamepadAxis(3);
8368 pub const SDL_GAMEPAD_AXIS_LEFT_TRIGGER: SDL_GamepadAxis = SDL_GamepadAxis(4);
8369 pub const SDL_GAMEPAD_AXIS_RIGHT_TRIGGER: SDL_GamepadAxis = SDL_GamepadAxis(5);
8370 pub const SDL_GAMEPAD_AXIS_COUNT: SDL_GamepadAxis = SDL_GamepadAxis(6);
8371}
8372#[repr(transparent)]
8373#[doc = " The list of axes available on a gamepad\n\n Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to\n SDL_JOYSTICK_AXIS_MAX, and are centered within ~8000 of zero, though\n advanced UI will allow users to set or autodetect the dead zone, which\n varies between gamepads.\n\n Trigger axis values range from 0 (released) to SDL_JOYSTICK_AXIS_MAX (fully\n pressed) when reported by SDL_GetGamepadAxis(). Note that this is not the\n same range that will be reported by the lower-level SDL_GetJoystickAxis().\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
8374#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
8375pub struct SDL_GamepadAxis(pub core::ffi::c_int);
8376impl SDL_GamepadBindingType {
8377 pub const SDL_GAMEPAD_BINDTYPE_NONE: SDL_GamepadBindingType = SDL_GamepadBindingType(0);
8378 pub const SDL_GAMEPAD_BINDTYPE_BUTTON: SDL_GamepadBindingType = SDL_GamepadBindingType(1);
8379 pub const SDL_GAMEPAD_BINDTYPE_AXIS: SDL_GamepadBindingType = SDL_GamepadBindingType(2);
8380 pub const SDL_GAMEPAD_BINDTYPE_HAT: SDL_GamepadBindingType = SDL_GamepadBindingType(3);
8381}
8382#[repr(transparent)]
8383#[doc = " Types of gamepad control bindings.\n\n A gamepad is a collection of bindings that map arbitrary joystick buttons,\n axes and hat switches to specific positions on a generic console-style\n gamepad. This enum is used as part of SDL_GamepadBinding to specify those\n mappings.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
8384#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
8385pub struct SDL_GamepadBindingType(pub core::ffi::c_uint);
8386#[doc = " A mapping between one joystick input to a gamepad control.\n\n A gamepad has a collection of several bindings, to say, for example, when\n joystick button number 5 is pressed, that should be treated like the\n gamepad's \"start\" button.\n\n SDL has these bindings built-in for many popular controllers, and can add\n more with a simple text string. Those strings are parsed into a collection\n of these structs to make it easier to operate on the data.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadBindings\n"]
8387#[repr(C)]
8388#[derive(Copy, Clone)]
8389pub struct SDL_GamepadBinding {
8390 pub input_type: SDL_GamepadBindingType,
8391 pub input: SDL_GamepadBinding__bindgen_ty_1,
8392 pub output_type: SDL_GamepadBindingType,
8393 pub output: SDL_GamepadBinding__bindgen_ty_2,
8394}
8395#[repr(C)]
8396#[derive(Copy, Clone)]
8397pub union SDL_GamepadBinding__bindgen_ty_1 {
8398 pub button: core::ffi::c_int,
8399 pub axis: SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1,
8400 pub hat: SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2,
8401}
8402#[repr(C)]
8403#[derive(Debug, Default, Copy, Clone, Hash)]
8404pub struct SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1 {
8405 pub axis: core::ffi::c_int,
8406 pub axis_min: core::ffi::c_int,
8407 pub axis_max: core::ffi::c_int,
8408}
8409#[allow(clippy::unnecessary_operation, clippy::identity_op)]
8410const _: () = {
8411 ["Size of SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1"]
8412 [::core::mem::size_of::<SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1>() - 12usize];
8413 ["Alignment of SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1"]
8414 [::core::mem::align_of::<SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1>() - 4usize];
8415 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1::axis"]
8416 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1, axis) - 0usize];
8417 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1::axis_min"][::core::mem::offset_of!(
8418 SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1,
8419 axis_min
8420 ) - 4usize];
8421 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1::axis_max"][::core::mem::offset_of!(
8422 SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_1,
8423 axis_max
8424 ) - 8usize];
8425};
8426#[repr(C)]
8427#[derive(Debug, Default, Copy, Clone, Hash)]
8428pub struct SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2 {
8429 pub hat: core::ffi::c_int,
8430 pub hat_mask: core::ffi::c_int,
8431}
8432#[allow(clippy::unnecessary_operation, clippy::identity_op)]
8433const _: () = {
8434 ["Size of SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2"]
8435 [::core::mem::size_of::<SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2>() - 8usize];
8436 ["Alignment of SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2"]
8437 [::core::mem::align_of::<SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2>() - 4usize];
8438 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2::hat"]
8439 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2, hat) - 0usize];
8440 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2::hat_mask"][::core::mem::offset_of!(
8441 SDL_GamepadBinding__bindgen_ty_1__bindgen_ty_2,
8442 hat_mask
8443 ) - 4usize];
8444};
8445#[allow(clippy::unnecessary_operation, clippy::identity_op)]
8446const _: () = {
8447 ["Size of SDL_GamepadBinding__bindgen_ty_1"]
8448 [::core::mem::size_of::<SDL_GamepadBinding__bindgen_ty_1>() - 12usize];
8449 ["Alignment of SDL_GamepadBinding__bindgen_ty_1"]
8450 [::core::mem::align_of::<SDL_GamepadBinding__bindgen_ty_1>() - 4usize];
8451 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1::button"]
8452 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_1, button) - 0usize];
8453 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1::axis"]
8454 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_1, axis) - 0usize];
8455 ["Offset of field: SDL_GamepadBinding__bindgen_ty_1::hat"]
8456 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_1, hat) - 0usize];
8457};
8458impl Default for SDL_GamepadBinding__bindgen_ty_1 {
8459 fn default() -> Self {
8460 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
8461 unsafe {
8462 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8463 s.assume_init()
8464 }
8465 }
8466}
8467#[repr(C)]
8468#[derive(Copy, Clone)]
8469pub union SDL_GamepadBinding__bindgen_ty_2 {
8470 pub button: SDL_GamepadButton,
8471 pub axis: SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1,
8472}
8473#[repr(C)]
8474#[derive(Debug, Copy, Clone, Hash)]
8475pub struct SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1 {
8476 pub axis: SDL_GamepadAxis,
8477 pub axis_min: core::ffi::c_int,
8478 pub axis_max: core::ffi::c_int,
8479}
8480#[allow(clippy::unnecessary_operation, clippy::identity_op)]
8481const _: () = {
8482 ["Size of SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1"]
8483 [::core::mem::size_of::<SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1>() - 12usize];
8484 ["Alignment of SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1"]
8485 [::core::mem::align_of::<SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1>() - 4usize];
8486 ["Offset of field: SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1::axis"]
8487 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1, axis) - 0usize];
8488 ["Offset of field: SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1::axis_min"][::core::mem::offset_of!(
8489 SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1,
8490 axis_min
8491 ) - 4usize];
8492 ["Offset of field: SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1::axis_max"][::core::mem::offset_of!(
8493 SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1,
8494 axis_max
8495 ) - 8usize];
8496};
8497impl Default for SDL_GamepadBinding__bindgen_ty_2__bindgen_ty_1 {
8498 fn default() -> Self {
8499 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
8500 unsafe {
8501 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8502 s.assume_init()
8503 }
8504 }
8505}
8506#[allow(clippy::unnecessary_operation, clippy::identity_op)]
8507const _: () = {
8508 ["Size of SDL_GamepadBinding__bindgen_ty_2"]
8509 [::core::mem::size_of::<SDL_GamepadBinding__bindgen_ty_2>() - 12usize];
8510 ["Alignment of SDL_GamepadBinding__bindgen_ty_2"]
8511 [::core::mem::align_of::<SDL_GamepadBinding__bindgen_ty_2>() - 4usize];
8512 ["Offset of field: SDL_GamepadBinding__bindgen_ty_2::button"]
8513 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_2, button) - 0usize];
8514 ["Offset of field: SDL_GamepadBinding__bindgen_ty_2::axis"]
8515 [::core::mem::offset_of!(SDL_GamepadBinding__bindgen_ty_2, axis) - 0usize];
8516};
8517impl Default for SDL_GamepadBinding__bindgen_ty_2 {
8518 fn default() -> Self {
8519 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
8520 unsafe {
8521 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8522 s.assume_init()
8523 }
8524 }
8525}
8526#[allow(clippy::unnecessary_operation, clippy::identity_op)]
8527const _: () = {
8528 ["Size of SDL_GamepadBinding"][::core::mem::size_of::<SDL_GamepadBinding>() - 32usize];
8529 ["Alignment of SDL_GamepadBinding"][::core::mem::align_of::<SDL_GamepadBinding>() - 4usize];
8530 ["Offset of field: SDL_GamepadBinding::input_type"]
8531 [::core::mem::offset_of!(SDL_GamepadBinding, input_type) - 0usize];
8532 ["Offset of field: SDL_GamepadBinding::input"]
8533 [::core::mem::offset_of!(SDL_GamepadBinding, input) - 4usize];
8534 ["Offset of field: SDL_GamepadBinding::output_type"]
8535 [::core::mem::offset_of!(SDL_GamepadBinding, output_type) - 16usize];
8536 ["Offset of field: SDL_GamepadBinding::output"]
8537 [::core::mem::offset_of!(SDL_GamepadBinding, output) - 20usize];
8538};
8539impl Default for SDL_GamepadBinding {
8540 fn default() -> Self {
8541 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
8542 unsafe {
8543 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8544 s.assume_init()
8545 }
8546 }
8547}
8548unsafe extern "C" {
8549 #[doc = " Add support for gamepads that SDL is unaware of or change the binding of an\n existing gamepad.\n\n The mapping string has the format \"GUID,name,mapping\", where GUID is the\n string value from SDL_GUIDToString(), name is the human readable string for\n the device and mappings are gamepad mappings to joystick ones. Under\n Windows there is a reserved GUID of \"xinput\" that covers all XInput\n devices. The mapping format for joystick is:\n\n - `bX`: a joystick button, index X\n - `hX.Y`: hat X with value Y\n - `aX`: axis X of the joystick\n\n Buttons can be used as a gamepad axes and vice versa.\n\n If a device with this GUID is already plugged in, SDL will generate an\n SDL_EVENT_GAMEPAD_ADDED event.\n\n This string shows an example of a valid mapping for a gamepad:\n\n ```c\n \"341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7\"\n ```\n\n **Parameter:** mapping the mapping string.\n **Returns:** 1 if a new mapping is added, 0 if an existing mapping is updated,\n -1 on failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddGamepadMappingsFromFile\n **See Also:** SDL_AddGamepadMappingsFromIO\n **See Also:** SDL_GetGamepadMapping\n **See Also:** SDL_GetGamepadMappingForGUID\n **See Also:** SDL_HINT_GAMECONTROLLERCONFIG\n **See Also:** SDL_HINT_GAMECONTROLLERCONFIG_FILE\n **See Also:** SDL_EVENT_GAMEPAD_ADDED\n"]
8550 pub fn SDL_AddGamepadMapping(mapping: *const core::ffi::c_char) -> core::ffi::c_int;
8551}
8552unsafe extern "C" {
8553 #[doc = " Load a set of gamepad mappings from an SDL_IOStream.\n\n You can call this function several times, if needed, to load different\n database files.\n\n If a new mapping is loaded for an already known gamepad GUID, the later\n version will overwrite the one currently loaded.\n\n Any new mappings for already plugged in controllers will generate\n SDL_EVENT_GAMEPAD_ADDED events.\n\n Mappings not belonging to the current platform or with no platform field\n specified will be ignored (i.e. mappings for Linux will be ignored in\n Windows, etc).\n\n This function will load the text database entirely in memory before\n processing it, so take this into consideration if you are in a memory\n constrained environment.\n\n **Parameter:** src the data stream for the mappings to be added.\n **Parameter:** closeio if true, calls SDL_CloseIO() on `src` before returning, even\n in the case of an error.\n **Returns:** the number of mappings added or -1 on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddGamepadMapping\n **See Also:** SDL_AddGamepadMappingsFromFile\n **See Also:** SDL_GetGamepadMapping\n **See Also:** SDL_GetGamepadMappingForGUID\n **See Also:** SDL_HINT_GAMECONTROLLERCONFIG\n **See Also:** SDL_HINT_GAMECONTROLLERCONFIG_FILE\n **See Also:** SDL_EVENT_GAMEPAD_ADDED\n"]
8554 pub fn SDL_AddGamepadMappingsFromIO(src: *mut SDL_IOStream, closeio: bool) -> core::ffi::c_int;
8555}
8556unsafe extern "C" {
8557 #[doc = " Load a set of gamepad mappings from a file.\n\n You can call this function several times, if needed, to load different\n database files.\n\n If a new mapping is loaded for an already known gamepad GUID, the later\n version will overwrite the one currently loaded.\n\n Any new mappings for already plugged in controllers will generate\n SDL_EVENT_GAMEPAD_ADDED events.\n\n Mappings not belonging to the current platform or with no platform field\n specified will be ignored (i.e. mappings for Linux will be ignored in\n Windows, etc).\n\n **Parameter:** file the mappings file to load.\n **Returns:** the number of mappings added or -1 on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddGamepadMapping\n **See Also:** SDL_AddGamepadMappingsFromIO\n **See Also:** SDL_GetGamepadMapping\n **See Also:** SDL_GetGamepadMappingForGUID\n **See Also:** SDL_HINT_GAMECONTROLLERCONFIG\n **See Also:** SDL_HINT_GAMECONTROLLERCONFIG_FILE\n **See Also:** SDL_EVENT_GAMEPAD_ADDED\n"]
8558 pub fn SDL_AddGamepadMappingsFromFile(file: *const core::ffi::c_char) -> core::ffi::c_int;
8559}
8560unsafe extern "C" {
8561 #[doc = " Reinitialize the SDL mapping database to its initial state.\n\n This will generate gamepad events as needed if device mappings change.\n\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8562 pub fn SDL_ReloadGamepadMappings() -> bool;
8563}
8564unsafe extern "C" {
8565 #[doc = " Get the current gamepad mappings.\n\n **Parameter:** count a pointer filled in with the number of mappings returned, can\n be NULL.\n **Returns:** an array of the mapping strings, NULL-terminated, or NULL on\n failure; call SDL_GetError() for more information. This is a\n single allocation that should be freed with SDL_free() when it is\n no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8566 pub fn SDL_GetGamepadMappings(count: *mut core::ffi::c_int) -> *mut *mut core::ffi::c_char;
8567}
8568unsafe extern "C" {
8569 #[doc = " Get the gamepad mapping string for a given GUID.\n\n **Parameter:** guid a structure containing the GUID for which a mapping is desired.\n **Returns:** a mapping string or NULL on failure; call SDL_GetError() for more\n information. This should be freed with SDL_free() when it is no\n longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoystickGUIDForID\n **See Also:** SDL_GetJoystickGUID\n"]
8570 pub fn SDL_GetGamepadMappingForGUID(guid: SDL_GUID) -> *mut core::ffi::c_char;
8571}
8572unsafe extern "C" {
8573 #[doc = " Get the current mapping of a gamepad.\n\n Details about mappings are discussed with SDL_AddGamepadMapping().\n\n **Parameter:** gamepad the gamepad you want to get the current mapping for.\n **Returns:** a string that has the gamepad's mapping or NULL if no mapping is\n available; call SDL_GetError() for more information. This should\n be freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddGamepadMapping\n **See Also:** SDL_GetGamepadMappingForID\n **See Also:** SDL_GetGamepadMappingForGUID\n **See Also:** SDL_SetGamepadMapping\n"]
8574 pub fn SDL_GetGamepadMapping(gamepad: *mut SDL_Gamepad) -> *mut core::ffi::c_char;
8575}
8576unsafe extern "C" {
8577 #[doc = " Set the current mapping of a joystick or gamepad.\n\n Details about mappings are discussed with SDL_AddGamepadMapping().\n\n **Parameter:** instance_id the joystick instance ID.\n **Parameter:** mapping the mapping to use for this device, or NULL to clear the\n mapping.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddGamepadMapping\n **See Also:** SDL_GetGamepadMapping\n"]
8578 pub fn SDL_SetGamepadMapping(
8579 instance_id: SDL_JoystickID,
8580 mapping: *const core::ffi::c_char,
8581 ) -> bool;
8582}
8583unsafe extern "C" {
8584 #[doc = " Return whether a gamepad is currently connected.\n\n **Returns:** true if a gamepad is connected, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepads\n"]
8585 pub fn SDL_HasGamepad() -> bool;
8586}
8587unsafe extern "C" {
8588 #[doc = " Get a list of currently connected gamepads.\n\n **Parameter:** count a pointer filled in with the number of gamepads returned, may\n be NULL.\n **Returns:** a 0 terminated array of joystick instance IDs or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasGamepad\n **See Also:** SDL_OpenGamepad\n"]
8589 pub fn SDL_GetGamepads(count: *mut core::ffi::c_int) -> *mut SDL_JoystickID;
8590}
8591unsafe extern "C" {
8592 #[doc = " Check if the given joystick is supported by the gamepad interface.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** true if the given joystick is supported by the gamepad interface,\n false if it isn't or it's an invalid index.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetJoysticks\n **See Also:** SDL_OpenGamepad\n"]
8593 pub fn SDL_IsGamepad(instance_id: SDL_JoystickID) -> bool;
8594}
8595unsafe extern "C" {
8596 #[doc = " Get the implementation dependent name of a gamepad.\n\n This can be called before any gamepads are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the name of the selected gamepad. If no name can be found, this\n function returns NULL; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadName\n **See Also:** SDL_GetGamepads\n"]
8597 pub fn SDL_GetGamepadNameForID(instance_id: SDL_JoystickID) -> *const core::ffi::c_char;
8598}
8599unsafe extern "C" {
8600 #[doc = " Get the implementation dependent path of a gamepad.\n\n This can be called before any gamepads are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the path of the selected gamepad. If no path can be found, this\n function returns NULL; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadPath\n **See Also:** SDL_GetGamepads\n"]
8601 pub fn SDL_GetGamepadPathForID(instance_id: SDL_JoystickID) -> *const core::ffi::c_char;
8602}
8603unsafe extern "C" {
8604 #[doc = " Get the player index of a gamepad.\n\n This can be called before any gamepads are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the player index of a gamepad, or -1 if it's not available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadPlayerIndex\n **See Also:** SDL_GetGamepads\n"]
8605 pub fn SDL_GetGamepadPlayerIndexForID(instance_id: SDL_JoystickID) -> core::ffi::c_int;
8606}
8607unsafe extern "C" {
8608 #[doc = " Get the implementation-dependent GUID of a gamepad.\n\n This can be called before any gamepads are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the GUID of the selected gamepad. If called on an invalid index,\n this function returns a zero GUID.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GUIDToString\n **See Also:** SDL_GetGamepads\n"]
8609 pub fn SDL_GetGamepadGUIDForID(instance_id: SDL_JoystickID) -> SDL_GUID;
8610}
8611unsafe extern "C" {
8612 #[doc = " Get the USB vendor ID of a gamepad, if available.\n\n This can be called before any gamepads are opened. If the vendor ID isn't\n available this function returns 0.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the USB vendor ID of the selected gamepad. If called on an invalid\n index, this function returns zero.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadVendor\n **See Also:** SDL_GetGamepads\n"]
8613 pub fn SDL_GetGamepadVendorForID(instance_id: SDL_JoystickID) -> Uint16;
8614}
8615unsafe extern "C" {
8616 #[doc = " Get the USB product ID of a gamepad, if available.\n\n This can be called before any gamepads are opened. If the product ID isn't\n available this function returns 0.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the USB product ID of the selected gamepad. If called on an\n invalid index, this function returns zero.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadProduct\n **See Also:** SDL_GetGamepads\n"]
8617 pub fn SDL_GetGamepadProductForID(instance_id: SDL_JoystickID) -> Uint16;
8618}
8619unsafe extern "C" {
8620 #[doc = " Get the product version of a gamepad, if available.\n\n This can be called before any gamepads are opened. If the product version\n isn't available this function returns 0.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the product version of the selected gamepad. If called on an\n invalid index, this function returns zero.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadProductVersion\n **See Also:** SDL_GetGamepads\n"]
8621 pub fn SDL_GetGamepadProductVersionForID(instance_id: SDL_JoystickID) -> Uint16;
8622}
8623unsafe extern "C" {
8624 #[doc = " Get the type of a gamepad.\n\n This can be called before any gamepads are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the gamepad type.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadType\n **See Also:** SDL_GetGamepads\n **See Also:** SDL_GetRealGamepadTypeForID\n"]
8625 pub fn SDL_GetGamepadTypeForID(instance_id: SDL_JoystickID) -> SDL_GamepadType;
8626}
8627unsafe extern "C" {
8628 #[doc = " Get the type of a gamepad, ignoring any mapping override.\n\n This can be called before any gamepads are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the gamepad type.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadTypeForID\n **See Also:** SDL_GetGamepads\n **See Also:** SDL_GetRealGamepadType\n"]
8629 pub fn SDL_GetRealGamepadTypeForID(instance_id: SDL_JoystickID) -> SDL_GamepadType;
8630}
8631unsafe extern "C" {
8632 #[doc = " Get the mapping of a gamepad.\n\n This can be called before any gamepads are opened.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** the mapping string. Returns NULL if no mapping is available. This\n should be freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepads\n **See Also:** SDL_GetGamepadMapping\n"]
8633 pub fn SDL_GetGamepadMappingForID(instance_id: SDL_JoystickID) -> *mut core::ffi::c_char;
8634}
8635unsafe extern "C" {
8636 #[doc = " Open a gamepad for use.\n\n **Parameter:** instance_id the joystick instance ID.\n **Returns:** a gamepad identifier or NULL if an error occurred; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseGamepad\n **See Also:** SDL_IsGamepad\n"]
8637 pub fn SDL_OpenGamepad(instance_id: SDL_JoystickID) -> *mut SDL_Gamepad;
8638}
8639unsafe extern "C" {
8640 #[doc = " Get the SDL_Gamepad associated with a joystick instance ID, if it has been\n opened.\n\n **Parameter:** instance_id the joystick instance ID of the gamepad.\n **Returns:** an SDL_Gamepad on success or NULL on failure or if it hasn't been\n opened yet; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8641 pub fn SDL_GetGamepadFromID(instance_id: SDL_JoystickID) -> *mut SDL_Gamepad;
8642}
8643unsafe extern "C" {
8644 #[doc = " Get the SDL_Gamepad associated with a player index.\n\n **Parameter:** player_index the player index, which different from the instance ID.\n **Returns:** the SDL_Gamepad associated with a player index.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadPlayerIndex\n **See Also:** SDL_SetGamepadPlayerIndex\n"]
8645 pub fn SDL_GetGamepadFromPlayerIndex(player_index: core::ffi::c_int) -> *mut SDL_Gamepad;
8646}
8647unsafe extern "C" {
8648 #[doc = " Get the properties associated with an opened gamepad.\n\n These properties are shared with the underlying joystick object.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN`: true if this gamepad has an LED\n that has adjustable brightness\n - `SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN`: true if this gamepad has an LED\n that has adjustable color\n - `SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN`: true if this gamepad has a\n player LED\n - `SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN`: true if this gamepad has\n left/right rumble\n - `SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN`: true if this gamepad has\n simple trigger rumble\n\n **Parameter:** gamepad a gamepad identifier previously returned by\n SDL_OpenGamepad().\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8649 pub fn SDL_GetGamepadProperties(gamepad: *mut SDL_Gamepad) -> SDL_PropertiesID;
8650}
8651unsafe extern "C" {
8652 #[doc = " Get the instance ID of an opened gamepad.\n\n **Parameter:** gamepad a gamepad identifier previously returned by\n SDL_OpenGamepad().\n **Returns:** the instance ID of the specified gamepad on success or 0 on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8653 pub fn SDL_GetGamepadID(gamepad: *mut SDL_Gamepad) -> SDL_JoystickID;
8654}
8655unsafe extern "C" {
8656 #[doc = " Get the implementation-dependent name for an opened gamepad.\n\n **Parameter:** gamepad a gamepad identifier previously returned by\n SDL_OpenGamepad().\n **Returns:** the implementation dependent name for the gamepad, or NULL if\n there is no name or the identifier passed is invalid.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadNameForID\n"]
8657 pub fn SDL_GetGamepadName(gamepad: *mut SDL_Gamepad) -> *const core::ffi::c_char;
8658}
8659unsafe extern "C" {
8660 #[doc = " Get the implementation-dependent path for an opened gamepad.\n\n **Parameter:** gamepad a gamepad identifier previously returned by\n SDL_OpenGamepad().\n **Returns:** the implementation dependent path for the gamepad, or NULL if\n there is no path or the identifier passed is invalid.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadPathForID\n"]
8661 pub fn SDL_GetGamepadPath(gamepad: *mut SDL_Gamepad) -> *const core::ffi::c_char;
8662}
8663unsafe extern "C" {
8664 #[doc = " Get the type of an opened gamepad.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not\n available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadTypeForID\n"]
8665 pub fn SDL_GetGamepadType(gamepad: *mut SDL_Gamepad) -> SDL_GamepadType;
8666}
8667unsafe extern "C" {
8668 #[doc = " Get the type of an opened gamepad, ignoring any mapping override.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the gamepad type, or SDL_GAMEPAD_TYPE_UNKNOWN if it's not\n available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRealGamepadTypeForID\n"]
8669 pub fn SDL_GetRealGamepadType(gamepad: *mut SDL_Gamepad) -> SDL_GamepadType;
8670}
8671unsafe extern "C" {
8672 #[doc = " Get the player index of an opened gamepad.\n\n For XInput gamepads this returns the XInput user index.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the player index for gamepad, or -1 if it's not available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetGamepadPlayerIndex\n"]
8673 pub fn SDL_GetGamepadPlayerIndex(gamepad: *mut SDL_Gamepad) -> core::ffi::c_int;
8674}
8675unsafe extern "C" {
8676 #[doc = " Set the player index of an opened gamepad.\n\n **Parameter:** gamepad the gamepad object to adjust.\n **Parameter:** player_index player index to assign to this gamepad, or -1 to clear\n the player index and turn off player LEDs.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadPlayerIndex\n"]
8677 pub fn SDL_SetGamepadPlayerIndex(
8678 gamepad: *mut SDL_Gamepad,
8679 player_index: core::ffi::c_int,
8680 ) -> bool;
8681}
8682unsafe extern "C" {
8683 #[doc = " Get the USB vendor ID of an opened gamepad, if available.\n\n If the vendor ID isn't available this function returns 0.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the USB vendor ID, or zero if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadVendorForID\n"]
8684 pub fn SDL_GetGamepadVendor(gamepad: *mut SDL_Gamepad) -> Uint16;
8685}
8686unsafe extern "C" {
8687 #[doc = " Get the USB product ID of an opened gamepad, if available.\n\n If the product ID isn't available this function returns 0.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the USB product ID, or zero if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadProductForID\n"]
8688 pub fn SDL_GetGamepadProduct(gamepad: *mut SDL_Gamepad) -> Uint16;
8689}
8690unsafe extern "C" {
8691 #[doc = " Get the product version of an opened gamepad, if available.\n\n If the product version isn't available this function returns 0.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the USB product version, or zero if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadProductVersionForID\n"]
8692 pub fn SDL_GetGamepadProductVersion(gamepad: *mut SDL_Gamepad) -> Uint16;
8693}
8694unsafe extern "C" {
8695 #[doc = " Get the firmware version of an opened gamepad, if available.\n\n If the firmware version isn't available this function returns 0.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the gamepad firmware version, or zero if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8696 pub fn SDL_GetGamepadFirmwareVersion(gamepad: *mut SDL_Gamepad) -> Uint16;
8697}
8698unsafe extern "C" {
8699 #[doc = " Get the serial number of an opened gamepad, if available.\n\n Returns the serial number of the gamepad, or NULL if it is not available.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the serial number, or NULL if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8700 pub fn SDL_GetGamepadSerial(gamepad: *mut SDL_Gamepad) -> *const core::ffi::c_char;
8701}
8702unsafe extern "C" {
8703 #[doc = " Get the Steam Input handle of an opened gamepad, if available.\n\n Returns an InputHandle_t for the gamepad that can be used with Steam Input\n API: https://partner.steamgames.com/doc/api/ISteamInput\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the gamepad handle, or 0 if unavailable.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8704 pub fn SDL_GetGamepadSteamHandle(gamepad: *mut SDL_Gamepad) -> Uint64;
8705}
8706unsafe extern "C" {
8707 #[doc = " Get the connection state of a gamepad.\n\n **Parameter:** gamepad the gamepad object to query.\n **Returns:** the connection state on success or\n `SDL_JOYSTICK_CONNECTION_INVALID` on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8708 pub fn SDL_GetGamepadConnectionState(gamepad: *mut SDL_Gamepad) -> SDL_JoystickConnectionState;
8709}
8710unsafe extern "C" {
8711 #[doc = " Get the battery state of a gamepad.\n\n You should never take a battery status as absolute truth. Batteries\n (especially failing batteries) are delicate hardware, and the values\n reported here are best estimates based on what that hardware reports. It's\n not uncommon for older batteries to lose stored power much faster than it\n reports, or completely drain when reporting it has 20 percent left, etc.\n\n **Parameter:** gamepad the gamepad object to query.\n **Parameter:** percent a pointer filled in with the percentage of battery life\n left, between 0 and 100, or NULL to ignore. This will be\n filled in with -1 we can't determine a value or there is no\n battery.\n **Returns:** the current battery state.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8712 pub fn SDL_GetGamepadPowerInfo(
8713 gamepad: *mut SDL_Gamepad,
8714 percent: *mut core::ffi::c_int,
8715 ) -> SDL_PowerState;
8716}
8717unsafe extern "C" {
8718 #[doc = " Check if a gamepad has been opened and is currently connected.\n\n **Parameter:** gamepad a gamepad identifier previously returned by\n SDL_OpenGamepad().\n **Returns:** true if the gamepad has been opened and is currently connected, or\n false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8719 pub fn SDL_GamepadConnected(gamepad: *mut SDL_Gamepad) -> bool;
8720}
8721unsafe extern "C" {
8722 #[doc = " Get the underlying joystick from a gamepad.\n\n This function will give you a SDL_Joystick object, which allows you to use\n the SDL_Joystick functions with a SDL_Gamepad object. This would be useful\n for getting a joystick's position at any given time, even if it hasn't\n moved (moving it would produce an event, which would have the axis' value).\n\n The pointer returned is owned by the SDL_Gamepad. You should not call\n SDL_CloseJoystick() on it, for example, since doing so will likely cause\n SDL to crash.\n\n **Parameter:** gamepad the gamepad object that you want to get a joystick from.\n **Returns:** an SDL_Joystick object, or NULL on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8723 pub fn SDL_GetGamepadJoystick(gamepad: *mut SDL_Gamepad) -> *mut SDL_Joystick;
8724}
8725unsafe extern "C" {
8726 #[doc = " Set the state of gamepad event processing.\n\n If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself\n and check the state of the gamepad when you want gamepad information.\n\n **Parameter:** enabled whether to process gamepad events or not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GamepadEventsEnabled\n **See Also:** SDL_UpdateGamepads\n"]
8727 pub fn SDL_SetGamepadEventsEnabled(enabled: bool);
8728}
8729unsafe extern "C" {
8730 #[doc = " Query the state of gamepad event processing.\n\n If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself\n and check the state of the gamepad when you want gamepad information.\n\n **Returns:** true if gamepad events are being processed, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetGamepadEventsEnabled\n"]
8731 pub fn SDL_GamepadEventsEnabled() -> bool;
8732}
8733unsafe extern "C" {
8734 #[doc = " Get the SDL joystick layer bindings for a gamepad.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** count a pointer filled in with the number of bindings returned.\n **Returns:** a NULL terminated array of pointers to bindings or NULL on\n failure; call SDL_GetError() for more information. This is a\n single allocation that should be freed with SDL_free() when it is\n no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8735 pub fn SDL_GetGamepadBindings(
8736 gamepad: *mut SDL_Gamepad,
8737 count: *mut core::ffi::c_int,
8738 ) -> *mut *mut SDL_GamepadBinding;
8739}
8740unsafe extern "C" {
8741 #[doc = " Manually pump gamepad updates if not using the loop.\n\n This function is called automatically by the event loop if events are\n enabled. Under such circumstances, it will not be necessary to call this\n function.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8742 pub fn SDL_UpdateGamepads();
8743}
8744unsafe extern "C" {
8745 #[doc = " Convert a string into SDL_GamepadType enum.\n\n This function is called internally to translate SDL_Gamepad mapping strings\n for the underlying joystick device into the consistent SDL_Gamepad mapping.\n You do not normally need to call this function unless you are parsing\n SDL_Gamepad mappings in your own code.\n\n **Parameter:** str string representing a SDL_GamepadType type.\n **Returns:** the SDL_GamepadType enum corresponding to the input string, or\n `SDL_GAMEPAD_TYPE_UNKNOWN` if no match was found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadStringForType\n"]
8746 pub fn SDL_GetGamepadTypeFromString(str_: *const core::ffi::c_char) -> SDL_GamepadType;
8747}
8748unsafe extern "C" {
8749 #[doc = " Convert from an SDL_GamepadType enum to a string.\n\n **Parameter:** type an enum value for a given SDL_GamepadType.\n **Returns:** a string for the given type, or NULL if an invalid type is\n specified. The string returned is of the format used by\n SDL_Gamepad mapping strings.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadTypeFromString\n"]
8750 pub fn SDL_GetGamepadStringForType(type_: SDL_GamepadType) -> *const core::ffi::c_char;
8751}
8752unsafe extern "C" {
8753 #[doc = " Convert a string into SDL_GamepadAxis enum.\n\n This function is called internally to translate SDL_Gamepad mapping strings\n for the underlying joystick device into the consistent SDL_Gamepad mapping.\n You do not normally need to call this function unless you are parsing\n SDL_Gamepad mappings in your own code.\n\n Note specially that \"righttrigger\" and \"lefttrigger\" map to\n `SDL_GAMEPAD_AXIS_RIGHT_TRIGGER` and `SDL_GAMEPAD_AXIS_LEFT_TRIGGER`,\n respectively.\n\n **Parameter:** str string representing a SDL_Gamepad axis.\n **Returns:** the SDL_GamepadAxis enum corresponding to the input string, or\n `SDL_GAMEPAD_AXIS_INVALID` if no match was found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadStringForAxis\n"]
8754 pub fn SDL_GetGamepadAxisFromString(str_: *const core::ffi::c_char) -> SDL_GamepadAxis;
8755}
8756unsafe extern "C" {
8757 #[doc = " Convert from an SDL_GamepadAxis enum to a string.\n\n **Parameter:** axis an enum value for a given SDL_GamepadAxis.\n **Returns:** a string for the given axis, or NULL if an invalid axis is\n specified. The string returned is of the format used by\n SDL_Gamepad mapping strings.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadAxisFromString\n"]
8758 pub fn SDL_GetGamepadStringForAxis(axis: SDL_GamepadAxis) -> *const core::ffi::c_char;
8759}
8760unsafe extern "C" {
8761 #[doc = " Query whether a gamepad has a given axis.\n\n This merely reports whether the gamepad's mapping defined this axis, as\n that is all the information SDL has about the physical device.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** axis an axis enum value (an SDL_GamepadAxis value).\n **Returns:** true if the gamepad has this axis, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GamepadHasButton\n **See Also:** SDL_GetGamepadAxis\n"]
8762 pub fn SDL_GamepadHasAxis(gamepad: *mut SDL_Gamepad, axis: SDL_GamepadAxis) -> bool;
8763}
8764unsafe extern "C" {
8765 #[doc = " Get the current state of an axis control on a gamepad.\n\n The axis indices start at index 0.\n\n For thumbsticks, the state is a value ranging from -32768 (up/left) to\n 32767 (down/right).\n\n Triggers range from 0 when released to 32767 when fully pressed, and never\n return a negative value. Note that this differs from the value reported by\n the lower-level SDL_GetJoystickAxis(), which normally uses the full range.\n\n Note that for invalid gamepads or axes, this will return 0. Zero is also a\n valid value in normal operation; usually it means a centered axis.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** axis an axis index (one of the SDL_GamepadAxis values).\n **Returns:** axis state.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GamepadHasAxis\n **See Also:** SDL_GetGamepadButton\n"]
8766 pub fn SDL_GetGamepadAxis(gamepad: *mut SDL_Gamepad, axis: SDL_GamepadAxis) -> Sint16;
8767}
8768unsafe extern "C" {
8769 #[doc = " Convert a string into an SDL_GamepadButton enum.\n\n This function is called internally to translate SDL_Gamepad mapping strings\n for the underlying joystick device into the consistent SDL_Gamepad mapping.\n You do not normally need to call this function unless you are parsing\n SDL_Gamepad mappings in your own code.\n\n **Parameter:** str string representing a SDL_Gamepad button.\n **Returns:** the SDL_GamepadButton enum corresponding to the input string, or\n `SDL_GAMEPAD_BUTTON_INVALID` if no match was found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadStringForButton\n"]
8770 pub fn SDL_GetGamepadButtonFromString(str_: *const core::ffi::c_char) -> SDL_GamepadButton;
8771}
8772unsafe extern "C" {
8773 #[doc = " Convert from an SDL_GamepadButton enum to a string.\n\n **Parameter:** button an enum value for a given SDL_GamepadButton.\n **Returns:** a string for the given button, or NULL if an invalid button is\n specified. The string returned is of the format used by\n SDL_Gamepad mapping strings.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadButtonFromString\n"]
8774 pub fn SDL_GetGamepadStringForButton(button: SDL_GamepadButton) -> *const core::ffi::c_char;
8775}
8776unsafe extern "C" {
8777 #[doc = " Query whether a gamepad has a given button.\n\n This merely reports whether the gamepad's mapping defined this button, as\n that is all the information SDL has about the physical device.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** button a button enum value (an SDL_GamepadButton value).\n **Returns:** true if the gamepad has this button, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GamepadHasAxis\n"]
8778 pub fn SDL_GamepadHasButton(gamepad: *mut SDL_Gamepad, button: SDL_GamepadButton) -> bool;
8779}
8780unsafe extern "C" {
8781 #[doc = " Get the current state of a button on a gamepad.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** button a button index (one of the SDL_GamepadButton values).\n **Returns:** true if the button is pressed, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GamepadHasButton\n **See Also:** SDL_GetGamepadAxis\n"]
8782 pub fn SDL_GetGamepadButton(gamepad: *mut SDL_Gamepad, button: SDL_GamepadButton) -> bool;
8783}
8784unsafe extern "C" {
8785 #[doc = " Get the label of a button on a gamepad.\n\n **Parameter:** type the type of gamepad to check.\n **Parameter:** button a button index (one of the SDL_GamepadButton values).\n **Returns:** the SDL_GamepadButtonLabel enum corresponding to the button label.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadButtonLabel\n"]
8786 pub fn SDL_GetGamepadButtonLabelForType(
8787 type_: SDL_GamepadType,
8788 button: SDL_GamepadButton,
8789 ) -> SDL_GamepadButtonLabel;
8790}
8791unsafe extern "C" {
8792 #[doc = " Get the label of a button on a gamepad.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** button a button index (one of the SDL_GamepadButton values).\n **Returns:** the SDL_GamepadButtonLabel enum corresponding to the button label.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadButtonLabelForType\n"]
8793 pub fn SDL_GetGamepadButtonLabel(
8794 gamepad: *mut SDL_Gamepad,
8795 button: SDL_GamepadButton,
8796 ) -> SDL_GamepadButtonLabel;
8797}
8798unsafe extern "C" {
8799 #[doc = " Get the number of touchpads on a gamepad.\n\n **Parameter:** gamepad a gamepad.\n **Returns:** number of touchpads.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumGamepadTouchpadFingers\n"]
8800 pub fn SDL_GetNumGamepadTouchpads(gamepad: *mut SDL_Gamepad) -> core::ffi::c_int;
8801}
8802unsafe extern "C" {
8803 #[doc = " Get the number of supported simultaneous fingers on a touchpad on a game\n gamepad.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** touchpad a touchpad.\n **Returns:** number of supported simultaneous fingers.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadTouchpadFinger\n **See Also:** SDL_GetNumGamepadTouchpads\n"]
8804 pub fn SDL_GetNumGamepadTouchpadFingers(
8805 gamepad: *mut SDL_Gamepad,
8806 touchpad: core::ffi::c_int,
8807 ) -> core::ffi::c_int;
8808}
8809unsafe extern "C" {
8810 #[doc = " Get the current state of a finger on a touchpad on a gamepad.\n\n **Parameter:** gamepad a gamepad.\n **Parameter:** touchpad a touchpad.\n **Parameter:** finger a finger.\n **Parameter:** down a pointer filled with true if the finger is down, false\n otherwise, may be NULL.\n **Parameter:** x a pointer filled with the x position, normalized 0 to 1, with the\n origin in the upper left, may be NULL.\n **Parameter:** y a pointer filled with the y position, normalized 0 to 1, with the\n origin in the upper left, may be NULL.\n **Parameter:** pressure a pointer filled with pressure value, may be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumGamepadTouchpadFingers\n"]
8811 pub fn SDL_GetGamepadTouchpadFinger(
8812 gamepad: *mut SDL_Gamepad,
8813 touchpad: core::ffi::c_int,
8814 finger: core::ffi::c_int,
8815 down: *mut bool,
8816 x: *mut f32,
8817 y: *mut f32,
8818 pressure: *mut f32,
8819 ) -> bool;
8820}
8821unsafe extern "C" {
8822 #[doc = " Return whether a gamepad has a particular sensor.\n\n **Parameter:** gamepad the gamepad to query.\n **Parameter:** type the type of sensor to query.\n **Returns:** true if the sensor exists, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadSensorData\n **See Also:** SDL_GetGamepadSensorDataRate\n **See Also:** SDL_SetGamepadSensorEnabled\n"]
8823 pub fn SDL_GamepadHasSensor(gamepad: *mut SDL_Gamepad, type_: SDL_SensorType) -> bool;
8824}
8825unsafe extern "C" {
8826 #[doc = " Set whether data reporting for a gamepad sensor is enabled.\n\n **Parameter:** gamepad the gamepad to update.\n **Parameter:** type the type of sensor to enable/disable.\n **Parameter:** enabled whether data reporting should be enabled.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GamepadHasSensor\n **See Also:** SDL_GamepadSensorEnabled\n"]
8827 pub fn SDL_SetGamepadSensorEnabled(
8828 gamepad: *mut SDL_Gamepad,
8829 type_: SDL_SensorType,
8830 enabled: bool,
8831 ) -> bool;
8832}
8833unsafe extern "C" {
8834 #[doc = " Query whether sensor data reporting is enabled for a gamepad.\n\n **Parameter:** gamepad the gamepad to query.\n **Parameter:** type the type of sensor to query.\n **Returns:** true if the sensor is enabled, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetGamepadSensorEnabled\n"]
8835 pub fn SDL_GamepadSensorEnabled(gamepad: *mut SDL_Gamepad, type_: SDL_SensorType) -> bool;
8836}
8837unsafe extern "C" {
8838 #[doc = " Get the data rate (number of events per second) of a gamepad sensor.\n\n **Parameter:** gamepad the gamepad to query.\n **Parameter:** type the type of sensor to query.\n **Returns:** the data rate, or 0.0f if the data rate is not available.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8839 pub fn SDL_GetGamepadSensorDataRate(gamepad: *mut SDL_Gamepad, type_: SDL_SensorType) -> f32;
8840}
8841unsafe extern "C" {
8842 #[doc = " Get the current state of a gamepad sensor.\n\n The number of values and interpretation of the data is sensor dependent.\n See the remarks in SDL_SensorType for details for each type of sensor.\n\n **Parameter:** gamepad the gamepad to query.\n **Parameter:** type the type of sensor to query.\n **Parameter:** data a pointer filled with the current sensor state.\n **Parameter:** num_values the number of values to write to data.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8843 pub fn SDL_GetGamepadSensorData(
8844 gamepad: *mut SDL_Gamepad,
8845 type_: SDL_SensorType,
8846 data: *mut f32,
8847 num_values: core::ffi::c_int,
8848 ) -> bool;
8849}
8850unsafe extern "C" {
8851 #[doc = " Start a rumble effect on a gamepad.\n\n Each call to this function cancels any previous rumble effect, and calling\n it with 0 intensity stops any rumbling.\n\n This function requires you to process SDL events or call\n SDL_UpdateJoysticks() to update rumble state.\n\n **Parameter:** gamepad the gamepad to vibrate.\n **Parameter:** low_frequency_rumble the intensity of the low frequency (left)\n rumble motor, from 0 to 0xFFFF.\n **Parameter:** high_frequency_rumble the intensity of the high frequency (right)\n rumble motor, from 0 to 0xFFFF.\n **Parameter:** duration_ms the duration of the rumble effect, in milliseconds.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8852 pub fn SDL_RumbleGamepad(
8853 gamepad: *mut SDL_Gamepad,
8854 low_frequency_rumble: Uint16,
8855 high_frequency_rumble: Uint16,
8856 duration_ms: Uint32,
8857 ) -> bool;
8858}
8859unsafe extern "C" {
8860 #[doc = " Start a rumble effect in the gamepad's triggers.\n\n Each call to this function cancels any previous trigger rumble effect, and\n calling it with 0 intensity stops any rumbling.\n\n Note that this is rumbling of the _triggers_ and not the gamepad as a\n whole. This is currently only supported on Xbox One gamepads. If you want\n the (more common) whole-gamepad rumble, use SDL_RumbleGamepad() instead.\n\n This function requires you to process SDL events or call\n SDL_UpdateJoysticks() to update rumble state.\n\n **Parameter:** gamepad the gamepad to vibrate.\n **Parameter:** left_rumble the intensity of the left trigger rumble motor, from 0\n to 0xFFFF.\n **Parameter:** right_rumble the intensity of the right trigger rumble motor, from 0\n to 0xFFFF.\n **Parameter:** duration_ms the duration of the rumble effect, in milliseconds.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RumbleGamepad\n"]
8861 pub fn SDL_RumbleGamepadTriggers(
8862 gamepad: *mut SDL_Gamepad,
8863 left_rumble: Uint16,
8864 right_rumble: Uint16,
8865 duration_ms: Uint32,
8866 ) -> bool;
8867}
8868unsafe extern "C" {
8869 #[doc = " Update a gamepad's LED color.\n\n An example of a joystick LED is the light on the back of a PlayStation 4's\n DualShock 4 controller.\n\n For gamepads with a single color LED, the maximum of the RGB values will be\n used as the LED brightness.\n\n **Parameter:** gamepad the gamepad to update.\n **Parameter:** red the intensity of the red LED.\n **Parameter:** green the intensity of the green LED.\n **Parameter:** blue the intensity of the blue LED.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8870 pub fn SDL_SetGamepadLED(
8871 gamepad: *mut SDL_Gamepad,
8872 red: Uint8,
8873 green: Uint8,
8874 blue: Uint8,
8875 ) -> bool;
8876}
8877unsafe extern "C" {
8878 #[doc = " Send a gamepad specific effect packet.\n\n **Parameter:** gamepad the gamepad to affect.\n **Parameter:** data the data to send to the gamepad.\n **Parameter:** size the size of the data to send to the gamepad.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
8879 pub fn SDL_SendGamepadEffect(
8880 gamepad: *mut SDL_Gamepad,
8881 data: *const core::ffi::c_void,
8882 size: core::ffi::c_int,
8883 ) -> bool;
8884}
8885unsafe extern "C" {
8886 #[doc = " Close a gamepad previously opened with SDL_OpenGamepad().\n\n **Parameter:** gamepad a gamepad identifier previously returned by\n SDL_OpenGamepad().\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenGamepad\n"]
8887 pub fn SDL_CloseGamepad(gamepad: *mut SDL_Gamepad);
8888}
8889unsafe extern "C" {
8890 #[doc = " Return the sfSymbolsName for a given button on a gamepad on Apple\n platforms.\n\n **Parameter:** gamepad the gamepad to query.\n **Parameter:** button a button on the gamepad.\n **Returns:** the sfSymbolsName or NULL if the name can't be found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadAppleSFSymbolsNameForAxis\n"]
8891 pub fn SDL_GetGamepadAppleSFSymbolsNameForButton(
8892 gamepad: *mut SDL_Gamepad,
8893 button: SDL_GamepadButton,
8894 ) -> *const core::ffi::c_char;
8895}
8896unsafe extern "C" {
8897 #[doc = " Return the sfSymbolsName for a given axis on a gamepad on Apple platforms.\n\n **Parameter:** gamepad the gamepad to query.\n **Parameter:** axis an axis on the gamepad.\n **Returns:** the sfSymbolsName or NULL if the name can't be found.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGamepadAppleSFSymbolsNameForButton\n"]
8898 pub fn SDL_GetGamepadAppleSFSymbolsNameForAxis(
8899 gamepad: *mut SDL_Gamepad,
8900 axis: SDL_GamepadAxis,
8901 ) -> *const core::ffi::c_char;
8902}
8903impl SDL_Scancode {
8904 pub const SDL_SCANCODE_UNKNOWN: SDL_Scancode = SDL_Scancode(0);
8905 pub const SDL_SCANCODE_A: SDL_Scancode = SDL_Scancode(4);
8906 pub const SDL_SCANCODE_B: SDL_Scancode = SDL_Scancode(5);
8907 pub const SDL_SCANCODE_C: SDL_Scancode = SDL_Scancode(6);
8908 pub const SDL_SCANCODE_D: SDL_Scancode = SDL_Scancode(7);
8909 pub const SDL_SCANCODE_E: SDL_Scancode = SDL_Scancode(8);
8910 pub const SDL_SCANCODE_F: SDL_Scancode = SDL_Scancode(9);
8911 pub const SDL_SCANCODE_G: SDL_Scancode = SDL_Scancode(10);
8912 pub const SDL_SCANCODE_H: SDL_Scancode = SDL_Scancode(11);
8913 pub const SDL_SCANCODE_I: SDL_Scancode = SDL_Scancode(12);
8914 pub const SDL_SCANCODE_J: SDL_Scancode = SDL_Scancode(13);
8915 pub const SDL_SCANCODE_K: SDL_Scancode = SDL_Scancode(14);
8916 pub const SDL_SCANCODE_L: SDL_Scancode = SDL_Scancode(15);
8917 pub const SDL_SCANCODE_M: SDL_Scancode = SDL_Scancode(16);
8918 pub const SDL_SCANCODE_N: SDL_Scancode = SDL_Scancode(17);
8919 pub const SDL_SCANCODE_O: SDL_Scancode = SDL_Scancode(18);
8920 pub const SDL_SCANCODE_P: SDL_Scancode = SDL_Scancode(19);
8921 pub const SDL_SCANCODE_Q: SDL_Scancode = SDL_Scancode(20);
8922 pub const SDL_SCANCODE_R: SDL_Scancode = SDL_Scancode(21);
8923 pub const SDL_SCANCODE_S: SDL_Scancode = SDL_Scancode(22);
8924 pub const SDL_SCANCODE_T: SDL_Scancode = SDL_Scancode(23);
8925 pub const SDL_SCANCODE_U: SDL_Scancode = SDL_Scancode(24);
8926 pub const SDL_SCANCODE_V: SDL_Scancode = SDL_Scancode(25);
8927 pub const SDL_SCANCODE_W: SDL_Scancode = SDL_Scancode(26);
8928 pub const SDL_SCANCODE_X: SDL_Scancode = SDL_Scancode(27);
8929 pub const SDL_SCANCODE_Y: SDL_Scancode = SDL_Scancode(28);
8930 pub const SDL_SCANCODE_Z: SDL_Scancode = SDL_Scancode(29);
8931 pub const SDL_SCANCODE_1: SDL_Scancode = SDL_Scancode(30);
8932 pub const SDL_SCANCODE_2: SDL_Scancode = SDL_Scancode(31);
8933 pub const SDL_SCANCODE_3: SDL_Scancode = SDL_Scancode(32);
8934 pub const SDL_SCANCODE_4: SDL_Scancode = SDL_Scancode(33);
8935 pub const SDL_SCANCODE_5: SDL_Scancode = SDL_Scancode(34);
8936 pub const SDL_SCANCODE_6: SDL_Scancode = SDL_Scancode(35);
8937 pub const SDL_SCANCODE_7: SDL_Scancode = SDL_Scancode(36);
8938 pub const SDL_SCANCODE_8: SDL_Scancode = SDL_Scancode(37);
8939 pub const SDL_SCANCODE_9: SDL_Scancode = SDL_Scancode(38);
8940 pub const SDL_SCANCODE_0: SDL_Scancode = SDL_Scancode(39);
8941 pub const SDL_SCANCODE_RETURN: SDL_Scancode = SDL_Scancode(40);
8942 pub const SDL_SCANCODE_ESCAPE: SDL_Scancode = SDL_Scancode(41);
8943 pub const SDL_SCANCODE_BACKSPACE: SDL_Scancode = SDL_Scancode(42);
8944 pub const SDL_SCANCODE_TAB: SDL_Scancode = SDL_Scancode(43);
8945 pub const SDL_SCANCODE_SPACE: SDL_Scancode = SDL_Scancode(44);
8946 pub const SDL_SCANCODE_MINUS: SDL_Scancode = SDL_Scancode(45);
8947 pub const SDL_SCANCODE_EQUALS: SDL_Scancode = SDL_Scancode(46);
8948 pub const SDL_SCANCODE_LEFTBRACKET: SDL_Scancode = SDL_Scancode(47);
8949 pub const SDL_SCANCODE_RIGHTBRACKET: SDL_Scancode = SDL_Scancode(48);
8950 #[doc = "< Located at the lower left of the return\n key on ISO keyboards and at the right end\n of the QWERTY row on ANSI keyboards.\n Produces REVERSE SOLIDUS (backslash) and\n VERTICAL LINE in a US layout, REVERSE\n SOLIDUS and VERTICAL LINE in a UK Mac\n layout, NUMBER SIGN and TILDE in a UK\n Windows layout, DOLLAR SIGN and POUND SIGN\n in a Swiss German layout, NUMBER SIGN and\n APOSTROPHE in a German layout, GRAVE\n ACCENT and POUND SIGN in a French Mac\n layout, and ASTERISK and MICRO SIGN in a\n French Windows layout.\n"]
8951 pub const SDL_SCANCODE_BACKSLASH: SDL_Scancode = SDL_Scancode(49);
8952 #[doc = "< ISO USB keyboards actually use this code\n instead of 49 for the same key, but all\n OSes I've seen treat the two codes\n identically. So, as an implementer, unless\n your keyboard generates both of those\n codes and your OS treats them differently,\n you should generate SDL_SCANCODE_BACKSLASH\n instead of this code. As a user, you\n should not rely on this code because SDL\n will never generate it with most (all?)\n keyboards.\n"]
8953 pub const SDL_SCANCODE_NONUSHASH: SDL_Scancode = SDL_Scancode(50);
8954 pub const SDL_SCANCODE_SEMICOLON: SDL_Scancode = SDL_Scancode(51);
8955 pub const SDL_SCANCODE_APOSTROPHE: SDL_Scancode = SDL_Scancode(52);
8956 #[doc = "< Located in the top left corner (on both ANSI\n and ISO keyboards). Produces GRAVE ACCENT and\n TILDE in a US Windows layout and in US and UK\n Mac layouts on ANSI keyboards, GRAVE ACCENT\n and NOT SIGN in a UK Windows layout, SECTION\n SIGN and PLUS-MINUS SIGN in US and UK Mac\n layouts on ISO keyboards, SECTION SIGN and\n DEGREE SIGN in a Swiss German layout (Mac:\n only on ISO keyboards), CIRCUMFLEX ACCENT and\n DEGREE SIGN in a German layout (Mac: only on\n ISO keyboards), SUPERSCRIPT TWO and TILDE in a\n French Windows layout, COMMERCIAL AT and\n NUMBER SIGN in a French Mac layout on ISO\n keyboards, and LESS-THAN SIGN and GREATER-THAN\n SIGN in a Swiss German, German, or French Mac\n layout on ANSI keyboards.\n"]
8957 pub const SDL_SCANCODE_GRAVE: SDL_Scancode = SDL_Scancode(53);
8958 pub const SDL_SCANCODE_COMMA: SDL_Scancode = SDL_Scancode(54);
8959 pub const SDL_SCANCODE_PERIOD: SDL_Scancode = SDL_Scancode(55);
8960 pub const SDL_SCANCODE_SLASH: SDL_Scancode = SDL_Scancode(56);
8961 pub const SDL_SCANCODE_CAPSLOCK: SDL_Scancode = SDL_Scancode(57);
8962 pub const SDL_SCANCODE_F1: SDL_Scancode = SDL_Scancode(58);
8963 pub const SDL_SCANCODE_F2: SDL_Scancode = SDL_Scancode(59);
8964 pub const SDL_SCANCODE_F3: SDL_Scancode = SDL_Scancode(60);
8965 pub const SDL_SCANCODE_F4: SDL_Scancode = SDL_Scancode(61);
8966 pub const SDL_SCANCODE_F5: SDL_Scancode = SDL_Scancode(62);
8967 pub const SDL_SCANCODE_F6: SDL_Scancode = SDL_Scancode(63);
8968 pub const SDL_SCANCODE_F7: SDL_Scancode = SDL_Scancode(64);
8969 pub const SDL_SCANCODE_F8: SDL_Scancode = SDL_Scancode(65);
8970 pub const SDL_SCANCODE_F9: SDL_Scancode = SDL_Scancode(66);
8971 pub const SDL_SCANCODE_F10: SDL_Scancode = SDL_Scancode(67);
8972 pub const SDL_SCANCODE_F11: SDL_Scancode = SDL_Scancode(68);
8973 pub const SDL_SCANCODE_F12: SDL_Scancode = SDL_Scancode(69);
8974 pub const SDL_SCANCODE_PRINTSCREEN: SDL_Scancode = SDL_Scancode(70);
8975 pub const SDL_SCANCODE_SCROLLLOCK: SDL_Scancode = SDL_Scancode(71);
8976 pub const SDL_SCANCODE_PAUSE: SDL_Scancode = SDL_Scancode(72);
8977 #[doc = "< insert on PC, help on some Mac keyboards (but\ndoes send code 73, not 117)\n"]
8978 pub const SDL_SCANCODE_INSERT: SDL_Scancode = SDL_Scancode(73);
8979 pub const SDL_SCANCODE_HOME: SDL_Scancode = SDL_Scancode(74);
8980 pub const SDL_SCANCODE_PAGEUP: SDL_Scancode = SDL_Scancode(75);
8981 pub const SDL_SCANCODE_DELETE: SDL_Scancode = SDL_Scancode(76);
8982 pub const SDL_SCANCODE_END: SDL_Scancode = SDL_Scancode(77);
8983 pub const SDL_SCANCODE_PAGEDOWN: SDL_Scancode = SDL_Scancode(78);
8984 pub const SDL_SCANCODE_RIGHT: SDL_Scancode = SDL_Scancode(79);
8985 pub const SDL_SCANCODE_LEFT: SDL_Scancode = SDL_Scancode(80);
8986 pub const SDL_SCANCODE_DOWN: SDL_Scancode = SDL_Scancode(81);
8987 pub const SDL_SCANCODE_UP: SDL_Scancode = SDL_Scancode(82);
8988 #[doc = "< num lock on PC, clear on Mac keyboards\n"]
8989 pub const SDL_SCANCODE_NUMLOCKCLEAR: SDL_Scancode = SDL_Scancode(83);
8990 pub const SDL_SCANCODE_KP_DIVIDE: SDL_Scancode = SDL_Scancode(84);
8991 pub const SDL_SCANCODE_KP_MULTIPLY: SDL_Scancode = SDL_Scancode(85);
8992 pub const SDL_SCANCODE_KP_MINUS: SDL_Scancode = SDL_Scancode(86);
8993 pub const SDL_SCANCODE_KP_PLUS: SDL_Scancode = SDL_Scancode(87);
8994 pub const SDL_SCANCODE_KP_ENTER: SDL_Scancode = SDL_Scancode(88);
8995 pub const SDL_SCANCODE_KP_1: SDL_Scancode = SDL_Scancode(89);
8996 pub const SDL_SCANCODE_KP_2: SDL_Scancode = SDL_Scancode(90);
8997 pub const SDL_SCANCODE_KP_3: SDL_Scancode = SDL_Scancode(91);
8998 pub const SDL_SCANCODE_KP_4: SDL_Scancode = SDL_Scancode(92);
8999 pub const SDL_SCANCODE_KP_5: SDL_Scancode = SDL_Scancode(93);
9000 pub const SDL_SCANCODE_KP_6: SDL_Scancode = SDL_Scancode(94);
9001 pub const SDL_SCANCODE_KP_7: SDL_Scancode = SDL_Scancode(95);
9002 pub const SDL_SCANCODE_KP_8: SDL_Scancode = SDL_Scancode(96);
9003 pub const SDL_SCANCODE_KP_9: SDL_Scancode = SDL_Scancode(97);
9004 pub const SDL_SCANCODE_KP_0: SDL_Scancode = SDL_Scancode(98);
9005 pub const SDL_SCANCODE_KP_PERIOD: SDL_Scancode = SDL_Scancode(99);
9006 #[doc = "< This is the additional key that ISO\n keyboards have over ANSI ones,\n located between left shift and Z.\n Produces GRAVE ACCENT and TILDE in a\n US or UK Mac layout, REVERSE SOLIDUS\n (backslash) and VERTICAL LINE in a\n US or UK Windows layout, and\n LESS-THAN SIGN and GREATER-THAN SIGN\n in a Swiss German, German, or French\n layout.\n"]
9007 pub const SDL_SCANCODE_NONUSBACKSLASH: SDL_Scancode = SDL_Scancode(100);
9008 #[doc = "< windows contextual menu, compose\n"]
9009 pub const SDL_SCANCODE_APPLICATION: SDL_Scancode = SDL_Scancode(101);
9010 #[doc = "< The USB document says this is a status flag,\n not a physical key - but some Mac keyboards\n do have a power key.\n"]
9011 pub const SDL_SCANCODE_POWER: SDL_Scancode = SDL_Scancode(102);
9012 pub const SDL_SCANCODE_KP_EQUALS: SDL_Scancode = SDL_Scancode(103);
9013 pub const SDL_SCANCODE_F13: SDL_Scancode = SDL_Scancode(104);
9014 pub const SDL_SCANCODE_F14: SDL_Scancode = SDL_Scancode(105);
9015 pub const SDL_SCANCODE_F15: SDL_Scancode = SDL_Scancode(106);
9016 pub const SDL_SCANCODE_F16: SDL_Scancode = SDL_Scancode(107);
9017 pub const SDL_SCANCODE_F17: SDL_Scancode = SDL_Scancode(108);
9018 pub const SDL_SCANCODE_F18: SDL_Scancode = SDL_Scancode(109);
9019 pub const SDL_SCANCODE_F19: SDL_Scancode = SDL_Scancode(110);
9020 pub const SDL_SCANCODE_F20: SDL_Scancode = SDL_Scancode(111);
9021 pub const SDL_SCANCODE_F21: SDL_Scancode = SDL_Scancode(112);
9022 pub const SDL_SCANCODE_F22: SDL_Scancode = SDL_Scancode(113);
9023 pub const SDL_SCANCODE_F23: SDL_Scancode = SDL_Scancode(114);
9024 pub const SDL_SCANCODE_F24: SDL_Scancode = SDL_Scancode(115);
9025 pub const SDL_SCANCODE_EXECUTE: SDL_Scancode = SDL_Scancode(116);
9026 #[doc = "< AL Integrated Help Center\n"]
9027 pub const SDL_SCANCODE_HELP: SDL_Scancode = SDL_Scancode(117);
9028 #[doc = "< Menu (show menu)\n"]
9029 pub const SDL_SCANCODE_MENU: SDL_Scancode = SDL_Scancode(118);
9030 pub const SDL_SCANCODE_SELECT: SDL_Scancode = SDL_Scancode(119);
9031 #[doc = "< AC Stop\n"]
9032 pub const SDL_SCANCODE_STOP: SDL_Scancode = SDL_Scancode(120);
9033 #[doc = "< AC Redo/Repeat\n"]
9034 pub const SDL_SCANCODE_AGAIN: SDL_Scancode = SDL_Scancode(121);
9035 #[doc = "< AC Undo\n"]
9036 pub const SDL_SCANCODE_UNDO: SDL_Scancode = SDL_Scancode(122);
9037 #[doc = "< AC Cut\n"]
9038 pub const SDL_SCANCODE_CUT: SDL_Scancode = SDL_Scancode(123);
9039 #[doc = "< AC Copy\n"]
9040 pub const SDL_SCANCODE_COPY: SDL_Scancode = SDL_Scancode(124);
9041 #[doc = "< AC Paste\n"]
9042 pub const SDL_SCANCODE_PASTE: SDL_Scancode = SDL_Scancode(125);
9043 #[doc = "< AC Find\n"]
9044 pub const SDL_SCANCODE_FIND: SDL_Scancode = SDL_Scancode(126);
9045 pub const SDL_SCANCODE_MUTE: SDL_Scancode = SDL_Scancode(127);
9046 pub const SDL_SCANCODE_VOLUMEUP: SDL_Scancode = SDL_Scancode(128);
9047 pub const SDL_SCANCODE_VOLUMEDOWN: SDL_Scancode = SDL_Scancode(129);
9048 pub const SDL_SCANCODE_KP_COMMA: SDL_Scancode = SDL_Scancode(133);
9049 pub const SDL_SCANCODE_KP_EQUALSAS400: SDL_Scancode = SDL_Scancode(134);
9050 #[doc = "< used on Asian keyboards, see\nfootnotes in USB doc\n"]
9051 pub const SDL_SCANCODE_INTERNATIONAL1: SDL_Scancode = SDL_Scancode(135);
9052 pub const SDL_SCANCODE_INTERNATIONAL2: SDL_Scancode = SDL_Scancode(136);
9053 #[doc = "< Yen\n"]
9054 pub const SDL_SCANCODE_INTERNATIONAL3: SDL_Scancode = SDL_Scancode(137);
9055 pub const SDL_SCANCODE_INTERNATIONAL4: SDL_Scancode = SDL_Scancode(138);
9056 pub const SDL_SCANCODE_INTERNATIONAL5: SDL_Scancode = SDL_Scancode(139);
9057 pub const SDL_SCANCODE_INTERNATIONAL6: SDL_Scancode = SDL_Scancode(140);
9058 pub const SDL_SCANCODE_INTERNATIONAL7: SDL_Scancode = SDL_Scancode(141);
9059 pub const SDL_SCANCODE_INTERNATIONAL8: SDL_Scancode = SDL_Scancode(142);
9060 pub const SDL_SCANCODE_INTERNATIONAL9: SDL_Scancode = SDL_Scancode(143);
9061 #[doc = "< Hangul/English toggle\n"]
9062 pub const SDL_SCANCODE_LANG1: SDL_Scancode = SDL_Scancode(144);
9063 #[doc = "< Hanja conversion\n"]
9064 pub const SDL_SCANCODE_LANG2: SDL_Scancode = SDL_Scancode(145);
9065 #[doc = "< Katakana\n"]
9066 pub const SDL_SCANCODE_LANG3: SDL_Scancode = SDL_Scancode(146);
9067 #[doc = "< Hiragana\n"]
9068 pub const SDL_SCANCODE_LANG4: SDL_Scancode = SDL_Scancode(147);
9069 #[doc = "< Zenkaku/Hankaku\n"]
9070 pub const SDL_SCANCODE_LANG5: SDL_Scancode = SDL_Scancode(148);
9071 #[doc = "< reserved\n"]
9072 pub const SDL_SCANCODE_LANG6: SDL_Scancode = SDL_Scancode(149);
9073 #[doc = "< reserved\n"]
9074 pub const SDL_SCANCODE_LANG7: SDL_Scancode = SDL_Scancode(150);
9075 #[doc = "< reserved\n"]
9076 pub const SDL_SCANCODE_LANG8: SDL_Scancode = SDL_Scancode(151);
9077 #[doc = "< reserved\n"]
9078 pub const SDL_SCANCODE_LANG9: SDL_Scancode = SDL_Scancode(152);
9079 #[doc = "< Erase-Eaze\n"]
9080 pub const SDL_SCANCODE_ALTERASE: SDL_Scancode = SDL_Scancode(153);
9081 pub const SDL_SCANCODE_SYSREQ: SDL_Scancode = SDL_Scancode(154);
9082 #[doc = "< AC Cancel\n"]
9083 pub const SDL_SCANCODE_CANCEL: SDL_Scancode = SDL_Scancode(155);
9084 pub const SDL_SCANCODE_CLEAR: SDL_Scancode = SDL_Scancode(156);
9085 pub const SDL_SCANCODE_PRIOR: SDL_Scancode = SDL_Scancode(157);
9086 pub const SDL_SCANCODE_RETURN2: SDL_Scancode = SDL_Scancode(158);
9087 pub const SDL_SCANCODE_SEPARATOR: SDL_Scancode = SDL_Scancode(159);
9088 pub const SDL_SCANCODE_OUT: SDL_Scancode = SDL_Scancode(160);
9089 pub const SDL_SCANCODE_OPER: SDL_Scancode = SDL_Scancode(161);
9090 pub const SDL_SCANCODE_CLEARAGAIN: SDL_Scancode = SDL_Scancode(162);
9091 pub const SDL_SCANCODE_CRSEL: SDL_Scancode = SDL_Scancode(163);
9092 pub const SDL_SCANCODE_EXSEL: SDL_Scancode = SDL_Scancode(164);
9093 pub const SDL_SCANCODE_KP_00: SDL_Scancode = SDL_Scancode(176);
9094 pub const SDL_SCANCODE_KP_000: SDL_Scancode = SDL_Scancode(177);
9095 pub const SDL_SCANCODE_THOUSANDSSEPARATOR: SDL_Scancode = SDL_Scancode(178);
9096 pub const SDL_SCANCODE_DECIMALSEPARATOR: SDL_Scancode = SDL_Scancode(179);
9097 pub const SDL_SCANCODE_CURRENCYUNIT: SDL_Scancode = SDL_Scancode(180);
9098 pub const SDL_SCANCODE_CURRENCYSUBUNIT: SDL_Scancode = SDL_Scancode(181);
9099 pub const SDL_SCANCODE_KP_LEFTPAREN: SDL_Scancode = SDL_Scancode(182);
9100 pub const SDL_SCANCODE_KP_RIGHTPAREN: SDL_Scancode = SDL_Scancode(183);
9101 pub const SDL_SCANCODE_KP_LEFTBRACE: SDL_Scancode = SDL_Scancode(184);
9102 pub const SDL_SCANCODE_KP_RIGHTBRACE: SDL_Scancode = SDL_Scancode(185);
9103 pub const SDL_SCANCODE_KP_TAB: SDL_Scancode = SDL_Scancode(186);
9104 pub const SDL_SCANCODE_KP_BACKSPACE: SDL_Scancode = SDL_Scancode(187);
9105 pub const SDL_SCANCODE_KP_A: SDL_Scancode = SDL_Scancode(188);
9106 pub const SDL_SCANCODE_KP_B: SDL_Scancode = SDL_Scancode(189);
9107 pub const SDL_SCANCODE_KP_C: SDL_Scancode = SDL_Scancode(190);
9108 pub const SDL_SCANCODE_KP_D: SDL_Scancode = SDL_Scancode(191);
9109 pub const SDL_SCANCODE_KP_E: SDL_Scancode = SDL_Scancode(192);
9110 pub const SDL_SCANCODE_KP_F: SDL_Scancode = SDL_Scancode(193);
9111 pub const SDL_SCANCODE_KP_XOR: SDL_Scancode = SDL_Scancode(194);
9112 pub const SDL_SCANCODE_KP_POWER: SDL_Scancode = SDL_Scancode(195);
9113 pub const SDL_SCANCODE_KP_PERCENT: SDL_Scancode = SDL_Scancode(196);
9114 pub const SDL_SCANCODE_KP_LESS: SDL_Scancode = SDL_Scancode(197);
9115 pub const SDL_SCANCODE_KP_GREATER: SDL_Scancode = SDL_Scancode(198);
9116 pub const SDL_SCANCODE_KP_AMPERSAND: SDL_Scancode = SDL_Scancode(199);
9117 pub const SDL_SCANCODE_KP_DBLAMPERSAND: SDL_Scancode = SDL_Scancode(200);
9118 pub const SDL_SCANCODE_KP_VERTICALBAR: SDL_Scancode = SDL_Scancode(201);
9119 pub const SDL_SCANCODE_KP_DBLVERTICALBAR: SDL_Scancode = SDL_Scancode(202);
9120 pub const SDL_SCANCODE_KP_COLON: SDL_Scancode = SDL_Scancode(203);
9121 pub const SDL_SCANCODE_KP_HASH: SDL_Scancode = SDL_Scancode(204);
9122 pub const SDL_SCANCODE_KP_SPACE: SDL_Scancode = SDL_Scancode(205);
9123 pub const SDL_SCANCODE_KP_AT: SDL_Scancode = SDL_Scancode(206);
9124 pub const SDL_SCANCODE_KP_EXCLAM: SDL_Scancode = SDL_Scancode(207);
9125 pub const SDL_SCANCODE_KP_MEMSTORE: SDL_Scancode = SDL_Scancode(208);
9126 pub const SDL_SCANCODE_KP_MEMRECALL: SDL_Scancode = SDL_Scancode(209);
9127 pub const SDL_SCANCODE_KP_MEMCLEAR: SDL_Scancode = SDL_Scancode(210);
9128 pub const SDL_SCANCODE_KP_MEMADD: SDL_Scancode = SDL_Scancode(211);
9129 pub const SDL_SCANCODE_KP_MEMSUBTRACT: SDL_Scancode = SDL_Scancode(212);
9130 pub const SDL_SCANCODE_KP_MEMMULTIPLY: SDL_Scancode = SDL_Scancode(213);
9131 pub const SDL_SCANCODE_KP_MEMDIVIDE: SDL_Scancode = SDL_Scancode(214);
9132 pub const SDL_SCANCODE_KP_PLUSMINUS: SDL_Scancode = SDL_Scancode(215);
9133 pub const SDL_SCANCODE_KP_CLEAR: SDL_Scancode = SDL_Scancode(216);
9134 pub const SDL_SCANCODE_KP_CLEARENTRY: SDL_Scancode = SDL_Scancode(217);
9135 pub const SDL_SCANCODE_KP_BINARY: SDL_Scancode = SDL_Scancode(218);
9136 pub const SDL_SCANCODE_KP_OCTAL: SDL_Scancode = SDL_Scancode(219);
9137 pub const SDL_SCANCODE_KP_DECIMAL: SDL_Scancode = SDL_Scancode(220);
9138 pub const SDL_SCANCODE_KP_HEXADECIMAL: SDL_Scancode = SDL_Scancode(221);
9139 pub const SDL_SCANCODE_LCTRL: SDL_Scancode = SDL_Scancode(224);
9140 pub const SDL_SCANCODE_LSHIFT: SDL_Scancode = SDL_Scancode(225);
9141 #[doc = "< alt, option\n"]
9142 pub const SDL_SCANCODE_LALT: SDL_Scancode = SDL_Scancode(226);
9143 #[doc = "< windows, command (apple), meta\n"]
9144 pub const SDL_SCANCODE_LGUI: SDL_Scancode = SDL_Scancode(227);
9145 pub const SDL_SCANCODE_RCTRL: SDL_Scancode = SDL_Scancode(228);
9146 pub const SDL_SCANCODE_RSHIFT: SDL_Scancode = SDL_Scancode(229);
9147 #[doc = "< alt gr, option\n"]
9148 pub const SDL_SCANCODE_RALT: SDL_Scancode = SDL_Scancode(230);
9149 #[doc = "< windows, command (apple), meta\n"]
9150 pub const SDL_SCANCODE_RGUI: SDL_Scancode = SDL_Scancode(231);
9151 #[doc = "< I'm not sure if this is really not covered\n by any of the above, but since there's a\n special SDL_KMOD_MODE for it I'm adding it here\n"]
9152 pub const SDL_SCANCODE_MODE: SDL_Scancode = SDL_Scancode(257);
9153 #[doc = "< Sleep\n"]
9154 pub const SDL_SCANCODE_SLEEP: SDL_Scancode = SDL_Scancode(258);
9155 #[doc = "< Wake\n"]
9156 pub const SDL_SCANCODE_WAKE: SDL_Scancode = SDL_Scancode(259);
9157 #[doc = "< Channel Increment\n"]
9158 pub const SDL_SCANCODE_CHANNEL_INCREMENT: SDL_Scancode = SDL_Scancode(260);
9159 #[doc = "< Channel Decrement\n"]
9160 pub const SDL_SCANCODE_CHANNEL_DECREMENT: SDL_Scancode = SDL_Scancode(261);
9161 #[doc = "< Play\n"]
9162 pub const SDL_SCANCODE_MEDIA_PLAY: SDL_Scancode = SDL_Scancode(262);
9163 #[doc = "< Pause\n"]
9164 pub const SDL_SCANCODE_MEDIA_PAUSE: SDL_Scancode = SDL_Scancode(263);
9165 #[doc = "< Record\n"]
9166 pub const SDL_SCANCODE_MEDIA_RECORD: SDL_Scancode = SDL_Scancode(264);
9167 #[doc = "< Fast Forward\n"]
9168 pub const SDL_SCANCODE_MEDIA_FAST_FORWARD: SDL_Scancode = SDL_Scancode(265);
9169 #[doc = "< Rewind\n"]
9170 pub const SDL_SCANCODE_MEDIA_REWIND: SDL_Scancode = SDL_Scancode(266);
9171 #[doc = "< Next Track\n"]
9172 pub const SDL_SCANCODE_MEDIA_NEXT_TRACK: SDL_Scancode = SDL_Scancode(267);
9173 #[doc = "< Previous Track\n"]
9174 pub const SDL_SCANCODE_MEDIA_PREVIOUS_TRACK: SDL_Scancode = SDL_Scancode(268);
9175 #[doc = "< Stop\n"]
9176 pub const SDL_SCANCODE_MEDIA_STOP: SDL_Scancode = SDL_Scancode(269);
9177 #[doc = "< Eject\n"]
9178 pub const SDL_SCANCODE_MEDIA_EJECT: SDL_Scancode = SDL_Scancode(270);
9179 #[doc = "< Play / Pause\n"]
9180 pub const SDL_SCANCODE_MEDIA_PLAY_PAUSE: SDL_Scancode = SDL_Scancode(271);
9181 pub const SDL_SCANCODE_MEDIA_SELECT: SDL_Scancode = SDL_Scancode(272);
9182 #[doc = "< AC New\n"]
9183 pub const SDL_SCANCODE_AC_NEW: SDL_Scancode = SDL_Scancode(273);
9184 #[doc = "< AC Open\n"]
9185 pub const SDL_SCANCODE_AC_OPEN: SDL_Scancode = SDL_Scancode(274);
9186 #[doc = "< AC Close\n"]
9187 pub const SDL_SCANCODE_AC_CLOSE: SDL_Scancode = SDL_Scancode(275);
9188 #[doc = "< AC Exit\n"]
9189 pub const SDL_SCANCODE_AC_EXIT: SDL_Scancode = SDL_Scancode(276);
9190 #[doc = "< AC Save\n"]
9191 pub const SDL_SCANCODE_AC_SAVE: SDL_Scancode = SDL_Scancode(277);
9192 #[doc = "< AC Print\n"]
9193 pub const SDL_SCANCODE_AC_PRINT: SDL_Scancode = SDL_Scancode(278);
9194 #[doc = "< AC Properties\n"]
9195 pub const SDL_SCANCODE_AC_PROPERTIES: SDL_Scancode = SDL_Scancode(279);
9196 #[doc = "< AC Search\n"]
9197 pub const SDL_SCANCODE_AC_SEARCH: SDL_Scancode = SDL_Scancode(280);
9198 #[doc = "< AC Home\n"]
9199 pub const SDL_SCANCODE_AC_HOME: SDL_Scancode = SDL_Scancode(281);
9200 #[doc = "< AC Back\n"]
9201 pub const SDL_SCANCODE_AC_BACK: SDL_Scancode = SDL_Scancode(282);
9202 #[doc = "< AC Forward\n"]
9203 pub const SDL_SCANCODE_AC_FORWARD: SDL_Scancode = SDL_Scancode(283);
9204 #[doc = "< AC Stop\n"]
9205 pub const SDL_SCANCODE_AC_STOP: SDL_Scancode = SDL_Scancode(284);
9206 #[doc = "< AC Refresh\n"]
9207 pub const SDL_SCANCODE_AC_REFRESH: SDL_Scancode = SDL_Scancode(285);
9208 #[doc = "< AC Bookmarks\n"]
9209 pub const SDL_SCANCODE_AC_BOOKMARKS: SDL_Scancode = SDL_Scancode(286);
9210 #[doc = "< Usually situated below the display on phones and\nused as a multi-function feature key for selecting\na software defined function shown on the bottom left\nof the display.\n"]
9211 pub const SDL_SCANCODE_SOFTLEFT: SDL_Scancode = SDL_Scancode(287);
9212 #[doc = "< Usually situated below the display on phones and\nused as a multi-function feature key for selecting\na software defined function shown on the bottom right\nof the display.\n"]
9213 pub const SDL_SCANCODE_SOFTRIGHT: SDL_Scancode = SDL_Scancode(288);
9214 #[doc = "< Used for accepting phone calls.\n"]
9215 pub const SDL_SCANCODE_CALL: SDL_Scancode = SDL_Scancode(289);
9216 #[doc = "< Used for rejecting phone calls.\n"]
9217 pub const SDL_SCANCODE_ENDCALL: SDL_Scancode = SDL_Scancode(290);
9218 #[doc = "< 400-500 reserved for dynamic keycodes\n"]
9219 pub const SDL_SCANCODE_RESERVED: SDL_Scancode = SDL_Scancode(400);
9220 #[doc = "< not a key, just marks the number of scancodes for array bounds\n"]
9221 pub const SDL_SCANCODE_COUNT: SDL_Scancode = SDL_Scancode(512);
9222}
9223#[repr(transparent)]
9224#[doc = " The SDL keyboard scancode representation.\n\n An SDL scancode is the physical representation of a key on the keyboard,\n independent of language and keyboard mapping.\n\n Values of this type are used to represent keyboard keys, among other places\n in the `scancode` field of the SDL_KeyboardEvent structure.\n\n The values in this enumeration are based on the USB usage page standard:\n https://usb.org/sites/default/files/hut1_5.pdf\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
9225#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9226pub struct SDL_Scancode(pub core::ffi::c_uint);
9227#[doc = " The SDL virtual key representation.\n\n Values of this type are used to represent keyboard keys using the current\n layout of the keyboard. These values include Unicode values representing\n the unmodified character that would be generated by pressing the key, or an\n `SDLK_*` constant for those keys that do not generate characters.\n\n A special exception is the number keys at the top of the keyboard which map\n by default to SDLK_0...SDLK_9 on AZERTY layouts.\n\n Keys with the `SDLK_EXTENDED_MASK` bit set do not map to a scancode or\n Unicode code point.\n\n Many common keycodes are listed below, but this list is not exhaustive.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_HINT_KEYCODE_OPTIONS\n"]
9228pub type SDL_Keycode = Uint32;
9229#[doc = " Valid key modifiers (possibly OR'd together).\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
9230pub type SDL_Keymod = Uint16;
9231#[doc = " This is a unique ID for a keyboard for the time it is connected to the\n system, and is never reused for the lifetime of the application.\n\n If the keyboard is disconnected and reconnected, it will get a new ID.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
9232pub type SDL_KeyboardID = Uint32;
9233unsafe extern "C" {
9234 #[doc = " Return whether a keyboard is currently connected.\n\n **Returns:** true if a keyboard is connected, false otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyboards\n"]
9235 pub fn SDL_HasKeyboard() -> bool;
9236}
9237unsafe extern "C" {
9238 #[doc = " Get a list of currently connected keyboards.\n\n Note that this will include any device or virtual driver that includes\n keyboard functionality, including some mice, KVM switches, motherboard\n power buttons, etc. You should wait for input from a device before you\n consider it actively in use.\n\n **Parameter:** count a pointer filled in with the number of keyboards returned, may\n be NULL.\n **Returns:** a 0 terminated array of keyboards instance IDs or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyboardNameForID\n **See Also:** SDL_HasKeyboard\n"]
9239 pub fn SDL_GetKeyboards(count: *mut core::ffi::c_int) -> *mut SDL_KeyboardID;
9240}
9241unsafe extern "C" {
9242 #[doc = " Get the name of a keyboard.\n\n This function returns \"\" if the keyboard doesn't have a name.\n\n **Parameter:** instance_id the keyboard instance ID.\n **Returns:** the name of the selected keyboard or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyboards\n"]
9243 pub fn SDL_GetKeyboardNameForID(instance_id: SDL_KeyboardID) -> *const core::ffi::c_char;
9244}
9245unsafe extern "C" {
9246 #[doc = " Query the window which currently has keyboard focus.\n\n **Returns:** the window with keyboard focus.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
9247 pub fn SDL_GetKeyboardFocus() -> *mut SDL_Window;
9248}
9249unsafe extern "C" {
9250 #[doc = " Get a snapshot of the current state of the keyboard.\n\n The pointer returned is a pointer to an internal SDL array. It will be\n valid for the whole lifetime of the application and should not be freed by\n the caller.\n\n A array element with a value of true means that the key is pressed and a\n value of false means that it is not. Indexes into this array are obtained\n by using SDL_Scancode values.\n\n Use SDL_PumpEvents() to update the state array.\n\n This function gives you the current state after all events have been\n processed, so if a key or button has been pressed and released before you\n process events, then the pressed state will never show up in the\n SDL_GetKeyboardState() calls.\n\n Note: This function doesn't take into account whether shift has been\n pressed or not.\n\n **Parameter:** numkeys if non-NULL, receives the length of the returned array.\n **Returns:** a pointer to an array of key states.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PumpEvents\n **See Also:** SDL_ResetKeyboard\n"]
9251 pub fn SDL_GetKeyboardState(numkeys: *mut core::ffi::c_int) -> *const bool;
9252}
9253unsafe extern "C" {
9254 #[doc = " Clear the state of the keyboard.\n\n This function will generate key up events for all pressed keys.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyboardState\n"]
9255 pub fn SDL_ResetKeyboard();
9256}
9257unsafe extern "C" {
9258 #[doc = " Get the current key modifier state for the keyboard.\n\n **Returns:** an OR'd combination of the modifier keys for the keyboard.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyboardState\n **See Also:** SDL_SetModState\n"]
9259 pub fn SDL_GetModState() -> SDL_Keymod;
9260}
9261unsafe extern "C" {
9262 #[doc = " Set the current key modifier state for the keyboard.\n\n The inverse of SDL_GetModState(), SDL_SetModState() allows you to impose\n modifier key states on your application. Simply pass your desired modifier\n states into `modstate`. This value may be a bitwise, OR'd combination of\n SDL_Keymod values.\n\n This does not change the keyboard state, only the key modifier flags that\n SDL reports.\n\n **Parameter:** modstate the desired SDL_Keymod for the keyboard.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetModState\n"]
9263 pub fn SDL_SetModState(modstate: SDL_Keymod);
9264}
9265unsafe extern "C" {
9266 #[doc = " Get the key code corresponding to the given scancode according to the\n current keyboard layout.\n\n If you want to get the keycode as it would be delivered in key events,\n including options specified in SDL_HINT_KEYCODE_OPTIONS, then you should\n pass `key_event` as true. Otherwise this function simply translates the\n scancode based on the given modifier state.\n\n **Parameter:** scancode the desired SDL_Scancode to query.\n **Parameter:** modstate the modifier state to use when translating the scancode to\n a keycode.\n **Parameter:** key_event true if the keycode will be used in key events.\n **Returns:** the SDL_Keycode that corresponds to the given SDL_Scancode.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyName\n **See Also:** SDL_GetScancodeFromKey\n"]
9267 pub fn SDL_GetKeyFromScancode(
9268 scancode: SDL_Scancode,
9269 modstate: SDL_Keymod,
9270 key_event: bool,
9271 ) -> SDL_Keycode;
9272}
9273unsafe extern "C" {
9274 #[doc = " Get the scancode corresponding to the given key code according to the\n current keyboard layout.\n\n Note that there may be multiple scancode+modifier states that can generate\n this keycode, this will just return the first one found.\n\n **Parameter:** key the desired SDL_Keycode to query.\n **Parameter:** modstate a pointer to the modifier state that would be used when the\n scancode generates this key, may be NULL.\n **Returns:** the SDL_Scancode that corresponds to the given SDL_Keycode.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyFromScancode\n **See Also:** SDL_GetScancodeName\n"]
9275 pub fn SDL_GetScancodeFromKey(key: SDL_Keycode, modstate: *mut SDL_Keymod) -> SDL_Scancode;
9276}
9277unsafe extern "C" {
9278 #[doc = " Set a human-readable name for a scancode.\n\n **Parameter:** scancode the desired SDL_Scancode.\n **Parameter:** name the name to use for the scancode, encoded as UTF-8. The string\n is not copied, so the pointer given to this function must stay\n valid while SDL is being used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetScancodeName\n"]
9279 pub fn SDL_SetScancodeName(scancode: SDL_Scancode, name: *const core::ffi::c_char) -> bool;
9280}
9281unsafe extern "C" {
9282 #[doc = " Get a human-readable name for a scancode.\n\n **Warning**: The returned name is by design not stable across platforms,\n e.g. the name for `SDL_SCANCODE_LGUI` is \"Left GUI\" under Linux but \"Left\n Windows\" under Microsoft Windows, and some scancodes like\n `SDL_SCANCODE_NONUSBACKSLASH` don't have any name at all. There are even\n scancodes that share names, e.g. `SDL_SCANCODE_RETURN` and\n `SDL_SCANCODE_RETURN2` (both called \"Return\"). This function is therefore\n unsuitable for creating a stable cross-platform two-way mapping between\n strings and scancodes.\n\n **Parameter:** scancode the desired SDL_Scancode to query.\n **Returns:** a pointer to the name for the scancode. If the scancode doesn't\n have a name this function returns an empty string (\"\").\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetScancodeFromKey\n **See Also:** SDL_GetScancodeFromName\n **See Also:** SDL_SetScancodeName\n"]
9283 pub fn SDL_GetScancodeName(scancode: SDL_Scancode) -> *const core::ffi::c_char;
9284}
9285unsafe extern "C" {
9286 #[doc = " Get a scancode from a human-readable name.\n\n **Parameter:** name the human-readable scancode name.\n **Returns:** the SDL_Scancode, or `SDL_SCANCODE_UNKNOWN` if the name wasn't\n recognized; call SDL_GetError() for more information.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyFromName\n **See Also:** SDL_GetScancodeFromKey\n **See Also:** SDL_GetScancodeName\n"]
9287 pub fn SDL_GetScancodeFromName(name: *const core::ffi::c_char) -> SDL_Scancode;
9288}
9289unsafe extern "C" {
9290 #[doc = " Get a human-readable name for a key.\n\n If the key doesn't have a name, this function returns an empty string (\"\").\n\n Letters will be presented in their uppercase form, if applicable.\n\n **Parameter:** key the desired SDL_Keycode to query.\n **Returns:** a UTF-8 encoded string of the key name.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyFromName\n **See Also:** SDL_GetKeyFromScancode\n **See Also:** SDL_GetScancodeFromKey\n"]
9291 pub fn SDL_GetKeyName(key: SDL_Keycode) -> *const core::ffi::c_char;
9292}
9293unsafe extern "C" {
9294 #[doc = " Get a key code from a human-readable name.\n\n **Parameter:** name the human-readable key name.\n **Returns:** key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyFromScancode\n **See Also:** SDL_GetKeyName\n **See Also:** SDL_GetScancodeFromName\n"]
9295 pub fn SDL_GetKeyFromName(name: *const core::ffi::c_char) -> SDL_Keycode;
9296}
9297unsafe extern "C" {
9298 #[doc = " Start accepting Unicode text input events in a window.\n\n This function will enable text input (SDL_EVENT_TEXT_INPUT and\n SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this\n function paired with SDL_StopTextInput().\n\n Text input events are not received by default.\n\n On some platforms using this function shows the screen keyboard and/or\n activates an IME, which can prevent some key press events from being passed\n through.\n\n **Parameter:** window the window to enable text input.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTextInputArea\n **See Also:** SDL_StartTextInputWithProperties\n **See Also:** SDL_StopTextInput\n **See Also:** SDL_TextInputActive\n"]
9299 pub fn SDL_StartTextInput(window: *mut SDL_Window) -> bool;
9300}
9301impl SDL_TextInputType {
9302 #[doc = "< The input is text\n"]
9303 pub const SDL_TEXTINPUT_TYPE_TEXT: SDL_TextInputType = SDL_TextInputType(0);
9304 #[doc = "< The input is a person's name\n"]
9305 pub const SDL_TEXTINPUT_TYPE_TEXT_NAME: SDL_TextInputType = SDL_TextInputType(1);
9306 #[doc = "< The input is an e-mail address\n"]
9307 pub const SDL_TEXTINPUT_TYPE_TEXT_EMAIL: SDL_TextInputType = SDL_TextInputType(2);
9308 #[doc = "< The input is a username\n"]
9309 pub const SDL_TEXTINPUT_TYPE_TEXT_USERNAME: SDL_TextInputType = SDL_TextInputType(3);
9310 #[doc = "< The input is a secure password that is hidden\n"]
9311 pub const SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN: SDL_TextInputType = SDL_TextInputType(4);
9312 #[doc = "< The input is a secure password that is visible\n"]
9313 pub const SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_VISIBLE: SDL_TextInputType = SDL_TextInputType(5);
9314 #[doc = "< The input is a number\n"]
9315 pub const SDL_TEXTINPUT_TYPE_NUMBER: SDL_TextInputType = SDL_TextInputType(6);
9316 #[doc = "< The input is a secure PIN that is hidden\n"]
9317 pub const SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN: SDL_TextInputType = SDL_TextInputType(7);
9318 #[doc = "< The input is a secure PIN that is visible\n"]
9319 pub const SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_VISIBLE: SDL_TextInputType = SDL_TextInputType(8);
9320}
9321#[repr(transparent)]
9322#[doc = " Text input type.\n\n These are the valid values for SDL_PROP_TEXTINPUT_TYPE_NUMBER. Not every\n value is valid on every platform, but where a value isn't supported, a\n reasonable fallback will be used.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_StartTextInputWithProperties\n"]
9323#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9324pub struct SDL_TextInputType(pub core::ffi::c_uint);
9325impl SDL_Capitalization {
9326 #[doc = "< No auto-capitalization will be done\n"]
9327 pub const SDL_CAPITALIZE_NONE: SDL_Capitalization = SDL_Capitalization(0);
9328 #[doc = "< The first letter of sentences will be capitalized\n"]
9329 pub const SDL_CAPITALIZE_SENTENCES: SDL_Capitalization = SDL_Capitalization(1);
9330 #[doc = "< The first letter of words will be capitalized\n"]
9331 pub const SDL_CAPITALIZE_WORDS: SDL_Capitalization = SDL_Capitalization(2);
9332 #[doc = "< All letters will be capitalized\n"]
9333 pub const SDL_CAPITALIZE_LETTERS: SDL_Capitalization = SDL_Capitalization(3);
9334}
9335#[repr(transparent)]
9336#[doc = " Auto capitalization type.\n\n These are the valid values for SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER.\n Not every value is valid on every platform, but where a value isn't\n supported, a reasonable fallback will be used.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_StartTextInputWithProperties\n"]
9337#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9338pub struct SDL_Capitalization(pub core::ffi::c_uint);
9339unsafe extern "C" {
9340 #[doc = " Start accepting Unicode text input events in a window, with properties\n describing the input.\n\n This function will enable text input (SDL_EVENT_TEXT_INPUT and\n SDL_EVENT_TEXT_EDITING events) in the specified window. Please use this\n function paired with SDL_StopTextInput().\n\n Text input events are not received by default.\n\n On some platforms using this function shows the screen keyboard and/or\n activates an IME, which can prevent some key press events from being passed\n through.\n\n These are the supported properties:\n\n - `SDL_PROP_TEXTINPUT_TYPE_NUMBER` - an SDL_TextInputType value that\n describes text being input, defaults to SDL_TEXTINPUT_TYPE_TEXT.\n - `SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER` - an SDL_Capitalization value\n that describes how text should be capitalized, defaults to\n SDL_CAPITALIZE_SENTENCES for normal text entry, SDL_CAPITALIZE_WORDS for\n SDL_TEXTINPUT_TYPE_TEXT_NAME, and SDL_CAPITALIZE_NONE for e-mail\n addresses, usernames, and passwords.\n - `SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN` - true to enable auto completion\n and auto correction, defaults to true.\n - `SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN` - true if multiple lines of text\n are allowed. This defaults to true if SDL_HINT_RETURN_KEY_HIDES_IME is\n \"0\" or is not set, and defaults to false if SDL_HINT_RETURN_KEY_HIDES_IME\n is \"1\".\n\n On Android you can directly specify the input type:\n\n - `SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER` - the text input type to\n use, overriding other properties. This is documented at\n https://developer.android.com/reference/android/text/InputType\n\n **Parameter:** window the window to enable text input.\n **Parameter:** props the properties to use.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTextInputArea\n **See Also:** SDL_StartTextInput\n **See Also:** SDL_StopTextInput\n **See Also:** SDL_TextInputActive\n"]
9341 pub fn SDL_StartTextInputWithProperties(
9342 window: *mut SDL_Window,
9343 props: SDL_PropertiesID,
9344 ) -> bool;
9345}
9346unsafe extern "C" {
9347 #[doc = " Check whether or not Unicode text input events are enabled for a window.\n\n **Parameter:** window the window to check.\n **Returns:** true if text input events are enabled else false.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StartTextInput\n"]
9348 pub fn SDL_TextInputActive(window: *mut SDL_Window) -> bool;
9349}
9350unsafe extern "C" {
9351 #[doc = " Stop receiving any text input events in a window.\n\n If SDL_StartTextInput() showed the screen keyboard, this function will hide\n it.\n\n **Parameter:** window the window to disable text input.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StartTextInput\n"]
9352 pub fn SDL_StopTextInput(window: *mut SDL_Window) -> bool;
9353}
9354unsafe extern "C" {
9355 #[doc = " Dismiss the composition window/IME without disabling the subsystem.\n\n **Parameter:** window the window to affect.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StartTextInput\n **See Also:** SDL_StopTextInput\n"]
9356 pub fn SDL_ClearComposition(window: *mut SDL_Window) -> bool;
9357}
9358unsafe extern "C" {
9359 #[doc = " Set the area used to type Unicode text input.\n\n Native input methods may place a window with word suggestions near the\n cursor, without covering the text being entered.\n\n **Parameter:** window the window for which to set the text input area.\n **Parameter:** rect the SDL_Rect representing the text input area, in window\n coordinates, or NULL to clear it.\n **Parameter:** cursor the offset of the current cursor location relative to\n `rect->x`, in window coordinates.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextInputArea\n **See Also:** SDL_StartTextInput\n"]
9360 pub fn SDL_SetTextInputArea(
9361 window: *mut SDL_Window,
9362 rect: *const SDL_Rect,
9363 cursor: core::ffi::c_int,
9364 ) -> bool;
9365}
9366unsafe extern "C" {
9367 #[doc = " Get the area used to type Unicode text input.\n\n This returns the values previously set by SDL_SetTextInputArea().\n\n **Parameter:** window the window for which to query the text input area.\n **Parameter:** rect a pointer to an SDL_Rect filled in with the text input area,\n may be NULL.\n **Parameter:** cursor a pointer to the offset of the current cursor location\n relative to `rect->x`, may be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTextInputArea\n"]
9368 pub fn SDL_GetTextInputArea(
9369 window: *mut SDL_Window,
9370 rect: *mut SDL_Rect,
9371 cursor: *mut core::ffi::c_int,
9372 ) -> bool;
9373}
9374unsafe extern "C" {
9375 #[doc = " Check whether the platform has screen keyboard support.\n\n **Returns:** true if the platform has some screen keyboard support or false if\n not.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StartTextInput\n **See Also:** SDL_ScreenKeyboardShown\n"]
9376 pub fn SDL_HasScreenKeyboardSupport() -> bool;
9377}
9378unsafe extern "C" {
9379 #[doc = " Check whether the screen keyboard is shown for given window.\n\n **Parameter:** window the window for which screen keyboard should be queried.\n **Returns:** true if screen keyboard is shown or false if not.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasScreenKeyboardSupport\n"]
9380 pub fn SDL_ScreenKeyboardShown(window: *mut SDL_Window) -> bool;
9381}
9382#[doc = " This is a unique ID for a mouse for the time it is connected to the system,\n and is never reused for the lifetime of the application.\n\n If the mouse is disconnected and reconnected, it will get a new ID.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
9383pub type SDL_MouseID = Uint32;
9384#[repr(C)]
9385#[derive(Debug, Copy, Clone)]
9386pub struct SDL_Cursor {
9387 _unused: [u8; 0],
9388}
9389impl SDL_SystemCursor {
9390 #[doc = "< Default cursor. Usually an arrow.\n"]
9391 pub const SDL_SYSTEM_CURSOR_DEFAULT: SDL_SystemCursor = SDL_SystemCursor(0);
9392 #[doc = "< Text selection. Usually an I-beam.\n"]
9393 pub const SDL_SYSTEM_CURSOR_TEXT: SDL_SystemCursor = SDL_SystemCursor(1);
9394 #[doc = "< Wait. Usually an hourglass or watch or spinning ball.\n"]
9395 pub const SDL_SYSTEM_CURSOR_WAIT: SDL_SystemCursor = SDL_SystemCursor(2);
9396 #[doc = "< Crosshair.\n"]
9397 pub const SDL_SYSTEM_CURSOR_CROSSHAIR: SDL_SystemCursor = SDL_SystemCursor(3);
9398 #[doc = "< Program is busy but still interactive. Usually it's WAIT with an arrow.\n"]
9399 pub const SDL_SYSTEM_CURSOR_PROGRESS: SDL_SystemCursor = SDL_SystemCursor(4);
9400 #[doc = "< Double arrow pointing northwest and southeast.\n"]
9401 pub const SDL_SYSTEM_CURSOR_NWSE_RESIZE: SDL_SystemCursor = SDL_SystemCursor(5);
9402 #[doc = "< Double arrow pointing northeast and southwest.\n"]
9403 pub const SDL_SYSTEM_CURSOR_NESW_RESIZE: SDL_SystemCursor = SDL_SystemCursor(6);
9404 #[doc = "< Double arrow pointing west and east.\n"]
9405 pub const SDL_SYSTEM_CURSOR_EW_RESIZE: SDL_SystemCursor = SDL_SystemCursor(7);
9406 #[doc = "< Double arrow pointing north and south.\n"]
9407 pub const SDL_SYSTEM_CURSOR_NS_RESIZE: SDL_SystemCursor = SDL_SystemCursor(8);
9408 #[doc = "< Four pointed arrow pointing north, south, east, and west.\n"]
9409 pub const SDL_SYSTEM_CURSOR_MOVE: SDL_SystemCursor = SDL_SystemCursor(9);
9410 #[doc = "< Not permitted. Usually a slashed circle or crossbones.\n"]
9411 pub const SDL_SYSTEM_CURSOR_NOT_ALLOWED: SDL_SystemCursor = SDL_SystemCursor(10);
9412 #[doc = "< Pointer that indicates a link. Usually a pointing hand.\n"]
9413 pub const SDL_SYSTEM_CURSOR_POINTER: SDL_SystemCursor = SDL_SystemCursor(11);
9414 #[doc = "< Window resize top-left. This may be a single arrow or a double arrow like NWSE_RESIZE.\n"]
9415 pub const SDL_SYSTEM_CURSOR_NW_RESIZE: SDL_SystemCursor = SDL_SystemCursor(12);
9416 #[doc = "< Window resize top. May be NS_RESIZE.\n"]
9417 pub const SDL_SYSTEM_CURSOR_N_RESIZE: SDL_SystemCursor = SDL_SystemCursor(13);
9418 #[doc = "< Window resize top-right. May be NESW_RESIZE.\n"]
9419 pub const SDL_SYSTEM_CURSOR_NE_RESIZE: SDL_SystemCursor = SDL_SystemCursor(14);
9420 #[doc = "< Window resize right. May be EW_RESIZE.\n"]
9421 pub const SDL_SYSTEM_CURSOR_E_RESIZE: SDL_SystemCursor = SDL_SystemCursor(15);
9422 #[doc = "< Window resize bottom-right. May be NWSE_RESIZE.\n"]
9423 pub const SDL_SYSTEM_CURSOR_SE_RESIZE: SDL_SystemCursor = SDL_SystemCursor(16);
9424 #[doc = "< Window resize bottom. May be NS_RESIZE.\n"]
9425 pub const SDL_SYSTEM_CURSOR_S_RESIZE: SDL_SystemCursor = SDL_SystemCursor(17);
9426 #[doc = "< Window resize bottom-left. May be NESW_RESIZE.\n"]
9427 pub const SDL_SYSTEM_CURSOR_SW_RESIZE: SDL_SystemCursor = SDL_SystemCursor(18);
9428 #[doc = "< Window resize left. May be EW_RESIZE.\n"]
9429 pub const SDL_SYSTEM_CURSOR_W_RESIZE: SDL_SystemCursor = SDL_SystemCursor(19);
9430 pub const SDL_SYSTEM_CURSOR_COUNT: SDL_SystemCursor = SDL_SystemCursor(20);
9431}
9432#[repr(transparent)]
9433#[doc = " Cursor types for SDL_CreateSystemCursor().\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
9434#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9435pub struct SDL_SystemCursor(pub core::ffi::c_uint);
9436impl SDL_MouseWheelDirection {
9437 #[doc = "< The scroll direction is normal\n"]
9438 pub const SDL_MOUSEWHEEL_NORMAL: SDL_MouseWheelDirection = SDL_MouseWheelDirection(0);
9439 #[doc = "< The scroll direction is flipped / natural\n"]
9440 pub const SDL_MOUSEWHEEL_FLIPPED: SDL_MouseWheelDirection = SDL_MouseWheelDirection(1);
9441}
9442#[repr(transparent)]
9443#[doc = " Scroll direction types for the Scroll event\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
9444#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9445pub struct SDL_MouseWheelDirection(pub core::ffi::c_uint);
9446#[doc = " Animated cursor frame info.\n\n **Available Since:** This struct is available since SDL 3.4.0.\n"]
9447#[repr(C)]
9448#[derive(Debug, Copy, Clone, Hash)]
9449pub struct SDL_CursorFrameInfo {
9450 #[doc = "< The surface data for this frame\n"]
9451 pub surface: *mut SDL_Surface,
9452 #[doc = "< The frame duration in milliseconds (a duration of 0 is infinite)\n"]
9453 pub duration: Uint32,
9454}
9455#[allow(clippy::unnecessary_operation, clippy::identity_op)]
9456const _: () = {
9457 ["Size of SDL_CursorFrameInfo"][::core::mem::size_of::<SDL_CursorFrameInfo>() - 16usize];
9458 ["Alignment of SDL_CursorFrameInfo"][::core::mem::align_of::<SDL_CursorFrameInfo>() - 8usize];
9459 ["Offset of field: SDL_CursorFrameInfo::surface"]
9460 [::core::mem::offset_of!(SDL_CursorFrameInfo, surface) - 0usize];
9461 ["Offset of field: SDL_CursorFrameInfo::duration"]
9462 [::core::mem::offset_of!(SDL_CursorFrameInfo, duration) - 8usize];
9463};
9464impl Default for SDL_CursorFrameInfo {
9465 fn default() -> Self {
9466 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
9467 unsafe {
9468 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
9469 s.assume_init()
9470 }
9471 }
9472}
9473#[doc = " A bitmask of pressed mouse buttons, as reported by SDL_GetMouseState, etc.\n\n - Button 1: Left mouse button\n - Button 2: Middle mouse button\n - Button 3: Right mouse button\n - Button 4: Side mouse button 1\n - Button 5: Side mouse button 2\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMouseState\n **See Also:** SDL_GetGlobalMouseState\n **See Also:** SDL_GetRelativeMouseState\n"]
9474pub type SDL_MouseButtonFlags = Uint32;
9475#[doc = " A callback used to transform mouse motion delta from raw values.\n\n This is called during SDL's handling of platform mouse events to scale the\n values of the resulting motion delta.\n\n **Parameter:** userdata what was passed as `userdata` to\n SDL_SetRelativeMouseTransform().\n **Parameter:** timestamp the associated time at which this mouse motion event was\n received.\n **Parameter:** window the associated window to which this mouse motion event was\n addressed.\n **Parameter:** mouseID the associated mouse from which this mouse motion event was\n emitted.\n **Parameter:** x pointer to a variable that will be treated as the resulting x-axis\n motion.\n **Parameter:** y pointer to a variable that will be treated as the resulting y-axis\n motion.\n\n **Thread Safety:** This callback is called by SDL's internal mouse input\n processing procedure, which may be a thread separate from the\n main event loop that is run at realtime priority. Stalling\n this thread with too much work in the callback can therefore\n potentially freeze the entire system. Care should be taken\n with proper synchronization practices when adding other side\n effects beyond mutation of the x and y values.\n\n **Available Since:** This datatype is available since SDL 3.4.0.\n\n **See Also:** SDL_SetRelativeMouseTransform\n"]
9476pub type SDL_MouseMotionTransformCallback = ::core::option::Option<
9477 unsafe extern "C" fn(
9478 userdata: *mut core::ffi::c_void,
9479 timestamp: Uint64,
9480 window: *mut SDL_Window,
9481 mouseID: SDL_MouseID,
9482 x: *mut f32,
9483 y: *mut f32,
9484 ),
9485>;
9486unsafe extern "C" {
9487 #[doc = " Return whether a mouse is currently connected.\n\n **Returns:** true if a mouse is connected, false otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMice\n"]
9488 pub fn SDL_HasMouse() -> bool;
9489}
9490unsafe extern "C" {
9491 #[doc = " Get a list of currently connected mice.\n\n Note that this will include any device or virtual driver that includes\n mouse functionality, including some game controllers, KVM switches, etc.\n You should wait for input from a device before you consider it actively in\n use.\n\n **Parameter:** count a pointer filled in with the number of mice returned, may be\n NULL.\n **Returns:** a 0 terminated array of mouse instance IDs or NULL on failure;\n call SDL_GetError() for more information. This should be freed\n with SDL_free() when it is no longer needed.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMouseNameForID\n **See Also:** SDL_HasMouse\n"]
9492 pub fn SDL_GetMice(count: *mut core::ffi::c_int) -> *mut SDL_MouseID;
9493}
9494unsafe extern "C" {
9495 #[doc = " Get the name of a mouse.\n\n This function returns \"\" if the mouse doesn't have a name.\n\n **Parameter:** instance_id the mouse instance ID.\n **Returns:** the name of the selected mouse, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMice\n"]
9496 pub fn SDL_GetMouseNameForID(instance_id: SDL_MouseID) -> *const core::ffi::c_char;
9497}
9498unsafe extern "C" {
9499 #[doc = " Get the window which currently has mouse focus.\n\n **Returns:** the window with mouse focus.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
9500 pub fn SDL_GetMouseFocus() -> *mut SDL_Window;
9501}
9502unsafe extern "C" {
9503 #[doc = " Query SDL's cache for the synchronous mouse button state and the\n window-relative SDL-cursor position.\n\n This function returns the cached synchronous state as SDL understands it\n from the last pump of the event queue.\n\n To query the platform for immediate asynchronous state, use\n SDL_GetGlobalMouseState.\n\n Passing non-NULL pointers to `x` or `y` will write the destination with\n respective x or y coordinates relative to the focused window.\n\n In Relative Mode, the SDL-cursor's position usually contradicts the\n platform-cursor's position as manually calculated from\n SDL_GetGlobalMouseState() and SDL_GetWindowPosition.\n\n **Parameter:** x a pointer to receive the SDL-cursor's x-position from the focused\n window's top left corner, can be NULL if unused.\n **Parameter:** y a pointer to receive the SDL-cursor's y-position from the focused\n window's top left corner, can be NULL if unused.\n **Returns:** a 32-bit bitmask of the button state that can be bitwise-compared\n against the SDL_BUTTON_MASK(X) macro.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGlobalMouseState\n **See Also:** SDL_GetRelativeMouseState\n"]
9504 pub fn SDL_GetMouseState(x: *mut f32, y: *mut f32) -> SDL_MouseButtonFlags;
9505}
9506unsafe extern "C" {
9507 #[doc = " Query the platform for the asynchronous mouse button state and the\n desktop-relative platform-cursor position.\n\n This function immediately queries the platform for the most recent\n asynchronous state, more costly than retrieving SDL's cached state in\n SDL_GetMouseState().\n\n Passing non-NULL pointers to `x` or `y` will write the destination with\n respective x or y coordinates relative to the desktop.\n\n In Relative Mode, the platform-cursor's position usually contradicts the\n SDL-cursor's position as manually calculated from SDL_GetMouseState() and\n SDL_GetWindowPosition.\n\n This function can be useful if you need to track the mouse outside of a\n specific window and SDL_CaptureMouse() doesn't fit your needs. For example,\n it could be useful if you need to track the mouse while dragging a window,\n where coordinates relative to a window might not be in sync at all times.\n\n **Parameter:** x a pointer to receive the platform-cursor's x-position from the\n desktop's top left corner, can be NULL if unused.\n **Parameter:** y a pointer to receive the platform-cursor's y-position from the\n desktop's top left corner, can be NULL if unused.\n **Returns:** a 32-bit bitmask of the button state that can be bitwise-compared\n against the SDL_BUTTON_MASK(X) macro.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CaptureMouse\n **See Also:** SDL_GetMouseState\n **See Also:** SDL_GetGlobalMouseState\n"]
9508 pub fn SDL_GetGlobalMouseState(x: *mut f32, y: *mut f32) -> SDL_MouseButtonFlags;
9509}
9510unsafe extern "C" {
9511 #[doc = " Query SDL's cache for the synchronous mouse button state and accumulated\n mouse delta since last call.\n\n This function returns the cached synchronous state as SDL understands it\n from the last pump of the event queue.\n\n To query the platform for immediate asynchronous state, use\n SDL_GetGlobalMouseState.\n\n Passing non-NULL pointers to `x` or `y` will write the destination with\n respective x or y deltas accumulated since the last call to this function\n (or since event initialization).\n\n This function is useful for reducing overhead by processing relative mouse\n inputs in one go per-frame instead of individually per-event, at the\n expense of losing the order between events within the frame (e.g. quickly\n pressing and releasing a button within the same frame).\n\n **Parameter:** x a pointer to receive the x mouse delta accumulated since last\n call, can be NULL if unused.\n **Parameter:** y a pointer to receive the y mouse delta accumulated since last\n call, can be NULL if unused.\n **Returns:** a 32-bit bitmask of the button state that can be bitwise-compared\n against the SDL_BUTTON_MASK(X) macro.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMouseState\n **See Also:** SDL_GetGlobalMouseState\n"]
9512 pub fn SDL_GetRelativeMouseState(x: *mut f32, y: *mut f32) -> SDL_MouseButtonFlags;
9513}
9514unsafe extern "C" {
9515 #[doc = " Move the mouse cursor to the given position within the window.\n\n This function generates a mouse motion event if relative mode is not\n enabled. If relative mode is enabled, you can force mouse events for the\n warp by setting the SDL_HINT_MOUSE_RELATIVE_WARP_MOTION hint.\n\n Note that this function will appear to succeed, but not actually move the\n mouse when used over Microsoft Remote Desktop.\n\n **Parameter:** window the window to move the mouse into, or NULL for the current\n mouse focus.\n **Parameter:** x the x coordinate within the window.\n **Parameter:** y the y coordinate within the window.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WarpMouseGlobal\n"]
9516 pub fn SDL_WarpMouseInWindow(window: *mut SDL_Window, x: f32, y: f32);
9517}
9518unsafe extern "C" {
9519 #[doc = " Move the mouse to the given position in global screen space.\n\n This function generates a mouse motion event.\n\n A failure of this function usually means that it is unsupported by a\n platform.\n\n Note that this function will appear to succeed, but not actually move the\n mouse when used over Microsoft Remote Desktop.\n\n **Parameter:** x the x coordinate.\n **Parameter:** y the y coordinate.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WarpMouseInWindow\n"]
9520 pub fn SDL_WarpMouseGlobal(x: f32, y: f32) -> bool;
9521}
9522unsafe extern "C" {
9523 #[doc = " Set a user-defined function by which to transform relative mouse inputs.\n\n This overrides the relative system scale and relative speed scale hints.\n Should be called prior to enabling relative mouse mode, fails otherwise.\n\n **Parameter:** callback a callback used to transform relative mouse motion, or NULL\n for default behavior.\n **Parameter:** userdata a pointer that will be passed to `callback`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
9524 pub fn SDL_SetRelativeMouseTransform(
9525 callback: SDL_MouseMotionTransformCallback,
9526 userdata: *mut core::ffi::c_void,
9527 ) -> bool;
9528}
9529unsafe extern "C" {
9530 #[doc = " Set relative mouse mode for a window.\n\n While the window has focus and relative mouse mode is enabled, the cursor\n is hidden, the mouse position is constrained to the window, and SDL will\n report continuous relative mouse motion even if the mouse is at the edge of\n the window.\n\n If you'd like to keep the mouse position fixed while in relative mode you\n can use SDL_SetWindowMouseRect(). If you'd like the cursor to be at a\n specific location when relative mode ends, you should use\n SDL_WarpMouseInWindow() before disabling relative mode.\n\n This function will flush any pending mouse motion for this window.\n\n **Parameter:** window the window to change.\n **Parameter:** enabled true to enable relative mode, false to disable.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetWindowRelativeMouseMode\n"]
9531 pub fn SDL_SetWindowRelativeMouseMode(window: *mut SDL_Window, enabled: bool) -> bool;
9532}
9533unsafe extern "C" {
9534 #[doc = " Query whether relative mouse mode is enabled for a window.\n\n **Parameter:** window the window to query.\n **Returns:** true if relative mode is enabled for a window or false otherwise.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetWindowRelativeMouseMode\n"]
9535 pub fn SDL_GetWindowRelativeMouseMode(window: *mut SDL_Window) -> bool;
9536}
9537unsafe extern "C" {
9538 #[doc = " Capture the mouse and to track input outside an SDL window.\n\n Capturing enables your app to obtain mouse events globally, instead of just\n within your window. Not all video targets support this function. When\n capturing is enabled, the current window will get all mouse events, but\n unlike relative mode, no change is made to the cursor and it is not\n restrained to your window.\n\n This function may also deny mouse input to other windows--both those in\n your application and others on the system--so you should use this function\n sparingly, and in small bursts. For example, you might want to track the\n mouse while the user is dragging something, until the user releases a mouse\n button. It is not recommended that you capture the mouse for long periods\n of time, such as the entire time your app is running. For that, you should\n probably use SDL_SetWindowRelativeMouseMode() or SDL_SetWindowMouseGrab(),\n depending on your goals.\n\n While captured, mouse events still report coordinates relative to the\n current (foreground) window, but those coordinates may be outside the\n bounds of the window (including negative values). Capturing is only allowed\n for the foreground window. If the window loses focus while capturing, the\n capture will be disabled automatically.\n\n While capturing is enabled, the current window will have the\n `SDL_WINDOW_MOUSE_CAPTURE` flag set.\n\n Please note that SDL will attempt to \"auto capture\" the mouse while the\n user is pressing a button; this is to try and make mouse behavior more\n consistent between platforms, and deal with the common case of a user\n dragging the mouse outside of the window. This means that if you are\n calling SDL_CaptureMouse() only to deal with this situation, you do not\n have to (although it is safe to do so). If this causes problems for your\n app, you can disable auto capture by setting the\n `SDL_HINT_MOUSE_AUTO_CAPTURE` hint to zero.\n\n **Parameter:** enabled true to enable capturing, false to disable.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGlobalMouseState\n"]
9539 pub fn SDL_CaptureMouse(enabled: bool) -> bool;
9540}
9541unsafe extern "C" {
9542 #[doc = " Create a cursor using the specified bitmap data and mask (in MSB format).\n\n `mask` has to be in MSB (Most Significant Bit) format.\n\n The cursor width (`w`) must be a multiple of 8 bits.\n\n The cursor is created in black and white according to the following:\n\n - data=0, mask=1: white\n - data=1, mask=1: black\n - data=0, mask=0: transparent\n - data=1, mask=0: inverted color if possible, black if not.\n\n Cursors created with this function must be freed with SDL_DestroyCursor().\n\n If you want to have a color cursor, or create your cursor from an\n SDL_Surface, you should use SDL_CreateColorCursor(). Alternately, you can\n hide the cursor and draw your own as part of your game's rendering, but it\n will be bound to the framerate.\n\n Also, SDL_CreateSystemCursor() is available, which provides several\n readily-available system cursors to pick from.\n\n **Parameter:** data the color value for each pixel of the cursor.\n **Parameter:** mask the mask value for each pixel of the cursor.\n **Parameter:** w the width of the cursor.\n **Parameter:** h the height of the cursor.\n **Parameter:** hot_x the x-axis offset from the left of the cursor image to the\n mouse x position, in the range of 0 to `w` - 1.\n **Parameter:** hot_y the y-axis offset from the top of the cursor image to the\n mouse y position, in the range of 0 to `h` - 1.\n **Returns:** a new cursor with the specified parameters on success or NULL on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateAnimatedCursor\n **See Also:** SDL_CreateColorCursor\n **See Also:** SDL_CreateSystemCursor\n **See Also:** SDL_DestroyCursor\n **See Also:** SDL_SetCursor\n"]
9543 pub fn SDL_CreateCursor(
9544 data: *const Uint8,
9545 mask: *const Uint8,
9546 w: core::ffi::c_int,
9547 h: core::ffi::c_int,
9548 hot_x: core::ffi::c_int,
9549 hot_y: core::ffi::c_int,
9550 ) -> *mut SDL_Cursor;
9551}
9552unsafe extern "C" {
9553 #[doc = " Create a color cursor.\n\n If this function is passed a surface with alternate representations added\n with SDL_AddSurfaceAlternateImage(), the surface will be interpreted as the\n content to be used for 100% display scale, and the alternate\n representations will be used for high DPI situations if\n SDL_HINT_MOUSE_DPI_SCALE_CURSORS is enabled. For example, if the original\n surface is 32x32, then on a 2x macOS display or 200% display scale on\n Windows, a 64x64 version of the image will be used, if available. If a\n matching version of the image isn't available, the closest larger size\n image will be downscaled to the appropriate size and be used instead, if\n available. Otherwise, the closest smaller image will be upscaled and be\n used instead.\n\n **Parameter:** surface an SDL_Surface structure representing the cursor image.\n **Parameter:** hot_x the x position of the cursor hot spot.\n **Parameter:** hot_y the y position of the cursor hot spot.\n **Returns:** the new cursor on success or NULL on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddSurfaceAlternateImage\n **See Also:** SDL_CreateAnimatedCursor\n **See Also:** SDL_CreateCursor\n **See Also:** SDL_CreateSystemCursor\n **See Also:** SDL_DestroyCursor\n **See Also:** SDL_SetCursor\n"]
9554 pub fn SDL_CreateColorCursor(
9555 surface: *mut SDL_Surface,
9556 hot_x: core::ffi::c_int,
9557 hot_y: core::ffi::c_int,
9558 ) -> *mut SDL_Cursor;
9559}
9560unsafe extern "C" {
9561 #[doc = " Create an animated color cursor.\n\n Animated cursors are composed of a sequential array of frames, specified as\n surfaces and durations in an array of SDL_CursorFrameInfo structs. The hot\n spot coordinates are universal to all frames, and all frames must have the\n same dimensions.\n\n Frame durations are specified in milliseconds. A duration of 0 implies an\n infinite frame time, and the animation will stop on that frame. To create a\n one-shot animation, set the duration of the last frame in the sequence to\n 0.\n\n If this function is passed surfaces with alternate representations added\n with SDL_AddSurfaceAlternateImage(), the surfaces will be interpreted as\n the content to be used for 100% display scale, and the alternate\n representations will be used for high DPI situations. For example, if the\n original surfaces are 32x32, then on a 2x macOS display or 200% display\n scale on Windows, a 64x64 version of the image will be used, if available.\n If a matching version of the image isn't available, the closest larger size\n image will be downscaled to the appropriate size and be used instead, if\n available. Otherwise, the closest smaller image will be upscaled and be\n used instead.\n\n If the underlying platform does not support animated cursors, this function\n will fall back to creating a static color cursor using the first frame in\n the sequence.\n\n **Parameter:** frames an array of cursor images composing the animation.\n **Parameter:** frame_count the number of frames in the sequence.\n **Parameter:** hot_x the x position of the cursor hot spot.\n **Parameter:** hot_y the y position of the cursor hot spot.\n **Returns:** the new cursor on success or NULL on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_AddSurfaceAlternateImage\n **See Also:** SDL_CreateCursor\n **See Also:** SDL_CreateColorCursor\n **See Also:** SDL_CreateSystemCursor\n **See Also:** SDL_DestroyCursor\n **See Also:** SDL_SetCursor\n"]
9562 pub fn SDL_CreateAnimatedCursor(
9563 frames: *mut SDL_CursorFrameInfo,
9564 frame_count: core::ffi::c_int,
9565 hot_x: core::ffi::c_int,
9566 hot_y: core::ffi::c_int,
9567 ) -> *mut SDL_Cursor;
9568}
9569unsafe extern "C" {
9570 #[doc = " Create a system cursor.\n\n **Parameter:** id an SDL_SystemCursor enum value.\n **Returns:** a cursor on success or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyCursor\n"]
9571 pub fn SDL_CreateSystemCursor(id: SDL_SystemCursor) -> *mut SDL_Cursor;
9572}
9573unsafe extern "C" {
9574 #[doc = " Set the active cursor.\n\n This function sets the currently active cursor to the specified one. If the\n cursor is currently visible, the change will be immediately represented on\n the display. SDL_SetCursor(NULL) can be used to force cursor redraw, if\n this is desired for any reason.\n\n **Parameter:** cursor a cursor to make active.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCursor\n"]
9575 pub fn SDL_SetCursor(cursor: *mut SDL_Cursor) -> bool;
9576}
9577unsafe extern "C" {
9578 #[doc = " Get the active cursor.\n\n This function returns a pointer to the current cursor which is owned by the\n library. It is not necessary to free the cursor with SDL_DestroyCursor().\n\n **Returns:** the active cursor or NULL if there is no mouse.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetCursor\n"]
9579 pub fn SDL_GetCursor() -> *mut SDL_Cursor;
9580}
9581unsafe extern "C" {
9582 #[doc = " Get the default cursor.\n\n You do not have to call SDL_DestroyCursor() on the return value, but it is\n safe to do so.\n\n **Returns:** the default cursor on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
9583 pub fn SDL_GetDefaultCursor() -> *mut SDL_Cursor;
9584}
9585unsafe extern "C" {
9586 #[doc = " Free a previously-created cursor.\n\n Use this function to free cursor resources created with SDL_CreateCursor(),\n SDL_CreateColorCursor() or SDL_CreateSystemCursor().\n\n **Parameter:** cursor the cursor to free.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateAnimatedCursor\n **See Also:** SDL_CreateColorCursor\n **See Also:** SDL_CreateCursor\n **See Also:** SDL_CreateSystemCursor\n"]
9587 pub fn SDL_DestroyCursor(cursor: *mut SDL_Cursor);
9588}
9589unsafe extern "C" {
9590 #[doc = " Show the cursor.\n\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CursorVisible\n **See Also:** SDL_HideCursor\n"]
9591 pub fn SDL_ShowCursor() -> bool;
9592}
9593unsafe extern "C" {
9594 #[doc = " Hide the cursor.\n\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CursorVisible\n **See Also:** SDL_ShowCursor\n"]
9595 pub fn SDL_HideCursor() -> bool;
9596}
9597unsafe extern "C" {
9598 #[doc = " Return whether the cursor is currently being shown.\n\n **Returns:** `true` if the cursor is being shown, or `false` if the cursor is\n hidden.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HideCursor\n **See Also:** SDL_ShowCursor\n"]
9599 pub fn SDL_CursorVisible() -> bool;
9600}
9601#[doc = " A unique ID for a touch device.\n\n This ID is valid for the time the device is connected to the system, and is\n never reused for the lifetime of the application.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
9602pub type SDL_TouchID = Uint64;
9603#[doc = " A unique ID for a single finger on a touch device.\n\n This ID is valid for the time the finger (stylus, etc) is touching and will\n be unique for all fingers currently in contact, so this ID tracks the\n lifetime of a single continuous touch. This value may represent an index, a\n pointer, or some other unique ID, depending on the platform.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
9604pub type SDL_FingerID = Uint64;
9605impl SDL_TouchDeviceType {
9606 pub const SDL_TOUCH_DEVICE_INVALID: SDL_TouchDeviceType = SDL_TouchDeviceType(-1);
9607 #[doc = "< touch screen with window-relative coordinates\n"]
9608 pub const SDL_TOUCH_DEVICE_DIRECT: SDL_TouchDeviceType = SDL_TouchDeviceType(0);
9609 #[doc = "< trackpad with absolute device coordinates\n"]
9610 pub const SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE: SDL_TouchDeviceType = SDL_TouchDeviceType(1);
9611 #[doc = "< trackpad with screen cursor-relative coordinates\n"]
9612 pub const SDL_TOUCH_DEVICE_INDIRECT_RELATIVE: SDL_TouchDeviceType = SDL_TouchDeviceType(2);
9613}
9614#[repr(transparent)]
9615#[doc = " An enum that describes the type of a touch device.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
9616#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9617pub struct SDL_TouchDeviceType(pub core::ffi::c_int);
9618#[doc = " Data about a single finger in a multitouch event.\n\n Each touch event is a collection of fingers that are simultaneously in\n contact with the touch device (so a \"touch\" can be a \"multitouch,\" in\n reality), and this struct reports details of the specific fingers.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTouchFingers\n"]
9619#[repr(C)]
9620#[derive(Debug, Default, Copy, Clone)]
9621pub struct SDL_Finger {
9622 #[doc = "< the finger ID\n"]
9623 pub id: SDL_FingerID,
9624 #[doc = "< the x-axis location of the touch event, normalized (0...1)\n"]
9625 pub x: f32,
9626 #[doc = "< the y-axis location of the touch event, normalized (0...1)\n"]
9627 pub y: f32,
9628 #[doc = "< the quantity of pressure applied, normalized (0...1)\n"]
9629 pub pressure: f32,
9630}
9631#[allow(clippy::unnecessary_operation, clippy::identity_op)]
9632const _: () = {
9633 ["Size of SDL_Finger"][::core::mem::size_of::<SDL_Finger>() - 24usize];
9634 ["Alignment of SDL_Finger"][::core::mem::align_of::<SDL_Finger>() - 8usize];
9635 ["Offset of field: SDL_Finger::id"][::core::mem::offset_of!(SDL_Finger, id) - 0usize];
9636 ["Offset of field: SDL_Finger::x"][::core::mem::offset_of!(SDL_Finger, x) - 8usize];
9637 ["Offset of field: SDL_Finger::y"][::core::mem::offset_of!(SDL_Finger, y) - 12usize];
9638 ["Offset of field: SDL_Finger::pressure"]
9639 [::core::mem::offset_of!(SDL_Finger, pressure) - 16usize];
9640};
9641unsafe extern "C" {
9642 #[doc = " Get a list of registered touch devices.\n\n On some platforms SDL first sees the touch device if it was actually used.\n Therefore the returned list might be empty, although devices are available.\n After using all devices at least once the number will be correct.\n\n **Parameter:** count a pointer filled in with the number of devices returned, may\n be NULL.\n **Returns:** a 0 terminated array of touch device IDs or NULL on failure; call\n SDL_GetError() for more information. This should be freed with\n SDL_free() when it is no longer needed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
9643 pub fn SDL_GetTouchDevices(count: *mut core::ffi::c_int) -> *mut SDL_TouchID;
9644}
9645unsafe extern "C" {
9646 #[doc = " Get the touch device name as reported from the driver.\n\n **Parameter:** touchID the touch device instance ID.\n **Returns:** touch device name, or NULL on failure; call SDL_GetError() for\n more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
9647 pub fn SDL_GetTouchDeviceName(touchID: SDL_TouchID) -> *const core::ffi::c_char;
9648}
9649unsafe extern "C" {
9650 #[doc = " Get the type of the given touch device.\n\n **Parameter:** touchID the ID of a touch device.\n **Returns:** touch device type.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
9651 pub fn SDL_GetTouchDeviceType(touchID: SDL_TouchID) -> SDL_TouchDeviceType;
9652}
9653unsafe extern "C" {
9654 #[doc = " Get a list of active fingers for a given touch device.\n\n **Parameter:** touchID the ID of a touch device.\n **Parameter:** count a pointer filled in with the number of fingers returned, can\n be NULL.\n **Returns:** a NULL terminated array of SDL_Finger pointers or NULL on failure;\n call SDL_GetError() for more information. This is a single\n allocation that should be freed with SDL_free() when it is no\n longer needed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
9655 pub fn SDL_GetTouchFingers(
9656 touchID: SDL_TouchID,
9657 count: *mut core::ffi::c_int,
9658 ) -> *mut *mut SDL_Finger;
9659}
9660#[doc = " SDL pen instance IDs.\n\n Zero is used to signify an invalid/null device.\n\n These show up in pen events when SDL sees input from them. They remain\n consistent as long as SDL can recognize a tool to be the same pen; but if a\n pen's digitizer table is physically detached from the computer, it might\n get a new ID when reconnected, as SDL won't know it's the same device.\n\n These IDs are only stable within a single run of a program; the next time a\n program is run, the pen's ID will likely be different, even if the hardware\n hasn't been disconnected, etc.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
9661pub type SDL_PenID = Uint32;
9662#[doc = " Pen input flags, as reported by various pen events' `pen_state` field.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
9663pub type SDL_PenInputFlags = Uint32;
9664impl SDL_PenAxis {
9665 #[doc = "< Pen pressure. Unidirectional: 0 to 1.0\n"]
9666 pub const SDL_PEN_AXIS_PRESSURE: SDL_PenAxis = SDL_PenAxis(0);
9667 #[doc = "< Pen horizontal tilt angle. Bidirectional: -90.0 to 90.0 (left-to-right).\n"]
9668 pub const SDL_PEN_AXIS_XTILT: SDL_PenAxis = SDL_PenAxis(1);
9669 #[doc = "< Pen vertical tilt angle. Bidirectional: -90.0 to 90.0 (top-to-down).\n"]
9670 pub const SDL_PEN_AXIS_YTILT: SDL_PenAxis = SDL_PenAxis(2);
9671 #[doc = "< Pen distance to drawing surface. Unidirectional: 0.0 to 1.0\n"]
9672 pub const SDL_PEN_AXIS_DISTANCE: SDL_PenAxis = SDL_PenAxis(3);
9673 #[doc = "< Pen barrel rotation. Bidirectional: -180 to 179.9 (clockwise, 0 is facing up, -180.0 is facing down).\n"]
9674 pub const SDL_PEN_AXIS_ROTATION: SDL_PenAxis = SDL_PenAxis(4);
9675 #[doc = "< Pen finger wheel or slider (e.g., Airbrush Pen). Unidirectional: 0 to 1.0\n"]
9676 pub const SDL_PEN_AXIS_SLIDER: SDL_PenAxis = SDL_PenAxis(5);
9677 #[doc = "< Pressure from squeezing the pen (\"barrel pressure\").\n"]
9678 pub const SDL_PEN_AXIS_TANGENTIAL_PRESSURE: SDL_PenAxis = SDL_PenAxis(6);
9679 #[doc = "< Total known pen axis types in this version of SDL. This number may grow in future releases!\n"]
9680 pub const SDL_PEN_AXIS_COUNT: SDL_PenAxis = SDL_PenAxis(7);
9681}
9682#[repr(transparent)]
9683#[doc = " Pen axis indices.\n\n These are the valid values for the `axis` field in SDL_PenAxisEvent. All\n axes are either normalised to 0..1 or report a (positive or negative) angle\n in degrees, with 0.0 representing the centre. Not all pens/backends support\n all axes: unsupported axes are always zero.\n\n To convert angles for tilt and rotation into vector representation, use\n SDL_sinf on the XTILT, YTILT, or ROTATION component, for example:\n\n `SDL_sinf(xtilt * SDL_PI_F / 180.0)`.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
9684#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9685pub struct SDL_PenAxis(pub core::ffi::c_uint);
9686impl SDL_PenDeviceType {
9687 #[doc = "< Not a valid pen device.\n"]
9688 pub const SDL_PEN_DEVICE_TYPE_INVALID: SDL_PenDeviceType = SDL_PenDeviceType(-1);
9689 #[doc = "< Don't know specifics of this pen.\n"]
9690 pub const SDL_PEN_DEVICE_TYPE_UNKNOWN: SDL_PenDeviceType = SDL_PenDeviceType(0);
9691 #[doc = "< Pen touches display.\n"]
9692 pub const SDL_PEN_DEVICE_TYPE_DIRECT: SDL_PenDeviceType = SDL_PenDeviceType(1);
9693 #[doc = "< Pen touches something that isn't the display.\n"]
9694 pub const SDL_PEN_DEVICE_TYPE_INDIRECT: SDL_PenDeviceType = SDL_PenDeviceType(2);
9695}
9696#[repr(transparent)]
9697#[doc = " An enum that describes the type of a pen device.\n\n A \"direct\" device is a pen that touches a graphic display (like an Apple\n Pencil on an iPad's screen). \"Indirect\" devices touch an external tablet\n surface that is connected to the machine but is not a display (like a\n lower-end Wacom tablet connected over USB).\n\n Apps may use this information to decide if they should draw a cursor; if\n the pen is touching the screen directly, a cursor doesn't make sense and\n can be in the way, but becomes necessary for indirect devices to know where\n on the display they are interacting.\n\n **Available Since:** This enum is available since SDL 3.4.0.\n"]
9698#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9699pub struct SDL_PenDeviceType(pub core::ffi::c_int);
9700unsafe extern "C" {
9701 #[doc = " Get the device type of the given pen.\n\n Many platforms do not supply this information, so an app must always be\n prepared to get an SDL_PEN_DEVICE_TYPE_UNKNOWN result.\n\n **Parameter:** instance_id the pen instance ID.\n **Returns:** the device type of the given pen, or SDL_PEN_DEVICE_TYPE_INVALID\n on failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
9702 pub fn SDL_GetPenDeviceType(instance_id: SDL_PenID) -> SDL_PenDeviceType;
9703}
9704impl SDL_EventType {
9705 #[doc = "< Unused (do not remove)\n"]
9706 pub const SDL_EVENT_FIRST: SDL_EventType = SDL_EventType(0);
9707 #[doc = "< User-requested quit\n"]
9708 pub const SDL_EVENT_QUIT: SDL_EventType = SDL_EventType(256);
9709 #[doc = "< The application is being terminated by the OS. This event must be handled in a callback set with SDL_AddEventWatch().\nCalled on iOS in applicationWillTerminate()\nCalled on Android in onDestroy()\n"]
9710 pub const SDL_EVENT_TERMINATING: SDL_EventType = SDL_EventType(257);
9711 #[doc = "< The application is low on memory, free memory if possible. This event must be handled in a callback set with SDL_AddEventWatch().\nCalled on iOS in applicationDidReceiveMemoryWarning()\nCalled on Android in onTrimMemory()\n"]
9712 pub const SDL_EVENT_LOW_MEMORY: SDL_EventType = SDL_EventType(258);
9713 #[doc = "< The application is about to enter the background. This event must be handled in a callback set with SDL_AddEventWatch().\nCalled on iOS in applicationWillResignActive()\nCalled on Android in onPause()\n"]
9714 pub const SDL_EVENT_WILL_ENTER_BACKGROUND: SDL_EventType = SDL_EventType(259);
9715 #[doc = "< The application did enter the background and may not get CPU for some time. This event must be handled in a callback set with SDL_AddEventWatch().\nCalled on iOS in applicationDidEnterBackground()\nCalled on Android in onPause()\n"]
9716 pub const SDL_EVENT_DID_ENTER_BACKGROUND: SDL_EventType = SDL_EventType(260);
9717 #[doc = "< The application is about to enter the foreground. This event must be handled in a callback set with SDL_AddEventWatch().\nCalled on iOS in applicationWillEnterForeground()\nCalled on Android in onResume()\n"]
9718 pub const SDL_EVENT_WILL_ENTER_FOREGROUND: SDL_EventType = SDL_EventType(261);
9719 #[doc = "< The application is now interactive. This event must be handled in a callback set with SDL_AddEventWatch().\nCalled on iOS in applicationDidBecomeActive()\nCalled on Android in onResume()\n"]
9720 pub const SDL_EVENT_DID_ENTER_FOREGROUND: SDL_EventType = SDL_EventType(262);
9721 #[doc = "< The user's locale preferences have changed.\n"]
9722 pub const SDL_EVENT_LOCALE_CHANGED: SDL_EventType = SDL_EventType(263);
9723 #[doc = "< The system theme changed\n"]
9724 pub const SDL_EVENT_SYSTEM_THEME_CHANGED: SDL_EventType = SDL_EventType(264);
9725 #[doc = "< Display orientation has changed to data1\n"]
9726 pub const SDL_EVENT_DISPLAY_ORIENTATION: SDL_EventType = SDL_EventType(337);
9727 #[doc = "< Display has been added to the system\n"]
9728 pub const SDL_EVENT_DISPLAY_ADDED: SDL_EventType = SDL_EventType(338);
9729 #[doc = "< Display has been removed from the system\n"]
9730 pub const SDL_EVENT_DISPLAY_REMOVED: SDL_EventType = SDL_EventType(339);
9731 #[doc = "< Display has changed position\n"]
9732 pub const SDL_EVENT_DISPLAY_MOVED: SDL_EventType = SDL_EventType(340);
9733 #[doc = "< Display has changed desktop mode\n"]
9734 pub const SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED: SDL_EventType = SDL_EventType(341);
9735 #[doc = "< Display has changed current mode\n"]
9736 pub const SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED: SDL_EventType = SDL_EventType(342);
9737 #[doc = "< Display has changed content scale\n"]
9738 pub const SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED: SDL_EventType = SDL_EventType(343);
9739 #[doc = "< Display has changed usable bounds\n"]
9740 pub const SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED: SDL_EventType = SDL_EventType(344);
9741 pub const SDL_EVENT_DISPLAY_FIRST: SDL_EventType = SDL_EventType(337);
9742 pub const SDL_EVENT_DISPLAY_LAST: SDL_EventType = SDL_EventType(344);
9743 #[doc = "< Window has been shown\n"]
9744 pub const SDL_EVENT_WINDOW_SHOWN: SDL_EventType = SDL_EventType(514);
9745 #[doc = "< Window has been hidden\n"]
9746 pub const SDL_EVENT_WINDOW_HIDDEN: SDL_EventType = SDL_EventType(515);
9747 #[doc = "< Window has been exposed and should be redrawn, and can be redrawn directly from event watchers for this event.\ndata1 is 1 for live-resize expose events, 0 otherwise.\n"]
9748 pub const SDL_EVENT_WINDOW_EXPOSED: SDL_EventType = SDL_EventType(516);
9749 #[doc = "< Window has been moved to data1, data2\n"]
9750 pub const SDL_EVENT_WINDOW_MOVED: SDL_EventType = SDL_EventType(517);
9751 #[doc = "< Window has been resized to data1xdata2\n"]
9752 pub const SDL_EVENT_WINDOW_RESIZED: SDL_EventType = SDL_EventType(518);
9753 #[doc = "< The pixel size of the window has changed to data1xdata2\n"]
9754 pub const SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED: SDL_EventType = SDL_EventType(519);
9755 #[doc = "< The pixel size of a Metal view associated with the window has changed\n"]
9756 pub const SDL_EVENT_WINDOW_METAL_VIEW_RESIZED: SDL_EventType = SDL_EventType(520);
9757 #[doc = "< Window has been minimized\n"]
9758 pub const SDL_EVENT_WINDOW_MINIMIZED: SDL_EventType = SDL_EventType(521);
9759 #[doc = "< Window has been maximized\n"]
9760 pub const SDL_EVENT_WINDOW_MAXIMIZED: SDL_EventType = SDL_EventType(522);
9761 #[doc = "< Window has been restored to normal size and position\n"]
9762 pub const SDL_EVENT_WINDOW_RESTORED: SDL_EventType = SDL_EventType(523);
9763 #[doc = "< Window has gained mouse focus\n"]
9764 pub const SDL_EVENT_WINDOW_MOUSE_ENTER: SDL_EventType = SDL_EventType(524);
9765 #[doc = "< Window has lost mouse focus\n"]
9766 pub const SDL_EVENT_WINDOW_MOUSE_LEAVE: SDL_EventType = SDL_EventType(525);
9767 #[doc = "< Window has gained keyboard focus\n"]
9768 pub const SDL_EVENT_WINDOW_FOCUS_GAINED: SDL_EventType = SDL_EventType(526);
9769 #[doc = "< Window has lost keyboard focus\n"]
9770 pub const SDL_EVENT_WINDOW_FOCUS_LOST: SDL_EventType = SDL_EventType(527);
9771 #[doc = "< The window manager requests that the window be closed\n"]
9772 pub const SDL_EVENT_WINDOW_CLOSE_REQUESTED: SDL_EventType = SDL_EventType(528);
9773 #[doc = "< Window had a hit test that wasn't SDL_HITTEST_NORMAL\n"]
9774 pub const SDL_EVENT_WINDOW_HIT_TEST: SDL_EventType = SDL_EventType(529);
9775 #[doc = "< The window's ICC profile has changed\n"]
9776 pub const SDL_EVENT_WINDOW_ICCPROF_CHANGED: SDL_EventType = SDL_EventType(530);
9777 #[doc = "< Window has been moved to display data1\n"]
9778 pub const SDL_EVENT_WINDOW_DISPLAY_CHANGED: SDL_EventType = SDL_EventType(531);
9779 #[doc = "< Window display scale has been changed\n"]
9780 pub const SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED: SDL_EventType = SDL_EventType(532);
9781 #[doc = "< The window safe area has been changed\n"]
9782 pub const SDL_EVENT_WINDOW_SAFE_AREA_CHANGED: SDL_EventType = SDL_EventType(533);
9783 #[doc = "< The window has been occluded\n"]
9784 pub const SDL_EVENT_WINDOW_OCCLUDED: SDL_EventType = SDL_EventType(534);
9785 #[doc = "< The window has entered fullscreen mode\n"]
9786 pub const SDL_EVENT_WINDOW_ENTER_FULLSCREEN: SDL_EventType = SDL_EventType(535);
9787 #[doc = "< The window has left fullscreen mode\n"]
9788 pub const SDL_EVENT_WINDOW_LEAVE_FULLSCREEN: SDL_EventType = SDL_EventType(536);
9789 #[doc = "< The window with the associated ID is being or has been destroyed. If this message is being handled\nin an event watcher, the window handle is still valid and can still be used to retrieve any properties\nassociated with the window. Otherwise, the handle has already been destroyed and all resources\nassociated with it are invalid\n"]
9790 pub const SDL_EVENT_WINDOW_DESTROYED: SDL_EventType = SDL_EventType(537);
9791 #[doc = "< Window HDR properties have changed\n"]
9792 pub const SDL_EVENT_WINDOW_HDR_STATE_CHANGED: SDL_EventType = SDL_EventType(538);
9793 pub const SDL_EVENT_WINDOW_FIRST: SDL_EventType = SDL_EventType(514);
9794 pub const SDL_EVENT_WINDOW_LAST: SDL_EventType = SDL_EventType(538);
9795 #[doc = "< Key pressed\n"]
9796 pub const SDL_EVENT_KEY_DOWN: SDL_EventType = SDL_EventType(768);
9797 #[doc = "< Key released\n"]
9798 pub const SDL_EVENT_KEY_UP: SDL_EventType = SDL_EventType(769);
9799 #[doc = "< Keyboard text editing (composition)\n"]
9800 pub const SDL_EVENT_TEXT_EDITING: SDL_EventType = SDL_EventType(770);
9801 #[doc = "< Keyboard text input\n"]
9802 pub const SDL_EVENT_TEXT_INPUT: SDL_EventType = SDL_EventType(771);
9803 #[doc = "< Keymap changed due to a system event such as an\ninput language or keyboard layout change.\n"]
9804 pub const SDL_EVENT_KEYMAP_CHANGED: SDL_EventType = SDL_EventType(772);
9805 #[doc = "< A new keyboard has been inserted into the system\n"]
9806 pub const SDL_EVENT_KEYBOARD_ADDED: SDL_EventType = SDL_EventType(773);
9807 #[doc = "< A keyboard has been removed\n"]
9808 pub const SDL_EVENT_KEYBOARD_REMOVED: SDL_EventType = SDL_EventType(774);
9809 #[doc = "< Keyboard text editing candidates\n"]
9810 pub const SDL_EVENT_TEXT_EDITING_CANDIDATES: SDL_EventType = SDL_EventType(775);
9811 #[doc = "< The on-screen keyboard has been shown\n"]
9812 pub const SDL_EVENT_SCREEN_KEYBOARD_SHOWN: SDL_EventType = SDL_EventType(776);
9813 #[doc = "< The on-screen keyboard has been hidden\n"]
9814 pub const SDL_EVENT_SCREEN_KEYBOARD_HIDDEN: SDL_EventType = SDL_EventType(777);
9815 #[doc = "< Mouse moved\n"]
9816 pub const SDL_EVENT_MOUSE_MOTION: SDL_EventType = SDL_EventType(1024);
9817 #[doc = "< Mouse button pressed\n"]
9818 pub const SDL_EVENT_MOUSE_BUTTON_DOWN: SDL_EventType = SDL_EventType(1025);
9819 #[doc = "< Mouse button released\n"]
9820 pub const SDL_EVENT_MOUSE_BUTTON_UP: SDL_EventType = SDL_EventType(1026);
9821 #[doc = "< Mouse wheel motion\n"]
9822 pub const SDL_EVENT_MOUSE_WHEEL: SDL_EventType = SDL_EventType(1027);
9823 #[doc = "< A new mouse has been inserted into the system\n"]
9824 pub const SDL_EVENT_MOUSE_ADDED: SDL_EventType = SDL_EventType(1028);
9825 #[doc = "< A mouse has been removed\n"]
9826 pub const SDL_EVENT_MOUSE_REMOVED: SDL_EventType = SDL_EventType(1029);
9827 #[doc = "< Joystick axis motion\n"]
9828 pub const SDL_EVENT_JOYSTICK_AXIS_MOTION: SDL_EventType = SDL_EventType(1536);
9829 #[doc = "< Joystick trackball motion\n"]
9830 pub const SDL_EVENT_JOYSTICK_BALL_MOTION: SDL_EventType = SDL_EventType(1537);
9831 #[doc = "< Joystick hat position change\n"]
9832 pub const SDL_EVENT_JOYSTICK_HAT_MOTION: SDL_EventType = SDL_EventType(1538);
9833 #[doc = "< Joystick button pressed\n"]
9834 pub const SDL_EVENT_JOYSTICK_BUTTON_DOWN: SDL_EventType = SDL_EventType(1539);
9835 #[doc = "< Joystick button released\n"]
9836 pub const SDL_EVENT_JOYSTICK_BUTTON_UP: SDL_EventType = SDL_EventType(1540);
9837 #[doc = "< A new joystick has been inserted into the system\n"]
9838 pub const SDL_EVENT_JOYSTICK_ADDED: SDL_EventType = SDL_EventType(1541);
9839 #[doc = "< An opened joystick has been removed\n"]
9840 pub const SDL_EVENT_JOYSTICK_REMOVED: SDL_EventType = SDL_EventType(1542);
9841 #[doc = "< Joystick battery level change\n"]
9842 pub const SDL_EVENT_JOYSTICK_BATTERY_UPDATED: SDL_EventType = SDL_EventType(1543);
9843 #[doc = "< Joystick update is complete\n"]
9844 pub const SDL_EVENT_JOYSTICK_UPDATE_COMPLETE: SDL_EventType = SDL_EventType(1544);
9845 #[doc = "< Gamepad axis motion\n"]
9846 pub const SDL_EVENT_GAMEPAD_AXIS_MOTION: SDL_EventType = SDL_EventType(1616);
9847 #[doc = "< Gamepad button pressed\n"]
9848 pub const SDL_EVENT_GAMEPAD_BUTTON_DOWN: SDL_EventType = SDL_EventType(1617);
9849 #[doc = "< Gamepad button released\n"]
9850 pub const SDL_EVENT_GAMEPAD_BUTTON_UP: SDL_EventType = SDL_EventType(1618);
9851 #[doc = "< A new gamepad has been inserted into the system\n"]
9852 pub const SDL_EVENT_GAMEPAD_ADDED: SDL_EventType = SDL_EventType(1619);
9853 #[doc = "< A gamepad has been removed\n"]
9854 pub const SDL_EVENT_GAMEPAD_REMOVED: SDL_EventType = SDL_EventType(1620);
9855 #[doc = "< The gamepad mapping was updated\n"]
9856 pub const SDL_EVENT_GAMEPAD_REMAPPED: SDL_EventType = SDL_EventType(1621);
9857 #[doc = "< Gamepad touchpad was touched\n"]
9858 pub const SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN: SDL_EventType = SDL_EventType(1622);
9859 #[doc = "< Gamepad touchpad finger was moved\n"]
9860 pub const SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION: SDL_EventType = SDL_EventType(1623);
9861 #[doc = "< Gamepad touchpad finger was lifted\n"]
9862 pub const SDL_EVENT_GAMEPAD_TOUCHPAD_UP: SDL_EventType = SDL_EventType(1624);
9863 #[doc = "< Gamepad sensor was updated\n"]
9864 pub const SDL_EVENT_GAMEPAD_SENSOR_UPDATE: SDL_EventType = SDL_EventType(1625);
9865 #[doc = "< Gamepad update is complete\n"]
9866 pub const SDL_EVENT_GAMEPAD_UPDATE_COMPLETE: SDL_EventType = SDL_EventType(1626);
9867 #[doc = "< Gamepad Steam handle has changed\n"]
9868 pub const SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED: SDL_EventType = SDL_EventType(1627);
9869 pub const SDL_EVENT_FINGER_DOWN: SDL_EventType = SDL_EventType(1792);
9870 pub const SDL_EVENT_FINGER_UP: SDL_EventType = SDL_EventType(1793);
9871 pub const SDL_EVENT_FINGER_MOTION: SDL_EventType = SDL_EventType(1794);
9872 pub const SDL_EVENT_FINGER_CANCELED: SDL_EventType = SDL_EventType(1795);
9873 #[doc = "< Pinch gesture started\n"]
9874 pub const SDL_EVENT_PINCH_BEGIN: SDL_EventType = SDL_EventType(1808);
9875 #[doc = "< Pinch gesture updated\n"]
9876 pub const SDL_EVENT_PINCH_UPDATE: SDL_EventType = SDL_EventType(1809);
9877 #[doc = "< Pinch gesture ended\n"]
9878 pub const SDL_EVENT_PINCH_END: SDL_EventType = SDL_EventType(1810);
9879 #[doc = "< The clipboard changed\n"]
9880 pub const SDL_EVENT_CLIPBOARD_UPDATE: SDL_EventType = SDL_EventType(2304);
9881 #[doc = "< The system requests a file open\n"]
9882 pub const SDL_EVENT_DROP_FILE: SDL_EventType = SDL_EventType(4096);
9883 #[doc = "< text/plain drag-and-drop event\n"]
9884 pub const SDL_EVENT_DROP_TEXT: SDL_EventType = SDL_EventType(4097);
9885 #[doc = "< A new set of drops is beginning (NULL filename)\n"]
9886 pub const SDL_EVENT_DROP_BEGIN: SDL_EventType = SDL_EventType(4098);
9887 #[doc = "< Current set of drops is now complete (NULL filename)\n"]
9888 pub const SDL_EVENT_DROP_COMPLETE: SDL_EventType = SDL_EventType(4099);
9889 #[doc = "< Position while moving over the window\n"]
9890 pub const SDL_EVENT_DROP_POSITION: SDL_EventType = SDL_EventType(4100);
9891 #[doc = "< A new audio device is available\n"]
9892 pub const SDL_EVENT_AUDIO_DEVICE_ADDED: SDL_EventType = SDL_EventType(4352);
9893 #[doc = "< An audio device has been removed.\n"]
9894 pub const SDL_EVENT_AUDIO_DEVICE_REMOVED: SDL_EventType = SDL_EventType(4353);
9895 #[doc = "< An audio device's format has been changed by the system.\n"]
9896 pub const SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED: SDL_EventType = SDL_EventType(4354);
9897 #[doc = "< A sensor was updated\n"]
9898 pub const SDL_EVENT_SENSOR_UPDATE: SDL_EventType = SDL_EventType(4608);
9899 #[doc = "< Pressure-sensitive pen has become available\n"]
9900 pub const SDL_EVENT_PEN_PROXIMITY_IN: SDL_EventType = SDL_EventType(4864);
9901 #[doc = "< Pressure-sensitive pen has become unavailable\n"]
9902 pub const SDL_EVENT_PEN_PROXIMITY_OUT: SDL_EventType = SDL_EventType(4865);
9903 #[doc = "< Pressure-sensitive pen touched drawing surface\n"]
9904 pub const SDL_EVENT_PEN_DOWN: SDL_EventType = SDL_EventType(4866);
9905 #[doc = "< Pressure-sensitive pen stopped touching drawing surface\n"]
9906 pub const SDL_EVENT_PEN_UP: SDL_EventType = SDL_EventType(4867);
9907 #[doc = "< Pressure-sensitive pen button pressed\n"]
9908 pub const SDL_EVENT_PEN_BUTTON_DOWN: SDL_EventType = SDL_EventType(4868);
9909 #[doc = "< Pressure-sensitive pen button released\n"]
9910 pub const SDL_EVENT_PEN_BUTTON_UP: SDL_EventType = SDL_EventType(4869);
9911 #[doc = "< Pressure-sensitive pen is moving on the tablet\n"]
9912 pub const SDL_EVENT_PEN_MOTION: SDL_EventType = SDL_EventType(4870);
9913 #[doc = "< Pressure-sensitive pen angle/pressure/etc changed\n"]
9914 pub const SDL_EVENT_PEN_AXIS: SDL_EventType = SDL_EventType(4871);
9915 #[doc = "< A new camera device is available\n"]
9916 pub const SDL_EVENT_CAMERA_DEVICE_ADDED: SDL_EventType = SDL_EventType(5120);
9917 #[doc = "< A camera device has been removed.\n"]
9918 pub const SDL_EVENT_CAMERA_DEVICE_REMOVED: SDL_EventType = SDL_EventType(5121);
9919 #[doc = "< A camera device has been approved for use by the user.\n"]
9920 pub const SDL_EVENT_CAMERA_DEVICE_APPROVED: SDL_EventType = SDL_EventType(5122);
9921 #[doc = "< A camera device has been denied for use by the user.\n"]
9922 pub const SDL_EVENT_CAMERA_DEVICE_DENIED: SDL_EventType = SDL_EventType(5123);
9923 #[doc = "< The render targets have been reset and their contents need to be updated\n"]
9924 pub const SDL_EVENT_RENDER_TARGETS_RESET: SDL_EventType = SDL_EventType(8192);
9925 #[doc = "< The device has been reset and all textures need to be recreated\n"]
9926 pub const SDL_EVENT_RENDER_DEVICE_RESET: SDL_EventType = SDL_EventType(8193);
9927 #[doc = "< The device has been lost and can't be recovered.\n"]
9928 pub const SDL_EVENT_RENDER_DEVICE_LOST: SDL_EventType = SDL_EventType(8194);
9929 pub const SDL_EVENT_PRIVATE0: SDL_EventType = SDL_EventType(16384);
9930 pub const SDL_EVENT_PRIVATE1: SDL_EventType = SDL_EventType(16385);
9931 pub const SDL_EVENT_PRIVATE2: SDL_EventType = SDL_EventType(16386);
9932 pub const SDL_EVENT_PRIVATE3: SDL_EventType = SDL_EventType(16387);
9933 #[doc = "< Signals the end of an event poll cycle\n"]
9934 pub const SDL_EVENT_POLL_SENTINEL: SDL_EventType = SDL_EventType(32512);
9935 #[doc = " Events SDL_EVENT_USER through SDL_EVENT_LAST are for your use,\n and should be allocated with SDL_RegisterEvents()\n"]
9936 pub const SDL_EVENT_USER: SDL_EventType = SDL_EventType(32768);
9937 #[doc = " This last event is only for bounding internal arrays\n"]
9938 pub const SDL_EVENT_LAST: SDL_EventType = SDL_EventType(65535);
9939 #[doc = " This last event is only for bounding internal arrays\n"]
9940 pub const SDL_EVENT_ENUM_PADDING: SDL_EventType = SDL_EventType(2147483647);
9941}
9942#[repr(transparent)]
9943#[doc = " The types of events that can be delivered.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
9944#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9945pub struct SDL_EventType(pub core::ffi::c_uint);
9946#[doc = " Fields shared by every event\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
9947#[repr(C)]
9948#[derive(Debug, Default, Copy, Clone, Hash)]
9949pub struct SDL_CommonEvent {
9950 #[doc = "< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration\n"]
9951 pub type_: Uint32,
9952 pub reserved: Uint32,
9953 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
9954 pub timestamp: Uint64,
9955}
9956#[allow(clippy::unnecessary_operation, clippy::identity_op)]
9957const _: () = {
9958 ["Size of SDL_CommonEvent"][::core::mem::size_of::<SDL_CommonEvent>() - 16usize];
9959 ["Alignment of SDL_CommonEvent"][::core::mem::align_of::<SDL_CommonEvent>() - 8usize];
9960 ["Offset of field: SDL_CommonEvent::type_"]
9961 [::core::mem::offset_of!(SDL_CommonEvent, type_) - 0usize];
9962 ["Offset of field: SDL_CommonEvent::reserved"]
9963 [::core::mem::offset_of!(SDL_CommonEvent, reserved) - 4usize];
9964 ["Offset of field: SDL_CommonEvent::timestamp"]
9965 [::core::mem::offset_of!(SDL_CommonEvent, timestamp) - 8usize];
9966};
9967#[doc = " Display state change event data (event.display.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
9968#[repr(C)]
9969#[derive(Debug, Copy, Clone, Hash)]
9970pub struct SDL_DisplayEvent {
9971 #[doc = "< SDL_EVENT_DISPLAY_*\n"]
9972 pub type_: SDL_EventType,
9973 pub reserved: Uint32,
9974 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
9975 pub timestamp: Uint64,
9976 #[doc = "< The associated display\n"]
9977 pub displayID: SDL_DisplayID,
9978 #[doc = "< event dependent data\n"]
9979 pub data1: Sint32,
9980 #[doc = "< event dependent data\n"]
9981 pub data2: Sint32,
9982}
9983#[allow(clippy::unnecessary_operation, clippy::identity_op)]
9984const _: () = {
9985 ["Size of SDL_DisplayEvent"][::core::mem::size_of::<SDL_DisplayEvent>() - 32usize];
9986 ["Alignment of SDL_DisplayEvent"][::core::mem::align_of::<SDL_DisplayEvent>() - 8usize];
9987 ["Offset of field: SDL_DisplayEvent::type_"]
9988 [::core::mem::offset_of!(SDL_DisplayEvent, type_) - 0usize];
9989 ["Offset of field: SDL_DisplayEvent::reserved"]
9990 [::core::mem::offset_of!(SDL_DisplayEvent, reserved) - 4usize];
9991 ["Offset of field: SDL_DisplayEvent::timestamp"]
9992 [::core::mem::offset_of!(SDL_DisplayEvent, timestamp) - 8usize];
9993 ["Offset of field: SDL_DisplayEvent::displayID"]
9994 [::core::mem::offset_of!(SDL_DisplayEvent, displayID) - 16usize];
9995 ["Offset of field: SDL_DisplayEvent::data1"]
9996 [::core::mem::offset_of!(SDL_DisplayEvent, data1) - 20usize];
9997 ["Offset of field: SDL_DisplayEvent::data2"]
9998 [::core::mem::offset_of!(SDL_DisplayEvent, data2) - 24usize];
9999};
10000impl Default for SDL_DisplayEvent {
10001 fn default() -> Self {
10002 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10003 unsafe {
10004 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10005 s.assume_init()
10006 }
10007 }
10008}
10009#[doc = " Window state change event data (event.window.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10010#[repr(C)]
10011#[derive(Debug, Copy, Clone, Hash)]
10012pub struct SDL_WindowEvent {
10013 #[doc = "< SDL_EVENT_WINDOW_*\n"]
10014 pub type_: SDL_EventType,
10015 pub reserved: Uint32,
10016 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10017 pub timestamp: Uint64,
10018 #[doc = "< The associated window\n"]
10019 pub windowID: SDL_WindowID,
10020 #[doc = "< event dependent data\n"]
10021 pub data1: Sint32,
10022 #[doc = "< event dependent data\n"]
10023 pub data2: Sint32,
10024}
10025#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10026const _: () = {
10027 ["Size of SDL_WindowEvent"][::core::mem::size_of::<SDL_WindowEvent>() - 32usize];
10028 ["Alignment of SDL_WindowEvent"][::core::mem::align_of::<SDL_WindowEvent>() - 8usize];
10029 ["Offset of field: SDL_WindowEvent::type_"]
10030 [::core::mem::offset_of!(SDL_WindowEvent, type_) - 0usize];
10031 ["Offset of field: SDL_WindowEvent::reserved"]
10032 [::core::mem::offset_of!(SDL_WindowEvent, reserved) - 4usize];
10033 ["Offset of field: SDL_WindowEvent::timestamp"]
10034 [::core::mem::offset_of!(SDL_WindowEvent, timestamp) - 8usize];
10035 ["Offset of field: SDL_WindowEvent::windowID"]
10036 [::core::mem::offset_of!(SDL_WindowEvent, windowID) - 16usize];
10037 ["Offset of field: SDL_WindowEvent::data1"]
10038 [::core::mem::offset_of!(SDL_WindowEvent, data1) - 20usize];
10039 ["Offset of field: SDL_WindowEvent::data2"]
10040 [::core::mem::offset_of!(SDL_WindowEvent, data2) - 24usize];
10041};
10042impl Default for SDL_WindowEvent {
10043 fn default() -> Self {
10044 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10045 unsafe {
10046 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10047 s.assume_init()
10048 }
10049 }
10050}
10051#[doc = " Keyboard device event structure (event.kdevice.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10052#[repr(C)]
10053#[derive(Debug, Copy, Clone, Hash)]
10054pub struct SDL_KeyboardDeviceEvent {
10055 #[doc = "< SDL_EVENT_KEYBOARD_ADDED or SDL_EVENT_KEYBOARD_REMOVED\n"]
10056 pub type_: SDL_EventType,
10057 pub reserved: Uint32,
10058 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10059 pub timestamp: Uint64,
10060 #[doc = "< The keyboard instance id\n"]
10061 pub which: SDL_KeyboardID,
10062}
10063#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10064const _: () = {
10065 ["Size of SDL_KeyboardDeviceEvent"]
10066 [::core::mem::size_of::<SDL_KeyboardDeviceEvent>() - 24usize];
10067 ["Alignment of SDL_KeyboardDeviceEvent"]
10068 [::core::mem::align_of::<SDL_KeyboardDeviceEvent>() - 8usize];
10069 ["Offset of field: SDL_KeyboardDeviceEvent::type_"]
10070 [::core::mem::offset_of!(SDL_KeyboardDeviceEvent, type_) - 0usize];
10071 ["Offset of field: SDL_KeyboardDeviceEvent::reserved"]
10072 [::core::mem::offset_of!(SDL_KeyboardDeviceEvent, reserved) - 4usize];
10073 ["Offset of field: SDL_KeyboardDeviceEvent::timestamp"]
10074 [::core::mem::offset_of!(SDL_KeyboardDeviceEvent, timestamp) - 8usize];
10075 ["Offset of field: SDL_KeyboardDeviceEvent::which"]
10076 [::core::mem::offset_of!(SDL_KeyboardDeviceEvent, which) - 16usize];
10077};
10078impl Default for SDL_KeyboardDeviceEvent {
10079 fn default() -> Self {
10080 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10081 unsafe {
10082 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10083 s.assume_init()
10084 }
10085 }
10086}
10087#[doc = " Keyboard button event structure (event.key.*)\n\n The `key` is the base SDL_Keycode generated by pressing the `scancode`\n using the current keyboard layout, applying any options specified in\n SDL_HINT_KEYCODE_OPTIONS. You can get the SDL_Keycode corresponding to the\n event scancode and modifiers directly from the keyboard layout, bypassing\n SDL_HINT_KEYCODE_OPTIONS, by calling SDL_GetKeyFromScancode().\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GetKeyFromScancode\n **See Also:** SDL_HINT_KEYCODE_OPTIONS\n"]
10088#[repr(C)]
10089#[derive(Debug, Copy, Clone, Hash)]
10090pub struct SDL_KeyboardEvent {
10091 #[doc = "< SDL_EVENT_KEY_DOWN or SDL_EVENT_KEY_UP\n"]
10092 pub type_: SDL_EventType,
10093 pub reserved: Uint32,
10094 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10095 pub timestamp: Uint64,
10096 #[doc = "< The window with keyboard focus, if any\n"]
10097 pub windowID: SDL_WindowID,
10098 #[doc = "< The keyboard instance id, or 0 if unknown or virtual\n"]
10099 pub which: SDL_KeyboardID,
10100 #[doc = "< SDL physical key code\n"]
10101 pub scancode: SDL_Scancode,
10102 #[doc = "< SDL virtual key code\n"]
10103 pub key: SDL_Keycode,
10104 #[doc = "< current key modifiers\n"]
10105 pub mod_: SDL_Keymod,
10106 #[doc = "< The platform dependent scancode for this event\n"]
10107 pub raw: Uint16,
10108 #[doc = "< true if the key is pressed\n"]
10109 pub down: bool,
10110 #[doc = "< true if this is a key repeat\n"]
10111 pub repeat: bool,
10112}
10113#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10114const _: () = {
10115 ["Size of SDL_KeyboardEvent"][::core::mem::size_of::<SDL_KeyboardEvent>() - 40usize];
10116 ["Alignment of SDL_KeyboardEvent"][::core::mem::align_of::<SDL_KeyboardEvent>() - 8usize];
10117 ["Offset of field: SDL_KeyboardEvent::type_"]
10118 [::core::mem::offset_of!(SDL_KeyboardEvent, type_) - 0usize];
10119 ["Offset of field: SDL_KeyboardEvent::reserved"]
10120 [::core::mem::offset_of!(SDL_KeyboardEvent, reserved) - 4usize];
10121 ["Offset of field: SDL_KeyboardEvent::timestamp"]
10122 [::core::mem::offset_of!(SDL_KeyboardEvent, timestamp) - 8usize];
10123 ["Offset of field: SDL_KeyboardEvent::windowID"]
10124 [::core::mem::offset_of!(SDL_KeyboardEvent, windowID) - 16usize];
10125 ["Offset of field: SDL_KeyboardEvent::which"]
10126 [::core::mem::offset_of!(SDL_KeyboardEvent, which) - 20usize];
10127 ["Offset of field: SDL_KeyboardEvent::scancode"]
10128 [::core::mem::offset_of!(SDL_KeyboardEvent, scancode) - 24usize];
10129 ["Offset of field: SDL_KeyboardEvent::key"]
10130 [::core::mem::offset_of!(SDL_KeyboardEvent, key) - 28usize];
10131 ["Offset of field: SDL_KeyboardEvent::mod_"]
10132 [::core::mem::offset_of!(SDL_KeyboardEvent, mod_) - 32usize];
10133 ["Offset of field: SDL_KeyboardEvent::raw"]
10134 [::core::mem::offset_of!(SDL_KeyboardEvent, raw) - 34usize];
10135 ["Offset of field: SDL_KeyboardEvent::down"]
10136 [::core::mem::offset_of!(SDL_KeyboardEvent, down) - 36usize];
10137 ["Offset of field: SDL_KeyboardEvent::repeat"]
10138 [::core::mem::offset_of!(SDL_KeyboardEvent, repeat) - 37usize];
10139};
10140impl Default for SDL_KeyboardEvent {
10141 fn default() -> Self {
10142 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10143 unsafe {
10144 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10145 s.assume_init()
10146 }
10147 }
10148}
10149#[doc = " Keyboard text editing event structure (event.edit.*)\n\n The start cursor is the position, in UTF-8 characters, where new typing\n will be inserted into the editing text. The length is the number of UTF-8\n characters that will be replaced by new typing.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10150#[repr(C)]
10151#[derive(Debug, Copy, Clone, Hash)]
10152pub struct SDL_TextEditingEvent {
10153 #[doc = "< SDL_EVENT_TEXT_EDITING\n"]
10154 pub type_: SDL_EventType,
10155 pub reserved: Uint32,
10156 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10157 pub timestamp: Uint64,
10158 #[doc = "< The window with keyboard focus, if any\n"]
10159 pub windowID: SDL_WindowID,
10160 #[doc = "< The editing text\n"]
10161 pub text: *const core::ffi::c_char,
10162 #[doc = "< The start cursor of selected editing text, or -1 if not set\n"]
10163 pub start: Sint32,
10164 #[doc = "< The length of selected editing text, or -1 if not set\n"]
10165 pub length: Sint32,
10166}
10167#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10168const _: () = {
10169 ["Size of SDL_TextEditingEvent"][::core::mem::size_of::<SDL_TextEditingEvent>() - 40usize];
10170 ["Alignment of SDL_TextEditingEvent"][::core::mem::align_of::<SDL_TextEditingEvent>() - 8usize];
10171 ["Offset of field: SDL_TextEditingEvent::type_"]
10172 [::core::mem::offset_of!(SDL_TextEditingEvent, type_) - 0usize];
10173 ["Offset of field: SDL_TextEditingEvent::reserved"]
10174 [::core::mem::offset_of!(SDL_TextEditingEvent, reserved) - 4usize];
10175 ["Offset of field: SDL_TextEditingEvent::timestamp"]
10176 [::core::mem::offset_of!(SDL_TextEditingEvent, timestamp) - 8usize];
10177 ["Offset of field: SDL_TextEditingEvent::windowID"]
10178 [::core::mem::offset_of!(SDL_TextEditingEvent, windowID) - 16usize];
10179 ["Offset of field: SDL_TextEditingEvent::text"]
10180 [::core::mem::offset_of!(SDL_TextEditingEvent, text) - 24usize];
10181 ["Offset of field: SDL_TextEditingEvent::start"]
10182 [::core::mem::offset_of!(SDL_TextEditingEvent, start) - 32usize];
10183 ["Offset of field: SDL_TextEditingEvent::length"]
10184 [::core::mem::offset_of!(SDL_TextEditingEvent, length) - 36usize];
10185};
10186impl Default for SDL_TextEditingEvent {
10187 fn default() -> Self {
10188 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10189 unsafe {
10190 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10191 s.assume_init()
10192 }
10193 }
10194}
10195#[doc = " Keyboard IME candidates event structure (event.edit_candidates.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10196#[repr(C)]
10197#[derive(Debug, Copy, Clone, Hash)]
10198pub struct SDL_TextEditingCandidatesEvent {
10199 #[doc = "< SDL_EVENT_TEXT_EDITING_CANDIDATES\n"]
10200 pub type_: SDL_EventType,
10201 pub reserved: Uint32,
10202 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10203 pub timestamp: Uint64,
10204 #[doc = "< The window with keyboard focus, if any\n"]
10205 pub windowID: SDL_WindowID,
10206 #[doc = "< The list of candidates, or NULL if there are no candidates available\n"]
10207 pub candidates: *const *const core::ffi::c_char,
10208 #[doc = "< The number of strings in `candidates`\n"]
10209 pub num_candidates: Sint32,
10210 #[doc = "< The index of the selected candidate, or -1 if no candidate is selected\n"]
10211 pub selected_candidate: Sint32,
10212 #[doc = "< true if the list is horizontal, false if it's vertical\n"]
10213 pub horizontal: bool,
10214 pub padding1: Uint8,
10215 pub padding2: Uint8,
10216 pub padding3: Uint8,
10217}
10218#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10219const _: () = {
10220 ["Size of SDL_TextEditingCandidatesEvent"]
10221 [::core::mem::size_of::<SDL_TextEditingCandidatesEvent>() - 48usize];
10222 ["Alignment of SDL_TextEditingCandidatesEvent"]
10223 [::core::mem::align_of::<SDL_TextEditingCandidatesEvent>() - 8usize];
10224 ["Offset of field: SDL_TextEditingCandidatesEvent::type_"]
10225 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, type_) - 0usize];
10226 ["Offset of field: SDL_TextEditingCandidatesEvent::reserved"]
10227 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, reserved) - 4usize];
10228 ["Offset of field: SDL_TextEditingCandidatesEvent::timestamp"]
10229 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, timestamp) - 8usize];
10230 ["Offset of field: SDL_TextEditingCandidatesEvent::windowID"]
10231 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, windowID) - 16usize];
10232 ["Offset of field: SDL_TextEditingCandidatesEvent::candidates"]
10233 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, candidates) - 24usize];
10234 ["Offset of field: SDL_TextEditingCandidatesEvent::num_candidates"]
10235 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, num_candidates) - 32usize];
10236 ["Offset of field: SDL_TextEditingCandidatesEvent::selected_candidate"]
10237 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, selected_candidate) - 36usize];
10238 ["Offset of field: SDL_TextEditingCandidatesEvent::horizontal"]
10239 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, horizontal) - 40usize];
10240 ["Offset of field: SDL_TextEditingCandidatesEvent::padding1"]
10241 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, padding1) - 41usize];
10242 ["Offset of field: SDL_TextEditingCandidatesEvent::padding2"]
10243 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, padding2) - 42usize];
10244 ["Offset of field: SDL_TextEditingCandidatesEvent::padding3"]
10245 [::core::mem::offset_of!(SDL_TextEditingCandidatesEvent, padding3) - 43usize];
10246};
10247impl Default for SDL_TextEditingCandidatesEvent {
10248 fn default() -> Self {
10249 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10250 unsafe {
10251 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10252 s.assume_init()
10253 }
10254 }
10255}
10256#[doc = " Keyboard text input event structure (event.text.*)\n\n This event will never be delivered unless text input is enabled by calling\n SDL_StartTextInput(). Text input is disabled by default!\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_StartTextInput\n **See Also:** SDL_StopTextInput\n"]
10257#[repr(C)]
10258#[derive(Debug, Copy, Clone, Hash)]
10259pub struct SDL_TextInputEvent {
10260 #[doc = "< SDL_EVENT_TEXT_INPUT\n"]
10261 pub type_: SDL_EventType,
10262 pub reserved: Uint32,
10263 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10264 pub timestamp: Uint64,
10265 #[doc = "< The window with keyboard focus, if any\n"]
10266 pub windowID: SDL_WindowID,
10267 #[doc = "< The input text, UTF-8 encoded\n"]
10268 pub text: *const core::ffi::c_char,
10269}
10270#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10271const _: () = {
10272 ["Size of SDL_TextInputEvent"][::core::mem::size_of::<SDL_TextInputEvent>() - 32usize];
10273 ["Alignment of SDL_TextInputEvent"][::core::mem::align_of::<SDL_TextInputEvent>() - 8usize];
10274 ["Offset of field: SDL_TextInputEvent::type_"]
10275 [::core::mem::offset_of!(SDL_TextInputEvent, type_) - 0usize];
10276 ["Offset of field: SDL_TextInputEvent::reserved"]
10277 [::core::mem::offset_of!(SDL_TextInputEvent, reserved) - 4usize];
10278 ["Offset of field: SDL_TextInputEvent::timestamp"]
10279 [::core::mem::offset_of!(SDL_TextInputEvent, timestamp) - 8usize];
10280 ["Offset of field: SDL_TextInputEvent::windowID"]
10281 [::core::mem::offset_of!(SDL_TextInputEvent, windowID) - 16usize];
10282 ["Offset of field: SDL_TextInputEvent::text"]
10283 [::core::mem::offset_of!(SDL_TextInputEvent, text) - 24usize];
10284};
10285impl Default for SDL_TextInputEvent {
10286 fn default() -> Self {
10287 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10288 unsafe {
10289 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10290 s.assume_init()
10291 }
10292 }
10293}
10294#[doc = " Mouse device event structure (event.mdevice.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10295#[repr(C)]
10296#[derive(Debug, Copy, Clone, Hash)]
10297pub struct SDL_MouseDeviceEvent {
10298 #[doc = "< SDL_EVENT_MOUSE_ADDED or SDL_EVENT_MOUSE_REMOVED\n"]
10299 pub type_: SDL_EventType,
10300 pub reserved: Uint32,
10301 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10302 pub timestamp: Uint64,
10303 #[doc = "< The mouse instance id\n"]
10304 pub which: SDL_MouseID,
10305}
10306#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10307const _: () = {
10308 ["Size of SDL_MouseDeviceEvent"][::core::mem::size_of::<SDL_MouseDeviceEvent>() - 24usize];
10309 ["Alignment of SDL_MouseDeviceEvent"][::core::mem::align_of::<SDL_MouseDeviceEvent>() - 8usize];
10310 ["Offset of field: SDL_MouseDeviceEvent::type_"]
10311 [::core::mem::offset_of!(SDL_MouseDeviceEvent, type_) - 0usize];
10312 ["Offset of field: SDL_MouseDeviceEvent::reserved"]
10313 [::core::mem::offset_of!(SDL_MouseDeviceEvent, reserved) - 4usize];
10314 ["Offset of field: SDL_MouseDeviceEvent::timestamp"]
10315 [::core::mem::offset_of!(SDL_MouseDeviceEvent, timestamp) - 8usize];
10316 ["Offset of field: SDL_MouseDeviceEvent::which"]
10317 [::core::mem::offset_of!(SDL_MouseDeviceEvent, which) - 16usize];
10318};
10319impl Default for SDL_MouseDeviceEvent {
10320 fn default() -> Self {
10321 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10322 unsafe {
10323 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10324 s.assume_init()
10325 }
10326 }
10327}
10328#[doc = " Mouse motion event structure (event.motion.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10329#[repr(C)]
10330#[derive(Debug, Copy, Clone)]
10331pub struct SDL_MouseMotionEvent {
10332 #[doc = "< SDL_EVENT_MOUSE_MOTION\n"]
10333 pub type_: SDL_EventType,
10334 pub reserved: Uint32,
10335 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10336 pub timestamp: Uint64,
10337 #[doc = "< The window with mouse focus, if any\n"]
10338 pub windowID: SDL_WindowID,
10339 #[doc = "< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0\n"]
10340 pub which: SDL_MouseID,
10341 #[doc = "< The current button state\n"]
10342 pub state: SDL_MouseButtonFlags,
10343 #[doc = "< X coordinate, relative to window\n"]
10344 pub x: f32,
10345 #[doc = "< Y coordinate, relative to window\n"]
10346 pub y: f32,
10347 #[doc = "< The relative motion in the X direction\n"]
10348 pub xrel: f32,
10349 #[doc = "< The relative motion in the Y direction\n"]
10350 pub yrel: f32,
10351}
10352#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10353const _: () = {
10354 ["Size of SDL_MouseMotionEvent"][::core::mem::size_of::<SDL_MouseMotionEvent>() - 48usize];
10355 ["Alignment of SDL_MouseMotionEvent"][::core::mem::align_of::<SDL_MouseMotionEvent>() - 8usize];
10356 ["Offset of field: SDL_MouseMotionEvent::type_"]
10357 [::core::mem::offset_of!(SDL_MouseMotionEvent, type_) - 0usize];
10358 ["Offset of field: SDL_MouseMotionEvent::reserved"]
10359 [::core::mem::offset_of!(SDL_MouseMotionEvent, reserved) - 4usize];
10360 ["Offset of field: SDL_MouseMotionEvent::timestamp"]
10361 [::core::mem::offset_of!(SDL_MouseMotionEvent, timestamp) - 8usize];
10362 ["Offset of field: SDL_MouseMotionEvent::windowID"]
10363 [::core::mem::offset_of!(SDL_MouseMotionEvent, windowID) - 16usize];
10364 ["Offset of field: SDL_MouseMotionEvent::which"]
10365 [::core::mem::offset_of!(SDL_MouseMotionEvent, which) - 20usize];
10366 ["Offset of field: SDL_MouseMotionEvent::state"]
10367 [::core::mem::offset_of!(SDL_MouseMotionEvent, state) - 24usize];
10368 ["Offset of field: SDL_MouseMotionEvent::x"]
10369 [::core::mem::offset_of!(SDL_MouseMotionEvent, x) - 28usize];
10370 ["Offset of field: SDL_MouseMotionEvent::y"]
10371 [::core::mem::offset_of!(SDL_MouseMotionEvent, y) - 32usize];
10372 ["Offset of field: SDL_MouseMotionEvent::xrel"]
10373 [::core::mem::offset_of!(SDL_MouseMotionEvent, xrel) - 36usize];
10374 ["Offset of field: SDL_MouseMotionEvent::yrel"]
10375 [::core::mem::offset_of!(SDL_MouseMotionEvent, yrel) - 40usize];
10376};
10377impl Default for SDL_MouseMotionEvent {
10378 fn default() -> Self {
10379 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10380 unsafe {
10381 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10382 s.assume_init()
10383 }
10384 }
10385}
10386#[doc = " Mouse button event structure (event.button.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10387#[repr(C)]
10388#[derive(Debug, Copy, Clone)]
10389pub struct SDL_MouseButtonEvent {
10390 #[doc = "< SDL_EVENT_MOUSE_BUTTON_DOWN or SDL_EVENT_MOUSE_BUTTON_UP\n"]
10391 pub type_: SDL_EventType,
10392 pub reserved: Uint32,
10393 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10394 pub timestamp: Uint64,
10395 #[doc = "< The window with mouse focus, if any\n"]
10396 pub windowID: SDL_WindowID,
10397 #[doc = "< The mouse instance id in relative mode, SDL_TOUCH_MOUSEID for touch events, or 0\n"]
10398 pub which: SDL_MouseID,
10399 #[doc = "< The mouse button index\n"]
10400 pub button: Uint8,
10401 #[doc = "< true if the button is pressed\n"]
10402 pub down: bool,
10403 #[doc = "< 1 for single-click, 2 for double-click, etc.\n"]
10404 pub clicks: Uint8,
10405 pub padding: Uint8,
10406 #[doc = "< X coordinate, relative to window\n"]
10407 pub x: f32,
10408 #[doc = "< Y coordinate, relative to window\n"]
10409 pub y: f32,
10410}
10411#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10412const _: () = {
10413 ["Size of SDL_MouseButtonEvent"][::core::mem::size_of::<SDL_MouseButtonEvent>() - 40usize];
10414 ["Alignment of SDL_MouseButtonEvent"][::core::mem::align_of::<SDL_MouseButtonEvent>() - 8usize];
10415 ["Offset of field: SDL_MouseButtonEvent::type_"]
10416 [::core::mem::offset_of!(SDL_MouseButtonEvent, type_) - 0usize];
10417 ["Offset of field: SDL_MouseButtonEvent::reserved"]
10418 [::core::mem::offset_of!(SDL_MouseButtonEvent, reserved) - 4usize];
10419 ["Offset of field: SDL_MouseButtonEvent::timestamp"]
10420 [::core::mem::offset_of!(SDL_MouseButtonEvent, timestamp) - 8usize];
10421 ["Offset of field: SDL_MouseButtonEvent::windowID"]
10422 [::core::mem::offset_of!(SDL_MouseButtonEvent, windowID) - 16usize];
10423 ["Offset of field: SDL_MouseButtonEvent::which"]
10424 [::core::mem::offset_of!(SDL_MouseButtonEvent, which) - 20usize];
10425 ["Offset of field: SDL_MouseButtonEvent::button"]
10426 [::core::mem::offset_of!(SDL_MouseButtonEvent, button) - 24usize];
10427 ["Offset of field: SDL_MouseButtonEvent::down"]
10428 [::core::mem::offset_of!(SDL_MouseButtonEvent, down) - 25usize];
10429 ["Offset of field: SDL_MouseButtonEvent::clicks"]
10430 [::core::mem::offset_of!(SDL_MouseButtonEvent, clicks) - 26usize];
10431 ["Offset of field: SDL_MouseButtonEvent::padding"]
10432 [::core::mem::offset_of!(SDL_MouseButtonEvent, padding) - 27usize];
10433 ["Offset of field: SDL_MouseButtonEvent::x"]
10434 [::core::mem::offset_of!(SDL_MouseButtonEvent, x) - 28usize];
10435 ["Offset of field: SDL_MouseButtonEvent::y"]
10436 [::core::mem::offset_of!(SDL_MouseButtonEvent, y) - 32usize];
10437};
10438impl Default for SDL_MouseButtonEvent {
10439 fn default() -> Self {
10440 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10441 unsafe {
10442 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10443 s.assume_init()
10444 }
10445 }
10446}
10447#[doc = " Mouse wheel event structure (event.wheel.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10448#[repr(C)]
10449#[derive(Debug, Copy, Clone)]
10450pub struct SDL_MouseWheelEvent {
10451 #[doc = "< SDL_EVENT_MOUSE_WHEEL\n"]
10452 pub type_: SDL_EventType,
10453 pub reserved: Uint32,
10454 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10455 pub timestamp: Uint64,
10456 #[doc = "< The window with mouse focus, if any\n"]
10457 pub windowID: SDL_WindowID,
10458 #[doc = "< The mouse instance id in relative mode or 0\n"]
10459 pub which: SDL_MouseID,
10460 #[doc = "< The amount scrolled horizontally, positive to the right and negative to the left\n"]
10461 pub x: f32,
10462 #[doc = "< The amount scrolled vertically, positive away from the user and negative toward the user\n"]
10463 pub y: f32,
10464 #[doc = "< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back\n"]
10465 pub direction: SDL_MouseWheelDirection,
10466 #[doc = "< X coordinate, relative to window\n"]
10467 pub mouse_x: f32,
10468 #[doc = "< Y coordinate, relative to window\n"]
10469 pub mouse_y: f32,
10470 #[doc = "< The amount scrolled horizontally, accumulated to whole scroll \"ticks\" (added in 3.2.12)\n"]
10471 pub integer_x: Sint32,
10472 #[doc = "< The amount scrolled vertically, accumulated to whole scroll \"ticks\" (added in 3.2.12)\n"]
10473 pub integer_y: Sint32,
10474}
10475#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10476const _: () = {
10477 ["Size of SDL_MouseWheelEvent"][::core::mem::size_of::<SDL_MouseWheelEvent>() - 56usize];
10478 ["Alignment of SDL_MouseWheelEvent"][::core::mem::align_of::<SDL_MouseWheelEvent>() - 8usize];
10479 ["Offset of field: SDL_MouseWheelEvent::type_"]
10480 [::core::mem::offset_of!(SDL_MouseWheelEvent, type_) - 0usize];
10481 ["Offset of field: SDL_MouseWheelEvent::reserved"]
10482 [::core::mem::offset_of!(SDL_MouseWheelEvent, reserved) - 4usize];
10483 ["Offset of field: SDL_MouseWheelEvent::timestamp"]
10484 [::core::mem::offset_of!(SDL_MouseWheelEvent, timestamp) - 8usize];
10485 ["Offset of field: SDL_MouseWheelEvent::windowID"]
10486 [::core::mem::offset_of!(SDL_MouseWheelEvent, windowID) - 16usize];
10487 ["Offset of field: SDL_MouseWheelEvent::which"]
10488 [::core::mem::offset_of!(SDL_MouseWheelEvent, which) - 20usize];
10489 ["Offset of field: SDL_MouseWheelEvent::x"]
10490 [::core::mem::offset_of!(SDL_MouseWheelEvent, x) - 24usize];
10491 ["Offset of field: SDL_MouseWheelEvent::y"]
10492 [::core::mem::offset_of!(SDL_MouseWheelEvent, y) - 28usize];
10493 ["Offset of field: SDL_MouseWheelEvent::direction"]
10494 [::core::mem::offset_of!(SDL_MouseWheelEvent, direction) - 32usize];
10495 ["Offset of field: SDL_MouseWheelEvent::mouse_x"]
10496 [::core::mem::offset_of!(SDL_MouseWheelEvent, mouse_x) - 36usize];
10497 ["Offset of field: SDL_MouseWheelEvent::mouse_y"]
10498 [::core::mem::offset_of!(SDL_MouseWheelEvent, mouse_y) - 40usize];
10499 ["Offset of field: SDL_MouseWheelEvent::integer_x"]
10500 [::core::mem::offset_of!(SDL_MouseWheelEvent, integer_x) - 44usize];
10501 ["Offset of field: SDL_MouseWheelEvent::integer_y"]
10502 [::core::mem::offset_of!(SDL_MouseWheelEvent, integer_y) - 48usize];
10503};
10504impl Default for SDL_MouseWheelEvent {
10505 fn default() -> Self {
10506 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10507 unsafe {
10508 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10509 s.assume_init()
10510 }
10511 }
10512}
10513#[doc = " Joystick axis motion event structure (event.jaxis.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10514#[repr(C)]
10515#[derive(Debug, Copy, Clone, Hash)]
10516pub struct SDL_JoyAxisEvent {
10517 #[doc = "< SDL_EVENT_JOYSTICK_AXIS_MOTION\n"]
10518 pub type_: SDL_EventType,
10519 pub reserved: Uint32,
10520 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10521 pub timestamp: Uint64,
10522 #[doc = "< The joystick instance id\n"]
10523 pub which: SDL_JoystickID,
10524 #[doc = "< The joystick axis index\n"]
10525 pub axis: Uint8,
10526 pub padding1: Uint8,
10527 pub padding2: Uint8,
10528 pub padding3: Uint8,
10529 #[doc = "< The axis value (range: -32768 to 32767)\n"]
10530 pub value: Sint16,
10531 pub padding4: Uint16,
10532}
10533#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10534const _: () = {
10535 ["Size of SDL_JoyAxisEvent"][::core::mem::size_of::<SDL_JoyAxisEvent>() - 32usize];
10536 ["Alignment of SDL_JoyAxisEvent"][::core::mem::align_of::<SDL_JoyAxisEvent>() - 8usize];
10537 ["Offset of field: SDL_JoyAxisEvent::type_"]
10538 [::core::mem::offset_of!(SDL_JoyAxisEvent, type_) - 0usize];
10539 ["Offset of field: SDL_JoyAxisEvent::reserved"]
10540 [::core::mem::offset_of!(SDL_JoyAxisEvent, reserved) - 4usize];
10541 ["Offset of field: SDL_JoyAxisEvent::timestamp"]
10542 [::core::mem::offset_of!(SDL_JoyAxisEvent, timestamp) - 8usize];
10543 ["Offset of field: SDL_JoyAxisEvent::which"]
10544 [::core::mem::offset_of!(SDL_JoyAxisEvent, which) - 16usize];
10545 ["Offset of field: SDL_JoyAxisEvent::axis"]
10546 [::core::mem::offset_of!(SDL_JoyAxisEvent, axis) - 20usize];
10547 ["Offset of field: SDL_JoyAxisEvent::padding1"]
10548 [::core::mem::offset_of!(SDL_JoyAxisEvent, padding1) - 21usize];
10549 ["Offset of field: SDL_JoyAxisEvent::padding2"]
10550 [::core::mem::offset_of!(SDL_JoyAxisEvent, padding2) - 22usize];
10551 ["Offset of field: SDL_JoyAxisEvent::padding3"]
10552 [::core::mem::offset_of!(SDL_JoyAxisEvent, padding3) - 23usize];
10553 ["Offset of field: SDL_JoyAxisEvent::value"]
10554 [::core::mem::offset_of!(SDL_JoyAxisEvent, value) - 24usize];
10555 ["Offset of field: SDL_JoyAxisEvent::padding4"]
10556 [::core::mem::offset_of!(SDL_JoyAxisEvent, padding4) - 26usize];
10557};
10558impl Default for SDL_JoyAxisEvent {
10559 fn default() -> Self {
10560 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10561 unsafe {
10562 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10563 s.assume_init()
10564 }
10565 }
10566}
10567#[doc = " Joystick trackball motion event structure (event.jball.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10568#[repr(C)]
10569#[derive(Debug, Copy, Clone, Hash)]
10570pub struct SDL_JoyBallEvent {
10571 #[doc = "< SDL_EVENT_JOYSTICK_BALL_MOTION\n"]
10572 pub type_: SDL_EventType,
10573 pub reserved: Uint32,
10574 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10575 pub timestamp: Uint64,
10576 #[doc = "< The joystick instance id\n"]
10577 pub which: SDL_JoystickID,
10578 #[doc = "< The joystick trackball index\n"]
10579 pub ball: Uint8,
10580 pub padding1: Uint8,
10581 pub padding2: Uint8,
10582 pub padding3: Uint8,
10583 #[doc = "< The relative motion in the X direction\n"]
10584 pub xrel: Sint16,
10585 #[doc = "< The relative motion in the Y direction\n"]
10586 pub yrel: Sint16,
10587}
10588#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10589const _: () = {
10590 ["Size of SDL_JoyBallEvent"][::core::mem::size_of::<SDL_JoyBallEvent>() - 32usize];
10591 ["Alignment of SDL_JoyBallEvent"][::core::mem::align_of::<SDL_JoyBallEvent>() - 8usize];
10592 ["Offset of field: SDL_JoyBallEvent::type_"]
10593 [::core::mem::offset_of!(SDL_JoyBallEvent, type_) - 0usize];
10594 ["Offset of field: SDL_JoyBallEvent::reserved"]
10595 [::core::mem::offset_of!(SDL_JoyBallEvent, reserved) - 4usize];
10596 ["Offset of field: SDL_JoyBallEvent::timestamp"]
10597 [::core::mem::offset_of!(SDL_JoyBallEvent, timestamp) - 8usize];
10598 ["Offset of field: SDL_JoyBallEvent::which"]
10599 [::core::mem::offset_of!(SDL_JoyBallEvent, which) - 16usize];
10600 ["Offset of field: SDL_JoyBallEvent::ball"]
10601 [::core::mem::offset_of!(SDL_JoyBallEvent, ball) - 20usize];
10602 ["Offset of field: SDL_JoyBallEvent::padding1"]
10603 [::core::mem::offset_of!(SDL_JoyBallEvent, padding1) - 21usize];
10604 ["Offset of field: SDL_JoyBallEvent::padding2"]
10605 [::core::mem::offset_of!(SDL_JoyBallEvent, padding2) - 22usize];
10606 ["Offset of field: SDL_JoyBallEvent::padding3"]
10607 [::core::mem::offset_of!(SDL_JoyBallEvent, padding3) - 23usize];
10608 ["Offset of field: SDL_JoyBallEvent::xrel"]
10609 [::core::mem::offset_of!(SDL_JoyBallEvent, xrel) - 24usize];
10610 ["Offset of field: SDL_JoyBallEvent::yrel"]
10611 [::core::mem::offset_of!(SDL_JoyBallEvent, yrel) - 26usize];
10612};
10613impl Default for SDL_JoyBallEvent {
10614 fn default() -> Self {
10615 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10616 unsafe {
10617 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10618 s.assume_init()
10619 }
10620 }
10621}
10622#[doc = " Joystick hat position change event structure (event.jhat.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10623#[repr(C)]
10624#[derive(Debug, Copy, Clone, Hash)]
10625pub struct SDL_JoyHatEvent {
10626 #[doc = "< SDL_EVENT_JOYSTICK_HAT_MOTION\n"]
10627 pub type_: SDL_EventType,
10628 pub reserved: Uint32,
10629 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10630 pub timestamp: Uint64,
10631 #[doc = "< The joystick instance id\n"]
10632 pub which: SDL_JoystickID,
10633 #[doc = "< The joystick hat index\n"]
10634 pub hat: Uint8,
10635 #[doc = "< The hat position value.\n **See Also:** SDL_HAT_LEFTUP SDL_HAT_UP SDL_HAT_RIGHTUP\n **See Also:** SDL_HAT_LEFT SDL_HAT_CENTERED SDL_HAT_RIGHT\n **See Also:** SDL_HAT_LEFTDOWN SDL_HAT_DOWN SDL_HAT_RIGHTDOWN\n\n Note that zero means the POV is centered.\n"]
10636 pub value: Uint8,
10637 pub padding1: Uint8,
10638 pub padding2: Uint8,
10639}
10640#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10641const _: () = {
10642 ["Size of SDL_JoyHatEvent"][::core::mem::size_of::<SDL_JoyHatEvent>() - 24usize];
10643 ["Alignment of SDL_JoyHatEvent"][::core::mem::align_of::<SDL_JoyHatEvent>() - 8usize];
10644 ["Offset of field: SDL_JoyHatEvent::type_"]
10645 [::core::mem::offset_of!(SDL_JoyHatEvent, type_) - 0usize];
10646 ["Offset of field: SDL_JoyHatEvent::reserved"]
10647 [::core::mem::offset_of!(SDL_JoyHatEvent, reserved) - 4usize];
10648 ["Offset of field: SDL_JoyHatEvent::timestamp"]
10649 [::core::mem::offset_of!(SDL_JoyHatEvent, timestamp) - 8usize];
10650 ["Offset of field: SDL_JoyHatEvent::which"]
10651 [::core::mem::offset_of!(SDL_JoyHatEvent, which) - 16usize];
10652 ["Offset of field: SDL_JoyHatEvent::hat"]
10653 [::core::mem::offset_of!(SDL_JoyHatEvent, hat) - 20usize];
10654 ["Offset of field: SDL_JoyHatEvent::value"]
10655 [::core::mem::offset_of!(SDL_JoyHatEvent, value) - 21usize];
10656 ["Offset of field: SDL_JoyHatEvent::padding1"]
10657 [::core::mem::offset_of!(SDL_JoyHatEvent, padding1) - 22usize];
10658 ["Offset of field: SDL_JoyHatEvent::padding2"]
10659 [::core::mem::offset_of!(SDL_JoyHatEvent, padding2) - 23usize];
10660};
10661impl Default for SDL_JoyHatEvent {
10662 fn default() -> Self {
10663 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10664 unsafe {
10665 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10666 s.assume_init()
10667 }
10668 }
10669}
10670#[doc = " Joystick button event structure (event.jbutton.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10671#[repr(C)]
10672#[derive(Debug, Copy, Clone, Hash)]
10673pub struct SDL_JoyButtonEvent {
10674 #[doc = "< SDL_EVENT_JOYSTICK_BUTTON_DOWN or SDL_EVENT_JOYSTICK_BUTTON_UP\n"]
10675 pub type_: SDL_EventType,
10676 pub reserved: Uint32,
10677 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10678 pub timestamp: Uint64,
10679 #[doc = "< The joystick instance id\n"]
10680 pub which: SDL_JoystickID,
10681 #[doc = "< The joystick button index\n"]
10682 pub button: Uint8,
10683 #[doc = "< true if the button is pressed\n"]
10684 pub down: bool,
10685 pub padding1: Uint8,
10686 pub padding2: Uint8,
10687}
10688#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10689const _: () = {
10690 ["Size of SDL_JoyButtonEvent"][::core::mem::size_of::<SDL_JoyButtonEvent>() - 24usize];
10691 ["Alignment of SDL_JoyButtonEvent"][::core::mem::align_of::<SDL_JoyButtonEvent>() - 8usize];
10692 ["Offset of field: SDL_JoyButtonEvent::type_"]
10693 [::core::mem::offset_of!(SDL_JoyButtonEvent, type_) - 0usize];
10694 ["Offset of field: SDL_JoyButtonEvent::reserved"]
10695 [::core::mem::offset_of!(SDL_JoyButtonEvent, reserved) - 4usize];
10696 ["Offset of field: SDL_JoyButtonEvent::timestamp"]
10697 [::core::mem::offset_of!(SDL_JoyButtonEvent, timestamp) - 8usize];
10698 ["Offset of field: SDL_JoyButtonEvent::which"]
10699 [::core::mem::offset_of!(SDL_JoyButtonEvent, which) - 16usize];
10700 ["Offset of field: SDL_JoyButtonEvent::button"]
10701 [::core::mem::offset_of!(SDL_JoyButtonEvent, button) - 20usize];
10702 ["Offset of field: SDL_JoyButtonEvent::down"]
10703 [::core::mem::offset_of!(SDL_JoyButtonEvent, down) - 21usize];
10704 ["Offset of field: SDL_JoyButtonEvent::padding1"]
10705 [::core::mem::offset_of!(SDL_JoyButtonEvent, padding1) - 22usize];
10706 ["Offset of field: SDL_JoyButtonEvent::padding2"]
10707 [::core::mem::offset_of!(SDL_JoyButtonEvent, padding2) - 23usize];
10708};
10709impl Default for SDL_JoyButtonEvent {
10710 fn default() -> Self {
10711 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10712 unsafe {
10713 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10714 s.assume_init()
10715 }
10716 }
10717}
10718#[doc = " Joystick device event structure (event.jdevice.*)\n\n SDL will send JOYSTICK_ADDED events for devices that are already plugged in\n during SDL_Init.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GamepadDeviceEvent\n"]
10719#[repr(C)]
10720#[derive(Debug, Copy, Clone, Hash)]
10721pub struct SDL_JoyDeviceEvent {
10722 #[doc = "< SDL_EVENT_JOYSTICK_ADDED or SDL_EVENT_JOYSTICK_REMOVED or SDL_EVENT_JOYSTICK_UPDATE_COMPLETE\n"]
10723 pub type_: SDL_EventType,
10724 pub reserved: Uint32,
10725 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10726 pub timestamp: Uint64,
10727 #[doc = "< The joystick instance id\n"]
10728 pub which: SDL_JoystickID,
10729}
10730#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10731const _: () = {
10732 ["Size of SDL_JoyDeviceEvent"][::core::mem::size_of::<SDL_JoyDeviceEvent>() - 24usize];
10733 ["Alignment of SDL_JoyDeviceEvent"][::core::mem::align_of::<SDL_JoyDeviceEvent>() - 8usize];
10734 ["Offset of field: SDL_JoyDeviceEvent::type_"]
10735 [::core::mem::offset_of!(SDL_JoyDeviceEvent, type_) - 0usize];
10736 ["Offset of field: SDL_JoyDeviceEvent::reserved"]
10737 [::core::mem::offset_of!(SDL_JoyDeviceEvent, reserved) - 4usize];
10738 ["Offset of field: SDL_JoyDeviceEvent::timestamp"]
10739 [::core::mem::offset_of!(SDL_JoyDeviceEvent, timestamp) - 8usize];
10740 ["Offset of field: SDL_JoyDeviceEvent::which"]
10741 [::core::mem::offset_of!(SDL_JoyDeviceEvent, which) - 16usize];
10742};
10743impl Default for SDL_JoyDeviceEvent {
10744 fn default() -> Self {
10745 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10746 unsafe {
10747 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10748 s.assume_init()
10749 }
10750 }
10751}
10752#[doc = " Joystick battery level change event structure (event.jbattery.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10753#[repr(C)]
10754#[derive(Debug, Copy, Clone, Hash)]
10755pub struct SDL_JoyBatteryEvent {
10756 #[doc = "< SDL_EVENT_JOYSTICK_BATTERY_UPDATED\n"]
10757 pub type_: SDL_EventType,
10758 pub reserved: Uint32,
10759 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10760 pub timestamp: Uint64,
10761 #[doc = "< The joystick instance id\n"]
10762 pub which: SDL_JoystickID,
10763 #[doc = "< The joystick battery state\n"]
10764 pub state: SDL_PowerState,
10765 #[doc = "< The joystick battery percent charge remaining\n"]
10766 pub percent: core::ffi::c_int,
10767}
10768#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10769const _: () = {
10770 ["Size of SDL_JoyBatteryEvent"][::core::mem::size_of::<SDL_JoyBatteryEvent>() - 32usize];
10771 ["Alignment of SDL_JoyBatteryEvent"][::core::mem::align_of::<SDL_JoyBatteryEvent>() - 8usize];
10772 ["Offset of field: SDL_JoyBatteryEvent::type_"]
10773 [::core::mem::offset_of!(SDL_JoyBatteryEvent, type_) - 0usize];
10774 ["Offset of field: SDL_JoyBatteryEvent::reserved"]
10775 [::core::mem::offset_of!(SDL_JoyBatteryEvent, reserved) - 4usize];
10776 ["Offset of field: SDL_JoyBatteryEvent::timestamp"]
10777 [::core::mem::offset_of!(SDL_JoyBatteryEvent, timestamp) - 8usize];
10778 ["Offset of field: SDL_JoyBatteryEvent::which"]
10779 [::core::mem::offset_of!(SDL_JoyBatteryEvent, which) - 16usize];
10780 ["Offset of field: SDL_JoyBatteryEvent::state"]
10781 [::core::mem::offset_of!(SDL_JoyBatteryEvent, state) - 20usize];
10782 ["Offset of field: SDL_JoyBatteryEvent::percent"]
10783 [::core::mem::offset_of!(SDL_JoyBatteryEvent, percent) - 24usize];
10784};
10785impl Default for SDL_JoyBatteryEvent {
10786 fn default() -> Self {
10787 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10788 unsafe {
10789 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10790 s.assume_init()
10791 }
10792 }
10793}
10794#[doc = " Gamepad axis motion event structure (event.gaxis.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10795#[repr(C)]
10796#[derive(Debug, Copy, Clone, Hash)]
10797pub struct SDL_GamepadAxisEvent {
10798 #[doc = "< SDL_EVENT_GAMEPAD_AXIS_MOTION\n"]
10799 pub type_: SDL_EventType,
10800 pub reserved: Uint32,
10801 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10802 pub timestamp: Uint64,
10803 #[doc = "< The joystick instance id\n"]
10804 pub which: SDL_JoystickID,
10805 #[doc = "< The gamepad axis (SDL_GamepadAxis)\n"]
10806 pub axis: Uint8,
10807 pub padding1: Uint8,
10808 pub padding2: Uint8,
10809 pub padding3: Uint8,
10810 #[doc = "< The axis value (range: -32768 to 32767)\n"]
10811 pub value: Sint16,
10812 pub padding4: Uint16,
10813}
10814#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10815const _: () = {
10816 ["Size of SDL_GamepadAxisEvent"][::core::mem::size_of::<SDL_GamepadAxisEvent>() - 32usize];
10817 ["Alignment of SDL_GamepadAxisEvent"][::core::mem::align_of::<SDL_GamepadAxisEvent>() - 8usize];
10818 ["Offset of field: SDL_GamepadAxisEvent::type_"]
10819 [::core::mem::offset_of!(SDL_GamepadAxisEvent, type_) - 0usize];
10820 ["Offset of field: SDL_GamepadAxisEvent::reserved"]
10821 [::core::mem::offset_of!(SDL_GamepadAxisEvent, reserved) - 4usize];
10822 ["Offset of field: SDL_GamepadAxisEvent::timestamp"]
10823 [::core::mem::offset_of!(SDL_GamepadAxisEvent, timestamp) - 8usize];
10824 ["Offset of field: SDL_GamepadAxisEvent::which"]
10825 [::core::mem::offset_of!(SDL_GamepadAxisEvent, which) - 16usize];
10826 ["Offset of field: SDL_GamepadAxisEvent::axis"]
10827 [::core::mem::offset_of!(SDL_GamepadAxisEvent, axis) - 20usize];
10828 ["Offset of field: SDL_GamepadAxisEvent::padding1"]
10829 [::core::mem::offset_of!(SDL_GamepadAxisEvent, padding1) - 21usize];
10830 ["Offset of field: SDL_GamepadAxisEvent::padding2"]
10831 [::core::mem::offset_of!(SDL_GamepadAxisEvent, padding2) - 22usize];
10832 ["Offset of field: SDL_GamepadAxisEvent::padding3"]
10833 [::core::mem::offset_of!(SDL_GamepadAxisEvent, padding3) - 23usize];
10834 ["Offset of field: SDL_GamepadAxisEvent::value"]
10835 [::core::mem::offset_of!(SDL_GamepadAxisEvent, value) - 24usize];
10836 ["Offset of field: SDL_GamepadAxisEvent::padding4"]
10837 [::core::mem::offset_of!(SDL_GamepadAxisEvent, padding4) - 26usize];
10838};
10839impl Default for SDL_GamepadAxisEvent {
10840 fn default() -> Self {
10841 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10842 unsafe {
10843 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10844 s.assume_init()
10845 }
10846 }
10847}
10848#[doc = " Gamepad button event structure (event.gbutton.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10849#[repr(C)]
10850#[derive(Debug, Copy, Clone, Hash)]
10851pub struct SDL_GamepadButtonEvent {
10852 #[doc = "< SDL_EVENT_GAMEPAD_BUTTON_DOWN or SDL_EVENT_GAMEPAD_BUTTON_UP\n"]
10853 pub type_: SDL_EventType,
10854 pub reserved: Uint32,
10855 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10856 pub timestamp: Uint64,
10857 #[doc = "< The joystick instance id\n"]
10858 pub which: SDL_JoystickID,
10859 #[doc = "< The gamepad button (SDL_GamepadButton)\n"]
10860 pub button: Uint8,
10861 #[doc = "< true if the button is pressed\n"]
10862 pub down: bool,
10863 pub padding1: Uint8,
10864 pub padding2: Uint8,
10865}
10866#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10867const _: () = {
10868 ["Size of SDL_GamepadButtonEvent"][::core::mem::size_of::<SDL_GamepadButtonEvent>() - 24usize];
10869 ["Alignment of SDL_GamepadButtonEvent"]
10870 [::core::mem::align_of::<SDL_GamepadButtonEvent>() - 8usize];
10871 ["Offset of field: SDL_GamepadButtonEvent::type_"]
10872 [::core::mem::offset_of!(SDL_GamepadButtonEvent, type_) - 0usize];
10873 ["Offset of field: SDL_GamepadButtonEvent::reserved"]
10874 [::core::mem::offset_of!(SDL_GamepadButtonEvent, reserved) - 4usize];
10875 ["Offset of field: SDL_GamepadButtonEvent::timestamp"]
10876 [::core::mem::offset_of!(SDL_GamepadButtonEvent, timestamp) - 8usize];
10877 ["Offset of field: SDL_GamepadButtonEvent::which"]
10878 [::core::mem::offset_of!(SDL_GamepadButtonEvent, which) - 16usize];
10879 ["Offset of field: SDL_GamepadButtonEvent::button"]
10880 [::core::mem::offset_of!(SDL_GamepadButtonEvent, button) - 20usize];
10881 ["Offset of field: SDL_GamepadButtonEvent::down"]
10882 [::core::mem::offset_of!(SDL_GamepadButtonEvent, down) - 21usize];
10883 ["Offset of field: SDL_GamepadButtonEvent::padding1"]
10884 [::core::mem::offset_of!(SDL_GamepadButtonEvent, padding1) - 22usize];
10885 ["Offset of field: SDL_GamepadButtonEvent::padding2"]
10886 [::core::mem::offset_of!(SDL_GamepadButtonEvent, padding2) - 23usize];
10887};
10888impl Default for SDL_GamepadButtonEvent {
10889 fn default() -> Self {
10890 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10891 unsafe {
10892 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10893 s.assume_init()
10894 }
10895 }
10896}
10897#[doc = " Gamepad device event structure (event.gdevice.*)\n\n Joysticks that are supported gamepads receive both an SDL_JoyDeviceEvent\n and an SDL_GamepadDeviceEvent.\n\n SDL will send GAMEPAD_ADDED events for joysticks that are already plugged\n in during SDL_Init() and are recognized as gamepads. It will also send\n events for joysticks that get gamepad mappings at runtime.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_JoyDeviceEvent\n"]
10898#[repr(C)]
10899#[derive(Debug, Copy, Clone, Hash)]
10900pub struct SDL_GamepadDeviceEvent {
10901 #[doc = "< SDL_EVENT_GAMEPAD_ADDED, SDL_EVENT_GAMEPAD_REMOVED, or SDL_EVENT_GAMEPAD_REMAPPED, SDL_EVENT_GAMEPAD_UPDATE_COMPLETE or SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED\n"]
10902 pub type_: SDL_EventType,
10903 pub reserved: Uint32,
10904 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10905 pub timestamp: Uint64,
10906 #[doc = "< The joystick instance id\n"]
10907 pub which: SDL_JoystickID,
10908}
10909#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10910const _: () = {
10911 ["Size of SDL_GamepadDeviceEvent"][::core::mem::size_of::<SDL_GamepadDeviceEvent>() - 24usize];
10912 ["Alignment of SDL_GamepadDeviceEvent"]
10913 [::core::mem::align_of::<SDL_GamepadDeviceEvent>() - 8usize];
10914 ["Offset of field: SDL_GamepadDeviceEvent::type_"]
10915 [::core::mem::offset_of!(SDL_GamepadDeviceEvent, type_) - 0usize];
10916 ["Offset of field: SDL_GamepadDeviceEvent::reserved"]
10917 [::core::mem::offset_of!(SDL_GamepadDeviceEvent, reserved) - 4usize];
10918 ["Offset of field: SDL_GamepadDeviceEvent::timestamp"]
10919 [::core::mem::offset_of!(SDL_GamepadDeviceEvent, timestamp) - 8usize];
10920 ["Offset of field: SDL_GamepadDeviceEvent::which"]
10921 [::core::mem::offset_of!(SDL_GamepadDeviceEvent, which) - 16usize];
10922};
10923impl Default for SDL_GamepadDeviceEvent {
10924 fn default() -> Self {
10925 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10926 unsafe {
10927 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10928 s.assume_init()
10929 }
10930 }
10931}
10932#[doc = " Gamepad touchpad event structure (event.gtouchpad.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10933#[repr(C)]
10934#[derive(Debug, Copy, Clone)]
10935pub struct SDL_GamepadTouchpadEvent {
10936 #[doc = "< SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN or SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION or SDL_EVENT_GAMEPAD_TOUCHPAD_UP\n"]
10937 pub type_: SDL_EventType,
10938 pub reserved: Uint32,
10939 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10940 pub timestamp: Uint64,
10941 #[doc = "< The joystick instance id\n"]
10942 pub which: SDL_JoystickID,
10943 #[doc = "< The index of the touchpad\n"]
10944 pub touchpad: Sint32,
10945 #[doc = "< The index of the finger on the touchpad\n"]
10946 pub finger: Sint32,
10947 #[doc = "< Normalized in the range 0...1 with 0 being on the left\n"]
10948 pub x: f32,
10949 #[doc = "< Normalized in the range 0...1 with 0 being at the top\n"]
10950 pub y: f32,
10951 #[doc = "< Normalized in the range 0...1\n"]
10952 pub pressure: f32,
10953}
10954#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10955const _: () = {
10956 ["Size of SDL_GamepadTouchpadEvent"]
10957 [::core::mem::size_of::<SDL_GamepadTouchpadEvent>() - 40usize];
10958 ["Alignment of SDL_GamepadTouchpadEvent"]
10959 [::core::mem::align_of::<SDL_GamepadTouchpadEvent>() - 8usize];
10960 ["Offset of field: SDL_GamepadTouchpadEvent::type_"]
10961 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, type_) - 0usize];
10962 ["Offset of field: SDL_GamepadTouchpadEvent::reserved"]
10963 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, reserved) - 4usize];
10964 ["Offset of field: SDL_GamepadTouchpadEvent::timestamp"]
10965 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, timestamp) - 8usize];
10966 ["Offset of field: SDL_GamepadTouchpadEvent::which"]
10967 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, which) - 16usize];
10968 ["Offset of field: SDL_GamepadTouchpadEvent::touchpad"]
10969 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, touchpad) - 20usize];
10970 ["Offset of field: SDL_GamepadTouchpadEvent::finger"]
10971 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, finger) - 24usize];
10972 ["Offset of field: SDL_GamepadTouchpadEvent::x"]
10973 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, x) - 28usize];
10974 ["Offset of field: SDL_GamepadTouchpadEvent::y"]
10975 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, y) - 32usize];
10976 ["Offset of field: SDL_GamepadTouchpadEvent::pressure"]
10977 [::core::mem::offset_of!(SDL_GamepadTouchpadEvent, pressure) - 36usize];
10978};
10979impl Default for SDL_GamepadTouchpadEvent {
10980 fn default() -> Self {
10981 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
10982 unsafe {
10983 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10984 s.assume_init()
10985 }
10986 }
10987}
10988#[doc = " Gamepad sensor event structure (event.gsensor.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
10989#[repr(C)]
10990#[derive(Debug, Copy, Clone)]
10991pub struct SDL_GamepadSensorEvent {
10992 #[doc = "< SDL_EVENT_GAMEPAD_SENSOR_UPDATE\n"]
10993 pub type_: SDL_EventType,
10994 pub reserved: Uint32,
10995 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
10996 pub timestamp: Uint64,
10997 #[doc = "< The joystick instance id\n"]
10998 pub which: SDL_JoystickID,
10999 #[doc = "< The type of the sensor, one of the values of SDL_SensorType\n"]
11000 pub sensor: Sint32,
11001 #[doc = "< Up to 3 values from the sensor, as defined in SDL_sensor.h\n"]
11002 pub data: [f32; 3usize],
11003 #[doc = "< The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock\n"]
11004 pub sensor_timestamp: Uint64,
11005}
11006#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11007const _: () = {
11008 ["Size of SDL_GamepadSensorEvent"][::core::mem::size_of::<SDL_GamepadSensorEvent>() - 48usize];
11009 ["Alignment of SDL_GamepadSensorEvent"]
11010 [::core::mem::align_of::<SDL_GamepadSensorEvent>() - 8usize];
11011 ["Offset of field: SDL_GamepadSensorEvent::type_"]
11012 [::core::mem::offset_of!(SDL_GamepadSensorEvent, type_) - 0usize];
11013 ["Offset of field: SDL_GamepadSensorEvent::reserved"]
11014 [::core::mem::offset_of!(SDL_GamepadSensorEvent, reserved) - 4usize];
11015 ["Offset of field: SDL_GamepadSensorEvent::timestamp"]
11016 [::core::mem::offset_of!(SDL_GamepadSensorEvent, timestamp) - 8usize];
11017 ["Offset of field: SDL_GamepadSensorEvent::which"]
11018 [::core::mem::offset_of!(SDL_GamepadSensorEvent, which) - 16usize];
11019 ["Offset of field: SDL_GamepadSensorEvent::sensor"]
11020 [::core::mem::offset_of!(SDL_GamepadSensorEvent, sensor) - 20usize];
11021 ["Offset of field: SDL_GamepadSensorEvent::data"]
11022 [::core::mem::offset_of!(SDL_GamepadSensorEvent, data) - 24usize];
11023 ["Offset of field: SDL_GamepadSensorEvent::sensor_timestamp"]
11024 [::core::mem::offset_of!(SDL_GamepadSensorEvent, sensor_timestamp) - 40usize];
11025};
11026impl Default for SDL_GamepadSensorEvent {
11027 fn default() -> Self {
11028 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11029 unsafe {
11030 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11031 s.assume_init()
11032 }
11033 }
11034}
11035#[doc = " Audio device event structure (event.adevice.*)\n\n Note that SDL will send a SDL_EVENT_AUDIO_DEVICE_ADDED event for every\n device it discovers during initialization. After that, this event will only\n arrive when a device is hotplugged during the program's run.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11036#[repr(C)]
11037#[derive(Debug, Copy, Clone, Hash)]
11038pub struct SDL_AudioDeviceEvent {
11039 #[doc = "< SDL_EVENT_AUDIO_DEVICE_ADDED, or SDL_EVENT_AUDIO_DEVICE_REMOVED, or SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED\n"]
11040 pub type_: SDL_EventType,
11041 pub reserved: Uint32,
11042 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11043 pub timestamp: Uint64,
11044 #[doc = "< SDL_AudioDeviceID for the device being added or removed or changing\n"]
11045 pub which: SDL_AudioDeviceID,
11046 #[doc = "< false if a playback device, true if a recording device.\n"]
11047 pub recording: bool,
11048 pub padding1: Uint8,
11049 pub padding2: Uint8,
11050 pub padding3: Uint8,
11051}
11052#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11053const _: () = {
11054 ["Size of SDL_AudioDeviceEvent"][::core::mem::size_of::<SDL_AudioDeviceEvent>() - 24usize];
11055 ["Alignment of SDL_AudioDeviceEvent"][::core::mem::align_of::<SDL_AudioDeviceEvent>() - 8usize];
11056 ["Offset of field: SDL_AudioDeviceEvent::type_"]
11057 [::core::mem::offset_of!(SDL_AudioDeviceEvent, type_) - 0usize];
11058 ["Offset of field: SDL_AudioDeviceEvent::reserved"]
11059 [::core::mem::offset_of!(SDL_AudioDeviceEvent, reserved) - 4usize];
11060 ["Offset of field: SDL_AudioDeviceEvent::timestamp"]
11061 [::core::mem::offset_of!(SDL_AudioDeviceEvent, timestamp) - 8usize];
11062 ["Offset of field: SDL_AudioDeviceEvent::which"]
11063 [::core::mem::offset_of!(SDL_AudioDeviceEvent, which) - 16usize];
11064 ["Offset of field: SDL_AudioDeviceEvent::recording"]
11065 [::core::mem::offset_of!(SDL_AudioDeviceEvent, recording) - 20usize];
11066 ["Offset of field: SDL_AudioDeviceEvent::padding1"]
11067 [::core::mem::offset_of!(SDL_AudioDeviceEvent, padding1) - 21usize];
11068 ["Offset of field: SDL_AudioDeviceEvent::padding2"]
11069 [::core::mem::offset_of!(SDL_AudioDeviceEvent, padding2) - 22usize];
11070 ["Offset of field: SDL_AudioDeviceEvent::padding3"]
11071 [::core::mem::offset_of!(SDL_AudioDeviceEvent, padding3) - 23usize];
11072};
11073impl Default for SDL_AudioDeviceEvent {
11074 fn default() -> Self {
11075 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11076 unsafe {
11077 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11078 s.assume_init()
11079 }
11080 }
11081}
11082#[doc = " Camera device event structure (event.cdevice.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11083#[repr(C)]
11084#[derive(Debug, Copy, Clone, Hash)]
11085pub struct SDL_CameraDeviceEvent {
11086 #[doc = "< SDL_EVENT_CAMERA_DEVICE_ADDED, SDL_EVENT_CAMERA_DEVICE_REMOVED, SDL_EVENT_CAMERA_DEVICE_APPROVED, SDL_EVENT_CAMERA_DEVICE_DENIED\n"]
11087 pub type_: SDL_EventType,
11088 pub reserved: Uint32,
11089 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11090 pub timestamp: Uint64,
11091 #[doc = "< SDL_CameraID for the device being added or removed or changing\n"]
11092 pub which: SDL_CameraID,
11093}
11094#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11095const _: () = {
11096 ["Size of SDL_CameraDeviceEvent"][::core::mem::size_of::<SDL_CameraDeviceEvent>() - 24usize];
11097 ["Alignment of SDL_CameraDeviceEvent"]
11098 [::core::mem::align_of::<SDL_CameraDeviceEvent>() - 8usize];
11099 ["Offset of field: SDL_CameraDeviceEvent::type_"]
11100 [::core::mem::offset_of!(SDL_CameraDeviceEvent, type_) - 0usize];
11101 ["Offset of field: SDL_CameraDeviceEvent::reserved"]
11102 [::core::mem::offset_of!(SDL_CameraDeviceEvent, reserved) - 4usize];
11103 ["Offset of field: SDL_CameraDeviceEvent::timestamp"]
11104 [::core::mem::offset_of!(SDL_CameraDeviceEvent, timestamp) - 8usize];
11105 ["Offset of field: SDL_CameraDeviceEvent::which"]
11106 [::core::mem::offset_of!(SDL_CameraDeviceEvent, which) - 16usize];
11107};
11108impl Default for SDL_CameraDeviceEvent {
11109 fn default() -> Self {
11110 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11111 unsafe {
11112 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11113 s.assume_init()
11114 }
11115 }
11116}
11117#[doc = " Renderer event structure (event.render.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11118#[repr(C)]
11119#[derive(Debug, Copy, Clone, Hash)]
11120pub struct SDL_RenderEvent {
11121 #[doc = "< SDL_EVENT_RENDER_TARGETS_RESET, SDL_EVENT_RENDER_DEVICE_RESET, SDL_EVENT_RENDER_DEVICE_LOST\n"]
11122 pub type_: SDL_EventType,
11123 pub reserved: Uint32,
11124 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11125 pub timestamp: Uint64,
11126 #[doc = "< The window containing the renderer in question.\n"]
11127 pub windowID: SDL_WindowID,
11128}
11129#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11130const _: () = {
11131 ["Size of SDL_RenderEvent"][::core::mem::size_of::<SDL_RenderEvent>() - 24usize];
11132 ["Alignment of SDL_RenderEvent"][::core::mem::align_of::<SDL_RenderEvent>() - 8usize];
11133 ["Offset of field: SDL_RenderEvent::type_"]
11134 [::core::mem::offset_of!(SDL_RenderEvent, type_) - 0usize];
11135 ["Offset of field: SDL_RenderEvent::reserved"]
11136 [::core::mem::offset_of!(SDL_RenderEvent, reserved) - 4usize];
11137 ["Offset of field: SDL_RenderEvent::timestamp"]
11138 [::core::mem::offset_of!(SDL_RenderEvent, timestamp) - 8usize];
11139 ["Offset of field: SDL_RenderEvent::windowID"]
11140 [::core::mem::offset_of!(SDL_RenderEvent, windowID) - 16usize];
11141};
11142impl Default for SDL_RenderEvent {
11143 fn default() -> Self {
11144 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11145 unsafe {
11146 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11147 s.assume_init()
11148 }
11149 }
11150}
11151#[doc = " Touch finger event structure (event.tfinger.*)\n\n Coordinates in this event are normalized. `x` and `y` are normalized to a\n range between 0.0f and 1.0f, relative to the window, so (0,0) is the top\n left and (1,1) is the bottom right. Delta coordinates `dx` and `dy` are\n normalized in the ranges of -1.0f (traversed all the way from the bottom or\n right to all the way up or left) to 1.0f (traversed all the way from the\n top or left to all the way down or right).\n\n Note that while the coordinates are _normalized_, they are not _clamped_,\n which means in some circumstances you can get a value outside of this\n range. For example, a renderer using logical presentation might give a\n negative value when the touch is in the letterboxing. Some platforms might\n report a touch outside of the window, which will also be outside of the\n range.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11152#[repr(C)]
11153#[derive(Debug, Copy, Clone)]
11154pub struct SDL_TouchFingerEvent {
11155 #[doc = "< SDL_EVENT_FINGER_DOWN, SDL_EVENT_FINGER_UP, SDL_EVENT_FINGER_MOTION, or SDL_EVENT_FINGER_CANCELED\n"]
11156 pub type_: SDL_EventType,
11157 pub reserved: Uint32,
11158 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11159 pub timestamp: Uint64,
11160 #[doc = "< The touch device id\n"]
11161 pub touchID: SDL_TouchID,
11162 pub fingerID: SDL_FingerID,
11163 #[doc = "< Normalized in the range 0...1\n"]
11164 pub x: f32,
11165 #[doc = "< Normalized in the range 0...1\n"]
11166 pub y: f32,
11167 #[doc = "< Normalized in the range -1...1\n"]
11168 pub dx: f32,
11169 #[doc = "< Normalized in the range -1...1\n"]
11170 pub dy: f32,
11171 #[doc = "< Normalized in the range 0...1\n"]
11172 pub pressure: f32,
11173 #[doc = "< The window underneath the finger, if any\n"]
11174 pub windowID: SDL_WindowID,
11175}
11176#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11177const _: () = {
11178 ["Size of SDL_TouchFingerEvent"][::core::mem::size_of::<SDL_TouchFingerEvent>() - 56usize];
11179 ["Alignment of SDL_TouchFingerEvent"][::core::mem::align_of::<SDL_TouchFingerEvent>() - 8usize];
11180 ["Offset of field: SDL_TouchFingerEvent::type_"]
11181 [::core::mem::offset_of!(SDL_TouchFingerEvent, type_) - 0usize];
11182 ["Offset of field: SDL_TouchFingerEvent::reserved"]
11183 [::core::mem::offset_of!(SDL_TouchFingerEvent, reserved) - 4usize];
11184 ["Offset of field: SDL_TouchFingerEvent::timestamp"]
11185 [::core::mem::offset_of!(SDL_TouchFingerEvent, timestamp) - 8usize];
11186 ["Offset of field: SDL_TouchFingerEvent::touchID"]
11187 [::core::mem::offset_of!(SDL_TouchFingerEvent, touchID) - 16usize];
11188 ["Offset of field: SDL_TouchFingerEvent::fingerID"]
11189 [::core::mem::offset_of!(SDL_TouchFingerEvent, fingerID) - 24usize];
11190 ["Offset of field: SDL_TouchFingerEvent::x"]
11191 [::core::mem::offset_of!(SDL_TouchFingerEvent, x) - 32usize];
11192 ["Offset of field: SDL_TouchFingerEvent::y"]
11193 [::core::mem::offset_of!(SDL_TouchFingerEvent, y) - 36usize];
11194 ["Offset of field: SDL_TouchFingerEvent::dx"]
11195 [::core::mem::offset_of!(SDL_TouchFingerEvent, dx) - 40usize];
11196 ["Offset of field: SDL_TouchFingerEvent::dy"]
11197 [::core::mem::offset_of!(SDL_TouchFingerEvent, dy) - 44usize];
11198 ["Offset of field: SDL_TouchFingerEvent::pressure"]
11199 [::core::mem::offset_of!(SDL_TouchFingerEvent, pressure) - 48usize];
11200 ["Offset of field: SDL_TouchFingerEvent::windowID"]
11201 [::core::mem::offset_of!(SDL_TouchFingerEvent, windowID) - 52usize];
11202};
11203impl Default for SDL_TouchFingerEvent {
11204 fn default() -> Self {
11205 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11206 unsafe {
11207 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11208 s.assume_init()
11209 }
11210 }
11211}
11212#[doc = " Pinch event structure (event.pinch.*)\n"]
11213#[repr(C)]
11214#[derive(Debug, Copy, Clone)]
11215pub struct SDL_PinchFingerEvent {
11216 #[doc = "< ::SDL_EVENT_PINCH_BEGIN or ::SDL_EVENT_PINCH_UPDATE or ::SDL_EVENT_PINCH_END\n"]
11217 pub type_: SDL_EventType,
11218 pub reserved: Uint32,
11219 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11220 pub timestamp: Uint64,
11221 #[doc = "< The scale change since the last SDL_EVENT_PINCH_UPDATE. Scale < 1 is \"zoom out\". Scale > 1 is \"zoom in\".\n"]
11222 pub scale: f32,
11223 #[doc = "< The window underneath the finger, if any\n"]
11224 pub windowID: SDL_WindowID,
11225}
11226#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11227const _: () = {
11228 ["Size of SDL_PinchFingerEvent"][::core::mem::size_of::<SDL_PinchFingerEvent>() - 24usize];
11229 ["Alignment of SDL_PinchFingerEvent"][::core::mem::align_of::<SDL_PinchFingerEvent>() - 8usize];
11230 ["Offset of field: SDL_PinchFingerEvent::type_"]
11231 [::core::mem::offset_of!(SDL_PinchFingerEvent, type_) - 0usize];
11232 ["Offset of field: SDL_PinchFingerEvent::reserved"]
11233 [::core::mem::offset_of!(SDL_PinchFingerEvent, reserved) - 4usize];
11234 ["Offset of field: SDL_PinchFingerEvent::timestamp"]
11235 [::core::mem::offset_of!(SDL_PinchFingerEvent, timestamp) - 8usize];
11236 ["Offset of field: SDL_PinchFingerEvent::scale"]
11237 [::core::mem::offset_of!(SDL_PinchFingerEvent, scale) - 16usize];
11238 ["Offset of field: SDL_PinchFingerEvent::windowID"]
11239 [::core::mem::offset_of!(SDL_PinchFingerEvent, windowID) - 20usize];
11240};
11241impl Default for SDL_PinchFingerEvent {
11242 fn default() -> Self {
11243 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11244 unsafe {
11245 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11246 s.assume_init()
11247 }
11248 }
11249}
11250#[doc = " Pressure-sensitive pen proximity event structure (event.pproximity.*)\n\n When a pen becomes visible to the system (it is close enough to a tablet,\n etc), SDL will send an SDL_EVENT_PEN_PROXIMITY_IN event with the new pen's\n ID. This ID is valid until the pen leaves proximity again (has been removed\n from the tablet's area, the tablet has been unplugged, etc). If the same\n pen reenters proximity again, it will be given a new ID.\n\n Note that \"proximity\" means \"close enough for the tablet to know the tool\n is there.\" The pen touching and lifting off from the tablet while not\n leaving the area are handled by SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP.\n\n Not all platforms have a window associated with the pen during proximity\n events. Some wait until motion/button/etc events to offer this info.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11251#[repr(C)]
11252#[derive(Debug, Copy, Clone, Hash)]
11253pub struct SDL_PenProximityEvent {
11254 #[doc = "< SDL_EVENT_PEN_PROXIMITY_IN or SDL_EVENT_PEN_PROXIMITY_OUT\n"]
11255 pub type_: SDL_EventType,
11256 pub reserved: Uint32,
11257 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11258 pub timestamp: Uint64,
11259 #[doc = "< The window with pen focus, if any\n"]
11260 pub windowID: SDL_WindowID,
11261 #[doc = "< The pen instance id\n"]
11262 pub which: SDL_PenID,
11263}
11264#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11265const _: () = {
11266 ["Size of SDL_PenProximityEvent"][::core::mem::size_of::<SDL_PenProximityEvent>() - 24usize];
11267 ["Alignment of SDL_PenProximityEvent"]
11268 [::core::mem::align_of::<SDL_PenProximityEvent>() - 8usize];
11269 ["Offset of field: SDL_PenProximityEvent::type_"]
11270 [::core::mem::offset_of!(SDL_PenProximityEvent, type_) - 0usize];
11271 ["Offset of field: SDL_PenProximityEvent::reserved"]
11272 [::core::mem::offset_of!(SDL_PenProximityEvent, reserved) - 4usize];
11273 ["Offset of field: SDL_PenProximityEvent::timestamp"]
11274 [::core::mem::offset_of!(SDL_PenProximityEvent, timestamp) - 8usize];
11275 ["Offset of field: SDL_PenProximityEvent::windowID"]
11276 [::core::mem::offset_of!(SDL_PenProximityEvent, windowID) - 16usize];
11277 ["Offset of field: SDL_PenProximityEvent::which"]
11278 [::core::mem::offset_of!(SDL_PenProximityEvent, which) - 20usize];
11279};
11280impl Default for SDL_PenProximityEvent {
11281 fn default() -> Self {
11282 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11283 unsafe {
11284 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11285 s.assume_init()
11286 }
11287 }
11288}
11289#[doc = " Pressure-sensitive pen motion event structure (event.pmotion.*)\n\n Depending on the hardware, you may get motion events when the pen is not\n touching a tablet, for tracking a pen even when it isn't drawing. You\n should listen for SDL_EVENT_PEN_DOWN and SDL_EVENT_PEN_UP events, or check\n `pen_state & SDL_PEN_INPUT_DOWN` to decide if a pen is \"drawing\" when\n dealing with pen motion.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11290#[repr(C)]
11291#[derive(Debug, Copy, Clone)]
11292pub struct SDL_PenMotionEvent {
11293 #[doc = "< SDL_EVENT_PEN_MOTION\n"]
11294 pub type_: SDL_EventType,
11295 pub reserved: Uint32,
11296 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11297 pub timestamp: Uint64,
11298 #[doc = "< The window with pen focus, if any\n"]
11299 pub windowID: SDL_WindowID,
11300 #[doc = "< The pen instance id\n"]
11301 pub which: SDL_PenID,
11302 #[doc = "< Complete pen input state at time of event\n"]
11303 pub pen_state: SDL_PenInputFlags,
11304 #[doc = "< X coordinate, relative to window\n"]
11305 pub x: f32,
11306 #[doc = "< Y coordinate, relative to window\n"]
11307 pub y: f32,
11308}
11309#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11310const _: () = {
11311 ["Size of SDL_PenMotionEvent"][::core::mem::size_of::<SDL_PenMotionEvent>() - 40usize];
11312 ["Alignment of SDL_PenMotionEvent"][::core::mem::align_of::<SDL_PenMotionEvent>() - 8usize];
11313 ["Offset of field: SDL_PenMotionEvent::type_"]
11314 [::core::mem::offset_of!(SDL_PenMotionEvent, type_) - 0usize];
11315 ["Offset of field: SDL_PenMotionEvent::reserved"]
11316 [::core::mem::offset_of!(SDL_PenMotionEvent, reserved) - 4usize];
11317 ["Offset of field: SDL_PenMotionEvent::timestamp"]
11318 [::core::mem::offset_of!(SDL_PenMotionEvent, timestamp) - 8usize];
11319 ["Offset of field: SDL_PenMotionEvent::windowID"]
11320 [::core::mem::offset_of!(SDL_PenMotionEvent, windowID) - 16usize];
11321 ["Offset of field: SDL_PenMotionEvent::which"]
11322 [::core::mem::offset_of!(SDL_PenMotionEvent, which) - 20usize];
11323 ["Offset of field: SDL_PenMotionEvent::pen_state"]
11324 [::core::mem::offset_of!(SDL_PenMotionEvent, pen_state) - 24usize];
11325 ["Offset of field: SDL_PenMotionEvent::x"]
11326 [::core::mem::offset_of!(SDL_PenMotionEvent, x) - 28usize];
11327 ["Offset of field: SDL_PenMotionEvent::y"]
11328 [::core::mem::offset_of!(SDL_PenMotionEvent, y) - 32usize];
11329};
11330impl Default for SDL_PenMotionEvent {
11331 fn default() -> Self {
11332 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11333 unsafe {
11334 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11335 s.assume_init()
11336 }
11337 }
11338}
11339#[doc = " Pressure-sensitive pen touched event structure (event.ptouch.*)\n\n These events come when a pen touches a surface (a tablet, etc), or lifts\n off from one.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11340#[repr(C)]
11341#[derive(Debug, Copy, Clone)]
11342pub struct SDL_PenTouchEvent {
11343 #[doc = "< SDL_EVENT_PEN_DOWN or SDL_EVENT_PEN_UP\n"]
11344 pub type_: SDL_EventType,
11345 pub reserved: Uint32,
11346 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11347 pub timestamp: Uint64,
11348 #[doc = "< The window with pen focus, if any\n"]
11349 pub windowID: SDL_WindowID,
11350 #[doc = "< The pen instance id\n"]
11351 pub which: SDL_PenID,
11352 #[doc = "< Complete pen input state at time of event\n"]
11353 pub pen_state: SDL_PenInputFlags,
11354 #[doc = "< X coordinate, relative to window\n"]
11355 pub x: f32,
11356 #[doc = "< Y coordinate, relative to window\n"]
11357 pub y: f32,
11358 #[doc = "< true if eraser end is used (not all pens support this).\n"]
11359 pub eraser: bool,
11360 #[doc = "< true if the pen is touching or false if the pen is lifted off\n"]
11361 pub down: bool,
11362}
11363#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11364const _: () = {
11365 ["Size of SDL_PenTouchEvent"][::core::mem::size_of::<SDL_PenTouchEvent>() - 40usize];
11366 ["Alignment of SDL_PenTouchEvent"][::core::mem::align_of::<SDL_PenTouchEvent>() - 8usize];
11367 ["Offset of field: SDL_PenTouchEvent::type_"]
11368 [::core::mem::offset_of!(SDL_PenTouchEvent, type_) - 0usize];
11369 ["Offset of field: SDL_PenTouchEvent::reserved"]
11370 [::core::mem::offset_of!(SDL_PenTouchEvent, reserved) - 4usize];
11371 ["Offset of field: SDL_PenTouchEvent::timestamp"]
11372 [::core::mem::offset_of!(SDL_PenTouchEvent, timestamp) - 8usize];
11373 ["Offset of field: SDL_PenTouchEvent::windowID"]
11374 [::core::mem::offset_of!(SDL_PenTouchEvent, windowID) - 16usize];
11375 ["Offset of field: SDL_PenTouchEvent::which"]
11376 [::core::mem::offset_of!(SDL_PenTouchEvent, which) - 20usize];
11377 ["Offset of field: SDL_PenTouchEvent::pen_state"]
11378 [::core::mem::offset_of!(SDL_PenTouchEvent, pen_state) - 24usize];
11379 ["Offset of field: SDL_PenTouchEvent::x"]
11380 [::core::mem::offset_of!(SDL_PenTouchEvent, x) - 28usize];
11381 ["Offset of field: SDL_PenTouchEvent::y"]
11382 [::core::mem::offset_of!(SDL_PenTouchEvent, y) - 32usize];
11383 ["Offset of field: SDL_PenTouchEvent::eraser"]
11384 [::core::mem::offset_of!(SDL_PenTouchEvent, eraser) - 36usize];
11385 ["Offset of field: SDL_PenTouchEvent::down"]
11386 [::core::mem::offset_of!(SDL_PenTouchEvent, down) - 37usize];
11387};
11388impl Default for SDL_PenTouchEvent {
11389 fn default() -> Self {
11390 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11391 unsafe {
11392 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11393 s.assume_init()
11394 }
11395 }
11396}
11397#[doc = " Pressure-sensitive pen button event structure (event.pbutton.*)\n\n This is for buttons on the pen itself that the user might click. The pen\n itself pressing down to draw triggers a SDL_EVENT_PEN_DOWN event instead.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11398#[repr(C)]
11399#[derive(Debug, Copy, Clone)]
11400pub struct SDL_PenButtonEvent {
11401 #[doc = "< SDL_EVENT_PEN_BUTTON_DOWN or SDL_EVENT_PEN_BUTTON_UP\n"]
11402 pub type_: SDL_EventType,
11403 pub reserved: Uint32,
11404 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11405 pub timestamp: Uint64,
11406 #[doc = "< The window with mouse focus, if any\n"]
11407 pub windowID: SDL_WindowID,
11408 #[doc = "< The pen instance id\n"]
11409 pub which: SDL_PenID,
11410 #[doc = "< Complete pen input state at time of event\n"]
11411 pub pen_state: SDL_PenInputFlags,
11412 #[doc = "< X coordinate, relative to window\n"]
11413 pub x: f32,
11414 #[doc = "< Y coordinate, relative to window\n"]
11415 pub y: f32,
11416 #[doc = "< The pen button index (first button is 1).\n"]
11417 pub button: Uint8,
11418 #[doc = "< true if the button is pressed\n"]
11419 pub down: bool,
11420}
11421#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11422const _: () = {
11423 ["Size of SDL_PenButtonEvent"][::core::mem::size_of::<SDL_PenButtonEvent>() - 40usize];
11424 ["Alignment of SDL_PenButtonEvent"][::core::mem::align_of::<SDL_PenButtonEvent>() - 8usize];
11425 ["Offset of field: SDL_PenButtonEvent::type_"]
11426 [::core::mem::offset_of!(SDL_PenButtonEvent, type_) - 0usize];
11427 ["Offset of field: SDL_PenButtonEvent::reserved"]
11428 [::core::mem::offset_of!(SDL_PenButtonEvent, reserved) - 4usize];
11429 ["Offset of field: SDL_PenButtonEvent::timestamp"]
11430 [::core::mem::offset_of!(SDL_PenButtonEvent, timestamp) - 8usize];
11431 ["Offset of field: SDL_PenButtonEvent::windowID"]
11432 [::core::mem::offset_of!(SDL_PenButtonEvent, windowID) - 16usize];
11433 ["Offset of field: SDL_PenButtonEvent::which"]
11434 [::core::mem::offset_of!(SDL_PenButtonEvent, which) - 20usize];
11435 ["Offset of field: SDL_PenButtonEvent::pen_state"]
11436 [::core::mem::offset_of!(SDL_PenButtonEvent, pen_state) - 24usize];
11437 ["Offset of field: SDL_PenButtonEvent::x"]
11438 [::core::mem::offset_of!(SDL_PenButtonEvent, x) - 28usize];
11439 ["Offset of field: SDL_PenButtonEvent::y"]
11440 [::core::mem::offset_of!(SDL_PenButtonEvent, y) - 32usize];
11441 ["Offset of field: SDL_PenButtonEvent::button"]
11442 [::core::mem::offset_of!(SDL_PenButtonEvent, button) - 36usize];
11443 ["Offset of field: SDL_PenButtonEvent::down"]
11444 [::core::mem::offset_of!(SDL_PenButtonEvent, down) - 37usize];
11445};
11446impl Default for SDL_PenButtonEvent {
11447 fn default() -> Self {
11448 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11449 unsafe {
11450 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11451 s.assume_init()
11452 }
11453 }
11454}
11455#[doc = " Pressure-sensitive pen pressure / angle event structure (event.paxis.*)\n\n You might get some of these events even if the pen isn't touching the\n tablet.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11456#[repr(C)]
11457#[derive(Debug, Copy, Clone)]
11458pub struct SDL_PenAxisEvent {
11459 #[doc = "< SDL_EVENT_PEN_AXIS\n"]
11460 pub type_: SDL_EventType,
11461 pub reserved: Uint32,
11462 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11463 pub timestamp: Uint64,
11464 #[doc = "< The window with pen focus, if any\n"]
11465 pub windowID: SDL_WindowID,
11466 #[doc = "< The pen instance id\n"]
11467 pub which: SDL_PenID,
11468 #[doc = "< Complete pen input state at time of event\n"]
11469 pub pen_state: SDL_PenInputFlags,
11470 #[doc = "< X coordinate, relative to window\n"]
11471 pub x: f32,
11472 #[doc = "< Y coordinate, relative to window\n"]
11473 pub y: f32,
11474 #[doc = "< Axis that has changed\n"]
11475 pub axis: SDL_PenAxis,
11476 #[doc = "< New value of axis\n"]
11477 pub value: f32,
11478}
11479#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11480const _: () = {
11481 ["Size of SDL_PenAxisEvent"][::core::mem::size_of::<SDL_PenAxisEvent>() - 48usize];
11482 ["Alignment of SDL_PenAxisEvent"][::core::mem::align_of::<SDL_PenAxisEvent>() - 8usize];
11483 ["Offset of field: SDL_PenAxisEvent::type_"]
11484 [::core::mem::offset_of!(SDL_PenAxisEvent, type_) - 0usize];
11485 ["Offset of field: SDL_PenAxisEvent::reserved"]
11486 [::core::mem::offset_of!(SDL_PenAxisEvent, reserved) - 4usize];
11487 ["Offset of field: SDL_PenAxisEvent::timestamp"]
11488 [::core::mem::offset_of!(SDL_PenAxisEvent, timestamp) - 8usize];
11489 ["Offset of field: SDL_PenAxisEvent::windowID"]
11490 [::core::mem::offset_of!(SDL_PenAxisEvent, windowID) - 16usize];
11491 ["Offset of field: SDL_PenAxisEvent::which"]
11492 [::core::mem::offset_of!(SDL_PenAxisEvent, which) - 20usize];
11493 ["Offset of field: SDL_PenAxisEvent::pen_state"]
11494 [::core::mem::offset_of!(SDL_PenAxisEvent, pen_state) - 24usize];
11495 ["Offset of field: SDL_PenAxisEvent::x"]
11496 [::core::mem::offset_of!(SDL_PenAxisEvent, x) - 28usize];
11497 ["Offset of field: SDL_PenAxisEvent::y"]
11498 [::core::mem::offset_of!(SDL_PenAxisEvent, y) - 32usize];
11499 ["Offset of field: SDL_PenAxisEvent::axis"]
11500 [::core::mem::offset_of!(SDL_PenAxisEvent, axis) - 36usize];
11501 ["Offset of field: SDL_PenAxisEvent::value"]
11502 [::core::mem::offset_of!(SDL_PenAxisEvent, value) - 40usize];
11503};
11504impl Default for SDL_PenAxisEvent {
11505 fn default() -> Self {
11506 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11507 unsafe {
11508 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11509 s.assume_init()
11510 }
11511 }
11512}
11513#[doc = " An event used to drop text or request a file open by the system\n (event.drop.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11514#[repr(C)]
11515#[derive(Debug, Copy, Clone)]
11516pub struct SDL_DropEvent {
11517 #[doc = "< SDL_EVENT_DROP_BEGIN or SDL_EVENT_DROP_FILE or SDL_EVENT_DROP_TEXT or SDL_EVENT_DROP_COMPLETE or SDL_EVENT_DROP_POSITION\n"]
11518 pub type_: SDL_EventType,
11519 pub reserved: Uint32,
11520 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11521 pub timestamp: Uint64,
11522 #[doc = "< The window that was dropped on, if any\n"]
11523 pub windowID: SDL_WindowID,
11524 #[doc = "< X coordinate, relative to window (not on begin)\n"]
11525 pub x: f32,
11526 #[doc = "< Y coordinate, relative to window (not on begin)\n"]
11527 pub y: f32,
11528 #[doc = "< The source app that sent this drop event, or NULL if that isn't available\n"]
11529 pub source: *const core::ffi::c_char,
11530 #[doc = "< The text for SDL_EVENT_DROP_TEXT and the file name for SDL_EVENT_DROP_FILE, NULL for other events\n"]
11531 pub data: *const core::ffi::c_char,
11532}
11533#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11534const _: () = {
11535 ["Size of SDL_DropEvent"][::core::mem::size_of::<SDL_DropEvent>() - 48usize];
11536 ["Alignment of SDL_DropEvent"][::core::mem::align_of::<SDL_DropEvent>() - 8usize];
11537 ["Offset of field: SDL_DropEvent::type_"]
11538 [::core::mem::offset_of!(SDL_DropEvent, type_) - 0usize];
11539 ["Offset of field: SDL_DropEvent::reserved"]
11540 [::core::mem::offset_of!(SDL_DropEvent, reserved) - 4usize];
11541 ["Offset of field: SDL_DropEvent::timestamp"]
11542 [::core::mem::offset_of!(SDL_DropEvent, timestamp) - 8usize];
11543 ["Offset of field: SDL_DropEvent::windowID"]
11544 [::core::mem::offset_of!(SDL_DropEvent, windowID) - 16usize];
11545 ["Offset of field: SDL_DropEvent::x"][::core::mem::offset_of!(SDL_DropEvent, x) - 20usize];
11546 ["Offset of field: SDL_DropEvent::y"][::core::mem::offset_of!(SDL_DropEvent, y) - 24usize];
11547 ["Offset of field: SDL_DropEvent::source"]
11548 [::core::mem::offset_of!(SDL_DropEvent, source) - 32usize];
11549 ["Offset of field: SDL_DropEvent::data"]
11550 [::core::mem::offset_of!(SDL_DropEvent, data) - 40usize];
11551};
11552impl Default for SDL_DropEvent {
11553 fn default() -> Self {
11554 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11555 unsafe {
11556 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11557 s.assume_init()
11558 }
11559 }
11560}
11561#[doc = " An event triggered when the clipboard contents have changed\n (event.clipboard.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11562#[repr(C)]
11563#[derive(Debug, Copy, Clone, Hash)]
11564pub struct SDL_ClipboardEvent {
11565 #[doc = "< SDL_EVENT_CLIPBOARD_UPDATE\n"]
11566 pub type_: SDL_EventType,
11567 pub reserved: Uint32,
11568 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11569 pub timestamp: Uint64,
11570 #[doc = "< are we owning the clipboard (internal update)\n"]
11571 pub owner: bool,
11572 #[doc = "< number of mime types\n"]
11573 pub num_mime_types: Sint32,
11574 #[doc = "< current mime types\n"]
11575 pub mime_types: *mut *const core::ffi::c_char,
11576}
11577#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11578const _: () = {
11579 ["Size of SDL_ClipboardEvent"][::core::mem::size_of::<SDL_ClipboardEvent>() - 32usize];
11580 ["Alignment of SDL_ClipboardEvent"][::core::mem::align_of::<SDL_ClipboardEvent>() - 8usize];
11581 ["Offset of field: SDL_ClipboardEvent::type_"]
11582 [::core::mem::offset_of!(SDL_ClipboardEvent, type_) - 0usize];
11583 ["Offset of field: SDL_ClipboardEvent::reserved"]
11584 [::core::mem::offset_of!(SDL_ClipboardEvent, reserved) - 4usize];
11585 ["Offset of field: SDL_ClipboardEvent::timestamp"]
11586 [::core::mem::offset_of!(SDL_ClipboardEvent, timestamp) - 8usize];
11587 ["Offset of field: SDL_ClipboardEvent::owner"]
11588 [::core::mem::offset_of!(SDL_ClipboardEvent, owner) - 16usize];
11589 ["Offset of field: SDL_ClipboardEvent::num_mime_types"]
11590 [::core::mem::offset_of!(SDL_ClipboardEvent, num_mime_types) - 20usize];
11591 ["Offset of field: SDL_ClipboardEvent::mime_types"]
11592 [::core::mem::offset_of!(SDL_ClipboardEvent, mime_types) - 24usize];
11593};
11594impl Default for SDL_ClipboardEvent {
11595 fn default() -> Self {
11596 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11597 unsafe {
11598 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11599 s.assume_init()
11600 }
11601 }
11602}
11603#[doc = " Sensor event structure (event.sensor.*)\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11604#[repr(C)]
11605#[derive(Debug, Copy, Clone)]
11606pub struct SDL_SensorEvent {
11607 #[doc = "< SDL_EVENT_SENSOR_UPDATE\n"]
11608 pub type_: SDL_EventType,
11609 pub reserved: Uint32,
11610 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11611 pub timestamp: Uint64,
11612 #[doc = "< The instance ID of the sensor\n"]
11613 pub which: SDL_SensorID,
11614 #[doc = "< Up to 6 values from the sensor - additional values can be queried using SDL_GetSensorData()\n"]
11615 pub data: [f32; 6usize],
11616 #[doc = "< The timestamp of the sensor reading in nanoseconds, not necessarily synchronized with the system clock\n"]
11617 pub sensor_timestamp: Uint64,
11618}
11619#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11620const _: () = {
11621 ["Size of SDL_SensorEvent"][::core::mem::size_of::<SDL_SensorEvent>() - 56usize];
11622 ["Alignment of SDL_SensorEvent"][::core::mem::align_of::<SDL_SensorEvent>() - 8usize];
11623 ["Offset of field: SDL_SensorEvent::type_"]
11624 [::core::mem::offset_of!(SDL_SensorEvent, type_) - 0usize];
11625 ["Offset of field: SDL_SensorEvent::reserved"]
11626 [::core::mem::offset_of!(SDL_SensorEvent, reserved) - 4usize];
11627 ["Offset of field: SDL_SensorEvent::timestamp"]
11628 [::core::mem::offset_of!(SDL_SensorEvent, timestamp) - 8usize];
11629 ["Offset of field: SDL_SensorEvent::which"]
11630 [::core::mem::offset_of!(SDL_SensorEvent, which) - 16usize];
11631 ["Offset of field: SDL_SensorEvent::data"]
11632 [::core::mem::offset_of!(SDL_SensorEvent, data) - 20usize];
11633 ["Offset of field: SDL_SensorEvent::sensor_timestamp"]
11634 [::core::mem::offset_of!(SDL_SensorEvent, sensor_timestamp) - 48usize];
11635};
11636impl Default for SDL_SensorEvent {
11637 fn default() -> Self {
11638 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11639 unsafe {
11640 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11641 s.assume_init()
11642 }
11643 }
11644}
11645#[doc = " The \"quit requested\" event\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11646#[repr(C)]
11647#[derive(Debug, Copy, Clone, Hash)]
11648pub struct SDL_QuitEvent {
11649 #[doc = "< SDL_EVENT_QUIT\n"]
11650 pub type_: SDL_EventType,
11651 pub reserved: Uint32,
11652 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11653 pub timestamp: Uint64,
11654}
11655#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11656const _: () = {
11657 ["Size of SDL_QuitEvent"][::core::mem::size_of::<SDL_QuitEvent>() - 16usize];
11658 ["Alignment of SDL_QuitEvent"][::core::mem::align_of::<SDL_QuitEvent>() - 8usize];
11659 ["Offset of field: SDL_QuitEvent::type_"]
11660 [::core::mem::offset_of!(SDL_QuitEvent, type_) - 0usize];
11661 ["Offset of field: SDL_QuitEvent::reserved"]
11662 [::core::mem::offset_of!(SDL_QuitEvent, reserved) - 4usize];
11663 ["Offset of field: SDL_QuitEvent::timestamp"]
11664 [::core::mem::offset_of!(SDL_QuitEvent, timestamp) - 8usize];
11665};
11666impl Default for SDL_QuitEvent {
11667 fn default() -> Self {
11668 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11669 unsafe {
11670 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11671 s.assume_init()
11672 }
11673 }
11674}
11675#[doc = " A user-defined event type (event.user.*)\n\n This event is unique; it is never created by SDL, but only by the\n application. The event can be pushed onto the event queue using\n SDL_PushEvent(). The contents of the structure members are completely up to\n the programmer; the only requirement is that '''type''' is a value obtained\n from SDL_RegisterEvents().\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11676#[repr(C)]
11677#[derive(Debug, Copy, Clone, Hash)]
11678pub struct SDL_UserEvent {
11679 #[doc = "< SDL_EVENT_USER through SDL_EVENT_LAST, Uint32 because these are not in the SDL_EventType enumeration\n"]
11680 pub type_: Uint32,
11681 pub reserved: Uint32,
11682 #[doc = "< In nanoseconds, populated using SDL_GetTicksNS()\n"]
11683 pub timestamp: Uint64,
11684 #[doc = "< The associated window if any\n"]
11685 pub windowID: SDL_WindowID,
11686 #[doc = "< User defined event code\n"]
11687 pub code: Sint32,
11688 #[doc = "< User defined data pointer\n"]
11689 pub data1: *mut core::ffi::c_void,
11690 #[doc = "< User defined data pointer\n"]
11691 pub data2: *mut core::ffi::c_void,
11692}
11693#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11694const _: () = {
11695 ["Size of SDL_UserEvent"][::core::mem::size_of::<SDL_UserEvent>() - 40usize];
11696 ["Alignment of SDL_UserEvent"][::core::mem::align_of::<SDL_UserEvent>() - 8usize];
11697 ["Offset of field: SDL_UserEvent::type_"]
11698 [::core::mem::offset_of!(SDL_UserEvent, type_) - 0usize];
11699 ["Offset of field: SDL_UserEvent::reserved"]
11700 [::core::mem::offset_of!(SDL_UserEvent, reserved) - 4usize];
11701 ["Offset of field: SDL_UserEvent::timestamp"]
11702 [::core::mem::offset_of!(SDL_UserEvent, timestamp) - 8usize];
11703 ["Offset of field: SDL_UserEvent::windowID"]
11704 [::core::mem::offset_of!(SDL_UserEvent, windowID) - 16usize];
11705 ["Offset of field: SDL_UserEvent::code"]
11706 [::core::mem::offset_of!(SDL_UserEvent, code) - 20usize];
11707 ["Offset of field: SDL_UserEvent::data1"]
11708 [::core::mem::offset_of!(SDL_UserEvent, data1) - 24usize];
11709 ["Offset of field: SDL_UserEvent::data2"]
11710 [::core::mem::offset_of!(SDL_UserEvent, data2) - 32usize];
11711};
11712impl Default for SDL_UserEvent {
11713 fn default() -> Self {
11714 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11715 unsafe {
11716 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11717 s.assume_init()
11718 }
11719 }
11720}
11721#[doc = " The structure for all events in SDL.\n\n The SDL_Event structure is the core of all event handling in SDL. SDL_Event\n is a union of all event structures used in SDL.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
11722#[repr(C)]
11723#[derive(Copy, Clone)]
11724pub union SDL_Event {
11725 #[doc = "< Event type, shared with all events, Uint32 to cover user events which are not in the SDL_EventType enumeration\n"]
11726 pub type_: Uint32,
11727 #[doc = "< Common event data\n"]
11728 pub common: SDL_CommonEvent,
11729 #[doc = "< Display event data\n"]
11730 pub display: SDL_DisplayEvent,
11731 #[doc = "< Window event data\n"]
11732 pub window: SDL_WindowEvent,
11733 #[doc = "< Keyboard device change event data\n"]
11734 pub kdevice: SDL_KeyboardDeviceEvent,
11735 #[doc = "< Keyboard event data\n"]
11736 pub key: SDL_KeyboardEvent,
11737 #[doc = "< Text editing event data\n"]
11738 pub edit: SDL_TextEditingEvent,
11739 #[doc = "< Text editing candidates event data\n"]
11740 pub edit_candidates: SDL_TextEditingCandidatesEvent,
11741 #[doc = "< Text input event data\n"]
11742 pub text: SDL_TextInputEvent,
11743 #[doc = "< Mouse device change event data\n"]
11744 pub mdevice: SDL_MouseDeviceEvent,
11745 #[doc = "< Mouse motion event data\n"]
11746 pub motion: SDL_MouseMotionEvent,
11747 #[doc = "< Mouse button event data\n"]
11748 pub button: SDL_MouseButtonEvent,
11749 #[doc = "< Mouse wheel event data\n"]
11750 pub wheel: SDL_MouseWheelEvent,
11751 #[doc = "< Joystick device change event data\n"]
11752 pub jdevice: SDL_JoyDeviceEvent,
11753 #[doc = "< Joystick axis event data\n"]
11754 pub jaxis: SDL_JoyAxisEvent,
11755 #[doc = "< Joystick ball event data\n"]
11756 pub jball: SDL_JoyBallEvent,
11757 #[doc = "< Joystick hat event data\n"]
11758 pub jhat: SDL_JoyHatEvent,
11759 #[doc = "< Joystick button event data\n"]
11760 pub jbutton: SDL_JoyButtonEvent,
11761 #[doc = "< Joystick battery event data\n"]
11762 pub jbattery: SDL_JoyBatteryEvent,
11763 #[doc = "< Gamepad device event data\n"]
11764 pub gdevice: SDL_GamepadDeviceEvent,
11765 #[doc = "< Gamepad axis event data\n"]
11766 pub gaxis: SDL_GamepadAxisEvent,
11767 #[doc = "< Gamepad button event data\n"]
11768 pub gbutton: SDL_GamepadButtonEvent,
11769 #[doc = "< Gamepad touchpad event data\n"]
11770 pub gtouchpad: SDL_GamepadTouchpadEvent,
11771 #[doc = "< Gamepad sensor event data\n"]
11772 pub gsensor: SDL_GamepadSensorEvent,
11773 #[doc = "< Audio device event data\n"]
11774 pub adevice: SDL_AudioDeviceEvent,
11775 #[doc = "< Camera device event data\n"]
11776 pub cdevice: SDL_CameraDeviceEvent,
11777 #[doc = "< Sensor event data\n"]
11778 pub sensor: SDL_SensorEvent,
11779 #[doc = "< Quit request event data\n"]
11780 pub quit: SDL_QuitEvent,
11781 #[doc = "< Custom event data\n"]
11782 pub user: SDL_UserEvent,
11783 #[doc = "< Touch finger event data\n"]
11784 pub tfinger: SDL_TouchFingerEvent,
11785 #[doc = "< Pinch event data\n"]
11786 pub pinch: SDL_PinchFingerEvent,
11787 #[doc = "< Pen proximity event data\n"]
11788 pub pproximity: SDL_PenProximityEvent,
11789 #[doc = "< Pen tip touching event data\n"]
11790 pub ptouch: SDL_PenTouchEvent,
11791 #[doc = "< Pen motion event data\n"]
11792 pub pmotion: SDL_PenMotionEvent,
11793 #[doc = "< Pen button event data\n"]
11794 pub pbutton: SDL_PenButtonEvent,
11795 #[doc = "< Pen axis event data\n"]
11796 pub paxis: SDL_PenAxisEvent,
11797 #[doc = "< Render event data\n"]
11798 pub render: SDL_RenderEvent,
11799 #[doc = "< Drag and drop event data\n"]
11800 pub drop: SDL_DropEvent,
11801 #[doc = "< Clipboard event data\n"]
11802 pub clipboard: SDL_ClipboardEvent,
11803 pub padding: [Uint8; 128usize],
11804}
11805#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11806const _: () = {
11807 ["Size of SDL_Event"][::core::mem::size_of::<SDL_Event>() - 128usize];
11808 ["Alignment of SDL_Event"][::core::mem::align_of::<SDL_Event>() - 8usize];
11809 ["Offset of field: SDL_Event::type_"][::core::mem::offset_of!(SDL_Event, type_) - 0usize];
11810 ["Offset of field: SDL_Event::common"][::core::mem::offset_of!(SDL_Event, common) - 0usize];
11811 ["Offset of field: SDL_Event::display"][::core::mem::offset_of!(SDL_Event, display) - 0usize];
11812 ["Offset of field: SDL_Event::window"][::core::mem::offset_of!(SDL_Event, window) - 0usize];
11813 ["Offset of field: SDL_Event::kdevice"][::core::mem::offset_of!(SDL_Event, kdevice) - 0usize];
11814 ["Offset of field: SDL_Event::key"][::core::mem::offset_of!(SDL_Event, key) - 0usize];
11815 ["Offset of field: SDL_Event::edit"][::core::mem::offset_of!(SDL_Event, edit) - 0usize];
11816 ["Offset of field: SDL_Event::edit_candidates"]
11817 [::core::mem::offset_of!(SDL_Event, edit_candidates) - 0usize];
11818 ["Offset of field: SDL_Event::text"][::core::mem::offset_of!(SDL_Event, text) - 0usize];
11819 ["Offset of field: SDL_Event::mdevice"][::core::mem::offset_of!(SDL_Event, mdevice) - 0usize];
11820 ["Offset of field: SDL_Event::motion"][::core::mem::offset_of!(SDL_Event, motion) - 0usize];
11821 ["Offset of field: SDL_Event::button"][::core::mem::offset_of!(SDL_Event, button) - 0usize];
11822 ["Offset of field: SDL_Event::wheel"][::core::mem::offset_of!(SDL_Event, wheel) - 0usize];
11823 ["Offset of field: SDL_Event::jdevice"][::core::mem::offset_of!(SDL_Event, jdevice) - 0usize];
11824 ["Offset of field: SDL_Event::jaxis"][::core::mem::offset_of!(SDL_Event, jaxis) - 0usize];
11825 ["Offset of field: SDL_Event::jball"][::core::mem::offset_of!(SDL_Event, jball) - 0usize];
11826 ["Offset of field: SDL_Event::jhat"][::core::mem::offset_of!(SDL_Event, jhat) - 0usize];
11827 ["Offset of field: SDL_Event::jbutton"][::core::mem::offset_of!(SDL_Event, jbutton) - 0usize];
11828 ["Offset of field: SDL_Event::jbattery"][::core::mem::offset_of!(SDL_Event, jbattery) - 0usize];
11829 ["Offset of field: SDL_Event::gdevice"][::core::mem::offset_of!(SDL_Event, gdevice) - 0usize];
11830 ["Offset of field: SDL_Event::gaxis"][::core::mem::offset_of!(SDL_Event, gaxis) - 0usize];
11831 ["Offset of field: SDL_Event::gbutton"][::core::mem::offset_of!(SDL_Event, gbutton) - 0usize];
11832 ["Offset of field: SDL_Event::gtouchpad"]
11833 [::core::mem::offset_of!(SDL_Event, gtouchpad) - 0usize];
11834 ["Offset of field: SDL_Event::gsensor"][::core::mem::offset_of!(SDL_Event, gsensor) - 0usize];
11835 ["Offset of field: SDL_Event::adevice"][::core::mem::offset_of!(SDL_Event, adevice) - 0usize];
11836 ["Offset of field: SDL_Event::cdevice"][::core::mem::offset_of!(SDL_Event, cdevice) - 0usize];
11837 ["Offset of field: SDL_Event::sensor"][::core::mem::offset_of!(SDL_Event, sensor) - 0usize];
11838 ["Offset of field: SDL_Event::quit"][::core::mem::offset_of!(SDL_Event, quit) - 0usize];
11839 ["Offset of field: SDL_Event::user"][::core::mem::offset_of!(SDL_Event, user) - 0usize];
11840 ["Offset of field: SDL_Event::tfinger"][::core::mem::offset_of!(SDL_Event, tfinger) - 0usize];
11841 ["Offset of field: SDL_Event::pinch"][::core::mem::offset_of!(SDL_Event, pinch) - 0usize];
11842 ["Offset of field: SDL_Event::pproximity"]
11843 [::core::mem::offset_of!(SDL_Event, pproximity) - 0usize];
11844 ["Offset of field: SDL_Event::ptouch"][::core::mem::offset_of!(SDL_Event, ptouch) - 0usize];
11845 ["Offset of field: SDL_Event::pmotion"][::core::mem::offset_of!(SDL_Event, pmotion) - 0usize];
11846 ["Offset of field: SDL_Event::pbutton"][::core::mem::offset_of!(SDL_Event, pbutton) - 0usize];
11847 ["Offset of field: SDL_Event::paxis"][::core::mem::offset_of!(SDL_Event, paxis) - 0usize];
11848 ["Offset of field: SDL_Event::render"][::core::mem::offset_of!(SDL_Event, render) - 0usize];
11849 ["Offset of field: SDL_Event::drop"][::core::mem::offset_of!(SDL_Event, drop) - 0usize];
11850 ["Offset of field: SDL_Event::clipboard"]
11851 [::core::mem::offset_of!(SDL_Event, clipboard) - 0usize];
11852 ["Offset of field: SDL_Event::padding"][::core::mem::offset_of!(SDL_Event, padding) - 0usize];
11853};
11854impl Default for SDL_Event {
11855 fn default() -> Self {
11856 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
11857 unsafe {
11858 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11859 s.assume_init()
11860 }
11861 }
11862}
11863unsafe extern "C" {
11864 #[doc = " Pump the event loop, gathering events from the input devices.\n\n This function updates the event queue and internal input device state.\n\n SDL_PumpEvents() gathers all the pending input information from devices and\n places it in the event queue. Without calls to SDL_PumpEvents() no events\n would ever be placed on the queue. Often the need for calls to\n SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and\n SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not\n polling or waiting for events (e.g. you are filtering them), then you must\n call SDL_PumpEvents() to force an event queue update.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PollEvent\n **See Also:** SDL_WaitEvent\n"]
11865 pub fn SDL_PumpEvents();
11866}
11867impl SDL_EventAction {
11868 #[doc = "< Add events to the back of the queue.\n"]
11869 pub const SDL_ADDEVENT: SDL_EventAction = SDL_EventAction(0);
11870 #[doc = "< Check but don't remove events from the queue front.\n"]
11871 pub const SDL_PEEKEVENT: SDL_EventAction = SDL_EventAction(1);
11872 #[doc = "< Retrieve/remove events from the front of the queue.\n"]
11873 pub const SDL_GETEVENT: SDL_EventAction = SDL_EventAction(2);
11874}
11875#[repr(transparent)]
11876#[doc = " The type of action to request from SDL_PeepEvents().\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
11877#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11878pub struct SDL_EventAction(pub core::ffi::c_uint);
11879unsafe extern "C" {
11880 #[doc = " Check the event queue for messages and optionally return them.\n\n `action` may be any of the following:\n\n - `SDL_ADDEVENT`: up to `numevents` events will be added to the back of the\n event queue.\n - `SDL_PEEKEVENT`: `numevents` events at the front of the event queue,\n within the specified minimum and maximum type, will be returned to the\n caller and will _not_ be removed from the queue. If you pass NULL for\n `events`, then `numevents` is ignored and the total number of matching\n events will be returned.\n - `SDL_GETEVENT`: up to `numevents` events at the front of the event queue,\n within the specified minimum and maximum type, will be returned to the\n caller and will be removed from the queue.\n\n You may have to call SDL_PumpEvents() before calling this function.\n Otherwise, the events may not be ready to be filtered when you call\n SDL_PeepEvents().\n\n **Parameter:** events destination buffer for the retrieved events, may be NULL to\n leave the events in the queue and return the number of events\n that would have been stored.\n **Parameter:** numevents if action is SDL_ADDEVENT, the number of events to add\n back to the event queue; if action is SDL_PEEKEVENT or\n SDL_GETEVENT, the maximum number of events to retrieve.\n **Parameter:** action action to take; see [Remarks](#remarks) for details.\n **Parameter:** minType minimum value of the event type to be considered;\n SDL_EVENT_FIRST is a safe choice.\n **Parameter:** maxType maximum value of the event type to be considered;\n SDL_EVENT_LAST is a safe choice.\n **Returns:** the number of events actually stored or -1 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PollEvent\n **See Also:** SDL_PumpEvents\n **See Also:** SDL_PushEvent\n"]
11881 pub fn SDL_PeepEvents(
11882 events: *mut SDL_Event,
11883 numevents: core::ffi::c_int,
11884 action: SDL_EventAction,
11885 minType: Uint32,
11886 maxType: Uint32,
11887 ) -> core::ffi::c_int;
11888}
11889unsafe extern "C" {
11890 #[doc = " Check for the existence of a certain event type in the event queue.\n\n If you need to check for a range of event types, use SDL_HasEvents()\n instead.\n\n **Parameter:** type the type of event to be queried; see SDL_EventType for details.\n **Returns:** true if events matching `type` are present, or false if events\n matching `type` are not present.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasEvents\n"]
11891 pub fn SDL_HasEvent(type_: Uint32) -> bool;
11892}
11893unsafe extern "C" {
11894 #[doc = " Check for the existence of certain event types in the event queue.\n\n If you need to check for a single event type, use SDL_HasEvent() instead.\n\n **Parameter:** minType the low end of event type to be queried, inclusive; see\n SDL_EventType for details.\n **Parameter:** maxType the high end of event type to be queried, inclusive; see\n SDL_EventType for details.\n **Returns:** true if events with type >= `minType` and <= `maxType` are\n present, or false if not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HasEvents\n"]
11895 pub fn SDL_HasEvents(minType: Uint32, maxType: Uint32) -> bool;
11896}
11897unsafe extern "C" {
11898 #[doc = " Clear events of a specific type from the event queue.\n\n This will unconditionally remove any events from the queue that match\n `type`. If you need to remove a range of event types, use SDL_FlushEvents()\n instead.\n\n It's also normal to just ignore events you don't care about in your event\n loop without calling this function.\n\n This function only affects currently queued events. If you want to make\n sure that all pending OS events are flushed, you can call SDL_PumpEvents()\n on the main thread immediately before the flush call.\n\n If you have user events with custom data that needs to be freed, you should\n use SDL_PeepEvents() to remove and clean up those events before calling\n this function.\n\n **Parameter:** type the type of event to be cleared; see SDL_EventType for details.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_FlushEvents\n"]
11899 pub fn SDL_FlushEvent(type_: Uint32);
11900}
11901unsafe extern "C" {
11902 #[doc = " Clear events of a range of types from the event queue.\n\n This will unconditionally remove any events from the queue that are in the\n range of `minType` to `maxType`, inclusive. If you need to remove a single\n event type, use SDL_FlushEvent() instead.\n\n It's also normal to just ignore events you don't care about in your event\n loop without calling this function.\n\n This function only affects currently queued events. If you want to make\n sure that all pending OS events are flushed, you can call SDL_PumpEvents()\n on the main thread immediately before the flush call.\n\n **Parameter:** minType the low end of event type to be cleared, inclusive; see\n SDL_EventType for details.\n **Parameter:** maxType the high end of event type to be cleared, inclusive; see\n SDL_EventType for details.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_FlushEvent\n"]
11903 pub fn SDL_FlushEvents(minType: Uint32, maxType: Uint32);
11904}
11905unsafe extern "C" {
11906 #[doc = " Poll for currently pending events.\n\n If `event` is not NULL, the next event is removed from the queue and stored\n in the SDL_Event structure pointed to by `event`.\n\n If `event` is NULL, it simply returns true if there is an event in the\n queue, but will not remove it from the queue.\n\n As this function may implicitly call SDL_PumpEvents(), you can only call\n this function in the thread that initialized the video subsystem.\n\n SDL_PollEvent() is the favored way of receiving system events since it can\n be done from the main loop and does not suspend the main loop while waiting\n on an event to be posted.\n\n The common practice is to fully process the event queue once every frame,\n usually as a first step before updating the game's state:\n\n ```c\n while (game_is_still_running) {\n SDL_Event event;\n while (SDL_PollEvent(&event)) { // poll until all events are handled!\n // decide what to do with this event.\n }\n\n // update game state, draw the current frame\n }\n ```\n\n Note that Windows (and possibly other platforms) has a quirk about how it\n handles events while dragging/resizing a window, which can cause this\n function to block for significant amounts of time. Technical explanations\n and solutions are discussed on the wiki:\n\n https://wiki.libsdl.org/SDL3/AppFreezeDuringDrag\n\n **Parameter:** event the SDL_Event structure to be filled with the next event from\n the queue, or NULL.\n **Returns:** true if this got an event or false if there are none available.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PushEvent\n **See Also:** SDL_WaitEvent\n **See Also:** SDL_WaitEventTimeout\n"]
11907 pub fn SDL_PollEvent(event: *mut SDL_Event) -> bool;
11908}
11909unsafe extern "C" {
11910 #[doc = " Wait indefinitely for the next available event.\n\n If `event` is not NULL, the next event is removed from the queue and stored\n in the SDL_Event structure pointed to by `event`.\n\n As this function may implicitly call SDL_PumpEvents(), you can only call\n this function in the thread that initialized the video subsystem.\n\n **Parameter:** event the SDL_Event structure to be filled in with the next event\n from the queue, or NULL.\n **Returns:** true on success or false if there was an error while waiting for\n events; call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PollEvent\n **See Also:** SDL_PushEvent\n **See Also:** SDL_WaitEventTimeout\n"]
11911 pub fn SDL_WaitEvent(event: *mut SDL_Event) -> bool;
11912}
11913unsafe extern "C" {
11914 #[doc = " Wait until the specified timeout (in milliseconds) for the next available\n event.\n\n If `event` is not NULL, the next event is removed from the queue and stored\n in the SDL_Event structure pointed to by `event`.\n\n As this function may implicitly call SDL_PumpEvents(), you can only call\n this function in the thread that initialized the video subsystem.\n\n The timeout is not guaranteed, the actual wait time could be longer due to\n system scheduling.\n\n **Parameter:** event the SDL_Event structure to be filled in with the next event\n from the queue, or NULL.\n **Parameter:** timeoutMS the maximum number of milliseconds to wait for the next\n available event.\n **Returns:** true if this got an event or false if the timeout elapsed without\n any events available.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PollEvent\n **See Also:** SDL_PushEvent\n **See Also:** SDL_WaitEvent\n"]
11915 pub fn SDL_WaitEventTimeout(event: *mut SDL_Event, timeoutMS: Sint32) -> bool;
11916}
11917unsafe extern "C" {
11918 #[doc = " Add an event to the event queue.\n\n The event queue can actually be used as a two way communication channel.\n Not only can events be read from the queue, but the user can also push\n their own events onto it. `event` is a pointer to the event structure you\n wish to push onto the queue. The event is copied into the queue, and the\n caller may dispose of the memory pointed to after SDL_PushEvent() returns.\n\n Note: Pushing device input events onto the queue doesn't modify the state\n of the device within SDL.\n\n Note: Events pushed onto the queue with SDL_PushEvent() get passed through\n the event filter but events added with SDL_PeepEvents() do not.\n\n For pushing application-specific events, please use SDL_RegisterEvents() to\n get an event type that does not conflict with other code that also wants\n its own custom event types.\n\n **Parameter:** event the SDL_Event to be added to the queue.\n **Returns:** true on success, false if the event was filtered or on failure;\n call SDL_GetError() for more information. A common reason for\n error is the event queue being full.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PeepEvents\n **See Also:** SDL_PollEvent\n **See Also:** SDL_RegisterEvents\n"]
11919 pub fn SDL_PushEvent(event: *mut SDL_Event) -> bool;
11920}
11921#[doc = " A function pointer used for callbacks that watch the event queue.\n\n **Parameter:** userdata what was passed as `userdata` to SDL_SetEventFilter() or\n SDL_AddEventWatch, etc.\n **Parameter:** event the event that triggered the callback.\n **Returns:** true to permit event to be added to the queue, and false to\n disallow it. When used with SDL_AddEventWatch, the return value is\n ignored.\n\n **Thread Safety:** SDL may call this callback at any time from any thread; the\n application is responsible for locking resources the callback\n touches that need to be protected.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_SetEventFilter\n **See Also:** SDL_AddEventWatch\n"]
11922pub type SDL_EventFilter = ::core::option::Option<
11923 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, event: *mut SDL_Event) -> bool,
11924>;
11925unsafe extern "C" {
11926 #[doc = " Set up a filter to process all events before they are added to the internal\n event queue.\n\n If you just want to see events without modifying them or preventing them\n from being queued, you should use SDL_AddEventWatch() instead.\n\n If the filter function returns true when called, then the event will be\n added to the internal queue. If it returns false, then the event will be\n dropped from the queue, but the internal state will still be updated. This\n allows selective filtering of dynamically arriving events.\n\n **WARNING**: Be very careful of what you do in the event filter function,\n as it may run in a different thread! The exception is handling of\n SDL_EVENT_WINDOW_EXPOSED, which is guaranteed to be sent from the OS on the\n main thread and you are expected to redraw your window in response to this\n event.\n\n On platforms that support it, if the quit event is generated by an\n interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the\n application at the next event poll.\n\n Note: Disabled events never make it to the event filter function; see\n SDL_SetEventEnabled().\n\n Note: Events pushed onto the queue with SDL_PushEvent() get passed through\n the event filter, but events pushed onto the queue with SDL_PeepEvents() do\n not.\n\n **Parameter:** filter a function to call when an event happens.\n **Parameter:** userdata a pointer that is passed to `filter`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddEventWatch\n **See Also:** SDL_SetEventEnabled\n **See Also:** SDL_GetEventFilter\n **See Also:** SDL_PeepEvents\n **See Also:** SDL_PushEvent\n"]
11927 pub fn SDL_SetEventFilter(filter: SDL_EventFilter, userdata: *mut core::ffi::c_void);
11928}
11929unsafe extern "C" {
11930 #[doc = " Query the current event filter.\n\n This function can be used to \"chain\" filters, by saving the existing filter\n before replacing it with a function that will call that saved filter.\n\n **Parameter:** filter the current callback function will be stored here.\n **Parameter:** userdata the pointer that is passed to the current event filter will\n be stored here.\n **Returns:** true on success or false if there is no event filter set.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetEventFilter\n"]
11931 pub fn SDL_GetEventFilter(
11932 filter: *mut SDL_EventFilter,
11933 userdata: *mut *mut core::ffi::c_void,
11934 ) -> bool;
11935}
11936unsafe extern "C" {
11937 #[doc = " Add a callback to be triggered when an event is added to the event queue.\n\n `filter` will be called when an event happens, and its return value is\n ignored.\n\n **WARNING**: Be very careful of what you do in the event filter function,\n as it may run in a different thread!\n\n If the quit event is generated by a signal (e.g. SIGINT), it will bypass\n the internal queue and be delivered to the watch callback immediately, and\n arrive at the next event poll.\n\n Note: the callback is called for events posted by the user through\n SDL_PushEvent(), but not for disabled events, nor for events by a filter\n callback set with SDL_SetEventFilter(), nor for events posted by the user\n through SDL_PeepEvents().\n\n **Parameter:** filter an SDL_EventFilter function to call when an event happens.\n **Parameter:** userdata a pointer that is passed to `filter`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RemoveEventWatch\n **See Also:** SDL_SetEventFilter\n"]
11938 pub fn SDL_AddEventWatch(filter: SDL_EventFilter, userdata: *mut core::ffi::c_void) -> bool;
11939}
11940unsafe extern "C" {
11941 #[doc = " Remove an event watch callback added with SDL_AddEventWatch().\n\n This function takes the same input as SDL_AddEventWatch() to identify and\n delete the corresponding callback.\n\n **Parameter:** filter the function originally passed to SDL_AddEventWatch().\n **Parameter:** userdata the pointer originally passed to SDL_AddEventWatch().\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddEventWatch\n"]
11942 pub fn SDL_RemoveEventWatch(filter: SDL_EventFilter, userdata: *mut core::ffi::c_void);
11943}
11944unsafe extern "C" {
11945 #[doc = " Run a specific filter function on the current event queue, removing any\n events for which the filter returns false.\n\n See SDL_SetEventFilter() for more information. Unlike SDL_SetEventFilter(),\n this function does not change the filter permanently, it only uses the\n supplied filter until this function returns.\n\n **Parameter:** filter the SDL_EventFilter function to call when an event happens.\n **Parameter:** userdata a pointer that is passed to `filter`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetEventFilter\n **See Also:** SDL_SetEventFilter\n"]
11946 pub fn SDL_FilterEvents(filter: SDL_EventFilter, userdata: *mut core::ffi::c_void);
11947}
11948unsafe extern "C" {
11949 #[doc = " Set the state of processing events by type.\n\n **Parameter:** type the type of event; see SDL_EventType for details.\n **Parameter:** enabled whether to process the event or not.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_EventEnabled\n"]
11950 pub fn SDL_SetEventEnabled(type_: Uint32, enabled: bool);
11951}
11952unsafe extern "C" {
11953 #[doc = " Query the state of processing events by type.\n\n **Parameter:** type the type of event; see SDL_EventType for details.\n **Returns:** true if the event is being processed, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetEventEnabled\n"]
11954 pub fn SDL_EventEnabled(type_: Uint32) -> bool;
11955}
11956unsafe extern "C" {
11957 #[doc = " Allocate a set of user-defined events, and return the beginning event\n number for that set of events.\n\n **Parameter:** numevents the number of events to be allocated.\n **Returns:** the beginning event number, or 0 if numevents is invalid or if\n there are not enough user-defined events left.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PushEvent\n"]
11958 pub fn SDL_RegisterEvents(numevents: core::ffi::c_int) -> Uint32;
11959}
11960unsafe extern "C" {
11961 #[doc = " Get window associated with an event.\n\n **Parameter:** event an event containing a `windowID`.\n **Returns:** the associated window on success or NULL if there is none.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PollEvent\n **See Also:** SDL_WaitEvent\n **See Also:** SDL_WaitEventTimeout\n"]
11962 pub fn SDL_GetWindowFromEvent(event: *const SDL_Event) -> *mut SDL_Window;
11963}
11964unsafe extern "C" {
11965 #[doc = " Generate an English description of an event.\n\n This will fill `buf` with a null-terminated string that might look\n something like this:\n\n ```\n SDL_EVENT_MOUSE_MOTION (timestamp=1140256324 windowid=2 which=0 state=0 x=492.99 y=139.09 xrel=52 yrel=6)\n ```\n\n The exact format of the string is not guaranteed; it is intended for\n logging purposes, to be read by a human, and not parsed by a computer.\n\n The returned value follows the same rules as SDL_snprintf(): `buf` will\n always be NULL-terminated (unless `buflen` is zero), and will be truncated\n if `buflen` is too small. The return code is the number of bytes needed for\n the complete string, not counting the NULL-terminator, whether the string\n was truncated or not. Unlike SDL_snprintf(), though, this function never\n returns -1.\n\n **Parameter:** event an event to describe. May be NULL.\n **Parameter:** buf the buffer to fill with the description string. May be NULL.\n **Parameter:** buflen the maximum bytes that can be written to `buf`.\n **Returns:** number of bytes needed for the full string, not counting the\n null-terminator byte.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
11966 pub fn SDL_GetEventDescription(
11967 event: *const SDL_Event,
11968 buf: *mut core::ffi::c_char,
11969 buflen: core::ffi::c_int,
11970 ) -> core::ffi::c_int;
11971}
11972unsafe extern "C" {
11973 #[doc = " Get the directory where the application was run from.\n\n SDL caches the result of this call internally, but the first call to this\n function is not necessarily fast, so plan accordingly.\n\n **macOS and iOS Specific Functionality**: If the application is in a \".app\"\n bundle, this function returns the Resource directory (e.g.\n MyApp.app/Contents/Resources/). This behaviour can be overridden by adding\n a property to the Info.plist file. Adding a string key with the name\n SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the\n behaviour.\n\n Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an\n application in /Applications/SDLApp/MyApp.app):\n\n - `resource`: bundle resource directory (the default). For example:\n `/Applications/SDLApp/MyApp.app/Contents/Resources`\n - `bundle`: the Bundle directory. For example:\n `/Applications/SDLApp/MyApp.app/`\n - `parent`: the containing directory of the bundle. For example:\n `/Applications/SDLApp/`\n\n **Android Specific Functionality**: This function returns \"./\", which\n allows filesystem operations to use internal storage and the asset system.\n\n **Nintendo 3DS Specific Functionality**: This function returns \"romfs\"\n directory of the application as it is uncommon to store resources outside\n the executable. As such it is not a writable directory.\n\n The returned path is guaranteed to end with a path separator ('\\\\' on\n Windows, '/' on most other platforms).\n\n **Returns:** an absolute path in UTF-8 encoding to the application data\n directory. NULL will be returned on error or when the platform\n doesn't implement this functionality, call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPrefPath\n"]
11974 pub fn SDL_GetBasePath() -> *const core::ffi::c_char;
11975}
11976unsafe extern "C" {
11977 #[doc = " Get the user-and-app-specific path where files can be written.\n\n Get the \"pref dir\". This is meant to be where users can write personal\n files (preferences and save games, etc) that are specific to your\n application. This directory is unique per user, per application.\n\n This function will decide the appropriate location in the native\n filesystem, create the directory if necessary, and return a string of the\n absolute path to the directory in UTF-8 encoding.\n\n On Windows, the string might look like:\n\n `C:\\\\Users\\\\bob\\\\AppData\\\\Roaming\\\\My Company\\\\My Program Name\\\\`\n\n On Linux, the string might look like:\n\n `/home/bob/.local/share/My Program Name/`\n\n On macOS, the string might look like:\n\n `/Users/bob/Library/Application Support/My Program Name/`\n\n You should assume the path returned by this function is the only safe place\n to write files (and that SDL_GetBasePath(), while it might be writable, or\n even the parent of the returned path, isn't where you should be writing\n things).\n\n Both the org and app strings may become part of a directory name, so please\n follow these rules:\n\n - Try to use the same org string (_including case-sensitivity_) for all\n your applications that use this function.\n - Always use a unique app string for each one, and make sure it never\n changes for an app once you've decided on it.\n - Unicode characters are legal, as long as they are UTF-8 encoded, but...\n - ...only use letters, numbers, and spaces. Avoid punctuation like \"Game\n Name 2: Bad Guy's Revenge!\" ... \"Game Name 2\" is sufficient.\n\n Due to historical mistakes, `org` is allowed to be NULL or \"\". In such\n cases, SDL will omit the org subdirectory, including on platforms where it\n shouldn't, and including on platforms where this would make your app fail\n certification for an app store. New apps should definitely specify a real\n string for `org`.\n\n The returned path is guaranteed to end with a path separator ('\\\\' on\n Windows, '/' on most other platforms).\n\n **Parameter:** org the name of your organization.\n **Parameter:** app the name of your application.\n **Returns:** a UTF-8 string of the user directory in platform-dependent\n notation. NULL if there's a problem (creating directory failed,\n etc.). This should be freed with SDL_free() when it is no longer\n needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetBasePath\n"]
11978 pub fn SDL_GetPrefPath(
11979 org: *const core::ffi::c_char,
11980 app: *const core::ffi::c_char,
11981 ) -> *mut core::ffi::c_char;
11982}
11983impl SDL_Folder {
11984 #[doc = "< The folder which contains all of the current user's data, preferences, and documents. It usually contains most of the other folders. If a requested folder does not exist, the home folder can be considered a safe fallback to store a user's documents.\n"]
11985 pub const SDL_FOLDER_HOME: SDL_Folder = SDL_Folder(0);
11986 #[doc = "< The folder of files that are displayed on the desktop. Note that the existence of a desktop folder does not guarantee that the system does show icons on its desktop; certain GNU/Linux distros with a graphical environment may not have desktop icons.\n"]
11987 pub const SDL_FOLDER_DESKTOP: SDL_Folder = SDL_Folder(1);
11988 #[doc = "< User document files, possibly application-specific. This is a good place to save a user's projects.\n"]
11989 pub const SDL_FOLDER_DOCUMENTS: SDL_Folder = SDL_Folder(2);
11990 #[doc = "< Standard folder for user files downloaded from the internet.\n"]
11991 pub const SDL_FOLDER_DOWNLOADS: SDL_Folder = SDL_Folder(3);
11992 #[doc = "< Music files that can be played using a standard music player (mp3, ogg...).\n"]
11993 pub const SDL_FOLDER_MUSIC: SDL_Folder = SDL_Folder(4);
11994 #[doc = "< Image files that can be displayed using a standard viewer (png, jpg...).\n"]
11995 pub const SDL_FOLDER_PICTURES: SDL_Folder = SDL_Folder(5);
11996 #[doc = "< Files that are meant to be shared with other users on the same computer.\n"]
11997 pub const SDL_FOLDER_PUBLICSHARE: SDL_Folder = SDL_Folder(6);
11998 #[doc = "< Save files for games.\n"]
11999 pub const SDL_FOLDER_SAVEDGAMES: SDL_Folder = SDL_Folder(7);
12000 #[doc = "< Application screenshots.\n"]
12001 pub const SDL_FOLDER_SCREENSHOTS: SDL_Folder = SDL_Folder(8);
12002 #[doc = "< Template files to be used when the user requests the desktop environment to create a new file in a certain folder, such as \"New Text File.txt\". Any file in the Templates folder can be used as a starting point for a new file.\n"]
12003 pub const SDL_FOLDER_TEMPLATES: SDL_Folder = SDL_Folder(9);
12004 #[doc = "< Video files that can be played using a standard video player (mp4, webm...).\n"]
12005 pub const SDL_FOLDER_VIDEOS: SDL_Folder = SDL_Folder(10);
12006 #[doc = "< Total number of types in this enum, not a folder type by itself.\n"]
12007 pub const SDL_FOLDER_COUNT: SDL_Folder = SDL_Folder(11);
12008}
12009#[repr(transparent)]
12010#[doc = " The type of the OS-provided default folder for a specific purpose.\n\n Note that the Trash folder isn't included here, because trashing files\n usually involves extra OS-specific functionality to remember the file's\n original location.\n\n The folders supported per platform are:\n\n | | Windows | macOS/iOS | tvOS | Unix (XDG) | Haiku | Emscripten |\n | ----------- | ------- | --------- | ---- | ---------- | ----- | ---------- |\n | HOME | X | X | | X | X | X |\n | DESKTOP | X | X | | X | X | |\n | DOCUMENTS | X | X | | X | | |\n | DOWNLOADS | Vista+ | X | | X | | |\n | MUSIC | X | X | | X | | |\n | PICTURES | X | X | | X | | |\n | PUBLICSHARE | | X | | X | | |\n | SAVEDGAMES | Vista+ | | | | | |\n | SCREENSHOTS | Vista+ | | | | | |\n | TEMPLATES | X | X | | X | | |\n | VIDEOS | X | X* | | X | | |\n\n Note that on macOS/iOS, the Videos folder is called \"Movies\".\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_GetUserFolder\n"]
12011#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12012pub struct SDL_Folder(pub core::ffi::c_uint);
12013unsafe extern "C" {
12014 #[doc = " Finds the most suitable user folder for a specific purpose.\n\n Many OSes provide certain standard folders for certain purposes, such as\n storing pictures, music or videos for a certain user. This function gives\n the path for many of those special locations.\n\n This function is specifically for _user_ folders, which are meant for the\n user to access and manage. For application-specific folders, meant to hold\n data for the application to manage, see SDL_GetBasePath() and\n SDL_GetPrefPath().\n\n The returned path is guaranteed to end with a path separator ('\\\\' on\n Windows, '/' on most other platforms).\n\n If NULL is returned, the error may be obtained with SDL_GetError().\n\n **Parameter:** folder the type of folder to find.\n **Returns:** either a null-terminated C string containing the full path to the\n folder, or NULL if an error happened.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12015 pub fn SDL_GetUserFolder(folder: SDL_Folder) -> *const core::ffi::c_char;
12016}
12017impl SDL_PathType {
12018 #[doc = "< path does not exist\n"]
12019 pub const SDL_PATHTYPE_NONE: SDL_PathType = SDL_PathType(0);
12020 #[doc = "< a normal file\n"]
12021 pub const SDL_PATHTYPE_FILE: SDL_PathType = SDL_PathType(1);
12022 #[doc = "< a directory\n"]
12023 pub const SDL_PATHTYPE_DIRECTORY: SDL_PathType = SDL_PathType(2);
12024 #[doc = "< something completely different like a device node (not a symlink, those are always followed)\n"]
12025 pub const SDL_PATHTYPE_OTHER: SDL_PathType = SDL_PathType(3);
12026}
12027#[repr(transparent)]
12028#[doc = " Types of filesystem entries.\n\n Note that there may be other sorts of items on a filesystem: devices, named\n pipes, etc. They are currently reported as SDL_PATHTYPE_OTHER.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_PathInfo\n"]
12029#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12030pub struct SDL_PathType(pub core::ffi::c_uint);
12031#[doc = " Information about a path on the filesystem.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_PathType\n **See Also:** SDL_GetPathInfo\n **See Also:** SDL_GetStoragePathInfo\n"]
12032#[repr(C)]
12033#[derive(Debug, Copy, Clone, Hash)]
12034pub struct SDL_PathInfo {
12035 #[doc = "< the path type\n"]
12036 pub type_: SDL_PathType,
12037 #[doc = "< the file size in bytes\n"]
12038 pub size: Uint64,
12039 #[doc = "< the time when the path was created\n"]
12040 pub create_time: SDL_Time,
12041 #[doc = "< the last time the path was modified\n"]
12042 pub modify_time: SDL_Time,
12043 #[doc = "< the last time the path was read\n"]
12044 pub access_time: SDL_Time,
12045}
12046#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12047const _: () = {
12048 ["Size of SDL_PathInfo"][::core::mem::size_of::<SDL_PathInfo>() - 40usize];
12049 ["Alignment of SDL_PathInfo"][::core::mem::align_of::<SDL_PathInfo>() - 8usize];
12050 ["Offset of field: SDL_PathInfo::type_"][::core::mem::offset_of!(SDL_PathInfo, type_) - 0usize];
12051 ["Offset of field: SDL_PathInfo::size"][::core::mem::offset_of!(SDL_PathInfo, size) - 8usize];
12052 ["Offset of field: SDL_PathInfo::create_time"]
12053 [::core::mem::offset_of!(SDL_PathInfo, create_time) - 16usize];
12054 ["Offset of field: SDL_PathInfo::modify_time"]
12055 [::core::mem::offset_of!(SDL_PathInfo, modify_time) - 24usize];
12056 ["Offset of field: SDL_PathInfo::access_time"]
12057 [::core::mem::offset_of!(SDL_PathInfo, access_time) - 32usize];
12058};
12059impl Default for SDL_PathInfo {
12060 fn default() -> Self {
12061 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
12062 unsafe {
12063 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
12064 s.assume_init()
12065 }
12066 }
12067}
12068#[doc = " Flags for path matching.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_GlobDirectory\n **See Also:** SDL_GlobStorageDirectory\n"]
12069pub type SDL_GlobFlags = Uint32;
12070unsafe extern "C" {
12071 #[doc = " Create a directory, and any missing parent directories.\n\n This reports success if `path` already exists as a directory.\n\n If parent directories are missing, it will also create them. Note that if\n this fails, it will not remove any parent directories it already made.\n\n **Parameter:** path the path of the directory to create.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12072 pub fn SDL_CreateDirectory(path: *const core::ffi::c_char) -> bool;
12073}
12074impl SDL_EnumerationResult {
12075 #[doc = "< Value that requests that enumeration continue.\n"]
12076 pub const SDL_ENUM_CONTINUE: SDL_EnumerationResult = SDL_EnumerationResult(0);
12077 #[doc = "< Value that requests that enumeration stop, successfully.\n"]
12078 pub const SDL_ENUM_SUCCESS: SDL_EnumerationResult = SDL_EnumerationResult(1);
12079 #[doc = "< Value that requests that enumeration stop, as a failure.\n"]
12080 pub const SDL_ENUM_FAILURE: SDL_EnumerationResult = SDL_EnumerationResult(2);
12081}
12082#[repr(transparent)]
12083#[doc = " Possible results from an enumeration callback.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_EnumerateDirectoryCallback\n"]
12084#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12085pub struct SDL_EnumerationResult(pub core::ffi::c_uint);
12086#[doc = " Callback for directory enumeration.\n\n Enumeration of directory entries will continue until either all entries\n have been provided to the callback, or the callback has requested a stop\n through its return value.\n\n Returning SDL_ENUM_CONTINUE will let enumeration proceed, calling the\n callback with further entries. SDL_ENUM_SUCCESS and SDL_ENUM_FAILURE will\n terminate the enumeration early, and dictate the return value of the\n enumeration function itself.\n\n `dirname` is guaranteed to end with a path separator ('\\\\' on Windows, '/'\n on most other platforms).\n\n **Parameter:** userdata an app-controlled pointer that is passed to the callback.\n **Parameter:** dirname the directory that is being enumerated.\n **Parameter:** fname the next entry in the enumeration.\n **Returns:** how the enumeration should proceed.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_EnumerateDirectory\n"]
12087pub type SDL_EnumerateDirectoryCallback = ::core::option::Option<
12088 unsafe extern "C" fn(
12089 userdata: *mut core::ffi::c_void,
12090 dirname: *const core::ffi::c_char,
12091 fname: *const core::ffi::c_char,
12092 ) -> SDL_EnumerationResult,
12093>;
12094unsafe extern "C" {
12095 #[doc = " Enumerate a directory through a callback function.\n\n This function provides every directory entry through an app-provided\n callback, called once for each directory entry, until all results have been\n provided or the callback returns either SDL_ENUM_SUCCESS or\n SDL_ENUM_FAILURE.\n\n This will return false if there was a system problem in general, or if a\n callback returns SDL_ENUM_FAILURE. A successful return means a callback\n returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries\n were enumerated.\n\n **Parameter:** path the path of the directory to enumerate.\n **Parameter:** callback a function that is called for each entry in the directory.\n **Parameter:** userdata a pointer that is passed to `callback`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12096 pub fn SDL_EnumerateDirectory(
12097 path: *const core::ffi::c_char,
12098 callback: SDL_EnumerateDirectoryCallback,
12099 userdata: *mut core::ffi::c_void,
12100 ) -> bool;
12101}
12102unsafe extern "C" {
12103 #[doc = " Remove a file or an empty directory.\n\n Directories that are not empty will fail; this function will not recursely\n delete directory trees.\n\n **Parameter:** path the path to remove from the filesystem.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12104 pub fn SDL_RemovePath(path: *const core::ffi::c_char) -> bool;
12105}
12106unsafe extern "C" {
12107 #[doc = " Rename a file or directory.\n\n If the file at `newpath` already exists, it will be replaced.\n\n Note that this will not copy files across filesystems/drives/volumes, as\n that is a much more complicated (and possibly time-consuming) operation.\n\n Which is to say, if this function fails, SDL_CopyFile() to a temporary file\n in the same directory as `newpath`, then SDL_RenamePath() from the\n temporary file to `newpath` and SDL_RemovePath() on `oldpath` might work\n for files. Renaming a non-empty directory across filesystems is\n dramatically more complex, however.\n\n **Parameter:** oldpath the old path.\n **Parameter:** newpath the new path.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12108 pub fn SDL_RenamePath(
12109 oldpath: *const core::ffi::c_char,
12110 newpath: *const core::ffi::c_char,
12111 ) -> bool;
12112}
12113unsafe extern "C" {
12114 #[doc = " Copy a file.\n\n If the file at `newpath` already exists, it will be overwritten with the\n contents of the file at `oldpath`.\n\n This function will block until the copy is complete, which might be a\n significant time for large files on slow disks. On some platforms, the copy\n can be handed off to the OS itself, but on others SDL might just open both\n paths, and read from one and write to the other.\n\n Note that this is not an atomic operation! If something tries to read from\n `newpath` while the copy is in progress, it will see an incomplete copy of\n the data, and if the calling thread terminates (or the power goes out)\n during the copy, `newpath`'s previous contents will be gone, replaced with\n an incomplete copy of the data. To avoid this risk, it is recommended that\n the app copy to a temporary file in the same directory as `newpath`, and if\n the copy is successful, use SDL_RenamePath() to replace `newpath` with the\n temporary file. This will ensure that reads of `newpath` will either see a\n complete copy of the data, or it will see the pre-copy state of `newpath`.\n\n This function attempts to synchronize the newly-copied data to disk before\n returning, if the platform allows it, so that the renaming trick will not\n have a problem in a system crash or power failure, where the file could be\n renamed but the contents never made it from the system file cache to the\n physical disk.\n\n If the copy fails for any reason, the state of `newpath` is undefined. It\n might be half a copy, it might be the untouched data of what was already\n there, or it might be a zero-byte file, etc.\n\n **Parameter:** oldpath the old path.\n **Parameter:** newpath the new path.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread, but this\n operation is not atomic, so the app might need to protect\n access to specific paths from other threads if appropriate.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12115 pub fn SDL_CopyFile(
12116 oldpath: *const core::ffi::c_char,
12117 newpath: *const core::ffi::c_char,
12118 ) -> bool;
12119}
12120unsafe extern "C" {
12121 #[doc = " Get information about a filesystem path.\n\n Symlinks, on filesystems that support them, are always followed, so you\n will always get information on what the symlink eventually points to, and\n not the symlink itself.\n\n **Parameter:** path the path to query.\n **Parameter:** info a pointer filled in with information about the path, or NULL to\n check for the existence of a file.\n **Returns:** true on success or false if the file doesn't exist, or another\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12122 pub fn SDL_GetPathInfo(path: *const core::ffi::c_char, info: *mut SDL_PathInfo) -> bool;
12123}
12124unsafe extern "C" {
12125 #[doc = " Enumerate a directory tree, filtered by pattern, and return a list.\n\n Files are filtered out if they don't match the string in `pattern`, which\n may contain wildcard characters `*` (match everything) and `?` (match one\n character). If pattern is NULL, no filtering is done and all results are\n returned. Subdirectories are permitted, and are specified with a path\n separator of `/`. Wildcard characters `*` and `?` never match a path\n separator.\n\n `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching\n case-insensitive.\n\n The returned array is always NULL-terminated, for your iterating\n convenience, but if `count` is non-NULL, on return it will contain the\n number of items in the array, not counting the NULL terminator.\n\n **Parameter:** path the path of the directory to enumerate.\n **Parameter:** pattern the pattern that files in the directory must match. Can be\n NULL.\n **Parameter:** flags `SDL_GLOB_*` bitflags that affect this search.\n **Parameter:** count on return, will be set to the number of items in the returned\n array. Can be NULL.\n **Returns:** an array of strings on success or NULL on failure; call\n SDL_GetError() for more information. This is a single allocation\n that should be freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12126 pub fn SDL_GlobDirectory(
12127 path: *const core::ffi::c_char,
12128 pattern: *const core::ffi::c_char,
12129 flags: SDL_GlobFlags,
12130 count: *mut core::ffi::c_int,
12131 ) -> *mut *mut core::ffi::c_char;
12132}
12133unsafe extern "C" {
12134 #[doc = " Get what the system believes is the \"current working directory.\"\n\n For systems without a concept of a current working directory, this will\n still attempt to provide something reasonable.\n\n SDL does not provide a means to _change_ the current working directory; for\n platforms without this concept, this would cause surprises with file access\n outside of SDL.\n\n The returned path is guaranteed to end with a path separator ('\\\\' on\n Windows, '/' on most other platforms).\n\n **Returns:** a UTF-8 string of the current working directory in\n platform-dependent notation. NULL if there's a problem. This\n should be freed with SDL_free() when it is no longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
12135 pub fn SDL_GetCurrentDirectory() -> *mut core::ffi::c_char;
12136}
12137#[repr(C)]
12138#[derive(Debug, Copy, Clone)]
12139pub struct SDL_GPUDevice {
12140 _unused: [u8; 0],
12141}
12142#[repr(C)]
12143#[derive(Debug, Copy, Clone)]
12144pub struct SDL_GPUBuffer {
12145 _unused: [u8; 0],
12146}
12147#[repr(C)]
12148#[derive(Debug, Copy, Clone)]
12149pub struct SDL_GPUTransferBuffer {
12150 _unused: [u8; 0],
12151}
12152#[repr(C)]
12153#[derive(Debug, Copy, Clone)]
12154pub struct SDL_GPUTexture {
12155 _unused: [u8; 0],
12156}
12157#[repr(C)]
12158#[derive(Debug, Copy, Clone)]
12159pub struct SDL_GPUSampler {
12160 _unused: [u8; 0],
12161}
12162#[repr(C)]
12163#[derive(Debug, Copy, Clone)]
12164pub struct SDL_GPUShader {
12165 _unused: [u8; 0],
12166}
12167#[repr(C)]
12168#[derive(Debug, Copy, Clone)]
12169pub struct SDL_GPUComputePipeline {
12170 _unused: [u8; 0],
12171}
12172#[repr(C)]
12173#[derive(Debug, Copy, Clone)]
12174pub struct SDL_GPUGraphicsPipeline {
12175 _unused: [u8; 0],
12176}
12177#[repr(C)]
12178#[derive(Debug, Copy, Clone)]
12179pub struct SDL_GPUCommandBuffer {
12180 _unused: [u8; 0],
12181}
12182#[repr(C)]
12183#[derive(Debug, Copy, Clone)]
12184pub struct SDL_GPURenderPass {
12185 _unused: [u8; 0],
12186}
12187#[repr(C)]
12188#[derive(Debug, Copy, Clone)]
12189pub struct SDL_GPUComputePass {
12190 _unused: [u8; 0],
12191}
12192#[repr(C)]
12193#[derive(Debug, Copy, Clone)]
12194pub struct SDL_GPUCopyPass {
12195 _unused: [u8; 0],
12196}
12197#[repr(C)]
12198#[derive(Debug, Copy, Clone)]
12199pub struct SDL_GPUFence {
12200 _unused: [u8; 0],
12201}
12202impl SDL_GPUPrimitiveType {
12203 #[doc = "< A series of separate triangles.\n"]
12204 pub const SDL_GPU_PRIMITIVETYPE_TRIANGLELIST: SDL_GPUPrimitiveType = SDL_GPUPrimitiveType(0);
12205 #[doc = "< A series of connected triangles.\n"]
12206 pub const SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP: SDL_GPUPrimitiveType = SDL_GPUPrimitiveType(1);
12207 #[doc = "< A series of separate lines.\n"]
12208 pub const SDL_GPU_PRIMITIVETYPE_LINELIST: SDL_GPUPrimitiveType = SDL_GPUPrimitiveType(2);
12209 #[doc = "< A series of connected lines.\n"]
12210 pub const SDL_GPU_PRIMITIVETYPE_LINESTRIP: SDL_GPUPrimitiveType = SDL_GPUPrimitiveType(3);
12211 #[doc = "< A series of separate points.\n"]
12212 pub const SDL_GPU_PRIMITIVETYPE_POINTLIST: SDL_GPUPrimitiveType = SDL_GPUPrimitiveType(4);
12213}
12214#[repr(transparent)]
12215#[doc = " Specifies the primitive topology of a graphics pipeline.\n\n If you are using POINTLIST you must include a point size output in the\n vertex shader.\n\n - For HLSL compiling to SPIRV you must decorate a float output with\n [[vk::builtin(\"PointSize\")]].\n - For GLSL you must set the gl_PointSize builtin.\n - For MSL you must include a float output with the [[point_size]]\n decorator.\n\n Note that sized point topology is totally unsupported on D3D12. Any size\n other than 1 will be ignored. In general, you should avoid using point\n topology for both compatibility and performance reasons. You WILL regret\n using it.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12216#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12217pub struct SDL_GPUPrimitiveType(pub core::ffi::c_uint);
12218impl SDL_GPULoadOp {
12219 #[doc = "< The previous contents of the texture will be preserved.\n"]
12220 pub const SDL_GPU_LOADOP_LOAD: SDL_GPULoadOp = SDL_GPULoadOp(0);
12221 #[doc = "< The contents of the texture will be cleared to a color.\n"]
12222 pub const SDL_GPU_LOADOP_CLEAR: SDL_GPULoadOp = SDL_GPULoadOp(1);
12223 #[doc = "< The previous contents of the texture need not be preserved. The contents will be undefined.\n"]
12224 pub const SDL_GPU_LOADOP_DONT_CARE: SDL_GPULoadOp = SDL_GPULoadOp(2);
12225}
12226#[repr(transparent)]
12227#[doc = " Specifies how the contents of a texture attached to a render pass are\n treated at the beginning of the render pass.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_BeginGPURenderPass\n"]
12228#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12229pub struct SDL_GPULoadOp(pub core::ffi::c_uint);
12230impl SDL_GPUStoreOp {
12231 #[doc = "< The contents generated during the render pass will be written to memory.\n"]
12232 pub const SDL_GPU_STOREOP_STORE: SDL_GPUStoreOp = SDL_GPUStoreOp(0);
12233 #[doc = "< The contents generated during the render pass are not needed and may be discarded. The contents will be undefined.\n"]
12234 pub const SDL_GPU_STOREOP_DONT_CARE: SDL_GPUStoreOp = SDL_GPUStoreOp(1);
12235 #[doc = "< The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture may then be discarded and will be undefined.\n"]
12236 pub const SDL_GPU_STOREOP_RESOLVE: SDL_GPUStoreOp = SDL_GPUStoreOp(2);
12237 #[doc = "< The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture will be written to memory.\n"]
12238 pub const SDL_GPU_STOREOP_RESOLVE_AND_STORE: SDL_GPUStoreOp = SDL_GPUStoreOp(3);
12239}
12240#[repr(transparent)]
12241#[doc = " Specifies how the contents of a texture attached to a render pass are\n treated at the end of the render pass.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_BeginGPURenderPass\n"]
12242#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12243pub struct SDL_GPUStoreOp(pub core::ffi::c_uint);
12244impl SDL_GPUIndexElementSize {
12245 #[doc = "< The index elements are 16-bit.\n"]
12246 pub const SDL_GPU_INDEXELEMENTSIZE_16BIT: SDL_GPUIndexElementSize = SDL_GPUIndexElementSize(0);
12247 #[doc = "< The index elements are 32-bit.\n"]
12248 pub const SDL_GPU_INDEXELEMENTSIZE_32BIT: SDL_GPUIndexElementSize = SDL_GPUIndexElementSize(1);
12249}
12250#[repr(transparent)]
12251#[doc = " Specifies the size of elements in an index buffer.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12252#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12253pub struct SDL_GPUIndexElementSize(pub core::ffi::c_uint);
12254impl SDL_GPUTextureFormat {
12255 pub const SDL_GPU_TEXTUREFORMAT_INVALID: SDL_GPUTextureFormat = SDL_GPUTextureFormat(0);
12256 pub const SDL_GPU_TEXTUREFORMAT_A8_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(1);
12257 pub const SDL_GPU_TEXTUREFORMAT_R8_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(2);
12258 pub const SDL_GPU_TEXTUREFORMAT_R8G8_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(3);
12259 pub const SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(4);
12260 pub const SDL_GPU_TEXTUREFORMAT_R16_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(5);
12261 pub const SDL_GPU_TEXTUREFORMAT_R16G16_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(6);
12262 pub const SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM: SDL_GPUTextureFormat =
12263 SDL_GPUTextureFormat(7);
12264 pub const SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM: SDL_GPUTextureFormat =
12265 SDL_GPUTextureFormat(8);
12266 pub const SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(9);
12267 pub const SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(10);
12268 pub const SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(11);
12269 pub const SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(12);
12270 pub const SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(13);
12271 pub const SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(14);
12272 pub const SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(15);
12273 pub const SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(16);
12274 pub const SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(17);
12275 pub const SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(18);
12276 pub const SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(19);
12277 pub const SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT: SDL_GPUTextureFormat =
12278 SDL_GPUTextureFormat(20);
12279 pub const SDL_GPU_TEXTUREFORMAT_R8_SNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(21);
12280 pub const SDL_GPU_TEXTUREFORMAT_R8G8_SNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(22);
12281 pub const SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(23);
12282 pub const SDL_GPU_TEXTUREFORMAT_R16_SNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(24);
12283 pub const SDL_GPU_TEXTUREFORMAT_R16G16_SNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(25);
12284 pub const SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM: SDL_GPUTextureFormat =
12285 SDL_GPUTextureFormat(26);
12286 pub const SDL_GPU_TEXTUREFORMAT_R16_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(27);
12287 pub const SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(28);
12288 pub const SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT: SDL_GPUTextureFormat =
12289 SDL_GPUTextureFormat(29);
12290 pub const SDL_GPU_TEXTUREFORMAT_R32_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(30);
12291 pub const SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(31);
12292 pub const SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT: SDL_GPUTextureFormat =
12293 SDL_GPUTextureFormat(32);
12294 pub const SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT: SDL_GPUTextureFormat =
12295 SDL_GPUTextureFormat(33);
12296 pub const SDL_GPU_TEXTUREFORMAT_R8_UINT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(34);
12297 pub const SDL_GPU_TEXTUREFORMAT_R8G8_UINT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(35);
12298 pub const SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(36);
12299 pub const SDL_GPU_TEXTUREFORMAT_R16_UINT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(37);
12300 pub const SDL_GPU_TEXTUREFORMAT_R16G16_UINT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(38);
12301 pub const SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT: SDL_GPUTextureFormat =
12302 SDL_GPUTextureFormat(39);
12303 pub const SDL_GPU_TEXTUREFORMAT_R32_UINT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(40);
12304 pub const SDL_GPU_TEXTUREFORMAT_R32G32_UINT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(41);
12305 pub const SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT: SDL_GPUTextureFormat =
12306 SDL_GPUTextureFormat(42);
12307 pub const SDL_GPU_TEXTUREFORMAT_R8_INT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(43);
12308 pub const SDL_GPU_TEXTUREFORMAT_R8G8_INT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(44);
12309 pub const SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(45);
12310 pub const SDL_GPU_TEXTUREFORMAT_R16_INT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(46);
12311 pub const SDL_GPU_TEXTUREFORMAT_R16G16_INT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(47);
12312 pub const SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT: SDL_GPUTextureFormat =
12313 SDL_GPUTextureFormat(48);
12314 pub const SDL_GPU_TEXTUREFORMAT_R32_INT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(49);
12315 pub const SDL_GPU_TEXTUREFORMAT_R32G32_INT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(50);
12316 pub const SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT: SDL_GPUTextureFormat =
12317 SDL_GPUTextureFormat(51);
12318 pub const SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB: SDL_GPUTextureFormat =
12319 SDL_GPUTextureFormat(52);
12320 pub const SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB: SDL_GPUTextureFormat =
12321 SDL_GPUTextureFormat(53);
12322 pub const SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB: SDL_GPUTextureFormat =
12323 SDL_GPUTextureFormat(54);
12324 pub const SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB: SDL_GPUTextureFormat =
12325 SDL_GPUTextureFormat(55);
12326 pub const SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB: SDL_GPUTextureFormat =
12327 SDL_GPUTextureFormat(56);
12328 pub const SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB: SDL_GPUTextureFormat =
12329 SDL_GPUTextureFormat(57);
12330 pub const SDL_GPU_TEXTUREFORMAT_D16_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(58);
12331 pub const SDL_GPU_TEXTUREFORMAT_D24_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(59);
12332 pub const SDL_GPU_TEXTUREFORMAT_D32_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(60);
12333 pub const SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT: SDL_GPUTextureFormat =
12334 SDL_GPUTextureFormat(61);
12335 pub const SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT: SDL_GPUTextureFormat =
12336 SDL_GPUTextureFormat(62);
12337 pub const SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(63);
12338 pub const SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(64);
12339 pub const SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(65);
12340 pub const SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(66);
12341 pub const SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(67);
12342 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(68);
12343 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(69);
12344 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM: SDL_GPUTextureFormat = SDL_GPUTextureFormat(70);
12345 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM: SDL_GPUTextureFormat =
12346 SDL_GPUTextureFormat(71);
12347 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM: SDL_GPUTextureFormat =
12348 SDL_GPUTextureFormat(72);
12349 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM: SDL_GPUTextureFormat =
12350 SDL_GPUTextureFormat(73);
12351 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM: SDL_GPUTextureFormat =
12352 SDL_GPUTextureFormat(74);
12353 pub const SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM: SDL_GPUTextureFormat =
12354 SDL_GPUTextureFormat(75);
12355 pub const SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM: SDL_GPUTextureFormat =
12356 SDL_GPUTextureFormat(76);
12357 pub const SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB: SDL_GPUTextureFormat =
12358 SDL_GPUTextureFormat(77);
12359 pub const SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB: SDL_GPUTextureFormat =
12360 SDL_GPUTextureFormat(78);
12361 pub const SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB: SDL_GPUTextureFormat =
12362 SDL_GPUTextureFormat(79);
12363 pub const SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB: SDL_GPUTextureFormat =
12364 SDL_GPUTextureFormat(80);
12365 pub const SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB: SDL_GPUTextureFormat =
12366 SDL_GPUTextureFormat(81);
12367 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB: SDL_GPUTextureFormat =
12368 SDL_GPUTextureFormat(82);
12369 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB: SDL_GPUTextureFormat =
12370 SDL_GPUTextureFormat(83);
12371 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB: SDL_GPUTextureFormat =
12372 SDL_GPUTextureFormat(84);
12373 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB: SDL_GPUTextureFormat =
12374 SDL_GPUTextureFormat(85);
12375 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB: SDL_GPUTextureFormat =
12376 SDL_GPUTextureFormat(86);
12377 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB: SDL_GPUTextureFormat =
12378 SDL_GPUTextureFormat(87);
12379 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB: SDL_GPUTextureFormat =
12380 SDL_GPUTextureFormat(88);
12381 pub const SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB: SDL_GPUTextureFormat =
12382 SDL_GPUTextureFormat(89);
12383 pub const SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB: SDL_GPUTextureFormat =
12384 SDL_GPUTextureFormat(90);
12385 pub const SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(91);
12386 pub const SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(92);
12387 pub const SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(93);
12388 pub const SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(94);
12389 pub const SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(95);
12390 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(96);
12391 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(97);
12392 pub const SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT: SDL_GPUTextureFormat = SDL_GPUTextureFormat(98);
12393 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT: SDL_GPUTextureFormat =
12394 SDL_GPUTextureFormat(99);
12395 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT: SDL_GPUTextureFormat =
12396 SDL_GPUTextureFormat(100);
12397 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT: SDL_GPUTextureFormat =
12398 SDL_GPUTextureFormat(101);
12399 pub const SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT: SDL_GPUTextureFormat =
12400 SDL_GPUTextureFormat(102);
12401 pub const SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT: SDL_GPUTextureFormat =
12402 SDL_GPUTextureFormat(103);
12403 pub const SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT: SDL_GPUTextureFormat =
12404 SDL_GPUTextureFormat(104);
12405}
12406#[repr(transparent)]
12407#[doc = " Specifies the pixel format of a texture.\n\n Texture format support varies depending on driver, hardware, and usage\n flags. In general, you should use SDL_GPUTextureSupportsFormat to query if\n a format is supported before using it. However, there are a few guaranteed\n formats.\n\n FIXME: Check universal support for 32-bit component formats FIXME: Check\n universal support for SIMULTANEOUS_READ_WRITE\n\n For SAMPLER usage, the following formats are universally supported:\n\n - R8G8B8A8_UNORM\n - B8G8R8A8_UNORM\n - R8_UNORM\n - R8_SNORM\n - R8G8_UNORM\n - R8G8_SNORM\n - R8G8B8A8_SNORM\n - R16_FLOAT\n - R16G16_FLOAT\n - R16G16B16A16_FLOAT\n - R32_FLOAT\n - R32G32_FLOAT\n - R32G32B32A32_FLOAT\n - R11G11B10_UFLOAT\n - R8G8B8A8_UNORM_SRGB\n - B8G8R8A8_UNORM_SRGB\n - D16_UNORM\n\n For COLOR_TARGET usage, the following formats are universally supported:\n\n - R8G8B8A8_UNORM\n - B8G8R8A8_UNORM\n - R8_UNORM\n - R16_FLOAT\n - R16G16_FLOAT\n - R16G16B16A16_FLOAT\n - R32_FLOAT\n - R32G32_FLOAT\n - R32G32B32A32_FLOAT\n - R8_UINT\n - R8G8_UINT\n - R8G8B8A8_UINT\n - R16_UINT\n - R16G16_UINT\n - R16G16B16A16_UINT\n - R8_INT\n - R8G8_INT\n - R8G8B8A8_INT\n - R16_INT\n - R16G16_INT\n - R16G16B16A16_INT\n - R8G8B8A8_UNORM_SRGB\n - B8G8R8A8_UNORM_SRGB\n\n For STORAGE usages, the following formats are universally supported:\n\n - R8G8B8A8_UNORM\n - R8G8B8A8_SNORM\n - R16G16B16A16_FLOAT\n - R32_FLOAT\n - R32G32_FLOAT\n - R32G32B32A32_FLOAT\n - R8G8B8A8_UINT\n - R16G16B16A16_UINT\n - R8G8B8A8_INT\n - R16G16B16A16_INT\n\n For DEPTH_STENCIL_TARGET usage, the following formats are universally\n supported:\n\n - D16_UNORM\n - Either (but not necessarily both!) D24_UNORM or D32_FLOAT\n - Either (but not necessarily both!) D24_UNORM_S8_UINT or D32_FLOAT_S8_UINT\n\n Unless D16_UNORM is sufficient for your purposes, always check which of\n D24/D32 is supported before creating a depth-stencil texture!\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUTexture\n **See Also:** SDL_GPUTextureSupportsFormat\n"]
12408#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12409pub struct SDL_GPUTextureFormat(pub core::ffi::c_uint);
12410#[doc = " Specifies how a texture is intended to be used by the client.\n\n A texture must have at least one usage flag. Note that some usage flag\n combinations are invalid.\n\n With regards to compute storage usage, READ | WRITE means that you can have\n shader A that only writes into the texture and shader B that only reads\n from the texture and bind the same texture to either shader respectively.\n SIMULTANEOUS means that you can do reads and writes within the same shader\n or compute pass. It also implies that atomic ops can be used, since those\n are read-modify-write operations. If you use SIMULTANEOUS, you are\n responsible for avoiding data races, as there is no data synchronization\n within a compute pass. Note that SIMULTANEOUS usage is only supported by a\n limited number of texture formats.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUTexture\n"]
12411pub type SDL_GPUTextureUsageFlags = Uint32;
12412impl SDL_GPUTextureType {
12413 #[doc = "< The texture is a 2-dimensional image.\n"]
12414 pub const SDL_GPU_TEXTURETYPE_2D: SDL_GPUTextureType = SDL_GPUTextureType(0);
12415 #[doc = "< The texture is a 2-dimensional array image.\n"]
12416 pub const SDL_GPU_TEXTURETYPE_2D_ARRAY: SDL_GPUTextureType = SDL_GPUTextureType(1);
12417 #[doc = "< The texture is a 3-dimensional image.\n"]
12418 pub const SDL_GPU_TEXTURETYPE_3D: SDL_GPUTextureType = SDL_GPUTextureType(2);
12419 #[doc = "< The texture is a cube image.\n"]
12420 pub const SDL_GPU_TEXTURETYPE_CUBE: SDL_GPUTextureType = SDL_GPUTextureType(3);
12421 #[doc = "< The texture is a cube array image.\n"]
12422 pub const SDL_GPU_TEXTURETYPE_CUBE_ARRAY: SDL_GPUTextureType = SDL_GPUTextureType(4);
12423}
12424#[repr(transparent)]
12425#[doc = " Specifies the type of a texture.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUTexture\n"]
12426#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12427pub struct SDL_GPUTextureType(pub core::ffi::c_uint);
12428impl SDL_GPUSampleCount {
12429 #[doc = "< No multisampling.\n"]
12430 pub const SDL_GPU_SAMPLECOUNT_1: SDL_GPUSampleCount = SDL_GPUSampleCount(0);
12431 #[doc = "< MSAA 2x\n"]
12432 pub const SDL_GPU_SAMPLECOUNT_2: SDL_GPUSampleCount = SDL_GPUSampleCount(1);
12433 #[doc = "< MSAA 4x\n"]
12434 pub const SDL_GPU_SAMPLECOUNT_4: SDL_GPUSampleCount = SDL_GPUSampleCount(2);
12435 #[doc = "< MSAA 8x\n"]
12436 pub const SDL_GPU_SAMPLECOUNT_8: SDL_GPUSampleCount = SDL_GPUSampleCount(3);
12437}
12438#[repr(transparent)]
12439#[doc = " Specifies the sample count of a texture.\n\n Used in multisampling. Note that this value only applies when the texture\n is used as a render target.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUTexture\n **See Also:** SDL_GPUTextureSupportsSampleCount\n"]
12440#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12441pub struct SDL_GPUSampleCount(pub core::ffi::c_uint);
12442impl SDL_GPUCubeMapFace {
12443 pub const SDL_GPU_CUBEMAPFACE_POSITIVEX: SDL_GPUCubeMapFace = SDL_GPUCubeMapFace(0);
12444 pub const SDL_GPU_CUBEMAPFACE_NEGATIVEX: SDL_GPUCubeMapFace = SDL_GPUCubeMapFace(1);
12445 pub const SDL_GPU_CUBEMAPFACE_POSITIVEY: SDL_GPUCubeMapFace = SDL_GPUCubeMapFace(2);
12446 pub const SDL_GPU_CUBEMAPFACE_NEGATIVEY: SDL_GPUCubeMapFace = SDL_GPUCubeMapFace(3);
12447 pub const SDL_GPU_CUBEMAPFACE_POSITIVEZ: SDL_GPUCubeMapFace = SDL_GPUCubeMapFace(4);
12448 pub const SDL_GPU_CUBEMAPFACE_NEGATIVEZ: SDL_GPUCubeMapFace = SDL_GPUCubeMapFace(5);
12449}
12450#[repr(transparent)]
12451#[doc = " Specifies the face of a cube map.\n\n Can be passed in as the layer field in texture-related structs.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
12452#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12453pub struct SDL_GPUCubeMapFace(pub core::ffi::c_uint);
12454#[doc = " Specifies how a buffer is intended to be used by the client.\n\n A buffer must have at least one usage flag. Note that some usage flag\n combinations are invalid.\n\n Unlike textures, READ | WRITE can be used for simultaneous read-write\n usage. The same data synchronization concerns as textures apply.\n\n If you use a STORAGE flag, the data in the buffer must respect std140\n layout conventions. In practical terms this means you must ensure that vec3\n and vec4 fields are 16-byte aligned.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUBuffer\n"]
12455pub type SDL_GPUBufferUsageFlags = Uint32;
12456impl SDL_GPUTransferBufferUsage {
12457 pub const SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD: SDL_GPUTransferBufferUsage =
12458 SDL_GPUTransferBufferUsage(0);
12459 pub const SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD: SDL_GPUTransferBufferUsage =
12460 SDL_GPUTransferBufferUsage(1);
12461}
12462#[repr(transparent)]
12463#[doc = " Specifies how a transfer buffer is intended to be used by the client.\n\n Note that mapping and copying FROM an upload transfer buffer or TO a\n download transfer buffer is undefined behavior.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUTransferBuffer\n"]
12464#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12465pub struct SDL_GPUTransferBufferUsage(pub core::ffi::c_uint);
12466impl SDL_GPUShaderStage {
12467 pub const SDL_GPU_SHADERSTAGE_VERTEX: SDL_GPUShaderStage = SDL_GPUShaderStage(0);
12468 pub const SDL_GPU_SHADERSTAGE_FRAGMENT: SDL_GPUShaderStage = SDL_GPUShaderStage(1);
12469}
12470#[repr(transparent)]
12471#[doc = " Specifies which stage a shader program corresponds to.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
12472#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12473pub struct SDL_GPUShaderStage(pub core::ffi::c_uint);
12474#[doc = " Specifies the format of shader code.\n\n Each format corresponds to a specific backend that accepts it.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
12475pub type SDL_GPUShaderFormat = Uint32;
12476impl SDL_GPUVertexElementFormat {
12477 pub const SDL_GPU_VERTEXELEMENTFORMAT_INVALID: SDL_GPUVertexElementFormat =
12478 SDL_GPUVertexElementFormat(0);
12479 pub const SDL_GPU_VERTEXELEMENTFORMAT_INT: SDL_GPUVertexElementFormat =
12480 SDL_GPUVertexElementFormat(1);
12481 pub const SDL_GPU_VERTEXELEMENTFORMAT_INT2: SDL_GPUVertexElementFormat =
12482 SDL_GPUVertexElementFormat(2);
12483 pub const SDL_GPU_VERTEXELEMENTFORMAT_INT3: SDL_GPUVertexElementFormat =
12484 SDL_GPUVertexElementFormat(3);
12485 pub const SDL_GPU_VERTEXELEMENTFORMAT_INT4: SDL_GPUVertexElementFormat =
12486 SDL_GPUVertexElementFormat(4);
12487 pub const SDL_GPU_VERTEXELEMENTFORMAT_UINT: SDL_GPUVertexElementFormat =
12488 SDL_GPUVertexElementFormat(5);
12489 pub const SDL_GPU_VERTEXELEMENTFORMAT_UINT2: SDL_GPUVertexElementFormat =
12490 SDL_GPUVertexElementFormat(6);
12491 pub const SDL_GPU_VERTEXELEMENTFORMAT_UINT3: SDL_GPUVertexElementFormat =
12492 SDL_GPUVertexElementFormat(7);
12493 pub const SDL_GPU_VERTEXELEMENTFORMAT_UINT4: SDL_GPUVertexElementFormat =
12494 SDL_GPUVertexElementFormat(8);
12495 pub const SDL_GPU_VERTEXELEMENTFORMAT_FLOAT: SDL_GPUVertexElementFormat =
12496 SDL_GPUVertexElementFormat(9);
12497 pub const SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2: SDL_GPUVertexElementFormat =
12498 SDL_GPUVertexElementFormat(10);
12499 pub const SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3: SDL_GPUVertexElementFormat =
12500 SDL_GPUVertexElementFormat(11);
12501 pub const SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4: SDL_GPUVertexElementFormat =
12502 SDL_GPUVertexElementFormat(12);
12503 pub const SDL_GPU_VERTEXELEMENTFORMAT_BYTE2: SDL_GPUVertexElementFormat =
12504 SDL_GPUVertexElementFormat(13);
12505 pub const SDL_GPU_VERTEXELEMENTFORMAT_BYTE4: SDL_GPUVertexElementFormat =
12506 SDL_GPUVertexElementFormat(14);
12507 pub const SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2: SDL_GPUVertexElementFormat =
12508 SDL_GPUVertexElementFormat(15);
12509 pub const SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4: SDL_GPUVertexElementFormat =
12510 SDL_GPUVertexElementFormat(16);
12511 pub const SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM: SDL_GPUVertexElementFormat =
12512 SDL_GPUVertexElementFormat(17);
12513 pub const SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM: SDL_GPUVertexElementFormat =
12514 SDL_GPUVertexElementFormat(18);
12515 pub const SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM: SDL_GPUVertexElementFormat =
12516 SDL_GPUVertexElementFormat(19);
12517 pub const SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM: SDL_GPUVertexElementFormat =
12518 SDL_GPUVertexElementFormat(20);
12519 pub const SDL_GPU_VERTEXELEMENTFORMAT_SHORT2: SDL_GPUVertexElementFormat =
12520 SDL_GPUVertexElementFormat(21);
12521 pub const SDL_GPU_VERTEXELEMENTFORMAT_SHORT4: SDL_GPUVertexElementFormat =
12522 SDL_GPUVertexElementFormat(22);
12523 pub const SDL_GPU_VERTEXELEMENTFORMAT_USHORT2: SDL_GPUVertexElementFormat =
12524 SDL_GPUVertexElementFormat(23);
12525 pub const SDL_GPU_VERTEXELEMENTFORMAT_USHORT4: SDL_GPUVertexElementFormat =
12526 SDL_GPUVertexElementFormat(24);
12527 pub const SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM: SDL_GPUVertexElementFormat =
12528 SDL_GPUVertexElementFormat(25);
12529 pub const SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM: SDL_GPUVertexElementFormat =
12530 SDL_GPUVertexElementFormat(26);
12531 pub const SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM: SDL_GPUVertexElementFormat =
12532 SDL_GPUVertexElementFormat(27);
12533 pub const SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM: SDL_GPUVertexElementFormat =
12534 SDL_GPUVertexElementFormat(28);
12535 pub const SDL_GPU_VERTEXELEMENTFORMAT_HALF2: SDL_GPUVertexElementFormat =
12536 SDL_GPUVertexElementFormat(29);
12537 pub const SDL_GPU_VERTEXELEMENTFORMAT_HALF4: SDL_GPUVertexElementFormat =
12538 SDL_GPUVertexElementFormat(30);
12539}
12540#[repr(transparent)]
12541#[doc = " Specifies the format of a vertex attribute.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12542#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12543pub struct SDL_GPUVertexElementFormat(pub core::ffi::c_uint);
12544impl SDL_GPUVertexInputRate {
12545 #[doc = "< Attribute addressing is a function of the vertex index.\n"]
12546 pub const SDL_GPU_VERTEXINPUTRATE_VERTEX: SDL_GPUVertexInputRate = SDL_GPUVertexInputRate(0);
12547 #[doc = "< Attribute addressing is a function of the instance index.\n"]
12548 pub const SDL_GPU_VERTEXINPUTRATE_INSTANCE: SDL_GPUVertexInputRate = SDL_GPUVertexInputRate(1);
12549}
12550#[repr(transparent)]
12551#[doc = " Specifies the rate at which vertex attributes are pulled from buffers.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12552#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12553pub struct SDL_GPUVertexInputRate(pub core::ffi::c_uint);
12554impl SDL_GPUFillMode {
12555 #[doc = "< Polygons will be rendered via rasterization.\n"]
12556 pub const SDL_GPU_FILLMODE_FILL: SDL_GPUFillMode = SDL_GPUFillMode(0);
12557 #[doc = "< Polygon edges will be drawn as line segments.\n"]
12558 pub const SDL_GPU_FILLMODE_LINE: SDL_GPUFillMode = SDL_GPUFillMode(1);
12559}
12560#[repr(transparent)]
12561#[doc = " Specifies the fill mode of the graphics pipeline.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12562#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12563pub struct SDL_GPUFillMode(pub core::ffi::c_uint);
12564impl SDL_GPUCullMode {
12565 #[doc = "< No triangles are culled.\n"]
12566 pub const SDL_GPU_CULLMODE_NONE: SDL_GPUCullMode = SDL_GPUCullMode(0);
12567 #[doc = "< Front-facing triangles are culled.\n"]
12568 pub const SDL_GPU_CULLMODE_FRONT: SDL_GPUCullMode = SDL_GPUCullMode(1);
12569 #[doc = "< Back-facing triangles are culled.\n"]
12570 pub const SDL_GPU_CULLMODE_BACK: SDL_GPUCullMode = SDL_GPUCullMode(2);
12571}
12572#[repr(transparent)]
12573#[doc = " Specifies the facing direction in which triangle faces will be culled.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12574#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12575pub struct SDL_GPUCullMode(pub core::ffi::c_uint);
12576impl SDL_GPUFrontFace {
12577 #[doc = "< A triangle with counter-clockwise vertex winding will be considered front-facing.\n"]
12578 pub const SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE: SDL_GPUFrontFace = SDL_GPUFrontFace(0);
12579 #[doc = "< A triangle with clockwise vertex winding will be considered front-facing.\n"]
12580 pub const SDL_GPU_FRONTFACE_CLOCKWISE: SDL_GPUFrontFace = SDL_GPUFrontFace(1);
12581}
12582#[repr(transparent)]
12583#[doc = " Specifies the vertex winding that will cause a triangle to be determined to\n be front-facing.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12584#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12585pub struct SDL_GPUFrontFace(pub core::ffi::c_uint);
12586impl SDL_GPUCompareOp {
12587 pub const SDL_GPU_COMPAREOP_INVALID: SDL_GPUCompareOp = SDL_GPUCompareOp(0);
12588 #[doc = "< The comparison always evaluates false.\n"]
12589 pub const SDL_GPU_COMPAREOP_NEVER: SDL_GPUCompareOp = SDL_GPUCompareOp(1);
12590 #[doc = "< The comparison evaluates reference < test.\n"]
12591 pub const SDL_GPU_COMPAREOP_LESS: SDL_GPUCompareOp = SDL_GPUCompareOp(2);
12592 #[doc = "< The comparison evaluates reference == test.\n"]
12593 pub const SDL_GPU_COMPAREOP_EQUAL: SDL_GPUCompareOp = SDL_GPUCompareOp(3);
12594 #[doc = "< The comparison evaluates reference <= test.\n"]
12595 pub const SDL_GPU_COMPAREOP_LESS_OR_EQUAL: SDL_GPUCompareOp = SDL_GPUCompareOp(4);
12596 #[doc = "< The comparison evaluates reference > test.\n"]
12597 pub const SDL_GPU_COMPAREOP_GREATER: SDL_GPUCompareOp = SDL_GPUCompareOp(5);
12598 #[doc = "< The comparison evaluates reference != test.\n"]
12599 pub const SDL_GPU_COMPAREOP_NOT_EQUAL: SDL_GPUCompareOp = SDL_GPUCompareOp(6);
12600 #[doc = "< The comparison evaluates reference >= test.\n"]
12601 pub const SDL_GPU_COMPAREOP_GREATER_OR_EQUAL: SDL_GPUCompareOp = SDL_GPUCompareOp(7);
12602 #[doc = "< The comparison always evaluates true.\n"]
12603 pub const SDL_GPU_COMPAREOP_ALWAYS: SDL_GPUCompareOp = SDL_GPUCompareOp(8);
12604}
12605#[repr(transparent)]
12606#[doc = " Specifies a comparison operator for depth, stencil and sampler operations.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12607#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12608pub struct SDL_GPUCompareOp(pub core::ffi::c_uint);
12609impl SDL_GPUStencilOp {
12610 pub const SDL_GPU_STENCILOP_INVALID: SDL_GPUStencilOp = SDL_GPUStencilOp(0);
12611 #[doc = "< Keeps the current value.\n"]
12612 pub const SDL_GPU_STENCILOP_KEEP: SDL_GPUStencilOp = SDL_GPUStencilOp(1);
12613 #[doc = "< Sets the value to 0.\n"]
12614 pub const SDL_GPU_STENCILOP_ZERO: SDL_GPUStencilOp = SDL_GPUStencilOp(2);
12615 #[doc = "< Sets the value to reference.\n"]
12616 pub const SDL_GPU_STENCILOP_REPLACE: SDL_GPUStencilOp = SDL_GPUStencilOp(3);
12617 #[doc = "< Increments the current value and clamps to the maximum value.\n"]
12618 pub const SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP: SDL_GPUStencilOp = SDL_GPUStencilOp(4);
12619 #[doc = "< Decrements the current value and clamps to 0.\n"]
12620 pub const SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP: SDL_GPUStencilOp = SDL_GPUStencilOp(5);
12621 #[doc = "< Bitwise-inverts the current value.\n"]
12622 pub const SDL_GPU_STENCILOP_INVERT: SDL_GPUStencilOp = SDL_GPUStencilOp(6);
12623 #[doc = "< Increments the current value and wraps back to 0.\n"]
12624 pub const SDL_GPU_STENCILOP_INCREMENT_AND_WRAP: SDL_GPUStencilOp = SDL_GPUStencilOp(7);
12625 #[doc = "< Decrements the current value and wraps to the maximum value.\n"]
12626 pub const SDL_GPU_STENCILOP_DECREMENT_AND_WRAP: SDL_GPUStencilOp = SDL_GPUStencilOp(8);
12627}
12628#[repr(transparent)]
12629#[doc = " Specifies what happens to a stored stencil value if stencil tests fail or\n pass.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12630#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12631pub struct SDL_GPUStencilOp(pub core::ffi::c_uint);
12632impl SDL_GPUBlendOp {
12633 pub const SDL_GPU_BLENDOP_INVALID: SDL_GPUBlendOp = SDL_GPUBlendOp(0);
12634 #[doc = "< (source * source_factor) + (destination * destination_factor)\n"]
12635 pub const SDL_GPU_BLENDOP_ADD: SDL_GPUBlendOp = SDL_GPUBlendOp(1);
12636 #[doc = "< (source * source_factor) - (destination * destination_factor)\n"]
12637 pub const SDL_GPU_BLENDOP_SUBTRACT: SDL_GPUBlendOp = SDL_GPUBlendOp(2);
12638 #[doc = "< (destination * destination_factor) - (source * source_factor)\n"]
12639 pub const SDL_GPU_BLENDOP_REVERSE_SUBTRACT: SDL_GPUBlendOp = SDL_GPUBlendOp(3);
12640 #[doc = "< min(source, destination)\n"]
12641 pub const SDL_GPU_BLENDOP_MIN: SDL_GPUBlendOp = SDL_GPUBlendOp(4);
12642 #[doc = "< max(source, destination)\n"]
12643 pub const SDL_GPU_BLENDOP_MAX: SDL_GPUBlendOp = SDL_GPUBlendOp(5);
12644}
12645#[repr(transparent)]
12646#[doc = " Specifies the operator to be used when pixels in a render target are\n blended with existing pixels in the texture.\n\n The source color is the value written by the fragment shader. The\n destination color is the value currently existing in the texture.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12647#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12648pub struct SDL_GPUBlendOp(pub core::ffi::c_uint);
12649impl SDL_GPUBlendFactor {
12650 pub const SDL_GPU_BLENDFACTOR_INVALID: SDL_GPUBlendFactor = SDL_GPUBlendFactor(0);
12651 #[doc = "< 0\n"]
12652 pub const SDL_GPU_BLENDFACTOR_ZERO: SDL_GPUBlendFactor = SDL_GPUBlendFactor(1);
12653 #[doc = "< 1\n"]
12654 pub const SDL_GPU_BLENDFACTOR_ONE: SDL_GPUBlendFactor = SDL_GPUBlendFactor(2);
12655 #[doc = "< source color\n"]
12656 pub const SDL_GPU_BLENDFACTOR_SRC_COLOR: SDL_GPUBlendFactor = SDL_GPUBlendFactor(3);
12657 #[doc = "< 1 - source color\n"]
12658 pub const SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR: SDL_GPUBlendFactor = SDL_GPUBlendFactor(4);
12659 #[doc = "< destination color\n"]
12660 pub const SDL_GPU_BLENDFACTOR_DST_COLOR: SDL_GPUBlendFactor = SDL_GPUBlendFactor(5);
12661 #[doc = "< 1 - destination color\n"]
12662 pub const SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR: SDL_GPUBlendFactor = SDL_GPUBlendFactor(6);
12663 #[doc = "< source alpha\n"]
12664 pub const SDL_GPU_BLENDFACTOR_SRC_ALPHA: SDL_GPUBlendFactor = SDL_GPUBlendFactor(7);
12665 #[doc = "< 1 - source alpha\n"]
12666 pub const SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA: SDL_GPUBlendFactor = SDL_GPUBlendFactor(8);
12667 #[doc = "< destination alpha\n"]
12668 pub const SDL_GPU_BLENDFACTOR_DST_ALPHA: SDL_GPUBlendFactor = SDL_GPUBlendFactor(9);
12669 #[doc = "< 1 - destination alpha\n"]
12670 pub const SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA: SDL_GPUBlendFactor = SDL_GPUBlendFactor(10);
12671 #[doc = "< blend constant\n"]
12672 pub const SDL_GPU_BLENDFACTOR_CONSTANT_COLOR: SDL_GPUBlendFactor = SDL_GPUBlendFactor(11);
12673 #[doc = "< 1 - blend constant\n"]
12674 pub const SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR: SDL_GPUBlendFactor =
12675 SDL_GPUBlendFactor(12);
12676 #[doc = "< min(source alpha, 1 - destination alpha)\n"]
12677 pub const SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE: SDL_GPUBlendFactor = SDL_GPUBlendFactor(13);
12678}
12679#[repr(transparent)]
12680#[doc = " Specifies a blending factor to be used when pixels in a render target are\n blended with existing pixels in the texture.\n\n The source color is the value written by the fragment shader. The\n destination color is the value currently existing in the texture.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12681#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12682pub struct SDL_GPUBlendFactor(pub core::ffi::c_uint);
12683#[doc = " Specifies which color components are written in a graphics pipeline.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n"]
12684pub type SDL_GPUColorComponentFlags = Uint8;
12685impl SDL_GPUFilter {
12686 #[doc = "< Point filtering.\n"]
12687 pub const SDL_GPU_FILTER_NEAREST: SDL_GPUFilter = SDL_GPUFilter(0);
12688 #[doc = "< Linear filtering.\n"]
12689 pub const SDL_GPU_FILTER_LINEAR: SDL_GPUFilter = SDL_GPUFilter(1);
12690}
12691#[repr(transparent)]
12692#[doc = " Specifies a filter operation used by a sampler.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUSampler\n"]
12693#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12694pub struct SDL_GPUFilter(pub core::ffi::c_uint);
12695impl SDL_GPUSamplerMipmapMode {
12696 #[doc = "< Point filtering.\n"]
12697 pub const SDL_GPU_SAMPLERMIPMAPMODE_NEAREST: SDL_GPUSamplerMipmapMode =
12698 SDL_GPUSamplerMipmapMode(0);
12699 #[doc = "< Linear filtering.\n"]
12700 pub const SDL_GPU_SAMPLERMIPMAPMODE_LINEAR: SDL_GPUSamplerMipmapMode =
12701 SDL_GPUSamplerMipmapMode(1);
12702}
12703#[repr(transparent)]
12704#[doc = " Specifies a mipmap mode used by a sampler.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUSampler\n"]
12705#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12706pub struct SDL_GPUSamplerMipmapMode(pub core::ffi::c_uint);
12707impl SDL_GPUSamplerAddressMode {
12708 #[doc = "< Specifies that the coordinates will wrap around.\n"]
12709 pub const SDL_GPU_SAMPLERADDRESSMODE_REPEAT: SDL_GPUSamplerAddressMode =
12710 SDL_GPUSamplerAddressMode(0);
12711 #[doc = "< Specifies that the coordinates will wrap around mirrored.\n"]
12712 pub const SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT: SDL_GPUSamplerAddressMode =
12713 SDL_GPUSamplerAddressMode(1);
12714 #[doc = "< Specifies that the coordinates will clamp to the 0-1 range.\n"]
12715 pub const SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE: SDL_GPUSamplerAddressMode =
12716 SDL_GPUSamplerAddressMode(2);
12717}
12718#[repr(transparent)]
12719#[doc = " Specifies behavior of texture sampling when the coordinates exceed the 0-1\n range.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUSampler\n"]
12720#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12721pub struct SDL_GPUSamplerAddressMode(pub core::ffi::c_uint);
12722impl SDL_GPUPresentMode {
12723 pub const SDL_GPU_PRESENTMODE_VSYNC: SDL_GPUPresentMode = SDL_GPUPresentMode(0);
12724 pub const SDL_GPU_PRESENTMODE_IMMEDIATE: SDL_GPUPresentMode = SDL_GPUPresentMode(1);
12725 pub const SDL_GPU_PRESENTMODE_MAILBOX: SDL_GPUPresentMode = SDL_GPUPresentMode(2);
12726}
12727#[repr(transparent)]
12728#[doc = " Specifies the timing that will be used to present swapchain textures to the\n OS.\n\n VSYNC mode will always be supported. IMMEDIATE and MAILBOX modes may not be\n supported on certain systems.\n\n It is recommended to query SDL_WindowSupportsGPUPresentMode after claiming\n the window if you wish to change the present mode to IMMEDIATE or MAILBOX.\n\n - VSYNC: Waits for vblank before presenting. No tearing is possible. If\n there is a pending image to present, the new image is enqueued for\n presentation. Disallows tearing at the cost of visual latency.\n - IMMEDIATE: Immediately presents. Lowest latency option, but tearing may\n occur.\n - MAILBOX: Waits for vblank before presenting. No tearing is possible. If\n there is a pending image to present, the pending image is replaced by the\n new image. Similar to VSYNC, but with reduced visual latency.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_SetGPUSwapchainParameters\n **See Also:** SDL_WindowSupportsGPUPresentMode\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n"]
12729#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12730pub struct SDL_GPUPresentMode(pub core::ffi::c_uint);
12731impl SDL_GPUSwapchainComposition {
12732 pub const SDL_GPU_SWAPCHAINCOMPOSITION_SDR: SDL_GPUSwapchainComposition =
12733 SDL_GPUSwapchainComposition(0);
12734 pub const SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR: SDL_GPUSwapchainComposition =
12735 SDL_GPUSwapchainComposition(1);
12736 pub const SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR: SDL_GPUSwapchainComposition =
12737 SDL_GPUSwapchainComposition(2);
12738 pub const SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084: SDL_GPUSwapchainComposition =
12739 SDL_GPUSwapchainComposition(3);
12740}
12741#[repr(transparent)]
12742#[doc = " Specifies the texture format and colorspace of the swapchain textures.\n\n SDR will always be supported. Other compositions may not be supported on\n certain systems.\n\n It is recommended to query SDL_WindowSupportsGPUSwapchainComposition after\n claiming the window if you wish to change the swapchain composition from\n SDR.\n\n - SDR: B8G8R8A8 or R8G8B8A8 swapchain. Pixel values are in sRGB encoding.\n - SDR_LINEAR: B8G8R8A8_SRGB or R8G8B8A8_SRGB swapchain. Pixel values are\n stored in memory in sRGB encoding but accessed in shaders in \"linear\n sRGB\" encoding which is sRGB but with a linear transfer function.\n - HDR_EXTENDED_LINEAR: R16G16B16A16_FLOAT swapchain. Pixel values are in\n extended linear sRGB encoding and permits values outside of the [0, 1]\n range.\n - HDR10_ST2084: A2R10G10B10 or A2B10G10R10 swapchain. Pixel values are in\n BT.2020 ST2084 (PQ) encoding.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_SetGPUSwapchainParameters\n **See Also:** SDL_WindowSupportsGPUSwapchainComposition\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n"]
12743#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12744pub struct SDL_GPUSwapchainComposition(pub core::ffi::c_uint);
12745#[doc = " A structure specifying a viewport.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_SetGPUViewport\n"]
12746#[repr(C)]
12747#[derive(Debug, Default, Copy, Clone)]
12748pub struct SDL_GPUViewport {
12749 #[doc = "< The left offset of the viewport.\n"]
12750 pub x: f32,
12751 #[doc = "< The top offset of the viewport.\n"]
12752 pub y: f32,
12753 #[doc = "< The width of the viewport.\n"]
12754 pub w: f32,
12755 #[doc = "< The height of the viewport.\n"]
12756 pub h: f32,
12757 #[doc = "< The minimum depth of the viewport.\n"]
12758 pub min_depth: f32,
12759 #[doc = "< The maximum depth of the viewport.\n"]
12760 pub max_depth: f32,
12761}
12762#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12763const _: () = {
12764 ["Size of SDL_GPUViewport"][::core::mem::size_of::<SDL_GPUViewport>() - 24usize];
12765 ["Alignment of SDL_GPUViewport"][::core::mem::align_of::<SDL_GPUViewport>() - 4usize];
12766 ["Offset of field: SDL_GPUViewport::x"][::core::mem::offset_of!(SDL_GPUViewport, x) - 0usize];
12767 ["Offset of field: SDL_GPUViewport::y"][::core::mem::offset_of!(SDL_GPUViewport, y) - 4usize];
12768 ["Offset of field: SDL_GPUViewport::w"][::core::mem::offset_of!(SDL_GPUViewport, w) - 8usize];
12769 ["Offset of field: SDL_GPUViewport::h"][::core::mem::offset_of!(SDL_GPUViewport, h) - 12usize];
12770 ["Offset of field: SDL_GPUViewport::min_depth"]
12771 [::core::mem::offset_of!(SDL_GPUViewport, min_depth) - 16usize];
12772 ["Offset of field: SDL_GPUViewport::max_depth"]
12773 [::core::mem::offset_of!(SDL_GPUViewport, max_depth) - 20usize];
12774};
12775#[doc = " A structure specifying parameters related to transferring data to or from a\n texture.\n\n If either of `pixels_per_row` or `rows_per_layer` is zero, then width and\n height of passed SDL_GPUTextureRegion to SDL_UploadToGPUTexture or\n SDL_DownloadFromGPUTexture are used as default values respectively and data\n is considered to be tightly packed.\n\n **WARNING**: On some older/integrated hardware, Direct3D 12 requires\n texture data row pitch to be 256 byte aligned, and offsets to be aligned to\n 512 bytes. If they are not, SDL will make a temporary copy of the data that\n is properly aligned, but this adds overhead to the transfer process. Apps\n can avoid this by aligning their data appropriately, or using a different\n GPU backend than Direct3D 12.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUTexture\n **See Also:** SDL_DownloadFromGPUTexture\n"]
12776#[repr(C)]
12777#[derive(Debug, Copy, Clone, Hash)]
12778pub struct SDL_GPUTextureTransferInfo {
12779 #[doc = "< The transfer buffer used in the transfer operation.\n"]
12780 pub transfer_buffer: *mut SDL_GPUTransferBuffer,
12781 #[doc = "< The starting byte of the image data in the transfer buffer.\n"]
12782 pub offset: Uint32,
12783 #[doc = "< The number of pixels from one row to the next.\n"]
12784 pub pixels_per_row: Uint32,
12785 #[doc = "< The number of rows from one layer/depth-slice to the next.\n"]
12786 pub rows_per_layer: Uint32,
12787}
12788#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12789const _: () = {
12790 ["Size of SDL_GPUTextureTransferInfo"]
12791 [::core::mem::size_of::<SDL_GPUTextureTransferInfo>() - 24usize];
12792 ["Alignment of SDL_GPUTextureTransferInfo"]
12793 [::core::mem::align_of::<SDL_GPUTextureTransferInfo>() - 8usize];
12794 ["Offset of field: SDL_GPUTextureTransferInfo::transfer_buffer"]
12795 [::core::mem::offset_of!(SDL_GPUTextureTransferInfo, transfer_buffer) - 0usize];
12796 ["Offset of field: SDL_GPUTextureTransferInfo::offset"]
12797 [::core::mem::offset_of!(SDL_GPUTextureTransferInfo, offset) - 8usize];
12798 ["Offset of field: SDL_GPUTextureTransferInfo::pixels_per_row"]
12799 [::core::mem::offset_of!(SDL_GPUTextureTransferInfo, pixels_per_row) - 12usize];
12800 ["Offset of field: SDL_GPUTextureTransferInfo::rows_per_layer"]
12801 [::core::mem::offset_of!(SDL_GPUTextureTransferInfo, rows_per_layer) - 16usize];
12802};
12803impl Default for SDL_GPUTextureTransferInfo {
12804 fn default() -> Self {
12805 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
12806 unsafe {
12807 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
12808 s.assume_init()
12809 }
12810 }
12811}
12812#[doc = " A structure specifying a location in a transfer buffer.\n\n Used when transferring buffer data to or from a transfer buffer.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUBuffer\n **See Also:** SDL_DownloadFromGPUBuffer\n"]
12813#[repr(C)]
12814#[derive(Debug, Copy, Clone, Hash)]
12815pub struct SDL_GPUTransferBufferLocation {
12816 #[doc = "< The transfer buffer used in the transfer operation.\n"]
12817 pub transfer_buffer: *mut SDL_GPUTransferBuffer,
12818 #[doc = "< The starting byte of the buffer data in the transfer buffer.\n"]
12819 pub offset: Uint32,
12820}
12821#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12822const _: () = {
12823 ["Size of SDL_GPUTransferBufferLocation"]
12824 [::core::mem::size_of::<SDL_GPUTransferBufferLocation>() - 16usize];
12825 ["Alignment of SDL_GPUTransferBufferLocation"]
12826 [::core::mem::align_of::<SDL_GPUTransferBufferLocation>() - 8usize];
12827 ["Offset of field: SDL_GPUTransferBufferLocation::transfer_buffer"]
12828 [::core::mem::offset_of!(SDL_GPUTransferBufferLocation, transfer_buffer) - 0usize];
12829 ["Offset of field: SDL_GPUTransferBufferLocation::offset"]
12830 [::core::mem::offset_of!(SDL_GPUTransferBufferLocation, offset) - 8usize];
12831};
12832impl Default for SDL_GPUTransferBufferLocation {
12833 fn default() -> Self {
12834 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
12835 unsafe {
12836 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
12837 s.assume_init()
12838 }
12839 }
12840}
12841#[doc = " A structure specifying a location in a texture.\n\n Used when copying data from one texture to another.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CopyGPUTextureToTexture\n"]
12842#[repr(C)]
12843#[derive(Debug, Copy, Clone, Hash)]
12844pub struct SDL_GPUTextureLocation {
12845 #[doc = "< The texture used in the copy operation.\n"]
12846 pub texture: *mut SDL_GPUTexture,
12847 #[doc = "< The mip level index of the location.\n"]
12848 pub mip_level: Uint32,
12849 #[doc = "< The layer index of the location.\n"]
12850 pub layer: Uint32,
12851 #[doc = "< The left offset of the location.\n"]
12852 pub x: Uint32,
12853 #[doc = "< The top offset of the location.\n"]
12854 pub y: Uint32,
12855 #[doc = "< The front offset of the location.\n"]
12856 pub z: Uint32,
12857}
12858#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12859const _: () = {
12860 ["Size of SDL_GPUTextureLocation"][::core::mem::size_of::<SDL_GPUTextureLocation>() - 32usize];
12861 ["Alignment of SDL_GPUTextureLocation"]
12862 [::core::mem::align_of::<SDL_GPUTextureLocation>() - 8usize];
12863 ["Offset of field: SDL_GPUTextureLocation::texture"]
12864 [::core::mem::offset_of!(SDL_GPUTextureLocation, texture) - 0usize];
12865 ["Offset of field: SDL_GPUTextureLocation::mip_level"]
12866 [::core::mem::offset_of!(SDL_GPUTextureLocation, mip_level) - 8usize];
12867 ["Offset of field: SDL_GPUTextureLocation::layer"]
12868 [::core::mem::offset_of!(SDL_GPUTextureLocation, layer) - 12usize];
12869 ["Offset of field: SDL_GPUTextureLocation::x"]
12870 [::core::mem::offset_of!(SDL_GPUTextureLocation, x) - 16usize];
12871 ["Offset of field: SDL_GPUTextureLocation::y"]
12872 [::core::mem::offset_of!(SDL_GPUTextureLocation, y) - 20usize];
12873 ["Offset of field: SDL_GPUTextureLocation::z"]
12874 [::core::mem::offset_of!(SDL_GPUTextureLocation, z) - 24usize];
12875};
12876impl Default for SDL_GPUTextureLocation {
12877 fn default() -> Self {
12878 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
12879 unsafe {
12880 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
12881 s.assume_init()
12882 }
12883 }
12884}
12885#[doc = " A structure specifying a region of a texture.\n\n Used when transferring data to or from a texture.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUTexture\n **See Also:** SDL_DownloadFromGPUTexture\n **See Also:** SDL_CreateGPUTexture\n"]
12886#[repr(C)]
12887#[derive(Debug, Copy, Clone, Hash)]
12888pub struct SDL_GPUTextureRegion {
12889 #[doc = "< The texture used in the copy operation.\n"]
12890 pub texture: *mut SDL_GPUTexture,
12891 #[doc = "< The mip level index to transfer.\n"]
12892 pub mip_level: Uint32,
12893 #[doc = "< The layer index to transfer.\n"]
12894 pub layer: Uint32,
12895 #[doc = "< The left offset of the region.\n"]
12896 pub x: Uint32,
12897 #[doc = "< The top offset of the region.\n"]
12898 pub y: Uint32,
12899 #[doc = "< The front offset of the region.\n"]
12900 pub z: Uint32,
12901 #[doc = "< The width of the region.\n"]
12902 pub w: Uint32,
12903 #[doc = "< The height of the region.\n"]
12904 pub h: Uint32,
12905 #[doc = "< The depth of the region.\n"]
12906 pub d: Uint32,
12907}
12908#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12909const _: () = {
12910 ["Size of SDL_GPUTextureRegion"][::core::mem::size_of::<SDL_GPUTextureRegion>() - 40usize];
12911 ["Alignment of SDL_GPUTextureRegion"][::core::mem::align_of::<SDL_GPUTextureRegion>() - 8usize];
12912 ["Offset of field: SDL_GPUTextureRegion::texture"]
12913 [::core::mem::offset_of!(SDL_GPUTextureRegion, texture) - 0usize];
12914 ["Offset of field: SDL_GPUTextureRegion::mip_level"]
12915 [::core::mem::offset_of!(SDL_GPUTextureRegion, mip_level) - 8usize];
12916 ["Offset of field: SDL_GPUTextureRegion::layer"]
12917 [::core::mem::offset_of!(SDL_GPUTextureRegion, layer) - 12usize];
12918 ["Offset of field: SDL_GPUTextureRegion::x"]
12919 [::core::mem::offset_of!(SDL_GPUTextureRegion, x) - 16usize];
12920 ["Offset of field: SDL_GPUTextureRegion::y"]
12921 [::core::mem::offset_of!(SDL_GPUTextureRegion, y) - 20usize];
12922 ["Offset of field: SDL_GPUTextureRegion::z"]
12923 [::core::mem::offset_of!(SDL_GPUTextureRegion, z) - 24usize];
12924 ["Offset of field: SDL_GPUTextureRegion::w"]
12925 [::core::mem::offset_of!(SDL_GPUTextureRegion, w) - 28usize];
12926 ["Offset of field: SDL_GPUTextureRegion::h"]
12927 [::core::mem::offset_of!(SDL_GPUTextureRegion, h) - 32usize];
12928 ["Offset of field: SDL_GPUTextureRegion::d"]
12929 [::core::mem::offset_of!(SDL_GPUTextureRegion, d) - 36usize];
12930};
12931impl Default for SDL_GPUTextureRegion {
12932 fn default() -> Self {
12933 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
12934 unsafe {
12935 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
12936 s.assume_init()
12937 }
12938 }
12939}
12940#[doc = " A structure specifying a region of a texture used in the blit operation.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitGPUTexture\n"]
12941#[repr(C)]
12942#[derive(Debug, Copy, Clone, Hash)]
12943pub struct SDL_GPUBlitRegion {
12944 #[doc = "< The texture.\n"]
12945 pub texture: *mut SDL_GPUTexture,
12946 #[doc = "< The mip level index of the region.\n"]
12947 pub mip_level: Uint32,
12948 #[doc = "< The layer index or depth plane of the region. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures.\n"]
12949 pub layer_or_depth_plane: Uint32,
12950 #[doc = "< The left offset of the region.\n"]
12951 pub x: Uint32,
12952 #[doc = "< The top offset of the region.\n"]
12953 pub y: Uint32,
12954 #[doc = "< The width of the region.\n"]
12955 pub w: Uint32,
12956 #[doc = "< The height of the region.\n"]
12957 pub h: Uint32,
12958}
12959#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12960const _: () = {
12961 ["Size of SDL_GPUBlitRegion"][::core::mem::size_of::<SDL_GPUBlitRegion>() - 32usize];
12962 ["Alignment of SDL_GPUBlitRegion"][::core::mem::align_of::<SDL_GPUBlitRegion>() - 8usize];
12963 ["Offset of field: SDL_GPUBlitRegion::texture"]
12964 [::core::mem::offset_of!(SDL_GPUBlitRegion, texture) - 0usize];
12965 ["Offset of field: SDL_GPUBlitRegion::mip_level"]
12966 [::core::mem::offset_of!(SDL_GPUBlitRegion, mip_level) - 8usize];
12967 ["Offset of field: SDL_GPUBlitRegion::layer_or_depth_plane"]
12968 [::core::mem::offset_of!(SDL_GPUBlitRegion, layer_or_depth_plane) - 12usize];
12969 ["Offset of field: SDL_GPUBlitRegion::x"]
12970 [::core::mem::offset_of!(SDL_GPUBlitRegion, x) - 16usize];
12971 ["Offset of field: SDL_GPUBlitRegion::y"]
12972 [::core::mem::offset_of!(SDL_GPUBlitRegion, y) - 20usize];
12973 ["Offset of field: SDL_GPUBlitRegion::w"]
12974 [::core::mem::offset_of!(SDL_GPUBlitRegion, w) - 24usize];
12975 ["Offset of field: SDL_GPUBlitRegion::h"]
12976 [::core::mem::offset_of!(SDL_GPUBlitRegion, h) - 28usize];
12977};
12978impl Default for SDL_GPUBlitRegion {
12979 fn default() -> Self {
12980 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
12981 unsafe {
12982 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
12983 s.assume_init()
12984 }
12985 }
12986}
12987#[doc = " A structure specifying a location in a buffer.\n\n Used when copying data between buffers.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CopyGPUBufferToBuffer\n"]
12988#[repr(C)]
12989#[derive(Debug, Copy, Clone, Hash)]
12990pub struct SDL_GPUBufferLocation {
12991 #[doc = "< The buffer.\n"]
12992 pub buffer: *mut SDL_GPUBuffer,
12993 #[doc = "< The starting byte within the buffer.\n"]
12994 pub offset: Uint32,
12995}
12996#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12997const _: () = {
12998 ["Size of SDL_GPUBufferLocation"][::core::mem::size_of::<SDL_GPUBufferLocation>() - 16usize];
12999 ["Alignment of SDL_GPUBufferLocation"]
13000 [::core::mem::align_of::<SDL_GPUBufferLocation>() - 8usize];
13001 ["Offset of field: SDL_GPUBufferLocation::buffer"]
13002 [::core::mem::offset_of!(SDL_GPUBufferLocation, buffer) - 0usize];
13003 ["Offset of field: SDL_GPUBufferLocation::offset"]
13004 [::core::mem::offset_of!(SDL_GPUBufferLocation, offset) - 8usize];
13005};
13006impl Default for SDL_GPUBufferLocation {
13007 fn default() -> Self {
13008 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13009 unsafe {
13010 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13011 s.assume_init()
13012 }
13013 }
13014}
13015#[doc = " A structure specifying a region of a buffer.\n\n Used when transferring data to or from buffers.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUBuffer\n **See Also:** SDL_DownloadFromGPUBuffer\n"]
13016#[repr(C)]
13017#[derive(Debug, Copy, Clone, Hash)]
13018pub struct SDL_GPUBufferRegion {
13019 #[doc = "< The buffer.\n"]
13020 pub buffer: *mut SDL_GPUBuffer,
13021 #[doc = "< The starting byte within the buffer.\n"]
13022 pub offset: Uint32,
13023 #[doc = "< The size in bytes of the region.\n"]
13024 pub size: Uint32,
13025}
13026#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13027const _: () = {
13028 ["Size of SDL_GPUBufferRegion"][::core::mem::size_of::<SDL_GPUBufferRegion>() - 16usize];
13029 ["Alignment of SDL_GPUBufferRegion"][::core::mem::align_of::<SDL_GPUBufferRegion>() - 8usize];
13030 ["Offset of field: SDL_GPUBufferRegion::buffer"]
13031 [::core::mem::offset_of!(SDL_GPUBufferRegion, buffer) - 0usize];
13032 ["Offset of field: SDL_GPUBufferRegion::offset"]
13033 [::core::mem::offset_of!(SDL_GPUBufferRegion, offset) - 8usize];
13034 ["Offset of field: SDL_GPUBufferRegion::size"]
13035 [::core::mem::offset_of!(SDL_GPUBufferRegion, size) - 12usize];
13036};
13037impl Default for SDL_GPUBufferRegion {
13038 fn default() -> Self {
13039 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13040 unsafe {
13041 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13042 s.assume_init()
13043 }
13044 }
13045}
13046#[doc = " A structure specifying the parameters of an indirect draw command.\n\n Note that the `first_vertex` and `first_instance` parameters are NOT\n compatible with built-in vertex/instance ID variables in shaders (for\n example, SV_VertexID); GPU APIs and shader languages do not define these\n built-in variables consistently, so if your shader depends on them, the\n only way to keep behavior consistent and portable is to always pass 0 for\n the correlating parameter in the draw calls.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_DrawGPUPrimitivesIndirect\n"]
13047#[repr(C)]
13048#[derive(Debug, Default, Copy, Clone, Hash)]
13049pub struct SDL_GPUIndirectDrawCommand {
13050 #[doc = "< The number of vertices to draw.\n"]
13051 pub num_vertices: Uint32,
13052 #[doc = "< The number of instances to draw.\n"]
13053 pub num_instances: Uint32,
13054 #[doc = "< The index of the first vertex to draw.\n"]
13055 pub first_vertex: Uint32,
13056 #[doc = "< The ID of the first instance to draw.\n"]
13057 pub first_instance: Uint32,
13058}
13059#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13060const _: () = {
13061 ["Size of SDL_GPUIndirectDrawCommand"]
13062 [::core::mem::size_of::<SDL_GPUIndirectDrawCommand>() - 16usize];
13063 ["Alignment of SDL_GPUIndirectDrawCommand"]
13064 [::core::mem::align_of::<SDL_GPUIndirectDrawCommand>() - 4usize];
13065 ["Offset of field: SDL_GPUIndirectDrawCommand::num_vertices"]
13066 [::core::mem::offset_of!(SDL_GPUIndirectDrawCommand, num_vertices) - 0usize];
13067 ["Offset of field: SDL_GPUIndirectDrawCommand::num_instances"]
13068 [::core::mem::offset_of!(SDL_GPUIndirectDrawCommand, num_instances) - 4usize];
13069 ["Offset of field: SDL_GPUIndirectDrawCommand::first_vertex"]
13070 [::core::mem::offset_of!(SDL_GPUIndirectDrawCommand, first_vertex) - 8usize];
13071 ["Offset of field: SDL_GPUIndirectDrawCommand::first_instance"]
13072 [::core::mem::offset_of!(SDL_GPUIndirectDrawCommand, first_instance) - 12usize];
13073};
13074#[doc = " A structure specifying the parameters of an indexed indirect draw command.\n\n Note that the `first_vertex` and `first_instance` parameters are NOT\n compatible with built-in vertex/instance ID variables in shaders (for\n example, SV_VertexID); GPU APIs and shader languages do not define these\n built-in variables consistently, so if your shader depends on them, the\n only way to keep behavior consistent and portable is to always pass 0 for\n the correlating parameter in the draw calls.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_DrawGPUIndexedPrimitivesIndirect\n"]
13075#[repr(C)]
13076#[derive(Debug, Default, Copy, Clone, Hash)]
13077pub struct SDL_GPUIndexedIndirectDrawCommand {
13078 #[doc = "< The number of indices to draw per instance.\n"]
13079 pub num_indices: Uint32,
13080 #[doc = "< The number of instances to draw.\n"]
13081 pub num_instances: Uint32,
13082 #[doc = "< The base index within the index buffer.\n"]
13083 pub first_index: Uint32,
13084 #[doc = "< The value added to the vertex index before indexing into the vertex buffer.\n"]
13085 pub vertex_offset: Sint32,
13086 #[doc = "< The ID of the first instance to draw.\n"]
13087 pub first_instance: Uint32,
13088}
13089#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13090const _: () = {
13091 ["Size of SDL_GPUIndexedIndirectDrawCommand"]
13092 [::core::mem::size_of::<SDL_GPUIndexedIndirectDrawCommand>() - 20usize];
13093 ["Alignment of SDL_GPUIndexedIndirectDrawCommand"]
13094 [::core::mem::align_of::<SDL_GPUIndexedIndirectDrawCommand>() - 4usize];
13095 ["Offset of field: SDL_GPUIndexedIndirectDrawCommand::num_indices"]
13096 [::core::mem::offset_of!(SDL_GPUIndexedIndirectDrawCommand, num_indices) - 0usize];
13097 ["Offset of field: SDL_GPUIndexedIndirectDrawCommand::num_instances"]
13098 [::core::mem::offset_of!(SDL_GPUIndexedIndirectDrawCommand, num_instances) - 4usize];
13099 ["Offset of field: SDL_GPUIndexedIndirectDrawCommand::first_index"]
13100 [::core::mem::offset_of!(SDL_GPUIndexedIndirectDrawCommand, first_index) - 8usize];
13101 ["Offset of field: SDL_GPUIndexedIndirectDrawCommand::vertex_offset"]
13102 [::core::mem::offset_of!(SDL_GPUIndexedIndirectDrawCommand, vertex_offset) - 12usize];
13103 ["Offset of field: SDL_GPUIndexedIndirectDrawCommand::first_instance"]
13104 [::core::mem::offset_of!(SDL_GPUIndexedIndirectDrawCommand, first_instance) - 16usize];
13105};
13106#[doc = " A structure specifying the parameters of an indexed dispatch command.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_DispatchGPUComputeIndirect\n"]
13107#[repr(C)]
13108#[derive(Debug, Default, Copy, Clone, Hash)]
13109pub struct SDL_GPUIndirectDispatchCommand {
13110 #[doc = "< The number of local workgroups to dispatch in the X dimension.\n"]
13111 pub groupcount_x: Uint32,
13112 #[doc = "< The number of local workgroups to dispatch in the Y dimension.\n"]
13113 pub groupcount_y: Uint32,
13114 #[doc = "< The number of local workgroups to dispatch in the Z dimension.\n"]
13115 pub groupcount_z: Uint32,
13116}
13117#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13118const _: () = {
13119 ["Size of SDL_GPUIndirectDispatchCommand"]
13120 [::core::mem::size_of::<SDL_GPUIndirectDispatchCommand>() - 12usize];
13121 ["Alignment of SDL_GPUIndirectDispatchCommand"]
13122 [::core::mem::align_of::<SDL_GPUIndirectDispatchCommand>() - 4usize];
13123 ["Offset of field: SDL_GPUIndirectDispatchCommand::groupcount_x"]
13124 [::core::mem::offset_of!(SDL_GPUIndirectDispatchCommand, groupcount_x) - 0usize];
13125 ["Offset of field: SDL_GPUIndirectDispatchCommand::groupcount_y"]
13126 [::core::mem::offset_of!(SDL_GPUIndirectDispatchCommand, groupcount_y) - 4usize];
13127 ["Offset of field: SDL_GPUIndirectDispatchCommand::groupcount_z"]
13128 [::core::mem::offset_of!(SDL_GPUIndirectDispatchCommand, groupcount_z) - 8usize];
13129};
13130#[doc = " A structure specifying the parameters of a sampler.\n\n Note that mip_lod_bias is a no-op for the Metal driver. For Metal, LOD bias\n must be applied via shader instead.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUSampler\n **See Also:** SDL_GPUFilter\n **See Also:** SDL_GPUSamplerMipmapMode\n **See Also:** SDL_GPUSamplerAddressMode\n **See Also:** SDL_GPUCompareOp\n"]
13131#[repr(C)]
13132#[derive(Debug, Copy, Clone)]
13133pub struct SDL_GPUSamplerCreateInfo {
13134 #[doc = "< The minification filter to apply to lookups.\n"]
13135 pub min_filter: SDL_GPUFilter,
13136 #[doc = "< The magnification filter to apply to lookups.\n"]
13137 pub mag_filter: SDL_GPUFilter,
13138 #[doc = "< The mipmap filter to apply to lookups.\n"]
13139 pub mipmap_mode: SDL_GPUSamplerMipmapMode,
13140 #[doc = "< The addressing mode for U coordinates outside [0, 1).\n"]
13141 pub address_mode_u: SDL_GPUSamplerAddressMode,
13142 #[doc = "< The addressing mode for V coordinates outside [0, 1).\n"]
13143 pub address_mode_v: SDL_GPUSamplerAddressMode,
13144 #[doc = "< The addressing mode for W coordinates outside [0, 1).\n"]
13145 pub address_mode_w: SDL_GPUSamplerAddressMode,
13146 #[doc = "< The bias to be added to mipmap LOD calculation.\n"]
13147 pub mip_lod_bias: f32,
13148 #[doc = "< The anisotropy value clamp used by the sampler. If enable_anisotropy is false, this is ignored.\n"]
13149 pub max_anisotropy: f32,
13150 #[doc = "< The comparison operator to apply to fetched data before filtering.\n"]
13151 pub compare_op: SDL_GPUCompareOp,
13152 #[doc = "< Clamps the minimum of the computed LOD value.\n"]
13153 pub min_lod: f32,
13154 #[doc = "< Clamps the maximum of the computed LOD value.\n"]
13155 pub max_lod: f32,
13156 #[doc = "< true to enable anisotropic filtering.\n"]
13157 pub enable_anisotropy: bool,
13158 #[doc = "< true to enable comparison against a reference value during lookups.\n"]
13159 pub enable_compare: bool,
13160 pub padding1: Uint8,
13161 pub padding2: Uint8,
13162 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
13163 pub props: SDL_PropertiesID,
13164}
13165#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13166const _: () = {
13167 ["Size of SDL_GPUSamplerCreateInfo"]
13168 [::core::mem::size_of::<SDL_GPUSamplerCreateInfo>() - 52usize];
13169 ["Alignment of SDL_GPUSamplerCreateInfo"]
13170 [::core::mem::align_of::<SDL_GPUSamplerCreateInfo>() - 4usize];
13171 ["Offset of field: SDL_GPUSamplerCreateInfo::min_filter"]
13172 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, min_filter) - 0usize];
13173 ["Offset of field: SDL_GPUSamplerCreateInfo::mag_filter"]
13174 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, mag_filter) - 4usize];
13175 ["Offset of field: SDL_GPUSamplerCreateInfo::mipmap_mode"]
13176 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, mipmap_mode) - 8usize];
13177 ["Offset of field: SDL_GPUSamplerCreateInfo::address_mode_u"]
13178 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, address_mode_u) - 12usize];
13179 ["Offset of field: SDL_GPUSamplerCreateInfo::address_mode_v"]
13180 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, address_mode_v) - 16usize];
13181 ["Offset of field: SDL_GPUSamplerCreateInfo::address_mode_w"]
13182 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, address_mode_w) - 20usize];
13183 ["Offset of field: SDL_GPUSamplerCreateInfo::mip_lod_bias"]
13184 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, mip_lod_bias) - 24usize];
13185 ["Offset of field: SDL_GPUSamplerCreateInfo::max_anisotropy"]
13186 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, max_anisotropy) - 28usize];
13187 ["Offset of field: SDL_GPUSamplerCreateInfo::compare_op"]
13188 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, compare_op) - 32usize];
13189 ["Offset of field: SDL_GPUSamplerCreateInfo::min_lod"]
13190 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, min_lod) - 36usize];
13191 ["Offset of field: SDL_GPUSamplerCreateInfo::max_lod"]
13192 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, max_lod) - 40usize];
13193 ["Offset of field: SDL_GPUSamplerCreateInfo::enable_anisotropy"]
13194 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, enable_anisotropy) - 44usize];
13195 ["Offset of field: SDL_GPUSamplerCreateInfo::enable_compare"]
13196 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, enable_compare) - 45usize];
13197 ["Offset of field: SDL_GPUSamplerCreateInfo::padding1"]
13198 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, padding1) - 46usize];
13199 ["Offset of field: SDL_GPUSamplerCreateInfo::padding2"]
13200 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, padding2) - 47usize];
13201 ["Offset of field: SDL_GPUSamplerCreateInfo::props"]
13202 [::core::mem::offset_of!(SDL_GPUSamplerCreateInfo, props) - 48usize];
13203};
13204impl Default for SDL_GPUSamplerCreateInfo {
13205 fn default() -> Self {
13206 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13207 unsafe {
13208 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13209 s.assume_init()
13210 }
13211 }
13212}
13213#[doc = " A structure specifying the parameters of vertex buffers used in a graphics\n pipeline.\n\n When you call SDL_BindGPUVertexBuffers, you specify the binding slots of\n the vertex buffers. For example if you called SDL_BindGPUVertexBuffers with\n a first_slot of 2 and num_bindings of 3, the binding slots 2, 3, 4 would be\n used by the vertex buffers you pass in.\n\n Vertex attributes are linked to buffers via the buffer_slot field of\n SDL_GPUVertexAttribute. For example, if an attribute has a buffer_slot of\n 0, then that attribute belongs to the vertex buffer bound at slot 0.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUVertexAttribute\n **See Also:** SDL_GPUVertexInputRate\n"]
13214#[repr(C)]
13215#[derive(Debug, Copy, Clone, Hash)]
13216pub struct SDL_GPUVertexBufferDescription {
13217 #[doc = "< The binding slot of the vertex buffer.\n"]
13218 pub slot: Uint32,
13219 #[doc = "< The size of a single element + the offset between elements.\n"]
13220 pub pitch: Uint32,
13221 #[doc = "< Whether attribute addressing is a function of the vertex index or instance index.\n"]
13222 pub input_rate: SDL_GPUVertexInputRate,
13223 #[doc = "< Reserved for future use. Must be set to 0.\n"]
13224 pub instance_step_rate: Uint32,
13225}
13226#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13227const _: () = {
13228 ["Size of SDL_GPUVertexBufferDescription"]
13229 [::core::mem::size_of::<SDL_GPUVertexBufferDescription>() - 16usize];
13230 ["Alignment of SDL_GPUVertexBufferDescription"]
13231 [::core::mem::align_of::<SDL_GPUVertexBufferDescription>() - 4usize];
13232 ["Offset of field: SDL_GPUVertexBufferDescription::slot"]
13233 [::core::mem::offset_of!(SDL_GPUVertexBufferDescription, slot) - 0usize];
13234 ["Offset of field: SDL_GPUVertexBufferDescription::pitch"]
13235 [::core::mem::offset_of!(SDL_GPUVertexBufferDescription, pitch) - 4usize];
13236 ["Offset of field: SDL_GPUVertexBufferDescription::input_rate"]
13237 [::core::mem::offset_of!(SDL_GPUVertexBufferDescription, input_rate) - 8usize];
13238 ["Offset of field: SDL_GPUVertexBufferDescription::instance_step_rate"]
13239 [::core::mem::offset_of!(SDL_GPUVertexBufferDescription, instance_step_rate) - 12usize];
13240};
13241impl Default for SDL_GPUVertexBufferDescription {
13242 fn default() -> Self {
13243 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13244 unsafe {
13245 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13246 s.assume_init()
13247 }
13248 }
13249}
13250#[doc = " A structure specifying a vertex attribute.\n\n All vertex attribute locations provided to an SDL_GPUVertexInputState must\n be unique.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUVertexBufferDescription\n **See Also:** SDL_GPUVertexInputState\n **See Also:** SDL_GPUVertexElementFormat\n"]
13251#[repr(C)]
13252#[derive(Debug, Copy, Clone, Hash)]
13253pub struct SDL_GPUVertexAttribute {
13254 #[doc = "< The shader input location index.\n"]
13255 pub location: Uint32,
13256 #[doc = "< The binding slot of the associated vertex buffer.\n"]
13257 pub buffer_slot: Uint32,
13258 #[doc = "< The size and type of the attribute data.\n"]
13259 pub format: SDL_GPUVertexElementFormat,
13260 #[doc = "< The byte offset of this attribute relative to the start of the vertex element.\n"]
13261 pub offset: Uint32,
13262}
13263#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13264const _: () = {
13265 ["Size of SDL_GPUVertexAttribute"][::core::mem::size_of::<SDL_GPUVertexAttribute>() - 16usize];
13266 ["Alignment of SDL_GPUVertexAttribute"]
13267 [::core::mem::align_of::<SDL_GPUVertexAttribute>() - 4usize];
13268 ["Offset of field: SDL_GPUVertexAttribute::location"]
13269 [::core::mem::offset_of!(SDL_GPUVertexAttribute, location) - 0usize];
13270 ["Offset of field: SDL_GPUVertexAttribute::buffer_slot"]
13271 [::core::mem::offset_of!(SDL_GPUVertexAttribute, buffer_slot) - 4usize];
13272 ["Offset of field: SDL_GPUVertexAttribute::format"]
13273 [::core::mem::offset_of!(SDL_GPUVertexAttribute, format) - 8usize];
13274 ["Offset of field: SDL_GPUVertexAttribute::offset"]
13275 [::core::mem::offset_of!(SDL_GPUVertexAttribute, offset) - 12usize];
13276};
13277impl Default for SDL_GPUVertexAttribute {
13278 fn default() -> Self {
13279 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13280 unsafe {
13281 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13282 s.assume_init()
13283 }
13284 }
13285}
13286#[doc = " A structure specifying the parameters of a graphics pipeline vertex input\n state.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUGraphicsPipelineCreateInfo\n **See Also:** SDL_GPUVertexBufferDescription\n **See Also:** SDL_GPUVertexAttribute\n"]
13287#[repr(C)]
13288#[derive(Debug, Copy, Clone, Hash)]
13289pub struct SDL_GPUVertexInputState {
13290 #[doc = "< A pointer to an array of vertex buffer descriptions.\n"]
13291 pub vertex_buffer_descriptions: *const SDL_GPUVertexBufferDescription,
13292 #[doc = "< The number of vertex buffer descriptions in the above array.\n"]
13293 pub num_vertex_buffers: Uint32,
13294 #[doc = "< A pointer to an array of vertex attribute descriptions.\n"]
13295 pub vertex_attributes: *const SDL_GPUVertexAttribute,
13296 #[doc = "< The number of vertex attribute descriptions in the above array.\n"]
13297 pub num_vertex_attributes: Uint32,
13298}
13299#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13300const _: () = {
13301 ["Size of SDL_GPUVertexInputState"]
13302 [::core::mem::size_of::<SDL_GPUVertexInputState>() - 32usize];
13303 ["Alignment of SDL_GPUVertexInputState"]
13304 [::core::mem::align_of::<SDL_GPUVertexInputState>() - 8usize];
13305 ["Offset of field: SDL_GPUVertexInputState::vertex_buffer_descriptions"]
13306 [::core::mem::offset_of!(SDL_GPUVertexInputState, vertex_buffer_descriptions) - 0usize];
13307 ["Offset of field: SDL_GPUVertexInputState::num_vertex_buffers"]
13308 [::core::mem::offset_of!(SDL_GPUVertexInputState, num_vertex_buffers) - 8usize];
13309 ["Offset of field: SDL_GPUVertexInputState::vertex_attributes"]
13310 [::core::mem::offset_of!(SDL_GPUVertexInputState, vertex_attributes) - 16usize];
13311 ["Offset of field: SDL_GPUVertexInputState::num_vertex_attributes"]
13312 [::core::mem::offset_of!(SDL_GPUVertexInputState, num_vertex_attributes) - 24usize];
13313};
13314impl Default for SDL_GPUVertexInputState {
13315 fn default() -> Self {
13316 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13317 unsafe {
13318 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13319 s.assume_init()
13320 }
13321 }
13322}
13323#[doc = " A structure specifying the stencil operation state of a graphics pipeline.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUDepthStencilState\n"]
13324#[repr(C)]
13325#[derive(Debug, Copy, Clone, Hash)]
13326pub struct SDL_GPUStencilOpState {
13327 #[doc = "< The action performed on samples that fail the stencil test.\n"]
13328 pub fail_op: SDL_GPUStencilOp,
13329 #[doc = "< The action performed on samples that pass the depth and stencil tests.\n"]
13330 pub pass_op: SDL_GPUStencilOp,
13331 #[doc = "< The action performed on samples that pass the stencil test and fail the depth test.\n"]
13332 pub depth_fail_op: SDL_GPUStencilOp,
13333 #[doc = "< The comparison operator used in the stencil test.\n"]
13334 pub compare_op: SDL_GPUCompareOp,
13335}
13336#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13337const _: () = {
13338 ["Size of SDL_GPUStencilOpState"][::core::mem::size_of::<SDL_GPUStencilOpState>() - 16usize];
13339 ["Alignment of SDL_GPUStencilOpState"]
13340 [::core::mem::align_of::<SDL_GPUStencilOpState>() - 4usize];
13341 ["Offset of field: SDL_GPUStencilOpState::fail_op"]
13342 [::core::mem::offset_of!(SDL_GPUStencilOpState, fail_op) - 0usize];
13343 ["Offset of field: SDL_GPUStencilOpState::pass_op"]
13344 [::core::mem::offset_of!(SDL_GPUStencilOpState, pass_op) - 4usize];
13345 ["Offset of field: SDL_GPUStencilOpState::depth_fail_op"]
13346 [::core::mem::offset_of!(SDL_GPUStencilOpState, depth_fail_op) - 8usize];
13347 ["Offset of field: SDL_GPUStencilOpState::compare_op"]
13348 [::core::mem::offset_of!(SDL_GPUStencilOpState, compare_op) - 12usize];
13349};
13350impl Default for SDL_GPUStencilOpState {
13351 fn default() -> Self {
13352 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13353 unsafe {
13354 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13355 s.assume_init()
13356 }
13357 }
13358}
13359#[doc = " A structure specifying the blend state of a color target.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUColorTargetDescription\n **See Also:** SDL_GPUBlendFactor\n **See Also:** SDL_GPUBlendOp\n **See Also:** SDL_GPUColorComponentFlags\n"]
13360#[repr(C)]
13361#[derive(Debug, Copy, Clone, Hash)]
13362pub struct SDL_GPUColorTargetBlendState {
13363 #[doc = "< The value to be multiplied by the source RGB value.\n"]
13364 pub src_color_blendfactor: SDL_GPUBlendFactor,
13365 #[doc = "< The value to be multiplied by the destination RGB value.\n"]
13366 pub dst_color_blendfactor: SDL_GPUBlendFactor,
13367 #[doc = "< The blend operation for the RGB components.\n"]
13368 pub color_blend_op: SDL_GPUBlendOp,
13369 #[doc = "< The value to be multiplied by the source alpha.\n"]
13370 pub src_alpha_blendfactor: SDL_GPUBlendFactor,
13371 #[doc = "< The value to be multiplied by the destination alpha.\n"]
13372 pub dst_alpha_blendfactor: SDL_GPUBlendFactor,
13373 #[doc = "< The blend operation for the alpha component.\n"]
13374 pub alpha_blend_op: SDL_GPUBlendOp,
13375 #[doc = "< A bitmask specifying which of the RGBA components are enabled for writing. Writes to all channels if enable_color_write_mask is false.\n"]
13376 pub color_write_mask: SDL_GPUColorComponentFlags,
13377 #[doc = "< Whether blending is enabled for the color target.\n"]
13378 pub enable_blend: bool,
13379 #[doc = "< Whether the color write mask is enabled.\n"]
13380 pub enable_color_write_mask: bool,
13381 pub padding1: Uint8,
13382 pub padding2: Uint8,
13383}
13384#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13385const _: () = {
13386 ["Size of SDL_GPUColorTargetBlendState"]
13387 [::core::mem::size_of::<SDL_GPUColorTargetBlendState>() - 32usize];
13388 ["Alignment of SDL_GPUColorTargetBlendState"]
13389 [::core::mem::align_of::<SDL_GPUColorTargetBlendState>() - 4usize];
13390 ["Offset of field: SDL_GPUColorTargetBlendState::src_color_blendfactor"]
13391 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, src_color_blendfactor) - 0usize];
13392 ["Offset of field: SDL_GPUColorTargetBlendState::dst_color_blendfactor"]
13393 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, dst_color_blendfactor) - 4usize];
13394 ["Offset of field: SDL_GPUColorTargetBlendState::color_blend_op"]
13395 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, color_blend_op) - 8usize];
13396 ["Offset of field: SDL_GPUColorTargetBlendState::src_alpha_blendfactor"]
13397 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, src_alpha_blendfactor) - 12usize];
13398 ["Offset of field: SDL_GPUColorTargetBlendState::dst_alpha_blendfactor"]
13399 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, dst_alpha_blendfactor) - 16usize];
13400 ["Offset of field: SDL_GPUColorTargetBlendState::alpha_blend_op"]
13401 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, alpha_blend_op) - 20usize];
13402 ["Offset of field: SDL_GPUColorTargetBlendState::color_write_mask"]
13403 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, color_write_mask) - 24usize];
13404 ["Offset of field: SDL_GPUColorTargetBlendState::enable_blend"]
13405 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, enable_blend) - 25usize];
13406 ["Offset of field: SDL_GPUColorTargetBlendState::enable_color_write_mask"]
13407 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, enable_color_write_mask) - 26usize];
13408 ["Offset of field: SDL_GPUColorTargetBlendState::padding1"]
13409 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, padding1) - 27usize];
13410 ["Offset of field: SDL_GPUColorTargetBlendState::padding2"]
13411 [::core::mem::offset_of!(SDL_GPUColorTargetBlendState, padding2) - 28usize];
13412};
13413impl Default for SDL_GPUColorTargetBlendState {
13414 fn default() -> Self {
13415 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13416 unsafe {
13417 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13418 s.assume_init()
13419 }
13420 }
13421}
13422#[doc = " A structure specifying code and metadata for creating a shader object.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n **See Also:** SDL_GPUShaderFormat\n **See Also:** SDL_GPUShaderStage\n"]
13423#[repr(C)]
13424#[derive(Debug, Copy, Clone, Hash)]
13425pub struct SDL_GPUShaderCreateInfo {
13426 #[doc = "< The size in bytes of the code pointed to.\n"]
13427 pub code_size: usize,
13428 #[doc = "< A pointer to shader code.\n"]
13429 pub code: *const Uint8,
13430 #[doc = "< A pointer to a null-terminated UTF-8 string specifying the entry point function name for the shader.\n"]
13431 pub entrypoint: *const core::ffi::c_char,
13432 #[doc = "< The format of the shader code.\n"]
13433 pub format: SDL_GPUShaderFormat,
13434 #[doc = "< The stage the shader program corresponds to.\n"]
13435 pub stage: SDL_GPUShaderStage,
13436 #[doc = "< The number of samplers defined in the shader.\n"]
13437 pub num_samplers: Uint32,
13438 #[doc = "< The number of storage textures defined in the shader.\n"]
13439 pub num_storage_textures: Uint32,
13440 #[doc = "< The number of storage buffers defined in the shader.\n"]
13441 pub num_storage_buffers: Uint32,
13442 #[doc = "< The number of uniform buffers defined in the shader.\n"]
13443 pub num_uniform_buffers: Uint32,
13444 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
13445 pub props: SDL_PropertiesID,
13446}
13447#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13448const _: () = {
13449 ["Size of SDL_GPUShaderCreateInfo"]
13450 [::core::mem::size_of::<SDL_GPUShaderCreateInfo>() - 56usize];
13451 ["Alignment of SDL_GPUShaderCreateInfo"]
13452 [::core::mem::align_of::<SDL_GPUShaderCreateInfo>() - 8usize];
13453 ["Offset of field: SDL_GPUShaderCreateInfo::code_size"]
13454 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, code_size) - 0usize];
13455 ["Offset of field: SDL_GPUShaderCreateInfo::code"]
13456 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, code) - 8usize];
13457 ["Offset of field: SDL_GPUShaderCreateInfo::entrypoint"]
13458 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, entrypoint) - 16usize];
13459 ["Offset of field: SDL_GPUShaderCreateInfo::format"]
13460 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, format) - 24usize];
13461 ["Offset of field: SDL_GPUShaderCreateInfo::stage"]
13462 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, stage) - 28usize];
13463 ["Offset of field: SDL_GPUShaderCreateInfo::num_samplers"]
13464 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, num_samplers) - 32usize];
13465 ["Offset of field: SDL_GPUShaderCreateInfo::num_storage_textures"]
13466 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, num_storage_textures) - 36usize];
13467 ["Offset of field: SDL_GPUShaderCreateInfo::num_storage_buffers"]
13468 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, num_storage_buffers) - 40usize];
13469 ["Offset of field: SDL_GPUShaderCreateInfo::num_uniform_buffers"]
13470 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, num_uniform_buffers) - 44usize];
13471 ["Offset of field: SDL_GPUShaderCreateInfo::props"]
13472 [::core::mem::offset_of!(SDL_GPUShaderCreateInfo, props) - 48usize];
13473};
13474impl Default for SDL_GPUShaderCreateInfo {
13475 fn default() -> Self {
13476 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13477 unsafe {
13478 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13479 s.assume_init()
13480 }
13481 }
13482}
13483#[doc = " A structure specifying the parameters of a texture.\n\n Usage flags can be bitwise OR'd together for combinations of usages. Note\n that certain usage combinations are invalid, for example SAMPLER and\n GRAPHICS_STORAGE.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUTexture\n **See Also:** SDL_GPUTextureType\n **See Also:** SDL_GPUTextureFormat\n **See Also:** SDL_GPUTextureUsageFlags\n **See Also:** SDL_GPUSampleCount\n"]
13484#[repr(C)]
13485#[derive(Debug, Copy, Clone, Hash)]
13486pub struct SDL_GPUTextureCreateInfo {
13487 #[doc = "< The base dimensionality of the texture.\n"]
13488 pub type_: SDL_GPUTextureType,
13489 #[doc = "< The pixel format of the texture.\n"]
13490 pub format: SDL_GPUTextureFormat,
13491 #[doc = "< How the texture is intended to be used by the client.\n"]
13492 pub usage: SDL_GPUTextureUsageFlags,
13493 #[doc = "< The width of the texture.\n"]
13494 pub width: Uint32,
13495 #[doc = "< The height of the texture.\n"]
13496 pub height: Uint32,
13497 #[doc = "< The layer count or depth of the texture. This value is treated as a layer count on 2D array textures, and as a depth value on 3D textures.\n"]
13498 pub layer_count_or_depth: Uint32,
13499 #[doc = "< The number of mip levels in the texture.\n"]
13500 pub num_levels: Uint32,
13501 #[doc = "< The number of samples per texel. Only applies if the texture is used as a render target.\n"]
13502 pub sample_count: SDL_GPUSampleCount,
13503 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
13504 pub props: SDL_PropertiesID,
13505}
13506#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13507const _: () = {
13508 ["Size of SDL_GPUTextureCreateInfo"]
13509 [::core::mem::size_of::<SDL_GPUTextureCreateInfo>() - 36usize];
13510 ["Alignment of SDL_GPUTextureCreateInfo"]
13511 [::core::mem::align_of::<SDL_GPUTextureCreateInfo>() - 4usize];
13512 ["Offset of field: SDL_GPUTextureCreateInfo::type_"]
13513 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, type_) - 0usize];
13514 ["Offset of field: SDL_GPUTextureCreateInfo::format"]
13515 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, format) - 4usize];
13516 ["Offset of field: SDL_GPUTextureCreateInfo::usage"]
13517 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, usage) - 8usize];
13518 ["Offset of field: SDL_GPUTextureCreateInfo::width"]
13519 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, width) - 12usize];
13520 ["Offset of field: SDL_GPUTextureCreateInfo::height"]
13521 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, height) - 16usize];
13522 ["Offset of field: SDL_GPUTextureCreateInfo::layer_count_or_depth"]
13523 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, layer_count_or_depth) - 20usize];
13524 ["Offset of field: SDL_GPUTextureCreateInfo::num_levels"]
13525 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, num_levels) - 24usize];
13526 ["Offset of field: SDL_GPUTextureCreateInfo::sample_count"]
13527 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, sample_count) - 28usize];
13528 ["Offset of field: SDL_GPUTextureCreateInfo::props"]
13529 [::core::mem::offset_of!(SDL_GPUTextureCreateInfo, props) - 32usize];
13530};
13531impl Default for SDL_GPUTextureCreateInfo {
13532 fn default() -> Self {
13533 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13534 unsafe {
13535 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13536 s.assume_init()
13537 }
13538 }
13539}
13540#[doc = " A structure specifying the parameters of a buffer.\n\n Usage flags can be bitwise OR'd together for combinations of usages. Note\n that certain combinations are invalid, for example VERTEX and INDEX.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUBuffer\n **See Also:** SDL_GPUBufferUsageFlags\n"]
13541#[repr(C)]
13542#[derive(Debug, Default, Copy, Clone, Hash)]
13543pub struct SDL_GPUBufferCreateInfo {
13544 #[doc = "< How the buffer is intended to be used by the client.\n"]
13545 pub usage: SDL_GPUBufferUsageFlags,
13546 #[doc = "< The size in bytes of the buffer.\n"]
13547 pub size: Uint32,
13548 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
13549 pub props: SDL_PropertiesID,
13550}
13551#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13552const _: () = {
13553 ["Size of SDL_GPUBufferCreateInfo"]
13554 [::core::mem::size_of::<SDL_GPUBufferCreateInfo>() - 12usize];
13555 ["Alignment of SDL_GPUBufferCreateInfo"]
13556 [::core::mem::align_of::<SDL_GPUBufferCreateInfo>() - 4usize];
13557 ["Offset of field: SDL_GPUBufferCreateInfo::usage"]
13558 [::core::mem::offset_of!(SDL_GPUBufferCreateInfo, usage) - 0usize];
13559 ["Offset of field: SDL_GPUBufferCreateInfo::size"]
13560 [::core::mem::offset_of!(SDL_GPUBufferCreateInfo, size) - 4usize];
13561 ["Offset of field: SDL_GPUBufferCreateInfo::props"]
13562 [::core::mem::offset_of!(SDL_GPUBufferCreateInfo, props) - 8usize];
13563};
13564#[doc = " A structure specifying the parameters of a transfer buffer.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUTransferBufferUsage\n **See Also:** SDL_CreateGPUTransferBuffer\n"]
13565#[repr(C)]
13566#[derive(Debug, Copy, Clone, Hash)]
13567pub struct SDL_GPUTransferBufferCreateInfo {
13568 #[doc = "< How the transfer buffer is intended to be used by the client.\n"]
13569 pub usage: SDL_GPUTransferBufferUsage,
13570 #[doc = "< The size in bytes of the transfer buffer.\n"]
13571 pub size: Uint32,
13572 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
13573 pub props: SDL_PropertiesID,
13574}
13575#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13576const _: () = {
13577 ["Size of SDL_GPUTransferBufferCreateInfo"]
13578 [::core::mem::size_of::<SDL_GPUTransferBufferCreateInfo>() - 12usize];
13579 ["Alignment of SDL_GPUTransferBufferCreateInfo"]
13580 [::core::mem::align_of::<SDL_GPUTransferBufferCreateInfo>() - 4usize];
13581 ["Offset of field: SDL_GPUTransferBufferCreateInfo::usage"]
13582 [::core::mem::offset_of!(SDL_GPUTransferBufferCreateInfo, usage) - 0usize];
13583 ["Offset of field: SDL_GPUTransferBufferCreateInfo::size"]
13584 [::core::mem::offset_of!(SDL_GPUTransferBufferCreateInfo, size) - 4usize];
13585 ["Offset of field: SDL_GPUTransferBufferCreateInfo::props"]
13586 [::core::mem::offset_of!(SDL_GPUTransferBufferCreateInfo, props) - 8usize];
13587};
13588impl Default for SDL_GPUTransferBufferCreateInfo {
13589 fn default() -> Self {
13590 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13591 unsafe {
13592 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13593 s.assume_init()
13594 }
13595 }
13596}
13597#[doc = " A structure specifying the parameters of the graphics pipeline rasterizer\n state.\n\n Note that SDL_GPU_FILLMODE_LINE is not supported on many Android devices.\n For those devices, the fill mode will automatically fall back to FILL.\n\n Also note that the D3D12 driver will enable depth clamping even if\n enable_depth_clip is true. If you need this clamp+clip behavior, consider\n enabling depth clip and then manually clamping depth in your fragment\n shaders on Metal and Vulkan.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUGraphicsPipelineCreateInfo\n"]
13598#[repr(C)]
13599#[derive(Debug, Copy, Clone)]
13600pub struct SDL_GPURasterizerState {
13601 #[doc = "< Whether polygons will be filled in or drawn as lines.\n"]
13602 pub fill_mode: SDL_GPUFillMode,
13603 #[doc = "< The facing direction in which triangles will be culled.\n"]
13604 pub cull_mode: SDL_GPUCullMode,
13605 #[doc = "< The vertex winding that will cause a triangle to be determined as front-facing.\n"]
13606 pub front_face: SDL_GPUFrontFace,
13607 #[doc = "< A scalar factor controlling the depth value added to each fragment.\n"]
13608 pub depth_bias_constant_factor: f32,
13609 #[doc = "< The maximum depth bias of a fragment.\n"]
13610 pub depth_bias_clamp: f32,
13611 #[doc = "< A scalar factor applied to a fragment's slope in depth calculations.\n"]
13612 pub depth_bias_slope_factor: f32,
13613 #[doc = "< true to bias fragment depth values.\n"]
13614 pub enable_depth_bias: bool,
13615 #[doc = "< true to enable depth clip, false to enable depth clamp.\n"]
13616 pub enable_depth_clip: bool,
13617 pub padding1: Uint8,
13618 pub padding2: Uint8,
13619}
13620#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13621const _: () = {
13622 ["Size of SDL_GPURasterizerState"][::core::mem::size_of::<SDL_GPURasterizerState>() - 28usize];
13623 ["Alignment of SDL_GPURasterizerState"]
13624 [::core::mem::align_of::<SDL_GPURasterizerState>() - 4usize];
13625 ["Offset of field: SDL_GPURasterizerState::fill_mode"]
13626 [::core::mem::offset_of!(SDL_GPURasterizerState, fill_mode) - 0usize];
13627 ["Offset of field: SDL_GPURasterizerState::cull_mode"]
13628 [::core::mem::offset_of!(SDL_GPURasterizerState, cull_mode) - 4usize];
13629 ["Offset of field: SDL_GPURasterizerState::front_face"]
13630 [::core::mem::offset_of!(SDL_GPURasterizerState, front_face) - 8usize];
13631 ["Offset of field: SDL_GPURasterizerState::depth_bias_constant_factor"]
13632 [::core::mem::offset_of!(SDL_GPURasterizerState, depth_bias_constant_factor) - 12usize];
13633 ["Offset of field: SDL_GPURasterizerState::depth_bias_clamp"]
13634 [::core::mem::offset_of!(SDL_GPURasterizerState, depth_bias_clamp) - 16usize];
13635 ["Offset of field: SDL_GPURasterizerState::depth_bias_slope_factor"]
13636 [::core::mem::offset_of!(SDL_GPURasterizerState, depth_bias_slope_factor) - 20usize];
13637 ["Offset of field: SDL_GPURasterizerState::enable_depth_bias"]
13638 [::core::mem::offset_of!(SDL_GPURasterizerState, enable_depth_bias) - 24usize];
13639 ["Offset of field: SDL_GPURasterizerState::enable_depth_clip"]
13640 [::core::mem::offset_of!(SDL_GPURasterizerState, enable_depth_clip) - 25usize];
13641 ["Offset of field: SDL_GPURasterizerState::padding1"]
13642 [::core::mem::offset_of!(SDL_GPURasterizerState, padding1) - 26usize];
13643 ["Offset of field: SDL_GPURasterizerState::padding2"]
13644 [::core::mem::offset_of!(SDL_GPURasterizerState, padding2) - 27usize];
13645};
13646impl Default for SDL_GPURasterizerState {
13647 fn default() -> Self {
13648 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13649 unsafe {
13650 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13651 s.assume_init()
13652 }
13653 }
13654}
13655#[doc = " A structure specifying the parameters of the graphics pipeline multisample\n state.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUGraphicsPipelineCreateInfo\n"]
13656#[repr(C)]
13657#[derive(Debug, Copy, Clone, Hash)]
13658pub struct SDL_GPUMultisampleState {
13659 #[doc = "< The number of samples to be used in rasterization.\n"]
13660 pub sample_count: SDL_GPUSampleCount,
13661 #[doc = "< Reserved for future use. Must be set to 0.\n"]
13662 pub sample_mask: Uint32,
13663 #[doc = "< Reserved for future use. Must be set to false.\n"]
13664 pub enable_mask: bool,
13665 #[doc = "< true enables the alpha-to-coverage feature.\n"]
13666 pub enable_alpha_to_coverage: bool,
13667 pub padding2: Uint8,
13668 pub padding3: Uint8,
13669}
13670#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13671const _: () = {
13672 ["Size of SDL_GPUMultisampleState"]
13673 [::core::mem::size_of::<SDL_GPUMultisampleState>() - 12usize];
13674 ["Alignment of SDL_GPUMultisampleState"]
13675 [::core::mem::align_of::<SDL_GPUMultisampleState>() - 4usize];
13676 ["Offset of field: SDL_GPUMultisampleState::sample_count"]
13677 [::core::mem::offset_of!(SDL_GPUMultisampleState, sample_count) - 0usize];
13678 ["Offset of field: SDL_GPUMultisampleState::sample_mask"]
13679 [::core::mem::offset_of!(SDL_GPUMultisampleState, sample_mask) - 4usize];
13680 ["Offset of field: SDL_GPUMultisampleState::enable_mask"]
13681 [::core::mem::offset_of!(SDL_GPUMultisampleState, enable_mask) - 8usize];
13682 ["Offset of field: SDL_GPUMultisampleState::enable_alpha_to_coverage"]
13683 [::core::mem::offset_of!(SDL_GPUMultisampleState, enable_alpha_to_coverage) - 9usize];
13684 ["Offset of field: SDL_GPUMultisampleState::padding2"]
13685 [::core::mem::offset_of!(SDL_GPUMultisampleState, padding2) - 10usize];
13686 ["Offset of field: SDL_GPUMultisampleState::padding3"]
13687 [::core::mem::offset_of!(SDL_GPUMultisampleState, padding3) - 11usize];
13688};
13689impl Default for SDL_GPUMultisampleState {
13690 fn default() -> Self {
13691 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13692 unsafe {
13693 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13694 s.assume_init()
13695 }
13696 }
13697}
13698#[doc = " A structure specifying the parameters of the graphics pipeline depth\n stencil state.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUGraphicsPipelineCreateInfo\n"]
13699#[repr(C)]
13700#[derive(Debug, Copy, Clone, Hash)]
13701pub struct SDL_GPUDepthStencilState {
13702 #[doc = "< The comparison operator used for depth testing.\n"]
13703 pub compare_op: SDL_GPUCompareOp,
13704 #[doc = "< The stencil op state for back-facing triangles.\n"]
13705 pub back_stencil_state: SDL_GPUStencilOpState,
13706 #[doc = "< The stencil op state for front-facing triangles.\n"]
13707 pub front_stencil_state: SDL_GPUStencilOpState,
13708 #[doc = "< Selects the bits of the stencil values participating in the stencil test.\n"]
13709 pub compare_mask: Uint8,
13710 #[doc = "< Selects the bits of the stencil values updated by the stencil test.\n"]
13711 pub write_mask: Uint8,
13712 #[doc = "< true enables the depth test.\n"]
13713 pub enable_depth_test: bool,
13714 #[doc = "< true enables depth writes. Depth writes are always disabled when enable_depth_test is false.\n"]
13715 pub enable_depth_write: bool,
13716 #[doc = "< true enables the stencil test.\n"]
13717 pub enable_stencil_test: bool,
13718 pub padding1: Uint8,
13719 pub padding2: Uint8,
13720 pub padding3: Uint8,
13721}
13722#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13723const _: () = {
13724 ["Size of SDL_GPUDepthStencilState"]
13725 [::core::mem::size_of::<SDL_GPUDepthStencilState>() - 44usize];
13726 ["Alignment of SDL_GPUDepthStencilState"]
13727 [::core::mem::align_of::<SDL_GPUDepthStencilState>() - 4usize];
13728 ["Offset of field: SDL_GPUDepthStencilState::compare_op"]
13729 [::core::mem::offset_of!(SDL_GPUDepthStencilState, compare_op) - 0usize];
13730 ["Offset of field: SDL_GPUDepthStencilState::back_stencil_state"]
13731 [::core::mem::offset_of!(SDL_GPUDepthStencilState, back_stencil_state) - 4usize];
13732 ["Offset of field: SDL_GPUDepthStencilState::front_stencil_state"]
13733 [::core::mem::offset_of!(SDL_GPUDepthStencilState, front_stencil_state) - 20usize];
13734 ["Offset of field: SDL_GPUDepthStencilState::compare_mask"]
13735 [::core::mem::offset_of!(SDL_GPUDepthStencilState, compare_mask) - 36usize];
13736 ["Offset of field: SDL_GPUDepthStencilState::write_mask"]
13737 [::core::mem::offset_of!(SDL_GPUDepthStencilState, write_mask) - 37usize];
13738 ["Offset of field: SDL_GPUDepthStencilState::enable_depth_test"]
13739 [::core::mem::offset_of!(SDL_GPUDepthStencilState, enable_depth_test) - 38usize];
13740 ["Offset of field: SDL_GPUDepthStencilState::enable_depth_write"]
13741 [::core::mem::offset_of!(SDL_GPUDepthStencilState, enable_depth_write) - 39usize];
13742 ["Offset of field: SDL_GPUDepthStencilState::enable_stencil_test"]
13743 [::core::mem::offset_of!(SDL_GPUDepthStencilState, enable_stencil_test) - 40usize];
13744 ["Offset of field: SDL_GPUDepthStencilState::padding1"]
13745 [::core::mem::offset_of!(SDL_GPUDepthStencilState, padding1) - 41usize];
13746 ["Offset of field: SDL_GPUDepthStencilState::padding2"]
13747 [::core::mem::offset_of!(SDL_GPUDepthStencilState, padding2) - 42usize];
13748 ["Offset of field: SDL_GPUDepthStencilState::padding3"]
13749 [::core::mem::offset_of!(SDL_GPUDepthStencilState, padding3) - 43usize];
13750};
13751impl Default for SDL_GPUDepthStencilState {
13752 fn default() -> Self {
13753 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13754 unsafe {
13755 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13756 s.assume_init()
13757 }
13758 }
13759}
13760#[doc = " A structure specifying the parameters of color targets used in a graphics\n pipeline.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUGraphicsPipelineTargetInfo\n"]
13761#[repr(C)]
13762#[derive(Debug, Copy, Clone, Hash)]
13763pub struct SDL_GPUColorTargetDescription {
13764 #[doc = "< The pixel format of the texture to be used as a color target.\n"]
13765 pub format: SDL_GPUTextureFormat,
13766 #[doc = "< The blend state to be used for the color target.\n"]
13767 pub blend_state: SDL_GPUColorTargetBlendState,
13768}
13769#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13770const _: () = {
13771 ["Size of SDL_GPUColorTargetDescription"]
13772 [::core::mem::size_of::<SDL_GPUColorTargetDescription>() - 36usize];
13773 ["Alignment of SDL_GPUColorTargetDescription"]
13774 [::core::mem::align_of::<SDL_GPUColorTargetDescription>() - 4usize];
13775 ["Offset of field: SDL_GPUColorTargetDescription::format"]
13776 [::core::mem::offset_of!(SDL_GPUColorTargetDescription, format) - 0usize];
13777 ["Offset of field: SDL_GPUColorTargetDescription::blend_state"]
13778 [::core::mem::offset_of!(SDL_GPUColorTargetDescription, blend_state) - 4usize];
13779};
13780impl Default for SDL_GPUColorTargetDescription {
13781 fn default() -> Self {
13782 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13783 unsafe {
13784 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13785 s.assume_init()
13786 }
13787 }
13788}
13789#[doc = " A structure specifying the descriptions of render targets used in a\n graphics pipeline.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_GPUGraphicsPipelineCreateInfo\n **See Also:** SDL_GPUColorTargetDescription\n **See Also:** SDL_GPUTextureFormat\n"]
13790#[repr(C)]
13791#[derive(Debug, Copy, Clone, Hash)]
13792pub struct SDL_GPUGraphicsPipelineTargetInfo {
13793 #[doc = "< A pointer to an array of color target descriptions.\n"]
13794 pub color_target_descriptions: *const SDL_GPUColorTargetDescription,
13795 #[doc = "< The number of color target descriptions in the above array.\n"]
13796 pub num_color_targets: Uint32,
13797 #[doc = "< The pixel format of the depth-stencil target. Ignored if has_depth_stencil_target is false.\n"]
13798 pub depth_stencil_format: SDL_GPUTextureFormat,
13799 #[doc = "< true specifies that the pipeline uses a depth-stencil target.\n"]
13800 pub has_depth_stencil_target: bool,
13801 pub padding1: Uint8,
13802 pub padding2: Uint8,
13803 pub padding3: Uint8,
13804}
13805#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13806const _: () = {
13807 ["Size of SDL_GPUGraphicsPipelineTargetInfo"]
13808 [::core::mem::size_of::<SDL_GPUGraphicsPipelineTargetInfo>() - 24usize];
13809 ["Alignment of SDL_GPUGraphicsPipelineTargetInfo"]
13810 [::core::mem::align_of::<SDL_GPUGraphicsPipelineTargetInfo>() - 8usize];
13811 ["Offset of field: SDL_GPUGraphicsPipelineTargetInfo::color_target_descriptions"][::core::mem::offset_of!(
13812 SDL_GPUGraphicsPipelineTargetInfo,
13813 color_target_descriptions
13814 ) - 0usize];
13815 ["Offset of field: SDL_GPUGraphicsPipelineTargetInfo::num_color_targets"]
13816 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineTargetInfo, num_color_targets) - 8usize];
13817 ["Offset of field: SDL_GPUGraphicsPipelineTargetInfo::depth_stencil_format"][::core::mem::offset_of!(
13818 SDL_GPUGraphicsPipelineTargetInfo,
13819 depth_stencil_format
13820 ) - 12usize];
13821 ["Offset of field: SDL_GPUGraphicsPipelineTargetInfo::has_depth_stencil_target"][::core::mem::offset_of!(
13822 SDL_GPUGraphicsPipelineTargetInfo,
13823 has_depth_stencil_target
13824 ) - 16usize];
13825 ["Offset of field: SDL_GPUGraphicsPipelineTargetInfo::padding1"]
13826 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineTargetInfo, padding1) - 17usize];
13827 ["Offset of field: SDL_GPUGraphicsPipelineTargetInfo::padding2"]
13828 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineTargetInfo, padding2) - 18usize];
13829 ["Offset of field: SDL_GPUGraphicsPipelineTargetInfo::padding3"]
13830 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineTargetInfo, padding3) - 19usize];
13831};
13832impl Default for SDL_GPUGraphicsPipelineTargetInfo {
13833 fn default() -> Self {
13834 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13835 unsafe {
13836 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13837 s.assume_init()
13838 }
13839 }
13840}
13841#[doc = " A structure specifying the parameters of a graphics pipeline state.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n **See Also:** SDL_GPUShader\n **See Also:** SDL_GPUVertexInputState\n **See Also:** SDL_GPUPrimitiveType\n **See Also:** SDL_GPURasterizerState\n **See Also:** SDL_GPUMultisampleState\n **See Also:** SDL_GPUDepthStencilState\n **See Also:** SDL_GPUGraphicsPipelineTargetInfo\n"]
13842#[repr(C)]
13843#[derive(Debug, Copy, Clone)]
13844pub struct SDL_GPUGraphicsPipelineCreateInfo {
13845 #[doc = "< The vertex shader used by the graphics pipeline.\n"]
13846 pub vertex_shader: *mut SDL_GPUShader,
13847 #[doc = "< The fragment shader used by the graphics pipeline.\n"]
13848 pub fragment_shader: *mut SDL_GPUShader,
13849 #[doc = "< The vertex layout of the graphics pipeline.\n"]
13850 pub vertex_input_state: SDL_GPUVertexInputState,
13851 #[doc = "< The primitive topology of the graphics pipeline.\n"]
13852 pub primitive_type: SDL_GPUPrimitiveType,
13853 #[doc = "< The rasterizer state of the graphics pipeline.\n"]
13854 pub rasterizer_state: SDL_GPURasterizerState,
13855 #[doc = "< The multisample state of the graphics pipeline.\n"]
13856 pub multisample_state: SDL_GPUMultisampleState,
13857 #[doc = "< The depth-stencil state of the graphics pipeline.\n"]
13858 pub depth_stencil_state: SDL_GPUDepthStencilState,
13859 #[doc = "< Formats and blend modes for the render targets of the graphics pipeline.\n"]
13860 pub target_info: SDL_GPUGraphicsPipelineTargetInfo,
13861 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
13862 pub props: SDL_PropertiesID,
13863}
13864#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13865const _: () = {
13866 ["Size of SDL_GPUGraphicsPipelineCreateInfo"]
13867 [::core::mem::size_of::<SDL_GPUGraphicsPipelineCreateInfo>() - 168usize];
13868 ["Alignment of SDL_GPUGraphicsPipelineCreateInfo"]
13869 [::core::mem::align_of::<SDL_GPUGraphicsPipelineCreateInfo>() - 8usize];
13870 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::vertex_shader"]
13871 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, vertex_shader) - 0usize];
13872 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::fragment_shader"]
13873 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, fragment_shader) - 8usize];
13874 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::vertex_input_state"]
13875 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, vertex_input_state) - 16usize];
13876 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::primitive_type"]
13877 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, primitive_type) - 48usize];
13878 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::rasterizer_state"]
13879 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, rasterizer_state) - 52usize];
13880 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::multisample_state"]
13881 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, multisample_state) - 80usize];
13882 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::depth_stencil_state"]
13883 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, depth_stencil_state) - 92usize];
13884 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::target_info"]
13885 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, target_info) - 136usize];
13886 ["Offset of field: SDL_GPUGraphicsPipelineCreateInfo::props"]
13887 [::core::mem::offset_of!(SDL_GPUGraphicsPipelineCreateInfo, props) - 160usize];
13888};
13889impl Default for SDL_GPUGraphicsPipelineCreateInfo {
13890 fn default() -> Self {
13891 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13892 unsafe {
13893 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13894 s.assume_init()
13895 }
13896 }
13897}
13898#[doc = " A structure specifying the parameters of a compute pipeline state.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUComputePipeline\n **See Also:** SDL_GPUShaderFormat\n"]
13899#[repr(C)]
13900#[derive(Debug, Copy, Clone, Hash)]
13901pub struct SDL_GPUComputePipelineCreateInfo {
13902 #[doc = "< The size in bytes of the compute shader code pointed to.\n"]
13903 pub code_size: usize,
13904 #[doc = "< A pointer to compute shader code.\n"]
13905 pub code: *const Uint8,
13906 #[doc = "< A pointer to a null-terminated UTF-8 string specifying the entry point function name for the shader.\n"]
13907 pub entrypoint: *const core::ffi::c_char,
13908 #[doc = "< The format of the compute shader code.\n"]
13909 pub format: SDL_GPUShaderFormat,
13910 #[doc = "< The number of samplers defined in the shader.\n"]
13911 pub num_samplers: Uint32,
13912 #[doc = "< The number of readonly storage textures defined in the shader.\n"]
13913 pub num_readonly_storage_textures: Uint32,
13914 #[doc = "< The number of readonly storage buffers defined in the shader.\n"]
13915 pub num_readonly_storage_buffers: Uint32,
13916 #[doc = "< The number of read-write storage textures defined in the shader.\n"]
13917 pub num_readwrite_storage_textures: Uint32,
13918 #[doc = "< The number of read-write storage buffers defined in the shader.\n"]
13919 pub num_readwrite_storage_buffers: Uint32,
13920 #[doc = "< The number of uniform buffers defined in the shader.\n"]
13921 pub num_uniform_buffers: Uint32,
13922 #[doc = "< The number of threads in the X dimension. This should match the value in the shader.\n"]
13923 pub threadcount_x: Uint32,
13924 #[doc = "< The number of threads in the Y dimension. This should match the value in the shader.\n"]
13925 pub threadcount_y: Uint32,
13926 #[doc = "< The number of threads in the Z dimension. This should match the value in the shader.\n"]
13927 pub threadcount_z: Uint32,
13928 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
13929 pub props: SDL_PropertiesID,
13930}
13931#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13932const _: () = {
13933 ["Size of SDL_GPUComputePipelineCreateInfo"]
13934 [::core::mem::size_of::<SDL_GPUComputePipelineCreateInfo>() - 72usize];
13935 ["Alignment of SDL_GPUComputePipelineCreateInfo"]
13936 [::core::mem::align_of::<SDL_GPUComputePipelineCreateInfo>() - 8usize];
13937 ["Offset of field: SDL_GPUComputePipelineCreateInfo::code_size"]
13938 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, code_size) - 0usize];
13939 ["Offset of field: SDL_GPUComputePipelineCreateInfo::code"]
13940 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, code) - 8usize];
13941 ["Offset of field: SDL_GPUComputePipelineCreateInfo::entrypoint"]
13942 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, entrypoint) - 16usize];
13943 ["Offset of field: SDL_GPUComputePipelineCreateInfo::format"]
13944 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, format) - 24usize];
13945 ["Offset of field: SDL_GPUComputePipelineCreateInfo::num_samplers"]
13946 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, num_samplers) - 28usize];
13947 ["Offset of field: SDL_GPUComputePipelineCreateInfo::num_readonly_storage_textures"][::core::mem::offset_of!(
13948 SDL_GPUComputePipelineCreateInfo,
13949 num_readonly_storage_textures
13950 )
13951 - 32usize];
13952 ["Offset of field: SDL_GPUComputePipelineCreateInfo::num_readonly_storage_buffers"][::core::mem::offset_of!(
13953 SDL_GPUComputePipelineCreateInfo,
13954 num_readonly_storage_buffers
13955 )
13956 - 36usize];
13957 ["Offset of field: SDL_GPUComputePipelineCreateInfo::num_readwrite_storage_textures"][::core::mem::offset_of!(
13958 SDL_GPUComputePipelineCreateInfo,
13959 num_readwrite_storage_textures
13960 )
13961 - 40usize];
13962 ["Offset of field: SDL_GPUComputePipelineCreateInfo::num_readwrite_storage_buffers"][::core::mem::offset_of!(
13963 SDL_GPUComputePipelineCreateInfo,
13964 num_readwrite_storage_buffers
13965 )
13966 - 44usize];
13967 ["Offset of field: SDL_GPUComputePipelineCreateInfo::num_uniform_buffers"]
13968 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, num_uniform_buffers) - 48usize];
13969 ["Offset of field: SDL_GPUComputePipelineCreateInfo::threadcount_x"]
13970 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, threadcount_x) - 52usize];
13971 ["Offset of field: SDL_GPUComputePipelineCreateInfo::threadcount_y"]
13972 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, threadcount_y) - 56usize];
13973 ["Offset of field: SDL_GPUComputePipelineCreateInfo::threadcount_z"]
13974 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, threadcount_z) - 60usize];
13975 ["Offset of field: SDL_GPUComputePipelineCreateInfo::props"]
13976 [::core::mem::offset_of!(SDL_GPUComputePipelineCreateInfo, props) - 64usize];
13977};
13978impl Default for SDL_GPUComputePipelineCreateInfo {
13979 fn default() -> Self {
13980 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
13981 unsafe {
13982 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
13983 s.assume_init()
13984 }
13985 }
13986}
13987#[doc = " A structure specifying the parameters of a color target used by a render\n pass.\n\n The load_op field determines what is done with the texture at the beginning\n of the render pass.\n\n - LOAD: Loads the data currently in the texture. Not recommended for\n multisample textures as it requires significant memory bandwidth.\n - CLEAR: Clears the texture to a single color.\n - DONT_CARE: The driver will do whatever it wants with the texture memory.\n This is a good option if you know that every single pixel will be touched\n in the render pass.\n\n The store_op field determines what is done with the color results of the\n render pass.\n\n - STORE: Stores the results of the render pass in the texture. Not\n recommended for multisample textures as it requires significant memory\n bandwidth.\n - DONT_CARE: The driver will do whatever it wants with the texture memory.\n This is often a good option for depth/stencil textures.\n - RESOLVE: Resolves a multisample texture into resolve_texture, which must\n have a sample count of 1. Then the driver may discard the multisample\n texture memory. This is the most performant method of resolving a\n multisample target.\n - RESOLVE_AND_STORE: Resolves a multisample texture into the\n resolve_texture, which must have a sample count of 1. Then the driver\n stores the multisample texture's contents. Not recommended as it requires\n significant memory bandwidth.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BeginGPURenderPass\n **See Also:** SDL_FColor\n"]
13988#[repr(C)]
13989#[derive(Debug, Copy, Clone)]
13990pub struct SDL_GPUColorTargetInfo {
13991 #[doc = "< The texture that will be used as a color target by a render pass.\n"]
13992 pub texture: *mut SDL_GPUTexture,
13993 #[doc = "< The mip level to use as a color target.\n"]
13994 pub mip_level: Uint32,
13995 #[doc = "< The layer index or depth plane to use as a color target. This value is treated as a layer index on 2D array and cube textures, and as a depth plane on 3D textures.\n"]
13996 pub layer_or_depth_plane: Uint32,
13997 #[doc = "< The color to clear the color target to at the start of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.\n"]
13998 pub clear_color: SDL_FColor,
13999 #[doc = "< What is done with the contents of the color target at the beginning of the render pass.\n"]
14000 pub load_op: SDL_GPULoadOp,
14001 #[doc = "< What is done with the results of the render pass.\n"]
14002 pub store_op: SDL_GPUStoreOp,
14003 #[doc = "< The texture that will receive the results of a multisample resolve operation. Ignored if a RESOLVE* store_op is not used.\n"]
14004 pub resolve_texture: *mut SDL_GPUTexture,
14005 #[doc = "< The mip level of the resolve texture to use for the resolve operation. Ignored if a RESOLVE* store_op is not used.\n"]
14006 pub resolve_mip_level: Uint32,
14007 #[doc = "< The layer index of the resolve texture to use for the resolve operation. Ignored if a RESOLVE* store_op is not used.\n"]
14008 pub resolve_layer: Uint32,
14009 #[doc = "< true cycles the texture if the texture is bound and load_op is not LOAD\n"]
14010 pub cycle: bool,
14011 #[doc = "< true cycles the resolve texture if the resolve texture is bound. Ignored if a RESOLVE* store_op is not used.\n"]
14012 pub cycle_resolve_texture: bool,
14013 pub padding1: Uint8,
14014 pub padding2: Uint8,
14015}
14016#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14017const _: () = {
14018 ["Size of SDL_GPUColorTargetInfo"][::core::mem::size_of::<SDL_GPUColorTargetInfo>() - 64usize];
14019 ["Alignment of SDL_GPUColorTargetInfo"]
14020 [::core::mem::align_of::<SDL_GPUColorTargetInfo>() - 8usize];
14021 ["Offset of field: SDL_GPUColorTargetInfo::texture"]
14022 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, texture) - 0usize];
14023 ["Offset of field: SDL_GPUColorTargetInfo::mip_level"]
14024 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, mip_level) - 8usize];
14025 ["Offset of field: SDL_GPUColorTargetInfo::layer_or_depth_plane"]
14026 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, layer_or_depth_plane) - 12usize];
14027 ["Offset of field: SDL_GPUColorTargetInfo::clear_color"]
14028 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, clear_color) - 16usize];
14029 ["Offset of field: SDL_GPUColorTargetInfo::load_op"]
14030 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, load_op) - 32usize];
14031 ["Offset of field: SDL_GPUColorTargetInfo::store_op"]
14032 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, store_op) - 36usize];
14033 ["Offset of field: SDL_GPUColorTargetInfo::resolve_texture"]
14034 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, resolve_texture) - 40usize];
14035 ["Offset of field: SDL_GPUColorTargetInfo::resolve_mip_level"]
14036 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, resolve_mip_level) - 48usize];
14037 ["Offset of field: SDL_GPUColorTargetInfo::resolve_layer"]
14038 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, resolve_layer) - 52usize];
14039 ["Offset of field: SDL_GPUColorTargetInfo::cycle"]
14040 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, cycle) - 56usize];
14041 ["Offset of field: SDL_GPUColorTargetInfo::cycle_resolve_texture"]
14042 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, cycle_resolve_texture) - 57usize];
14043 ["Offset of field: SDL_GPUColorTargetInfo::padding1"]
14044 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, padding1) - 58usize];
14045 ["Offset of field: SDL_GPUColorTargetInfo::padding2"]
14046 [::core::mem::offset_of!(SDL_GPUColorTargetInfo, padding2) - 59usize];
14047};
14048impl Default for SDL_GPUColorTargetInfo {
14049 fn default() -> Self {
14050 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14051 unsafe {
14052 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14053 s.assume_init()
14054 }
14055 }
14056}
14057#[doc = " A structure specifying the parameters of a depth-stencil target used by a\n render pass.\n\n The load_op field determines what is done with the depth contents of the\n texture at the beginning of the render pass.\n\n - LOAD: Loads the depth values currently in the texture.\n - CLEAR: Clears the texture to a single depth.\n - DONT_CARE: The driver will do whatever it wants with the memory. This is\n a good option if you know that every single pixel will be touched in the\n render pass.\n\n The store_op field determines what is done with the depth results of the\n render pass.\n\n - STORE: Stores the depth results in the texture.\n - DONT_CARE: The driver will do whatever it wants with the depth results.\n This is often a good option for depth/stencil textures that don't need to\n be reused again.\n\n The stencil_load_op field determines what is done with the stencil contents\n of the texture at the beginning of the render pass.\n\n - LOAD: Loads the stencil values currently in the texture.\n - CLEAR: Clears the stencil values to a single value.\n - DONT_CARE: The driver will do whatever it wants with the memory. This is\n a good option if you know that every single pixel will be touched in the\n render pass.\n\n The stencil_store_op field determines what is done with the stencil results\n of the render pass.\n\n - STORE: Stores the stencil results in the texture.\n - DONT_CARE: The driver will do whatever it wants with the stencil results.\n This is often a good option for depth/stencil textures that don't need to\n be reused again.\n\n Note that depth/stencil targets do not support multisample resolves.\n\n Due to ABI limitations, depth textures with more than 255 layers are not\n supported.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BeginGPURenderPass\n"]
14058#[repr(C)]
14059#[derive(Debug, Copy, Clone)]
14060pub struct SDL_GPUDepthStencilTargetInfo {
14061 #[doc = "< The texture that will be used as the depth stencil target by the render pass.\n"]
14062 pub texture: *mut SDL_GPUTexture,
14063 #[doc = "< The value to clear the depth component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.\n"]
14064 pub clear_depth: f32,
14065 #[doc = "< What is done with the depth contents at the beginning of the render pass.\n"]
14066 pub load_op: SDL_GPULoadOp,
14067 #[doc = "< What is done with the depth results of the render pass.\n"]
14068 pub store_op: SDL_GPUStoreOp,
14069 #[doc = "< What is done with the stencil contents at the beginning of the render pass.\n"]
14070 pub stencil_load_op: SDL_GPULoadOp,
14071 #[doc = "< What is done with the stencil results of the render pass.\n"]
14072 pub stencil_store_op: SDL_GPUStoreOp,
14073 #[doc = "< true cycles the texture if the texture is bound and any load ops are not LOAD\n"]
14074 pub cycle: bool,
14075 #[doc = "< The value to clear the stencil component to at the beginning of the render pass. Ignored if SDL_GPU_LOADOP_CLEAR is not used.\n"]
14076 pub clear_stencil: Uint8,
14077 #[doc = "< The mip level to use as the depth stencil target.\n"]
14078 pub mip_level: Uint8,
14079 #[doc = "< The layer index to use as the depth stencil target.\n"]
14080 pub layer: Uint8,
14081}
14082#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14083const _: () = {
14084 ["Size of SDL_GPUDepthStencilTargetInfo"]
14085 [::core::mem::size_of::<SDL_GPUDepthStencilTargetInfo>() - 32usize];
14086 ["Alignment of SDL_GPUDepthStencilTargetInfo"]
14087 [::core::mem::align_of::<SDL_GPUDepthStencilTargetInfo>() - 8usize];
14088 ["Offset of field: SDL_GPUDepthStencilTargetInfo::texture"]
14089 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, texture) - 0usize];
14090 ["Offset of field: SDL_GPUDepthStencilTargetInfo::clear_depth"]
14091 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, clear_depth) - 8usize];
14092 ["Offset of field: SDL_GPUDepthStencilTargetInfo::load_op"]
14093 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, load_op) - 12usize];
14094 ["Offset of field: SDL_GPUDepthStencilTargetInfo::store_op"]
14095 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, store_op) - 16usize];
14096 ["Offset of field: SDL_GPUDepthStencilTargetInfo::stencil_load_op"]
14097 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, stencil_load_op) - 20usize];
14098 ["Offset of field: SDL_GPUDepthStencilTargetInfo::stencil_store_op"]
14099 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, stencil_store_op) - 24usize];
14100 ["Offset of field: SDL_GPUDepthStencilTargetInfo::cycle"]
14101 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, cycle) - 28usize];
14102 ["Offset of field: SDL_GPUDepthStencilTargetInfo::clear_stencil"]
14103 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, clear_stencil) - 29usize];
14104 ["Offset of field: SDL_GPUDepthStencilTargetInfo::mip_level"]
14105 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, mip_level) - 30usize];
14106 ["Offset of field: SDL_GPUDepthStencilTargetInfo::layer"]
14107 [::core::mem::offset_of!(SDL_GPUDepthStencilTargetInfo, layer) - 31usize];
14108};
14109impl Default for SDL_GPUDepthStencilTargetInfo {
14110 fn default() -> Self {
14111 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14112 unsafe {
14113 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14114 s.assume_init()
14115 }
14116 }
14117}
14118#[doc = " A structure containing parameters for a blit command.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BlitGPUTexture\n"]
14119#[repr(C)]
14120#[derive(Debug, Copy, Clone)]
14121pub struct SDL_GPUBlitInfo {
14122 #[doc = "< The source region for the blit.\n"]
14123 pub source: SDL_GPUBlitRegion,
14124 #[doc = "< The destination region for the blit.\n"]
14125 pub destination: SDL_GPUBlitRegion,
14126 #[doc = "< What is done with the contents of the destination before the blit.\n"]
14127 pub load_op: SDL_GPULoadOp,
14128 #[doc = "< The color to clear the destination region to before the blit. Ignored if load_op is not SDL_GPU_LOADOP_CLEAR.\n"]
14129 pub clear_color: SDL_FColor,
14130 #[doc = "< The flip mode for the source region.\n"]
14131 pub flip_mode: SDL_FlipMode,
14132 #[doc = "< The filter mode used when blitting.\n"]
14133 pub filter: SDL_GPUFilter,
14134 #[doc = "< true cycles the destination texture if it is already bound.\n"]
14135 pub cycle: bool,
14136 pub padding1: Uint8,
14137 pub padding2: Uint8,
14138 pub padding3: Uint8,
14139}
14140#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14141const _: () = {
14142 ["Size of SDL_GPUBlitInfo"][::core::mem::size_of::<SDL_GPUBlitInfo>() - 96usize];
14143 ["Alignment of SDL_GPUBlitInfo"][::core::mem::align_of::<SDL_GPUBlitInfo>() - 8usize];
14144 ["Offset of field: SDL_GPUBlitInfo::source"]
14145 [::core::mem::offset_of!(SDL_GPUBlitInfo, source) - 0usize];
14146 ["Offset of field: SDL_GPUBlitInfo::destination"]
14147 [::core::mem::offset_of!(SDL_GPUBlitInfo, destination) - 32usize];
14148 ["Offset of field: SDL_GPUBlitInfo::load_op"]
14149 [::core::mem::offset_of!(SDL_GPUBlitInfo, load_op) - 64usize];
14150 ["Offset of field: SDL_GPUBlitInfo::clear_color"]
14151 [::core::mem::offset_of!(SDL_GPUBlitInfo, clear_color) - 68usize];
14152 ["Offset of field: SDL_GPUBlitInfo::flip_mode"]
14153 [::core::mem::offset_of!(SDL_GPUBlitInfo, flip_mode) - 84usize];
14154 ["Offset of field: SDL_GPUBlitInfo::filter"]
14155 [::core::mem::offset_of!(SDL_GPUBlitInfo, filter) - 88usize];
14156 ["Offset of field: SDL_GPUBlitInfo::cycle"]
14157 [::core::mem::offset_of!(SDL_GPUBlitInfo, cycle) - 92usize];
14158 ["Offset of field: SDL_GPUBlitInfo::padding1"]
14159 [::core::mem::offset_of!(SDL_GPUBlitInfo, padding1) - 93usize];
14160 ["Offset of field: SDL_GPUBlitInfo::padding2"]
14161 [::core::mem::offset_of!(SDL_GPUBlitInfo, padding2) - 94usize];
14162 ["Offset of field: SDL_GPUBlitInfo::padding3"]
14163 [::core::mem::offset_of!(SDL_GPUBlitInfo, padding3) - 95usize];
14164};
14165impl Default for SDL_GPUBlitInfo {
14166 fn default() -> Self {
14167 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14168 unsafe {
14169 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14170 s.assume_init()
14171 }
14172 }
14173}
14174#[doc = " A structure specifying parameters in a buffer binding call.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BindGPUVertexBuffers\n **See Also:** SDL_BindGPUIndexBuffer\n"]
14175#[repr(C)]
14176#[derive(Debug, Copy, Clone, Hash)]
14177pub struct SDL_GPUBufferBinding {
14178 #[doc = "< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_VERTEX for SDL_BindGPUVertexBuffers, or SDL_GPU_BUFFERUSAGE_INDEX for SDL_BindGPUIndexBuffer.\n"]
14179 pub buffer: *mut SDL_GPUBuffer,
14180 #[doc = "< The starting byte of the data to bind in the buffer.\n"]
14181 pub offset: Uint32,
14182}
14183#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14184const _: () = {
14185 ["Size of SDL_GPUBufferBinding"][::core::mem::size_of::<SDL_GPUBufferBinding>() - 16usize];
14186 ["Alignment of SDL_GPUBufferBinding"][::core::mem::align_of::<SDL_GPUBufferBinding>() - 8usize];
14187 ["Offset of field: SDL_GPUBufferBinding::buffer"]
14188 [::core::mem::offset_of!(SDL_GPUBufferBinding, buffer) - 0usize];
14189 ["Offset of field: SDL_GPUBufferBinding::offset"]
14190 [::core::mem::offset_of!(SDL_GPUBufferBinding, offset) - 8usize];
14191};
14192impl Default for SDL_GPUBufferBinding {
14193 fn default() -> Self {
14194 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14195 unsafe {
14196 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14197 s.assume_init()
14198 }
14199 }
14200}
14201#[doc = " A structure specifying parameters in a sampler binding call.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BindGPUVertexSamplers\n **See Also:** SDL_BindGPUFragmentSamplers\n **See Also:** SDL_GPUTexture\n **See Also:** SDL_GPUSampler\n"]
14202#[repr(C)]
14203#[derive(Debug, Copy, Clone, Hash)]
14204pub struct SDL_GPUTextureSamplerBinding {
14205 #[doc = "< The texture to bind. Must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.\n"]
14206 pub texture: *mut SDL_GPUTexture,
14207 #[doc = "< The sampler to bind.\n"]
14208 pub sampler: *mut SDL_GPUSampler,
14209}
14210#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14211const _: () = {
14212 ["Size of SDL_GPUTextureSamplerBinding"]
14213 [::core::mem::size_of::<SDL_GPUTextureSamplerBinding>() - 16usize];
14214 ["Alignment of SDL_GPUTextureSamplerBinding"]
14215 [::core::mem::align_of::<SDL_GPUTextureSamplerBinding>() - 8usize];
14216 ["Offset of field: SDL_GPUTextureSamplerBinding::texture"]
14217 [::core::mem::offset_of!(SDL_GPUTextureSamplerBinding, texture) - 0usize];
14218 ["Offset of field: SDL_GPUTextureSamplerBinding::sampler"]
14219 [::core::mem::offset_of!(SDL_GPUTextureSamplerBinding, sampler) - 8usize];
14220};
14221impl Default for SDL_GPUTextureSamplerBinding {
14222 fn default() -> Self {
14223 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14224 unsafe {
14225 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14226 s.assume_init()
14227 }
14228 }
14229}
14230#[doc = " A structure specifying parameters related to binding buffers in a compute\n pass.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BeginGPUComputePass\n"]
14231#[repr(C)]
14232#[derive(Debug, Copy, Clone, Hash)]
14233pub struct SDL_GPUStorageBufferReadWriteBinding {
14234 #[doc = "< The buffer to bind. Must have been created with SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE.\n"]
14235 pub buffer: *mut SDL_GPUBuffer,
14236 #[doc = "< true cycles the buffer if it is already bound.\n"]
14237 pub cycle: bool,
14238 pub padding1: Uint8,
14239 pub padding2: Uint8,
14240 pub padding3: Uint8,
14241}
14242#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14243const _: () = {
14244 ["Size of SDL_GPUStorageBufferReadWriteBinding"]
14245 [::core::mem::size_of::<SDL_GPUStorageBufferReadWriteBinding>() - 16usize];
14246 ["Alignment of SDL_GPUStorageBufferReadWriteBinding"]
14247 [::core::mem::align_of::<SDL_GPUStorageBufferReadWriteBinding>() - 8usize];
14248 ["Offset of field: SDL_GPUStorageBufferReadWriteBinding::buffer"]
14249 [::core::mem::offset_of!(SDL_GPUStorageBufferReadWriteBinding, buffer) - 0usize];
14250 ["Offset of field: SDL_GPUStorageBufferReadWriteBinding::cycle"]
14251 [::core::mem::offset_of!(SDL_GPUStorageBufferReadWriteBinding, cycle) - 8usize];
14252 ["Offset of field: SDL_GPUStorageBufferReadWriteBinding::padding1"]
14253 [::core::mem::offset_of!(SDL_GPUStorageBufferReadWriteBinding, padding1) - 9usize];
14254 ["Offset of field: SDL_GPUStorageBufferReadWriteBinding::padding2"]
14255 [::core::mem::offset_of!(SDL_GPUStorageBufferReadWriteBinding, padding2) - 10usize];
14256 ["Offset of field: SDL_GPUStorageBufferReadWriteBinding::padding3"]
14257 [::core::mem::offset_of!(SDL_GPUStorageBufferReadWriteBinding, padding3) - 11usize];
14258};
14259impl Default for SDL_GPUStorageBufferReadWriteBinding {
14260 fn default() -> Self {
14261 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14262 unsafe {
14263 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14264 s.assume_init()
14265 }
14266 }
14267}
14268#[doc = " A structure specifying parameters related to binding textures in a compute\n pass.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_BeginGPUComputePass\n"]
14269#[repr(C)]
14270#[derive(Debug, Copy, Clone, Hash)]
14271pub struct SDL_GPUStorageTextureReadWriteBinding {
14272 #[doc = "< The texture to bind. Must have been created with SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE or SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE.\n"]
14273 pub texture: *mut SDL_GPUTexture,
14274 #[doc = "< The mip level index to bind.\n"]
14275 pub mip_level: Uint32,
14276 #[doc = "< The layer index to bind.\n"]
14277 pub layer: Uint32,
14278 #[doc = "< true cycles the texture if it is already bound.\n"]
14279 pub cycle: bool,
14280 pub padding1: Uint8,
14281 pub padding2: Uint8,
14282 pub padding3: Uint8,
14283}
14284#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14285const _: () = {
14286 ["Size of SDL_GPUStorageTextureReadWriteBinding"]
14287 [::core::mem::size_of::<SDL_GPUStorageTextureReadWriteBinding>() - 24usize];
14288 ["Alignment of SDL_GPUStorageTextureReadWriteBinding"]
14289 [::core::mem::align_of::<SDL_GPUStorageTextureReadWriteBinding>() - 8usize];
14290 ["Offset of field: SDL_GPUStorageTextureReadWriteBinding::texture"]
14291 [::core::mem::offset_of!(SDL_GPUStorageTextureReadWriteBinding, texture) - 0usize];
14292 ["Offset of field: SDL_GPUStorageTextureReadWriteBinding::mip_level"]
14293 [::core::mem::offset_of!(SDL_GPUStorageTextureReadWriteBinding, mip_level) - 8usize];
14294 ["Offset of field: SDL_GPUStorageTextureReadWriteBinding::layer"]
14295 [::core::mem::offset_of!(SDL_GPUStorageTextureReadWriteBinding, layer) - 12usize];
14296 ["Offset of field: SDL_GPUStorageTextureReadWriteBinding::cycle"]
14297 [::core::mem::offset_of!(SDL_GPUStorageTextureReadWriteBinding, cycle) - 16usize];
14298 ["Offset of field: SDL_GPUStorageTextureReadWriteBinding::padding1"]
14299 [::core::mem::offset_of!(SDL_GPUStorageTextureReadWriteBinding, padding1) - 17usize];
14300 ["Offset of field: SDL_GPUStorageTextureReadWriteBinding::padding2"]
14301 [::core::mem::offset_of!(SDL_GPUStorageTextureReadWriteBinding, padding2) - 18usize];
14302 ["Offset of field: SDL_GPUStorageTextureReadWriteBinding::padding3"]
14303 [::core::mem::offset_of!(SDL_GPUStorageTextureReadWriteBinding, padding3) - 19usize];
14304};
14305impl Default for SDL_GPUStorageTextureReadWriteBinding {
14306 fn default() -> Self {
14307 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14308 unsafe {
14309 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14310 s.assume_init()
14311 }
14312 }
14313}
14314unsafe extern "C" {
14315 #[doc = " Checks for GPU runtime support.\n\n **Parameter:** format_flags a bitflag indicating which shader formats the app is\n able to provide.\n **Parameter:** name the preferred GPU driver, or NULL to let SDL pick the optimal\n driver.\n **Returns:** true if supported, false otherwise.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUDevice\n"]
14316 pub fn SDL_GPUSupportsShaderFormats(
14317 format_flags: SDL_GPUShaderFormat,
14318 name: *const core::ffi::c_char,
14319 ) -> bool;
14320}
14321unsafe extern "C" {
14322 #[doc = " Checks for GPU runtime support.\n\n **Parameter:** props the properties to use.\n **Returns:** true if supported, false otherwise.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUDeviceWithProperties\n"]
14323 pub fn SDL_GPUSupportsProperties(props: SDL_PropertiesID) -> bool;
14324}
14325unsafe extern "C" {
14326 #[doc = " Creates a GPU context.\n\n The GPU driver name can be one of the following:\n\n - \"vulkan\": [Vulkan](CategoryGPU#vulkan)\n - \"direct3d12\": [D3D12](CategoryGPU#d3d12)\n - \"metal\": [Metal](CategoryGPU#metal)\n - NULL: let SDL pick the optimal driver\n\n **Parameter:** format_flags a bitflag indicating which shader formats the app is\n able to provide.\n **Parameter:** debug_mode enable debug mode properties and validations.\n **Parameter:** name the preferred GPU driver, or NULL to let SDL pick the optimal\n driver.\n **Returns:** a GPU context on success or NULL on failure; call SDL_GetError()\n for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUDeviceWithProperties\n **See Also:** SDL_GetGPUShaderFormats\n **See Also:** SDL_GetGPUDeviceDriver\n **See Also:** SDL_DestroyGPUDevice\n **See Also:** SDL_GPUSupportsShaderFormats\n"]
14327 pub fn SDL_CreateGPUDevice(
14328 format_flags: SDL_GPUShaderFormat,
14329 debug_mode: bool,
14330 name: *const core::ffi::c_char,
14331 ) -> *mut SDL_GPUDevice;
14332}
14333unsafe extern "C" {
14334 #[doc = " Creates a GPU context.\n\n These are the supported properties:\n\n - `SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN`: enable debug mode\n properties and validations, defaults to true.\n - `SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN`: enable to prefer\n energy efficiency over maximum GPU performance, defaults to false.\n - `SDL_PROP_GPU_DEVICE_CREATE_VERBOSE_BOOLEAN`: enable to automatically log\n useful debug information on device creation, defaults to true.\n - `SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING`: the name of the GPU driver to\n use, if a specific one is desired.\n - `SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN`: Enable Vulkan\n device feature shaderClipDistance. If disabled, clip distances are not\n supported in shader code: gl_ClipDistance[] built-ins of GLSL,\n SV_ClipDistance0/1 semantics of HLSL and [[clip_distance]] attribute of\n Metal. Disabling optional features allows the application to run on some\n older Android devices. Defaults to true.\n - `SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN`: Enable\n Vulkan device feature depthClamp. If disabled, there is no depth clamp\n support and enable_depth_clip in SDL_GPURasterizerState must always be\n set to true. Disabling optional features allows the application to run on\n some older Android devices. Defaults to true.\n - `SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN`:\n Enable Vulkan device feature drawIndirectFirstInstance. If disabled, the\n argument first_instance of SDL_GPUIndirectDrawCommand must be set to\n zero. Disabling optional features allows the application to run on some\n older Android devices. Defaults to true.\n - `SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN`: Enable Vulkan\n device feature samplerAnisotropy. If disabled, enable_anisotropy of\n SDL_GPUSamplerCreateInfo must be set to false. Disabling optional\n features allows the application to run on some older Android devices.\n Defaults to true.\n\n These are the current shader format properties:\n\n - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN`: The app is able to\n provide shaders for an NDA platform.\n - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN`: The app is able to\n provide SPIR-V shaders if applicable.\n - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN`: The app is able to\n provide DXBC shaders if applicable\n - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN`: The app is able to\n provide DXIL shaders if applicable.\n - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN`: The app is able to\n provide MSL shaders if applicable.\n - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN`: The app is able to\n provide Metal shader libraries if applicable.\n\n With the D3D12 backend:\n\n - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING`: the prefix to\n use for all vertex semantics, default is \"TEXCOORD\".\n - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN`: By\n default, Resourcing Binding Tier 2 is required for D3D12 support.\n However, an application can set this property to true to enable Tier 1\n support, if (and only if) the application uses 8 or fewer storage\n resources across all shader stages. As of writing, this property is\n useful for targeting Intel Haswell and Broadwell GPUs; other hardware\n either supports Tier 2 Resource Binding or does not support D3D12 in any\n capacity. Defaults to false.\n - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER`: Certain\n feature checks are only possible on Windows 11 by default. By setting\n this alongside `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`\n and vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make\n those feature checks possible on older platforms. The version you provide\n must match the one given in the DLL.\n - `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_PATH_STRING`: Certain\n feature checks are only possible on Windows 11 by default. By setting\n this alongside\n `SDL_PROP_GPU_DEVICE_CREATE_D3D12_AGILITY_SDK_VERSION_NUMBER` and\n vendoring D3D12Core.dll from the D3D12 Agility SDK, you can make those\n feature checks possible on older platforms. The path you provide must be\n relative to the executable path of your app. Be sure not to put the DLL\n in the same directory as the exe; Microsoft strongly advises against\n this!\n\n With the Vulkan backend:\n\n - `SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN`:\n By default, Vulkan device enumeration includes drivers of all types,\n including software renderers (for example, the Lavapipe Mesa driver).\n This can be useful if your application _requires_ SDL_GPU, but if you can\n provide your own fallback renderer (for example, an OpenGL renderer) this\n property can be set to true. Defaults to false.\n - `SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER`: a pointer to an\n SDL_GPUVulkanOptions structure to be processed during device creation.\n This allows configuring a variety of Vulkan-specific options such as\n increasing the API version and opting into extensions aside from the\n minimal set SDL requires.\n\n With the Metal backend: -\n `SDL_PROP_GPU_DEVICE_CREATE_METAL_ALLOW_MACFAMILY1_BOOLEAN`: By default,\n macOS support requires what Apple calls \"MTLGPUFamilyMac2\" hardware or\n newer. However, an application can set this property to true to enable\n support for \"MTLGPUFamilyMac1\" hardware, if (and only if) the application\n does not write to sRGB textures. (For history's sake: MacFamily1 also does\n not support indirect command buffers, MSAA depth resolve, and stencil\n resolve/feedback, but these are not exposed features in SDL_GPU.)\n\n **Parameter:** props the properties to use.\n **Returns:** a GPU context on success or NULL on failure; call SDL_GetError()\n for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGPUShaderFormats\n **See Also:** SDL_GetGPUDeviceDriver\n **See Also:** SDL_DestroyGPUDevice\n **See Also:** SDL_GPUSupportsProperties\n"]
14335 pub fn SDL_CreateGPUDeviceWithProperties(props: SDL_PropertiesID) -> *mut SDL_GPUDevice;
14336}
14337#[doc = " A structure specifying additional options when using Vulkan.\n\n When no such structure is provided, SDL will use Vulkan API version 1.0 and\n a minimal set of features. The requested API version influences how the\n feature_list is processed by SDL. When requesting API version 1.0, the\n feature_list is ignored. Only the vulkan_10_physical_device_features and\n the extension lists are used. When requesting API version 1.1, the\n feature_list is scanned for feature structures introduced in Vulkan 1.1.\n When requesting Vulkan 1.2 or higher, the feature_list is additionally\n scanned for compound feature structs such as\n VkPhysicalDeviceVulkan11Features. The device and instance extension lists,\n as well as vulkan_10_physical_device_features, are always processed.\n\n **Available Since:** This struct is available since SDL 3.4.0.\n"]
14338#[repr(C)]
14339#[derive(Debug, Copy, Clone, Hash)]
14340pub struct SDL_GPUVulkanOptions {
14341 #[doc = "< The Vulkan API version to request for the instance. Use Vulkan's VK_MAKE_VERSION or VK_MAKE_API_VERSION.\n"]
14342 pub vulkan_api_version: Uint32,
14343 #[doc = "< Pointer to the first element of a chain of Vulkan feature structs. (Requires API version 1.1 or higher.)\n"]
14344 pub feature_list: *mut core::ffi::c_void,
14345 #[doc = "< Pointer to a VkPhysicalDeviceFeatures struct to enable additional Vulkan 1.0 features.\n"]
14346 pub vulkan_10_physical_device_features: *mut core::ffi::c_void,
14347 #[doc = "< Number of additional device extensions to require.\n"]
14348 pub device_extension_count: Uint32,
14349 #[doc = "< Pointer to a list of additional device extensions to require.\n"]
14350 pub device_extension_names: *mut *const core::ffi::c_char,
14351 #[doc = "< Number of additional instance extensions to require.\n"]
14352 pub instance_extension_count: Uint32,
14353 #[doc = "< Pointer to a list of additional instance extensions to require.\n"]
14354 pub instance_extension_names: *mut *const core::ffi::c_char,
14355}
14356#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14357const _: () = {
14358 ["Size of SDL_GPUVulkanOptions"][::core::mem::size_of::<SDL_GPUVulkanOptions>() - 56usize];
14359 ["Alignment of SDL_GPUVulkanOptions"][::core::mem::align_of::<SDL_GPUVulkanOptions>() - 8usize];
14360 ["Offset of field: SDL_GPUVulkanOptions::vulkan_api_version"]
14361 [::core::mem::offset_of!(SDL_GPUVulkanOptions, vulkan_api_version) - 0usize];
14362 ["Offset of field: SDL_GPUVulkanOptions::feature_list"]
14363 [::core::mem::offset_of!(SDL_GPUVulkanOptions, feature_list) - 8usize];
14364 ["Offset of field: SDL_GPUVulkanOptions::vulkan_10_physical_device_features"][::core::mem::offset_of!(
14365 SDL_GPUVulkanOptions,
14366 vulkan_10_physical_device_features
14367 ) - 16usize];
14368 ["Offset of field: SDL_GPUVulkanOptions::device_extension_count"]
14369 [::core::mem::offset_of!(SDL_GPUVulkanOptions, device_extension_count) - 24usize];
14370 ["Offset of field: SDL_GPUVulkanOptions::device_extension_names"]
14371 [::core::mem::offset_of!(SDL_GPUVulkanOptions, device_extension_names) - 32usize];
14372 ["Offset of field: SDL_GPUVulkanOptions::instance_extension_count"]
14373 [::core::mem::offset_of!(SDL_GPUVulkanOptions, instance_extension_count) - 40usize];
14374 ["Offset of field: SDL_GPUVulkanOptions::instance_extension_names"]
14375 [::core::mem::offset_of!(SDL_GPUVulkanOptions, instance_extension_names) - 48usize];
14376};
14377impl Default for SDL_GPUVulkanOptions {
14378 fn default() -> Self {
14379 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
14380 unsafe {
14381 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
14382 s.assume_init()
14383 }
14384 }
14385}
14386unsafe extern "C" {
14387 #[doc = " Destroys a GPU context previously returned by SDL_CreateGPUDevice.\n\n **Parameter:** device a GPU Context to destroy.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUDevice\n"]
14388 pub fn SDL_DestroyGPUDevice(device: *mut SDL_GPUDevice);
14389}
14390unsafe extern "C" {
14391 #[doc = " Get the number of GPU drivers compiled into SDL.\n\n **Returns:** the number of built in GPU drivers.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetGPUDriver\n"]
14392 pub fn SDL_GetNumGPUDrivers() -> core::ffi::c_int;
14393}
14394unsafe extern "C" {
14395 #[doc = " Get the name of a built in GPU driver.\n\n The GPU drivers are presented in the order in which they are normally\n checked during initialization.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"vulkan\",\n \"metal\" or \"direct3d12\". These never have Unicode characters, and are not\n meant to be proper names.\n\n **Parameter:** index the index of a GPU driver.\n **Returns:** the name of the GPU driver with the given **index**.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumGPUDrivers\n"]
14396 pub fn SDL_GetGPUDriver(index: core::ffi::c_int) -> *const core::ffi::c_char;
14397}
14398unsafe extern "C" {
14399 #[doc = " Returns the name of the backend used to create this GPU context.\n\n **Parameter:** device a GPU context to query.\n **Returns:** the name of the device's driver, or NULL on error.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14400 pub fn SDL_GetGPUDeviceDriver(device: *mut SDL_GPUDevice) -> *const core::ffi::c_char;
14401}
14402unsafe extern "C" {
14403 #[doc = " Returns the supported shader formats for this GPU context.\n\n **Parameter:** device a GPU context to query.\n **Returns:** a bitflag indicating which shader formats the driver is able to\n consume.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14404 pub fn SDL_GetGPUShaderFormats(device: *mut SDL_GPUDevice) -> SDL_GPUShaderFormat;
14405}
14406unsafe extern "C" {
14407 #[doc = " Get the properties associated with a GPU device.\n\n All properties are optional and may differ between GPU backends and SDL\n versions.\n\n The following properties are provided by SDL:\n\n `SDL_PROP_GPU_DEVICE_NAME_STRING`: Contains the name of the underlying\n device as reported by the system driver. This string has no standardized\n format, is highly inconsistent between hardware devices and drivers, and is\n able to change at any time. Do not attempt to parse this string as it is\n bound to fail at some point in the future when system drivers are updated,\n new hardware devices are introduced, or when SDL adds new GPU backends or\n modifies existing ones.\n\n Strings that have been found in the wild include:\n\n - GTX 970\n - GeForce GTX 970\n - NVIDIA GeForce GTX 970\n - Microsoft Direct3D12 (NVIDIA GeForce GTX 970)\n - NVIDIA Graphics Device\n - GeForce GPU\n - P106-100\n - AMD 15D8:C9\n - AMD Custom GPU 0405\n - AMD Radeon (TM) Graphics\n - ASUS Radeon RX 470 Series\n - Intel(R) Arc(tm) A380 Graphics (DG2)\n - Virtio-GPU Venus (NVIDIA TITAN V)\n - SwiftShader Device (LLVM 16.0.0)\n - llvmpipe (LLVM 15.0.4, 256 bits)\n - Microsoft Basic Render Driver\n - unknown device\n\n The above list shows that the same device can have different formats, the\n vendor name may or may not appear in the string, the included vendor name\n may not be the vendor of the chipset on the device, some manufacturers\n include pseudo-legal marks while others don't, some devices may not use a\n marketing name in the string, the device string may be wrapped by the name\n of a translation interface, the device may be emulated in software, or the\n string may contain generic text that does not identify the device at all.\n\n `SDL_PROP_GPU_DEVICE_DRIVER_NAME_STRING`: Contains the self-reported name\n of the underlying system driver.\n\n Strings that have been found in the wild include:\n\n - Intel Corporation\n - Intel open-source Mesa driver\n - Qualcomm Technologies Inc. Adreno Vulkan Driver\n - MoltenVK\n - Mali-G715\n - venus\n\n `SDL_PROP_GPU_DEVICE_DRIVER_VERSION_STRING`: Contains the self-reported\n version of the underlying system driver. This is a relatively short version\n string in an unspecified format. If SDL_PROP_GPU_DEVICE_DRIVER_INFO_STRING\n is available then that property should be preferred over this one as it may\n contain additional information that is useful for identifying the exact\n driver version used.\n\n Strings that have been found in the wild include:\n\n - 53.0.0\n - 0.405.2463\n - 32.0.15.6614\n\n `SDL_PROP_GPU_DEVICE_DRIVER_INFO_STRING`: Contains the detailed version\n information of the underlying system driver as reported by the driver. This\n is an arbitrary string with no standardized format and it may contain\n newlines. This property should be preferred over\n SDL_PROP_GPU_DEVICE_DRIVER_VERSION_STRING if it is available as it usually\n contains the same information but in a format that is easier to read.\n\n Strings that have been found in the wild include:\n\n - 101.6559\n - 1.2.11\n - Mesa 21.2.2 (LLVM 12.0.1)\n - Mesa 22.2.0-devel (git-f226222 2022-04-14 impish-oibaf-ppa)\n - v1.r53p0-00eac0.824c4f31403fb1fbf8ee1042422c2129\n\n This string has also been observed to be a multiline string (which has a\n trailing newline):\n\n ```\n Driver Build: 85da404, I46ff5fc46f, 1606794520\n Date: 11/30/20\n Compiler Version: EV031.31.04.01\n Driver Branch: promo490_3_Google\n ```\n\n **Parameter:** device a GPU context to query.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
14408 pub fn SDL_GetGPUDeviceProperties(device: *mut SDL_GPUDevice) -> SDL_PropertiesID;
14409}
14410unsafe extern "C" {
14411 #[doc = " Creates a pipeline object to be used in a compute workflow.\n\n Shader resource bindings must be authored to follow a particular order\n depending on the shader format.\n\n For SPIR-V shaders, use the following resource sets:\n\n - 0: Sampled textures, followed by read-only storage textures, followed by\n read-only storage buffers\n - 1: Read-write storage textures, followed by read-write storage buffers\n - 2: Uniform buffers\n\n For DXBC and DXIL shaders, use the following register order:\n\n - (t[n], space0): Sampled textures, followed by read-only storage textures,\n followed by read-only storage buffers\n - (u[n], space1): Read-write storage textures, followed by read-write\n storage buffers\n - (b[n], space2): Uniform buffers\n\n For MSL/metallib, use the following order:\n\n - [[buffer]]: Uniform buffers, followed by read-only storage buffers,\n followed by read-write storage buffers\n - [[texture]]: Sampled textures, followed by read-only storage textures,\n followed by read-write storage textures\n\n There are optional properties that can be provided through `props`. These\n are the supported properties:\n\n - `SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING`: a name that can be\n displayed in debugging tools.\n\n **Parameter:** device a GPU Context.\n **Parameter:** createinfo a struct describing the state of the compute pipeline to\n create.\n **Returns:** a compute pipeline object on success, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BindGPUComputePipeline\n **See Also:** SDL_ReleaseGPUComputePipeline\n"]
14412 pub fn SDL_CreateGPUComputePipeline(
14413 device: *mut SDL_GPUDevice,
14414 createinfo: *const SDL_GPUComputePipelineCreateInfo,
14415 ) -> *mut SDL_GPUComputePipeline;
14416}
14417unsafe extern "C" {
14418 #[doc = " Creates a pipeline object to be used in a graphics workflow.\n\n There are optional properties that can be provided through `props`. These\n are the supported properties:\n\n - `SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING`: a name that can be\n displayed in debugging tools.\n\n **Parameter:** device a GPU Context.\n **Parameter:** createinfo a struct describing the state of the graphics pipeline to\n create.\n **Returns:** a graphics pipeline object on success, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n **See Also:** SDL_BindGPUGraphicsPipeline\n **See Also:** SDL_ReleaseGPUGraphicsPipeline\n"]
14419 pub fn SDL_CreateGPUGraphicsPipeline(
14420 device: *mut SDL_GPUDevice,
14421 createinfo: *const SDL_GPUGraphicsPipelineCreateInfo,
14422 ) -> *mut SDL_GPUGraphicsPipeline;
14423}
14424unsafe extern "C" {
14425 #[doc = " Creates a sampler object to be used when binding textures in a graphics\n workflow.\n\n There are optional properties that can be provided through `props`. These\n are the supported properties:\n\n - `SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING`: a name that can be displayed\n in debugging tools.\n\n **Parameter:** device a GPU Context.\n **Parameter:** createinfo a struct describing the state of the sampler to create.\n **Returns:** a sampler object on success, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_BindGPUVertexSamplers\n **See Also:** SDL_BindGPUFragmentSamplers\n **See Also:** SDL_ReleaseGPUSampler\n"]
14426 pub fn SDL_CreateGPUSampler(
14427 device: *mut SDL_GPUDevice,
14428 createinfo: *const SDL_GPUSamplerCreateInfo,
14429 ) -> *mut SDL_GPUSampler;
14430}
14431unsafe extern "C" {
14432 #[doc = " Creates a shader to be used when creating a graphics pipeline.\n\n Shader resource bindings must be authored to follow a particular order\n depending on the shader format.\n\n For SPIR-V shaders, use the following resource sets:\n\n For vertex shaders:\n\n - 0: Sampled textures, followed by storage textures, followed by storage\n buffers\n - 1: Uniform buffers\n\n For fragment shaders:\n\n - 2: Sampled textures, followed by storage textures, followed by storage\n buffers\n - 3: Uniform buffers\n\n For DXBC and DXIL shaders, use the following register order:\n\n For vertex shaders:\n\n - (t[n], space0): Sampled textures, followed by storage textures, followed\n by storage buffers\n - (s[n], space0): Samplers with indices corresponding to the sampled\n textures\n - (b[n], space1): Uniform buffers\n\n For pixel shaders:\n\n - (t[n], space2): Sampled textures, followed by storage textures, followed\n by storage buffers\n - (s[n], space2): Samplers with indices corresponding to the sampled\n textures\n - (b[n], space3): Uniform buffers\n\n For MSL/metallib, use the following order:\n\n - [[texture]]: Sampled textures, followed by storage textures\n - [[sampler]]: Samplers with indices corresponding to the sampled textures\n - [[buffer]]: Uniform buffers, followed by storage buffers. Vertex buffer 0\n is bound at [[buffer(14)]], vertex buffer 1 at [[buffer(15)]], and so on.\n Rather than manually authoring vertex buffer indices, use the\n [[stage_in]] attribute which will automatically use the vertex input\n information from the SDL_GPUGraphicsPipeline.\n\n Shader semantics other than system-value semantics do not matter in D3D12\n and for ease of use the SDL implementation assumes that non system-value\n semantics will all be TEXCOORD. If you are using HLSL as the shader source\n language, your vertex semantics should start at TEXCOORD0 and increment\n like so: TEXCOORD1, TEXCOORD2, etc. If you wish to change the semantic\n prefix to something other than TEXCOORD you can use\n SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING with\n SDL_CreateGPUDeviceWithProperties().\n\n There are optional properties that can be provided through `props`. These\n are the supported properties:\n\n - `SDL_PROP_GPU_SHADER_CREATE_NAME_STRING`: a name that can be displayed in\n debugging tools.\n\n **Parameter:** device a GPU Context.\n **Parameter:** createinfo a struct describing the state of the shader to create.\n **Returns:** a shader object on success, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUGraphicsPipeline\n **See Also:** SDL_ReleaseGPUShader\n"]
14433 pub fn SDL_CreateGPUShader(
14434 device: *mut SDL_GPUDevice,
14435 createinfo: *const SDL_GPUShaderCreateInfo,
14436 ) -> *mut SDL_GPUShader;
14437}
14438unsafe extern "C" {
14439 #[doc = " Creates a texture object to be used in graphics or compute workflows.\n\n The contents of this texture are undefined until data is written to the\n texture, either via SDL_UploadToGPUTexture or by performing a render or\n compute pass with this texture as a target.\n\n Note that certain combinations of usage flags are invalid. For example, a\n texture cannot have both the SAMPLER and GRAPHICS_STORAGE_READ flags.\n\n If you request a sample count higher than the hardware supports, the\n implementation will automatically fall back to the highest available sample\n count.\n\n There are optional properties that can be provided through\n SDL_GPUTextureCreateInfo's `props`. These are the supported properties:\n\n - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT`: (Direct3D 12 only) if\n the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture\n to a color with this red intensity. Defaults to zero.\n - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT`: (Direct3D 12 only) if\n the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture\n to a color with this green intensity. Defaults to zero.\n - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT`: (Direct3D 12 only) if\n the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture\n to a color with this blue intensity. Defaults to zero.\n - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT`: (Direct3D 12 only) if\n the texture usage is SDL_GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture\n to a color with this alpha intensity. Defaults to zero.\n - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT`: (Direct3D 12 only)\n if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear\n the texture to a depth of this value. Defaults to zero.\n - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER`: (Direct3D 12\n only) if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET,\n clear the texture to a stencil of this Uint8 value. Defaults to zero.\n - `SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING`: a name that can be displayed\n in debugging tools.\n\n **Parameter:** device a GPU Context.\n **Parameter:** createinfo a struct describing the state of the texture to create.\n **Returns:** a texture object on success, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUTexture\n **See Also:** SDL_DownloadFromGPUTexture\n **See Also:** SDL_BeginGPURenderPass\n **See Also:** SDL_BeginGPUComputePass\n **See Also:** SDL_BindGPUVertexSamplers\n **See Also:** SDL_BindGPUVertexStorageTextures\n **See Also:** SDL_BindGPUFragmentSamplers\n **See Also:** SDL_BindGPUFragmentStorageTextures\n **See Also:** SDL_BindGPUComputeStorageTextures\n **See Also:** SDL_BlitGPUTexture\n **See Also:** SDL_ReleaseGPUTexture\n **See Also:** SDL_GPUTextureSupportsFormat\n"]
14440 pub fn SDL_CreateGPUTexture(
14441 device: *mut SDL_GPUDevice,
14442 createinfo: *const SDL_GPUTextureCreateInfo,
14443 ) -> *mut SDL_GPUTexture;
14444}
14445unsafe extern "C" {
14446 #[doc = " Creates a buffer object to be used in graphics or compute workflows.\n\n The contents of this buffer are undefined until data is written to the\n buffer.\n\n Note that certain combinations of usage flags are invalid. For example, a\n buffer cannot have both the VERTEX and INDEX flags.\n\n If you use a STORAGE flag, the data in the buffer must respect std140\n layout conventions. In practical terms this means you must ensure that vec3\n and vec4 fields are 16-byte aligned.\n\n For better understanding of underlying concepts and memory management with\n SDL GPU API, you may refer\n [this blog post](https://moonside.games/posts/sdl-gpu-concepts-cycling/)\n .\n\n There are optional properties that can be provided through `props`. These\n are the supported properties:\n\n - `SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING`: a name that can be displayed in\n debugging tools.\n\n **Parameter:** device a GPU Context.\n **Parameter:** createinfo a struct describing the state of the buffer to create.\n **Returns:** a buffer object on success, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUBuffer\n **See Also:** SDL_DownloadFromGPUBuffer\n **See Also:** SDL_CopyGPUBufferToBuffer\n **See Also:** SDL_BindGPUVertexBuffers\n **See Also:** SDL_BindGPUIndexBuffer\n **See Also:** SDL_BindGPUVertexStorageBuffers\n **See Also:** SDL_BindGPUFragmentStorageBuffers\n **See Also:** SDL_DrawGPUPrimitivesIndirect\n **See Also:** SDL_DrawGPUIndexedPrimitivesIndirect\n **See Also:** SDL_BindGPUComputeStorageBuffers\n **See Also:** SDL_DispatchGPUComputeIndirect\n **See Also:** SDL_ReleaseGPUBuffer\n"]
14447 pub fn SDL_CreateGPUBuffer(
14448 device: *mut SDL_GPUDevice,
14449 createinfo: *const SDL_GPUBufferCreateInfo,
14450 ) -> *mut SDL_GPUBuffer;
14451}
14452unsafe extern "C" {
14453 #[doc = " Creates a transfer buffer to be used when uploading to or downloading from\n graphics resources.\n\n Download buffers can be particularly expensive to create, so it is good\n practice to reuse them if data will be downloaded regularly.\n\n There are optional properties that can be provided through `props`. These\n are the supported properties:\n\n - `SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING`: a name that can be\n displayed in debugging tools.\n\n **Parameter:** device a GPU Context.\n **Parameter:** createinfo a struct describing the state of the transfer buffer to\n create.\n **Returns:** a transfer buffer on success, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUBuffer\n **See Also:** SDL_DownloadFromGPUBuffer\n **See Also:** SDL_UploadToGPUTexture\n **See Also:** SDL_DownloadFromGPUTexture\n **See Also:** SDL_ReleaseGPUTransferBuffer\n"]
14454 pub fn SDL_CreateGPUTransferBuffer(
14455 device: *mut SDL_GPUDevice,
14456 createinfo: *const SDL_GPUTransferBufferCreateInfo,
14457 ) -> *mut SDL_GPUTransferBuffer;
14458}
14459unsafe extern "C" {
14460 #[doc = " Sets an arbitrary string constant to label a buffer.\n\n You should use SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING with\n SDL_CreateGPUBuffer instead of this function to avoid thread safety issues.\n\n **Parameter:** device a GPU Context.\n **Parameter:** buffer a buffer to attach the name to.\n **Parameter:** text a UTF-8 string constant to mark as the name of the buffer.\n\n **Thread Safety:** This function is not thread safe, you must make sure the\n buffer is not simultaneously used by any other thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUBuffer\n"]
14461 pub fn SDL_SetGPUBufferName(
14462 device: *mut SDL_GPUDevice,
14463 buffer: *mut SDL_GPUBuffer,
14464 text: *const core::ffi::c_char,
14465 );
14466}
14467unsafe extern "C" {
14468 #[doc = " Sets an arbitrary string constant to label a texture.\n\n You should use SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING with\n SDL_CreateGPUTexture instead of this function to avoid thread safety\n issues.\n\n **Parameter:** device a GPU Context.\n **Parameter:** texture a texture to attach the name to.\n **Parameter:** text a UTF-8 string constant to mark as the name of the texture.\n\n **Thread Safety:** This function is not thread safe, you must make sure the\n texture is not simultaneously used by any other thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUTexture\n"]
14469 pub fn SDL_SetGPUTextureName(
14470 device: *mut SDL_GPUDevice,
14471 texture: *mut SDL_GPUTexture,
14472 text: *const core::ffi::c_char,
14473 );
14474}
14475unsafe extern "C" {
14476 #[doc = " Inserts an arbitrary string label into the command buffer callstream.\n\n Useful for debugging.\n\n On Direct3D 12, using SDL_InsertGPUDebugLabel requires\n WinPixEventRuntime.dll to be in your PATH or in the same directory as your\n executable. See\n [here](https://devblogs.microsoft.com/pix/winpixeventruntime/)\n for instructions on how to obtain it.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** text a UTF-8 string constant to insert as the label.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14477 pub fn SDL_InsertGPUDebugLabel(
14478 command_buffer: *mut SDL_GPUCommandBuffer,
14479 text: *const core::ffi::c_char,
14480 );
14481}
14482unsafe extern "C" {
14483 #[doc = " Begins a debug group with an arbitrary name.\n\n Used for denoting groups of calls when viewing the command buffer\n callstream in a graphics debugging tool.\n\n Each call to SDL_PushGPUDebugGroup must have a corresponding call to\n SDL_PopGPUDebugGroup.\n\n On Direct3D 12, using SDL_PushGPUDebugGroup requires WinPixEventRuntime.dll\n to be in your PATH or in the same directory as your executable. See\n [here](https://devblogs.microsoft.com/pix/winpixeventruntime/)\n for instructions on how to obtain it.\n\n On some backends (e.g. Metal), pushing a debug group during a\n render/blit/compute pass will create a group that is scoped to the native\n pass rather than the command buffer. For best results, if you push a debug\n group during a pass, always pop it in the same pass.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** name a UTF-8 string constant that names the group.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PopGPUDebugGroup\n"]
14484 pub fn SDL_PushGPUDebugGroup(
14485 command_buffer: *mut SDL_GPUCommandBuffer,
14486 name: *const core::ffi::c_char,
14487 );
14488}
14489unsafe extern "C" {
14490 #[doc = " Ends the most-recently pushed debug group.\n\n On Direct3D 12, using SDL_PopGPUDebugGroup requires WinPixEventRuntime.dll\n to be in your PATH or in the same directory as your executable. See\n [here](https://devblogs.microsoft.com/pix/winpixeventruntime/)\n for instructions on how to obtain it.\n\n **Parameter:** command_buffer a command buffer.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PushGPUDebugGroup\n"]
14491 pub fn SDL_PopGPUDebugGroup(command_buffer: *mut SDL_GPUCommandBuffer);
14492}
14493unsafe extern "C" {
14494 #[doc = " Frees the given texture as soon as it is safe to do so.\n\n You must not reference the texture after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** texture a texture to be destroyed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14495 pub fn SDL_ReleaseGPUTexture(device: *mut SDL_GPUDevice, texture: *mut SDL_GPUTexture);
14496}
14497unsafe extern "C" {
14498 #[doc = " Frees the given sampler as soon as it is safe to do so.\n\n You must not reference the sampler after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** sampler a sampler to be destroyed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14499 pub fn SDL_ReleaseGPUSampler(device: *mut SDL_GPUDevice, sampler: *mut SDL_GPUSampler);
14500}
14501unsafe extern "C" {
14502 #[doc = " Frees the given buffer as soon as it is safe to do so.\n\n You must not reference the buffer after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** buffer a buffer to be destroyed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14503 pub fn SDL_ReleaseGPUBuffer(device: *mut SDL_GPUDevice, buffer: *mut SDL_GPUBuffer);
14504}
14505unsafe extern "C" {
14506 #[doc = " Frees the given transfer buffer as soon as it is safe to do so.\n\n You must not reference the transfer buffer after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** transfer_buffer a transfer buffer to be destroyed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14507 pub fn SDL_ReleaseGPUTransferBuffer(
14508 device: *mut SDL_GPUDevice,
14509 transfer_buffer: *mut SDL_GPUTransferBuffer,
14510 );
14511}
14512unsafe extern "C" {
14513 #[doc = " Frees the given compute pipeline as soon as it is safe to do so.\n\n You must not reference the compute pipeline after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** compute_pipeline a compute pipeline to be destroyed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14514 pub fn SDL_ReleaseGPUComputePipeline(
14515 device: *mut SDL_GPUDevice,
14516 compute_pipeline: *mut SDL_GPUComputePipeline,
14517 );
14518}
14519unsafe extern "C" {
14520 #[doc = " Frees the given shader as soon as it is safe to do so.\n\n You must not reference the shader after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** shader a shader to be destroyed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14521 pub fn SDL_ReleaseGPUShader(device: *mut SDL_GPUDevice, shader: *mut SDL_GPUShader);
14522}
14523unsafe extern "C" {
14524 #[doc = " Frees the given graphics pipeline as soon as it is safe to do so.\n\n You must not reference the graphics pipeline after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** graphics_pipeline a graphics pipeline to be destroyed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14525 pub fn SDL_ReleaseGPUGraphicsPipeline(
14526 device: *mut SDL_GPUDevice,
14527 graphics_pipeline: *mut SDL_GPUGraphicsPipeline,
14528 );
14529}
14530unsafe extern "C" {
14531 #[doc = " Acquire a command buffer.\n\n This command buffer is managed by the implementation and should not be\n freed by the user. The command buffer may only be used on the thread it was\n acquired on. The command buffer should be submitted on the thread it was\n acquired on.\n\n It is valid to acquire multiple command buffers on the same thread at once.\n In fact a common design pattern is to acquire two command buffers per frame\n where one is dedicated to render and compute passes and the other is\n dedicated to copy passes and other preparatory work such as generating\n mipmaps. Interleaving commands between the two command buffers reduces the\n total amount of passes overall which improves rendering performance.\n\n **Parameter:** device a GPU context.\n **Returns:** a command buffer, or NULL on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SubmitGPUCommandBuffer\n **See Also:** SDL_SubmitGPUCommandBufferAndAcquireFence\n"]
14532 pub fn SDL_AcquireGPUCommandBuffer(device: *mut SDL_GPUDevice) -> *mut SDL_GPUCommandBuffer;
14533}
14534unsafe extern "C" {
14535 #[doc = " Pushes data to a vertex uniform slot on the command buffer.\n\n Subsequent draw calls in this command buffer will use this uniform data.\n\n The data being pushed must respect std140 layout conventions. In practical\n terms this means you must ensure that vec3 and vec4 fields are 16-byte\n aligned.\n\n For detailed information about accessing uniform data from a shader, please\n refer to SDL_CreateGPUShader.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** slot_index the vertex uniform slot to push data to.\n **Parameter:** data client data to write.\n **Parameter:** length the length of the data to write.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14536 pub fn SDL_PushGPUVertexUniformData(
14537 command_buffer: *mut SDL_GPUCommandBuffer,
14538 slot_index: Uint32,
14539 data: *const core::ffi::c_void,
14540 length: Uint32,
14541 );
14542}
14543unsafe extern "C" {
14544 #[doc = " Pushes data to a fragment uniform slot on the command buffer.\n\n Subsequent draw calls in this command buffer will use this uniform data.\n\n The data being pushed must respect std140 layout conventions. In practical\n terms this means you must ensure that vec3 and vec4 fields are 16-byte\n aligned.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** slot_index the fragment uniform slot to push data to.\n **Parameter:** data client data to write.\n **Parameter:** length the length of the data to write.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14545 pub fn SDL_PushGPUFragmentUniformData(
14546 command_buffer: *mut SDL_GPUCommandBuffer,
14547 slot_index: Uint32,
14548 data: *const core::ffi::c_void,
14549 length: Uint32,
14550 );
14551}
14552unsafe extern "C" {
14553 #[doc = " Pushes data to a uniform slot on the command buffer.\n\n Subsequent draw calls in this command buffer will use this uniform data.\n\n The data being pushed must respect std140 layout conventions. In practical\n terms this means you must ensure that vec3 and vec4 fields are 16-byte\n aligned.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** slot_index the uniform slot to push data to.\n **Parameter:** data client data to write.\n **Parameter:** length the length of the data to write.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14554 pub fn SDL_PushGPUComputeUniformData(
14555 command_buffer: *mut SDL_GPUCommandBuffer,
14556 slot_index: Uint32,
14557 data: *const core::ffi::c_void,
14558 length: Uint32,
14559 );
14560}
14561unsafe extern "C" {
14562 #[doc = " Begins a render pass on a command buffer.\n\n A render pass consists of a set of texture subresources (or depth slices in\n the 3D texture case) which will be rendered to during the render pass,\n along with corresponding clear values and load/store operations. All\n operations related to graphics pipelines must take place inside of a render\n pass. A default viewport and scissor state are automatically set when this\n is called. You cannot begin another render pass, or begin a compute pass or\n copy pass until you have ended the render pass.\n\n Using SDL_GPU_LOADOP_LOAD before any contents have been written to the\n texture subresource will result in undefined behavior. SDL_GPU_LOADOP_CLEAR\n will set the contents of the texture subresource to a single value before\n any rendering is performed. It's fine to do an empty render pass using\n SDL_GPU_STOREOP_STORE to clear a texture, but in general it's better to\n think of clearing not as an independent operation but as something that's\n done as the beginning of a render pass.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** color_target_infos an array of texture subresources with\n corresponding clear values and load/store ops.\n **Parameter:** num_color_targets the number of color targets in the\n color_target_infos array.\n **Parameter:** depth_stencil_target_info a texture subresource with corresponding\n clear value and load/store ops, may be\n NULL.\n **Returns:** a render pass handle.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_EndGPURenderPass\n"]
14563 pub fn SDL_BeginGPURenderPass(
14564 command_buffer: *mut SDL_GPUCommandBuffer,
14565 color_target_infos: *const SDL_GPUColorTargetInfo,
14566 num_color_targets: Uint32,
14567 depth_stencil_target_info: *const SDL_GPUDepthStencilTargetInfo,
14568 ) -> *mut SDL_GPURenderPass;
14569}
14570unsafe extern "C" {
14571 #[doc = " Binds a graphics pipeline on a render pass to be used in rendering.\n\n A graphics pipeline must be bound before making any draw calls.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** graphics_pipeline the graphics pipeline to bind.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14572 pub fn SDL_BindGPUGraphicsPipeline(
14573 render_pass: *mut SDL_GPURenderPass,
14574 graphics_pipeline: *mut SDL_GPUGraphicsPipeline,
14575 );
14576}
14577unsafe extern "C" {
14578 #[doc = " Sets the current viewport state on a command buffer.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** viewport the viewport to set.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14579 pub fn SDL_SetGPUViewport(
14580 render_pass: *mut SDL_GPURenderPass,
14581 viewport: *const SDL_GPUViewport,
14582 );
14583}
14584unsafe extern "C" {
14585 #[doc = " Sets the current scissor state on a command buffer.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** scissor the scissor area to set.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14586 pub fn SDL_SetGPUScissor(render_pass: *mut SDL_GPURenderPass, scissor: *const SDL_Rect);
14587}
14588unsafe extern "C" {
14589 #[doc = " Sets the current blend constants on a command buffer.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** blend_constants the blend constant color.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GPU_BLENDFACTOR_CONSTANT_COLOR\n **See Also:** SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR\n"]
14590 pub fn SDL_SetGPUBlendConstants(
14591 render_pass: *mut SDL_GPURenderPass,
14592 blend_constants: SDL_FColor,
14593 );
14594}
14595unsafe extern "C" {
14596 #[doc = " Sets the current stencil reference value on a command buffer.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** reference the stencil reference value to set.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14597 pub fn SDL_SetGPUStencilReference(render_pass: *mut SDL_GPURenderPass, reference: Uint8);
14598}
14599unsafe extern "C" {
14600 #[doc = " Binds vertex buffers on a command buffer for use with subsequent draw\n calls.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** first_slot the vertex buffer slot to begin binding from.\n **Parameter:** bindings an array of SDL_GPUBufferBinding structs containing vertex\n buffers and offset values.\n **Parameter:** num_bindings the number of bindings in the bindings array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14601 pub fn SDL_BindGPUVertexBuffers(
14602 render_pass: *mut SDL_GPURenderPass,
14603 first_slot: Uint32,
14604 bindings: *const SDL_GPUBufferBinding,
14605 num_bindings: Uint32,
14606 );
14607}
14608unsafe extern "C" {
14609 #[doc = " Binds an index buffer on a command buffer for use with subsequent draw\n calls.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** binding a pointer to a struct containing an index buffer and offset.\n **Parameter:** index_element_size whether the index values in the buffer are 16- or\n 32-bit.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14610 pub fn SDL_BindGPUIndexBuffer(
14611 render_pass: *mut SDL_GPURenderPass,
14612 binding: *const SDL_GPUBufferBinding,
14613 index_element_size: SDL_GPUIndexElementSize,
14614 );
14615}
14616unsafe extern "C" {
14617 #[doc = " Binds texture-sampler pairs for use on the vertex shader.\n\n The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUShader().\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** first_slot the vertex sampler slot to begin binding from.\n **Parameter:** texture_sampler_bindings an array of texture-sampler binding\n structs.\n **Parameter:** num_bindings the number of texture-sampler pairs to bind from the\n array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
14618 pub fn SDL_BindGPUVertexSamplers(
14619 render_pass: *mut SDL_GPURenderPass,
14620 first_slot: Uint32,
14621 texture_sampler_bindings: *const SDL_GPUTextureSamplerBinding,
14622 num_bindings: Uint32,
14623 );
14624}
14625unsafe extern "C" {
14626 #[doc = " Binds storage textures for use on the vertex shader.\n\n These textures must have been created with\n SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUShader().\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** first_slot the vertex storage texture slot to begin binding from.\n **Parameter:** storage_textures an array of storage textures.\n **Parameter:** num_bindings the number of storage texture to bind from the array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
14627 pub fn SDL_BindGPUVertexStorageTextures(
14628 render_pass: *mut SDL_GPURenderPass,
14629 first_slot: Uint32,
14630 storage_textures: *const *mut SDL_GPUTexture,
14631 num_bindings: Uint32,
14632 );
14633}
14634unsafe extern "C" {
14635 #[doc = " Binds storage buffers for use on the vertex shader.\n\n These buffers must have been created with\n SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUShader().\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** first_slot the vertex storage buffer slot to begin binding from.\n **Parameter:** storage_buffers an array of buffers.\n **Parameter:** num_bindings the number of buffers to bind from the array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
14636 pub fn SDL_BindGPUVertexStorageBuffers(
14637 render_pass: *mut SDL_GPURenderPass,
14638 first_slot: Uint32,
14639 storage_buffers: *const *mut SDL_GPUBuffer,
14640 num_bindings: Uint32,
14641 );
14642}
14643unsafe extern "C" {
14644 #[doc = " Binds texture-sampler pairs for use on the fragment shader.\n\n The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUShader().\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** first_slot the fragment sampler slot to begin binding from.\n **Parameter:** texture_sampler_bindings an array of texture-sampler binding\n structs.\n **Parameter:** num_bindings the number of texture-sampler pairs to bind from the\n array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
14645 pub fn SDL_BindGPUFragmentSamplers(
14646 render_pass: *mut SDL_GPURenderPass,
14647 first_slot: Uint32,
14648 texture_sampler_bindings: *const SDL_GPUTextureSamplerBinding,
14649 num_bindings: Uint32,
14650 );
14651}
14652unsafe extern "C" {
14653 #[doc = " Binds storage textures for use on the fragment shader.\n\n These textures must have been created with\n SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUShader().\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** first_slot the fragment storage texture slot to begin binding from.\n **Parameter:** storage_textures an array of storage textures.\n **Parameter:** num_bindings the number of storage textures to bind from the array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
14654 pub fn SDL_BindGPUFragmentStorageTextures(
14655 render_pass: *mut SDL_GPURenderPass,
14656 first_slot: Uint32,
14657 storage_textures: *const *mut SDL_GPUTexture,
14658 num_bindings: Uint32,
14659 );
14660}
14661unsafe extern "C" {
14662 #[doc = " Binds storage buffers for use on the fragment shader.\n\n These buffers must have been created with\n SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUShader().\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** first_slot the fragment storage buffer slot to begin binding from.\n **Parameter:** storage_buffers an array of storage buffers.\n **Parameter:** num_bindings the number of storage buffers to bind from the array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUShader\n"]
14663 pub fn SDL_BindGPUFragmentStorageBuffers(
14664 render_pass: *mut SDL_GPURenderPass,
14665 first_slot: Uint32,
14666 storage_buffers: *const *mut SDL_GPUBuffer,
14667 num_bindings: Uint32,
14668 );
14669}
14670unsafe extern "C" {
14671 #[doc = " Draws data using bound graphics state with an index buffer and instancing\n enabled.\n\n You must not call this function before binding a graphics pipeline.\n\n Note that the `first_vertex` and `first_instance` parameters are NOT\n compatible with built-in vertex/instance ID variables in shaders (for\n example, SV_VertexID); GPU APIs and shader languages do not define these\n built-in variables consistently, so if your shader depends on them, the\n only way to keep behavior consistent and portable is to always pass 0 for\n the correlating parameter in the draw calls.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** num_indices the number of indices to draw per instance.\n **Parameter:** num_instances the number of instances to draw.\n **Parameter:** first_index the starting index within the index buffer.\n **Parameter:** vertex_offset value added to vertex index before indexing into the\n vertex buffer.\n **Parameter:** first_instance the ID of the first instance to draw.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14672 pub fn SDL_DrawGPUIndexedPrimitives(
14673 render_pass: *mut SDL_GPURenderPass,
14674 num_indices: Uint32,
14675 num_instances: Uint32,
14676 first_index: Uint32,
14677 vertex_offset: Sint32,
14678 first_instance: Uint32,
14679 );
14680}
14681unsafe extern "C" {
14682 #[doc = " Draws data using bound graphics state.\n\n You must not call this function before binding a graphics pipeline.\n\n Note that the `first_vertex` and `first_instance` parameters are NOT\n compatible with built-in vertex/instance ID variables in shaders (for\n example, SV_VertexID); GPU APIs and shader languages do not define these\n built-in variables consistently, so if your shader depends on them, the\n only way to keep behavior consistent and portable is to always pass 0 for\n the correlating parameter in the draw calls.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** num_vertices the number of vertices to draw.\n **Parameter:** num_instances the number of instances that will be drawn.\n **Parameter:** first_vertex the index of the first vertex to draw.\n **Parameter:** first_instance the ID of the first instance to draw.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14683 pub fn SDL_DrawGPUPrimitives(
14684 render_pass: *mut SDL_GPURenderPass,
14685 num_vertices: Uint32,
14686 num_instances: Uint32,
14687 first_vertex: Uint32,
14688 first_instance: Uint32,
14689 );
14690}
14691unsafe extern "C" {
14692 #[doc = " Draws data using bound graphics state and with draw parameters set from a\n buffer.\n\n The buffer must consist of tightly-packed draw parameter sets that each\n match the layout of SDL_GPUIndirectDrawCommand. You must not call this\n function before binding a graphics pipeline.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** buffer a buffer containing draw parameters.\n **Parameter:** offset the offset to start reading from the draw buffer.\n **Parameter:** draw_count the number of draw parameter sets that should be read\n from the draw buffer.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14693 pub fn SDL_DrawGPUPrimitivesIndirect(
14694 render_pass: *mut SDL_GPURenderPass,
14695 buffer: *mut SDL_GPUBuffer,
14696 offset: Uint32,
14697 draw_count: Uint32,
14698 );
14699}
14700unsafe extern "C" {
14701 #[doc = " Draws data using bound graphics state with an index buffer enabled and with\n draw parameters set from a buffer.\n\n The buffer must consist of tightly-packed draw parameter sets that each\n match the layout of SDL_GPUIndexedIndirectDrawCommand. You must not call\n this function before binding a graphics pipeline.\n\n **Parameter:** render_pass a render pass handle.\n **Parameter:** buffer a buffer containing draw parameters.\n **Parameter:** offset the offset to start reading from the draw buffer.\n **Parameter:** draw_count the number of draw parameter sets that should be read\n from the draw buffer.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14702 pub fn SDL_DrawGPUIndexedPrimitivesIndirect(
14703 render_pass: *mut SDL_GPURenderPass,
14704 buffer: *mut SDL_GPUBuffer,
14705 offset: Uint32,
14706 draw_count: Uint32,
14707 );
14708}
14709unsafe extern "C" {
14710 #[doc = " Ends the given render pass.\n\n All bound graphics state on the render pass command buffer is unset. The\n render pass handle is now invalid.\n\n **Parameter:** render_pass a render pass handle.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14711 pub fn SDL_EndGPURenderPass(render_pass: *mut SDL_GPURenderPass);
14712}
14713unsafe extern "C" {
14714 #[doc = " Begins a compute pass on a command buffer.\n\n A compute pass is defined by a set of texture subresources and buffers that\n may be written to by compute pipelines. These textures and buffers must\n have been created with the COMPUTE_STORAGE_WRITE bit or the\n COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE bit. If you do not create a texture\n with COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE, you must not read from the\n texture in the compute pass. All operations related to compute pipelines\n must take place inside of a compute pass. You must not begin another\n compute pass, or a render pass or copy pass before ending the compute pass.\n\n A VERY IMPORTANT NOTE - Reads and writes in compute passes are NOT\n implicitly synchronized. This means you may cause data races by both\n reading and writing a resource region in a compute pass, or by writing\n multiple times to a resource region. If your compute work depends on\n reading the completed output from a previous dispatch, you MUST end the\n current compute pass and begin a new one before you can safely access the\n data. Otherwise you will receive unexpected results. Reading and writing a\n texture in the same compute pass is only supported by specific texture\n formats. Make sure you check the format support!\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** storage_texture_bindings an array of writeable storage texture\n binding structs.\n **Parameter:** num_storage_texture_bindings the number of storage textures to bind\n from the array.\n **Parameter:** storage_buffer_bindings an array of writeable storage buffer binding\n structs.\n **Parameter:** num_storage_buffer_bindings the number of storage buffers to bind\n from the array.\n **Returns:** a compute pass handle.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_EndGPUComputePass\n"]
14715 pub fn SDL_BeginGPUComputePass(
14716 command_buffer: *mut SDL_GPUCommandBuffer,
14717 storage_texture_bindings: *const SDL_GPUStorageTextureReadWriteBinding,
14718 num_storage_texture_bindings: Uint32,
14719 storage_buffer_bindings: *const SDL_GPUStorageBufferReadWriteBinding,
14720 num_storage_buffer_bindings: Uint32,
14721 ) -> *mut SDL_GPUComputePass;
14722}
14723unsafe extern "C" {
14724 #[doc = " Binds a compute pipeline on a command buffer for use in compute dispatch.\n\n **Parameter:** compute_pass a compute pass handle.\n **Parameter:** compute_pipeline a compute pipeline to bind.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14725 pub fn SDL_BindGPUComputePipeline(
14726 compute_pass: *mut SDL_GPUComputePass,
14727 compute_pipeline: *mut SDL_GPUComputePipeline,
14728 );
14729}
14730unsafe extern "C" {
14731 #[doc = " Binds texture-sampler pairs for use on the compute shader.\n\n The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUComputePipeline().\n\n **Parameter:** compute_pass a compute pass handle.\n **Parameter:** first_slot the compute sampler slot to begin binding from.\n **Parameter:** texture_sampler_bindings an array of texture-sampler binding\n structs.\n **Parameter:** num_bindings the number of texture-sampler bindings to bind from the\n array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUComputePipeline\n"]
14732 pub fn SDL_BindGPUComputeSamplers(
14733 compute_pass: *mut SDL_GPUComputePass,
14734 first_slot: Uint32,
14735 texture_sampler_bindings: *const SDL_GPUTextureSamplerBinding,
14736 num_bindings: Uint32,
14737 );
14738}
14739unsafe extern "C" {
14740 #[doc = " Binds storage textures as readonly for use on the compute pipeline.\n\n These textures must have been created with\n SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUComputePipeline().\n\n **Parameter:** compute_pass a compute pass handle.\n **Parameter:** first_slot the compute storage texture slot to begin binding from.\n **Parameter:** storage_textures an array of storage textures.\n **Parameter:** num_bindings the number of storage textures to bind from the array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUComputePipeline\n"]
14741 pub fn SDL_BindGPUComputeStorageTextures(
14742 compute_pass: *mut SDL_GPUComputePass,
14743 first_slot: Uint32,
14744 storage_textures: *const *mut SDL_GPUTexture,
14745 num_bindings: Uint32,
14746 );
14747}
14748unsafe extern "C" {
14749 #[doc = " Binds storage buffers as readonly for use on the compute pipeline.\n\n These buffers must have been created with\n SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.\n\n Be sure your shader is set up according to the requirements documented in\n SDL_CreateGPUComputePipeline().\n\n **Parameter:** compute_pass a compute pass handle.\n **Parameter:** first_slot the compute storage buffer slot to begin binding from.\n **Parameter:** storage_buffers an array of storage buffer binding structs.\n **Parameter:** num_bindings the number of storage buffers to bind from the array.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateGPUComputePipeline\n"]
14750 pub fn SDL_BindGPUComputeStorageBuffers(
14751 compute_pass: *mut SDL_GPUComputePass,
14752 first_slot: Uint32,
14753 storage_buffers: *const *mut SDL_GPUBuffer,
14754 num_bindings: Uint32,
14755 );
14756}
14757unsafe extern "C" {
14758 #[doc = " Dispatches compute work.\n\n You must not call this function before binding a compute pipeline.\n\n A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and\n the dispatches write to the same resource region as each other, there is no\n guarantee of which order the writes will occur. If the write order matters,\n you MUST end the compute pass and begin another one.\n\n **Parameter:** compute_pass a compute pass handle.\n **Parameter:** groupcount_x number of local workgroups to dispatch in the X\n dimension.\n **Parameter:** groupcount_y number of local workgroups to dispatch in the Y\n dimension.\n **Parameter:** groupcount_z number of local workgroups to dispatch in the Z\n dimension.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14759 pub fn SDL_DispatchGPUCompute(
14760 compute_pass: *mut SDL_GPUComputePass,
14761 groupcount_x: Uint32,
14762 groupcount_y: Uint32,
14763 groupcount_z: Uint32,
14764 );
14765}
14766unsafe extern "C" {
14767 #[doc = " Dispatches compute work with parameters set from a buffer.\n\n The buffer layout should match the layout of\n SDL_GPUIndirectDispatchCommand. You must not call this function before\n binding a compute pipeline.\n\n A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and\n the dispatches write to the same resource region as each other, there is no\n guarantee of which order the writes will occur. If the write order matters,\n you MUST end the compute pass and begin another one.\n\n **Parameter:** compute_pass a compute pass handle.\n **Parameter:** buffer a buffer containing dispatch parameters.\n **Parameter:** offset the offset to start reading from the dispatch buffer.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14768 pub fn SDL_DispatchGPUComputeIndirect(
14769 compute_pass: *mut SDL_GPUComputePass,
14770 buffer: *mut SDL_GPUBuffer,
14771 offset: Uint32,
14772 );
14773}
14774unsafe extern "C" {
14775 #[doc = " Ends the current compute pass.\n\n All bound compute state on the command buffer is unset. The compute pass\n handle is now invalid.\n\n **Parameter:** compute_pass a compute pass handle.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14776 pub fn SDL_EndGPUComputePass(compute_pass: *mut SDL_GPUComputePass);
14777}
14778unsafe extern "C" {
14779 #[doc = " Maps a transfer buffer into application address space.\n\n You must unmap the transfer buffer before encoding upload commands. The\n memory is owned by the graphics driver - do NOT call SDL_free() on the\n returned pointer.\n\n **Parameter:** device a GPU context.\n **Parameter:** transfer_buffer a transfer buffer.\n **Parameter:** cycle if true, cycles the transfer buffer if it is already bound.\n **Returns:** the address of the mapped transfer buffer memory, or NULL on\n failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14780 pub fn SDL_MapGPUTransferBuffer(
14781 device: *mut SDL_GPUDevice,
14782 transfer_buffer: *mut SDL_GPUTransferBuffer,
14783 cycle: bool,
14784 ) -> *mut core::ffi::c_void;
14785}
14786unsafe extern "C" {
14787 #[doc = " Unmaps a previously mapped transfer buffer.\n\n **Parameter:** device a GPU context.\n **Parameter:** transfer_buffer a previously mapped transfer buffer.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14788 pub fn SDL_UnmapGPUTransferBuffer(
14789 device: *mut SDL_GPUDevice,
14790 transfer_buffer: *mut SDL_GPUTransferBuffer,
14791 );
14792}
14793unsafe extern "C" {
14794 #[doc = " Begins a copy pass on a command buffer.\n\n All operations related to copying to or from buffers or textures take place\n inside a copy pass. You must not begin another copy pass, or a render pass\n or compute pass before ending the copy pass.\n\n **Parameter:** command_buffer a command buffer.\n **Returns:** a copy pass handle.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_EndGPUCopyPass\n"]
14795 pub fn SDL_BeginGPUCopyPass(command_buffer: *mut SDL_GPUCommandBuffer) -> *mut SDL_GPUCopyPass;
14796}
14797unsafe extern "C" {
14798 #[doc = " Uploads data from a transfer buffer to a texture.\n\n The upload occurs on the GPU timeline. You may assume that the upload has\n finished in subsequent commands.\n\n You must align the data in the transfer buffer to a multiple of the texel\n size of the texture format.\n\n **Parameter:** copy_pass a copy pass handle.\n **Parameter:** source the source transfer buffer with image layout information.\n **Parameter:** destination the destination texture region.\n **Parameter:** cycle if true, cycles the texture if the texture is bound, otherwise\n overwrites the data.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14799 pub fn SDL_UploadToGPUTexture(
14800 copy_pass: *mut SDL_GPUCopyPass,
14801 source: *const SDL_GPUTextureTransferInfo,
14802 destination: *const SDL_GPUTextureRegion,
14803 cycle: bool,
14804 );
14805}
14806unsafe extern "C" {
14807 #[doc = " Uploads data from a transfer buffer to a buffer.\n\n The upload occurs on the GPU timeline. You may assume that the upload has\n finished in subsequent commands.\n\n **Parameter:** copy_pass a copy pass handle.\n **Parameter:** source the source transfer buffer with offset.\n **Parameter:** destination the destination buffer with offset and size.\n **Parameter:** cycle if true, cycles the buffer if it is already bound, otherwise\n overwrites the data.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14808 pub fn SDL_UploadToGPUBuffer(
14809 copy_pass: *mut SDL_GPUCopyPass,
14810 source: *const SDL_GPUTransferBufferLocation,
14811 destination: *const SDL_GPUBufferRegion,
14812 cycle: bool,
14813 );
14814}
14815unsafe extern "C" {
14816 #[doc = " Performs a texture-to-texture copy.\n\n This copy occurs on the GPU timeline. You may assume the copy has finished\n in subsequent commands.\n\n This function does not support copying between depth and color textures.\n For those, copy the texture to a buffer and then to the destination\n texture.\n\n **Parameter:** copy_pass a copy pass handle.\n **Parameter:** source a source texture region.\n **Parameter:** destination a destination texture region.\n **Parameter:** w the width of the region to copy.\n **Parameter:** h the height of the region to copy.\n **Parameter:** d the depth of the region to copy.\n **Parameter:** cycle if true, cycles the destination texture if the destination\n texture is bound, otherwise overwrites the data.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14817 pub fn SDL_CopyGPUTextureToTexture(
14818 copy_pass: *mut SDL_GPUCopyPass,
14819 source: *const SDL_GPUTextureLocation,
14820 destination: *const SDL_GPUTextureLocation,
14821 w: Uint32,
14822 h: Uint32,
14823 d: Uint32,
14824 cycle: bool,
14825 );
14826}
14827unsafe extern "C" {
14828 #[doc = " Performs a buffer-to-buffer copy.\n\n This copy occurs on the GPU timeline. You may assume the copy has finished\n in subsequent commands.\n\n **Parameter:** copy_pass a copy pass handle.\n **Parameter:** source the buffer and offset to copy from.\n **Parameter:** destination the buffer and offset to copy to.\n **Parameter:** size the length of the buffer to copy.\n **Parameter:** cycle if true, cycles the destination buffer if it is already bound,\n otherwise overwrites the data.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14829 pub fn SDL_CopyGPUBufferToBuffer(
14830 copy_pass: *mut SDL_GPUCopyPass,
14831 source: *const SDL_GPUBufferLocation,
14832 destination: *const SDL_GPUBufferLocation,
14833 size: Uint32,
14834 cycle: bool,
14835 );
14836}
14837unsafe extern "C" {
14838 #[doc = " Copies data from a texture to a transfer buffer on the GPU timeline.\n\n This data is not guaranteed to be copied until the command buffer fence is\n signaled.\n\n **Parameter:** copy_pass a copy pass handle.\n **Parameter:** source the source texture region.\n **Parameter:** destination the destination transfer buffer with image layout\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14839 pub fn SDL_DownloadFromGPUTexture(
14840 copy_pass: *mut SDL_GPUCopyPass,
14841 source: *const SDL_GPUTextureRegion,
14842 destination: *const SDL_GPUTextureTransferInfo,
14843 );
14844}
14845unsafe extern "C" {
14846 #[doc = " Copies data from a buffer to a transfer buffer on the GPU timeline.\n\n This data is not guaranteed to be copied until the command buffer fence is\n signaled.\n\n **Parameter:** copy_pass a copy pass handle.\n **Parameter:** source the source buffer with offset and size.\n **Parameter:** destination the destination transfer buffer with offset.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14847 pub fn SDL_DownloadFromGPUBuffer(
14848 copy_pass: *mut SDL_GPUCopyPass,
14849 source: *const SDL_GPUBufferRegion,
14850 destination: *const SDL_GPUTransferBufferLocation,
14851 );
14852}
14853unsafe extern "C" {
14854 #[doc = " Ends the current copy pass.\n\n **Parameter:** copy_pass a copy pass handle.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14855 pub fn SDL_EndGPUCopyPass(copy_pass: *mut SDL_GPUCopyPass);
14856}
14857unsafe extern "C" {
14858 #[doc = " Generates mipmaps for the given texture.\n\n This function must not be called inside of any pass.\n\n **Parameter:** command_buffer a command_buffer.\n **Parameter:** texture a texture with more than 1 mip level.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14859 pub fn SDL_GenerateMipmapsForGPUTexture(
14860 command_buffer: *mut SDL_GPUCommandBuffer,
14861 texture: *mut SDL_GPUTexture,
14862 );
14863}
14864unsafe extern "C" {
14865 #[doc = " Blits from a source texture region to a destination texture region.\n\n This function must not be called inside of any pass.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** info the blit info struct containing the blit parameters.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14866 pub fn SDL_BlitGPUTexture(
14867 command_buffer: *mut SDL_GPUCommandBuffer,
14868 info: *const SDL_GPUBlitInfo,
14869 );
14870}
14871unsafe extern "C" {
14872 #[doc = " Determines whether a swapchain composition is supported by the window.\n\n The window must be claimed before calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** window an SDL_Window.\n **Parameter:** swapchain_composition the swapchain composition to check.\n **Returns:** true if supported, false if unsupported.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClaimWindowForGPUDevice\n"]
14873 pub fn SDL_WindowSupportsGPUSwapchainComposition(
14874 device: *mut SDL_GPUDevice,
14875 window: *mut SDL_Window,
14876 swapchain_composition: SDL_GPUSwapchainComposition,
14877 ) -> bool;
14878}
14879unsafe extern "C" {
14880 #[doc = " Determines whether a presentation mode is supported by the window.\n\n The window must be claimed before calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** window an SDL_Window.\n **Parameter:** present_mode the presentation mode to check.\n **Returns:** true if supported, false if unsupported.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClaimWindowForGPUDevice\n"]
14881 pub fn SDL_WindowSupportsGPUPresentMode(
14882 device: *mut SDL_GPUDevice,
14883 window: *mut SDL_Window,
14884 present_mode: SDL_GPUPresentMode,
14885 ) -> bool;
14886}
14887unsafe extern "C" {
14888 #[doc = " Claims a window, creating a swapchain structure for it.\n\n This must be called before SDL_AcquireGPUSwapchainTexture is called using\n the window. You should only call this function from the thread that created\n the window.\n\n The swapchain will be created with SDL_GPU_SWAPCHAINCOMPOSITION_SDR and\n SDL_GPU_PRESENTMODE_VSYNC. If you want to have different swapchain\n parameters, you must call SDL_SetGPUSwapchainParameters after claiming the\n window.\n\n **Parameter:** device a GPU context.\n **Parameter:** window an SDL_Window.\n **Returns:** true on success, or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called from the thread that\n created the window.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n **See Also:** SDL_ReleaseWindowFromGPUDevice\n **See Also:** SDL_WindowSupportsGPUPresentMode\n **See Also:** SDL_WindowSupportsGPUSwapchainComposition\n"]
14889 pub fn SDL_ClaimWindowForGPUDevice(device: *mut SDL_GPUDevice, window: *mut SDL_Window)
14890 -> bool;
14891}
14892unsafe extern "C" {
14893 #[doc = " Unclaims a window, destroying its swapchain structure.\n\n **Parameter:** device a GPU context.\n **Parameter:** window an SDL_Window that has been claimed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClaimWindowForGPUDevice\n"]
14894 pub fn SDL_ReleaseWindowFromGPUDevice(device: *mut SDL_GPUDevice, window: *mut SDL_Window);
14895}
14896unsafe extern "C" {
14897 #[doc = " Changes the swapchain parameters for the given claimed window.\n\n This function will fail if the requested present mode or swapchain\n composition are unsupported by the device. Check if the parameters are\n supported via SDL_WindowSupportsGPUPresentMode /\n SDL_WindowSupportsGPUSwapchainComposition prior to calling this function.\n\n SDL_GPU_PRESENTMODE_VSYNC with SDL_GPU_SWAPCHAINCOMPOSITION_SDR is always\n supported.\n\n **Parameter:** device a GPU context.\n **Parameter:** window an SDL_Window that has been claimed.\n **Parameter:** swapchain_composition the desired composition of the swapchain.\n **Parameter:** present_mode the desired present mode for the swapchain.\n **Returns:** true if successful, false on error; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WindowSupportsGPUPresentMode\n **See Also:** SDL_WindowSupportsGPUSwapchainComposition\n"]
14898 pub fn SDL_SetGPUSwapchainParameters(
14899 device: *mut SDL_GPUDevice,
14900 window: *mut SDL_Window,
14901 swapchain_composition: SDL_GPUSwapchainComposition,
14902 present_mode: SDL_GPUPresentMode,
14903 ) -> bool;
14904}
14905unsafe extern "C" {
14906 #[doc = " Configures the maximum allowed number of frames in flight.\n\n The default value when the device is created is 2. This means that after\n you have submitted 2 frames for presentation, if the GPU has not finished\n working on the first frame, SDL_AcquireGPUSwapchainTexture() will fill the\n swapchain texture pointer with NULL, and\n SDL_WaitAndAcquireGPUSwapchainTexture() will block.\n\n Higher values increase throughput at the expense of visual latency. Lower\n values decrease visual latency at the expense of throughput.\n\n Note that calling this function will stall and flush the command queue to\n prevent synchronization issues.\n\n The minimum value of allowed frames in flight is 1, and the maximum is 3.\n\n **Parameter:** device a GPU context.\n **Parameter:** allowed_frames_in_flight the maximum number of frames that can be\n pending on the GPU.\n **Returns:** true if successful, false on error; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14907 pub fn SDL_SetGPUAllowedFramesInFlight(
14908 device: *mut SDL_GPUDevice,
14909 allowed_frames_in_flight: Uint32,
14910 ) -> bool;
14911}
14912unsafe extern "C" {
14913 #[doc = " Obtains the texture format of the swapchain for the given window.\n\n Note that this format can change if the swapchain parameters change.\n\n **Parameter:** device a GPU context.\n **Parameter:** window an SDL_Window that has been claimed.\n **Returns:** the texture format of the swapchain.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14914 pub fn SDL_GetGPUSwapchainTextureFormat(
14915 device: *mut SDL_GPUDevice,
14916 window: *mut SDL_Window,
14917 ) -> SDL_GPUTextureFormat;
14918}
14919unsafe extern "C" {
14920 #[doc = " Acquire a texture to use in presentation.\n\n When a swapchain texture is acquired on a command buffer, it will\n automatically be submitted for presentation when the command buffer is\n submitted. The swapchain texture should only be referenced by the command\n buffer used to acquire it.\n\n This function will fill the swapchain texture handle with NULL if too many\n frames are in flight. This is not an error. This NULL pointer should not be\n passed back into SDL. Instead, it should be considered as an indication to\n wait until the swapchain is available.\n\n If you use this function, it is possible to create a situation where many\n command buffers are allocated while the rendering context waits for the GPU\n to catch up, which will cause memory usage to grow. You should use\n SDL_WaitAndAcquireGPUSwapchainTexture() unless you know what you are doing\n with timing.\n\n The swapchain texture is managed by the implementation and must not be\n freed by the user. You MUST NOT call this function from any thread other\n than the one that created the window.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** window a window that has been claimed.\n **Parameter:** swapchain_texture a pointer filled in with a swapchain texture\n handle.\n **Parameter:** swapchain_texture_width a pointer filled in with the swapchain\n texture width, may be NULL.\n **Parameter:** swapchain_texture_height a pointer filled in with the swapchain\n texture height, may be NULL.\n **Returns:** true on success, false on error; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called from the thread that\n created the window.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ClaimWindowForGPUDevice\n **See Also:** SDL_SubmitGPUCommandBuffer\n **See Also:** SDL_SubmitGPUCommandBufferAndAcquireFence\n **See Also:** SDL_CancelGPUCommandBuffer\n **See Also:** SDL_GetWindowSizeInPixels\n **See Also:** SDL_WaitForGPUSwapchain\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n **See Also:** SDL_SetGPUAllowedFramesInFlight\n"]
14921 pub fn SDL_AcquireGPUSwapchainTexture(
14922 command_buffer: *mut SDL_GPUCommandBuffer,
14923 window: *mut SDL_Window,
14924 swapchain_texture: *mut *mut SDL_GPUTexture,
14925 swapchain_texture_width: *mut Uint32,
14926 swapchain_texture_height: *mut Uint32,
14927 ) -> bool;
14928}
14929unsafe extern "C" {
14930 #[doc = " Blocks the thread until a swapchain texture is available to be acquired.\n\n **Parameter:** device a GPU context.\n **Parameter:** window a window that has been claimed.\n **Returns:** true on success, false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called from the thread that\n created the window.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AcquireGPUSwapchainTexture\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n **See Also:** SDL_SetGPUAllowedFramesInFlight\n"]
14931 pub fn SDL_WaitForGPUSwapchain(device: *mut SDL_GPUDevice, window: *mut SDL_Window) -> bool;
14932}
14933unsafe extern "C" {
14934 #[doc = " Blocks the thread until a swapchain texture is available to be acquired,\n and then acquires it.\n\n When a swapchain texture is acquired on a command buffer, it will\n automatically be submitted for presentation when the command buffer is\n submitted. The swapchain texture should only be referenced by the command\n buffer used to acquire it. It is an error to call\n SDL_CancelGPUCommandBuffer() after a swapchain texture is acquired.\n\n This function can fill the swapchain texture handle with NULL in certain\n cases, for example if the window is minimized. This is not an error. You\n should always make sure to check whether the pointer is NULL before\n actually using it.\n\n The swapchain texture is managed by the implementation and must not be\n freed by the user. You MUST NOT call this function from any thread other\n than the one that created the window.\n\n The swapchain texture is write-only and cannot be used as a sampler or for\n another reading operation.\n\n **Parameter:** command_buffer a command buffer.\n **Parameter:** window a window that has been claimed.\n **Parameter:** swapchain_texture a pointer filled in with a swapchain texture\n handle.\n **Parameter:** swapchain_texture_width a pointer filled in with the swapchain\n texture width, may be NULL.\n **Parameter:** swapchain_texture_height a pointer filled in with the swapchain\n texture height, may be NULL.\n **Returns:** true on success, false on error; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called from the thread that\n created the window.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SubmitGPUCommandBuffer\n **See Also:** SDL_SubmitGPUCommandBufferAndAcquireFence\n **See Also:** SDL_AcquireGPUSwapchainTexture\n"]
14935 pub fn SDL_WaitAndAcquireGPUSwapchainTexture(
14936 command_buffer: *mut SDL_GPUCommandBuffer,
14937 window: *mut SDL_Window,
14938 swapchain_texture: *mut *mut SDL_GPUTexture,
14939 swapchain_texture_width: *mut Uint32,
14940 swapchain_texture_height: *mut Uint32,
14941 ) -> bool;
14942}
14943unsafe extern "C" {
14944 #[doc = " Submits a command buffer so its commands can be processed on the GPU.\n\n It is invalid to use the command buffer after this is called.\n\n This must be called from the thread the command buffer was acquired on.\n\n All commands in the submission are guaranteed to begin executing before any\n command in a subsequent submission begins executing.\n\n **Parameter:** command_buffer a command buffer.\n **Returns:** true on success, false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AcquireGPUCommandBuffer\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n **See Also:** SDL_AcquireGPUSwapchainTexture\n **See Also:** SDL_SubmitGPUCommandBufferAndAcquireFence\n"]
14945 pub fn SDL_SubmitGPUCommandBuffer(command_buffer: *mut SDL_GPUCommandBuffer) -> bool;
14946}
14947unsafe extern "C" {
14948 #[doc = " Submits a command buffer so its commands can be processed on the GPU, and\n acquires a fence associated with the command buffer.\n\n You must release this fence when it is no longer needed or it will cause a\n leak. It is invalid to use the command buffer after this is called.\n\n This must be called from the thread the command buffer was acquired on.\n\n All commands in the submission are guaranteed to begin executing before any\n command in a subsequent submission begins executing.\n\n **Parameter:** command_buffer a command buffer.\n **Returns:** a fence associated with the command buffer, or NULL on failure;\n call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AcquireGPUCommandBuffer\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n **See Also:** SDL_AcquireGPUSwapchainTexture\n **See Also:** SDL_SubmitGPUCommandBuffer\n **See Also:** SDL_ReleaseGPUFence\n"]
14949 pub fn SDL_SubmitGPUCommandBufferAndAcquireFence(
14950 command_buffer: *mut SDL_GPUCommandBuffer,
14951 ) -> *mut SDL_GPUFence;
14952}
14953unsafe extern "C" {
14954 #[doc = " Cancels a command buffer.\n\n None of the enqueued commands are executed.\n\n It is an error to call this function after a swapchain texture has been\n acquired.\n\n This must be called from the thread the command buffer was acquired on.\n\n You must not reference the command buffer after calling this function.\n\n **Parameter:** command_buffer a command buffer.\n **Returns:** true on success, false on error; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WaitAndAcquireGPUSwapchainTexture\n **See Also:** SDL_AcquireGPUCommandBuffer\n **See Also:** SDL_AcquireGPUSwapchainTexture\n"]
14955 pub fn SDL_CancelGPUCommandBuffer(command_buffer: *mut SDL_GPUCommandBuffer) -> bool;
14956}
14957unsafe extern "C" {
14958 #[doc = " Blocks the thread until the GPU is completely idle.\n\n **Parameter:** device a GPU context.\n **Returns:** true on success, false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_WaitForGPUFences\n"]
14959 pub fn SDL_WaitForGPUIdle(device: *mut SDL_GPUDevice) -> bool;
14960}
14961unsafe extern "C" {
14962 #[doc = " Blocks the thread until the given fences are signaled.\n\n **Parameter:** device a GPU context.\n **Parameter:** wait_all if 0, wait for any fence to be signaled, if 1, wait for all\n fences to be signaled.\n **Parameter:** fences an array of fences to wait on.\n **Parameter:** num_fences the number of fences in the fences array.\n **Returns:** true on success, false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SubmitGPUCommandBufferAndAcquireFence\n **See Also:** SDL_WaitForGPUIdle\n"]
14963 pub fn SDL_WaitForGPUFences(
14964 device: *mut SDL_GPUDevice,
14965 wait_all: bool,
14966 fences: *const *mut SDL_GPUFence,
14967 num_fences: Uint32,
14968 ) -> bool;
14969}
14970unsafe extern "C" {
14971 #[doc = " Checks the status of a fence.\n\n **Parameter:** device a GPU context.\n **Parameter:** fence a fence.\n **Returns:** true if the fence is signaled, false if it is not.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SubmitGPUCommandBufferAndAcquireFence\n"]
14972 pub fn SDL_QueryGPUFence(device: *mut SDL_GPUDevice, fence: *mut SDL_GPUFence) -> bool;
14973}
14974unsafe extern "C" {
14975 #[doc = " Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence.\n\n You must not reference the fence after calling this function.\n\n **Parameter:** device a GPU context.\n **Parameter:** fence a fence.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SubmitGPUCommandBufferAndAcquireFence\n"]
14976 pub fn SDL_ReleaseGPUFence(device: *mut SDL_GPUDevice, fence: *mut SDL_GPUFence);
14977}
14978unsafe extern "C" {
14979 #[doc = " Obtains the texel block size for a texture format.\n\n **Parameter:** format the texture format you want to know the texel size of.\n **Returns:** the texel block size of the texture format.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UploadToGPUTexture\n"]
14980 pub fn SDL_GPUTextureFormatTexelBlockSize(format: SDL_GPUTextureFormat) -> Uint32;
14981}
14982unsafe extern "C" {
14983 #[doc = " Determines whether a texture format is supported for a given type and\n usage.\n\n **Parameter:** device a GPU context.\n **Parameter:** format the texture format to check.\n **Parameter:** type the type of texture (2D, 3D, Cube).\n **Parameter:** usage a bitmask of all usage scenarios to check.\n **Returns:** whether the texture format is supported for this type and usage.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14984 pub fn SDL_GPUTextureSupportsFormat(
14985 device: *mut SDL_GPUDevice,
14986 format: SDL_GPUTextureFormat,
14987 type_: SDL_GPUTextureType,
14988 usage: SDL_GPUTextureUsageFlags,
14989 ) -> bool;
14990}
14991unsafe extern "C" {
14992 #[doc = " Determines if a sample count for a texture format is supported.\n\n **Parameter:** device a GPU context.\n **Parameter:** format the texture format to check.\n **Parameter:** sample_count the sample count to check.\n **Returns:** whether the sample count is supported for this texture format.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
14993 pub fn SDL_GPUTextureSupportsSampleCount(
14994 device: *mut SDL_GPUDevice,
14995 format: SDL_GPUTextureFormat,
14996 sample_count: SDL_GPUSampleCount,
14997 ) -> bool;
14998}
14999unsafe extern "C" {
15000 #[doc = " Calculate the size in bytes of a texture format with dimensions.\n\n **Parameter:** format a texture format.\n **Parameter:** width width in pixels.\n **Parameter:** height height in pixels.\n **Parameter:** depth_or_layer_count depth for 3D textures or layer count otherwise.\n **Returns:** the size of a texture with this format and dimensions.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15001 pub fn SDL_CalculateGPUTextureFormatSize(
15002 format: SDL_GPUTextureFormat,
15003 width: Uint32,
15004 height: Uint32,
15005 depth_or_layer_count: Uint32,
15006 ) -> Uint32;
15007}
15008unsafe extern "C" {
15009 #[doc = " Get the SDL pixel format corresponding to a GPU texture format.\n\n **Parameter:** format a texture format.\n **Returns:** the corresponding pixel format, or SDL_PIXELFORMAT_UNKNOWN if\n there is no corresponding pixel format.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
15010 pub fn SDL_GetPixelFormatFromGPUTextureFormat(format: SDL_GPUTextureFormat) -> SDL_PixelFormat;
15011}
15012unsafe extern "C" {
15013 #[doc = " Get the GPU texture format corresponding to an SDL pixel format.\n\n **Parameter:** format a pixel format.\n **Returns:** the corresponding GPU texture format, or\n SDL_GPU_TEXTUREFORMAT_INVALID if there is no corresponding GPU\n texture format.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
15014 pub fn SDL_GetGPUTextureFormatFromPixelFormat(format: SDL_PixelFormat) -> SDL_GPUTextureFormat;
15015}
15016#[repr(C)]
15017#[derive(Debug, Copy, Clone)]
15018pub struct SDL_Haptic {
15019 _unused: [u8; 0],
15020}
15021#[doc = " Type of haptic effect.\n"]
15022pub type SDL_HapticEffectType = Uint16;
15023#[doc = " Type of coordinates used for haptic direction.\n"]
15024pub type SDL_HapticDirectionType = Uint8;
15025#[doc = " ID for haptic effects.\n\n This is -1 if the ID is invalid.\n\n **See Also:** SDL_CreateHapticEffect\n"]
15026pub type SDL_HapticEffectID = core::ffi::c_int;
15027#[doc = " Structure that represents a haptic direction.\n\n This is the direction where the force comes from, instead of the direction\n in which the force is exerted.\n\n Directions can be specified by:\n\n - SDL_HAPTIC_POLAR : Specified by polar coordinates.\n - SDL_HAPTIC_CARTESIAN : Specified by cartesian coordinates.\n - SDL_HAPTIC_SPHERICAL : Specified by spherical coordinates.\n\n Cardinal directions of the haptic device are relative to the positioning of\n the device. North is considered to be away from the user.\n\n The following diagram represents the cardinal directions:\n\n ```\n .--.\n |__| .-------.\n |=.| |.-----.|\n |--| || ||\n | | |'-----'|\n |__|~')_____('\n [ COMPUTER ]\n\n\n North (0,-1)\n ^\n |\n |\n (-1,0) West <----[ HAPTIC ]----> East (1,0)\n |\n |\n v\n South (0,1)\n\n\n [ USER ]\n \\|||/\n (o o)\n ---ooO-(_)-Ooo---\n ```\n\n If type is SDL_HAPTIC_POLAR, direction is encoded by hundredths of a degree\n starting north and turning clockwise. SDL_HAPTIC_POLAR only uses the first\n `dir` parameter. The cardinal directions would be:\n\n - North: 0 (0 degrees)\n - East: 9000 (90 degrees)\n - South: 18000 (180 degrees)\n - West: 27000 (270 degrees)\n\n If type is SDL_HAPTIC_CARTESIAN, direction is encoded by three positions (X\n axis, Y axis and Z axis (with 3 axes)). SDL_HAPTIC_CARTESIAN uses the first\n three `dir` parameters. The cardinal directions would be:\n\n - North: 0,-1, 0\n - East: 1, 0, 0\n - South: 0, 1, 0\n - West: -1, 0, 0\n\n The Z axis represents the height of the effect if supported, otherwise it's\n unused. In cartesian encoding (1, 2) would be the same as (2, 4), you can\n use any multiple you want, only the direction matters.\n\n If type is SDL_HAPTIC_SPHERICAL, direction is encoded by two rotations. The\n first two `dir` parameters are used. The `dir` parameters are as follows\n (all values are in hundredths of degrees):\n\n - Degrees from (1, 0) rotated towards (0, 1).\n - Degrees towards (0, 0, 1) (device needs at least 3 axes).\n\n Example of force coming from the south with all encodings (force coming\n from the south means the user will have to pull the stick to counteract):\n\n ```c\n SDL_HapticDirection direction;\n\n // Cartesian directions\n direction.type = SDL_HAPTIC_CARTESIAN; // Using cartesian direction encoding.\n direction.dir[0] = 0; // X position\n direction.dir[1] = 1; // Y position\n // Assuming the device has 2 axes, we don't need to specify third parameter.\n\n // Polar directions\n direction.type = SDL_HAPTIC_POLAR; // We'll be using polar direction encoding.\n direction.dir[0] = 18000; // Polar only uses first parameter\n\n // Spherical coordinates\n direction.type = SDL_HAPTIC_SPHERICAL; // Spherical encoding\n direction.dir[0] = 9000; // Since we only have two axes we don't need more parameters.\n ```\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HAPTIC_POLAR\n **See Also:** SDL_HAPTIC_CARTESIAN\n **See Also:** SDL_HAPTIC_SPHERICAL\n **See Also:** SDL_HAPTIC_STEERING_AXIS\n **See Also:** SDL_HapticEffect\n **See Also:** SDL_GetNumHapticAxes\n"]
15028#[repr(C)]
15029#[derive(Debug, Default, Copy, Clone, Hash)]
15030pub struct SDL_HapticDirection {
15031 #[doc = "< The type of encoding.\n"]
15032 pub type_: SDL_HapticDirectionType,
15033 #[doc = "< The encoded direction.\n"]
15034 pub dir: [Sint32; 3usize],
15035}
15036#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15037const _: () = {
15038 ["Size of SDL_HapticDirection"][::core::mem::size_of::<SDL_HapticDirection>() - 16usize];
15039 ["Alignment of SDL_HapticDirection"][::core::mem::align_of::<SDL_HapticDirection>() - 4usize];
15040 ["Offset of field: SDL_HapticDirection::type_"]
15041 [::core::mem::offset_of!(SDL_HapticDirection, type_) - 0usize];
15042 ["Offset of field: SDL_HapticDirection::dir"]
15043 [::core::mem::offset_of!(SDL_HapticDirection, dir) - 4usize];
15044};
15045#[doc = " A structure containing a template for a Constant effect.\n\n This struct is exclusively for the SDL_HAPTIC_CONSTANT effect.\n\n A constant effect applies a constant force in the specified direction to\n the joystick.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HAPTIC_CONSTANT\n **See Also:** SDL_HapticEffect\n"]
15046#[repr(C)]
15047#[derive(Debug, Default, Copy, Clone, Hash)]
15048pub struct SDL_HapticConstant {
15049 #[doc = "< SDL_HAPTIC_CONSTANT\n"]
15050 pub type_: SDL_HapticEffectType,
15051 #[doc = "< Direction of the effect.\n"]
15052 pub direction: SDL_HapticDirection,
15053 #[doc = "< Duration of the effect.\n"]
15054 pub length: Uint32,
15055 #[doc = "< Delay before starting the effect.\n"]
15056 pub delay: Uint16,
15057 #[doc = "< Button that triggers the effect.\n"]
15058 pub button: Uint16,
15059 #[doc = "< How soon it can be triggered again after button.\n"]
15060 pub interval: Uint16,
15061 #[doc = "< Strength of the constant effect.\n"]
15062 pub level: Sint16,
15063 #[doc = "< Duration of the attack.\n"]
15064 pub attack_length: Uint16,
15065 #[doc = "< Level at the start of the attack.\n"]
15066 pub attack_level: Uint16,
15067 #[doc = "< Duration of the fade.\n"]
15068 pub fade_length: Uint16,
15069 #[doc = "< Level at the end of the fade.\n"]
15070 pub fade_level: Uint16,
15071}
15072#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15073const _: () = {
15074 ["Size of SDL_HapticConstant"][::core::mem::size_of::<SDL_HapticConstant>() - 40usize];
15075 ["Alignment of SDL_HapticConstant"][::core::mem::align_of::<SDL_HapticConstant>() - 4usize];
15076 ["Offset of field: SDL_HapticConstant::type_"]
15077 [::core::mem::offset_of!(SDL_HapticConstant, type_) - 0usize];
15078 ["Offset of field: SDL_HapticConstant::direction"]
15079 [::core::mem::offset_of!(SDL_HapticConstant, direction) - 4usize];
15080 ["Offset of field: SDL_HapticConstant::length"]
15081 [::core::mem::offset_of!(SDL_HapticConstant, length) - 20usize];
15082 ["Offset of field: SDL_HapticConstant::delay"]
15083 [::core::mem::offset_of!(SDL_HapticConstant, delay) - 24usize];
15084 ["Offset of field: SDL_HapticConstant::button"]
15085 [::core::mem::offset_of!(SDL_HapticConstant, button) - 26usize];
15086 ["Offset of field: SDL_HapticConstant::interval"]
15087 [::core::mem::offset_of!(SDL_HapticConstant, interval) - 28usize];
15088 ["Offset of field: SDL_HapticConstant::level"]
15089 [::core::mem::offset_of!(SDL_HapticConstant, level) - 30usize];
15090 ["Offset of field: SDL_HapticConstant::attack_length"]
15091 [::core::mem::offset_of!(SDL_HapticConstant, attack_length) - 32usize];
15092 ["Offset of field: SDL_HapticConstant::attack_level"]
15093 [::core::mem::offset_of!(SDL_HapticConstant, attack_level) - 34usize];
15094 ["Offset of field: SDL_HapticConstant::fade_length"]
15095 [::core::mem::offset_of!(SDL_HapticConstant, fade_length) - 36usize];
15096 ["Offset of field: SDL_HapticConstant::fade_level"]
15097 [::core::mem::offset_of!(SDL_HapticConstant, fade_level) - 38usize];
15098};
15099#[doc = " A structure containing a template for a Periodic effect.\n\n The struct handles the following effects:\n\n - SDL_HAPTIC_SINE\n - SDL_HAPTIC_SQUARE\n - SDL_HAPTIC_TRIANGLE\n - SDL_HAPTIC_SAWTOOTHUP\n - SDL_HAPTIC_SAWTOOTHDOWN\n\n A periodic effect consists in a wave-shaped effect that repeats itself over\n time. The type determines the shape of the wave and the parameters\n determine the dimensions of the wave.\n\n Phase is given by hundredth of a degree meaning that giving the phase a\n value of 9000 will displace it 25% of its period. Here are sample values:\n\n - 0: No phase displacement.\n - 9000: Displaced 25% of its period.\n - 18000: Displaced 50% of its period.\n - 27000: Displaced 75% of its period.\n - 36000: Displaced 100% of its period, same as 0, but 0 is preferred.\n\n Examples:\n\n ```\n SDL_HAPTIC_SINE\n __ __ __ __\n / \\ / \\ / \\ /\n / \\__/ \\__/ \\__/\n\n SDL_HAPTIC_SQUARE\n __ __ __ __ __\n | | | | | | | | | |\n | |__| |__| |__| |__| |\n\n SDL_HAPTIC_TRIANGLE\n /\\ /\\ /\\ /\\ /\\\n / \\ / \\ / \\ / \\ /\n / \\/ \\/ \\/ \\/\n\n SDL_HAPTIC_SAWTOOTHUP\n /| /| /| /| /| /| /|\n / | / | / | / | / | / | / |\n / |/ |/ |/ |/ |/ |/ |\n\n SDL_HAPTIC_SAWTOOTHDOWN\n \\ |\\ |\\ |\\ |\\ |\\ |\\ |\n \\ | \\ | \\ | \\ | \\ | \\ | \\ |\n \\| \\| \\| \\| \\| \\| \\|\n ```\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HAPTIC_SINE\n **See Also:** SDL_HAPTIC_SQUARE\n **See Also:** SDL_HAPTIC_TRIANGLE\n **See Also:** SDL_HAPTIC_SAWTOOTHUP\n **See Also:** SDL_HAPTIC_SAWTOOTHDOWN\n **See Also:** SDL_HapticEffect\n"]
15100#[repr(C)]
15101#[derive(Debug, Default, Copy, Clone, Hash)]
15102pub struct SDL_HapticPeriodic {
15103 #[doc = "< SDL_HAPTIC_SINE, SDL_HAPTIC_SQUARE\nSDL_HAPTIC_TRIANGLE, SDL_HAPTIC_SAWTOOTHUP or\nSDL_HAPTIC_SAWTOOTHDOWN\n"]
15104 pub type_: SDL_HapticEffectType,
15105 #[doc = "< Direction of the effect.\n"]
15106 pub direction: SDL_HapticDirection,
15107 #[doc = "< Duration of the effect.\n"]
15108 pub length: Uint32,
15109 #[doc = "< Delay before starting the effect.\n"]
15110 pub delay: Uint16,
15111 #[doc = "< Button that triggers the effect.\n"]
15112 pub button: Uint16,
15113 #[doc = "< How soon it can be triggered again after button.\n"]
15114 pub interval: Uint16,
15115 #[doc = "< Period of the wave.\n"]
15116 pub period: Uint16,
15117 #[doc = "< Peak value; if negative, equivalent to 180 degrees extra phase shift.\n"]
15118 pub magnitude: Sint16,
15119 #[doc = "< Mean value of the wave.\n"]
15120 pub offset: Sint16,
15121 #[doc = "< Positive phase shift given by hundredth of a degree.\n"]
15122 pub phase: Uint16,
15123 #[doc = "< Duration of the attack.\n"]
15124 pub attack_length: Uint16,
15125 #[doc = "< Level at the start of the attack.\n"]
15126 pub attack_level: Uint16,
15127 #[doc = "< Duration of the fade.\n"]
15128 pub fade_length: Uint16,
15129 #[doc = "< Level at the end of the fade.\n"]
15130 pub fade_level: Uint16,
15131}
15132#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15133const _: () = {
15134 ["Size of SDL_HapticPeriodic"][::core::mem::size_of::<SDL_HapticPeriodic>() - 48usize];
15135 ["Alignment of SDL_HapticPeriodic"][::core::mem::align_of::<SDL_HapticPeriodic>() - 4usize];
15136 ["Offset of field: SDL_HapticPeriodic::type_"]
15137 [::core::mem::offset_of!(SDL_HapticPeriodic, type_) - 0usize];
15138 ["Offset of field: SDL_HapticPeriodic::direction"]
15139 [::core::mem::offset_of!(SDL_HapticPeriodic, direction) - 4usize];
15140 ["Offset of field: SDL_HapticPeriodic::length"]
15141 [::core::mem::offset_of!(SDL_HapticPeriodic, length) - 20usize];
15142 ["Offset of field: SDL_HapticPeriodic::delay"]
15143 [::core::mem::offset_of!(SDL_HapticPeriodic, delay) - 24usize];
15144 ["Offset of field: SDL_HapticPeriodic::button"]
15145 [::core::mem::offset_of!(SDL_HapticPeriodic, button) - 26usize];
15146 ["Offset of field: SDL_HapticPeriodic::interval"]
15147 [::core::mem::offset_of!(SDL_HapticPeriodic, interval) - 28usize];
15148 ["Offset of field: SDL_HapticPeriodic::period"]
15149 [::core::mem::offset_of!(SDL_HapticPeriodic, period) - 30usize];
15150 ["Offset of field: SDL_HapticPeriodic::magnitude"]
15151 [::core::mem::offset_of!(SDL_HapticPeriodic, magnitude) - 32usize];
15152 ["Offset of field: SDL_HapticPeriodic::offset"]
15153 [::core::mem::offset_of!(SDL_HapticPeriodic, offset) - 34usize];
15154 ["Offset of field: SDL_HapticPeriodic::phase"]
15155 [::core::mem::offset_of!(SDL_HapticPeriodic, phase) - 36usize];
15156 ["Offset of field: SDL_HapticPeriodic::attack_length"]
15157 [::core::mem::offset_of!(SDL_HapticPeriodic, attack_length) - 38usize];
15158 ["Offset of field: SDL_HapticPeriodic::attack_level"]
15159 [::core::mem::offset_of!(SDL_HapticPeriodic, attack_level) - 40usize];
15160 ["Offset of field: SDL_HapticPeriodic::fade_length"]
15161 [::core::mem::offset_of!(SDL_HapticPeriodic, fade_length) - 42usize];
15162 ["Offset of field: SDL_HapticPeriodic::fade_level"]
15163 [::core::mem::offset_of!(SDL_HapticPeriodic, fade_level) - 44usize];
15164};
15165#[doc = " A structure containing a template for a Condition effect.\n\n The struct handles the following effects:\n\n - SDL_HAPTIC_SPRING: Effect based on axes position.\n - SDL_HAPTIC_DAMPER: Effect based on axes velocity.\n - SDL_HAPTIC_INERTIA: Effect based on axes acceleration.\n - SDL_HAPTIC_FRICTION: Effect based on axes movement.\n\n Direction is handled by condition internals instead of a direction member.\n The condition effect specific members have three parameters. The first\n refers to the X axis, the second refers to the Y axis and the third refers\n to the Z axis. The right terms refer to the positive side of the axis and\n the left terms refer to the negative side of the axis. Please refer to the\n SDL_HapticDirection diagram for which side is positive and which is\n negative.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HapticDirection\n **See Also:** SDL_HAPTIC_SPRING\n **See Also:** SDL_HAPTIC_DAMPER\n **See Also:** SDL_HAPTIC_INERTIA\n **See Also:** SDL_HAPTIC_FRICTION\n **See Also:** SDL_HapticEffect\n"]
15166#[repr(C)]
15167#[derive(Debug, Default, Copy, Clone, Hash)]
15168pub struct SDL_HapticCondition {
15169 #[doc = "< SDL_HAPTIC_SPRING, SDL_HAPTIC_DAMPER,\nSDL_HAPTIC_INERTIA or SDL_HAPTIC_FRICTION\n"]
15170 pub type_: SDL_HapticEffectType,
15171 #[doc = "< Direction of the effect.\n"]
15172 pub direction: SDL_HapticDirection,
15173 #[doc = "< Duration of the effect.\n"]
15174 pub length: Uint32,
15175 #[doc = "< Delay before starting the effect.\n"]
15176 pub delay: Uint16,
15177 #[doc = "< Button that triggers the effect.\n"]
15178 pub button: Uint16,
15179 #[doc = "< How soon it can be triggered again after button.\n"]
15180 pub interval: Uint16,
15181 #[doc = "< Level when joystick is to the positive side; max 0xFFFF.\n"]
15182 pub right_sat: [Uint16; 3usize],
15183 #[doc = "< Level when joystick is to the negative side; max 0xFFFF.\n"]
15184 pub left_sat: [Uint16; 3usize],
15185 #[doc = "< How fast to increase the force towards the positive side.\n"]
15186 pub right_coeff: [Sint16; 3usize],
15187 #[doc = "< How fast to increase the force towards the negative side.\n"]
15188 pub left_coeff: [Sint16; 3usize],
15189 #[doc = "< Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered.\n"]
15190 pub deadband: [Uint16; 3usize],
15191 #[doc = "< Position of the dead zone.\n"]
15192 pub center: [Sint16; 3usize],
15193}
15194#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15195const _: () = {
15196 ["Size of SDL_HapticCondition"][::core::mem::size_of::<SDL_HapticCondition>() - 68usize];
15197 ["Alignment of SDL_HapticCondition"][::core::mem::align_of::<SDL_HapticCondition>() - 4usize];
15198 ["Offset of field: SDL_HapticCondition::type_"]
15199 [::core::mem::offset_of!(SDL_HapticCondition, type_) - 0usize];
15200 ["Offset of field: SDL_HapticCondition::direction"]
15201 [::core::mem::offset_of!(SDL_HapticCondition, direction) - 4usize];
15202 ["Offset of field: SDL_HapticCondition::length"]
15203 [::core::mem::offset_of!(SDL_HapticCondition, length) - 20usize];
15204 ["Offset of field: SDL_HapticCondition::delay"]
15205 [::core::mem::offset_of!(SDL_HapticCondition, delay) - 24usize];
15206 ["Offset of field: SDL_HapticCondition::button"]
15207 [::core::mem::offset_of!(SDL_HapticCondition, button) - 26usize];
15208 ["Offset of field: SDL_HapticCondition::interval"]
15209 [::core::mem::offset_of!(SDL_HapticCondition, interval) - 28usize];
15210 ["Offset of field: SDL_HapticCondition::right_sat"]
15211 [::core::mem::offset_of!(SDL_HapticCondition, right_sat) - 30usize];
15212 ["Offset of field: SDL_HapticCondition::left_sat"]
15213 [::core::mem::offset_of!(SDL_HapticCondition, left_sat) - 36usize];
15214 ["Offset of field: SDL_HapticCondition::right_coeff"]
15215 [::core::mem::offset_of!(SDL_HapticCondition, right_coeff) - 42usize];
15216 ["Offset of field: SDL_HapticCondition::left_coeff"]
15217 [::core::mem::offset_of!(SDL_HapticCondition, left_coeff) - 48usize];
15218 ["Offset of field: SDL_HapticCondition::deadband"]
15219 [::core::mem::offset_of!(SDL_HapticCondition, deadband) - 54usize];
15220 ["Offset of field: SDL_HapticCondition::center"]
15221 [::core::mem::offset_of!(SDL_HapticCondition, center) - 60usize];
15222};
15223#[doc = " A structure containing a template for a Ramp effect.\n\n This struct is exclusively for the SDL_HAPTIC_RAMP effect.\n\n The ramp effect starts at start strength and ends at end strength. It\n augments in linear fashion. If you use attack and fade with a ramp the\n effects get added to the ramp effect making the effect become quadratic\n instead of linear.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HAPTIC_RAMP\n **See Also:** SDL_HapticEffect\n"]
15224#[repr(C)]
15225#[derive(Debug, Default, Copy, Clone, Hash)]
15226pub struct SDL_HapticRamp {
15227 #[doc = "< SDL_HAPTIC_RAMP\n"]
15228 pub type_: SDL_HapticEffectType,
15229 #[doc = "< Direction of the effect.\n"]
15230 pub direction: SDL_HapticDirection,
15231 #[doc = "< Duration of the effect.\n"]
15232 pub length: Uint32,
15233 #[doc = "< Delay before starting the effect.\n"]
15234 pub delay: Uint16,
15235 #[doc = "< Button that triggers the effect.\n"]
15236 pub button: Uint16,
15237 #[doc = "< How soon it can be triggered again after button.\n"]
15238 pub interval: Uint16,
15239 #[doc = "< Beginning strength level.\n"]
15240 pub start: Sint16,
15241 #[doc = "< Ending strength level.\n"]
15242 pub end: Sint16,
15243 #[doc = "< Duration of the attack.\n"]
15244 pub attack_length: Uint16,
15245 #[doc = "< Level at the start of the attack.\n"]
15246 pub attack_level: Uint16,
15247 #[doc = "< Duration of the fade.\n"]
15248 pub fade_length: Uint16,
15249 #[doc = "< Level at the end of the fade.\n"]
15250 pub fade_level: Uint16,
15251}
15252#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15253const _: () = {
15254 ["Size of SDL_HapticRamp"][::core::mem::size_of::<SDL_HapticRamp>() - 44usize];
15255 ["Alignment of SDL_HapticRamp"][::core::mem::align_of::<SDL_HapticRamp>() - 4usize];
15256 ["Offset of field: SDL_HapticRamp::type_"]
15257 [::core::mem::offset_of!(SDL_HapticRamp, type_) - 0usize];
15258 ["Offset of field: SDL_HapticRamp::direction"]
15259 [::core::mem::offset_of!(SDL_HapticRamp, direction) - 4usize];
15260 ["Offset of field: SDL_HapticRamp::length"]
15261 [::core::mem::offset_of!(SDL_HapticRamp, length) - 20usize];
15262 ["Offset of field: SDL_HapticRamp::delay"]
15263 [::core::mem::offset_of!(SDL_HapticRamp, delay) - 24usize];
15264 ["Offset of field: SDL_HapticRamp::button"]
15265 [::core::mem::offset_of!(SDL_HapticRamp, button) - 26usize];
15266 ["Offset of field: SDL_HapticRamp::interval"]
15267 [::core::mem::offset_of!(SDL_HapticRamp, interval) - 28usize];
15268 ["Offset of field: SDL_HapticRamp::start"]
15269 [::core::mem::offset_of!(SDL_HapticRamp, start) - 30usize];
15270 ["Offset of field: SDL_HapticRamp::end"]
15271 [::core::mem::offset_of!(SDL_HapticRamp, end) - 32usize];
15272 ["Offset of field: SDL_HapticRamp::attack_length"]
15273 [::core::mem::offset_of!(SDL_HapticRamp, attack_length) - 34usize];
15274 ["Offset of field: SDL_HapticRamp::attack_level"]
15275 [::core::mem::offset_of!(SDL_HapticRamp, attack_level) - 36usize];
15276 ["Offset of field: SDL_HapticRamp::fade_length"]
15277 [::core::mem::offset_of!(SDL_HapticRamp, fade_length) - 38usize];
15278 ["Offset of field: SDL_HapticRamp::fade_level"]
15279 [::core::mem::offset_of!(SDL_HapticRamp, fade_level) - 40usize];
15280};
15281#[doc = " A structure containing a template for a Left/Right effect.\n\n This struct is exclusively for the SDL_HAPTIC_LEFTRIGHT effect.\n\n The Left/Right effect is used to explicitly control the large and small\n motors, commonly found in modern game controllers. The small (right) motor\n is high frequency, and the large (left) motor is low frequency.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HAPTIC_LEFTRIGHT\n **See Also:** SDL_HapticEffect\n"]
15282#[repr(C)]
15283#[derive(Debug, Default, Copy, Clone, Hash)]
15284pub struct SDL_HapticLeftRight {
15285 #[doc = "< SDL_HAPTIC_LEFTRIGHT\n"]
15286 pub type_: SDL_HapticEffectType,
15287 #[doc = "< Duration of the effect in milliseconds.\n"]
15288 pub length: Uint32,
15289 #[doc = "< Control of the large controller motor.\n"]
15290 pub large_magnitude: Uint16,
15291 #[doc = "< Control of the small controller motor.\n"]
15292 pub small_magnitude: Uint16,
15293}
15294#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15295const _: () = {
15296 ["Size of SDL_HapticLeftRight"][::core::mem::size_of::<SDL_HapticLeftRight>() - 12usize];
15297 ["Alignment of SDL_HapticLeftRight"][::core::mem::align_of::<SDL_HapticLeftRight>() - 4usize];
15298 ["Offset of field: SDL_HapticLeftRight::type_"]
15299 [::core::mem::offset_of!(SDL_HapticLeftRight, type_) - 0usize];
15300 ["Offset of field: SDL_HapticLeftRight::length"]
15301 [::core::mem::offset_of!(SDL_HapticLeftRight, length) - 4usize];
15302 ["Offset of field: SDL_HapticLeftRight::large_magnitude"]
15303 [::core::mem::offset_of!(SDL_HapticLeftRight, large_magnitude) - 8usize];
15304 ["Offset of field: SDL_HapticLeftRight::small_magnitude"]
15305 [::core::mem::offset_of!(SDL_HapticLeftRight, small_magnitude) - 10usize];
15306};
15307#[doc = " A structure containing a template for the SDL_HAPTIC_CUSTOM effect.\n\n This struct is exclusively for the SDL_HAPTIC_CUSTOM effect.\n\n A custom force feedback effect is much like a periodic effect, where the\n application can define its exact shape. You will have to allocate the data\n yourself. Data should consist of channels * samples Uint16 samples.\n\n If channels is one, the effect is rotated using the defined direction.\n Otherwise it uses the samples in data for the different axes.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HAPTIC_CUSTOM\n **See Also:** SDL_HapticEffect\n"]
15308#[repr(C)]
15309#[derive(Debug, Copy, Clone, Hash)]
15310pub struct SDL_HapticCustom {
15311 #[doc = "< SDL_HAPTIC_CUSTOM\n"]
15312 pub type_: SDL_HapticEffectType,
15313 #[doc = "< Direction of the effect.\n"]
15314 pub direction: SDL_HapticDirection,
15315 #[doc = "< Duration of the effect.\n"]
15316 pub length: Uint32,
15317 #[doc = "< Delay before starting the effect.\n"]
15318 pub delay: Uint16,
15319 #[doc = "< Button that triggers the effect.\n"]
15320 pub button: Uint16,
15321 #[doc = "< How soon it can be triggered again after button.\n"]
15322 pub interval: Uint16,
15323 #[doc = "< Axes to use, minimum of one.\n"]
15324 pub channels: Uint8,
15325 #[doc = "< Sample periods.\n"]
15326 pub period: Uint16,
15327 #[doc = "< Amount of samples.\n"]
15328 pub samples: Uint16,
15329 #[doc = "< Should contain channels*samples items.\n"]
15330 pub data: *mut Uint16,
15331 #[doc = "< Duration of the attack.\n"]
15332 pub attack_length: Uint16,
15333 #[doc = "< Level at the start of the attack.\n"]
15334 pub attack_level: Uint16,
15335 #[doc = "< Duration of the fade.\n"]
15336 pub fade_length: Uint16,
15337 #[doc = "< Level at the end of the fade.\n"]
15338 pub fade_level: Uint16,
15339}
15340#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15341const _: () = {
15342 ["Size of SDL_HapticCustom"][::core::mem::size_of::<SDL_HapticCustom>() - 56usize];
15343 ["Alignment of SDL_HapticCustom"][::core::mem::align_of::<SDL_HapticCustom>() - 8usize];
15344 ["Offset of field: SDL_HapticCustom::type_"]
15345 [::core::mem::offset_of!(SDL_HapticCustom, type_) - 0usize];
15346 ["Offset of field: SDL_HapticCustom::direction"]
15347 [::core::mem::offset_of!(SDL_HapticCustom, direction) - 4usize];
15348 ["Offset of field: SDL_HapticCustom::length"]
15349 [::core::mem::offset_of!(SDL_HapticCustom, length) - 20usize];
15350 ["Offset of field: SDL_HapticCustom::delay"]
15351 [::core::mem::offset_of!(SDL_HapticCustom, delay) - 24usize];
15352 ["Offset of field: SDL_HapticCustom::button"]
15353 [::core::mem::offset_of!(SDL_HapticCustom, button) - 26usize];
15354 ["Offset of field: SDL_HapticCustom::interval"]
15355 [::core::mem::offset_of!(SDL_HapticCustom, interval) - 28usize];
15356 ["Offset of field: SDL_HapticCustom::channels"]
15357 [::core::mem::offset_of!(SDL_HapticCustom, channels) - 30usize];
15358 ["Offset of field: SDL_HapticCustom::period"]
15359 [::core::mem::offset_of!(SDL_HapticCustom, period) - 32usize];
15360 ["Offset of field: SDL_HapticCustom::samples"]
15361 [::core::mem::offset_of!(SDL_HapticCustom, samples) - 34usize];
15362 ["Offset of field: SDL_HapticCustom::data"]
15363 [::core::mem::offset_of!(SDL_HapticCustom, data) - 40usize];
15364 ["Offset of field: SDL_HapticCustom::attack_length"]
15365 [::core::mem::offset_of!(SDL_HapticCustom, attack_length) - 48usize];
15366 ["Offset of field: SDL_HapticCustom::attack_level"]
15367 [::core::mem::offset_of!(SDL_HapticCustom, attack_level) - 50usize];
15368 ["Offset of field: SDL_HapticCustom::fade_length"]
15369 [::core::mem::offset_of!(SDL_HapticCustom, fade_length) - 52usize];
15370 ["Offset of field: SDL_HapticCustom::fade_level"]
15371 [::core::mem::offset_of!(SDL_HapticCustom, fade_level) - 54usize];
15372};
15373impl Default for SDL_HapticCustom {
15374 fn default() -> Self {
15375 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
15376 unsafe {
15377 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
15378 s.assume_init()
15379 }
15380 }
15381}
15382#[doc = " The generic template for any haptic effect.\n\n All values max at 32767 (0x7FFF). Signed values also can be negative. Time\n values unless specified otherwise are in milliseconds.\n\n You can also pass SDL_HAPTIC_INFINITY to length instead of a 0-32767 value.\n Neither delay, interval, attack_length nor fade_length support\n SDL_HAPTIC_INFINITY. Fade will also not be used since effect never ends.\n\n Additionally, the SDL_HAPTIC_RAMP effect does not support a duration of\n SDL_HAPTIC_INFINITY.\n\n Button triggers may not be supported on all devices, it is advised to not\n use them if possible. Buttons start at index 1 instead of index 0 like the\n joystick.\n\n If both attack_length and fade_level are 0, the envelope is not used,\n otherwise both values are used.\n\n Common parts:\n\n ```c\n // Replay - All effects have this\n Uint32 length; // Duration of effect (ms).\n Uint16 delay; // Delay before starting effect.\n\n // Trigger - All effects have this\n Uint16 button; // Button that triggers effect.\n Uint16 interval; // How soon before effect can be triggered again.\n\n // Envelope - All effects except condition effects have this\n Uint16 attack_length; // Duration of the attack (ms).\n Uint16 attack_level; // Level at the start of the attack.\n Uint16 fade_length; // Duration of the fade out (ms).\n Uint16 fade_level; // Level at the end of the fade.\n ```\n\n Here we have an example of a constant effect evolution in time:\n\n ```\n Strength\n ^\n |\n | effect level --> _________________\n | / \\\n | / \\\n | / \\\n | / \\\n | attack_level --> | \\\n | | | <--- fade_level\n |\n +--------------------------------------------------> Time\n [--] [---]\n attack_length fade_length\n\n [------------------][-----------------------]\n delay length\n ```\n\n Note either the attack_level or the fade_level may be above the actual\n effect level.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_HapticConstant\n **See Also:** SDL_HapticPeriodic\n **See Also:** SDL_HapticCondition\n **See Also:** SDL_HapticRamp\n **See Also:** SDL_HapticLeftRight\n **See Also:** SDL_HapticCustom\n"]
15383#[repr(C)]
15384#[derive(Copy, Clone)]
15385pub union SDL_HapticEffect {
15386 #[doc = "< Effect type.\n"]
15387 pub type_: SDL_HapticEffectType,
15388 #[doc = "< Constant effect.\n"]
15389 pub constant: SDL_HapticConstant,
15390 #[doc = "< Periodic effect.\n"]
15391 pub periodic: SDL_HapticPeriodic,
15392 #[doc = "< Condition effect.\n"]
15393 pub condition: SDL_HapticCondition,
15394 #[doc = "< Ramp effect.\n"]
15395 pub ramp: SDL_HapticRamp,
15396 #[doc = "< Left/Right effect.\n"]
15397 pub leftright: SDL_HapticLeftRight,
15398 #[doc = "< Custom effect.\n"]
15399 pub custom: SDL_HapticCustom,
15400}
15401#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15402const _: () = {
15403 ["Size of SDL_HapticEffect"][::core::mem::size_of::<SDL_HapticEffect>() - 72usize];
15404 ["Alignment of SDL_HapticEffect"][::core::mem::align_of::<SDL_HapticEffect>() - 8usize];
15405 ["Offset of field: SDL_HapticEffect::type_"]
15406 [::core::mem::offset_of!(SDL_HapticEffect, type_) - 0usize];
15407 ["Offset of field: SDL_HapticEffect::constant"]
15408 [::core::mem::offset_of!(SDL_HapticEffect, constant) - 0usize];
15409 ["Offset of field: SDL_HapticEffect::periodic"]
15410 [::core::mem::offset_of!(SDL_HapticEffect, periodic) - 0usize];
15411 ["Offset of field: SDL_HapticEffect::condition"]
15412 [::core::mem::offset_of!(SDL_HapticEffect, condition) - 0usize];
15413 ["Offset of field: SDL_HapticEffect::ramp"]
15414 [::core::mem::offset_of!(SDL_HapticEffect, ramp) - 0usize];
15415 ["Offset of field: SDL_HapticEffect::leftright"]
15416 [::core::mem::offset_of!(SDL_HapticEffect, leftright) - 0usize];
15417 ["Offset of field: SDL_HapticEffect::custom"]
15418 [::core::mem::offset_of!(SDL_HapticEffect, custom) - 0usize];
15419};
15420impl Default for SDL_HapticEffect {
15421 fn default() -> Self {
15422 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
15423 unsafe {
15424 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
15425 s.assume_init()
15426 }
15427 }
15428}
15429#[doc = " This is a unique ID for a haptic device for the time it is connected to the\n system, and is never reused for the lifetime of the application.\n\n If the haptic device is disconnected and reconnected, it will get a new ID.\n\n The value 0 is an invalid ID.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
15430pub type SDL_HapticID = Uint32;
15431unsafe extern "C" {
15432 #[doc = " Get a list of currently connected haptic devices.\n\n **Parameter:** count a pointer filled in with the number of haptic devices\n returned, may be NULL.\n **Returns:** a 0 terminated array of haptic device instance IDs or NULL on\n failure; call SDL_GetError() for more information. This should be\n freed with SDL_free() when it is no longer needed.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenHaptic\n"]
15433 pub fn SDL_GetHaptics(count: *mut core::ffi::c_int) -> *mut SDL_HapticID;
15434}
15435unsafe extern "C" {
15436 #[doc = " Get the implementation dependent name of a haptic device.\n\n This can be called before any haptic devices are opened.\n\n **Parameter:** instance_id the haptic device instance ID.\n **Returns:** the name of the selected haptic device. If no name can be found,\n this function returns NULL; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHapticName\n **See Also:** SDL_OpenHaptic\n"]
15437 pub fn SDL_GetHapticNameForID(instance_id: SDL_HapticID) -> *const core::ffi::c_char;
15438}
15439unsafe extern "C" {
15440 #[doc = " Open a haptic device for use.\n\n The index passed as an argument refers to the N'th haptic device on this\n system.\n\n When opening a haptic device, its gain will be set to maximum and\n autocenter will be disabled. To modify these values use SDL_SetHapticGain()\n and SDL_SetHapticAutocenter().\n\n **Parameter:** instance_id the haptic device instance ID.\n **Returns:** the device identifier or NULL on failure; call SDL_GetError() for\n more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseHaptic\n **See Also:** SDL_GetHaptics\n **See Also:** SDL_OpenHapticFromJoystick\n **See Also:** SDL_OpenHapticFromMouse\n **See Also:** SDL_SetHapticAutocenter\n **See Also:** SDL_SetHapticGain\n"]
15441 pub fn SDL_OpenHaptic(instance_id: SDL_HapticID) -> *mut SDL_Haptic;
15442}
15443unsafe extern "C" {
15444 #[doc = " Get the SDL_Haptic associated with an instance ID, if it has been opened.\n\n **Parameter:** instance_id the instance ID to get the SDL_Haptic for.\n **Returns:** an SDL_Haptic on success or NULL on failure or if it hasn't been\n opened yet; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15445 pub fn SDL_GetHapticFromID(instance_id: SDL_HapticID) -> *mut SDL_Haptic;
15446}
15447unsafe extern "C" {
15448 #[doc = " Get the instance ID of an opened haptic device.\n\n **Parameter:** haptic the SDL_Haptic device to query.\n **Returns:** the instance ID of the specified haptic device on success or 0 on\n failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15449 pub fn SDL_GetHapticID(haptic: *mut SDL_Haptic) -> SDL_HapticID;
15450}
15451unsafe extern "C" {
15452 #[doc = " Get the implementation dependent name of a haptic device.\n\n **Parameter:** haptic the SDL_Haptic obtained from SDL_OpenJoystick().\n **Returns:** the name of the selected haptic device. If no name can be found,\n this function returns NULL; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHapticNameForID\n"]
15453 pub fn SDL_GetHapticName(haptic: *mut SDL_Haptic) -> *const core::ffi::c_char;
15454}
15455unsafe extern "C" {
15456 #[doc = " Query whether or not the current mouse has haptic capabilities.\n\n **Returns:** true if the mouse is haptic or false if it isn't.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenHapticFromMouse\n"]
15457 pub fn SDL_IsMouseHaptic() -> bool;
15458}
15459unsafe extern "C" {
15460 #[doc = " Try to open a haptic device from the current mouse.\n\n **Returns:** the haptic device identifier or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseHaptic\n **See Also:** SDL_IsMouseHaptic\n"]
15461 pub fn SDL_OpenHapticFromMouse() -> *mut SDL_Haptic;
15462}
15463unsafe extern "C" {
15464 #[doc = " Query if a joystick has haptic features.\n\n **Parameter:** joystick the SDL_Joystick to test for haptic capabilities.\n **Returns:** true if the joystick is haptic or false if it isn't.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenHapticFromJoystick\n"]
15465 pub fn SDL_IsJoystickHaptic(joystick: *mut SDL_Joystick) -> bool;
15466}
15467unsafe extern "C" {
15468 #[doc = " Open a haptic device for use from a joystick device.\n\n You must still close the haptic device separately. It will not be closed\n with the joystick.\n\n When opened from a joystick you should first close the haptic device before\n closing the joystick device. If not, on some implementations the haptic\n device will also get unallocated and you'll be unable to use force feedback\n on that device.\n\n **Parameter:** joystick the SDL_Joystick to create a haptic device from.\n **Returns:** a valid haptic device identifier on success or NULL on failure;\n call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseHaptic\n **See Also:** SDL_IsJoystickHaptic\n"]
15469 pub fn SDL_OpenHapticFromJoystick(joystick: *mut SDL_Joystick) -> *mut SDL_Haptic;
15470}
15471unsafe extern "C" {
15472 #[doc = " Close a haptic device previously opened with SDL_OpenHaptic().\n\n **Parameter:** haptic the SDL_Haptic device to close.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenHaptic\n"]
15473 pub fn SDL_CloseHaptic(haptic: *mut SDL_Haptic);
15474}
15475unsafe extern "C" {
15476 #[doc = " Get the number of effects a haptic device can store.\n\n On some platforms this isn't fully supported, and therefore is an\n approximation. Always check to see if your created effect was actually\n created and do not rely solely on SDL_GetMaxHapticEffects().\n\n **Parameter:** haptic the SDL_Haptic device to query.\n **Returns:** the number of effects the haptic device can store or a negative\n error code on failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMaxHapticEffectsPlaying\n **See Also:** SDL_GetHapticFeatures\n"]
15477 pub fn SDL_GetMaxHapticEffects(haptic: *mut SDL_Haptic) -> core::ffi::c_int;
15478}
15479unsafe extern "C" {
15480 #[doc = " Get the number of effects a haptic device can play at the same time.\n\n This is not supported on all platforms, but will always return a value.\n\n **Parameter:** haptic the SDL_Haptic device to query maximum playing effects.\n **Returns:** the number of effects the haptic device can play at the same time\n or -1 on failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetMaxHapticEffects\n **See Also:** SDL_GetHapticFeatures\n"]
15481 pub fn SDL_GetMaxHapticEffectsPlaying(haptic: *mut SDL_Haptic) -> core::ffi::c_int;
15482}
15483unsafe extern "C" {
15484 #[doc = " Get the haptic device's supported features in bitwise manner.\n\n **Parameter:** haptic the SDL_Haptic device to query.\n **Returns:** a list of supported haptic features in bitwise manner (OR'd), or 0\n on failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_HapticEffectSupported\n **See Also:** SDL_GetMaxHapticEffects\n"]
15485 pub fn SDL_GetHapticFeatures(haptic: *mut SDL_Haptic) -> Uint32;
15486}
15487unsafe extern "C" {
15488 #[doc = " Get the number of haptic axes the device has.\n\n The number of haptic axes might be useful if working with the\n SDL_HapticDirection effect.\n\n **Parameter:** haptic the SDL_Haptic device to query.\n **Returns:** the number of axes on success or -1 on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15489 pub fn SDL_GetNumHapticAxes(haptic: *mut SDL_Haptic) -> core::ffi::c_int;
15490}
15491unsafe extern "C" {
15492 #[doc = " Check to see if an effect is supported by a haptic device.\n\n **Parameter:** haptic the SDL_Haptic device to query.\n **Parameter:** effect the desired effect to query.\n **Returns:** true if the effect is supported or false if it isn't.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateHapticEffect\n **See Also:** SDL_GetHapticFeatures\n"]
15493 pub fn SDL_HapticEffectSupported(
15494 haptic: *mut SDL_Haptic,
15495 effect: *const SDL_HapticEffect,
15496 ) -> bool;
15497}
15498unsafe extern "C" {
15499 #[doc = " Create a new haptic effect on a specified device.\n\n **Parameter:** haptic an SDL_Haptic device to create the effect on.\n **Parameter:** effect an SDL_HapticEffect structure containing the properties of\n the effect to create.\n **Returns:** the ID of the effect on success or -1 on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyHapticEffect\n **See Also:** SDL_RunHapticEffect\n **See Also:** SDL_UpdateHapticEffect\n"]
15500 pub fn SDL_CreateHapticEffect(
15501 haptic: *mut SDL_Haptic,
15502 effect: *const SDL_HapticEffect,
15503 ) -> SDL_HapticEffectID;
15504}
15505unsafe extern "C" {
15506 #[doc = " Update the properties of an effect.\n\n Can be used dynamically, although behavior when dynamically changing\n direction may be strange. Specifically the effect may re-upload itself and\n start playing from the start. You also cannot change the type either when\n running SDL_UpdateHapticEffect().\n\n **Parameter:** haptic the SDL_Haptic device that has the effect.\n **Parameter:** effect the identifier of the effect to update.\n **Parameter:** data an SDL_HapticEffect structure containing the new effect\n properties to use.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateHapticEffect\n **See Also:** SDL_RunHapticEffect\n"]
15507 pub fn SDL_UpdateHapticEffect(
15508 haptic: *mut SDL_Haptic,
15509 effect: SDL_HapticEffectID,
15510 data: *const SDL_HapticEffect,
15511 ) -> bool;
15512}
15513unsafe extern "C" {
15514 #[doc = " Run the haptic effect on its associated haptic device.\n\n To repeat the effect over and over indefinitely, set `iterations` to\n `SDL_HAPTIC_INFINITY`. (Repeats the envelope - attack and fade.) To make\n one instance of the effect last indefinitely (so the effect does not fade),\n set the effect's `length` in its structure/union to `SDL_HAPTIC_INFINITY`\n instead.\n\n **Parameter:** haptic the SDL_Haptic device to run the effect on.\n **Parameter:** effect the ID of the haptic effect to run.\n **Parameter:** iterations the number of iterations to run the effect; use\n `SDL_HAPTIC_INFINITY` to repeat forever.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHapticEffectStatus\n **See Also:** SDL_StopHapticEffect\n **See Also:** SDL_StopHapticEffects\n"]
15515 pub fn SDL_RunHapticEffect(
15516 haptic: *mut SDL_Haptic,
15517 effect: SDL_HapticEffectID,
15518 iterations: Uint32,
15519 ) -> bool;
15520}
15521unsafe extern "C" {
15522 #[doc = " Stop the haptic effect on its associated haptic device.\n\n **Parameter:** haptic the SDL_Haptic device to stop the effect on.\n **Parameter:** effect the ID of the haptic effect to stop.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RunHapticEffect\n **See Also:** SDL_StopHapticEffects\n"]
15523 pub fn SDL_StopHapticEffect(haptic: *mut SDL_Haptic, effect: SDL_HapticEffectID) -> bool;
15524}
15525unsafe extern "C" {
15526 #[doc = " Destroy a haptic effect on the device.\n\n This will stop the effect if it's running. Effects are automatically\n destroyed when the device is closed.\n\n **Parameter:** haptic the SDL_Haptic device to destroy the effect on.\n **Parameter:** effect the ID of the haptic effect to destroy.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateHapticEffect\n"]
15527 pub fn SDL_DestroyHapticEffect(haptic: *mut SDL_Haptic, effect: SDL_HapticEffectID);
15528}
15529unsafe extern "C" {
15530 #[doc = " Get the status of the current effect on the specified haptic device.\n\n Device must support the SDL_HAPTIC_STATUS feature.\n\n **Parameter:** haptic the SDL_Haptic device to query for the effect status on.\n **Parameter:** effect the ID of the haptic effect to query its status.\n **Returns:** true if it is playing, false if it isn't playing or haptic status\n isn't supported.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHapticFeatures\n"]
15531 pub fn SDL_GetHapticEffectStatus(haptic: *mut SDL_Haptic, effect: SDL_HapticEffectID) -> bool;
15532}
15533unsafe extern "C" {
15534 #[doc = " Set the global gain of the specified haptic device.\n\n Device must support the SDL_HAPTIC_GAIN feature.\n\n The user may specify the maximum gain by setting the environment variable\n `SDL_HAPTIC_GAIN_MAX` which should be between 0 and 100. All calls to\n SDL_SetHapticGain() will scale linearly using `SDL_HAPTIC_GAIN_MAX` as the\n maximum.\n\n **Parameter:** haptic the SDL_Haptic device to set the gain on.\n **Parameter:** gain value to set the gain to, should be between 0 and 100 (0 -\n 100).\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHapticFeatures\n"]
15535 pub fn SDL_SetHapticGain(haptic: *mut SDL_Haptic, gain: core::ffi::c_int) -> bool;
15536}
15537unsafe extern "C" {
15538 #[doc = " Set the global autocenter of the device.\n\n Autocenter should be between 0 and 100. Setting it to 0 will disable\n autocentering.\n\n Device must support the SDL_HAPTIC_AUTOCENTER feature.\n\n **Parameter:** haptic the SDL_Haptic device to set autocentering on.\n **Parameter:** autocenter value to set autocenter to (0-100).\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHapticFeatures\n"]
15539 pub fn SDL_SetHapticAutocenter(haptic: *mut SDL_Haptic, autocenter: core::ffi::c_int) -> bool;
15540}
15541unsafe extern "C" {
15542 #[doc = " Pause a haptic device.\n\n Device must support the `SDL_HAPTIC_PAUSE` feature. Call SDL_ResumeHaptic()\n to resume playback.\n\n Do not modify the effects nor add new ones while the device is paused. That\n can cause all sorts of weird errors.\n\n **Parameter:** haptic the SDL_Haptic device to pause.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ResumeHaptic\n"]
15543 pub fn SDL_PauseHaptic(haptic: *mut SDL_Haptic) -> bool;
15544}
15545unsafe extern "C" {
15546 #[doc = " Resume a haptic device.\n\n Call to unpause after SDL_PauseHaptic().\n\n **Parameter:** haptic the SDL_Haptic device to unpause.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PauseHaptic\n"]
15547 pub fn SDL_ResumeHaptic(haptic: *mut SDL_Haptic) -> bool;
15548}
15549unsafe extern "C" {
15550 #[doc = " Stop all the currently playing effects on a haptic device.\n\n **Parameter:** haptic the SDL_Haptic device to stop.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RunHapticEffect\n **See Also:** SDL_StopHapticEffect\n"]
15551 pub fn SDL_StopHapticEffects(haptic: *mut SDL_Haptic) -> bool;
15552}
15553unsafe extern "C" {
15554 #[doc = " Check whether rumble is supported on a haptic device.\n\n **Parameter:** haptic haptic device to check for rumble support.\n **Returns:** true if the effect is supported or false if it isn't.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_InitHapticRumble\n"]
15555 pub fn SDL_HapticRumbleSupported(haptic: *mut SDL_Haptic) -> bool;
15556}
15557unsafe extern "C" {
15558 #[doc = " Initialize a haptic device for simple rumble playback.\n\n **Parameter:** haptic the haptic device to initialize for simple rumble playback.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PlayHapticRumble\n **See Also:** SDL_StopHapticRumble\n **See Also:** SDL_HapticRumbleSupported\n"]
15559 pub fn SDL_InitHapticRumble(haptic: *mut SDL_Haptic) -> bool;
15560}
15561unsafe extern "C" {
15562 #[doc = " Run a simple rumble effect on a haptic device.\n\n **Parameter:** haptic the haptic device to play the rumble effect on.\n **Parameter:** strength strength of the rumble to play as a 0-1 float value.\n **Parameter:** length length of the rumble to play in milliseconds.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_InitHapticRumble\n **See Also:** SDL_StopHapticRumble\n"]
15563 pub fn SDL_PlayHapticRumble(haptic: *mut SDL_Haptic, strength: f32, length: Uint32) -> bool;
15564}
15565unsafe extern "C" {
15566 #[doc = " Stop the simple rumble on a haptic device.\n\n **Parameter:** haptic the haptic device to stop the rumble effect on.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_PlayHapticRumble\n"]
15567 pub fn SDL_StopHapticRumble(haptic: *mut SDL_Haptic) -> bool;
15568}
15569#[repr(C)]
15570#[derive(Debug, Copy, Clone)]
15571pub struct SDL_hid_device {
15572 _unused: [u8; 0],
15573}
15574impl SDL_hid_bus_type {
15575 #[doc = " Unknown bus type\n"]
15576 pub const SDL_HID_API_BUS_UNKNOWN: SDL_hid_bus_type = SDL_hid_bus_type(0);
15577 #[doc = " USB bus\nSpecifications:\nhttps://usb.org/hid\n"]
15578 pub const SDL_HID_API_BUS_USB: SDL_hid_bus_type = SDL_hid_bus_type(1);
15579 #[doc = " Bluetooth or Bluetooth LE bus\nSpecifications:\nhttps://www.bluetooth.com/specifications/specs/human-interface-device-profile-1-1-1/\nhttps://www.bluetooth.com/specifications/specs/hid-service-1-0/\nhttps://www.bluetooth.com/specifications/specs/hid-over-gatt-profile-1-0/\n"]
15580 pub const SDL_HID_API_BUS_BLUETOOTH: SDL_hid_bus_type = SDL_hid_bus_type(2);
15581 #[doc = " I2C bus\nSpecifications:\nhttps://docs.microsoft.com/previous-versions/windows/hardware/design/dn642101(v=vs.85)\n"]
15582 pub const SDL_HID_API_BUS_I2C: SDL_hid_bus_type = SDL_hid_bus_type(3);
15583 #[doc = " SPI bus\nSpecifications:\nhttps://www.microsoft.com/download/details.aspx?id=103325\n"]
15584 pub const SDL_HID_API_BUS_SPI: SDL_hid_bus_type = SDL_hid_bus_type(4);
15585}
15586#[repr(transparent)]
15587#[doc = " HID underlying bus types.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
15588#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15589pub struct SDL_hid_bus_type(pub core::ffi::c_uint);
15590#[doc = " Information about a connected HID device\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
15591#[repr(C)]
15592#[derive(Debug, Copy, Clone, Hash)]
15593pub struct SDL_hid_device_info {
15594 #[doc = " Platform-specific device path\n"]
15595 pub path: *mut core::ffi::c_char,
15596 #[doc = " Device Vendor ID\n"]
15597 pub vendor_id: core::ffi::c_ushort,
15598 #[doc = " Device Product ID\n"]
15599 pub product_id: core::ffi::c_ushort,
15600 #[doc = " Serial Number\n"]
15601 pub serial_number: *mut wchar_t,
15602 #[doc = " Device Release Number in binary-coded decimal,\nalso known as Device Version Number\n"]
15603 pub release_number: core::ffi::c_ushort,
15604 #[doc = " Manufacturer String\n"]
15605 pub manufacturer_string: *mut wchar_t,
15606 #[doc = " Product string\n"]
15607 pub product_string: *mut wchar_t,
15608 #[doc = " Usage Page for this Device/Interface\n(Windows/Mac/hidraw only)\n"]
15609 pub usage_page: core::ffi::c_ushort,
15610 #[doc = " Usage for this Device/Interface\n(Windows/Mac/hidraw only)\n"]
15611 pub usage: core::ffi::c_ushort,
15612 #[doc = " The USB interface which this logical device\nrepresents.\n\nValid only if the device is a USB HID device.\nSet to -1 in all other cases.\n"]
15613 pub interface_number: core::ffi::c_int,
15614 #[doc = " Additional information about the USB interface.\nValid on libusb and Android implementations.\n"]
15615 pub interface_class: core::ffi::c_int,
15616 pub interface_subclass: core::ffi::c_int,
15617 pub interface_protocol: core::ffi::c_int,
15618 #[doc = " Underlying bus type\n"]
15619 pub bus_type: SDL_hid_bus_type,
15620 #[doc = " Pointer to the next device\n"]
15621 pub next: *mut SDL_hid_device_info,
15622}
15623#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15624const _: () = {
15625 ["Size of SDL_hid_device_info"][::core::mem::size_of::<SDL_hid_device_info>() - 80usize];
15626 ["Alignment of SDL_hid_device_info"][::core::mem::align_of::<SDL_hid_device_info>() - 8usize];
15627 ["Offset of field: SDL_hid_device_info::path"]
15628 [::core::mem::offset_of!(SDL_hid_device_info, path) - 0usize];
15629 ["Offset of field: SDL_hid_device_info::vendor_id"]
15630 [::core::mem::offset_of!(SDL_hid_device_info, vendor_id) - 8usize];
15631 ["Offset of field: SDL_hid_device_info::product_id"]
15632 [::core::mem::offset_of!(SDL_hid_device_info, product_id) - 10usize];
15633 ["Offset of field: SDL_hid_device_info::serial_number"]
15634 [::core::mem::offset_of!(SDL_hid_device_info, serial_number) - 16usize];
15635 ["Offset of field: SDL_hid_device_info::release_number"]
15636 [::core::mem::offset_of!(SDL_hid_device_info, release_number) - 24usize];
15637 ["Offset of field: SDL_hid_device_info::manufacturer_string"]
15638 [::core::mem::offset_of!(SDL_hid_device_info, manufacturer_string) - 32usize];
15639 ["Offset of field: SDL_hid_device_info::product_string"]
15640 [::core::mem::offset_of!(SDL_hid_device_info, product_string) - 40usize];
15641 ["Offset of field: SDL_hid_device_info::usage_page"]
15642 [::core::mem::offset_of!(SDL_hid_device_info, usage_page) - 48usize];
15643 ["Offset of field: SDL_hid_device_info::usage"]
15644 [::core::mem::offset_of!(SDL_hid_device_info, usage) - 50usize];
15645 ["Offset of field: SDL_hid_device_info::interface_number"]
15646 [::core::mem::offset_of!(SDL_hid_device_info, interface_number) - 52usize];
15647 ["Offset of field: SDL_hid_device_info::interface_class"]
15648 [::core::mem::offset_of!(SDL_hid_device_info, interface_class) - 56usize];
15649 ["Offset of field: SDL_hid_device_info::interface_subclass"]
15650 [::core::mem::offset_of!(SDL_hid_device_info, interface_subclass) - 60usize];
15651 ["Offset of field: SDL_hid_device_info::interface_protocol"]
15652 [::core::mem::offset_of!(SDL_hid_device_info, interface_protocol) - 64usize];
15653 ["Offset of field: SDL_hid_device_info::bus_type"]
15654 [::core::mem::offset_of!(SDL_hid_device_info, bus_type) - 68usize];
15655 ["Offset of field: SDL_hid_device_info::next"]
15656 [::core::mem::offset_of!(SDL_hid_device_info, next) - 72usize];
15657};
15658impl Default for SDL_hid_device_info {
15659 fn default() -> Self {
15660 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
15661 unsafe {
15662 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
15663 s.assume_init()
15664 }
15665 }
15666}
15667unsafe extern "C" {
15668 #[doc = " Initialize the HIDAPI library.\n\n This function initializes the HIDAPI library. Calling it is not strictly\n necessary, as it will be called automatically by SDL_hid_enumerate(),\n SDL_hid_open(), and SDL_hid_open_path() if needed. This function should be\n called at the beginning of execution however, if there is a chance of\n HIDAPI handles being opened by different threads simultaneously.\n\n Each call to this function should have a matching call to SDL_hid_exit()\n\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_hid_exit\n"]
15669 pub fn SDL_hid_init() -> core::ffi::c_int;
15670}
15671unsafe extern "C" {
15672 #[doc = " Finalize the HIDAPI library.\n\n This function frees all of the static data associated with HIDAPI. It\n should be called at the end of execution to avoid memory leaks.\n\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_hid_init\n"]
15673 pub fn SDL_hid_exit() -> core::ffi::c_int;
15674}
15675unsafe extern "C" {
15676 #[doc = " Check to see if devices may have been added or removed.\n\n Enumerating the HID devices is an expensive operation, so you can call this\n to see if there have been any system device changes since the last call to\n this function. A change in the counter returned doesn't necessarily mean\n that anything has changed, but you can call SDL_hid_enumerate() to get an\n updated device list.\n\n Calling this function for the first time may cause a thread or other system\n resource to be allocated to track device change notifications.\n\n **Returns:** a change counter that is incremented with each potential device\n change, or 0 if device change detection isn't available.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_hid_enumerate\n"]
15677 pub fn SDL_hid_device_change_count() -> Uint32;
15678}
15679unsafe extern "C" {
15680 #[doc = " Enumerate the HID Devices.\n\n This function returns a linked list of all the HID devices attached to the\n system which match vendor_id and product_id. If `vendor_id` is set to 0\n then any vendor matches. If `product_id` is set to 0 then any product\n matches. If `vendor_id` and `product_id` are both set to 0, then all HID\n devices will be returned.\n\n By default SDL will only enumerate controllers, to reduce risk of hanging\n or crashing on bad drivers, but SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS\n can be set to \"0\" to enumerate all HID devices.\n\n **Parameter:** vendor_id the Vendor ID (VID) of the types of device to open, or 0\n to match any vendor.\n **Parameter:** product_id the Product ID (PID) of the types of device to open, or 0\n to match any product.\n **Returns:** a pointer to a linked list of type SDL_hid_device_info, containing\n information about the HID devices attached to the system, or NULL\n in the case of failure. Free this linked list by calling\n SDL_hid_free_enumeration().\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_hid_device_change_count\n"]
15681 pub fn SDL_hid_enumerate(
15682 vendor_id: core::ffi::c_ushort,
15683 product_id: core::ffi::c_ushort,
15684 ) -> *mut SDL_hid_device_info;
15685}
15686unsafe extern "C" {
15687 #[doc = " Free an enumeration linked list.\n\n This function frees a linked list created by SDL_hid_enumerate().\n\n **Parameter:** devs pointer to a list of struct_device returned from\n SDL_hid_enumerate().\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15688 pub fn SDL_hid_free_enumeration(devs: *mut SDL_hid_device_info);
15689}
15690unsafe extern "C" {
15691 #[doc = " Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally\n a serial number.\n\n If `serial_number` is NULL, the first device with the specified VID and PID\n is opened.\n\n **Parameter:** vendor_id the Vendor ID (VID) of the device to open.\n **Parameter:** product_id the Product ID (PID) of the device to open.\n **Parameter:** serial_number the Serial Number of the device to open (Optionally\n NULL).\n **Returns:** a pointer to a SDL_hid_device object on success or NULL on\n failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15692 pub fn SDL_hid_open(
15693 vendor_id: core::ffi::c_ushort,
15694 product_id: core::ffi::c_ushort,
15695 serial_number: *const wchar_t,
15696 ) -> *mut SDL_hid_device;
15697}
15698unsafe extern "C" {
15699 #[doc = " Open a HID device by its path name.\n\n The path name be determined by calling SDL_hid_enumerate(), or a\n platform-specific path name can be used (eg: /dev/hidraw0 on Linux).\n\n **Parameter:** path the path name of the device to open.\n **Returns:** a pointer to a SDL_hid_device object on success or NULL on\n failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15700 pub fn SDL_hid_open_path(path: *const core::ffi::c_char) -> *mut SDL_hid_device;
15701}
15702unsafe extern "C" {
15703 #[doc = " Get the properties associated with an SDL_hid_device.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER`: the libusb_device_handle\n associated with the device, if it was opened using libusb.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
15704 pub fn SDL_hid_get_properties(dev: *mut SDL_hid_device) -> SDL_PropertiesID;
15705}
15706unsafe extern "C" {
15707 #[doc = " Write an Output report to a HID device.\n\n The first byte of `data` must contain the Report ID. For devices which only\n support a single report, this must be set to 0x0. The remaining bytes\n contain the report data. Since the Report ID is mandatory, calls to\n SDL_hid_write() will always contain one more byte than the report contains.\n For example, if a hid report is 16 bytes long, 17 bytes must be passed to\n SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),\n followed by the report data (16 bytes). In this example, the length passed\n in would be 17.\n\n SDL_hid_write() will send the data on the first OUT endpoint, if one\n exists. If it does not, it will send the data through the Control Endpoint\n (Endpoint 0).\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** data the data to send, including the report number as the first\n byte.\n **Parameter:** length the length in bytes of the data to send.\n **Returns:** the actual number of bytes written and -1 on on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15708 pub fn SDL_hid_write(
15709 dev: *mut SDL_hid_device,
15710 data: *const core::ffi::c_uchar,
15711 length: usize,
15712 ) -> core::ffi::c_int;
15713}
15714unsafe extern "C" {
15715 #[doc = " Read an Input report from a HID device with timeout.\n\n Input reports are returned to the host through the INTERRUPT IN endpoint.\n The first byte will contain the Report number if the device uses numbered\n reports.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** data a buffer to put the read data into.\n **Parameter:** length the number of bytes to read. For devices with multiple\n reports, make sure to read an extra byte for the report\n number.\n **Parameter:** milliseconds timeout in milliseconds or -1 for blocking wait.\n **Returns:** the actual number of bytes read and -1 on on failure; call\n SDL_GetError() for more information. If no packet was available to\n be read within the timeout period, this function returns 0.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15716 pub fn SDL_hid_read_timeout(
15717 dev: *mut SDL_hid_device,
15718 data: *mut core::ffi::c_uchar,
15719 length: usize,
15720 milliseconds: core::ffi::c_int,
15721 ) -> core::ffi::c_int;
15722}
15723unsafe extern "C" {
15724 #[doc = " Read an Input report from a HID device.\n\n Input reports are returned to the host through the INTERRUPT IN endpoint.\n The first byte will contain the Report number if the device uses numbered\n reports.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** data a buffer to put the read data into.\n **Parameter:** length the number of bytes to read. For devices with multiple\n reports, make sure to read an extra byte for the report\n number.\n **Returns:** the actual number of bytes read and -1 on failure; call\n SDL_GetError() for more information. If no packet was available to\n be read and the handle is in non-blocking mode, this function\n returns 0.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15725 pub fn SDL_hid_read(
15726 dev: *mut SDL_hid_device,
15727 data: *mut core::ffi::c_uchar,
15728 length: usize,
15729 ) -> core::ffi::c_int;
15730}
15731unsafe extern "C" {
15732 #[doc = " Set the device handle to be non-blocking.\n\n In non-blocking mode calls to SDL_hid_read() will return immediately with a\n value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()\n will wait (block) until there is data to read before returning.\n\n Nonblocking can be turned on and off at any time.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** nonblock enable or not the nonblocking reads - 1 to enable\n nonblocking - 0 to disable nonblocking.\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15733 pub fn SDL_hid_set_nonblocking(
15734 dev: *mut SDL_hid_device,
15735 nonblock: core::ffi::c_int,
15736 ) -> core::ffi::c_int;
15737}
15738unsafe extern "C" {
15739 #[doc = " Send a Feature report to the device.\n\n Feature reports are sent over the Control endpoint as a Set_Report\n transfer. The first byte of `data` must contain the Report ID. For devices\n which only support a single report, this must be set to 0x0. The remaining\n bytes contain the report data. Since the Report ID is mandatory, calls to\n SDL_hid_send_feature_report() will always contain one more byte than the\n report contains. For example, if a hid report is 16 bytes long, 17 bytes\n must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for\n devices which do not use numbered reports), followed by the report data (16\n bytes). In this example, the length passed in would be 17.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** data the data to send, including the report number as the first\n byte.\n **Parameter:** length the length in bytes of the data to send, including the report\n number.\n **Returns:** the actual number of bytes written and -1 on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15740 pub fn SDL_hid_send_feature_report(
15741 dev: *mut SDL_hid_device,
15742 data: *const core::ffi::c_uchar,
15743 length: usize,
15744 ) -> core::ffi::c_int;
15745}
15746unsafe extern "C" {
15747 #[doc = " Get a feature report from a HID device.\n\n Set the first byte of `data` to the Report ID of the report to be read.\n Make sure to allow space for this extra byte in `data`. Upon return, the\n first byte will still contain the Report ID, and the report data will start\n in data[1].\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** data a buffer to put the read data into, including the Report ID.\n Set the first byte of `data` to the Report ID of the report to\n be read, or set it to zero if your device does not use numbered\n reports.\n **Parameter:** length the number of bytes to read, including an extra byte for the\n report ID. The buffer can be longer than the actual report.\n **Returns:** the number of bytes read plus one for the report ID (which is\n still in the first byte), or -1 on on failure; call SDL_GetError()\n for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15748 pub fn SDL_hid_get_feature_report(
15749 dev: *mut SDL_hid_device,
15750 data: *mut core::ffi::c_uchar,
15751 length: usize,
15752 ) -> core::ffi::c_int;
15753}
15754unsafe extern "C" {
15755 #[doc = " Get an input report from a HID device.\n\n Set the first byte of `data` to the Report ID of the report to be read.\n Make sure to allow space for this extra byte in `data`. Upon return, the\n first byte will still contain the Report ID, and the report data will start\n in data[1].\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** data a buffer to put the read data into, including the Report ID.\n Set the first byte of `data` to the Report ID of the report to\n be read, or set it to zero if your device does not use numbered\n reports.\n **Parameter:** length the number of bytes to read, including an extra byte for the\n report ID. The buffer can be longer than the actual report.\n **Returns:** the number of bytes read plus one for the report ID (which is\n still in the first byte), or -1 on on failure; call SDL_GetError()\n for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15756 pub fn SDL_hid_get_input_report(
15757 dev: *mut SDL_hid_device,
15758 data: *mut core::ffi::c_uchar,
15759 length: usize,
15760 ) -> core::ffi::c_int;
15761}
15762unsafe extern "C" {
15763 #[doc = " Close a HID device.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15764 pub fn SDL_hid_close(dev: *mut SDL_hid_device) -> core::ffi::c_int;
15765}
15766unsafe extern "C" {
15767 #[doc = " Get The Manufacturer String from a HID device.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** string a wide string buffer to put the data into.\n **Parameter:** maxlen the length of the buffer in multiples of wchar_t.\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15768 pub fn SDL_hid_get_manufacturer_string(
15769 dev: *mut SDL_hid_device,
15770 string: *mut wchar_t,
15771 maxlen: usize,
15772 ) -> core::ffi::c_int;
15773}
15774unsafe extern "C" {
15775 #[doc = " Get The Product String from a HID device.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** string a wide string buffer to put the data into.\n **Parameter:** maxlen the length of the buffer in multiples of wchar_t.\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15776 pub fn SDL_hid_get_product_string(
15777 dev: *mut SDL_hid_device,
15778 string: *mut wchar_t,
15779 maxlen: usize,
15780 ) -> core::ffi::c_int;
15781}
15782unsafe extern "C" {
15783 #[doc = " Get The Serial Number String from a HID device.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** string a wide string buffer to put the data into.\n **Parameter:** maxlen the length of the buffer in multiples of wchar_t.\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15784 pub fn SDL_hid_get_serial_number_string(
15785 dev: *mut SDL_hid_device,
15786 string: *mut wchar_t,
15787 maxlen: usize,
15788 ) -> core::ffi::c_int;
15789}
15790unsafe extern "C" {
15791 #[doc = " Get a string from a HID device, based on its string index.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** string_index the index of the string to get.\n **Parameter:** string a wide string buffer to put the data into.\n **Parameter:** maxlen the length of the buffer in multiples of wchar_t.\n **Returns:** 0 on success or a negative error code on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15792 pub fn SDL_hid_get_indexed_string(
15793 dev: *mut SDL_hid_device,
15794 string_index: core::ffi::c_int,
15795 string: *mut wchar_t,
15796 maxlen: usize,
15797 ) -> core::ffi::c_int;
15798}
15799unsafe extern "C" {
15800 #[doc = " Get the device info from a HID device.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Returns:** a pointer to the SDL_hid_device_info for this hid_device or NULL\n on failure; call SDL_GetError() for more information. This struct\n is valid until the device is closed with SDL_hid_close().\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15801 pub fn SDL_hid_get_device_info(dev: *mut SDL_hid_device) -> *mut SDL_hid_device_info;
15802}
15803unsafe extern "C" {
15804 #[doc = " Get a report descriptor from a HID device.\n\n User has to provide a preallocated buffer where descriptor will be copied\n to. The recommended size for a preallocated buffer is 4096 bytes.\n\n **Parameter:** dev a device handle returned from SDL_hid_open().\n **Parameter:** buf the buffer to copy descriptor into.\n **Parameter:** buf_size the size of the buffer in bytes.\n **Returns:** the number of bytes actually copied or -1 on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15805 pub fn SDL_hid_get_report_descriptor(
15806 dev: *mut SDL_hid_device,
15807 buf: *mut core::ffi::c_uchar,
15808 buf_size: usize,
15809 ) -> core::ffi::c_int;
15810}
15811unsafe extern "C" {
15812 #[doc = " Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers.\n\n **Parameter:** active true to start the scan, false to stop the scan.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
15813 pub fn SDL_hid_ble_scan(active: bool);
15814}
15815impl SDL_HintPriority {
15816 pub const SDL_HINT_DEFAULT: SDL_HintPriority = SDL_HintPriority(0);
15817 pub const SDL_HINT_NORMAL: SDL_HintPriority = SDL_HintPriority(1);
15818 pub const SDL_HINT_OVERRIDE: SDL_HintPriority = SDL_HintPriority(2);
15819}
15820#[repr(transparent)]
15821#[doc = " An enumeration of hint priorities.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
15822#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15823pub struct SDL_HintPriority(pub core::ffi::c_uint);
15824unsafe extern "C" {
15825 #[doc = " Set a hint with a specific priority.\n\n The priority controls the behavior when setting a hint that already has a\n value. Hints will replace existing hints of their priority and lower.\n Environment variables are considered to have override priority.\n\n **Parameter:** name the hint to set.\n **Parameter:** value the value of the hint variable.\n **Parameter:** priority the SDL_HintPriority level for the hint.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHint\n **See Also:** SDL_ResetHint\n **See Also:** SDL_SetHint\n"]
15826 pub fn SDL_SetHintWithPriority(
15827 name: *const core::ffi::c_char,
15828 value: *const core::ffi::c_char,
15829 priority: SDL_HintPriority,
15830 ) -> bool;
15831}
15832unsafe extern "C" {
15833 #[doc = " Set a hint with normal priority.\n\n Hints will not be set if there is an existing override hint or environment\n variable that takes precedence. You can use SDL_SetHintWithPriority() to\n set the hint with override priority instead.\n\n **Parameter:** name the hint to set.\n **Parameter:** value the value of the hint variable.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHint\n **See Also:** SDL_ResetHint\n **See Also:** SDL_SetHintWithPriority\n"]
15834 pub fn SDL_SetHint(name: *const core::ffi::c_char, value: *const core::ffi::c_char) -> bool;
15835}
15836unsafe extern "C" {
15837 #[doc = " Reset a hint to the default value.\n\n This will reset a hint to the value of the environment variable, or NULL if\n the environment isn't set. Callbacks will be called normally with this\n change.\n\n **Parameter:** name the hint to set.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetHint\n **See Also:** SDL_ResetHints\n"]
15838 pub fn SDL_ResetHint(name: *const core::ffi::c_char) -> bool;
15839}
15840unsafe extern "C" {
15841 #[doc = " Reset all hints to the default values.\n\n This will reset all hints to the value of the associated environment\n variable, or NULL if the environment isn't set. Callbacks will be called\n normally with this change.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ResetHint\n"]
15842 pub fn SDL_ResetHints();
15843}
15844unsafe extern "C" {
15845 #[doc = " Get the value of a hint.\n\n **Parameter:** name the hint to query.\n **Returns:** the string value of a hint or NULL if the hint isn't set.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetHint\n **See Also:** SDL_SetHintWithPriority\n"]
15846 pub fn SDL_GetHint(name: *const core::ffi::c_char) -> *const core::ffi::c_char;
15847}
15848unsafe extern "C" {
15849 #[doc = " Get the boolean value of a hint variable.\n\n **Parameter:** name the name of the hint to get the boolean value from.\n **Parameter:** default_value the value to return if the hint does not exist.\n **Returns:** the boolean value of a hint or the provided default value if the\n hint does not exist.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetHint\n **See Also:** SDL_SetHint\n"]
15850 pub fn SDL_GetHintBoolean(name: *const core::ffi::c_char, default_value: bool) -> bool;
15851}
15852#[doc = " A callback used to send notifications of hint value changes.\n\n This is called an initial time during SDL_AddHintCallback with the hint's\n current value, and then again each time the hint's value changes. In the\n initial call, the current value is in both `oldValue` and `newValue`.\n\n **Parameter:** userdata what was passed as `userdata` to SDL_AddHintCallback().\n **Parameter:** name what was passed as `name` to SDL_AddHintCallback().\n **Parameter:** oldValue the previous hint value.\n **Parameter:** newValue the new value hint is to be set to.\n\n **Thread Safety:** This callback is fired from whatever thread is setting a new\n hint value. SDL holds a lock on the hint subsystem when\n calling this callback.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_AddHintCallback\n"]
15853pub type SDL_HintCallback = ::core::option::Option<
15854 unsafe extern "C" fn(
15855 userdata: *mut core::ffi::c_void,
15856 name: *const core::ffi::c_char,
15857 oldValue: *const core::ffi::c_char,
15858 newValue: *const core::ffi::c_char,
15859 ),
15860>;
15861unsafe extern "C" {
15862 #[doc = " Add a function to watch a particular hint.\n\n The callback function is called _during_ this function, to provide it an\n initial value, and again each time the hint's value changes.\n\n **Parameter:** name the hint to watch.\n **Parameter:** callback An SDL_HintCallback function that will be called when the\n hint value changes.\n **Parameter:** userdata a pointer to pass to the callback function.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RemoveHintCallback\n"]
15863 pub fn SDL_AddHintCallback(
15864 name: *const core::ffi::c_char,
15865 callback: SDL_HintCallback,
15866 userdata: *mut core::ffi::c_void,
15867 ) -> bool;
15868}
15869unsafe extern "C" {
15870 #[doc = " Remove a function watching a particular hint.\n\n **Parameter:** name the hint being watched.\n **Parameter:** callback an SDL_HintCallback function that will be called when the\n hint value changes.\n **Parameter:** userdata a pointer being passed to the callback function.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddHintCallback\n"]
15871 pub fn SDL_RemoveHintCallback(
15872 name: *const core::ffi::c_char,
15873 callback: SDL_HintCallback,
15874 userdata: *mut core::ffi::c_void,
15875 );
15876}
15877#[doc = " Initialization flags for SDL_Init and/or SDL_InitSubSystem\n\n These are the flags which may be passed to SDL_Init(). You should specify\n the subsystems which you will be using in your application.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_Init\n **See Also:** SDL_Quit\n **See Also:** SDL_InitSubSystem\n **See Also:** SDL_QuitSubSystem\n **See Also:** SDL_WasInit\n"]
15878pub type SDL_InitFlags = Uint32;
15879impl SDL_AppResult {
15880 #[doc = "< Value that requests that the app continue from the main callbacks.\n"]
15881 pub const SDL_APP_CONTINUE: SDL_AppResult = SDL_AppResult(0);
15882 #[doc = "< Value that requests termination with success from the main callbacks.\n"]
15883 pub const SDL_APP_SUCCESS: SDL_AppResult = SDL_AppResult(1);
15884 #[doc = "< Value that requests termination with error from the main callbacks.\n"]
15885 pub const SDL_APP_FAILURE: SDL_AppResult = SDL_AppResult(2);
15886}
15887#[repr(transparent)]
15888#[doc = " Return values for optional main callbacks.\n\n Returning SDL_APP_SUCCESS or SDL_APP_FAILURE from SDL_AppInit,\n SDL_AppEvent, or SDL_AppIterate will terminate the program and report\n success/failure to the operating system. What that means is\n platform-dependent. On Unix, for example, on success, the process error\n code will be zero, and on failure it will be 1. This interface doesn't\n allow you to return specific exit codes, just whether there was an error\n generally or not.\n\n Returning SDL_APP_CONTINUE from these functions will let the app continue\n to run.\n\n See\n [Main callbacks in SDL3](https://wiki.libsdl.org/SDL3/README-main-functions#main-callbacks-in-sdl3)\n for complete details.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
15889#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15890pub struct SDL_AppResult(pub core::ffi::c_uint);
15891#[doc = " Function pointer typedef for SDL_AppInit.\n\n These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind\n the scenes for apps using the optional main callbacks. Apps that want to\n use this should just implement SDL_AppInit directly.\n\n **Parameter:** appstate a place where the app can optionally store a pointer for\n future use.\n **Parameter:** argc the standard ANSI C main's argc; number of elements in `argv`.\n **Parameter:** argv the standard ANSI C main's argv; array of command line\n arguments.\n **Returns:** SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to\n terminate with success, SDL_APP_CONTINUE to continue.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
15892pub type SDL_AppInit_func = ::core::option::Option<
15893 unsafe extern "C" fn(
15894 appstate: *mut *mut core::ffi::c_void,
15895 argc: core::ffi::c_int,
15896 argv: *mut *mut core::ffi::c_char,
15897 ) -> SDL_AppResult,
15898>;
15899#[doc = " Function pointer typedef for SDL_AppIterate.\n\n These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind\n the scenes for apps using the optional main callbacks. Apps that want to\n use this should just implement SDL_AppIterate directly.\n\n **Parameter:** appstate an optional pointer, provided by the app in SDL_AppInit.\n **Returns:** SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to\n terminate with success, SDL_APP_CONTINUE to continue.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
15900pub type SDL_AppIterate_func =
15901 ::core::option::Option<unsafe extern "C" fn(appstate: *mut core::ffi::c_void) -> SDL_AppResult>;
15902#[doc = " Function pointer typedef for SDL_AppEvent.\n\n These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind\n the scenes for apps using the optional main callbacks. Apps that want to\n use this should just implement SDL_AppEvent directly.\n\n **Parameter:** appstate an optional pointer, provided by the app in SDL_AppInit.\n **Parameter:** event the new event for the app to examine.\n **Returns:** SDL_APP_FAILURE to terminate with an error, SDL_APP_SUCCESS to\n terminate with success, SDL_APP_CONTINUE to continue.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
15903pub type SDL_AppEvent_func = ::core::option::Option<
15904 unsafe extern "C" fn(appstate: *mut core::ffi::c_void, event: *mut SDL_Event) -> SDL_AppResult,
15905>;
15906#[doc = " Function pointer typedef for SDL_AppQuit.\n\n These are used by SDL_EnterAppMainCallbacks. This mechanism operates behind\n the scenes for apps using the optional main callbacks. Apps that want to\n use this should just implement SDL_AppEvent directly.\n\n **Parameter:** appstate an optional pointer, provided by the app in SDL_AppInit.\n **Parameter:** result the result code that terminated the app (success or failure).\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
15907pub type SDL_AppQuit_func = ::core::option::Option<
15908 unsafe extern "C" fn(appstate: *mut core::ffi::c_void, result: SDL_AppResult),
15909>;
15910unsafe extern "C" {
15911 #[doc = " Initialize the SDL library.\n\n SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the\n two may be used interchangeably. Though for readability of your code\n SDL_InitSubSystem() might be preferred.\n\n The file I/O (for example: SDL_IOFromFile) and threading (SDL_CreateThread)\n subsystems are initialized by default. Message boxes\n (SDL_ShowSimpleMessageBox) also attempt to work without initializing the\n video subsystem, in hopes of being useful in showing an error dialog when\n SDL_Init fails. You must specifically initialize other subsystems if you\n use them in your application.\n\n Logging (such as SDL_Log) works without initialization, too.\n\n `flags` may be any of the following OR'd together:\n\n - `SDL_INIT_AUDIO`: audio subsystem; automatically initializes the events\n subsystem\n - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events\n subsystem, should be initialized on the main thread.\n - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the\n events subsystem\n - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem\n - `SDL_INIT_GAMEPAD`: gamepad subsystem; automatically initializes the\n joystick subsystem\n - `SDL_INIT_EVENTS`: events subsystem\n - `SDL_INIT_SENSOR`: sensor subsystem; automatically initializes the events\n subsystem\n - `SDL_INIT_CAMERA`: camera subsystem; automatically initializes the events\n subsystem\n\n Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()\n for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or\n call SDL_Quit() to force shutdown). If a subsystem is already loaded then\n this call will increase the ref-count and return.\n\n Consider reporting some basic metadata about your application before\n calling SDL_Init, using either SDL_SetAppMetadata() or\n SDL_SetAppMetadataProperty().\n\n **Parameter:** flags subsystem initialization flags.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAppMetadata\n **See Also:** SDL_SetAppMetadataProperty\n **See Also:** SDL_InitSubSystem\n **See Also:** SDL_Quit\n **See Also:** SDL_SetMainReady\n **See Also:** SDL_WasInit\n"]
15912 pub fn SDL_Init(flags: SDL_InitFlags) -> bool;
15913}
15914unsafe extern "C" {
15915 #[doc = " Compatibility function to initialize the SDL library.\n\n This function and SDL_Init() are interchangeable.\n\n **Parameter:** flags any of the flags used by SDL_Init(); see SDL_Init for details.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Init\n **See Also:** SDL_Quit\n **See Also:** SDL_QuitSubSystem\n"]
15916 pub fn SDL_InitSubSystem(flags: SDL_InitFlags) -> bool;
15917}
15918unsafe extern "C" {
15919 #[doc = " Shut down specific SDL subsystems.\n\n You still need to call SDL_Quit() even if you close all open subsystems\n with SDL_QuitSubSystem().\n\n **Parameter:** flags any of the flags used by SDL_Init(); see SDL_Init for details.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_InitSubSystem\n **See Also:** SDL_Quit\n"]
15920 pub fn SDL_QuitSubSystem(flags: SDL_InitFlags);
15921}
15922unsafe extern "C" {
15923 #[doc = " Get a mask of the specified subsystems which are currently initialized.\n\n **Parameter:** flags any of the flags used by SDL_Init(); see SDL_Init for details.\n **Returns:** a mask of all initialized subsystems if `flags` is 0, otherwise it\n returns the initialization status of the specified subsystems.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Init\n **See Also:** SDL_InitSubSystem\n"]
15924 pub fn SDL_WasInit(flags: SDL_InitFlags) -> SDL_InitFlags;
15925}
15926unsafe extern "C" {
15927 #[doc = " Clean up all initialized subsystems.\n\n You should call this function even if you have already shutdown each\n initialized subsystem with SDL_QuitSubSystem(). It is safe to call this\n function even in the case of errors in initialization.\n\n You can use this function with atexit() to ensure that it is run when your\n application is shutdown, but it is not wise to do this from a library or\n other dynamically loaded code.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Init\n **See Also:** SDL_QuitSubSystem\n"]
15928 pub fn SDL_Quit();
15929}
15930unsafe extern "C" {
15931 #[doc = " Return whether this is the main thread.\n\n On Apple platforms, the main thread is the thread that runs your program's\n main() entry point. On other platforms, the main thread is the one that\n calls SDL_Init(SDL_INIT_VIDEO), which should usually be the one that runs\n your program's main() entry point. If you are using the main callbacks,\n SDL_AppInit(), SDL_AppIterate(), and SDL_AppQuit() are all called on the\n main thread.\n\n **Returns:** true if this thread is the main thread, or false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RunOnMainThread\n"]
15932 pub fn SDL_IsMainThread() -> bool;
15933}
15934#[doc = " Callback run on the main thread.\n\n **Parameter:** userdata an app-controlled pointer that is passed to the callback.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_RunOnMainThread\n"]
15935pub type SDL_MainThreadCallback =
15936 ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void)>;
15937unsafe extern "C" {
15938 #[doc = " Call a function on the main thread during event processing.\n\n If this is called on the main thread, the callback is executed immediately.\n If this is called on another thread, this callback is queued for execution\n on the main thread during event processing.\n\n Be careful of deadlocks when using this functionality. You should not have\n the main thread wait for the current thread while this function is being\n called with `wait_complete` true.\n\n **Parameter:** callback the callback to call on the main thread.\n **Parameter:** userdata a pointer that is passed to `callback`.\n **Parameter:** wait_complete true to wait for the callback to complete, false to\n return immediately.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_IsMainThread\n"]
15939 pub fn SDL_RunOnMainThread(
15940 callback: SDL_MainThreadCallback,
15941 userdata: *mut core::ffi::c_void,
15942 wait_complete: bool,
15943 ) -> bool;
15944}
15945unsafe extern "C" {
15946 #[doc = " Specify basic metadata about your app.\n\n You can optionally provide metadata about your app to SDL. This is not\n required, but strongly encouraged.\n\n There are several locations where SDL can make use of metadata (an \"About\"\n box in the macOS menu bar, the name of the app can be shown on some audio\n mixers, etc). Any piece of metadata can be left as NULL, if a specific\n detail doesn't make sense for the app.\n\n This function should be called as early as possible, before SDL_Init.\n Multiple calls to this function are allowed, but various state might not\n change once it has been set up with a previous call to this function.\n\n Passing a NULL removes any previous metadata.\n\n This is a simplified interface for the most important information. You can\n supply significantly more detailed metadata with\n SDL_SetAppMetadataProperty().\n\n **Parameter:** appname The name of the application (\"My Game 2: Bad Guy's\n Revenge!\").\n **Parameter:** appversion The version of the application (\"1.0.0beta5\" or a git\n hash, or whatever makes sense).\n **Parameter:** appidentifier A unique string in reverse-domain format that\n identifies this app (\"com.example.mygame2\").\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAppMetadataProperty\n"]
15947 pub fn SDL_SetAppMetadata(
15948 appname: *const core::ffi::c_char,
15949 appversion: *const core::ffi::c_char,
15950 appidentifier: *const core::ffi::c_char,
15951 ) -> bool;
15952}
15953unsafe extern "C" {
15954 #[doc = " Specify metadata about your app through a set of properties.\n\n You can optionally provide metadata about your app to SDL. This is not\n required, but strongly encouraged.\n\n There are several locations where SDL can make use of metadata (an \"About\"\n box in the macOS menu bar, the name of the app can be shown on some audio\n mixers, etc). Any piece of metadata can be left out, if a specific detail\n doesn't make sense for the app.\n\n This function should be called as early as possible, before SDL_Init.\n Multiple calls to this function are allowed, but various state might not\n change once it has been set up with a previous call to this function.\n\n Once set, this metadata can be read using SDL_GetAppMetadataProperty().\n\n These are the supported properties:\n\n - `SDL_PROP_APP_METADATA_NAME_STRING`: The human-readable name of the\n application, like \"My Game 2: Bad Guy's Revenge!\". This will show up\n anywhere the OS shows the name of the application separately from window\n titles, such as volume control applets, etc. This defaults to \"SDL\n Application\".\n - `SDL_PROP_APP_METADATA_VERSION_STRING`: The version of the app that is\n running; there are no rules on format, so \"1.0.3beta2\" and \"April 22nd,\n 2024\" and a git hash are all valid options. This has no default.\n - `SDL_PROP_APP_METADATA_IDENTIFIER_STRING`: A unique string that\n identifies this app. This must be in reverse-domain format, like\n \"com.example.mygame2\". This string is used by desktop compositors to\n identify and group windows together, as well as match applications with\n associated desktop settings and icons. If you plan to package your\n application in a container such as Flatpak, the app ID should match the\n name of your Flatpak container as well. This has no default.\n - `SDL_PROP_APP_METADATA_CREATOR_STRING`: The human-readable name of the\n creator/developer/maker of this app, like \"MojoWorkshop, LLC\"\n - `SDL_PROP_APP_METADATA_COPYRIGHT_STRING`: The human-readable copyright\n notice, like \"Copyright (c) 2024 MojoWorkshop, LLC\" or whatnot. Keep this\n to one line, don't paste a copy of a whole software license in here. This\n has no default.\n - `SDL_PROP_APP_METADATA_URL_STRING`: A URL to the app on the web. Maybe a\n product page, or a storefront, or even a GitHub repository, for user's\n further information This has no default.\n - `SDL_PROP_APP_METADATA_TYPE_STRING`: The type of application this is.\n Currently this string can be \"game\" for a video game, \"mediaplayer\" for a\n media player, or generically \"application\" if nothing else applies.\n Future versions of SDL might add new types. This defaults to\n \"application\".\n\n **Parameter:** name the name of the metadata property to set.\n **Parameter:** value the value of the property, or NULL to remove that property.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetAppMetadataProperty\n **See Also:** SDL_SetAppMetadata\n"]
15955 pub fn SDL_SetAppMetadataProperty(
15956 name: *const core::ffi::c_char,
15957 value: *const core::ffi::c_char,
15958 ) -> bool;
15959}
15960unsafe extern "C" {
15961 #[doc = " Get metadata about your app.\n\n This returns metadata previously set using SDL_SetAppMetadata() or\n SDL_SetAppMetadataProperty(). See SDL_SetAppMetadataProperty() for the list\n of available properties and their meanings.\n\n **Parameter:** name the name of the metadata property to get.\n **Returns:** the current value of the metadata property, or the default if it\n is not set, NULL for properties with no default.\n\n **Thread Safety:** It is safe to call this function from any thread, although\n the string returned is not protected and could potentially be\n freed if you call SDL_SetAppMetadataProperty() to set that\n property from another thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetAppMetadata\n **See Also:** SDL_SetAppMetadataProperty\n"]
15962 pub fn SDL_GetAppMetadataProperty(name: *const core::ffi::c_char) -> *const core::ffi::c_char;
15963}
15964#[repr(C)]
15965#[derive(Debug, Copy, Clone)]
15966pub struct SDL_SharedObject {
15967 _unused: [u8; 0],
15968}
15969unsafe extern "C" {
15970 #[doc = " Dynamically load a shared object.\n\n **Parameter:** sofile a system-dependent name of the object file.\n **Returns:** an opaque pointer to the object handle or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadFunction\n **See Also:** SDL_UnloadObject\n"]
15971 pub fn SDL_LoadObject(sofile: *const core::ffi::c_char) -> *mut SDL_SharedObject;
15972}
15973unsafe extern "C" {
15974 #[doc = " Look up the address of the named function in a shared object.\n\n This function pointer is no longer valid after calling SDL_UnloadObject().\n\n This function can only look up C function names. Other languages may have\n name mangling and intrinsic language support that varies from compiler to\n compiler.\n\n Make sure you declare your function pointers with the same calling\n convention as the actual library function. Your code will crash\n mysteriously if you do not do this.\n\n If the requested function doesn't exist, NULL is returned.\n\n **Parameter:** handle a valid shared object handle returned by SDL_LoadObject().\n **Parameter:** name the name of the function to look up.\n **Returns:** a pointer to the function or NULL on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadObject\n"]
15975 pub fn SDL_LoadFunction(
15976 handle: *mut SDL_SharedObject,
15977 name: *const core::ffi::c_char,
15978 ) -> SDL_FunctionPointer;
15979}
15980unsafe extern "C" {
15981 #[doc = " Unload a shared object from memory.\n\n Note that any pointers from this object looked up through\n SDL_LoadFunction() will no longer be valid.\n\n **Parameter:** handle a valid shared object handle returned by SDL_LoadObject().\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LoadObject\n"]
15982 pub fn SDL_UnloadObject(handle: *mut SDL_SharedObject);
15983}
15984#[doc = " A struct to provide locale data.\n\n Locale data is split into a spoken language, like English, and an optional\n country, like Canada. The language will be in ISO-639 format (so English\n would be \"en\"), and the country, if not NULL, will be an ISO-3166 country\n code (so Canada would be \"CA\").\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPreferredLocales\n"]
15985#[repr(C)]
15986#[derive(Debug, Copy, Clone, Hash)]
15987pub struct SDL_Locale {
15988 #[doc = "< A language name, like \"en\" for English.\n"]
15989 pub language: *const core::ffi::c_char,
15990 #[doc = "< A country, like \"US\" for America. Can be NULL.\n"]
15991 pub country: *const core::ffi::c_char,
15992}
15993#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15994const _: () = {
15995 ["Size of SDL_Locale"][::core::mem::size_of::<SDL_Locale>() - 16usize];
15996 ["Alignment of SDL_Locale"][::core::mem::align_of::<SDL_Locale>() - 8usize];
15997 ["Offset of field: SDL_Locale::language"]
15998 [::core::mem::offset_of!(SDL_Locale, language) - 0usize];
15999 ["Offset of field: SDL_Locale::country"][::core::mem::offset_of!(SDL_Locale, country) - 8usize];
16000};
16001impl Default for SDL_Locale {
16002 fn default() -> Self {
16003 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
16004 unsafe {
16005 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
16006 s.assume_init()
16007 }
16008 }
16009}
16010unsafe extern "C" {
16011 #[doc = " Report the user's preferred locale.\n\n Returned language strings are in the format xx, where 'xx' is an ISO-639\n language specifier (such as \"en\" for English, \"de\" for German, etc).\n Country strings are in the format YY, where \"YY\" is an ISO-3166 country\n code (such as \"US\" for the United States, \"CA\" for Canada, etc). Country\n might be NULL if there's no specific guidance on them (so you might get {\n \"en\", \"US\" } for American English, but { \"en\", NULL } means \"English\n language, generically\"). Language strings are never NULL, except to\n terminate the array.\n\n Please note that not all of these strings are 2 characters; some are three\n or more.\n\n The returned list of locales are in the order of the user's preference. For\n example, a German citizen that is fluent in US English and knows enough\n Japanese to navigate around Tokyo might have a list like: { \"de\", \"en_US\",\n \"jp\", NULL }. Someone from England might prefer British English (where\n \"color\" is spelled \"colour\", etc), but will settle for anything like it: {\n \"en_GB\", \"en\", NULL }.\n\n This function returns NULL on error, including when the platform does not\n supply this information at all.\n\n This might be a \"slow\" call that has to query the operating system. It's\n best to ask for this once and save the results. However, this list can\n change, usually because the user has changed a system preference outside of\n your program; SDL will send an SDL_EVENT_LOCALE_CHANGED event in this case,\n if possible, and you can call this function again to get an updated copy of\n preferred locales.\n\n **Parameter:** count a pointer filled in with the number of locales returned, may\n be NULL.\n **Returns:** a NULL terminated array of locale pointers, or NULL on failure;\n call SDL_GetError() for more information. This is a single\n allocation that should be freed with SDL_free() when it is no\n longer needed.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16012 pub fn SDL_GetPreferredLocales(count: *mut core::ffi::c_int) -> *mut *mut SDL_Locale;
16013}
16014impl SDL_LogCategory {
16015 pub const SDL_LOG_CATEGORY_APPLICATION: SDL_LogCategory = SDL_LogCategory(0);
16016 pub const SDL_LOG_CATEGORY_ERROR: SDL_LogCategory = SDL_LogCategory(1);
16017 pub const SDL_LOG_CATEGORY_ASSERT: SDL_LogCategory = SDL_LogCategory(2);
16018 pub const SDL_LOG_CATEGORY_SYSTEM: SDL_LogCategory = SDL_LogCategory(3);
16019 pub const SDL_LOG_CATEGORY_AUDIO: SDL_LogCategory = SDL_LogCategory(4);
16020 pub const SDL_LOG_CATEGORY_VIDEO: SDL_LogCategory = SDL_LogCategory(5);
16021 pub const SDL_LOG_CATEGORY_RENDER: SDL_LogCategory = SDL_LogCategory(6);
16022 pub const SDL_LOG_CATEGORY_INPUT: SDL_LogCategory = SDL_LogCategory(7);
16023 pub const SDL_LOG_CATEGORY_TEST: SDL_LogCategory = SDL_LogCategory(8);
16024 pub const SDL_LOG_CATEGORY_GPU: SDL_LogCategory = SDL_LogCategory(9);
16025 pub const SDL_LOG_CATEGORY_RESERVED2: SDL_LogCategory = SDL_LogCategory(10);
16026 pub const SDL_LOG_CATEGORY_RESERVED3: SDL_LogCategory = SDL_LogCategory(11);
16027 pub const SDL_LOG_CATEGORY_RESERVED4: SDL_LogCategory = SDL_LogCategory(12);
16028 pub const SDL_LOG_CATEGORY_RESERVED5: SDL_LogCategory = SDL_LogCategory(13);
16029 pub const SDL_LOG_CATEGORY_RESERVED6: SDL_LogCategory = SDL_LogCategory(14);
16030 pub const SDL_LOG_CATEGORY_RESERVED7: SDL_LogCategory = SDL_LogCategory(15);
16031 pub const SDL_LOG_CATEGORY_RESERVED8: SDL_LogCategory = SDL_LogCategory(16);
16032 pub const SDL_LOG_CATEGORY_RESERVED9: SDL_LogCategory = SDL_LogCategory(17);
16033 pub const SDL_LOG_CATEGORY_RESERVED10: SDL_LogCategory = SDL_LogCategory(18);
16034 pub const SDL_LOG_CATEGORY_CUSTOM: SDL_LogCategory = SDL_LogCategory(19);
16035}
16036#[repr(transparent)]
16037#[doc = " The predefined log categories\n\n By default the application and gpu categories are enabled at the INFO\n level, the assert category is enabled at the WARN level, test is enabled at\n the VERBOSE level and all other categories are enabled at the ERROR level.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
16038#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16039pub struct SDL_LogCategory(pub core::ffi::c_uint);
16040impl SDL_LogPriority {
16041 pub const SDL_LOG_PRIORITY_INVALID: SDL_LogPriority = SDL_LogPriority(0);
16042 pub const SDL_LOG_PRIORITY_TRACE: SDL_LogPriority = SDL_LogPriority(1);
16043 pub const SDL_LOG_PRIORITY_VERBOSE: SDL_LogPriority = SDL_LogPriority(2);
16044 pub const SDL_LOG_PRIORITY_DEBUG: SDL_LogPriority = SDL_LogPriority(3);
16045 pub const SDL_LOG_PRIORITY_INFO: SDL_LogPriority = SDL_LogPriority(4);
16046 pub const SDL_LOG_PRIORITY_WARN: SDL_LogPriority = SDL_LogPriority(5);
16047 pub const SDL_LOG_PRIORITY_ERROR: SDL_LogPriority = SDL_LogPriority(6);
16048 pub const SDL_LOG_PRIORITY_CRITICAL: SDL_LogPriority = SDL_LogPriority(7);
16049 pub const SDL_LOG_PRIORITY_COUNT: SDL_LogPriority = SDL_LogPriority(8);
16050}
16051#[repr(transparent)]
16052#[doc = " The predefined log priorities\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
16053#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16054pub struct SDL_LogPriority(pub core::ffi::c_uint);
16055unsafe extern "C" {
16056 #[doc = " Set the priority of all log categories.\n\n **Parameter:** priority the SDL_LogPriority to assign.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ResetLogPriorities\n **See Also:** SDL_SetLogPriority\n"]
16057 pub fn SDL_SetLogPriorities(priority: SDL_LogPriority);
16058}
16059unsafe extern "C" {
16060 #[doc = " Set the priority of a particular log category.\n\n **Parameter:** category the category to assign a priority to.\n **Parameter:** priority the SDL_LogPriority to assign.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetLogPriority\n **See Also:** SDL_ResetLogPriorities\n **See Also:** SDL_SetLogPriorities\n"]
16061 pub fn SDL_SetLogPriority(category: core::ffi::c_int, priority: SDL_LogPriority);
16062}
16063unsafe extern "C" {
16064 #[doc = " Get the priority of a particular log category.\n\n **Parameter:** category the category to query.\n **Returns:** the SDL_LogPriority for the requested category.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetLogPriority\n"]
16065 pub fn SDL_GetLogPriority(category: core::ffi::c_int) -> SDL_LogPriority;
16066}
16067unsafe extern "C" {
16068 #[doc = " Reset all priorities to default.\n\n This is called by SDL_Quit().\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetLogPriorities\n **See Also:** SDL_SetLogPriority\n"]
16069 pub fn SDL_ResetLogPriorities();
16070}
16071unsafe extern "C" {
16072 #[doc = " Set the text prepended to log messages of a given priority.\n\n By default SDL_LOG_PRIORITY_INFO and below have no prefix, and\n SDL_LOG_PRIORITY_WARN and higher have a prefix showing their priority, e.g.\n \"WARNING: \".\n\n This function makes a copy of its string argument, **prefix**, so it is not\n necessary to keep the value of **prefix** alive after the call returns.\n\n **Parameter:** priority the SDL_LogPriority to modify.\n **Parameter:** prefix the prefix to use for that log priority, or NULL to use no\n prefix.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetLogPriorities\n **See Also:** SDL_SetLogPriority\n"]
16073 pub fn SDL_SetLogPriorityPrefix(
16074 priority: SDL_LogPriority,
16075 prefix: *const core::ffi::c_char,
16076 ) -> bool;
16077}
16078unsafe extern "C" {
16079 #[doc = " Log a message with SDL_LOG_CATEGORY_APPLICATION and SDL_LOG_PRIORITY_INFO.\n\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the `fmt` string, if\n any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16080 pub fn SDL_Log(fmt: *const core::ffi::c_char, ...);
16081}
16082unsafe extern "C" {
16083 #[doc = " Log a message with SDL_LOG_PRIORITY_TRACE.\n\n **Parameter:** category the category of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16084 pub fn SDL_LogTrace(category: core::ffi::c_int, fmt: *const core::ffi::c_char, ...);
16085}
16086unsafe extern "C" {
16087 #[doc = " Log a message with SDL_LOG_PRIORITY_VERBOSE.\n\n **Parameter:** category the category of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogWarn\n"]
16088 pub fn SDL_LogVerbose(category: core::ffi::c_int, fmt: *const core::ffi::c_char, ...);
16089}
16090unsafe extern "C" {
16091 #[doc = " Log a message with SDL_LOG_PRIORITY_DEBUG.\n\n **Parameter:** category the category of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16092 pub fn SDL_LogDebug(category: core::ffi::c_int, fmt: *const core::ffi::c_char, ...);
16093}
16094unsafe extern "C" {
16095 #[doc = " Log a message with SDL_LOG_PRIORITY_INFO.\n\n **Parameter:** category the category of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16096 pub fn SDL_LogInfo(category: core::ffi::c_int, fmt: *const core::ffi::c_char, ...);
16097}
16098unsafe extern "C" {
16099 #[doc = " Log a message with SDL_LOG_PRIORITY_WARN.\n\n **Parameter:** category the category of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n"]
16100 pub fn SDL_LogWarn(category: core::ffi::c_int, fmt: *const core::ffi::c_char, ...);
16101}
16102unsafe extern "C" {
16103 #[doc = " Log a message with SDL_LOG_PRIORITY_ERROR.\n\n **Parameter:** category the category of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16104 pub fn SDL_LogError(category: core::ffi::c_int, fmt: *const core::ffi::c_char, ...);
16105}
16106unsafe extern "C" {
16107 #[doc = " Log a message with SDL_LOG_PRIORITY_CRITICAL.\n\n **Parameter:** category the category of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16108 pub fn SDL_LogCritical(category: core::ffi::c_int, fmt: *const core::ffi::c_char, ...);
16109}
16110unsafe extern "C" {
16111 #[doc = " Log a message with the specified category and priority.\n\n **Parameter:** category the category of the message.\n **Parameter:** priority the priority of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ... additional parameters matching % tokens in the **fmt** string,\n if any.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessageV\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16112 pub fn SDL_LogMessage(
16113 category: core::ffi::c_int,
16114 priority: SDL_LogPriority,
16115 fmt: *const core::ffi::c_char,
16116 ...
16117 );
16118}
16119unsafe extern "C" {
16120 #[doc = " Log a message with the specified category and priority.\n\n **Parameter:** category the category of the message.\n **Parameter:** priority the priority of the message.\n **Parameter:** fmt a printf() style message format string.\n **Parameter:** ap a variable argument list.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Log\n **See Also:** SDL_LogCritical\n **See Also:** SDL_LogDebug\n **See Also:** SDL_LogError\n **See Also:** SDL_LogInfo\n **See Also:** SDL_LogMessage\n **See Also:** SDL_LogTrace\n **See Also:** SDL_LogVerbose\n **See Also:** SDL_LogWarn\n"]
16121 pub fn SDL_LogMessageV(
16122 category: core::ffi::c_int,
16123 priority: SDL_LogPriority,
16124 fmt: *const core::ffi::c_char,
16125 ap: *mut __va_list_tag,
16126 );
16127}
16128#[doc = " The prototype for the log output callback function.\n\n This function is called by SDL when there is new text to be logged. A mutex\n is held so that this function is never called by more than one thread at\n once.\n\n **Parameter:** userdata what was passed as `userdata` to\n SDL_SetLogOutputFunction().\n **Parameter:** category the category of the message.\n **Parameter:** priority the priority of the message.\n **Parameter:** message the message being output.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
16129pub type SDL_LogOutputFunction = ::core::option::Option<
16130 unsafe extern "C" fn(
16131 userdata: *mut core::ffi::c_void,
16132 category: core::ffi::c_int,
16133 priority: SDL_LogPriority,
16134 message: *const core::ffi::c_char,
16135 ),
16136>;
16137unsafe extern "C" {
16138 #[doc = " Get the default log output function.\n\n **Returns:** the default log output callback. It should be called with NULL for\n the userdata argument.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetLogOutputFunction\n **See Also:** SDL_GetLogOutputFunction\n"]
16139 pub fn SDL_GetDefaultLogOutputFunction() -> SDL_LogOutputFunction;
16140}
16141unsafe extern "C" {
16142 #[doc = " Get the current log output function.\n\n **Parameter:** callback an SDL_LogOutputFunction filled in with the current log\n callback.\n **Parameter:** userdata a pointer filled in with the pointer that is passed to\n `callback`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDefaultLogOutputFunction\n **See Also:** SDL_SetLogOutputFunction\n"]
16143 pub fn SDL_GetLogOutputFunction(
16144 callback: *mut SDL_LogOutputFunction,
16145 userdata: *mut *mut core::ffi::c_void,
16146 );
16147}
16148unsafe extern "C" {
16149 #[doc = " Replace the default log output function with one of your own.\n\n **Parameter:** callback an SDL_LogOutputFunction to call instead of the default.\n **Parameter:** userdata a pointer that is passed to `callback`.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDefaultLogOutputFunction\n **See Also:** SDL_GetLogOutputFunction\n"]
16150 pub fn SDL_SetLogOutputFunction(
16151 callback: SDL_LogOutputFunction,
16152 userdata: *mut core::ffi::c_void,
16153 );
16154}
16155#[doc = " Message box flags.\n\n If supported will display warning icon, etc.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
16156pub type SDL_MessageBoxFlags = Uint32;
16157#[doc = " SDL_MessageBoxButtonData flags.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
16158pub type SDL_MessageBoxButtonFlags = Uint32;
16159#[doc = " Individual button data.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
16160#[repr(C)]
16161#[derive(Debug, Copy, Clone, Hash)]
16162pub struct SDL_MessageBoxButtonData {
16163 pub flags: SDL_MessageBoxButtonFlags,
16164 #[doc = "< User defined button id (value returned via SDL_ShowMessageBox)\n"]
16165 pub buttonID: core::ffi::c_int,
16166 #[doc = "< The UTF-8 button text\n"]
16167 pub text: *const core::ffi::c_char,
16168}
16169#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16170const _: () = {
16171 ["Size of SDL_MessageBoxButtonData"]
16172 [::core::mem::size_of::<SDL_MessageBoxButtonData>() - 16usize];
16173 ["Alignment of SDL_MessageBoxButtonData"]
16174 [::core::mem::align_of::<SDL_MessageBoxButtonData>() - 8usize];
16175 ["Offset of field: SDL_MessageBoxButtonData::flags"]
16176 [::core::mem::offset_of!(SDL_MessageBoxButtonData, flags) - 0usize];
16177 ["Offset of field: SDL_MessageBoxButtonData::buttonID"]
16178 [::core::mem::offset_of!(SDL_MessageBoxButtonData, buttonID) - 4usize];
16179 ["Offset of field: SDL_MessageBoxButtonData::text"]
16180 [::core::mem::offset_of!(SDL_MessageBoxButtonData, text) - 8usize];
16181};
16182impl Default for SDL_MessageBoxButtonData {
16183 fn default() -> Self {
16184 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
16185 unsafe {
16186 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
16187 s.assume_init()
16188 }
16189 }
16190}
16191#[doc = " RGB value used in a message box color scheme\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
16192#[repr(C)]
16193#[derive(Debug, Default, Copy, Clone, Hash)]
16194pub struct SDL_MessageBoxColor {
16195 pub r: Uint8,
16196 pub g: Uint8,
16197 pub b: Uint8,
16198}
16199#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16200const _: () = {
16201 ["Size of SDL_MessageBoxColor"][::core::mem::size_of::<SDL_MessageBoxColor>() - 3usize];
16202 ["Alignment of SDL_MessageBoxColor"][::core::mem::align_of::<SDL_MessageBoxColor>() - 1usize];
16203 ["Offset of field: SDL_MessageBoxColor::r"]
16204 [::core::mem::offset_of!(SDL_MessageBoxColor, r) - 0usize];
16205 ["Offset of field: SDL_MessageBoxColor::g"]
16206 [::core::mem::offset_of!(SDL_MessageBoxColor, g) - 1usize];
16207 ["Offset of field: SDL_MessageBoxColor::b"]
16208 [::core::mem::offset_of!(SDL_MessageBoxColor, b) - 2usize];
16209};
16210impl SDL_MessageBoxColorType {
16211 pub const SDL_MESSAGEBOX_COLOR_BACKGROUND: SDL_MessageBoxColorType = SDL_MessageBoxColorType(0);
16212 pub const SDL_MESSAGEBOX_COLOR_TEXT: SDL_MessageBoxColorType = SDL_MessageBoxColorType(1);
16213 pub const SDL_MESSAGEBOX_COLOR_BUTTON_BORDER: SDL_MessageBoxColorType =
16214 SDL_MessageBoxColorType(2);
16215 pub const SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND: SDL_MessageBoxColorType =
16216 SDL_MessageBoxColorType(3);
16217 pub const SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED: SDL_MessageBoxColorType =
16218 SDL_MessageBoxColorType(4);
16219 #[doc = "< Size of the colors array of SDL_MessageBoxColorScheme.\n"]
16220 pub const SDL_MESSAGEBOX_COLOR_COUNT: SDL_MessageBoxColorType = SDL_MessageBoxColorType(5);
16221}
16222#[repr(transparent)]
16223#[doc = " An enumeration of indices inside the colors array of\n SDL_MessageBoxColorScheme.\n"]
16224#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16225pub struct SDL_MessageBoxColorType(pub core::ffi::c_uint);
16226#[doc = " A set of colors to use for message box dialogs\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
16227#[repr(C)]
16228#[derive(Debug, Default, Copy, Clone, Hash)]
16229pub struct SDL_MessageBoxColorScheme {
16230 pub colors: [SDL_MessageBoxColor; 5usize],
16231}
16232#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16233const _: () = {
16234 ["Size of SDL_MessageBoxColorScheme"]
16235 [::core::mem::size_of::<SDL_MessageBoxColorScheme>() - 15usize];
16236 ["Alignment of SDL_MessageBoxColorScheme"]
16237 [::core::mem::align_of::<SDL_MessageBoxColorScheme>() - 1usize];
16238 ["Offset of field: SDL_MessageBoxColorScheme::colors"]
16239 [::core::mem::offset_of!(SDL_MessageBoxColorScheme, colors) - 0usize];
16240};
16241#[doc = " MessageBox structure containing title, text, window, etc.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
16242#[repr(C)]
16243#[derive(Debug, Copy, Clone, Hash)]
16244pub struct SDL_MessageBoxData {
16245 pub flags: SDL_MessageBoxFlags,
16246 #[doc = "< Parent window, can be NULL\n"]
16247 pub window: *mut SDL_Window,
16248 #[doc = "< UTF-8 title\n"]
16249 pub title: *const core::ffi::c_char,
16250 #[doc = "< UTF-8 message text\n"]
16251 pub message: *const core::ffi::c_char,
16252 pub numbuttons: core::ffi::c_int,
16253 pub buttons: *const SDL_MessageBoxButtonData,
16254 #[doc = "< SDL_MessageBoxColorScheme, can be NULL to use system settings\n"]
16255 pub colorScheme: *const SDL_MessageBoxColorScheme,
16256}
16257#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16258const _: () = {
16259 ["Size of SDL_MessageBoxData"][::core::mem::size_of::<SDL_MessageBoxData>() - 56usize];
16260 ["Alignment of SDL_MessageBoxData"][::core::mem::align_of::<SDL_MessageBoxData>() - 8usize];
16261 ["Offset of field: SDL_MessageBoxData::flags"]
16262 [::core::mem::offset_of!(SDL_MessageBoxData, flags) - 0usize];
16263 ["Offset of field: SDL_MessageBoxData::window"]
16264 [::core::mem::offset_of!(SDL_MessageBoxData, window) - 8usize];
16265 ["Offset of field: SDL_MessageBoxData::title"]
16266 [::core::mem::offset_of!(SDL_MessageBoxData, title) - 16usize];
16267 ["Offset of field: SDL_MessageBoxData::message"]
16268 [::core::mem::offset_of!(SDL_MessageBoxData, message) - 24usize];
16269 ["Offset of field: SDL_MessageBoxData::numbuttons"]
16270 [::core::mem::offset_of!(SDL_MessageBoxData, numbuttons) - 32usize];
16271 ["Offset of field: SDL_MessageBoxData::buttons"]
16272 [::core::mem::offset_of!(SDL_MessageBoxData, buttons) - 40usize];
16273 ["Offset of field: SDL_MessageBoxData::colorScheme"]
16274 [::core::mem::offset_of!(SDL_MessageBoxData, colorScheme) - 48usize];
16275};
16276impl Default for SDL_MessageBoxData {
16277 fn default() -> Self {
16278 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
16279 unsafe {
16280 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
16281 s.assume_init()
16282 }
16283 }
16284}
16285unsafe extern "C" {
16286 #[doc = " Create a modal message box.\n\n If your needs aren't complex, it might be easier to use\n SDL_ShowSimpleMessageBox.\n\n This function should be called on the thread that created the parent\n window, or on the main thread if the messagebox has no parent. It will\n block execution of that thread until the user clicks a button or closes the\n messagebox.\n\n This function may be called at any time, even before SDL_Init(). This makes\n it useful for reporting errors like a failure to create a renderer or\n OpenGL context.\n\n On X11, SDL rolls its own dialog box with X11 primitives instead of a\n formal toolkit like GTK+ or Qt.\n\n Note that if SDL_Init() would fail because there isn't any available video\n target, this function is likely to fail for the same reasons. If this is a\n concern, check the return value from this function and fall back to writing\n to stderr if you can.\n\n **Parameter:** messageboxdata the SDL_MessageBoxData structure with title, text and\n other options.\n **Parameter:** buttonid the pointer to which user id of hit button should be\n copied.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ShowSimpleMessageBox\n"]
16287 pub fn SDL_ShowMessageBox(
16288 messageboxdata: *const SDL_MessageBoxData,
16289 buttonid: *mut core::ffi::c_int,
16290 ) -> bool;
16291}
16292unsafe extern "C" {
16293 #[doc = " Display a simple modal message box.\n\n If your needs aren't complex, this function is preferred over\n SDL_ShowMessageBox.\n\n `flags` may be any of the following:\n\n - `SDL_MESSAGEBOX_ERROR`: error dialog\n - `SDL_MESSAGEBOX_WARNING`: warning dialog\n - `SDL_MESSAGEBOX_INFORMATION`: informational dialog\n\n This function should be called on the thread that created the parent\n window, or on the main thread if the messagebox has no parent. It will\n block execution of that thread until the user clicks a button or closes the\n messagebox.\n\n This function may be called at any time, even before SDL_Init(). This makes\n it useful for reporting errors like a failure to create a renderer or\n OpenGL context.\n\n On X11, SDL rolls its own dialog box with X11 primitives instead of a\n formal toolkit like GTK+ or Qt.\n\n Note that if SDL_Init() would fail because there isn't any available video\n target, this function is likely to fail for the same reasons. If this is a\n concern, check the return value from this function and fall back to writing\n to stderr if you can.\n\n **Parameter:** flags an SDL_MessageBoxFlags value.\n **Parameter:** title UTF-8 title text.\n **Parameter:** message UTF-8 message text.\n **Parameter:** window the parent window, or NULL for no parent.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ShowMessageBox\n"]
16294 pub fn SDL_ShowSimpleMessageBox(
16295 flags: SDL_MessageBoxFlags,
16296 title: *const core::ffi::c_char,
16297 message: *const core::ffi::c_char,
16298 window: *mut SDL_Window,
16299 ) -> bool;
16300}
16301#[doc = " A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
16302pub type SDL_MetalView = *mut core::ffi::c_void;
16303unsafe extern "C" {
16304 #[doc = " Create a CAMetalLayer-backed NSView/UIView and attach it to the specified\n window.\n\n On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on\n its own. It is up to user code to do that.\n\n The returned handle can be casted directly to a NSView or UIView. To access\n the backing CAMetalLayer, call SDL_Metal_GetLayer().\n\n **Parameter:** window the window.\n **Returns:** handle NSView or UIView.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Metal_DestroyView\n **See Also:** SDL_Metal_GetLayer\n"]
16305 pub fn SDL_Metal_CreateView(window: *mut SDL_Window) -> SDL_MetalView;
16306}
16307unsafe extern "C" {
16308 #[doc = " Destroy an existing SDL_MetalView object.\n\n This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was\n called after SDL_CreateWindow.\n\n **Parameter:** view the SDL_MetalView object.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Metal_CreateView\n"]
16309 pub fn SDL_Metal_DestroyView(view: SDL_MetalView);
16310}
16311unsafe extern "C" {
16312 #[doc = " Get a pointer to the backing CAMetalLayer for the given view.\n\n **Parameter:** view the SDL_MetalView object.\n **Returns:** a pointer.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16313 pub fn SDL_Metal_GetLayer(view: SDL_MetalView) -> *mut core::ffi::c_void;
16314}
16315unsafe extern "C" {
16316 #[doc = " Open a URL/URI in the browser or other appropriate external application.\n\n Open a URL in a separate, system-provided application. How this works will\n vary wildly depending on the platform. This will likely launch what makes\n sense to handle a specific URL's protocol (a web browser for `http://`,\n etc), but it might also be able to launch file managers for directories and\n other things.\n\n What happens when you open a URL varies wildly as well: your game window\n may lose focus (and may or may not lose focus if your game was fullscreen\n or grabbing input at the time). On mobile devices, your app will likely\n move to the background or your process might be paused. Any given platform\n may or may not handle a given URL.\n\n If this is unimplemented (or simply unavailable) for a platform, this will\n fail with an error. A successful result does not mean the URL loaded, just\n that we launched _something_ to handle it (or at least believe we did).\n\n All this to say: this function can be useful, but you should definitely\n test it on every platform you target.\n\n **Parameter:** url a valid URL/URI to open. Use `file:///full/path/to/file` for\n local files, if supported.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16317 pub fn SDL_OpenURL(url: *const core::ffi::c_char) -> bool;
16318}
16319unsafe extern "C" {
16320 #[doc = " Get the name of the platform.\n\n Here are the names returned for some (but not all) supported platforms:\n\n - \"Windows\"\n - \"macOS\"\n - \"Linux\"\n - \"iOS\"\n - \"Android\"\n\n **Returns:** the name of the platform. If the correct platform name is not\n available, returns a string beginning with the text \"Unknown\".\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16321 pub fn SDL_GetPlatform() -> *const core::ffi::c_char;
16322}
16323#[repr(C)]
16324#[derive(Debug, Copy, Clone)]
16325pub struct SDL_Process {
16326 _unused: [u8; 0],
16327}
16328unsafe extern "C" {
16329 #[doc = " Create a new process.\n\n The path to the executable is supplied in args[0]. args[1..N] are\n additional arguments passed on the command line of the new process, and the\n argument list should be terminated with a NULL, e.g.:\n\n ```c\n const char *args[] = { \"myprogram\", \"argument\", NULL };\n ```\n\n Setting pipe_stdio to true is equivalent to setting\n `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` and\n `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` to `SDL_PROCESS_STDIO_APP`, and\n will allow the use of SDL_ReadProcess() or SDL_GetProcessInput() and\n SDL_GetProcessOutput().\n\n See SDL_CreateProcessWithProperties() for more details.\n\n **Parameter:** args the path and arguments for the new process.\n **Parameter:** pipe_stdio true to create pipes to the process's standard input and\n from the process's standard output, false for the process\n to have no input and inherit the application's standard\n output.\n **Returns:** the newly created and running process, or NULL if the process\n couldn't be created.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_GetProcessProperties\n **See Also:** SDL_ReadProcess\n **See Also:** SDL_GetProcessInput\n **See Also:** SDL_GetProcessOutput\n **See Also:** SDL_KillProcess\n **See Also:** SDL_WaitProcess\n **See Also:** SDL_DestroyProcess\n"]
16330 pub fn SDL_CreateProcess(
16331 args: *const *const core::ffi::c_char,
16332 pipe_stdio: bool,
16333 ) -> *mut SDL_Process;
16334}
16335impl SDL_ProcessIO {
16336 #[doc = "< The I/O stream is inherited from the application.\n"]
16337 pub const SDL_PROCESS_STDIO_INHERITED: SDL_ProcessIO = SDL_ProcessIO(0);
16338 #[doc = "< The I/O stream is ignored.\n"]
16339 pub const SDL_PROCESS_STDIO_NULL: SDL_ProcessIO = SDL_ProcessIO(1);
16340 #[doc = "< The I/O stream is connected to a new SDL_IOStream that the application can read or write\n"]
16341 pub const SDL_PROCESS_STDIO_APP: SDL_ProcessIO = SDL_ProcessIO(2);
16342 #[doc = "< The I/O stream is redirected to an existing SDL_IOStream.\n"]
16343 pub const SDL_PROCESS_STDIO_REDIRECT: SDL_ProcessIO = SDL_ProcessIO(3);
16344}
16345#[repr(transparent)]
16346#[doc = " Description of where standard I/O should be directed when creating a\n process.\n\n If a standard I/O stream is set to SDL_PROCESS_STDIO_INHERITED, it will go\n to the same place as the application's I/O stream. This is the default for\n standard output and standard error.\n\n If a standard I/O stream is set to SDL_PROCESS_STDIO_NULL, it is connected\n to `NUL:` on Windows and `/dev/null` on POSIX systems. This is the default\n for standard input.\n\n If a standard I/O stream is set to SDL_PROCESS_STDIO_APP, it is connected\n to a new SDL_IOStream that is available to the application. Standard input\n will be available as `SDL_PROP_PROCESS_STDIN_POINTER` and allows\n SDL_GetProcessInput(), standard output will be available as\n `SDL_PROP_PROCESS_STDOUT_POINTER` and allows SDL_ReadProcess() and\n SDL_GetProcessOutput(), and standard error will be available as\n `SDL_PROP_PROCESS_STDERR_POINTER` in the properties for the created\n process.\n\n If a standard I/O stream is set to SDL_PROCESS_STDIO_REDIRECT, it is\n connected to an existing SDL_IOStream provided by the application. Standard\n input is provided using `SDL_PROP_PROCESS_CREATE_STDIN_POINTER`, standard\n output is provided using `SDL_PROP_PROCESS_CREATE_STDOUT_POINTER`, and\n standard error is provided using `SDL_PROP_PROCESS_CREATE_STDERR_POINTER`\n in the creation properties. These existing streams should be closed by the\n application once the new process is created.\n\n In order to use an SDL_IOStream with SDL_PROCESS_STDIO_REDIRECT, it must\n have `SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER` or\n `SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER` set. This is true for streams\n representing files and process I/O.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_GetProcessProperties\n **See Also:** SDL_ReadProcess\n **See Also:** SDL_GetProcessInput\n **See Also:** SDL_GetProcessOutput\n"]
16347#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16348pub struct SDL_ProcessIO(pub core::ffi::c_uint);
16349unsafe extern "C" {
16350 #[doc = " Create a new process with the specified properties.\n\n These are the supported properties:\n\n - `SDL_PROP_PROCESS_CREATE_ARGS_POINTER`: an array of strings containing\n the program to run, any arguments, and a NULL pointer, e.g. const char\n *args[] = { \"myprogram\", \"argument\", NULL }. This is a required property.\n - `SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER`: an SDL_Environment\n pointer. If this property is set, it will be the entire environment for\n the process, otherwise the current environment is used.\n - `SDL_PROP_PROCESS_CREATE_WORKING_DIRECTORY_STRING`: a UTF-8 encoded\n string representing the working directory for the process, defaults to\n the current working directory.\n - `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER`: an SDL_ProcessIO value describing\n where standard input for the process comes from, defaults to\n `SDL_PROCESS_STDIO_NULL`.\n - `SDL_PROP_PROCESS_CREATE_STDIN_POINTER`: an SDL_IOStream pointer used for\n standard input when `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` is set to\n `SDL_PROCESS_STDIO_REDIRECT`.\n - `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER`: an SDL_ProcessIO value\n describing where standard output for the process goes to, defaults to\n `SDL_PROCESS_STDIO_INHERITED`.\n - `SDL_PROP_PROCESS_CREATE_STDOUT_POINTER`: an SDL_IOStream pointer used\n for standard output when `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` is set\n to `SDL_PROCESS_STDIO_REDIRECT`.\n - `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER`: an SDL_ProcessIO value\n describing where standard error for the process goes to, defaults to\n `SDL_PROCESS_STDIO_INHERITED`.\n - `SDL_PROP_PROCESS_CREATE_STDERR_POINTER`: an SDL_IOStream pointer used\n for standard error when `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER` is set to\n `SDL_PROCESS_STDIO_REDIRECT`.\n - `SDL_PROP_PROCESS_CREATE_STDERR_TO_STDOUT_BOOLEAN`: true if the error\n output of the process should be redirected into the standard output of\n the process. This property has no effect if\n `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER` is set.\n - `SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN`: true if the process should\n run in the background. In this case the default input and output is\n `SDL_PROCESS_STDIO_NULL` and the exitcode of the process is not\n available, and will always be 0.\n - `SDL_PROP_PROCESS_CREATE_CMDLINE_STRING`: a string containing the program\n to run and any parameters. This string is passed directly to\n `CreateProcess` on Windows, and does nothing on other platforms. This\n property is only important if you want to start programs that does\n non-standard command-line processing, and in most cases using\n `SDL_PROP_PROCESS_CREATE_ARGS_POINTER` is sufficient.\n\n On POSIX platforms, wait() and waitpid(-1, ...) should not be called, and\n SIGCHLD should not be ignored or handled because those would prevent SDL\n from properly tracking the lifetime of the underlying process. You should\n use SDL_WaitProcess() instead.\n\n **Parameter:** props the properties to use.\n **Returns:** the newly created and running process, or NULL if the process\n couldn't be created.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_GetProcessProperties\n **See Also:** SDL_ReadProcess\n **See Also:** SDL_GetProcessInput\n **See Also:** SDL_GetProcessOutput\n **See Also:** SDL_KillProcess\n **See Also:** SDL_WaitProcess\n **See Also:** SDL_DestroyProcess\n"]
16351 pub fn SDL_CreateProcessWithProperties(props: SDL_PropertiesID) -> *mut SDL_Process;
16352}
16353unsafe extern "C" {
16354 #[doc = " Get the properties associated with a process.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_PROCESS_PID_NUMBER`: the process ID of the process.\n - `SDL_PROP_PROCESS_STDIN_POINTER`: an SDL_IOStream that can be used to\n write input to the process, if it was created with\n `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` set to `SDL_PROCESS_STDIO_APP`.\n - `SDL_PROP_PROCESS_STDOUT_POINTER`: a non-blocking SDL_IOStream that can\n be used to read output from the process, if it was created with\n `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` set to `SDL_PROCESS_STDIO_APP`.\n - `SDL_PROP_PROCESS_STDERR_POINTER`: a non-blocking SDL_IOStream that can\n be used to read error output from the process, if it was created with\n `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER` set to `SDL_PROCESS_STDIO_APP`.\n - `SDL_PROP_PROCESS_BACKGROUND_BOOLEAN`: true if the process is running in\n the background.\n\n **Parameter:** process the process to query.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_CreateProcessWithProperties\n"]
16355 pub fn SDL_GetProcessProperties(process: *mut SDL_Process) -> SDL_PropertiesID;
16356}
16357unsafe extern "C" {
16358 #[doc = " Read all the output from a process.\n\n If a process was created with I/O enabled, you can use this function to\n read the output. This function blocks until the process is complete,\n capturing all output, and providing the process exit code.\n\n The data is allocated with a zero byte at the end (null terminated) for\n convenience. This extra byte is not included in the value reported via\n `datasize`.\n\n The data should be freed with SDL_free().\n\n **Parameter:** process The process to read.\n **Parameter:** datasize a pointer filled in with the number of bytes read, may be\n NULL.\n **Parameter:** exitcode a pointer filled in with the process exit code if the\n process has exited, may be NULL.\n **Returns:** the data or NULL on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_DestroyProcess\n"]
16359 pub fn SDL_ReadProcess(
16360 process: *mut SDL_Process,
16361 datasize: *mut usize,
16362 exitcode: *mut core::ffi::c_int,
16363 ) -> *mut core::ffi::c_void;
16364}
16365unsafe extern "C" {
16366 #[doc = " Get the SDL_IOStream associated with process standard input.\n\n The process must have been created with SDL_CreateProcess() and pipe_stdio\n set to true, or with SDL_CreateProcessWithProperties() and\n `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` set to `SDL_PROCESS_STDIO_APP`.\n\n Writing to this stream can return less data than expected if the process\n hasn't read its input. It may be blocked waiting for its output to be read,\n if so you may need to call SDL_GetProcessOutput() and read the output in\n parallel with writing input.\n\n **Parameter:** process The process to get the input stream for.\n **Returns:** the input stream or NULL on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_GetProcessOutput\n"]
16367 pub fn SDL_GetProcessInput(process: *mut SDL_Process) -> *mut SDL_IOStream;
16368}
16369unsafe extern "C" {
16370 #[doc = " Get the SDL_IOStream associated with process standard output.\n\n The process must have been created with SDL_CreateProcess() and pipe_stdio\n set to true, or with SDL_CreateProcessWithProperties() and\n `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` set to `SDL_PROCESS_STDIO_APP`.\n\n Reading from this stream can return 0 with SDL_GetIOStatus() returning\n SDL_IO_STATUS_NOT_READY if no output is available yet.\n\n **Parameter:** process The process to get the output stream for.\n **Returns:** the output stream or NULL on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_GetProcessInput\n"]
16371 pub fn SDL_GetProcessOutput(process: *mut SDL_Process) -> *mut SDL_IOStream;
16372}
16373unsafe extern "C" {
16374 #[doc = " Stop a process.\n\n **Parameter:** process The process to stop.\n **Parameter:** force true to terminate the process immediately, false to try to\n stop the process gracefully. In general you should try to stop\n the process gracefully first as terminating a process may\n leave it with half-written data or in some other unstable\n state.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_WaitProcess\n **See Also:** SDL_DestroyProcess\n"]
16375 pub fn SDL_KillProcess(process: *mut SDL_Process, force: bool) -> bool;
16376}
16377unsafe extern "C" {
16378 #[doc = " Wait for a process to finish.\n\n This can be called multiple times to get the status of a process.\n\n The exit code will be the exit code of the process if it terminates\n normally, a negative signal if it terminated due to a signal, or -255\n otherwise. It will not be changed if the process is still running.\n\n If you create a process with standard output piped to the application\n (`pipe_stdio` being true) then you should read all of the process output\n before calling SDL_WaitProcess(). If you don't do this the process might be\n blocked indefinitely waiting for output to be read and SDL_WaitProcess()\n will never return true;\n\n **Parameter:** process The process to wait for.\n **Parameter:** block If true, block until the process finishes; otherwise, report\n on the process' status.\n **Parameter:** exitcode a pointer filled in with the process exit code if the\n process has exited, may be NULL.\n **Returns:** true if the process exited, false otherwise.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_KillProcess\n **See Also:** SDL_DestroyProcess\n"]
16379 pub fn SDL_WaitProcess(
16380 process: *mut SDL_Process,
16381 block: bool,
16382 exitcode: *mut core::ffi::c_int,
16383 ) -> bool;
16384}
16385unsafe extern "C" {
16386 #[doc = " Destroy a previously created process object.\n\n Note that this does not stop the process, just destroys the SDL object used\n to track it. If you want to stop the process you should use\n SDL_KillProcess().\n\n **Parameter:** process The process object to destroy.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProcess\n **See Also:** SDL_CreateProcessWithProperties\n **See Also:** SDL_KillProcess\n"]
16387 pub fn SDL_DestroyProcess(process: *mut SDL_Process);
16388}
16389#[doc = " Vertex structure.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
16390#[repr(C)]
16391#[derive(Debug, Default, Copy, Clone)]
16392pub struct SDL_Vertex {
16393 #[doc = "< Vertex position, in SDL_Renderer coordinates\n"]
16394 pub position: SDL_FPoint,
16395 #[doc = "< Vertex color\n"]
16396 pub color: SDL_FColor,
16397 #[doc = "< Normalized texture coordinates, if needed\n"]
16398 pub tex_coord: SDL_FPoint,
16399}
16400#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16401const _: () = {
16402 ["Size of SDL_Vertex"][::core::mem::size_of::<SDL_Vertex>() - 32usize];
16403 ["Alignment of SDL_Vertex"][::core::mem::align_of::<SDL_Vertex>() - 4usize];
16404 ["Offset of field: SDL_Vertex::position"]
16405 [::core::mem::offset_of!(SDL_Vertex, position) - 0usize];
16406 ["Offset of field: SDL_Vertex::color"][::core::mem::offset_of!(SDL_Vertex, color) - 8usize];
16407 ["Offset of field: SDL_Vertex::tex_coord"]
16408 [::core::mem::offset_of!(SDL_Vertex, tex_coord) - 24usize];
16409};
16410impl SDL_TextureAccess {
16411 #[doc = "< Changes rarely, not lockable\n"]
16412 pub const SDL_TEXTUREACCESS_STATIC: SDL_TextureAccess = SDL_TextureAccess(0);
16413 #[doc = "< Changes frequently, lockable\n"]
16414 pub const SDL_TEXTUREACCESS_STREAMING: SDL_TextureAccess = SDL_TextureAccess(1);
16415 #[doc = "< Texture can be used as a render target\n"]
16416 pub const SDL_TEXTUREACCESS_TARGET: SDL_TextureAccess = SDL_TextureAccess(2);
16417}
16418#[repr(transparent)]
16419#[doc = " The access pattern allowed for a texture.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
16420#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16421pub struct SDL_TextureAccess(pub core::ffi::c_uint);
16422impl SDL_TextureAddressMode {
16423 pub const SDL_TEXTURE_ADDRESS_INVALID: SDL_TextureAddressMode = SDL_TextureAddressMode(-1);
16424 #[doc = "< Wrapping is enabled if texture coordinates are outside [0, 1], this is the default\n"]
16425 pub const SDL_TEXTURE_ADDRESS_AUTO: SDL_TextureAddressMode = SDL_TextureAddressMode(0);
16426 #[doc = "< Texture coordinates are clamped to the [0, 1] range\n"]
16427 pub const SDL_TEXTURE_ADDRESS_CLAMP: SDL_TextureAddressMode = SDL_TextureAddressMode(1);
16428 #[doc = "< The texture is repeated (tiled)\n"]
16429 pub const SDL_TEXTURE_ADDRESS_WRAP: SDL_TextureAddressMode = SDL_TextureAddressMode(2);
16430}
16431#[repr(transparent)]
16432#[doc = " The addressing mode for a texture when used in SDL_RenderGeometry().\n\n This affects how texture coordinates are interpreted outside of [0, 1]\n\n Texture wrapping is always supported for power of two texture sizes, and is\n supported for other texture sizes if\n SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN is set to true.\n\n **Available Since:** This enum is available since SDL 3.4.0.\n"]
16433#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16434pub struct SDL_TextureAddressMode(pub core::ffi::c_int);
16435impl SDL_RendererLogicalPresentation {
16436 #[doc = "< There is no logical size in effect\n"]
16437 pub const SDL_LOGICAL_PRESENTATION_DISABLED: SDL_RendererLogicalPresentation =
16438 SDL_RendererLogicalPresentation(0);
16439 #[doc = "< The rendered content is stretched to the output resolution\n"]
16440 pub const SDL_LOGICAL_PRESENTATION_STRETCH: SDL_RendererLogicalPresentation =
16441 SDL_RendererLogicalPresentation(1);
16442 #[doc = "< The rendered content is fit to the largest dimension and the other dimension is letterboxed with the clear color\n"]
16443 pub const SDL_LOGICAL_PRESENTATION_LETTERBOX: SDL_RendererLogicalPresentation =
16444 SDL_RendererLogicalPresentation(2);
16445 #[doc = "< The rendered content is fit to the smallest dimension and the other dimension extends beyond the output bounds\n"]
16446 pub const SDL_LOGICAL_PRESENTATION_OVERSCAN: SDL_RendererLogicalPresentation =
16447 SDL_RendererLogicalPresentation(3);
16448 #[doc = "< The rendered content is scaled up by integer multiples to fit the output resolution\n"]
16449 pub const SDL_LOGICAL_PRESENTATION_INTEGER_SCALE: SDL_RendererLogicalPresentation =
16450 SDL_RendererLogicalPresentation(4);
16451}
16452#[repr(transparent)]
16453#[doc = " How the logical size is mapped to the output.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
16454#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16455pub struct SDL_RendererLogicalPresentation(pub core::ffi::c_uint);
16456#[repr(C)]
16457#[derive(Debug, Copy, Clone)]
16458pub struct SDL_Renderer {
16459 _unused: [u8; 0],
16460}
16461#[doc = " An efficient driver-specific representation of pixel data\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTexture\n **See Also:** SDL_CreateTextureFromSurface\n **See Also:** SDL_CreateTextureWithProperties\n **See Also:** SDL_DestroyTexture\n"]
16462#[repr(C)]
16463#[derive(Debug, Copy, Clone, Hash)]
16464pub struct SDL_Texture {
16465 #[doc = "< The format of the texture, read-only\n"]
16466 pub format: SDL_PixelFormat,
16467 #[doc = "< The width of the texture, read-only.\n"]
16468 pub w: core::ffi::c_int,
16469 #[doc = "< The height of the texture, read-only.\n"]
16470 pub h: core::ffi::c_int,
16471 #[doc = "< Application reference count, used when freeing texture\n"]
16472 pub refcount: core::ffi::c_int,
16473}
16474#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16475const _: () = {
16476 ["Size of SDL_Texture"][::core::mem::size_of::<SDL_Texture>() - 16usize];
16477 ["Alignment of SDL_Texture"][::core::mem::align_of::<SDL_Texture>() - 4usize];
16478 ["Offset of field: SDL_Texture::format"][::core::mem::offset_of!(SDL_Texture, format) - 0usize];
16479 ["Offset of field: SDL_Texture::w"][::core::mem::offset_of!(SDL_Texture, w) - 4usize];
16480 ["Offset of field: SDL_Texture::h"][::core::mem::offset_of!(SDL_Texture, h) - 8usize];
16481 ["Offset of field: SDL_Texture::refcount"]
16482 [::core::mem::offset_of!(SDL_Texture, refcount) - 12usize];
16483};
16484impl Default for SDL_Texture {
16485 fn default() -> Self {
16486 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
16487 unsafe {
16488 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
16489 s.assume_init()
16490 }
16491 }
16492}
16493unsafe extern "C" {
16494 #[doc = " Get the number of 2D rendering drivers available for the current display.\n\n A render driver is a set of code that handles rendering and texture\n management on a particular display. Normally there is only one, but some\n drivers may have several available with different capabilities.\n\n There may be none if SDL was compiled without render support.\n\n **Returns:** the number of built in render drivers.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateRenderer\n **See Also:** SDL_GetRenderDriver\n"]
16495 pub fn SDL_GetNumRenderDrivers() -> core::ffi::c_int;
16496}
16497unsafe extern "C" {
16498 #[doc = " Use this function to get the name of a built in 2D rendering driver.\n\n The list of rendering drivers is given in the order that they are normally\n initialized by default; the drivers that seem more reasonable to choose\n first (as far as the SDL developers believe) are earlier in the list.\n\n The names of drivers are all simple, low-ASCII identifiers, like \"opengl\",\n \"direct3d12\" or \"metal\". These never have Unicode characters, and are not\n meant to be proper names.\n\n **Parameter:** index the index of the rendering driver; the value ranges from 0 to\n SDL_GetNumRenderDrivers() - 1.\n **Returns:** the name of the rendering driver at the requested index, or NULL\n if an invalid index was specified.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetNumRenderDrivers\n"]
16499 pub fn SDL_GetRenderDriver(index: core::ffi::c_int) -> *const core::ffi::c_char;
16500}
16501unsafe extern "C" {
16502 #[doc = " Create a window and default renderer.\n\n **Parameter:** title the title of the window, in UTF-8 encoding.\n **Parameter:** width the width of the window.\n **Parameter:** height the height of the window.\n **Parameter:** window_flags the flags used to create the window (see\n SDL_CreateWindow()).\n **Parameter:** window a pointer filled with the window, or NULL on error.\n **Parameter:** renderer a pointer filled with the renderer, or NULL on error.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateRenderer\n **See Also:** SDL_CreateWindow\n"]
16503 pub fn SDL_CreateWindowAndRenderer(
16504 title: *const core::ffi::c_char,
16505 width: core::ffi::c_int,
16506 height: core::ffi::c_int,
16507 window_flags: SDL_WindowFlags,
16508 window: *mut *mut SDL_Window,
16509 renderer: *mut *mut SDL_Renderer,
16510 ) -> bool;
16511}
16512unsafe extern "C" {
16513 #[doc = " Create a 2D rendering context for a window.\n\n If you want a specific renderer, you can specify its name here. A list of\n available renderers can be obtained by calling SDL_GetRenderDriver()\n multiple times, with indices from 0 to SDL_GetNumRenderDrivers()-1. If you\n don't need a specific renderer, specify NULL and SDL will attempt to choose\n the best option for you, based on what is available on the user's system.\n\n If `name` is a comma-separated list, SDL will try each name, in the order\n listed, until one succeeds or all of them fail.\n\n By default the rendering size matches the window size in pixels, but you\n can call SDL_SetRenderLogicalPresentation() to change the content size and\n scaling options.\n\n **Parameter:** window the window where rendering is displayed.\n **Parameter:** name the name of the rendering driver to initialize, or NULL to let\n SDL choose one.\n **Returns:** a valid rendering context or NULL if there was an error; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateRendererWithProperties\n **See Also:** SDL_CreateSoftwareRenderer\n **See Also:** SDL_DestroyRenderer\n **See Also:** SDL_GetNumRenderDrivers\n **See Also:** SDL_GetRenderDriver\n **See Also:** SDL_GetRendererName\n"]
16514 pub fn SDL_CreateRenderer(
16515 window: *mut SDL_Window,
16516 name: *const core::ffi::c_char,
16517 ) -> *mut SDL_Renderer;
16518}
16519unsafe extern "C" {
16520 #[doc = " Create a 2D rendering context for a window, with the specified properties.\n\n These are the supported properties:\n\n - `SDL_PROP_RENDERER_CREATE_NAME_STRING`: the name of the rendering driver\n to use, if a specific one is desired\n - `SDL_PROP_RENDERER_CREATE_WINDOW_POINTER`: the window where rendering is\n displayed, required if this isn't a software renderer using a surface\n - `SDL_PROP_RENDERER_CREATE_SURFACE_POINTER`: the surface where rendering\n is displayed, if you want a software renderer without a window\n - `SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace\n value describing the colorspace for output to the display, defaults to\n SDL_COLORSPACE_SRGB. The direct3d11, direct3d12, and metal renderers\n support SDL_COLORSPACE_SRGB_LINEAR, which is a linear color space and\n supports HDR output. If you select SDL_COLORSPACE_SRGB_LINEAR, drawing\n still uses the sRGB colorspace, but values can go beyond 1.0 and float\n (linear) format textures can be used for HDR content.\n - `SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER`: non-zero if you want\n present synchronized with the refresh rate. This property can take any\n value that is supported by SDL_SetRenderVSync() for the renderer.\n\n With the SDL GPU renderer (since SDL 3.4.0):\n\n - `SDL_PROP_RENDERER_CREATE_GPU_DEVICE_POINTER`: the device to use with the\n renderer, optional.\n - `SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN`: the app is able to\n provide SPIR-V shaders to SDL_GPURenderState, optional.\n - `SDL_PROP_RENDERER_CREATE_GPU_SHADERS_DXIL_BOOLEAN`: the app is able to\n provide DXIL shaders to SDL_GPURenderState, optional.\n - `SDL_PROP_RENDERER_CREATE_GPU_SHADERS_MSL_BOOLEAN`: the app is able to\n provide MSL shaders to SDL_GPURenderState, optional.\n\n With the vulkan renderer:\n\n - `SDL_PROP_RENDERER_CREATE_VULKAN_INSTANCE_POINTER`: the VkInstance to use\n with the renderer, optional.\n - `SDL_PROP_RENDERER_CREATE_VULKAN_SURFACE_NUMBER`: the VkSurfaceKHR to use\n with the renderer, optional.\n - `SDL_PROP_RENDERER_CREATE_VULKAN_PHYSICAL_DEVICE_POINTER`: the\n VkPhysicalDevice to use with the renderer, optional.\n - `SDL_PROP_RENDERER_CREATE_VULKAN_DEVICE_POINTER`: the VkDevice to use\n with the renderer, optional.\n - `SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER`: the\n queue family index used for rendering.\n - `SDL_PROP_RENDERER_CREATE_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER`: the\n queue family index used for presentation.\n\n **Parameter:** props the properties to use.\n **Returns:** a valid rendering context or NULL if there was an error; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProperties\n **See Also:** SDL_CreateRenderer\n **See Also:** SDL_CreateSoftwareRenderer\n **See Also:** SDL_DestroyRenderer\n **See Also:** SDL_GetRendererName\n"]
16521 pub fn SDL_CreateRendererWithProperties(props: SDL_PropertiesID) -> *mut SDL_Renderer;
16522}
16523unsafe extern "C" {
16524 #[doc = " Create a 2D GPU rendering context.\n\n The GPU device to use is passed in as a parameter. If this is NULL, then a\n device will be created normally and can be retrieved using\n SDL_GetGPURendererDevice().\n\n The window to use is passed in as a parameter. If this is NULL, then this\n will become an offscreen renderer. In that case, you should call\n SDL_SetRenderTarget() to setup rendering to a texture, and then call\n SDL_RenderPresent() normally to complete drawing a frame.\n\n **Parameter:** device the GPU device to use with the renderer, or NULL to create a\n device.\n **Parameter:** window the window where rendering is displayed, or NULL to create an\n offscreen renderer.\n **Returns:** a valid rendering context or NULL if there was an error; call\n SDL_GetError() for more information.\n\n **Thread Safety:** If this function is called with a valid GPU device, it should\n be called on the thread that created the device. If this\n function is called with a valid window, it should be called\n on the thread that created the window.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_CreateRendererWithProperties\n **See Also:** SDL_GetGPURendererDevice\n **See Also:** SDL_CreateGPUShader\n **See Also:** SDL_CreateGPURenderState\n **See Also:** SDL_SetGPURenderState\n"]
16525 pub fn SDL_CreateGPURenderer(
16526 device: *mut SDL_GPUDevice,
16527 window: *mut SDL_Window,
16528 ) -> *mut SDL_Renderer;
16529}
16530unsafe extern "C" {
16531 #[doc = " Return the GPU device used by a renderer.\n\n **Parameter:** renderer the rendering context.\n **Returns:** the GPU device used by the renderer, or NULL if the renderer is\n not a GPU renderer; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
16532 pub fn SDL_GetGPURendererDevice(renderer: *mut SDL_Renderer) -> *mut SDL_GPUDevice;
16533}
16534unsafe extern "C" {
16535 #[doc = " Create a 2D software rendering context for a surface.\n\n Two other API which can be used to create SDL_Renderer:\n SDL_CreateRenderer() and SDL_CreateWindowAndRenderer(). These can _also_\n create a software renderer, but they are intended to be used with an\n SDL_Window as the final destination and not an SDL_Surface.\n\n **Parameter:** surface the SDL_Surface structure representing the surface where\n rendering is done.\n **Returns:** a valid rendering context or NULL if there was an error; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DestroyRenderer\n"]
16536 pub fn SDL_CreateSoftwareRenderer(surface: *mut SDL_Surface) -> *mut SDL_Renderer;
16537}
16538unsafe extern "C" {
16539 #[doc = " Get the renderer associated with a window.\n\n **Parameter:** window the window to query.\n **Returns:** the rendering context on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16540 pub fn SDL_GetRenderer(window: *mut SDL_Window) -> *mut SDL_Renderer;
16541}
16542unsafe extern "C" {
16543 #[doc = " Get the window associated with a renderer.\n\n **Parameter:** renderer the renderer to query.\n **Returns:** the window on success or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16544 pub fn SDL_GetRenderWindow(renderer: *mut SDL_Renderer) -> *mut SDL_Window;
16545}
16546unsafe extern "C" {
16547 #[doc = " Get the name of a renderer.\n\n **Parameter:** renderer the rendering context.\n **Returns:** the name of the selected renderer, or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateRenderer\n **See Also:** SDL_CreateRendererWithProperties\n"]
16548 pub fn SDL_GetRendererName(renderer: *mut SDL_Renderer) -> *const core::ffi::c_char;
16549}
16550unsafe extern "C" {
16551 #[doc = " Get the properties associated with a renderer.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_RENDERER_NAME_STRING`: the name of the rendering driver\n - `SDL_PROP_RENDERER_WINDOW_POINTER`: the window where rendering is\n displayed, if any\n - `SDL_PROP_RENDERER_SURFACE_POINTER`: the surface where rendering is\n displayed, if this is a software renderer without a window\n - `SDL_PROP_RENDERER_VSYNC_NUMBER`: the current vsync setting\n - `SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER`: the maximum texture width\n and height\n - `SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER`: a (const SDL_PixelFormat *)\n array of pixel formats, terminated with SDL_PIXELFORMAT_UNKNOWN,\n representing the available texture formats for this renderer.\n - `SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN`: true if the renderer\n supports SDL_TEXTURE_ADDRESS_WRAP on non-power-of-two textures.\n - `SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER`: an SDL_Colorspace value\n describing the colorspace for output to the display, defaults to\n SDL_COLORSPACE_SRGB.\n - `SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN`: true if the output colorspace is\n SDL_COLORSPACE_SRGB_LINEAR and the renderer is showing on a display with\n HDR enabled. This property can change dynamically when\n SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.\n - `SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT`: the value of SDR white in the\n SDL_COLORSPACE_SRGB_LINEAR colorspace. When HDR is enabled, this value is\n automatically multiplied into the color scale. This property can change\n dynamically when SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.\n - `SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT`: the additional high dynamic range\n that can be displayed, in terms of the SDR white point. When HDR is not\n enabled, this will be 1.0. This property can change dynamically when\n SDL_EVENT_WINDOW_HDR_STATE_CHANGED is sent.\n\n With the direct3d renderer:\n\n - `SDL_PROP_RENDERER_D3D9_DEVICE_POINTER`: the IDirect3DDevice9 associated\n with the renderer\n\n With the direct3d11 renderer:\n\n - `SDL_PROP_RENDERER_D3D11_DEVICE_POINTER`: the ID3D11Device associated\n with the renderer\n - `SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER`: the IDXGISwapChain1\n associated with the renderer. This may change when the window is resized.\n\n With the direct3d12 renderer:\n\n - `SDL_PROP_RENDERER_D3D12_DEVICE_POINTER`: the ID3D12Device associated\n with the renderer\n - `SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER`: the IDXGISwapChain4\n associated with the renderer.\n - `SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER`: the ID3D12CommandQueue\n associated with the renderer\n\n With the vulkan renderer:\n\n - `SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER`: the VkInstance associated\n with the renderer\n - `SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER`: the VkSurfaceKHR associated\n with the renderer\n - `SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER`: the VkPhysicalDevice\n associated with the renderer\n - `SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER`: the VkDevice associated with\n the renderer\n - `SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER`: the queue\n family index used for rendering\n - `SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER`: the queue\n family index used for presentation\n - `SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER`: the number of\n swapchain images, or potential frames in flight, used by the Vulkan\n renderer\n\n With the gpu renderer:\n\n - `SDL_PROP_RENDERER_GPU_DEVICE_POINTER`: the SDL_GPUDevice associated with\n the renderer\n\n **Parameter:** renderer the rendering context.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16552 pub fn SDL_GetRendererProperties(renderer: *mut SDL_Renderer) -> SDL_PropertiesID;
16553}
16554unsafe extern "C" {
16555 #[doc = " Get the output size in pixels of a rendering context.\n\n This returns the true output size in pixels, ignoring any render targets or\n logical size and presentation.\n\n For the output size of the current rendering target, with logical size\n adjustments, use SDL_GetCurrentRenderOutputSize() instead.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** w a pointer filled in with the width in pixels.\n **Parameter:** h a pointer filled in with the height in pixels.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetCurrentRenderOutputSize\n"]
16556 pub fn SDL_GetRenderOutputSize(
16557 renderer: *mut SDL_Renderer,
16558 w: *mut core::ffi::c_int,
16559 h: *mut core::ffi::c_int,
16560 ) -> bool;
16561}
16562unsafe extern "C" {
16563 #[doc = " Get the current output size in pixels of a rendering context.\n\n If a rendering target is active, this will return the size of the rendering\n target in pixels, otherwise return the value of SDL_GetRenderOutputSize().\n\n Rendering target or not, the output will be adjusted by the current logical\n presentation state, dictated by SDL_SetRenderLogicalPresentation().\n\n **Parameter:** renderer the rendering context.\n **Parameter:** w a pointer filled in with the current width.\n **Parameter:** h a pointer filled in with the current height.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderOutputSize\n"]
16564 pub fn SDL_GetCurrentRenderOutputSize(
16565 renderer: *mut SDL_Renderer,
16566 w: *mut core::ffi::c_int,
16567 h: *mut core::ffi::c_int,
16568 ) -> bool;
16569}
16570unsafe extern "C" {
16571 #[doc = " Create a texture for a rendering context.\n\n The contents of a texture when first created are not defined.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** format one of the enumerated values in SDL_PixelFormat.\n **Parameter:** access one of the enumerated values in SDL_TextureAccess.\n **Parameter:** w the width of the texture in pixels.\n **Parameter:** h the height of the texture in pixels.\n **Returns:** the created texture or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTextureFromSurface\n **See Also:** SDL_CreateTextureWithProperties\n **See Also:** SDL_DestroyTexture\n **See Also:** SDL_GetTextureSize\n **See Also:** SDL_UpdateTexture\n"]
16572 pub fn SDL_CreateTexture(
16573 renderer: *mut SDL_Renderer,
16574 format: SDL_PixelFormat,
16575 access: SDL_TextureAccess,
16576 w: core::ffi::c_int,
16577 h: core::ffi::c_int,
16578 ) -> *mut SDL_Texture;
16579}
16580unsafe extern "C" {
16581 #[doc = " Create a texture from an existing surface.\n\n The surface is not modified or freed by this function.\n\n The SDL_TextureAccess hint for the created texture is\n `SDL_TEXTUREACCESS_STATIC`.\n\n The pixel format of the created texture may be different from the pixel\n format of the surface, and can be queried using the\n SDL_PROP_TEXTURE_FORMAT_NUMBER property.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** surface the SDL_Surface structure containing pixel data used to fill\n the texture.\n **Returns:** the created texture or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTexture\n **See Also:** SDL_CreateTextureWithProperties\n **See Also:** SDL_DestroyTexture\n"]
16582 pub fn SDL_CreateTextureFromSurface(
16583 renderer: *mut SDL_Renderer,
16584 surface: *mut SDL_Surface,
16585 ) -> *mut SDL_Texture;
16586}
16587unsafe extern "C" {
16588 #[doc = " Create a texture for a rendering context with the specified properties.\n\n These are the supported properties:\n\n - `SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER`: an SDL_Colorspace value\n describing the texture colorspace, defaults to SDL_COLORSPACE_SRGB_LINEAR\n for floating point textures, SDL_COLORSPACE_HDR10 for 10-bit textures,\n SDL_COLORSPACE_SRGB for other RGB textures and SDL_COLORSPACE_JPEG for\n YUV textures.\n - `SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER`: one of the enumerated values in\n SDL_PixelFormat, defaults to the best RGBA format for the renderer\n - `SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER`: one of the enumerated values in\n SDL_TextureAccess, defaults to SDL_TEXTUREACCESS_STATIC\n - `SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER`: the width of the texture in\n pixels, required\n - `SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER`: the height of the texture in\n pixels, required\n - `SDL_PROP_TEXTURE_CREATE_PALETTE_POINTER`: an SDL_Palette to use with\n palettized texture formats. This can be set later with\n SDL_SetTexturePalette()\n - `SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating\n point textures, this defines the value of 100% diffuse white, with higher\n values being displayed in the High Dynamic Range headroom. This defaults\n to 100 for HDR10 textures and 1.0 for floating point textures.\n - `SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT`: for HDR10 and floating\n point textures, this defines the maximum dynamic range used by the\n content, in terms of the SDR white point. This would be equivalent to\n maxCLL / SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT for HDR10 content.\n If this is defined, any values outside the range supported by the display\n will be scaled into the available HDR headroom, otherwise they are\n clipped.\n\n With the direct3d11 renderer:\n\n - `SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER`: the ID3D11Texture2D\n associated with the texture, if you want to wrap an existing texture.\n - `SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER`: the ID3D11Texture2D\n associated with the U plane of a YUV texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER`: the ID3D11Texture2D\n associated with the V plane of a YUV texture, if you want to wrap an\n existing texture.\n\n With the direct3d12 renderer:\n\n - `SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER`: the ID3D12Resource\n associated with the texture, if you want to wrap an existing texture.\n - `SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER`: the ID3D12Resource\n associated with the U plane of a YUV texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER`: the ID3D12Resource\n associated with the V plane of a YUV texture, if you want to wrap an\n existing texture.\n\n With the metal renderer:\n\n - `SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER`: the CVPixelBufferRef\n associated with the texture, if you want to create a texture from an\n existing pixel buffer.\n\n With the opengl renderer:\n\n - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER`: the GLuint texture\n associated with the texture, if you want to wrap an existing texture.\n - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER`: the GLuint texture\n associated with the UV plane of an NV12 texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER`: the GLuint texture\n associated with the U plane of a YUV texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER`: the GLuint texture\n associated with the V plane of a YUV texture, if you want to wrap an\n existing texture.\n\n With the opengles2 renderer:\n\n - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER`: the GLuint texture\n associated with the texture, if you want to wrap an existing texture.\n - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER`: the GLuint texture\n associated with the UV plane of an NV12 texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER`: the GLuint texture\n associated with the U plane of a YUV texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER`: the GLuint texture\n associated with the V plane of a YUV texture, if you want to wrap an\n existing texture.\n\n With the vulkan renderer:\n\n - `SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER`: the VkImage associated\n with the texture, if you want to wrap an existing texture.\n - `SDL_PROP_TEXTURE_CREATE_VULKAN_LAYOUT_NUMBER`: the VkImageLayout for the\n VkImage, defaults to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL.\n\n With the GPU renderer:\n\n - `SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER`: the SDL_GPUTexture\n associated with the texture, if you want to wrap an existing texture.\n - `SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_NUMBER`: the SDL_GPUTexture\n associated with the UV plane of an NV12 texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_NUMBER`: the SDL_GPUTexture\n associated with the U plane of a YUV texture, if you want to wrap an\n existing texture.\n - `SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_V_NUMBER`: the SDL_GPUTexture\n associated with the V plane of a YUV texture, if you want to wrap an\n existing texture.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** props the properties to use.\n **Returns:** the created texture or NULL on failure; call SDL_GetError() for\n more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateProperties\n **See Also:** SDL_CreateTexture\n **See Also:** SDL_CreateTextureFromSurface\n **See Also:** SDL_DestroyTexture\n **See Also:** SDL_GetTextureSize\n **See Also:** SDL_UpdateTexture\n"]
16589 pub fn SDL_CreateTextureWithProperties(
16590 renderer: *mut SDL_Renderer,
16591 props: SDL_PropertiesID,
16592 ) -> *mut SDL_Texture;
16593}
16594unsafe extern "C" {
16595 #[doc = " Get the properties associated with a texture.\n\n The following read-only properties are provided by SDL:\n\n - `SDL_PROP_TEXTURE_COLORSPACE_NUMBER`: an SDL_Colorspace value describing\n the texture colorspace.\n - `SDL_PROP_TEXTURE_FORMAT_NUMBER`: one of the enumerated values in\n SDL_PixelFormat.\n - `SDL_PROP_TEXTURE_ACCESS_NUMBER`: one of the enumerated values in\n SDL_TextureAccess.\n - `SDL_PROP_TEXTURE_WIDTH_NUMBER`: the width of the texture in pixels.\n - `SDL_PROP_TEXTURE_HEIGHT_NUMBER`: the height of the texture in pixels.\n - `SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT`: for HDR10 and floating point\n textures, this defines the value of 100% diffuse white, with higher\n values being displayed in the High Dynamic Range headroom. This defaults\n to 100 for HDR10 textures and 1.0 for other textures.\n - `SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT`: for HDR10 and floating point\n textures, this defines the maximum dynamic range used by the content, in\n terms of the SDR white point. If this is defined, any values outside the\n range supported by the display will be scaled into the available HDR\n headroom, otherwise they are clipped. This defaults to 1.0 for SDR\n textures, 4.0 for HDR10 textures, and no default for floating point\n textures.\n\n With the direct3d11 renderer:\n\n - `SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER`: the ID3D11Texture2D associated\n with the texture\n - `SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER`: the ID3D11Texture2D\n associated with the U plane of a YUV texture\n - `SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER`: the ID3D11Texture2D\n associated with the V plane of a YUV texture\n\n With the direct3d12 renderer:\n\n - `SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER`: the ID3D12Resource associated\n with the texture\n - `SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER`: the ID3D12Resource associated\n with the U plane of a YUV texture\n - `SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER`: the ID3D12Resource associated\n with the V plane of a YUV texture\n\n With the vulkan renderer:\n\n - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER`: the VkImage associated with the\n texture\n\n With the opengl renderer:\n\n - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER`: the GLuint texture associated\n with the texture\n - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER`: the GLuint texture\n associated with the UV plane of an NV12 texture\n - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER`: the GLuint texture associated\n with the U plane of a YUV texture\n - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER`: the GLuint texture associated\n with the V plane of a YUV texture\n - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER`: the GLenum for the\n texture target (`GL_TEXTURE_2D`, `GL_TEXTURE_RECTANGLE_ARB`, etc)\n - `SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT`: the texture coordinate width of\n the texture (0.0 - 1.0)\n - `SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT`: the texture coordinate height of\n the texture (0.0 - 1.0)\n\n With the opengles2 renderer:\n\n - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER`: the GLuint texture\n associated with the texture\n - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER`: the GLuint texture\n associated with the UV plane of an NV12 texture\n - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER`: the GLuint texture\n associated with the U plane of a YUV texture\n - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER`: the GLuint texture\n associated with the V plane of a YUV texture\n - `SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER`: the GLenum for the\n texture target (`GL_TEXTURE_2D`, `GL_TEXTURE_EXTERNAL_OES`, etc)\n\n With the gpu renderer:\n\n - `SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER`: the SDL_GPUTexture associated\n with the texture\n - `SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER`: the SDL_GPUTexture associated\n with the UV plane of an NV12 texture\n - `SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER`: the SDL_GPUTexture associated\n with the U plane of a YUV texture\n - `SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER`: the SDL_GPUTexture associated\n with the V plane of a YUV texture\n\n **Parameter:** texture the texture to query.\n **Returns:** a valid property ID on success or 0 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16596 pub fn SDL_GetTextureProperties(texture: *mut SDL_Texture) -> SDL_PropertiesID;
16597}
16598unsafe extern "C" {
16599 #[doc = " Get the renderer that created an SDL_Texture.\n\n **Parameter:** texture the texture to query.\n **Returns:** a pointer to the SDL_Renderer that created the texture, or NULL on\n failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16600 pub fn SDL_GetRendererFromTexture(texture: *mut SDL_Texture) -> *mut SDL_Renderer;
16601}
16602unsafe extern "C" {
16603 #[doc = " Get the size of a texture, as floating point values.\n\n **Parameter:** texture the texture to query.\n **Parameter:** w a pointer filled in with the width of the texture in pixels. This\n argument can be NULL if you don't need this information.\n **Parameter:** h a pointer filled in with the height of the texture in pixels. This\n argument can be NULL if you don't need this information.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16604 pub fn SDL_GetTextureSize(texture: *mut SDL_Texture, w: *mut f32, h: *mut f32) -> bool;
16605}
16606unsafe extern "C" {
16607 #[doc = " Set the palette used by a texture.\n\n Setting the palette keeps an internal reference to the palette, which can\n be safely destroyed afterwards.\n\n A single palette can be shared with many textures.\n\n **Parameter:** texture the texture to update.\n **Parameter:** palette the SDL_Palette structure to use.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_CreatePalette\n **See Also:** SDL_GetTexturePalette\n"]
16608 pub fn SDL_SetTexturePalette(texture: *mut SDL_Texture, palette: *mut SDL_Palette) -> bool;
16609}
16610unsafe extern "C" {
16611 #[doc = " Get the palette used by a texture.\n\n **Parameter:** texture the texture to query.\n **Returns:** a pointer to the palette used by the texture, or NULL if there is\n no palette used.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_SetTexturePalette\n"]
16612 pub fn SDL_GetTexturePalette(texture: *mut SDL_Texture) -> *mut SDL_Palette;
16613}
16614unsafe extern "C" {
16615 #[doc = " Set an additional color value multiplied into render copy operations.\n\n When this texture is rendered, during the copy operation each source color\n channel is modulated by the appropriate color value according to the\n following formula:\n\n `srcC = srcC * (color / 255)`\n\n Color modulation is not always supported by the renderer; it will return\n false if color modulation is not supported.\n\n **Parameter:** texture the texture to update.\n **Parameter:** r the red color value multiplied into copy operations.\n **Parameter:** g the green color value multiplied into copy operations.\n **Parameter:** b the blue color value multiplied into copy operations.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureColorMod\n **See Also:** SDL_SetTextureAlphaMod\n **See Also:** SDL_SetTextureColorModFloat\n"]
16616 pub fn SDL_SetTextureColorMod(texture: *mut SDL_Texture, r: Uint8, g: Uint8, b: Uint8) -> bool;
16617}
16618unsafe extern "C" {
16619 #[doc = " Set an additional color value multiplied into render copy operations.\n\n When this texture is rendered, during the copy operation each source color\n channel is modulated by the appropriate color value according to the\n following formula:\n\n `srcC = srcC * color`\n\n Color modulation is not always supported by the renderer; it will return\n false if color modulation is not supported.\n\n **Parameter:** texture the texture to update.\n **Parameter:** r the red color value multiplied into copy operations.\n **Parameter:** g the green color value multiplied into copy operations.\n **Parameter:** b the blue color value multiplied into copy operations.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureColorModFloat\n **See Also:** SDL_SetTextureAlphaModFloat\n **See Also:** SDL_SetTextureColorMod\n"]
16620 pub fn SDL_SetTextureColorModFloat(texture: *mut SDL_Texture, r: f32, g: f32, b: f32) -> bool;
16621}
16622unsafe extern "C" {
16623 #[doc = " Get the additional color value multiplied into render copy operations.\n\n **Parameter:** texture the texture to query.\n **Parameter:** r a pointer filled in with the current red color value.\n **Parameter:** g a pointer filled in with the current green color value.\n **Parameter:** b a pointer filled in with the current blue color value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureAlphaMod\n **See Also:** SDL_GetTextureColorModFloat\n **See Also:** SDL_SetTextureColorMod\n"]
16624 pub fn SDL_GetTextureColorMod(
16625 texture: *mut SDL_Texture,
16626 r: *mut Uint8,
16627 g: *mut Uint8,
16628 b: *mut Uint8,
16629 ) -> bool;
16630}
16631unsafe extern "C" {
16632 #[doc = " Get the additional color value multiplied into render copy operations.\n\n **Parameter:** texture the texture to query.\n **Parameter:** r a pointer filled in with the current red color value.\n **Parameter:** g a pointer filled in with the current green color value.\n **Parameter:** b a pointer filled in with the current blue color value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureAlphaModFloat\n **See Also:** SDL_GetTextureColorMod\n **See Also:** SDL_SetTextureColorModFloat\n"]
16633 pub fn SDL_GetTextureColorModFloat(
16634 texture: *mut SDL_Texture,
16635 r: *mut f32,
16636 g: *mut f32,
16637 b: *mut f32,
16638 ) -> bool;
16639}
16640unsafe extern "C" {
16641 #[doc = " Set an additional alpha value multiplied into render copy operations.\n\n When this texture is rendered, during the copy operation the source alpha\n value is modulated by this alpha value according to the following formula:\n\n `srcA = srcA * (alpha / 255)`\n\n Alpha modulation is not always supported by the renderer; it will return\n false if alpha modulation is not supported.\n\n **Parameter:** texture the texture to update.\n **Parameter:** alpha the source alpha value multiplied into copy operations.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureAlphaMod\n **See Also:** SDL_SetTextureAlphaModFloat\n **See Also:** SDL_SetTextureColorMod\n"]
16642 pub fn SDL_SetTextureAlphaMod(texture: *mut SDL_Texture, alpha: Uint8) -> bool;
16643}
16644unsafe extern "C" {
16645 #[doc = " Set an additional alpha value multiplied into render copy operations.\n\n When this texture is rendered, during the copy operation the source alpha\n value is modulated by this alpha value according to the following formula:\n\n `srcA = srcA * alpha`\n\n Alpha modulation is not always supported by the renderer; it will return\n false if alpha modulation is not supported.\n\n **Parameter:** texture the texture to update.\n **Parameter:** alpha the source alpha value multiplied into copy operations.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureAlphaModFloat\n **See Also:** SDL_SetTextureAlphaMod\n **See Also:** SDL_SetTextureColorModFloat\n"]
16646 pub fn SDL_SetTextureAlphaModFloat(texture: *mut SDL_Texture, alpha: f32) -> bool;
16647}
16648unsafe extern "C" {
16649 #[doc = " Get the additional alpha value multiplied into render copy operations.\n\n **Parameter:** texture the texture to query.\n **Parameter:** alpha a pointer filled in with the current alpha value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureAlphaModFloat\n **See Also:** SDL_GetTextureColorMod\n **See Also:** SDL_SetTextureAlphaMod\n"]
16650 pub fn SDL_GetTextureAlphaMod(texture: *mut SDL_Texture, alpha: *mut Uint8) -> bool;
16651}
16652unsafe extern "C" {
16653 #[doc = " Get the additional alpha value multiplied into render copy operations.\n\n **Parameter:** texture the texture to query.\n **Parameter:** alpha a pointer filled in with the current alpha value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureAlphaMod\n **See Also:** SDL_GetTextureColorModFloat\n **See Also:** SDL_SetTextureAlphaModFloat\n"]
16654 pub fn SDL_GetTextureAlphaModFloat(texture: *mut SDL_Texture, alpha: *mut f32) -> bool;
16655}
16656unsafe extern "C" {
16657 #[doc = " Set the blend mode for a texture, used by SDL_RenderTexture().\n\n If the blend mode is not supported, the closest supported mode is chosen\n and this function returns false.\n\n **Parameter:** texture the texture to update.\n **Parameter:** blendMode the SDL_BlendMode to use for texture blending.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureBlendMode\n"]
16658 pub fn SDL_SetTextureBlendMode(texture: *mut SDL_Texture, blendMode: SDL_BlendMode) -> bool;
16659}
16660unsafe extern "C" {
16661 #[doc = " Get the blend mode used for texture copy operations.\n\n **Parameter:** texture the texture to query.\n **Parameter:** blendMode a pointer filled in with the current SDL_BlendMode.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTextureBlendMode\n"]
16662 pub fn SDL_GetTextureBlendMode(
16663 texture: *mut SDL_Texture,
16664 blendMode: *mut SDL_BlendMode,
16665 ) -> bool;
16666}
16667unsafe extern "C" {
16668 #[doc = " Set the scale mode used for texture scale operations.\n\n The default texture scale mode is SDL_SCALEMODE_LINEAR.\n\n If the scale mode is not supported, the closest supported mode is chosen.\n\n **Parameter:** texture the texture to update.\n **Parameter:** scaleMode the SDL_ScaleMode to use for texture scaling.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTextureScaleMode\n"]
16669 pub fn SDL_SetTextureScaleMode(texture: *mut SDL_Texture, scaleMode: SDL_ScaleMode) -> bool;
16670}
16671unsafe extern "C" {
16672 #[doc = " Get the scale mode used for texture scale operations.\n\n **Parameter:** texture the texture to query.\n **Parameter:** scaleMode a pointer filled in with the current scale mode.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTextureScaleMode\n"]
16673 pub fn SDL_GetTextureScaleMode(
16674 texture: *mut SDL_Texture,
16675 scaleMode: *mut SDL_ScaleMode,
16676 ) -> bool;
16677}
16678unsafe extern "C" {
16679 #[doc = " Update the given texture rectangle with new pixel data.\n\n The pixel data must be in the pixel format of the texture, which can be\n queried using the SDL_PROP_TEXTURE_FORMAT_NUMBER property.\n\n This is a fairly slow function, intended for use with static textures that\n do not change often.\n\n If the texture is intended to be updated often, it is preferred to create\n the texture as streaming and use the locking functions referenced below.\n While this function will work with streaming textures, for optimization\n reasons you may not get the pixels back if you lock the texture afterward.\n\n **Parameter:** texture the texture to update.\n **Parameter:** rect an SDL_Rect structure representing the area to update, or NULL\n to update the entire texture.\n **Parameter:** pixels the raw pixel data in the format of the texture.\n **Parameter:** pitch the number of bytes in a row of pixel data, including padding\n between lines.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockTexture\n **See Also:** SDL_UnlockTexture\n **See Also:** SDL_UpdateNVTexture\n **See Also:** SDL_UpdateYUVTexture\n"]
16680 pub fn SDL_UpdateTexture(
16681 texture: *mut SDL_Texture,
16682 rect: *const SDL_Rect,
16683 pixels: *const core::ffi::c_void,
16684 pitch: core::ffi::c_int,
16685 ) -> bool;
16686}
16687unsafe extern "C" {
16688 #[doc = " Update a rectangle within a planar YV12 or IYUV texture with new pixel\n data.\n\n You can use SDL_UpdateTexture() as long as your pixel data is a contiguous\n block of Y and U/V planes in the proper order, but this function is\n available if your pixel data is not contiguous.\n\n **Parameter:** texture the texture to update.\n **Parameter:** rect a pointer to the rectangle of pixels to update, or NULL to\n update the entire texture.\n **Parameter:** Yplane the raw pixel data for the Y plane.\n **Parameter:** Ypitch the number of bytes between rows of pixel data for the Y\n plane.\n **Parameter:** Uplane the raw pixel data for the U plane.\n **Parameter:** Upitch the number of bytes between rows of pixel data for the U\n plane.\n **Parameter:** Vplane the raw pixel data for the V plane.\n **Parameter:** Vpitch the number of bytes between rows of pixel data for the V\n plane.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UpdateNVTexture\n **See Also:** SDL_UpdateTexture\n"]
16689 pub fn SDL_UpdateYUVTexture(
16690 texture: *mut SDL_Texture,
16691 rect: *const SDL_Rect,
16692 Yplane: *const Uint8,
16693 Ypitch: core::ffi::c_int,
16694 Uplane: *const Uint8,
16695 Upitch: core::ffi::c_int,
16696 Vplane: *const Uint8,
16697 Vpitch: core::ffi::c_int,
16698 ) -> bool;
16699}
16700unsafe extern "C" {
16701 #[doc = " Update a rectangle within a planar NV12 or NV21 texture with new pixels.\n\n You can use SDL_UpdateTexture() as long as your pixel data is a contiguous\n block of NV12/21 planes in the proper order, but this function is available\n if your pixel data is not contiguous.\n\n **Parameter:** texture the texture to update.\n **Parameter:** rect a pointer to the rectangle of pixels to update, or NULL to\n update the entire texture.\n **Parameter:** Yplane the raw pixel data for the Y plane.\n **Parameter:** Ypitch the number of bytes between rows of pixel data for the Y\n plane.\n **Parameter:** UVplane the raw pixel data for the UV plane.\n **Parameter:** UVpitch the number of bytes between rows of pixel data for the UV\n plane.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_UpdateTexture\n **See Also:** SDL_UpdateYUVTexture\n"]
16702 pub fn SDL_UpdateNVTexture(
16703 texture: *mut SDL_Texture,
16704 rect: *const SDL_Rect,
16705 Yplane: *const Uint8,
16706 Ypitch: core::ffi::c_int,
16707 UVplane: *const Uint8,
16708 UVpitch: core::ffi::c_int,
16709 ) -> bool;
16710}
16711unsafe extern "C" {
16712 #[doc = " Lock a portion of the texture for **write-only** pixel access.\n\n As an optimization, the pixels made available for editing don't necessarily\n contain the old texture data. This is a write-only operation, and if you\n need to keep a copy of the texture data you should do that at the\n application level.\n\n You must use SDL_UnlockTexture() to unlock the pixels and apply any\n changes.\n\n **Parameter:** texture the texture to lock for access, which was created with\n `SDL_TEXTUREACCESS_STREAMING`.\n **Parameter:** rect an SDL_Rect structure representing the area to lock for access;\n NULL to lock the entire texture.\n **Parameter:** pixels this is filled in with a pointer to the locked pixels,\n appropriately offset by the locked area.\n **Parameter:** pitch this is filled in with the pitch of the locked pixels; the\n pitch is the length of one row in bytes.\n **Returns:** true on success or false if the texture is not valid or was not\n created with `SDL_TEXTUREACCESS_STREAMING`; call SDL_GetError()\n for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockTextureToSurface\n **See Also:** SDL_UnlockTexture\n"]
16713 pub fn SDL_LockTexture(
16714 texture: *mut SDL_Texture,
16715 rect: *const SDL_Rect,
16716 pixels: *mut *mut core::ffi::c_void,
16717 pitch: *mut core::ffi::c_int,
16718 ) -> bool;
16719}
16720unsafe extern "C" {
16721 #[doc = " Lock a portion of the texture for **write-only** pixel access, and expose\n it as a SDL surface.\n\n Besides providing an SDL_Surface instead of raw pixel data, this function\n operates like SDL_LockTexture.\n\n As an optimization, the pixels made available for editing don't necessarily\n contain the old texture data. This is a write-only operation, and if you\n need to keep a copy of the texture data you should do that at the\n application level.\n\n You must use SDL_UnlockTexture() to unlock the pixels and apply any\n changes.\n\n The returned surface is freed internally after calling SDL_UnlockTexture()\n or SDL_DestroyTexture(). The caller should not free it.\n\n **Parameter:** texture the texture to lock for access, which must be created with\n `SDL_TEXTUREACCESS_STREAMING`.\n **Parameter:** rect a pointer to the rectangle to lock for access. If the rect is\n NULL, the entire texture will be locked.\n **Parameter:** surface a pointer to an SDL surface of size **rect**. Don't assume\n any specific pixel content.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockTexture\n **See Also:** SDL_UnlockTexture\n"]
16722 pub fn SDL_LockTextureToSurface(
16723 texture: *mut SDL_Texture,
16724 rect: *const SDL_Rect,
16725 surface: *mut *mut SDL_Surface,
16726 ) -> bool;
16727}
16728unsafe extern "C" {
16729 #[doc = " Unlock a texture, uploading the changes to video memory, if needed.\n\n **Warning**: Please note that SDL_LockTexture() is intended to be\n write-only; it will not guarantee the previous contents of the texture will\n be provided. You must fully initialize any area of a texture that you lock\n before unlocking it, as the pixels might otherwise be uninitialized memory.\n\n Which is to say: locking and immediately unlocking a texture can result in\n corrupted textures, depending on the renderer in use.\n\n **Parameter:** texture a texture locked by SDL_LockTexture().\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_LockTexture\n"]
16730 pub fn SDL_UnlockTexture(texture: *mut SDL_Texture);
16731}
16732unsafe extern "C" {
16733 #[doc = " Set a texture as the current rendering target.\n\n The default render target is the window for which the renderer was created.\n To stop rendering to a texture and render to the window again, call this\n function with a NULL `texture`.\n\n Viewport, cliprect, scale, and logical presentation are unique to each\n render target. Get and set functions for these states apply to the current\n render target set by this function, and those states persist on each target\n when the current render target changes.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** texture the targeted texture, which must be created with the\n `SDL_TEXTUREACCESS_TARGET` flag, or NULL to render to the\n window instead of a texture.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderTarget\n"]
16734 pub fn SDL_SetRenderTarget(renderer: *mut SDL_Renderer, texture: *mut SDL_Texture) -> bool;
16735}
16736unsafe extern "C" {
16737 #[doc = " Get the current render target.\n\n The default render target is the window for which the renderer was created,\n and is reported a NULL here.\n\n **Parameter:** renderer the rendering context.\n **Returns:** the current render target or NULL for the default render target.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderTarget\n"]
16738 pub fn SDL_GetRenderTarget(renderer: *mut SDL_Renderer) -> *mut SDL_Texture;
16739}
16740unsafe extern "C" {
16741 #[doc = " Set a device-independent resolution and presentation mode for rendering.\n\n This function sets the width and height of the logical rendering output.\n The renderer will act as if the current render target is always the\n requested dimensions, scaling to the actual resolution as necessary.\n\n This can be useful for games that expect a fixed size, but would like to\n scale the output to whatever is available, regardless of how a user resizes\n a window, or if the display is high DPI.\n\n Logical presentation can be used with both render target textures and the\n renderer's window; the state is unique to each render target, and this\n function sets the state for the current render target. It might be useful\n to draw to a texture that matches the window dimensions with logical\n presentation enabled, and then draw that texture across the entire window\n with logical presentation disabled. Be careful not to render both with\n logical presentation enabled, however, as this could produce\n double-letterboxing, etc.\n\n You can disable logical coordinates by setting the mode to\n SDL_LOGICAL_PRESENTATION_DISABLED, and in that case you get the full pixel\n resolution of the render target; it is safe to toggle logical presentation\n during the rendering of a frame: perhaps most of the rendering is done to\n specific dimensions but to make fonts look sharp, the app turns off logical\n presentation while drawing text, for example.\n\n You can convert coordinates in an event into rendering coordinates using\n SDL_ConvertEventToRenderCoordinates().\n\n **Parameter:** renderer the rendering context.\n **Parameter:** w the width of the logical resolution.\n **Parameter:** h the height of the logical resolution.\n **Parameter:** mode the presentation mode used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ConvertEventToRenderCoordinates\n **See Also:** SDL_GetRenderLogicalPresentation\n **See Also:** SDL_GetRenderLogicalPresentationRect\n"]
16742 pub fn SDL_SetRenderLogicalPresentation(
16743 renderer: *mut SDL_Renderer,
16744 w: core::ffi::c_int,
16745 h: core::ffi::c_int,
16746 mode: SDL_RendererLogicalPresentation,
16747 ) -> bool;
16748}
16749unsafe extern "C" {
16750 #[doc = " Get device independent resolution and presentation mode for rendering.\n\n This function gets the width and height of the logical rendering output, or\n 0 if a logical resolution is not enabled.\n\n Each render target has its own logical presentation state. This function\n gets the state for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** w an int filled with the logical presentation width.\n **Parameter:** h an int filled with the logical presentation height.\n **Parameter:** mode a variable filled with the logical presentation mode being\n used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderLogicalPresentation\n"]
16751 pub fn SDL_GetRenderLogicalPresentation(
16752 renderer: *mut SDL_Renderer,
16753 w: *mut core::ffi::c_int,
16754 h: *mut core::ffi::c_int,
16755 mode: *mut SDL_RendererLogicalPresentation,
16756 ) -> bool;
16757}
16758unsafe extern "C" {
16759 #[doc = " Get the final presentation rectangle for rendering.\n\n This function returns the calculated rectangle used for logical\n presentation, based on the presentation mode and output size. If logical\n presentation is disabled, it will fill the rectangle with the output size,\n in pixels.\n\n Each render target has its own logical presentation state. This function\n gets the rectangle for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** rect a pointer filled in with the final presentation rectangle, may\n be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderLogicalPresentation\n"]
16760 pub fn SDL_GetRenderLogicalPresentationRect(
16761 renderer: *mut SDL_Renderer,
16762 rect: *mut SDL_FRect,
16763 ) -> bool;
16764}
16765unsafe extern "C" {
16766 #[doc = " Get a point in render coordinates when given a point in window coordinates.\n\n This takes into account several states:\n\n - The window dimensions.\n - The logical presentation settings (SDL_SetRenderLogicalPresentation)\n - The scale (SDL_SetRenderScale)\n - The viewport (SDL_SetRenderViewport)\n\n **Parameter:** renderer the rendering context.\n **Parameter:** window_x the x coordinate in window coordinates.\n **Parameter:** window_y the y coordinate in window coordinates.\n **Parameter:** x a pointer filled with the x coordinate in render coordinates.\n **Parameter:** y a pointer filled with the y coordinate in render coordinates.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderLogicalPresentation\n **See Also:** SDL_SetRenderScale\n"]
16767 pub fn SDL_RenderCoordinatesFromWindow(
16768 renderer: *mut SDL_Renderer,
16769 window_x: f32,
16770 window_y: f32,
16771 x: *mut f32,
16772 y: *mut f32,
16773 ) -> bool;
16774}
16775unsafe extern "C" {
16776 #[doc = " Get a point in window coordinates when given a point in render coordinates.\n\n This takes into account several states:\n\n - The window dimensions.\n - The logical presentation settings (SDL_SetRenderLogicalPresentation)\n - The scale (SDL_SetRenderScale)\n - The viewport (SDL_SetRenderViewport)\n\n **Parameter:** renderer the rendering context.\n **Parameter:** x the x coordinate in render coordinates.\n **Parameter:** y the y coordinate in render coordinates.\n **Parameter:** window_x a pointer filled with the x coordinate in window\n coordinates.\n **Parameter:** window_y a pointer filled with the y coordinate in window\n coordinates.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderLogicalPresentation\n **See Also:** SDL_SetRenderScale\n **See Also:** SDL_SetRenderViewport\n"]
16777 pub fn SDL_RenderCoordinatesToWindow(
16778 renderer: *mut SDL_Renderer,
16779 x: f32,
16780 y: f32,
16781 window_x: *mut f32,
16782 window_y: *mut f32,
16783 ) -> bool;
16784}
16785unsafe extern "C" {
16786 #[doc = " Convert the coordinates in an event to render coordinates.\n\n This takes into account several states:\n\n - The window dimensions.\n - The logical presentation settings (SDL_SetRenderLogicalPresentation)\n - The scale (SDL_SetRenderScale)\n - The viewport (SDL_SetRenderViewport)\n\n Various event types are converted with this function: mouse, touch, pen,\n etc.\n\n Touch coordinates are converted from normalized coordinates in the window\n to non-normalized rendering coordinates.\n\n Relative mouse coordinates (xrel and yrel event fields) are _also_\n converted. Applications that do not want these fields converted should use\n SDL_RenderCoordinatesFromWindow() on the specific event fields instead of\n converting the entire event structure.\n\n Once converted, coordinates may be outside the rendering area.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** event the event to modify.\n **Returns:** true if the event is converted or doesn't need conversion, or\n false on failure; call SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderCoordinatesFromWindow\n"]
16787 pub fn SDL_ConvertEventToRenderCoordinates(
16788 renderer: *mut SDL_Renderer,
16789 event: *mut SDL_Event,
16790 ) -> bool;
16791}
16792unsafe extern "C" {
16793 #[doc = " Set the drawing area for rendering on the current target.\n\n Drawing will clip to this area (separately from any clipping done with\n SDL_SetRenderClipRect), and the top left of the area will become coordinate\n (0, 0) for future drawing commands.\n\n The area's width and height must be >= 0.\n\n Each render target has its own viewport. This function sets the viewport\n for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** rect the SDL_Rect structure representing the drawing area, or NULL\n to set the viewport to the entire target.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderViewport\n **See Also:** SDL_RenderViewportSet\n"]
16794 pub fn SDL_SetRenderViewport(renderer: *mut SDL_Renderer, rect: *const SDL_Rect) -> bool;
16795}
16796unsafe extern "C" {
16797 #[doc = " Get the drawing area for the current target.\n\n Each render target has its own viewport. This function gets the viewport\n for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** rect an SDL_Rect structure filled in with the current drawing area.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderViewportSet\n **See Also:** SDL_SetRenderViewport\n"]
16798 pub fn SDL_GetRenderViewport(renderer: *mut SDL_Renderer, rect: *mut SDL_Rect) -> bool;
16799}
16800unsafe extern "C" {
16801 #[doc = " Return whether an explicit rectangle was set as the viewport.\n\n This is useful if you're saving and restoring the viewport and want to know\n whether you should restore a specific rectangle or NULL.\n\n Each render target has its own viewport. This function checks the viewport\n for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Returns:** true if the viewport was set to a specific rectangle, or false if\n it was set to NULL (the entire target).\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderViewport\n **See Also:** SDL_SetRenderViewport\n"]
16802 pub fn SDL_RenderViewportSet(renderer: *mut SDL_Renderer) -> bool;
16803}
16804unsafe extern "C" {
16805 #[doc = " Get the safe area for rendering within the current viewport.\n\n Some devices have portions of the screen which are partially obscured or\n not interactive, possibly due to on-screen controls, curved edges, camera\n notches, TV overscan, etc. This function provides the area of the current\n viewport which is safe to have interactible content. You should continue\n rendering into the rest of the render target, but it should not contain\n visually important or interactible content.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** rect a pointer filled in with the area that is safe for interactive\n content.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
16806 pub fn SDL_GetRenderSafeArea(renderer: *mut SDL_Renderer, rect: *mut SDL_Rect) -> bool;
16807}
16808unsafe extern "C" {
16809 #[doc = " Set the clip rectangle for rendering on the specified target.\n\n Each render target has its own clip rectangle. This function sets the\n cliprect for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** rect an SDL_Rect structure representing the clip area, relative to\n the viewport, or NULL to disable clipping.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderClipRect\n **See Also:** SDL_RenderClipEnabled\n"]
16810 pub fn SDL_SetRenderClipRect(renderer: *mut SDL_Renderer, rect: *const SDL_Rect) -> bool;
16811}
16812unsafe extern "C" {
16813 #[doc = " Get the clip rectangle for the current target.\n\n Each render target has its own clip rectangle. This function gets the\n cliprect for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** rect an SDL_Rect structure filled in with the current clipping area\n or an empty rectangle if clipping is disabled.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderClipEnabled\n **See Also:** SDL_SetRenderClipRect\n"]
16814 pub fn SDL_GetRenderClipRect(renderer: *mut SDL_Renderer, rect: *mut SDL_Rect) -> bool;
16815}
16816unsafe extern "C" {
16817 #[doc = " Get whether clipping is enabled on the given render target.\n\n Each render target has its own clip rectangle. This function checks the\n cliprect for the current render target.\n\n **Parameter:** renderer the rendering context.\n **Returns:** true if clipping is enabled or false if not; call SDL_GetError()\n for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderClipRect\n **See Also:** SDL_SetRenderClipRect\n"]
16818 pub fn SDL_RenderClipEnabled(renderer: *mut SDL_Renderer) -> bool;
16819}
16820unsafe extern "C" {
16821 #[doc = " Set the drawing scale for rendering on the current target.\n\n The drawing coordinates are scaled by the x/y scaling factors before they\n are used by the renderer. This allows resolution independent drawing with a\n single coordinate system.\n\n If this results in scaling or subpixel drawing by the rendering backend, it\n will be handled using the appropriate quality hints. For best results use\n integer scaling factors.\n\n Each render target has its own scale. This function sets the scale for the\n current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** scaleX the horizontal scaling factor.\n **Parameter:** scaleY the vertical scaling factor.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderScale\n"]
16822 pub fn SDL_SetRenderScale(renderer: *mut SDL_Renderer, scaleX: f32, scaleY: f32) -> bool;
16823}
16824unsafe extern "C" {
16825 #[doc = " Get the drawing scale for the current target.\n\n Each render target has its own scale. This function gets the scale for the\n current render target.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** scaleX a pointer filled in with the horizontal scaling factor.\n **Parameter:** scaleY a pointer filled in with the vertical scaling factor.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderScale\n"]
16826 pub fn SDL_GetRenderScale(
16827 renderer: *mut SDL_Renderer,
16828 scaleX: *mut f32,
16829 scaleY: *mut f32,
16830 ) -> bool;
16831}
16832unsafe extern "C" {
16833 #[doc = " Set the color used for drawing operations.\n\n Set the color for drawing or filling rectangles, lines, and points, and for\n SDL_RenderClear().\n\n **Parameter:** renderer the rendering context.\n **Parameter:** r the red value used to draw on the rendering target.\n **Parameter:** g the green value used to draw on the rendering target.\n **Parameter:** b the blue value used to draw on the rendering target.\n **Parameter:** a the alpha value used to draw on the rendering target; usually\n `SDL_ALPHA_OPAQUE` (255). Use SDL_SetRenderDrawBlendMode to\n specify how the alpha channel is used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderDrawColor\n **See Also:** SDL_SetRenderDrawColorFloat\n"]
16834 pub fn SDL_SetRenderDrawColor(
16835 renderer: *mut SDL_Renderer,
16836 r: Uint8,
16837 g: Uint8,
16838 b: Uint8,
16839 a: Uint8,
16840 ) -> bool;
16841}
16842unsafe extern "C" {
16843 #[doc = " Set the color used for drawing operations (Rect, Line and Clear).\n\n Set the color for drawing or filling rectangles, lines, and points, and for\n SDL_RenderClear().\n\n **Parameter:** renderer the rendering context.\n **Parameter:** r the red value used to draw on the rendering target.\n **Parameter:** g the green value used to draw on the rendering target.\n **Parameter:** b the blue value used to draw on the rendering target.\n **Parameter:** a the alpha value used to draw on the rendering target. Use\n SDL_SetRenderDrawBlendMode to specify how the alpha channel is\n used.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderDrawColorFloat\n **See Also:** SDL_SetRenderDrawColor\n"]
16844 pub fn SDL_SetRenderDrawColorFloat(
16845 renderer: *mut SDL_Renderer,
16846 r: f32,
16847 g: f32,
16848 b: f32,
16849 a: f32,
16850 ) -> bool;
16851}
16852unsafe extern "C" {
16853 #[doc = " Get the color used for drawing operations (Rect, Line and Clear).\n\n **Parameter:** renderer the rendering context.\n **Parameter:** r a pointer filled in with the red value used to draw on the\n rendering target.\n **Parameter:** g a pointer filled in with the green value used to draw on the\n rendering target.\n **Parameter:** b a pointer filled in with the blue value used to draw on the\n rendering target.\n **Parameter:** a a pointer filled in with the alpha value used to draw on the\n rendering target; usually `SDL_ALPHA_OPAQUE` (255).\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderDrawColorFloat\n **See Also:** SDL_SetRenderDrawColor\n"]
16854 pub fn SDL_GetRenderDrawColor(
16855 renderer: *mut SDL_Renderer,
16856 r: *mut Uint8,
16857 g: *mut Uint8,
16858 b: *mut Uint8,
16859 a: *mut Uint8,
16860 ) -> bool;
16861}
16862unsafe extern "C" {
16863 #[doc = " Get the color used for drawing operations (Rect, Line and Clear).\n\n **Parameter:** renderer the rendering context.\n **Parameter:** r a pointer filled in with the red value used to draw on the\n rendering target.\n **Parameter:** g a pointer filled in with the green value used to draw on the\n rendering target.\n **Parameter:** b a pointer filled in with the blue value used to draw on the\n rendering target.\n **Parameter:** a a pointer filled in with the alpha value used to draw on the\n rendering target.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderDrawColorFloat\n **See Also:** SDL_GetRenderDrawColor\n"]
16864 pub fn SDL_GetRenderDrawColorFloat(
16865 renderer: *mut SDL_Renderer,
16866 r: *mut f32,
16867 g: *mut f32,
16868 b: *mut f32,
16869 a: *mut f32,
16870 ) -> bool;
16871}
16872unsafe extern "C" {
16873 #[doc = " Set the color scale used for render operations.\n\n The color scale is an additional scale multiplied into the pixel color\n value while rendering. This can be used to adjust the brightness of colors\n during HDR rendering, or changing HDR video brightness when playing on an\n SDR display.\n\n The color scale does not affect the alpha channel, only the color\n brightness.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** scale the color scale value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderColorScale\n"]
16874 pub fn SDL_SetRenderColorScale(renderer: *mut SDL_Renderer, scale: f32) -> bool;
16875}
16876unsafe extern "C" {
16877 #[doc = " Get the color scale used for render operations.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** scale a pointer filled in with the current color scale value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderColorScale\n"]
16878 pub fn SDL_GetRenderColorScale(renderer: *mut SDL_Renderer, scale: *mut f32) -> bool;
16879}
16880unsafe extern "C" {
16881 #[doc = " Set the blend mode used for drawing operations (Fill and Line).\n\n If the blend mode is not supported, the closest supported mode is chosen.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** blendMode the SDL_BlendMode to use for blending.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderDrawBlendMode\n"]
16882 pub fn SDL_SetRenderDrawBlendMode(
16883 renderer: *mut SDL_Renderer,
16884 blendMode: SDL_BlendMode,
16885 ) -> bool;
16886}
16887unsafe extern "C" {
16888 #[doc = " Get the blend mode used for drawing operations.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** blendMode a pointer filled in with the current SDL_BlendMode.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderDrawBlendMode\n"]
16889 pub fn SDL_GetRenderDrawBlendMode(
16890 renderer: *mut SDL_Renderer,
16891 blendMode: *mut SDL_BlendMode,
16892 ) -> bool;
16893}
16894unsafe extern "C" {
16895 #[doc = " Clear the current rendering target with the drawing color.\n\n This function clears the entire rendering target, ignoring the viewport and\n the clip rectangle. Note, that clearing will also set/fill all pixels of\n the rendering target to current renderer draw color, so make sure to invoke\n SDL_SetRenderDrawColor() when needed.\n\n **Parameter:** renderer the rendering context.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderDrawColor\n"]
16896 pub fn SDL_RenderClear(renderer: *mut SDL_Renderer) -> bool;
16897}
16898unsafe extern "C" {
16899 #[doc = " Draw a point on the current rendering target at subpixel precision.\n\n **Parameter:** renderer the renderer which should draw a point.\n **Parameter:** x the x coordinate of the point.\n **Parameter:** y the y coordinate of the point.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderPoints\n"]
16900 pub fn SDL_RenderPoint(renderer: *mut SDL_Renderer, x: f32, y: f32) -> bool;
16901}
16902unsafe extern "C" {
16903 #[doc = " Draw multiple points on the current rendering target at subpixel precision.\n\n **Parameter:** renderer the renderer which should draw multiple points.\n **Parameter:** points the points to draw.\n **Parameter:** count the number of points to draw.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderPoint\n"]
16904 pub fn SDL_RenderPoints(
16905 renderer: *mut SDL_Renderer,
16906 points: *const SDL_FPoint,
16907 count: core::ffi::c_int,
16908 ) -> bool;
16909}
16910unsafe extern "C" {
16911 #[doc = " Draw a line on the current rendering target at subpixel precision.\n\n **Parameter:** renderer the renderer which should draw a line.\n **Parameter:** x1 the x coordinate of the start point.\n **Parameter:** y1 the y coordinate of the start point.\n **Parameter:** x2 the x coordinate of the end point.\n **Parameter:** y2 the y coordinate of the end point.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderLines\n"]
16912 pub fn SDL_RenderLine(renderer: *mut SDL_Renderer, x1: f32, y1: f32, x2: f32, y2: f32) -> bool;
16913}
16914unsafe extern "C" {
16915 #[doc = " Draw a series of connected lines on the current rendering target at\n subpixel precision.\n\n **Parameter:** renderer the renderer which should draw multiple lines.\n **Parameter:** points the points along the lines.\n **Parameter:** count the number of points, drawing count-1 lines.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderLine\n"]
16916 pub fn SDL_RenderLines(
16917 renderer: *mut SDL_Renderer,
16918 points: *const SDL_FPoint,
16919 count: core::ffi::c_int,
16920 ) -> bool;
16921}
16922unsafe extern "C" {
16923 #[doc = " Draw a rectangle on the current rendering target at subpixel precision.\n\n **Parameter:** renderer the renderer which should draw a rectangle.\n **Parameter:** rect a pointer to the destination rectangle, or NULL to outline the\n entire rendering target.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderRects\n"]
16924 pub fn SDL_RenderRect(renderer: *mut SDL_Renderer, rect: *const SDL_FRect) -> bool;
16925}
16926unsafe extern "C" {
16927 #[doc = " Draw some number of rectangles on the current rendering target at subpixel\n precision.\n\n **Parameter:** renderer the renderer which should draw multiple rectangles.\n **Parameter:** rects a pointer to an array of destination rectangles.\n **Parameter:** count the number of rectangles.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderRect\n"]
16928 pub fn SDL_RenderRects(
16929 renderer: *mut SDL_Renderer,
16930 rects: *const SDL_FRect,
16931 count: core::ffi::c_int,
16932 ) -> bool;
16933}
16934unsafe extern "C" {
16935 #[doc = " Fill a rectangle on the current rendering target with the drawing color at\n subpixel precision.\n\n **Parameter:** renderer the renderer which should fill a rectangle.\n **Parameter:** rect a pointer to the destination rectangle, or NULL for the entire\n rendering target.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderFillRects\n"]
16936 pub fn SDL_RenderFillRect(renderer: *mut SDL_Renderer, rect: *const SDL_FRect) -> bool;
16937}
16938unsafe extern "C" {
16939 #[doc = " Fill some number of rectangles on the current rendering target with the\n drawing color at subpixel precision.\n\n **Parameter:** renderer the renderer which should fill multiple rectangles.\n **Parameter:** rects a pointer to an array of destination rectangles.\n **Parameter:** count the number of rectangles.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderFillRect\n"]
16940 pub fn SDL_RenderFillRects(
16941 renderer: *mut SDL_Renderer,
16942 rects: *const SDL_FRect,
16943 count: core::ffi::c_int,
16944 ) -> bool;
16945}
16946unsafe extern "C" {
16947 #[doc = " Copy a portion of the texture to the current rendering target at subpixel\n precision.\n\n **Parameter:** renderer the renderer which should copy parts of a texture.\n **Parameter:** texture the source texture.\n **Parameter:** srcrect a pointer to the source rectangle, or NULL for the entire\n texture.\n **Parameter:** dstrect a pointer to the destination rectangle, or NULL for the\n entire rendering target.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderTextureRotated\n **See Also:** SDL_RenderTextureTiled\n"]
16948 pub fn SDL_RenderTexture(
16949 renderer: *mut SDL_Renderer,
16950 texture: *mut SDL_Texture,
16951 srcrect: *const SDL_FRect,
16952 dstrect: *const SDL_FRect,
16953 ) -> bool;
16954}
16955unsafe extern "C" {
16956 #[doc = " Copy a portion of the source texture to the current rendering target, with\n rotation and flipping, at subpixel precision.\n\n **Parameter:** renderer the renderer which should copy parts of a texture.\n **Parameter:** texture the source texture.\n **Parameter:** srcrect a pointer to the source rectangle, or NULL for the entire\n texture.\n **Parameter:** dstrect a pointer to the destination rectangle, or NULL for the\n entire rendering target.\n **Parameter:** angle an angle in degrees that indicates the rotation that will be\n applied to dstrect, rotating it in a clockwise direction.\n **Parameter:** center a pointer to a point indicating the point around which\n dstrect will be rotated (if NULL, rotation will be done\n around dstrect.w/2, dstrect.h/2).\n **Parameter:** flip an SDL_FlipMode value stating which flipping actions should be\n performed on the texture.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderTexture\n"]
16957 pub fn SDL_RenderTextureRotated(
16958 renderer: *mut SDL_Renderer,
16959 texture: *mut SDL_Texture,
16960 srcrect: *const SDL_FRect,
16961 dstrect: *const SDL_FRect,
16962 angle: f64,
16963 center: *const SDL_FPoint,
16964 flip: SDL_FlipMode,
16965 ) -> bool;
16966}
16967unsafe extern "C" {
16968 #[doc = " Copy a portion of the source texture to the current rendering target, with\n affine transform, at subpixel precision.\n\n **Parameter:** renderer the renderer which should copy parts of a texture.\n **Parameter:** texture the source texture.\n **Parameter:** srcrect a pointer to the source rectangle, or NULL for the entire\n texture.\n **Parameter:** origin a pointer to a point indicating where the top-left corner of\n srcrect should be mapped to, or NULL for the rendering\n target's origin.\n **Parameter:** right a pointer to a point indicating where the top-right corner of\n srcrect should be mapped to, or NULL for the rendering\n target's top-right corner.\n **Parameter:** down a pointer to a point indicating where the bottom-left corner of\n srcrect should be mapped to, or NULL for the rendering target's\n bottom-left corner.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** You may only call this function from the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderTexture\n"]
16969 pub fn SDL_RenderTextureAffine(
16970 renderer: *mut SDL_Renderer,
16971 texture: *mut SDL_Texture,
16972 srcrect: *const SDL_FRect,
16973 origin: *const SDL_FPoint,
16974 right: *const SDL_FPoint,
16975 down: *const SDL_FPoint,
16976 ) -> bool;
16977}
16978unsafe extern "C" {
16979 #[doc = " Tile a portion of the texture to the current rendering target at subpixel\n precision.\n\n The pixels in `srcrect` will be repeated as many times as needed to\n completely fill `dstrect`.\n\n **Parameter:** renderer the renderer which should copy parts of a texture.\n **Parameter:** texture the source texture.\n **Parameter:** srcrect a pointer to the source rectangle, or NULL for the entire\n texture.\n **Parameter:** scale the scale used to transform srcrect into the destination\n rectangle, e.g. a 32x32 texture with a scale of 2 would fill\n 64x64 tiles.\n **Parameter:** dstrect a pointer to the destination rectangle, or NULL for the\n entire rendering target.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderTexture\n"]
16980 pub fn SDL_RenderTextureTiled(
16981 renderer: *mut SDL_Renderer,
16982 texture: *mut SDL_Texture,
16983 srcrect: *const SDL_FRect,
16984 scale: f32,
16985 dstrect: *const SDL_FRect,
16986 ) -> bool;
16987}
16988unsafe extern "C" {
16989 #[doc = " Perform a scaled copy using the 9-grid algorithm to the current rendering\n target at subpixel precision.\n\n The pixels in the texture are split into a 3x3 grid, using the different\n corner sizes for each corner, and the sides and center making up the\n remaining pixels. The corners are then scaled using `scale` and fit into\n the corners of the destination rectangle. The sides and center are then\n stretched into place to cover the remaining destination rectangle.\n\n **Parameter:** renderer the renderer which should copy parts of a texture.\n **Parameter:** texture the source texture.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be used\n for the 9-grid, or NULL to use the entire texture.\n **Parameter:** left_width the width, in pixels, of the left corners in `srcrect`.\n **Parameter:** right_width the width, in pixels, of the right corners in `srcrect`.\n **Parameter:** top_height the height, in pixels, of the top corners in `srcrect`.\n **Parameter:** bottom_height the height, in pixels, of the bottom corners in\n `srcrect`.\n **Parameter:** scale the scale used to transform the corner of `srcrect` into the\n corner of `dstrect`, or 0.0f for an unscaled copy.\n **Parameter:** dstrect a pointer to the destination rectangle, or NULL for the\n entire rendering target.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderTexture\n **See Also:** SDL_RenderTexture9GridTiled\n"]
16990 pub fn SDL_RenderTexture9Grid(
16991 renderer: *mut SDL_Renderer,
16992 texture: *mut SDL_Texture,
16993 srcrect: *const SDL_FRect,
16994 left_width: f32,
16995 right_width: f32,
16996 top_height: f32,
16997 bottom_height: f32,
16998 scale: f32,
16999 dstrect: *const SDL_FRect,
17000 ) -> bool;
17001}
17002unsafe extern "C" {
17003 #[doc = " Perform a scaled copy using the 9-grid algorithm to the current rendering\n target at subpixel precision.\n\n The pixels in the texture are split into a 3x3 grid, using the different\n corner sizes for each corner, and the sides and center making up the\n remaining pixels. The corners are then scaled using `scale` and fit into\n the corners of the destination rectangle. The sides and center are then\n tiled into place to cover the remaining destination rectangle.\n\n **Parameter:** renderer the renderer which should copy parts of a texture.\n **Parameter:** texture the source texture.\n **Parameter:** srcrect the SDL_Rect structure representing the rectangle to be used\n for the 9-grid, or NULL to use the entire texture.\n **Parameter:** left_width the width, in pixels, of the left corners in `srcrect`.\n **Parameter:** right_width the width, in pixels, of the right corners in `srcrect`.\n **Parameter:** top_height the height, in pixels, of the top corners in `srcrect`.\n **Parameter:** bottom_height the height, in pixels, of the bottom corners in\n `srcrect`.\n **Parameter:** scale the scale used to transform the corner of `srcrect` into the\n corner of `dstrect`, or 0.0f for an unscaled copy.\n **Parameter:** dstrect a pointer to the destination rectangle, or NULL for the\n entire rendering target.\n **Parameter:** tileScale the scale used to transform the borders and center of\n `srcrect` into the borders and middle of `dstrect`, or\n 1.0f for an unscaled copy.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_RenderTexture\n **See Also:** SDL_RenderTexture9Grid\n"]
17004 pub fn SDL_RenderTexture9GridTiled(
17005 renderer: *mut SDL_Renderer,
17006 texture: *mut SDL_Texture,
17007 srcrect: *const SDL_FRect,
17008 left_width: f32,
17009 right_width: f32,
17010 top_height: f32,
17011 bottom_height: f32,
17012 scale: f32,
17013 dstrect: *const SDL_FRect,
17014 tileScale: f32,
17015 ) -> bool;
17016}
17017unsafe extern "C" {
17018 #[doc = " Render a list of triangles, optionally using a texture and indices into the\n vertex array.\n\n Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and\n SDL_SetTextureAlphaMod are ignored).\n\n **Parameter:** renderer the rendering context.\n **Parameter:** texture (optional) The SDL texture to use.\n **Parameter:** vertices vertices.\n **Parameter:** num_vertices number of vertices.\n **Parameter:** indices (optional) An array of integer indices into the 'vertices'\n array, if NULL all vertices will be rendered in sequential\n order.\n **Parameter:** num_indices number of indices.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderGeometryRaw\n **See Also:** SDL_SetRenderTextureAddressMode\n"]
17019 pub fn SDL_RenderGeometry(
17020 renderer: *mut SDL_Renderer,
17021 texture: *mut SDL_Texture,
17022 vertices: *const SDL_Vertex,
17023 num_vertices: core::ffi::c_int,
17024 indices: *const core::ffi::c_int,
17025 num_indices: core::ffi::c_int,
17026 ) -> bool;
17027}
17028unsafe extern "C" {
17029 #[doc = " Render a list of triangles, optionally using a texture and indices into the\n vertex arrays.\n\n Color and alpha modulation is done per vertex (SDL_SetTextureColorMod and\n SDL_SetTextureAlphaMod are ignored).\n\n **Parameter:** renderer the rendering context.\n **Parameter:** texture (optional) The SDL texture to use.\n **Parameter:** xy vertex positions.\n **Parameter:** xy_stride byte size to move from one element to the next element.\n **Parameter:** color vertex colors (as SDL_FColor).\n **Parameter:** color_stride byte size to move from one element to the next element.\n **Parameter:** uv vertex normalized texture coordinates.\n **Parameter:** uv_stride byte size to move from one element to the next element.\n **Parameter:** num_vertices number of vertices.\n **Parameter:** indices (optional) An array of indices into the 'vertices' arrays,\n if NULL all vertices will be rendered in sequential order.\n **Parameter:** num_indices number of indices.\n **Parameter:** size_indices index size: 1 (byte), 2 (short), 4 (int).\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderGeometry\n **See Also:** SDL_SetRenderTextureAddressMode\n"]
17030 pub fn SDL_RenderGeometryRaw(
17031 renderer: *mut SDL_Renderer,
17032 texture: *mut SDL_Texture,
17033 xy: *const f32,
17034 xy_stride: core::ffi::c_int,
17035 color: *const SDL_FColor,
17036 color_stride: core::ffi::c_int,
17037 uv: *const f32,
17038 uv_stride: core::ffi::c_int,
17039 num_vertices: core::ffi::c_int,
17040 indices: *const core::ffi::c_void,
17041 num_indices: core::ffi::c_int,
17042 size_indices: core::ffi::c_int,
17043 ) -> bool;
17044}
17045unsafe extern "C" {
17046 #[doc = " Set the texture addressing mode used in SDL_RenderGeometry().\n\n **Parameter:** renderer the rendering context.\n **Parameter:** u_mode the SDL_TextureAddressMode to use for horizontal texture\n coordinates in SDL_RenderGeometry().\n **Parameter:** v_mode the SDL_TextureAddressMode to use for vertical texture\n coordinates in SDL_RenderGeometry().\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_RenderGeometry\n **See Also:** SDL_RenderGeometryRaw\n **See Also:** SDL_GetRenderTextureAddressMode\n"]
17047 pub fn SDL_SetRenderTextureAddressMode(
17048 renderer: *mut SDL_Renderer,
17049 u_mode: SDL_TextureAddressMode,
17050 v_mode: SDL_TextureAddressMode,
17051 ) -> bool;
17052}
17053unsafe extern "C" {
17054 #[doc = " Get the texture addressing mode used in SDL_RenderGeometry().\n\n **Parameter:** renderer the rendering context.\n **Parameter:** u_mode a pointer filled in with the SDL_TextureAddressMode to use\n for horizontal texture coordinates in SDL_RenderGeometry(),\n may be NULL.\n **Parameter:** v_mode a pointer filled in with the SDL_TextureAddressMode to use\n for vertical texture coordinates in SDL_RenderGeometry(), may\n be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_SetRenderTextureAddressMode\n"]
17055 pub fn SDL_GetRenderTextureAddressMode(
17056 renderer: *mut SDL_Renderer,
17057 u_mode: *mut SDL_TextureAddressMode,
17058 v_mode: *mut SDL_TextureAddressMode,
17059 ) -> bool;
17060}
17061unsafe extern "C" {
17062 #[doc = " Read pixels from the current rendering target.\n\n The returned surface contains pixels inside the desired area clipped to the\n current viewport, and should be freed with SDL_DestroySurface().\n\n Note that this returns the actual pixels on the screen, so if you are using\n logical presentation you should use SDL_GetRenderLogicalPresentationRect()\n to get the area containing your content.\n\n **WARNING**: This is a very slow operation, and should not be used\n frequently. If you're using this on the main rendering target, it should be\n called after rendering and before SDL_RenderPresent().\n\n **Parameter:** renderer the rendering context.\n **Parameter:** rect an SDL_Rect structure representing the area to read, which will\n be clipped to the current viewport, or NULL for the entire\n viewport.\n **Returns:** a new SDL_Surface on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17063 pub fn SDL_RenderReadPixels(
17064 renderer: *mut SDL_Renderer,
17065 rect: *const SDL_Rect,
17066 ) -> *mut SDL_Surface;
17067}
17068unsafe extern "C" {
17069 #[doc = " Update the screen with any rendering performed since the previous call.\n\n SDL's rendering functions operate on a backbuffer; that is, calling a\n rendering function such as SDL_RenderLine() does not directly put a line on\n the screen, but rather updates the backbuffer. As such, you compose your\n entire scene and *present* the composed backbuffer to the screen as a\n complete picture.\n\n Therefore, when using SDL's rendering API, one does all drawing intended\n for the frame, and then calls this function once per frame to present the\n final drawing to the user.\n\n The backbuffer should be considered invalidated after each present; do not\n assume that previous contents will exist between frames. You are strongly\n encouraged to call SDL_RenderClear() to initialize the backbuffer before\n starting each new frame's drawing, even if you plan to overwrite every\n pixel.\n\n Please note, that in case of rendering to a texture - there is **no need**\n to call `SDL_RenderPresent` after drawing needed objects to a texture, and\n should not be done; you are only required to change back the rendering\n target to default via `SDL_SetRenderTarget(renderer, NULL)` afterwards, as\n textures by themselves do not have a concept of backbuffers. Calling\n SDL_RenderPresent while rendering to a texture will fail.\n\n **Parameter:** renderer the rendering context.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateRenderer\n **See Also:** SDL_RenderClear\n **See Also:** SDL_RenderFillRect\n **See Also:** SDL_RenderFillRects\n **See Also:** SDL_RenderLine\n **See Also:** SDL_RenderLines\n **See Also:** SDL_RenderPoint\n **See Also:** SDL_RenderPoints\n **See Also:** SDL_RenderRect\n **See Also:** SDL_RenderRects\n **See Also:** SDL_SetRenderDrawBlendMode\n **See Also:** SDL_SetRenderDrawColor\n"]
17070 pub fn SDL_RenderPresent(renderer: *mut SDL_Renderer) -> bool;
17071}
17072unsafe extern "C" {
17073 #[doc = " Destroy the specified texture.\n\n Passing NULL or an otherwise invalid texture will set the SDL error message\n to \"Invalid texture\".\n\n **Parameter:** texture the texture to destroy.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTexture\n **See Also:** SDL_CreateTextureFromSurface\n"]
17074 pub fn SDL_DestroyTexture(texture: *mut SDL_Texture);
17075}
17076unsafe extern "C" {
17077 #[doc = " Destroy the rendering context for a window and free all associated\n textures.\n\n This should be called before destroying the associated window.\n\n **Parameter:** renderer the rendering context.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateRenderer\n"]
17078 pub fn SDL_DestroyRenderer(renderer: *mut SDL_Renderer);
17079}
17080unsafe extern "C" {
17081 #[doc = " Force the rendering context to flush any pending commands and state.\n\n You do not need to (and in fact, shouldn't) call this function unless you\n are planning to call into OpenGL/Direct3D/Metal/whatever directly, in\n addition to using an SDL_Renderer.\n\n This is for a very-specific case: if you are using SDL's render API, and\n you plan to make OpenGL/D3D/whatever calls in addition to SDL render API\n calls. If this applies, you should call this function between calls to\n SDL's render API and the low-level API you're using in cooperation.\n\n In all other cases, you can ignore this function.\n\n This call makes SDL flush any pending rendering work it was queueing up to\n do later in a single batch, and marks any internal cached state as invalid,\n so it'll prepare all its state again later, from scratch.\n\n This means you do not need to save state in your rendering code to protect\n the SDL renderer. However, there lots of arbitrary pieces of Direct3D and\n OpenGL state that can confuse things; you should use your best judgment and\n be prepared to make changes if specific state needs to be protected.\n\n **Parameter:** renderer the rendering context.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17082 pub fn SDL_FlushRenderer(renderer: *mut SDL_Renderer) -> bool;
17083}
17084unsafe extern "C" {
17085 #[doc = " Get the CAMetalLayer associated with the given Metal renderer.\n\n This function returns `void *`, so SDL doesn't have to include Metal's\n headers, but it can be safely cast to a `CAMetalLayer *`.\n\n **Parameter:** renderer the renderer to query.\n **Returns:** a `CAMetalLayer *` on success, or NULL if the renderer isn't a\n Metal renderer.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderMetalCommandEncoder\n"]
17086 pub fn SDL_GetRenderMetalLayer(renderer: *mut SDL_Renderer) -> *mut core::ffi::c_void;
17087}
17088unsafe extern "C" {
17089 #[doc = " Get the Metal command encoder for the current frame.\n\n This function returns `void *`, so SDL doesn't have to include Metal's\n headers, but it can be safely cast to an `id<MTLRenderCommandEncoder>`.\n\n This will return NULL if Metal refuses to give SDL a drawable to render to,\n which might happen if the window is hidden/minimized/offscreen. This\n doesn't apply to command encoders for render targets, just the window's\n backbuffer. Check your return values!\n\n **Parameter:** renderer the renderer to query.\n **Returns:** an `id<MTLRenderCommandEncoder>` on success, or NULL if the\n renderer isn't a Metal renderer or there was an error.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderMetalLayer\n"]
17090 pub fn SDL_GetRenderMetalCommandEncoder(renderer: *mut SDL_Renderer) -> *mut core::ffi::c_void;
17091}
17092unsafe extern "C" {
17093 #[doc = " Add a set of synchronization semaphores for the current frame.\n\n The Vulkan renderer will wait for `wait_semaphore` before submitting\n rendering commands and signal `signal_semaphore` after rendering commands\n are complete for this frame.\n\n This should be called each frame that you want semaphore synchronization.\n The Vulkan renderer may have multiple frames in flight on the GPU, so you\n should have multiple semaphores that are used for synchronization. Querying\n SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER will give you the\n maximum number of semaphores you'll need.\n\n **Parameter:** renderer the rendering context.\n **Parameter:** wait_stage_mask the VkPipelineStageFlags for the wait.\n **Parameter:** wait_semaphore a VkSempahore to wait on before rendering the current\n frame, or 0 if not needed.\n **Parameter:** signal_semaphore a VkSempahore that SDL will signal when rendering\n for the current frame is complete, or 0 if not\n needed.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is **NOT** safe to call this function from two threads at\n once.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17094 pub fn SDL_AddVulkanRenderSemaphores(
17095 renderer: *mut SDL_Renderer,
17096 wait_stage_mask: Uint32,
17097 wait_semaphore: Sint64,
17098 signal_semaphore: Sint64,
17099 ) -> bool;
17100}
17101unsafe extern "C" {
17102 #[doc = " Toggle VSync of the given renderer.\n\n When a renderer is created, vsync defaults to SDL_RENDERER_VSYNC_DISABLED.\n\n The `vsync` parameter can be 1 to synchronize present with every vertical\n refresh, 2 to synchronize present with every second vertical refresh, etc.,\n SDL_RENDERER_VSYNC_ADAPTIVE for late swap tearing (adaptive vsync), or\n SDL_RENDERER_VSYNC_DISABLED to disable. Not every value is supported by\n every driver, so you should check the return value to see whether the\n requested setting is supported.\n\n **Parameter:** renderer the renderer to toggle.\n **Parameter:** vsync the vertical refresh sync interval.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRenderVSync\n"]
17103 pub fn SDL_SetRenderVSync(renderer: *mut SDL_Renderer, vsync: core::ffi::c_int) -> bool;
17104}
17105unsafe extern "C" {
17106 #[doc = " Get VSync of the given renderer.\n\n **Parameter:** renderer the renderer to toggle.\n **Parameter:** vsync an int filled with the current vertical refresh sync interval.\n See SDL_SetRenderVSync() for the meaning of the value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_SetRenderVSync\n"]
17107 pub fn SDL_GetRenderVSync(renderer: *mut SDL_Renderer, vsync: *mut core::ffi::c_int) -> bool;
17108}
17109unsafe extern "C" {
17110 #[doc = " Draw debug text to an SDL_Renderer.\n\n This function will render a string of text to an SDL_Renderer. Note that\n this is a convenience function for debugging, with severe limitations, and\n not intended to be used for production apps and games.\n\n Among these limitations:\n\n - It accepts UTF-8 strings, but will only renders ASCII characters.\n - It has a single, tiny size (8x8 pixels). You can use logical presentation\n or SDL_SetRenderScale() to adjust it.\n - It uses a simple, hardcoded bitmap font. It does not allow different font\n selections and it does not support truetype, for proper scaling.\n - It does no word-wrapping and does not treat newline characters as a line\n break. If the text goes out of the window, it's gone.\n\n For serious text rendering, there are several good options, such as\n SDL_ttf, stb_truetype, or other external libraries.\n\n On first use, this will create an internal texture for rendering glyphs.\n This texture will live until the renderer is destroyed.\n\n The text is drawn in the color specified by SDL_SetRenderDrawColor().\n\n **Parameter:** renderer the renderer which should draw a line of text.\n **Parameter:** x the x coordinate where the top-left corner of the text will draw.\n **Parameter:** y the y coordinate where the top-left corner of the text will draw.\n **Parameter:** str the string to render.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderDebugTextFormat\n **See Also:** SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE\n"]
17111 pub fn SDL_RenderDebugText(
17112 renderer: *mut SDL_Renderer,
17113 x: f32,
17114 y: f32,
17115 str_: *const core::ffi::c_char,
17116 ) -> bool;
17117}
17118unsafe extern "C" {
17119 #[doc = " Draw debug text to an SDL_Renderer.\n\n This function will render a printf()-style format string to a renderer.\n Note that this is a convenience function for debugging, with severe\n limitations, and is not intended to be used for production apps and games.\n\n For the full list of limitations and other useful information, see\n SDL_RenderDebugText.\n\n **Parameter:** renderer the renderer which should draw the text.\n **Parameter:** x the x coordinate where the top-left corner of the text will draw.\n **Parameter:** y the y coordinate where the top-left corner of the text will draw.\n **Parameter:** fmt the format string to draw.\n **Parameter:** ... additional parameters matching % tokens in the `fmt` string, if\n any.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RenderDebugText\n **See Also:** SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE\n"]
17120 pub fn SDL_RenderDebugTextFormat(
17121 renderer: *mut SDL_Renderer,
17122 x: f32,
17123 y: f32,
17124 fmt: *const core::ffi::c_char,
17125 ...
17126 ) -> bool;
17127}
17128unsafe extern "C" {
17129 #[doc = " Set default scale mode for new textures for given renderer.\n\n When a renderer is created, scale_mode defaults to SDL_SCALEMODE_LINEAR.\n\n **Parameter:** renderer the renderer to update.\n **Parameter:** scale_mode the scale mode to change to for new textures.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_GetDefaultTextureScaleMode\n"]
17130 pub fn SDL_SetDefaultTextureScaleMode(
17131 renderer: *mut SDL_Renderer,
17132 scale_mode: SDL_ScaleMode,
17133 ) -> bool;
17134}
17135unsafe extern "C" {
17136 #[doc = " Get default texture scale mode of the given renderer.\n\n **Parameter:** renderer the renderer to get data from.\n **Parameter:** scale_mode a SDL_ScaleMode filled with current default scale mode.\n See SDL_SetDefaultTextureScaleMode() for the meaning of\n the value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_SetDefaultTextureScaleMode\n"]
17137 pub fn SDL_GetDefaultTextureScaleMode(
17138 renderer: *mut SDL_Renderer,
17139 scale_mode: *mut SDL_ScaleMode,
17140 ) -> bool;
17141}
17142#[doc = " A structure specifying the parameters of a GPU render state.\n\n **Available Since:** This struct is available since SDL 3.4.0.\n\n **See Also:** SDL_CreateGPURenderState\n"]
17143#[repr(C)]
17144#[derive(Debug, Copy, Clone, Hash)]
17145pub struct SDL_GPURenderStateCreateInfo {
17146 #[doc = "< The fragment shader to use when this render state is active\n"]
17147 pub fragment_shader: *mut SDL_GPUShader,
17148 #[doc = "< The number of additional fragment samplers to bind when this render state is active\n"]
17149 pub num_sampler_bindings: Sint32,
17150 #[doc = "< Additional fragment samplers to bind when this render state is active\n"]
17151 pub sampler_bindings: *const SDL_GPUTextureSamplerBinding,
17152 #[doc = "< The number of storage textures to bind when this render state is active\n"]
17153 pub num_storage_textures: Sint32,
17154 #[doc = "< Storage textures to bind when this render state is active\n"]
17155 pub storage_textures: *const *mut SDL_GPUTexture,
17156 #[doc = "< The number of storage buffers to bind when this render state is active\n"]
17157 pub num_storage_buffers: Sint32,
17158 #[doc = "< Storage buffers to bind when this render state is active\n"]
17159 pub storage_buffers: *const *mut SDL_GPUBuffer,
17160 #[doc = "< A properties ID for extensions. Should be 0 if no extensions are needed.\n"]
17161 pub props: SDL_PropertiesID,
17162}
17163#[allow(clippy::unnecessary_operation, clippy::identity_op)]
17164const _: () = {
17165 ["Size of SDL_GPURenderStateCreateInfo"]
17166 [::core::mem::size_of::<SDL_GPURenderStateCreateInfo>() - 64usize];
17167 ["Alignment of SDL_GPURenderStateCreateInfo"]
17168 [::core::mem::align_of::<SDL_GPURenderStateCreateInfo>() - 8usize];
17169 ["Offset of field: SDL_GPURenderStateCreateInfo::fragment_shader"]
17170 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, fragment_shader) - 0usize];
17171 ["Offset of field: SDL_GPURenderStateCreateInfo::num_sampler_bindings"]
17172 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, num_sampler_bindings) - 8usize];
17173 ["Offset of field: SDL_GPURenderStateCreateInfo::sampler_bindings"]
17174 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, sampler_bindings) - 16usize];
17175 ["Offset of field: SDL_GPURenderStateCreateInfo::num_storage_textures"]
17176 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, num_storage_textures) - 24usize];
17177 ["Offset of field: SDL_GPURenderStateCreateInfo::storage_textures"]
17178 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, storage_textures) - 32usize];
17179 ["Offset of field: SDL_GPURenderStateCreateInfo::num_storage_buffers"]
17180 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, num_storage_buffers) - 40usize];
17181 ["Offset of field: SDL_GPURenderStateCreateInfo::storage_buffers"]
17182 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, storage_buffers) - 48usize];
17183 ["Offset of field: SDL_GPURenderStateCreateInfo::props"]
17184 [::core::mem::offset_of!(SDL_GPURenderStateCreateInfo, props) - 56usize];
17185};
17186impl Default for SDL_GPURenderStateCreateInfo {
17187 fn default() -> Self {
17188 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
17189 unsafe {
17190 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
17191 s.assume_init()
17192 }
17193 }
17194}
17195#[repr(C)]
17196#[derive(Debug, Copy, Clone)]
17197pub struct SDL_GPURenderState {
17198 _unused: [u8; 0],
17199}
17200unsafe extern "C" {
17201 #[doc = " Create custom GPU render state.\n\n **Parameter:** renderer the renderer to use.\n **Parameter:** createinfo a struct describing the GPU render state to create.\n **Returns:** a custom GPU render state or NULL on failure; call SDL_GetError()\n for more information.\n\n **Thread Safety:** This function should be called on the thread that created the\n renderer.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_SetGPURenderStateFragmentUniforms\n **See Also:** SDL_SetGPURenderState\n **See Also:** SDL_DestroyGPURenderState\n"]
17202 pub fn SDL_CreateGPURenderState(
17203 renderer: *mut SDL_Renderer,
17204 createinfo: *const SDL_GPURenderStateCreateInfo,
17205 ) -> *mut SDL_GPURenderState;
17206}
17207unsafe extern "C" {
17208 #[doc = " Set sampler bindings variables in a custom GPU render state.\n\n The data is copied and will be binded using SDL_BindGPUFragmentSamplers()\n during draw call execution.\n\n **Parameter:** state the state to modify.\n **Parameter:** num_sampler_bindings The number of additional fragment samplers to\n bind.\n **Parameter:** sampler_bindings Additional fragment samplers to bind.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should be called on the thread that created the\n renderer.\n\n **Available Since:** This function is available since SDL 3.6.0.\n"]
17209 pub fn SDL_SetGPURenderStateSamplerBindings(
17210 state: *mut SDL_GPURenderState,
17211 num_sampler_bindings: core::ffi::c_int,
17212 sampler_bindings: *const SDL_GPUTextureSamplerBinding,
17213 ) -> bool;
17214}
17215unsafe extern "C" {
17216 #[doc = " Set storage textures variables in a custom GPU render state.\n\n The data is copied and will be binded using\n SDL_BindGPUFragmentStorageTextures() during draw call execution.\n\n **Parameter:** state the state to modify.\n **Parameter:** num_storage_textures The number of storage textures to bind.\n **Parameter:** storage_textures Storage textures to bind.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should be called on the thread that created the\n renderer.\n\n **Available Since:** This function is available since SDL 3.6.0.\n"]
17217 pub fn SDL_SetGPURenderStateStorageTextures(
17218 state: *mut SDL_GPURenderState,
17219 num_storage_textures: core::ffi::c_int,
17220 storage_textures: *const *mut SDL_GPUTexture,
17221 ) -> bool;
17222}
17223unsafe extern "C" {
17224 #[doc = " Set storage buffers variables in a custom GPU render state.\n\n The data is copied and will be binded using\n SDL_BindGPUFragmentStorageBuffers() during draw call execution.\n\n **Parameter:** state the state to modify.\n **Parameter:** num_storage_buffers The number of storage buffers to bind.\n **Parameter:** storage_buffers Storage buffers to bind.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should be called on the thread that created the\n renderer.\n\n **Available Since:** This function is available since SDL 3.6.0.\n"]
17225 pub fn SDL_SetGPURenderStateStorageBuffers(
17226 state: *mut SDL_GPURenderState,
17227 num_storage_buffers: core::ffi::c_int,
17228 storage_buffers: *const *mut SDL_GPUBuffer,
17229 ) -> bool;
17230}
17231unsafe extern "C" {
17232 #[doc = " Set fragment shader uniform variables in a custom GPU render state.\n\n The data is copied and will be pushed using\n SDL_PushGPUFragmentUniformData() during draw call execution.\n\n **Parameter:** state the state to modify.\n **Parameter:** slot_index the fragment uniform slot to push data to.\n **Parameter:** data client data to write.\n **Parameter:** length the length of the data to write.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should be called on the thread that created the\n renderer.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
17233 pub fn SDL_SetGPURenderStateFragmentUniforms(
17234 state: *mut SDL_GPURenderState,
17235 slot_index: Uint32,
17236 data: *const core::ffi::c_void,
17237 length: Uint32,
17238 ) -> bool;
17239}
17240unsafe extern "C" {
17241 #[doc = " Set custom GPU render state.\n\n This function sets custom GPU render state for subsequent draw calls. This\n allows using custom shaders with the GPU renderer.\n\n **Parameter:** renderer the renderer to use.\n **Parameter:** state the state to to use, or NULL to clear custom GPU render state.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function should be called on the thread that created the\n renderer.\n\n **Available Since:** This function is available since SDL 3.4.0.\n"]
17242 pub fn SDL_SetGPURenderState(
17243 renderer: *mut SDL_Renderer,
17244 state: *mut SDL_GPURenderState,
17245 ) -> bool;
17246}
17247unsafe extern "C" {
17248 #[doc = " Destroy custom GPU render state.\n\n **Parameter:** state the state to destroy.\n\n **Thread Safety:** This function should be called on the thread that created the\n renderer.\n\n **Available Since:** This function is available since SDL 3.4.0.\n\n **See Also:** SDL_CreateGPURenderState\n"]
17249 pub fn SDL_DestroyGPURenderState(state: *mut SDL_GPURenderState);
17250}
17251#[doc = " Function interface for SDL_Storage.\n\n Apps that want to supply a custom implementation of SDL_Storage will fill\n in all the functions in this struct, and then pass it to SDL_OpenStorage to\n create a custom SDL_Storage object.\n\n It is not usually necessary to do this; SDL provides standard\n implementations for many things you might expect to do with an SDL_Storage.\n\n This structure should be initialized using SDL_INIT_INTERFACE()\n\n **Available Since:** This struct is available since SDL 3.2.0.\n\n **See Also:** SDL_INIT_INTERFACE\n"]
17252#[repr(C)]
17253#[derive(Debug, Default, Copy, Clone, Hash)]
17254pub struct SDL_StorageInterface {
17255 pub version: Uint32,
17256 pub close:
17257 ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void) -> bool>,
17258 pub ready:
17259 ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void) -> bool>,
17260 pub enumerate: ::core::option::Option<
17261 unsafe extern "C" fn(
17262 userdata: *mut core::ffi::c_void,
17263 path: *const core::ffi::c_char,
17264 callback: SDL_EnumerateDirectoryCallback,
17265 callback_userdata: *mut core::ffi::c_void,
17266 ) -> bool,
17267 >,
17268 pub info: ::core::option::Option<
17269 unsafe extern "C" fn(
17270 userdata: *mut core::ffi::c_void,
17271 path: *const core::ffi::c_char,
17272 info: *mut SDL_PathInfo,
17273 ) -> bool,
17274 >,
17275 pub read_file: ::core::option::Option<
17276 unsafe extern "C" fn(
17277 userdata: *mut core::ffi::c_void,
17278 path: *const core::ffi::c_char,
17279 destination: *mut core::ffi::c_void,
17280 length: Uint64,
17281 ) -> bool,
17282 >,
17283 pub write_file: ::core::option::Option<
17284 unsafe extern "C" fn(
17285 userdata: *mut core::ffi::c_void,
17286 path: *const core::ffi::c_char,
17287 source: *const core::ffi::c_void,
17288 length: Uint64,
17289 ) -> bool,
17290 >,
17291 pub mkdir: ::core::option::Option<
17292 unsafe extern "C" fn(
17293 userdata: *mut core::ffi::c_void,
17294 path: *const core::ffi::c_char,
17295 ) -> bool,
17296 >,
17297 pub remove: ::core::option::Option<
17298 unsafe extern "C" fn(
17299 userdata: *mut core::ffi::c_void,
17300 path: *const core::ffi::c_char,
17301 ) -> bool,
17302 >,
17303 pub rename: ::core::option::Option<
17304 unsafe extern "C" fn(
17305 userdata: *mut core::ffi::c_void,
17306 oldpath: *const core::ffi::c_char,
17307 newpath: *const core::ffi::c_char,
17308 ) -> bool,
17309 >,
17310 pub copy: ::core::option::Option<
17311 unsafe extern "C" fn(
17312 userdata: *mut core::ffi::c_void,
17313 oldpath: *const core::ffi::c_char,
17314 newpath: *const core::ffi::c_char,
17315 ) -> bool,
17316 >,
17317 pub space_remaining:
17318 ::core::option::Option<unsafe extern "C" fn(userdata: *mut core::ffi::c_void) -> Uint64>,
17319}
17320#[allow(clippy::unnecessary_operation, clippy::identity_op)]
17321const _: () = {
17322 ["Size of SDL_StorageInterface"][::core::mem::size_of::<SDL_StorageInterface>() - 96usize];
17323 ["Alignment of SDL_StorageInterface"][::core::mem::align_of::<SDL_StorageInterface>() - 8usize];
17324 ["Offset of field: SDL_StorageInterface::version"]
17325 [::core::mem::offset_of!(SDL_StorageInterface, version) - 0usize];
17326 ["Offset of field: SDL_StorageInterface::close"]
17327 [::core::mem::offset_of!(SDL_StorageInterface, close) - 8usize];
17328 ["Offset of field: SDL_StorageInterface::ready"]
17329 [::core::mem::offset_of!(SDL_StorageInterface, ready) - 16usize];
17330 ["Offset of field: SDL_StorageInterface::enumerate"]
17331 [::core::mem::offset_of!(SDL_StorageInterface, enumerate) - 24usize];
17332 ["Offset of field: SDL_StorageInterface::info"]
17333 [::core::mem::offset_of!(SDL_StorageInterface, info) - 32usize];
17334 ["Offset of field: SDL_StorageInterface::read_file"]
17335 [::core::mem::offset_of!(SDL_StorageInterface, read_file) - 40usize];
17336 ["Offset of field: SDL_StorageInterface::write_file"]
17337 [::core::mem::offset_of!(SDL_StorageInterface, write_file) - 48usize];
17338 ["Offset of field: SDL_StorageInterface::mkdir"]
17339 [::core::mem::offset_of!(SDL_StorageInterface, mkdir) - 56usize];
17340 ["Offset of field: SDL_StorageInterface::remove"]
17341 [::core::mem::offset_of!(SDL_StorageInterface, remove) - 64usize];
17342 ["Offset of field: SDL_StorageInterface::rename"]
17343 [::core::mem::offset_of!(SDL_StorageInterface, rename) - 72usize];
17344 ["Offset of field: SDL_StorageInterface::copy"]
17345 [::core::mem::offset_of!(SDL_StorageInterface, copy) - 80usize];
17346 ["Offset of field: SDL_StorageInterface::space_remaining"]
17347 [::core::mem::offset_of!(SDL_StorageInterface, space_remaining) - 88usize];
17348};
17349#[repr(C)]
17350#[derive(Debug, Copy, Clone)]
17351pub struct SDL_Storage {
17352 _unused: [u8; 0],
17353}
17354unsafe extern "C" {
17355 #[doc = " Opens up a read-only container for the application's filesystem.\n\n By default, SDL_OpenTitleStorage uses the generic storage implementation.\n When the path override is not provided, the generic implementation will use\n the output of SDL_GetBasePath as the base path.\n\n **Parameter:** override a path to override the backend's default title root.\n **Parameter:** props a property list that may contain backend-specific information.\n **Returns:** a title storage container on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseStorage\n **See Also:** SDL_GetStorageFileSize\n **See Also:** SDL_OpenUserStorage\n **See Also:** SDL_ReadStorageFile\n"]
17356 pub fn SDL_OpenTitleStorage(
17357 override_: *const core::ffi::c_char,
17358 props: SDL_PropertiesID,
17359 ) -> *mut SDL_Storage;
17360}
17361unsafe extern "C" {
17362 #[doc = " Opens up a container for a user's unique read/write filesystem.\n\n While title storage can generally be kept open throughout runtime, user\n storage should only be opened when the client is ready to read/write files.\n This allows the backend to properly batch file operations and flush them\n when the container has been closed; ensuring safe and optimal save I/O.\n\n **Parameter:** org the name of your organization.\n **Parameter:** app the name of your application.\n **Parameter:** props a property list that may contain backend-specific information.\n **Returns:** a user storage container on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseStorage\n **See Also:** SDL_GetStorageFileSize\n **See Also:** SDL_GetStorageSpaceRemaining\n **See Also:** SDL_OpenTitleStorage\n **See Also:** SDL_ReadStorageFile\n **See Also:** SDL_StorageReady\n **See Also:** SDL_WriteStorageFile\n"]
17363 pub fn SDL_OpenUserStorage(
17364 org: *const core::ffi::c_char,
17365 app: *const core::ffi::c_char,
17366 props: SDL_PropertiesID,
17367 ) -> *mut SDL_Storage;
17368}
17369unsafe extern "C" {
17370 #[doc = " Opens up a container for local filesystem storage.\n\n This is provided for development and tools. Portable applications should\n use SDL_OpenTitleStorage() for access to game data and\n SDL_OpenUserStorage() for access to user data.\n\n **Parameter:** path the base path prepended to all storage paths, or NULL for no\n base path.\n **Returns:** a filesystem storage container on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseStorage\n **See Also:** SDL_GetStorageFileSize\n **See Also:** SDL_GetStorageSpaceRemaining\n **See Also:** SDL_OpenTitleStorage\n **See Also:** SDL_OpenUserStorage\n **See Also:** SDL_ReadStorageFile\n **See Also:** SDL_WriteStorageFile\n"]
17371 pub fn SDL_OpenFileStorage(path: *const core::ffi::c_char) -> *mut SDL_Storage;
17372}
17373unsafe extern "C" {
17374 #[doc = " Opens up a container using a client-provided storage interface.\n\n Applications do not need to use this function unless they are providing\n their own SDL_Storage implementation. If you just need an SDL_Storage, you\n should use the built-in implementations in SDL, like SDL_OpenTitleStorage()\n or SDL_OpenUserStorage().\n\n This function makes a copy of `iface` and the caller does not need to keep\n it around after this call.\n\n **Parameter:** iface the interface that implements this storage, initialized using\n SDL_INIT_INTERFACE().\n **Parameter:** userdata the pointer that will be passed to the interface functions.\n **Returns:** a storage container on success or NULL on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CloseStorage\n **See Also:** SDL_GetStorageFileSize\n **See Also:** SDL_GetStorageSpaceRemaining\n **See Also:** SDL_INIT_INTERFACE\n **See Also:** SDL_ReadStorageFile\n **See Also:** SDL_StorageReady\n **See Also:** SDL_WriteStorageFile\n"]
17375 pub fn SDL_OpenStorage(
17376 iface: *const SDL_StorageInterface,
17377 userdata: *mut core::ffi::c_void,
17378 ) -> *mut SDL_Storage;
17379}
17380unsafe extern "C" {
17381 #[doc = " Closes and frees a storage container.\n\n **Parameter:** storage a storage container to close.\n **Returns:** true if the container was freed with no errors, false otherwise;\n call SDL_GetError() for more information. Even if the function\n returns an error, the container data will be freed; the error is\n only for informational purposes.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_OpenFileStorage\n **See Also:** SDL_OpenStorage\n **See Also:** SDL_OpenTitleStorage\n **See Also:** SDL_OpenUserStorage\n"]
17382 pub fn SDL_CloseStorage(storage: *mut SDL_Storage) -> bool;
17383}
17384unsafe extern "C" {
17385 #[doc = " Checks if the storage container is ready to use.\n\n This function should be called in regular intervals until it returns true -\n however, it is not recommended to spinwait on this call, as the backend may\n depend on a synchronous message loop. You might instead poll this in your\n game's main loop while processing events and drawing a loading screen.\n\n **Parameter:** storage a storage container to query.\n **Returns:** true if the container is ready, false otherwise.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17386 pub fn SDL_StorageReady(storage: *mut SDL_Storage) -> bool;
17387}
17388unsafe extern "C" {
17389 #[doc = " Query the size of a file within a storage container.\n\n **Parameter:** storage a storage container to query.\n **Parameter:** path the relative path of the file to query.\n **Parameter:** length a pointer to be filled with the file's length.\n **Returns:** true if the file could be queried or false on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_ReadStorageFile\n **See Also:** SDL_StorageReady\n"]
17390 pub fn SDL_GetStorageFileSize(
17391 storage: *mut SDL_Storage,
17392 path: *const core::ffi::c_char,
17393 length: *mut Uint64,
17394 ) -> bool;
17395}
17396unsafe extern "C" {
17397 #[doc = " Synchronously read a file from a storage container into a client-provided\n buffer.\n\n The value of `length` must match the length of the file exactly; call\n SDL_GetStorageFileSize() to get this value. This behavior may be relaxed in\n a future release.\n\n **Parameter:** storage a storage container to read from.\n **Parameter:** path the relative path of the file to read.\n **Parameter:** destination a client-provided buffer to read the file into.\n **Parameter:** length the length of the destination buffer.\n **Returns:** true if the file was read or false on failure; call SDL_GetError()\n for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetStorageFileSize\n **See Also:** SDL_StorageReady\n **See Also:** SDL_WriteStorageFile\n"]
17398 pub fn SDL_ReadStorageFile(
17399 storage: *mut SDL_Storage,
17400 path: *const core::ffi::c_char,
17401 destination: *mut core::ffi::c_void,
17402 length: Uint64,
17403 ) -> bool;
17404}
17405unsafe extern "C" {
17406 #[doc = " Synchronously write a file from client memory into a storage container.\n\n **Parameter:** storage a storage container to write to.\n **Parameter:** path the relative path of the file to write.\n **Parameter:** source a client-provided buffer to write from.\n **Parameter:** length the length of the source buffer.\n **Returns:** true if the file was written or false on failure; call\n SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetStorageSpaceRemaining\n **See Also:** SDL_ReadStorageFile\n **See Also:** SDL_StorageReady\n"]
17407 pub fn SDL_WriteStorageFile(
17408 storage: *mut SDL_Storage,
17409 path: *const core::ffi::c_char,
17410 source: *const core::ffi::c_void,
17411 length: Uint64,
17412 ) -> bool;
17413}
17414unsafe extern "C" {
17415 #[doc = " Create a directory in a writable storage container.\n\n **Parameter:** storage a storage container.\n **Parameter:** path the path of the directory to create.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StorageReady\n"]
17416 pub fn SDL_CreateStorageDirectory(
17417 storage: *mut SDL_Storage,
17418 path: *const core::ffi::c_char,
17419 ) -> bool;
17420}
17421unsafe extern "C" {
17422 #[doc = " Enumerate a directory in a storage container through a callback function.\n\n This function provides every directory entry through an app-provided\n callback, called once for each directory entry, until all results have been\n provided or the callback returns either SDL_ENUM_SUCCESS or\n SDL_ENUM_FAILURE.\n\n This will return false if there was a system problem in general, or if a\n callback returns SDL_ENUM_FAILURE. A successful return means a callback\n returned SDL_ENUM_SUCCESS to halt enumeration, or all directory entries\n were enumerated.\n\n If `path` is NULL, this is treated as a request to enumerate the root of\n the storage container's tree. An empty string also works for this.\n\n **Parameter:** storage a storage container.\n **Parameter:** path the path of the directory to enumerate, or NULL for the root.\n **Parameter:** callback a function that is called for each entry in the directory.\n **Parameter:** userdata a pointer that is passed to `callback`.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StorageReady\n"]
17423 pub fn SDL_EnumerateStorageDirectory(
17424 storage: *mut SDL_Storage,
17425 path: *const core::ffi::c_char,
17426 callback: SDL_EnumerateDirectoryCallback,
17427 userdata: *mut core::ffi::c_void,
17428 ) -> bool;
17429}
17430unsafe extern "C" {
17431 #[doc = " Remove a file or an empty directory in a writable storage container.\n\n **Parameter:** storage a storage container.\n **Parameter:** path the path to remove from the filesystem.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StorageReady\n"]
17432 pub fn SDL_RemoveStoragePath(storage: *mut SDL_Storage, path: *const core::ffi::c_char)
17433 -> bool;
17434}
17435unsafe extern "C" {
17436 #[doc = " Rename a file or directory in a writable storage container.\n\n **Parameter:** storage a storage container.\n **Parameter:** oldpath the old path.\n **Parameter:** newpath the new path.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StorageReady\n"]
17437 pub fn SDL_RenameStoragePath(
17438 storage: *mut SDL_Storage,
17439 oldpath: *const core::ffi::c_char,
17440 newpath: *const core::ffi::c_char,
17441 ) -> bool;
17442}
17443unsafe extern "C" {
17444 #[doc = " Copy a file in a writable storage container.\n\n **Parameter:** storage a storage container.\n **Parameter:** oldpath the old path.\n **Parameter:** newpath the new path.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StorageReady\n"]
17445 pub fn SDL_CopyStorageFile(
17446 storage: *mut SDL_Storage,
17447 oldpath: *const core::ffi::c_char,
17448 newpath: *const core::ffi::c_char,
17449 ) -> bool;
17450}
17451unsafe extern "C" {
17452 #[doc = " Get information about a filesystem path in a storage container.\n\n **Parameter:** storage a storage container.\n **Parameter:** path the path to query.\n **Parameter:** info a pointer filled in with information about the path, or NULL to\n check for the existence of a file.\n **Returns:** true on success or false if the file doesn't exist, or another\n failure; call SDL_GetError() for more information.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StorageReady\n"]
17453 pub fn SDL_GetStoragePathInfo(
17454 storage: *mut SDL_Storage,
17455 path: *const core::ffi::c_char,
17456 info: *mut SDL_PathInfo,
17457 ) -> bool;
17458}
17459unsafe extern "C" {
17460 #[doc = " Queries the remaining space in a storage container.\n\n **Parameter:** storage a storage container to query.\n **Returns:** the amount of remaining space, in bytes.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_StorageReady\n **See Also:** SDL_WriteStorageFile\n"]
17461 pub fn SDL_GetStorageSpaceRemaining(storage: *mut SDL_Storage) -> Uint64;
17462}
17463unsafe extern "C" {
17464 #[doc = " Enumerate a directory tree, filtered by pattern, and return a list.\n\n Files are filtered out if they don't match the string in `pattern`, which\n may contain wildcard characters `*` (match everything) and `?` (match one\n character). If pattern is NULL, no filtering is done and all results are\n returned. Subdirectories are permitted, and are specified with a path\n separator of '/'. Wildcard characters `*` and `?` never match a path\n separator.\n\n `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching\n case-insensitive.\n\n The returned array is always NULL-terminated, for your iterating\n convenience, but if `count` is non-NULL, on return it will contain the\n number of items in the array, not counting the NULL terminator.\n\n If `path` is NULL, this is treated as a request to enumerate the root of\n the storage container's tree. An empty string also works for this.\n\n **Parameter:** storage a storage container.\n **Parameter:** path the path of the directory to enumerate, or NULL for the root.\n **Parameter:** pattern the pattern that files in the directory must match. Can be\n NULL.\n **Parameter:** flags `SDL_GLOB_*` bitflags that affect this search.\n **Parameter:** count on return, will be set to the number of items in the returned\n array. Can be NULL.\n **Returns:** an array of strings on success or NULL on failure; call\n SDL_GetError() for more information. The caller should pass the\n returned pointer to SDL_free when done with it. This is a single\n allocation that should be freed with SDL_free() when it is no\n longer needed.\n\n **Thread Safety:** It is safe to call this function from any thread, assuming\n the `storage` object is thread-safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17465 pub fn SDL_GlobStorageDirectory(
17466 storage: *mut SDL_Storage,
17467 path: *const core::ffi::c_char,
17468 pattern: *const core::ffi::c_char,
17469 flags: SDL_GlobFlags,
17470 count: *mut core::ffi::c_int,
17471 ) -> *mut *mut core::ffi::c_char;
17472}
17473#[repr(C)]
17474#[derive(Copy, Clone)]
17475pub struct _XEvent {
17476 _unused: [u8; 0],
17477}
17478pub type XEvent = _XEvent;
17479#[doc = " A callback to be used with SDL_SetX11EventHook.\n\n This callback may modify the event, and should return true if the event\n should continue to be processed, or false to prevent further processing.\n\n As this is processing an event directly from the X11 event loop, this\n callback should do the minimum required work and return quickly.\n\n **Parameter:** userdata the app-defined pointer provided to SDL_SetX11EventHook.\n **Parameter:** xevent a pointer to an Xlib XEvent union to process.\n **Returns:** true to let event continue on, false to drop it.\n\n **Thread Safety:** This may only be called (by SDL) from the thread handling the\n X11 event loop.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_SetX11EventHook\n"]
17480pub type SDL_X11EventHook = ::core::option::Option<
17481 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, xevent: *mut XEvent) -> bool,
17482>;
17483unsafe extern "C" {
17484 #[doc = " Set a callback for every X11 event.\n\n The callback may modify the event, and should return true if the event\n should continue to be processed, or false to prevent further processing.\n\n **Parameter:** callback the SDL_X11EventHook function to call.\n **Parameter:** userdata a pointer to pass to every iteration of `callback`.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17485 pub fn SDL_SetX11EventHook(callback: SDL_X11EventHook, userdata: *mut core::ffi::c_void);
17486}
17487unsafe extern "C" {
17488 #[doc = " Sets the UNIX nice value for a thread.\n\n This uses setpriority() if possible, and RealtimeKit if available.\n\n **Parameter:** threadID the Unix thread ID to change priority of.\n **Parameter:** priority the new, Unix-specific, priority value.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17489 pub fn SDL_SetLinuxThreadPriority(threadID: Sint64, priority: core::ffi::c_int) -> bool;
17490}
17491unsafe extern "C" {
17492 #[doc = " Sets the priority (not nice level) and scheduling policy for a thread.\n\n This uses setpriority() if possible, and RealtimeKit if available.\n\n **Parameter:** threadID the Unix thread ID to change priority of.\n **Parameter:** sdlPriority the new SDL_ThreadPriority value.\n **Parameter:** schedPolicy the new scheduling policy (SCHED_FIFO, SCHED_RR,\n SCHED_OTHER, etc...).\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17493 pub fn SDL_SetLinuxThreadPriorityAndPolicy(
17494 threadID: Sint64,
17495 sdlPriority: core::ffi::c_int,
17496 schedPolicy: core::ffi::c_int,
17497 ) -> bool;
17498}
17499unsafe extern "C" {
17500 #[doc = " Query if the current device is a tablet.\n\n If SDL can't determine this, it will return false.\n\n **Returns:** true if the device is a tablet, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17501 pub fn SDL_IsTablet() -> bool;
17502}
17503unsafe extern "C" {
17504 #[doc = " Query if the current device is a TV.\n\n If SDL can't determine this, it will return false.\n\n **Returns:** true if the device is a TV, false otherwise.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17505 pub fn SDL_IsTV() -> bool;
17506}
17507impl SDL_Sandbox {
17508 pub const SDL_SANDBOX_NONE: SDL_Sandbox = SDL_Sandbox(0);
17509 pub const SDL_SANDBOX_UNKNOWN_CONTAINER: SDL_Sandbox = SDL_Sandbox(1);
17510 pub const SDL_SANDBOX_FLATPAK: SDL_Sandbox = SDL_Sandbox(2);
17511 pub const SDL_SANDBOX_SNAP: SDL_Sandbox = SDL_Sandbox(3);
17512 pub const SDL_SANDBOX_MACOS: SDL_Sandbox = SDL_Sandbox(4);
17513}
17514#[repr(transparent)]
17515#[doc = " Application sandbox environment.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n"]
17516#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
17517pub struct SDL_Sandbox(pub core::ffi::c_uint);
17518unsafe extern "C" {
17519 #[doc = " Get the application sandbox environment, if any.\n\n **Returns:** the application sandbox environment or SDL_SANDBOX_NONE if the\n application is not running in a sandbox environment.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17520 pub fn SDL_GetSandbox() -> SDL_Sandbox;
17521}
17522unsafe extern "C" {
17523 #[doc = " Let iOS apps with external event handling report\n onApplicationWillTerminate.\n\n This functions allows iOS apps that have their own event handling to hook\n into SDL to generate SDL events. This maps directly to an iOS-specific\n event, but since it doesn't do anything iOS-specific internally, it is\n available on all platforms, in case it might be useful for some specific\n paradigm. Most apps do not need to use this directly; SDL's internal event\n code will handle all this for windows created by SDL_CreateWindow!\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17524 pub fn SDL_OnApplicationWillTerminate();
17525}
17526unsafe extern "C" {
17527 #[doc = " Let iOS apps with external event handling report\n onApplicationDidReceiveMemoryWarning.\n\n This functions allows iOS apps that have their own event handling to hook\n into SDL to generate SDL events. This maps directly to an iOS-specific\n event, but since it doesn't do anything iOS-specific internally, it is\n available on all platforms, in case it might be useful for some specific\n paradigm. Most apps do not need to use this directly; SDL's internal event\n code will handle all this for windows created by SDL_CreateWindow!\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17528 pub fn SDL_OnApplicationDidReceiveMemoryWarning();
17529}
17530unsafe extern "C" {
17531 #[doc = " Let iOS apps with external event handling report\n onApplicationWillResignActive.\n\n This functions allows iOS apps that have their own event handling to hook\n into SDL to generate SDL events. This maps directly to an iOS-specific\n event, but since it doesn't do anything iOS-specific internally, it is\n available on all platforms, in case it might be useful for some specific\n paradigm. Most apps do not need to use this directly; SDL's internal event\n code will handle all this for windows created by SDL_CreateWindow!\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17532 pub fn SDL_OnApplicationWillEnterBackground();
17533}
17534unsafe extern "C" {
17535 #[doc = " Let iOS apps with external event handling report\n onApplicationDidEnterBackground.\n\n This functions allows iOS apps that have their own event handling to hook\n into SDL to generate SDL events. This maps directly to an iOS-specific\n event, but since it doesn't do anything iOS-specific internally, it is\n available on all platforms, in case it might be useful for some specific\n paradigm. Most apps do not need to use this directly; SDL's internal event\n code will handle all this for windows created by SDL_CreateWindow!\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17536 pub fn SDL_OnApplicationDidEnterBackground();
17537}
17538unsafe extern "C" {
17539 #[doc = " Let iOS apps with external event handling report\n onApplicationWillEnterForeground.\n\n This functions allows iOS apps that have their own event handling to hook\n into SDL to generate SDL events. This maps directly to an iOS-specific\n event, but since it doesn't do anything iOS-specific internally, it is\n available on all platforms, in case it might be useful for some specific\n paradigm. Most apps do not need to use this directly; SDL's internal event\n code will handle all this for windows created by SDL_CreateWindow!\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17540 pub fn SDL_OnApplicationWillEnterForeground();
17541}
17542unsafe extern "C" {
17543 #[doc = " Let iOS apps with external event handling report\n onApplicationDidBecomeActive.\n\n This functions allows iOS apps that have their own event handling to hook\n into SDL to generate SDL events. This maps directly to an iOS-specific\n event, but since it doesn't do anything iOS-specific internally, it is\n available on all platforms, in case it might be useful for some specific\n paradigm. Most apps do not need to use this directly; SDL's internal event\n code will handle all this for windows created by SDL_CreateWindow!\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17544 pub fn SDL_OnApplicationDidEnterForeground();
17545}
17546#[doc = " A structure holding a calendar date and time broken down into its\n components.\n\n **Available Since:** This struct is available since SDL 3.2.0.\n"]
17547#[repr(C)]
17548#[derive(Debug, Default, Copy, Clone, Hash)]
17549pub struct SDL_DateTime {
17550 #[doc = "< Year\n"]
17551 pub year: core::ffi::c_int,
17552 #[doc = "< Month [01-12]\n"]
17553 pub month: core::ffi::c_int,
17554 #[doc = "< Day of the month [01-31]\n"]
17555 pub day: core::ffi::c_int,
17556 #[doc = "< Hour [0-23]\n"]
17557 pub hour: core::ffi::c_int,
17558 #[doc = "< Minute [0-59]\n"]
17559 pub minute: core::ffi::c_int,
17560 #[doc = "< Seconds [0-60]\n"]
17561 pub second: core::ffi::c_int,
17562 #[doc = "< Nanoseconds [0-999999999]\n"]
17563 pub nanosecond: core::ffi::c_int,
17564 #[doc = "< Day of the week [0-6] (0 being Sunday)\n"]
17565 pub day_of_week: core::ffi::c_int,
17566 #[doc = "< Seconds east of UTC\n"]
17567 pub utc_offset: core::ffi::c_int,
17568}
17569#[allow(clippy::unnecessary_operation, clippy::identity_op)]
17570const _: () = {
17571 ["Size of SDL_DateTime"][::core::mem::size_of::<SDL_DateTime>() - 36usize];
17572 ["Alignment of SDL_DateTime"][::core::mem::align_of::<SDL_DateTime>() - 4usize];
17573 ["Offset of field: SDL_DateTime::year"][::core::mem::offset_of!(SDL_DateTime, year) - 0usize];
17574 ["Offset of field: SDL_DateTime::month"][::core::mem::offset_of!(SDL_DateTime, month) - 4usize];
17575 ["Offset of field: SDL_DateTime::day"][::core::mem::offset_of!(SDL_DateTime, day) - 8usize];
17576 ["Offset of field: SDL_DateTime::hour"][::core::mem::offset_of!(SDL_DateTime, hour) - 12usize];
17577 ["Offset of field: SDL_DateTime::minute"]
17578 [::core::mem::offset_of!(SDL_DateTime, minute) - 16usize];
17579 ["Offset of field: SDL_DateTime::second"]
17580 [::core::mem::offset_of!(SDL_DateTime, second) - 20usize];
17581 ["Offset of field: SDL_DateTime::nanosecond"]
17582 [::core::mem::offset_of!(SDL_DateTime, nanosecond) - 24usize];
17583 ["Offset of field: SDL_DateTime::day_of_week"]
17584 [::core::mem::offset_of!(SDL_DateTime, day_of_week) - 28usize];
17585 ["Offset of field: SDL_DateTime::utc_offset"]
17586 [::core::mem::offset_of!(SDL_DateTime, utc_offset) - 32usize];
17587};
17588impl SDL_DateFormat {
17589 #[doc = "< Year/Month/Day\n"]
17590 pub const SDL_DATE_FORMAT_YYYYMMDD: SDL_DateFormat = SDL_DateFormat(0);
17591 #[doc = "< Day/Month/Year\n"]
17592 pub const SDL_DATE_FORMAT_DDMMYYYY: SDL_DateFormat = SDL_DateFormat(1);
17593 #[doc = "< Month/Day/Year\n"]
17594 pub const SDL_DATE_FORMAT_MMDDYYYY: SDL_DateFormat = SDL_DateFormat(2);
17595}
17596#[repr(transparent)]
17597#[doc = " The preferred date format of the current system locale.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDateTimeLocalePreferences\n"]
17598#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
17599pub struct SDL_DateFormat(pub core::ffi::c_uint);
17600impl SDL_TimeFormat {
17601 #[doc = "< 24 hour time\n"]
17602 pub const SDL_TIME_FORMAT_24HR: SDL_TimeFormat = SDL_TimeFormat(0);
17603 #[doc = "< 12 hour time\n"]
17604 pub const SDL_TIME_FORMAT_12HR: SDL_TimeFormat = SDL_TimeFormat(1);
17605}
17606#[repr(transparent)]
17607#[doc = " The preferred time format of the current system locale.\n\n **Available Since:** This enum is available since SDL 3.2.0.\n\n **See Also:** SDL_GetDateTimeLocalePreferences\n"]
17608#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
17609pub struct SDL_TimeFormat(pub core::ffi::c_uint);
17610unsafe extern "C" {
17611 #[doc = " Gets the current preferred date and time format for the system locale.\n\n This might be a \"slow\" call that has to query the operating system. It's\n best to ask for this once and save the results. However, the preferred\n formats can change, usually because the user has changed a system\n preference outside of your program.\n\n **Parameter:** dateFormat a pointer to the SDL_DateFormat to hold the returned date\n format, may be NULL.\n **Parameter:** timeFormat a pointer to the SDL_TimeFormat to hold the returned time\n format, may be NULL.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17612 pub fn SDL_GetDateTimeLocalePreferences(
17613 dateFormat: *mut SDL_DateFormat,
17614 timeFormat: *mut SDL_TimeFormat,
17615 ) -> bool;
17616}
17617unsafe extern "C" {
17618 #[doc = " Gets the current value of the system realtime clock in nanoseconds since\n Jan 1, 1970 in Universal Coordinated Time (UTC).\n\n **Parameter:** ticks the SDL_Time to hold the returned tick count.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17619 pub fn SDL_GetCurrentTime(ticks: *mut SDL_Time) -> bool;
17620}
17621unsafe extern "C" {
17622 #[doc = " Converts an SDL_Time in nanoseconds since the epoch to a calendar time in\n the SDL_DateTime format.\n\n **Parameter:** ticks the SDL_Time to be converted.\n **Parameter:** dt the resulting SDL_DateTime.\n **Parameter:** localTime the resulting SDL_DateTime will be expressed in local time\n if true, otherwise it will be in Universal Coordinated\n Time (UTC).\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17623 pub fn SDL_TimeToDateTime(ticks: SDL_Time, dt: *mut SDL_DateTime, localTime: bool) -> bool;
17624}
17625unsafe extern "C" {
17626 #[doc = " Converts a calendar time to an SDL_Time in nanoseconds since the epoch.\n\n This function ignores the day_of_week member of the SDL_DateTime struct, so\n it may remain unset.\n\n **Parameter:** dt the source SDL_DateTime.\n **Parameter:** ticks the resulting SDL_Time.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17627 pub fn SDL_DateTimeToTime(dt: *const SDL_DateTime, ticks: *mut SDL_Time) -> bool;
17628}
17629unsafe extern "C" {
17630 #[doc = " Converts an SDL time into a Windows FILETIME (100-nanosecond intervals\n since January 1, 1601).\n\n This function fills in the two 32-bit values of the FILETIME structure.\n\n **Parameter:** ticks the time to convert.\n **Parameter:** dwLowDateTime a pointer filled in with the low portion of the\n Windows FILETIME value.\n **Parameter:** dwHighDateTime a pointer filled in with the high portion of the\n Windows FILETIME value.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17631 pub fn SDL_TimeToWindows(
17632 ticks: SDL_Time,
17633 dwLowDateTime: *mut Uint32,
17634 dwHighDateTime: *mut Uint32,
17635 );
17636}
17637unsafe extern "C" {
17638 #[doc = " Converts a Windows FILETIME (100-nanosecond intervals since January 1,\n 1601) to an SDL time.\n\n This function takes the two 32-bit values of the FILETIME structure as\n parameters.\n\n **Parameter:** dwLowDateTime the low portion of the Windows FILETIME value.\n **Parameter:** dwHighDateTime the high portion of the Windows FILETIME value.\n **Returns:** the converted SDL time.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17639 pub fn SDL_TimeFromWindows(dwLowDateTime: Uint32, dwHighDateTime: Uint32) -> SDL_Time;
17640}
17641unsafe extern "C" {
17642 #[doc = " Get the number of days in a month for a given year.\n\n **Parameter:** year the year.\n **Parameter:** month the month [1-12].\n **Returns:** the number of days in the requested month or -1 on failure; call\n SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17643 pub fn SDL_GetDaysInMonth(year: core::ffi::c_int, month: core::ffi::c_int) -> core::ffi::c_int;
17644}
17645unsafe extern "C" {
17646 #[doc = " Get the day of year for a calendar date.\n\n **Parameter:** year the year component of the date.\n **Parameter:** month the month component of the date.\n **Parameter:** day the day component of the date.\n **Returns:** the day of year [0-365] if the date is valid or -1 on failure;\n call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17647 pub fn SDL_GetDayOfYear(
17648 year: core::ffi::c_int,
17649 month: core::ffi::c_int,
17650 day: core::ffi::c_int,
17651 ) -> core::ffi::c_int;
17652}
17653unsafe extern "C" {
17654 #[doc = " Get the day of week for a calendar date.\n\n **Parameter:** year the year component of the date.\n **Parameter:** month the month component of the date.\n **Parameter:** day the day component of the date.\n **Returns:** a value between 0 and 6 (0 being Sunday) if the date is valid or\n -1 on failure; call SDL_GetError() for more information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17655 pub fn SDL_GetDayOfWeek(
17656 year: core::ffi::c_int,
17657 month: core::ffi::c_int,
17658 day: core::ffi::c_int,
17659 ) -> core::ffi::c_int;
17660}
17661unsafe extern "C" {
17662 #[doc = " Get the number of milliseconds that have elapsed since the SDL library\n initialization.\n\n **Returns:** an unsigned 64‑bit integer that represents the number of\n milliseconds that have elapsed since the SDL library was\n initialized (typically via a call to SDL_Init).\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTicksNS\n"]
17663 pub fn SDL_GetTicks() -> Uint64;
17664}
17665unsafe extern "C" {
17666 #[doc = " Get the number of nanoseconds since SDL library initialization.\n\n **Returns:** an unsigned 64-bit value representing the number of nanoseconds\n since the SDL library initialized.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17667 pub fn SDL_GetTicksNS() -> Uint64;
17668}
17669unsafe extern "C" {
17670 #[doc = " Get the current value of the high resolution counter.\n\n This function is typically used for profiling.\n\n The counter values are only meaningful relative to each other. Differences\n between values can be converted to times by using\n SDL_GetPerformanceFrequency().\n\n **Returns:** the current counter value.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPerformanceFrequency\n"]
17671 pub fn SDL_GetPerformanceCounter() -> Uint64;
17672}
17673unsafe extern "C" {
17674 #[doc = " Get the count per second of the high resolution counter.\n\n **Returns:** a platform-specific count per second.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetPerformanceCounter\n"]
17675 pub fn SDL_GetPerformanceFrequency() -> Uint64;
17676}
17677unsafe extern "C" {
17678 #[doc = " Wait a specified number of milliseconds before returning.\n\n This function waits a specified number of milliseconds before returning. It\n waits at least the specified time, but possibly longer due to OS\n scheduling.\n\n **Parameter:** ms the number of milliseconds to delay.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_DelayNS\n **See Also:** SDL_DelayPrecise\n"]
17679 pub fn SDL_Delay(ms: Uint32);
17680}
17681unsafe extern "C" {
17682 #[doc = " Wait a specified number of nanoseconds before returning.\n\n This function waits a specified number of nanoseconds before returning. It\n waits at least the specified time, but possibly longer due to OS\n scheduling.\n\n **Parameter:** ns the number of nanoseconds to delay.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Delay\n **See Also:** SDL_DelayPrecise\n"]
17683 pub fn SDL_DelayNS(ns: Uint64);
17684}
17685unsafe extern "C" {
17686 #[doc = " Wait a specified number of nanoseconds before returning.\n\n This function waits a specified number of nanoseconds before returning. It\n will attempt to wait as close to the requested time as possible, busy\n waiting if necessary, but could return later due to OS scheduling.\n\n **Parameter:** ns the number of nanoseconds to delay.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Delay\n **See Also:** SDL_DelayNS\n"]
17687 pub fn SDL_DelayPrecise(ns: Uint64);
17688}
17689#[doc = " Definition of the timer ID type.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
17690pub type SDL_TimerID = Uint32;
17691#[doc = " Function prototype for the millisecond timer callback function.\n\n The callback function is passed the current timer interval and returns the\n next timer interval, in milliseconds. If the returned value is the same as\n the one passed in, the periodic alarm continues, otherwise a new alarm is\n scheduled. If the callback returns 0, the periodic alarm is canceled and\n will be removed.\n\n **Parameter:** userdata an arbitrary pointer provided by the app through\n SDL_AddTimer, for its own use.\n **Parameter:** timerID the current timer being processed.\n **Parameter:** interval the current callback time interval.\n **Returns:** the new callback time interval, or 0 to disable further runs of\n the callback.\n\n **Thread Safety:** SDL may call this callback at any time from a background\n thread; the application is responsible for locking resources\n the callback touches that need to be protected.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_AddTimer\n"]
17692pub type SDL_TimerCallback = ::core::option::Option<
17693 unsafe extern "C" fn(
17694 userdata: *mut core::ffi::c_void,
17695 timerID: SDL_TimerID,
17696 interval: Uint32,
17697 ) -> Uint32,
17698>;
17699unsafe extern "C" {
17700 #[doc = " Call a callback function at a future time.\n\n The callback function is passed the current timer interval and the user\n supplied parameter from the SDL_AddTimer() call and should return the next\n timer interval. If the value returned from the callback is 0, the timer is\n canceled and will be removed.\n\n The callback is run on a separate thread, and for short timeouts can\n potentially be called before this function returns.\n\n Timers take into account the amount of time it took to execute the\n callback. For example, if the callback took 250 ms to execute and returned\n 1000 (ms), the timer would only wait another 750 ms before its next\n iteration.\n\n Timing may be inexact due to OS scheduling. Be sure to note the current\n time with SDL_GetTicksNS() or SDL_GetPerformanceCounter() in case your\n callback needs to adjust for variances.\n\n **Parameter:** interval the timer delay, in milliseconds, passed to `callback`.\n **Parameter:** callback the SDL_TimerCallback function to call when the specified\n `interval` elapses.\n **Parameter:** userdata a pointer that is passed to `callback`.\n **Returns:** a timer ID or 0 on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddTimerNS\n **See Also:** SDL_RemoveTimer\n"]
17701 pub fn SDL_AddTimer(
17702 interval: Uint32,
17703 callback: SDL_TimerCallback,
17704 userdata: *mut core::ffi::c_void,
17705 ) -> SDL_TimerID;
17706}
17707#[doc = " Function prototype for the nanosecond timer callback function.\n\n The callback function is passed the current timer interval and returns the\n next timer interval, in nanoseconds. If the returned value is the same as\n the one passed in, the periodic alarm continues, otherwise a new alarm is\n scheduled. If the callback returns 0, the periodic alarm is canceled and\n will be removed.\n\n **Parameter:** userdata an arbitrary pointer provided by the app through\n SDL_AddTimer, for its own use.\n **Parameter:** timerID the current timer being processed.\n **Parameter:** interval the current callback time interval.\n **Returns:** the new callback time interval, or 0 to disable further runs of\n the callback.\n\n **Thread Safety:** SDL may call this callback at any time from a background\n thread; the application is responsible for locking resources\n the callback touches that need to be protected.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_AddTimerNS\n"]
17708pub type SDL_NSTimerCallback = ::core::option::Option<
17709 unsafe extern "C" fn(
17710 userdata: *mut core::ffi::c_void,
17711 timerID: SDL_TimerID,
17712 interval: Uint64,
17713 ) -> Uint64,
17714>;
17715unsafe extern "C" {
17716 #[doc = " Call a callback function at a future time.\n\n The callback function is passed the current timer interval and the user\n supplied parameter from the SDL_AddTimerNS() call and should return the\n next timer interval. If the value returned from the callback is 0, the\n timer is canceled and will be removed.\n\n The callback is run on a separate thread, and for short timeouts can\n potentially be called before this function returns.\n\n Timers take into account the amount of time it took to execute the\n callback. For example, if the callback took 250 ns to execute and returned\n 1000 (ns), the timer would only wait another 750 ns before its next\n iteration.\n\n Timing may be inexact due to OS scheduling. Be sure to note the current\n time with SDL_GetTicksNS() or SDL_GetPerformanceCounter() in case your\n callback needs to adjust for variances.\n\n **Parameter:** interval the timer delay, in nanoseconds, passed to `callback`.\n **Parameter:** callback the SDL_TimerCallback function to call when the specified\n `interval` elapses.\n **Parameter:** userdata a pointer that is passed to `callback`.\n **Returns:** a timer ID or 0 on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddTimer\n **See Also:** SDL_RemoveTimer\n"]
17717 pub fn SDL_AddTimerNS(
17718 interval: Uint64,
17719 callback: SDL_NSTimerCallback,
17720 userdata: *mut core::ffi::c_void,
17721 ) -> SDL_TimerID;
17722}
17723unsafe extern "C" {
17724 #[doc = " Remove a timer created with SDL_AddTimer().\n\n **Parameter:** id the ID of the timer to remove.\n **Returns:** true on success or false on failure; call SDL_GetError() for more\n information.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddTimer\n"]
17725 pub fn SDL_RemoveTimer(id: SDL_TimerID) -> bool;
17726}
17727#[repr(C)]
17728#[derive(Debug, Copy, Clone)]
17729pub struct SDL_Tray {
17730 _unused: [u8; 0],
17731}
17732#[repr(C)]
17733#[derive(Debug, Copy, Clone)]
17734pub struct SDL_TrayMenu {
17735 _unused: [u8; 0],
17736}
17737#[repr(C)]
17738#[derive(Debug, Copy, Clone)]
17739pub struct SDL_TrayEntry {
17740 _unused: [u8; 0],
17741}
17742#[doc = " Flags that control the creation of system tray entries.\n\n Some of these flags are required; exactly one of them must be specified at\n the time a tray entry is created. Other flags are optional; zero or more of\n those can be OR'ed together with the required flag.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_InsertTrayEntryAt\n"]
17743pub type SDL_TrayEntryFlags = Uint32;
17744#[doc = " A callback that is invoked when a tray entry is selected.\n\n **Parameter:** userdata an optional pointer to pass extra data to the callback when\n it will be invoked.\n **Parameter:** entry the tray entry that was selected.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n\n **See Also:** SDL_SetTrayEntryCallback\n"]
17745pub type SDL_TrayCallback = ::core::option::Option<
17746 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, entry: *mut SDL_TrayEntry),
17747>;
17748#[doc = " A callback that is invoked when the tray icon is clicked.\n\n **Parameter:** userdata an optional pointer to pass extra data to the callback when\n it will be invoked. May be NULL.\n **Parameter:** tray the tray that was clicked.\n **Returns:** true to show the tray menu after the callback returns, false to\n skip showing the menu. This return value is only used for left and\n right click callbacks; other mouse events ignore the return value.\n\n **Available Since:** This datatype is available since SDL 3.6.0.\n\n **See Also:** SDL_CreateTrayWithProperties\n"]
17749pub type SDL_TrayClickCallback = ::core::option::Option<
17750 unsafe extern "C" fn(userdata: *mut core::ffi::c_void, tray: *mut SDL_Tray) -> bool,
17751>;
17752unsafe extern "C" {
17753 #[doc = " Create an icon to be placed in the operating system's tray, or equivalent.\n\n Many platforms advise not using a system tray unless persistence is a\n necessary feature. Avoid needlessly creating a tray icon, as the user may\n feel like it clutters their interface.\n\n Using tray icons require the video subsystem.\n\n **Parameter:** icon a surface to be used as icon. May be NULL.\n **Parameter:** tooltip a tooltip to be displayed when the mouse hovers the icon in\n UTF-8 encoding. Not supported on all platforms. May be NULL.\n **Returns:** The newly created system tray icon.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTrayWithProperties\n **See Also:** SDL_CreateTrayMenu\n **See Also:** SDL_GetTrayMenu\n **See Also:** SDL_DestroyTray\n"]
17754 pub fn SDL_CreateTray(
17755 icon: *mut SDL_Surface,
17756 tooltip: *const core::ffi::c_char,
17757 ) -> *mut SDL_Tray;
17758}
17759unsafe extern "C" {
17760 #[doc = " Create an icon to be placed in the operating system's tray, or equivalent.\n\n Many platforms advise not using a system tray unless persistence is a\n necessary feature. Avoid needlessly creating a tray icon, as the user may\n feel like it clutters their interface.\n\n Using tray icons require the video subsystem.\n\n These are the supported properties:\n\n - `SDL_PROP_TRAY_CREATE_ICON_POINTER`: an SDL_Surface to be used as the\n tray icon. May be NULL.\n - `SDL_PROP_TRAY_CREATE_TOOLTIP_STRING`: a tooltip to be displayed when the\n mouse hovers the icon in UTF-8 encoding. Not supported on all platforms.\n May be NULL.\n - `SDL_PROP_TRAY_CREATE_USERDATA_POINTER`: an optional pointer to associate\n with the tray, which will be passed to click callbacks. May be NULL.\n - `SDL_PROP_TRAY_CREATE_LEFTCLICK_CALLBACK_POINTER`: an\n SDL_TrayClickCallback to be invoked when the tray icon is left-clicked.\n Not supported on all platforms. The callback should return true to show\n the default menu, or false to skip showing it. May be NULL.\n - `SDL_PROP_TRAY_CREATE_RIGHTCLICK_CALLBACK_POINTER`: an\n SDL_TrayClickCallback to be invoked when the tray icon is right-clicked.\n Not supported on all platforms. The callback should return true to show\n the default menu, or false to skip showing it. May be NULL.\n - `SDL_PROP_TRAY_CREATE_MIDDLECLICK_CALLBACK_POINTER`: an\n SDL_TrayClickCallback to be invoked when the tray icon is middle-clicked.\n Not supported on all platforms. May be NULL.\n\n **Parameter:** props the properties to use.\n **Returns:** The newly created system tray icon.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.6.0.\n\n **See Also:** SDL_CreateTray\n **See Also:** SDL_CreateTrayMenu\n **See Also:** SDL_GetTrayMenu\n **See Also:** SDL_DestroyTray\n"]
17761 pub fn SDL_CreateTrayWithProperties(props: SDL_PropertiesID) -> *mut SDL_Tray;
17762}
17763unsafe extern "C" {
17764 #[doc = " Updates the system tray icon's icon.\n\n **Parameter:** tray the tray icon to be updated.\n **Parameter:** icon the new icon. May be NULL.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTray\n"]
17765 pub fn SDL_SetTrayIcon(tray: *mut SDL_Tray, icon: *mut SDL_Surface);
17766}
17767unsafe extern "C" {
17768 #[doc = " Updates the system tray icon's tooltip.\n\n **Parameter:** tray the tray icon to be updated.\n **Parameter:** tooltip the new tooltip in UTF-8 encoding. May be NULL.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTray\n"]
17769 pub fn SDL_SetTrayTooltip(tray: *mut SDL_Tray, tooltip: *const core::ffi::c_char);
17770}
17771unsafe extern "C" {
17772 #[doc = " Create a menu for a system tray.\n\n This should be called at most once per tray icon.\n\n This function does the same thing as SDL_CreateTraySubmenu(), except that\n it takes a SDL_Tray instead of a SDL_TrayEntry.\n\n A menu does not need to be destroyed; it will be destroyed with the tray.\n\n **Parameter:** tray the tray to bind the menu to.\n **Returns:** the newly created menu.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTray\n **See Also:** SDL_GetTrayMenu\n **See Also:** SDL_GetTrayMenuParentTray\n"]
17773 pub fn SDL_CreateTrayMenu(tray: *mut SDL_Tray) -> *mut SDL_TrayMenu;
17774}
17775unsafe extern "C" {
17776 #[doc = " Create a submenu for a system tray entry.\n\n This should be called at most once per tray entry.\n\n This function does the same thing as SDL_CreateTrayMenu, except that it\n takes a SDL_TrayEntry instead of a SDL_Tray.\n\n A menu does not need to be destroyed; it will be destroyed with the tray.\n\n **Parameter:** entry the tray entry to bind the menu to.\n **Returns:** the newly created menu.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_GetTraySubmenu\n **See Also:** SDL_GetTrayMenuParentEntry\n"]
17777 pub fn SDL_CreateTraySubmenu(entry: *mut SDL_TrayEntry) -> *mut SDL_TrayMenu;
17778}
17779unsafe extern "C" {
17780 #[doc = " Gets a previously created tray menu.\n\n You should have called SDL_CreateTrayMenu() on the tray object. This\n function allows you to fetch it again later.\n\n This function does the same thing as SDL_GetTraySubmenu(), except that it\n takes a SDL_Tray instead of a SDL_TrayEntry.\n\n A menu does not need to be destroyed; it will be destroyed with the tray.\n\n **Parameter:** tray the tray entry to bind the menu to.\n **Returns:** the newly created menu.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTray\n **See Also:** SDL_CreateTrayMenu\n"]
17781 pub fn SDL_GetTrayMenu(tray: *mut SDL_Tray) -> *mut SDL_TrayMenu;
17782}
17783unsafe extern "C" {
17784 #[doc = " Gets a previously created tray entry submenu.\n\n You should have called SDL_CreateTraySubmenu() on the entry object. This\n function allows you to fetch it again later.\n\n This function does the same thing as SDL_GetTrayMenu(), except that it\n takes a SDL_TrayEntry instead of a SDL_Tray.\n\n A menu does not need to be destroyed; it will be destroyed with the tray.\n\n **Parameter:** entry the tray entry to bind the menu to.\n **Returns:** the newly created menu.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_CreateTraySubmenu\n"]
17785 pub fn SDL_GetTraySubmenu(entry: *mut SDL_TrayEntry) -> *mut SDL_TrayMenu;
17786}
17787unsafe extern "C" {
17788 #[doc = " Returns a list of entries in the menu, in order.\n\n **Parameter:** menu The menu to get entries from.\n **Parameter:** count An optional pointer to obtain the number of entries in the\n menu.\n **Returns:** a NULL-terminated list of entries within the given menu. The\n pointer becomes invalid when any function that inserts or deletes\n entries in the menu is called.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_RemoveTrayEntry\n **See Also:** SDL_InsertTrayEntryAt\n"]
17789 pub fn SDL_GetTrayEntries(
17790 menu: *mut SDL_TrayMenu,
17791 count: *mut core::ffi::c_int,
17792 ) -> *mut *const SDL_TrayEntry;
17793}
17794unsafe extern "C" {
17795 #[doc = " Removes a tray entry.\n\n **Parameter:** entry The entry to be deleted.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n"]
17796 pub fn SDL_RemoveTrayEntry(entry: *mut SDL_TrayEntry);
17797}
17798unsafe extern "C" {
17799 #[doc = " Insert a tray entry at a given position.\n\n If label is NULL, the entry will be a separator. Many functions won't work\n for an entry that is a separator.\n\n An entry does not need to be destroyed; it will be destroyed with the tray.\n\n **Parameter:** menu the menu to append the entry to.\n **Parameter:** pos the desired position for the new entry. Entries at or following\n this place will be moved. If pos is -1, the entry is appended.\n **Parameter:** label the text to be displayed on the entry, in UTF-8 encoding, or\n NULL for a separator.\n **Parameter:** flags a combination of flags, some of which are mandatory.\n **Returns:** the newly created entry, or NULL if pos is out of bounds.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_TrayEntryFlags\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_RemoveTrayEntry\n **See Also:** SDL_GetTrayEntryParent\n"]
17800 pub fn SDL_InsertTrayEntryAt(
17801 menu: *mut SDL_TrayMenu,
17802 pos: core::ffi::c_int,
17803 label: *const core::ffi::c_char,
17804 flags: SDL_TrayEntryFlags,
17805 ) -> *mut SDL_TrayEntry;
17806}
17807unsafe extern "C" {
17808 #[doc = " Sets the label of an entry.\n\n An entry cannot change between a separator and an ordinary entry; that is,\n it is not possible to set a non-NULL label on an entry that has a NULL\n label (separators), or to set a NULL label to an entry that has a non-NULL\n label. The function will silently fail if that happens.\n\n **Parameter:** entry the entry to be updated.\n **Parameter:** label the new label for the entry in UTF-8 encoding.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_GetTrayEntryLabel\n"]
17809 pub fn SDL_SetTrayEntryLabel(entry: *mut SDL_TrayEntry, label: *const core::ffi::c_char);
17810}
17811unsafe extern "C" {
17812 #[doc = " Gets the label of an entry.\n\n If the returned value is NULL, the entry is a separator.\n\n **Parameter:** entry the entry to be read.\n **Returns:** the label of the entry in UTF-8 encoding.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_SetTrayEntryLabel\n"]
17813 pub fn SDL_GetTrayEntryLabel(entry: *mut SDL_TrayEntry) -> *const core::ffi::c_char;
17814}
17815unsafe extern "C" {
17816 #[doc = " Sets whether or not an entry is checked.\n\n The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.\n\n **Parameter:** entry the entry to be updated.\n **Parameter:** checked true if the entry should be checked; false otherwise.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_GetTrayEntryChecked\n"]
17817 pub fn SDL_SetTrayEntryChecked(entry: *mut SDL_TrayEntry, checked: bool);
17818}
17819unsafe extern "C" {
17820 #[doc = " Gets whether or not an entry is checked.\n\n The entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag.\n\n **Parameter:** entry the entry to be read.\n **Returns:** true if the entry is checked; false otherwise.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_SetTrayEntryChecked\n"]
17821 pub fn SDL_GetTrayEntryChecked(entry: *mut SDL_TrayEntry) -> bool;
17822}
17823unsafe extern "C" {
17824 #[doc = " Sets whether or not an entry is enabled.\n\n **Parameter:** entry the entry to be updated.\n **Parameter:** enabled true if the entry should be enabled; false otherwise.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_GetTrayEntryEnabled\n"]
17825 pub fn SDL_SetTrayEntryEnabled(entry: *mut SDL_TrayEntry, enabled: bool);
17826}
17827unsafe extern "C" {
17828 #[doc = " Gets whether or not an entry is enabled.\n\n **Parameter:** entry the entry to be read.\n **Returns:** true if the entry is enabled; false otherwise.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n **See Also:** SDL_SetTrayEntryEnabled\n"]
17829 pub fn SDL_GetTrayEntryEnabled(entry: *mut SDL_TrayEntry) -> bool;
17830}
17831unsafe extern "C" {
17832 #[doc = " Sets a callback to be invoked when the entry is selected.\n\n **Parameter:** entry the entry to be updated.\n **Parameter:** callback a callback to be invoked when the entry is selected.\n **Parameter:** userdata an optional pointer to pass extra data to the callback when\n it will be invoked.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetTrayEntries\n **See Also:** SDL_InsertTrayEntryAt\n"]
17833 pub fn SDL_SetTrayEntryCallback(
17834 entry: *mut SDL_TrayEntry,
17835 callback: SDL_TrayCallback,
17836 userdata: *mut core::ffi::c_void,
17837 );
17838}
17839unsafe extern "C" {
17840 #[doc = " Simulate a click on a tray entry.\n\n **Parameter:** entry The entry to activate.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17841 pub fn SDL_ClickTrayEntry(entry: *mut SDL_TrayEntry);
17842}
17843unsafe extern "C" {
17844 #[doc = " Destroys a tray object.\n\n This also destroys all associated menus and entries.\n\n **Parameter:** tray the tray icon to be destroyed.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTray\n"]
17845 pub fn SDL_DestroyTray(tray: *mut SDL_Tray);
17846}
17847unsafe extern "C" {
17848 #[doc = " Gets the menu containing a certain tray entry.\n\n **Parameter:** entry the entry for which to get the parent menu.\n **Returns:** the parent menu.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_InsertTrayEntryAt\n"]
17849 pub fn SDL_GetTrayEntryParent(entry: *mut SDL_TrayEntry) -> *mut SDL_TrayMenu;
17850}
17851unsafe extern "C" {
17852 #[doc = " Gets the entry for which the menu is a submenu, if the current menu is a\n submenu.\n\n Either this function or SDL_GetTrayMenuParentTray() will return non-NULL\n for any given menu.\n\n **Parameter:** menu the menu for which to get the parent entry.\n **Returns:** the parent entry, or NULL if this menu is not a submenu.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTraySubmenu\n **See Also:** SDL_GetTrayMenuParentTray\n"]
17853 pub fn SDL_GetTrayMenuParentEntry(menu: *mut SDL_TrayMenu) -> *mut SDL_TrayEntry;
17854}
17855unsafe extern "C" {
17856 #[doc = " Gets the tray for which this menu is the first-level menu, if the current\n menu isn't a submenu.\n\n Either this function or SDL_GetTrayMenuParentEntry() will return non-NULL\n for any given menu.\n\n **Parameter:** menu the menu for which to get the parent enttrayry.\n **Returns:** the parent tray, or NULL if this menu is a submenu.\n\n **Thread Safety:** This function should be called on the thread that created the\n tray.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_CreateTrayMenu\n **See Also:** SDL_GetTrayMenuParentEntry\n"]
17857 pub fn SDL_GetTrayMenuParentTray(menu: *mut SDL_TrayMenu) -> *mut SDL_Tray;
17858}
17859unsafe extern "C" {
17860 #[doc = " Update the trays.\n\n This is called automatically by the event loop and is only needed if you're\n using trays but aren't handling SDL events.\n\n **Thread Safety:** This function should only be called on the main thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17861 pub fn SDL_UpdateTrays();
17862}
17863unsafe extern "C" {
17864 #[doc = " Get the version of SDL that is linked against your program.\n\n If you are linking to SDL dynamically, then it is possible that the current\n version will be different than the version you compiled against. This\n function returns the current version, while SDL_VERSION is the version you\n compiled with.\n\n This function may be called safely at any time, even before SDL_Init().\n\n **Returns:** the version of the linked library.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetRevision\n"]
17865 pub fn SDL_GetVersion() -> core::ffi::c_int;
17866}
17867unsafe extern "C" {
17868 #[doc = " Get the code revision of the SDL library that is linked against your\n program.\n\n This value is the revision of the code you are linking against and may be\n different from the code you are compiling with, which is found in the\n constant SDL_REVISION if you explicitly include SDL_revision.h\n\n The revision is an arbitrary string (a hash value) uniquely identifying the\n exact revision of the SDL library in use, and is only useful in comparing\n against other revisions. It is NOT an incrementing number.\n\n If SDL wasn't built from a git repository with the appropriate tools, this\n will return an empty string.\n\n You shouldn't use this function for anything but logging it for debugging\n purposes. The string is not intended to be reliable in any way.\n\n **Returns:** an arbitrary string, uniquely identifying the exact revision of\n the SDL library in use.\n\n **Thread Safety:** It is safe to call this function from any thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_GetVersion\n"]
17869 pub fn SDL_GetRevision() -> *const core::ffi::c_char;
17870}
17871#[doc = " The prototype for the application's main() function\n\n **Parameter:** argc an ANSI-C style main function's argc.\n **Parameter:** argv an ANSI-C style main function's argv.\n **Returns:** an ANSI-C main return code; generally 0 is considered successful\n program completion, and small non-zero values are considered\n errors.\n\n **Available Since:** This datatype is available since SDL 3.2.0.\n"]
17872pub type SDL_main_func = ::core::option::Option<
17873 unsafe extern "C" fn(
17874 argc: core::ffi::c_int,
17875 argv: *mut *mut core::ffi::c_char,
17876 ) -> core::ffi::c_int,
17877>;
17878unsafe extern "C" {
17879 #[doc = " An app-supplied function for program entry.\n\n Apps do not directly create this function; they should create a standard\n ANSI-C `main` function instead. If SDL needs to insert some startup code\n before `main` runs, or the platform doesn't actually _use_ a function\n called \"main\", SDL will do some macro magic to redefine `main` to\n `SDL_main` and provide its own `main`.\n\n Apps should include `SDL_main.h` in the same file as their `main` function,\n and they should not use that symbol for anything else in that file, as it\n might get redefined.\n\n This function is only provided by the app if it isn't using\n SDL_MAIN_USE_CALLBACKS.\n\n Program startup is a surprisingly complex topic. Please see\n [README-main-functions](README-main-functions), (or\n docs/README-main-functions.md in the source tree) for a more detailed\n explanation.\n\n **Parameter:** argc an ANSI-C style main function's argc.\n **Parameter:** argv an ANSI-C style main function's argv.\n **Returns:** an ANSI-C main return code; generally 0 is considered successful\n program completion, and small non-zero values are considered\n errors.\n\n **Thread Safety:** This is the program entry point.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17880 pub fn SDL_main(argc: core::ffi::c_int, argv: *mut *mut core::ffi::c_char) -> core::ffi::c_int;
17881}
17882unsafe extern "C" {
17883 #[doc = " Circumvent failure of SDL_Init() when not using SDL_main() as an entry\n point.\n\n This function is defined in SDL_main.h, along with the preprocessor rule to\n redefine main() as SDL_main(). Thus to ensure that your main() function\n will not be changed it is necessary to define SDL_MAIN_HANDLED before\n including SDL.h.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_Init\n"]
17884 pub fn SDL_SetMainReady();
17885}
17886unsafe extern "C" {
17887 #[doc = " Initializes and launches an SDL application, by doing platform-specific\n initialization before calling your mainFunction and cleanups after it\n returns, if that is needed for a specific platform, otherwise it just calls\n mainFunction.\n\n You can use this if you want to use your own main() implementation without\n using SDL_main (like when using SDL_MAIN_HANDLED). When using this, you do\n *not* need SDL_SetMainReady().\n\n If `argv` is NULL, SDL will provide command line arguments, either by\n querying the OS for them if possible, or supplying a filler array if not.\n\n **Parameter:** argc the argc parameter from the application's main() function, or 0\n if the platform's main-equivalent has no argc.\n **Parameter:** argv the argv parameter from the application's main() function, or\n NULL if the platform's main-equivalent has no argv.\n **Parameter:** mainFunction your SDL app's C-style main(). NOT the function you're\n calling this from! Its name doesn't matter; it doesn't\n literally have to be `main`.\n **Parameter:** reserved should be NULL (reserved for future use, will probably be\n platform-specific then).\n **Returns:** the return value from mainFunction: 0 on success, otherwise\n failure; SDL_GetError() might have more information on the\n failure.\n\n **Thread Safety:** Generally this is called once, near startup, from the\n process's initial thread.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17888 pub fn SDL_RunApp(
17889 argc: core::ffi::c_int,
17890 argv: *mut *mut core::ffi::c_char,
17891 mainFunction: SDL_main_func,
17892 reserved: *mut core::ffi::c_void,
17893 ) -> core::ffi::c_int;
17894}
17895unsafe extern "C" {
17896 #[doc = " An entry point for SDL's use in SDL_MAIN_USE_CALLBACKS.\n\n Generally, you should not call this function directly. This only exists to\n hand off work into SDL as soon as possible, where it has a lot more control\n and functionality available, and make the inline code in SDL_main.h as\n small as possible.\n\n Not all platforms use this, it's actual use is hidden in a magic\n header-only library, and you should not call this directly unless you\n _really_ know what you're doing.\n\n **Parameter:** argc standard Unix main argc.\n **Parameter:** argv standard Unix main argv.\n **Parameter:** appinit the application's SDL_AppInit function.\n **Parameter:** appiter the application's SDL_AppIterate function.\n **Parameter:** appevent the application's SDL_AppEvent function.\n **Parameter:** appquit the application's SDL_AppQuit function.\n **Returns:** standard Unix main return value.\n\n **Thread Safety:** It is not safe to call this anywhere except as the only\n function call in SDL_main.\n\n **Available Since:** This function is available since SDL 3.2.0.\n"]
17897 pub fn SDL_EnterAppMainCallbacks(
17898 argc: core::ffi::c_int,
17899 argv: *mut *mut core::ffi::c_char,
17900 appinit: SDL_AppInit_func,
17901 appiter: SDL_AppIterate_func,
17902 appevent: SDL_AppEvent_func,
17903 appquit: SDL_AppQuit_func,
17904 ) -> core::ffi::c_int;
17905}
17906unsafe extern "C" {
17907 #[doc = " Callback from the application to let the suspend continue.\n\n This should be called in response to an `SDL_EVENT_DID_ENTER_BACKGROUND`\n event, which can be detected via event watch. However, do NOT call this\n function directly from within an event watch callback. Instead, wait until\n the app has suppressed all rendering operations, then call this from the\n application render thread.\n\n When using SDL_Render, this should be called after calling\n SDL_GDKSuspendRenderer.\n\n When using SDL_GPU, this should be called after calling SDL_GDKSuspendGPU.\n\n If you're writing your own D3D12 renderer, this should be called after\n calling `ID3D12CommandQueue::SuspendX`.\n\n This function is only needed for Xbox GDK support; all other platforms will\n do nothing and set an \"unsupported\" error message.\n\n **Thread Safety:** This function is not thread safe.\n\n **Available Since:** This function is available since SDL 3.2.0.\n\n **See Also:** SDL_AddEventWatch\n"]
17908 pub fn SDL_GDKSuspendComplete();
17909}
17910pub type __builtin_va_list = [__va_list_tag; 1usize];
17911#[repr(C)]
17912#[derive(Debug, Copy, Clone, Hash)]
17913pub struct __va_list_tag {
17914 pub gp_offset: core::ffi::c_uint,
17915 pub fp_offset: core::ffi::c_uint,
17916 pub overflow_arg_area: *mut core::ffi::c_void,
17917 pub reg_save_area: *mut core::ffi::c_void,
17918}
17919#[allow(clippy::unnecessary_operation, clippy::identity_op)]
17920const _: () = {
17921 ["Size of __va_list_tag"][::core::mem::size_of::<__va_list_tag>() - 24usize];
17922 ["Alignment of __va_list_tag"][::core::mem::align_of::<__va_list_tag>() - 8usize];
17923 ["Offset of field: __va_list_tag::gp_offset"]
17924 [::core::mem::offset_of!(__va_list_tag, gp_offset) - 0usize];
17925 ["Offset of field: __va_list_tag::fp_offset"]
17926 [::core::mem::offset_of!(__va_list_tag, fp_offset) - 4usize];
17927 ["Offset of field: __va_list_tag::overflow_arg_area"]
17928 [::core::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize];
17929 ["Offset of field: __va_list_tag::reg_save_area"]
17930 [::core::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize];
17931};
17932impl Default for __va_list_tag {
17933 fn default() -> Self {
17934 let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
17935 unsafe {
17936 ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
17937 s.assume_init()
17938 }
17939 }
17940}
17941#[repr(C)]
17942#[derive(Debug, Default, Copy, Clone, Hash)]
17943pub struct __locale_data {
17944 pub _address: u8,
17945}
17946
17947pub const SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK: u32 = 0xFFFFFFFF;
17949pub const SDL_AUDIO_DEVICE_DEFAULT_RECORDING: u32 = 0xFFFFFFFE;
17950pub const SDL_LSX_INTRINSICS: i32 = 1;
17951pub const SDL_LASX_INTRINSICS: i32 = 1;
17952pub const SDL_NEON_INTRINSICS: i32 = 1;
17953pub const SDL_ALTIVEC_INTRINSICS: i32 = 1;
17954pub const SDL_MMX_INTRINSICS: i32 = 1;
17955pub const SDL_SSE_INTRINSICS: i32 = 1;
17956pub const SDL_SSE2_INTRINSICS: i32 = 1;
17957pub const SDL_SSE3_INTRINSICS: i32 = 1;
17958pub const SDL_SSE4_1_INTRINSICS: i32 = 1;
17959pub const SDL_SSE4_2_INTRINSICS: i32 = 1;
17960pub const SDL_AVX_INTRINSICS: i32 = 1;
17961pub const SDL_AVX2_INTRINSICS: i32 = 1;
17962pub const SDL_AVX512F_INTRINSICS: i32 = 1;
17963pub const SDL_MAIN_HANDLED: i32 = 1;
17964pub const SDL_MAIN_USE_CALLBACKS: i32 = 1;
17965pub const SDL_MAIN_CALLBACK_STANDARD: i32 = 1;
17966pub const SDL_PEN_MOUSEID: u32 = (-2i32) as u32;
17967pub const SDL_PEN_TOUCHID: u32 = (-2i32) as u32;
17968pub const SDL_PLATFORM_AIX: i32 = 1;
17969pub const SDL_PLATFORM_HAIKU: i32 = 1;
17970pub const SDL_PLATFORM_BSDI: i32 = 1;
17971pub const SDL_PLATFORM_FREEBSD: i32 = 1;
17972pub const SDL_PLATFORM_HPUX: i32 = 1;
17973pub const SDL_PLATFORM_IRIX: i32 = 1;
17974pub const SDL_PLATFORM_ANDROID: i32 = 1;
17975pub const SDL_PLATFORM_APPLE: i32 = 1;
17976pub const SDL_PLATFORM_TVOS: i32 = 1;
17977pub const SDL_PLATFORM_VISIONOS: i32 = 1;
17978pub const SDL_PLATFORM_IOS: i32 = 1;
17979pub const SDL_PLATFORM_MACOS: i32 = 1;
17980pub const SDL_PLATFORM_EMSCRIPTEN: i32 = 1;
17981pub const SDL_PLATFORM_NETBSD: i32 = 1;
17982pub const SDL_PLATFORM_OPENBSD: i32 = 1;
17983pub const SDL_PLATFORM_OS2: i32 = 1;
17984pub const SDL_PLATFORM_OSF: i32 = 1;
17985pub const SDL_PLATFORM_QNXNTO: i32 = 1;
17986pub const SDL_PLATFORM_RISCOS: i32 = 1;
17987pub const SDL_PLATFORM_SOLARIS: i32 = 1;
17988pub const SDL_PLATFORM_CYGWIN: i32 = 1;
17989pub const SDL_PLATFORM_WINDOWS: i32 = 1;
17990pub const SDL_WINAPI_FAMILY_PHONE: i32 = 0;
17991pub const SDL_PLATFORM_WINGDK: i32 = 1;
17992pub const SDL_PLATFORM_XBOXONE: i32 = 1;
17993pub const SDL_PLATFORM_XBOXSERIES: i32 = 1;
17994pub const SDL_PLATFORM_WIN32: i32 = 1;
17995pub const SDL_PLATFORM_GDK: i32 = 1;
17996pub const SDL_PLATFORM_PSP: i32 = 1;
17997pub const SDL_PLATFORM_PS2: i32 = 1;
17998pub const SDL_PLATFORM_VITA: i32 = 1;
17999pub const SDL_PLATFORM_3DS: i32 = 1;
18000pub const SDL_PLATFORM_NGAGE: i32 = 1;
18001pub const SDL_PLATFORM_HURD: i32 = 1;
18002pub const SDL_NOLONGLONG: i32 = 1;
18003pub const SDL_MAX_SINT8: i8 = 0x7F;
18004pub const SDL_MIN_SINT8: i8 = !0x7F;
18005pub const SDL_MAX_UINT8: u8 = 0xFF;
18006pub const SDL_MIN_UINT8: u8 = 0x00;
18007pub const SDL_MAX_SINT16: i16 = 0x7FFF;
18008pub const SDL_MIN_SINT16: i16 = !0x7FFF;
18009pub const SDL_MAX_UINT16: u16 = 0xFFFF;
18010pub const SDL_MIN_UINT16: u16 = 0x0000;
18011pub const SDL_MAX_SINT32: i32 = 0x7FFFFFFF;
18012pub const SDL_MIN_SINT32: i32 = !0x7FFFFFFF;
18013pub const SDL_MAX_UINT32: u32 = 0xFFFFFFFF;
18014pub const SDL_MIN_UINT32: u32 = 0x00000000;
18015pub const SDL_MAX_UINT64: u64 = 0xFFFFFFFFFFFFFFFF;
18016pub const SDL_MIN_UINT64: u64 = 0x0000000000000000;
18017pub const SDL_ANDROID_EXTERNAL_STORAGE_READ: i32 = 0x01;
18018pub const SDL_ANDROID_EXTERNAL_STORAGE_WRITE: i32 = 0x02;
18019pub const SDL_TOUCH_MOUSEID: u32 = (-1i32) as u32;
18020pub const SDL_MOUSE_TOUCHID: u32 = (-1i32) as u32;
18021pub const SDL_WINDOW_FULLSCREEN: u64 = 0x0000000000000001;
18022pub const SDL_WINDOW_OPENGL: u64 = 0x0000000000000002;
18023pub const SDL_WINDOW_OCCLUDED: u64 = 0x0000000000000004;
18024pub const SDL_WINDOW_HIDDEN: u64 = 0x0000000000000008;
18025pub const SDL_WINDOW_BORDERLESS: u64 = 0x0000000000000010;
18026pub const SDL_WINDOW_RESIZABLE: u64 = 0x0000000000000020;
18027pub const SDL_WINDOW_MINIMIZED: u64 = 0x0000000000000040;
18028pub const SDL_WINDOW_MAXIMIZED: u64 = 0x0000000000000080;
18029pub const SDL_WINDOW_MOUSE_GRABBED: u64 = 0x0000000000000100;
18030pub const SDL_WINDOW_INPUT_FOCUS: u64 = 0x0000000000000200;
18031pub const SDL_WINDOW_MOUSE_FOCUS: u64 = 0x0000000000000400;
18032pub const SDL_WINDOW_EXTERNAL: u64 = 0x0000000000000800;
18033pub const SDL_WINDOW_MODAL: u64 = 0x0000000000001000;
18034pub const SDL_WINDOW_HIGH_PIXEL_DENSITY: u64 = 0x0000000000002000;
18035pub const SDL_WINDOW_MOUSE_CAPTURE: u64 = 0x0000000000004000;
18036pub const SDL_WINDOW_MOUSE_RELATIVE_MODE: u64 = 0x0000000000008000;
18037pub const SDL_WINDOW_ALWAYS_ON_TOP: u64 = 0x0000000000010000;
18038pub const SDL_WINDOW_UTILITY: u64 = 0x0000000000020000;
18039pub const SDL_WINDOW_TOOLTIP: u64 = 0x0000000000040000;
18040pub const SDL_WINDOW_POPUP_MENU: u64 = 0x0000000000080000;
18041pub const SDL_WINDOW_KEYBOARD_GRABBED: u64 = 0x0000000000100000;
18042pub const SDL_WINDOW_FILL_DOCUMENT: u64 = 0x0000000000200000;
18043pub const SDL_WINDOW_VULKAN: u64 = 0x0000000010000000;
18044pub const SDL_WINDOW_METAL: u64 = 0x0000000020000000;
18045pub const SDL_WINDOW_TRANSPARENT: u64 = 0x0000000040000000;
18046pub const SDL_WINDOW_NOT_FOCUSABLE: u64 = 0x0000000080000000;