blib/lib/SDL3.pm untested

filter: Statementstmt 0.0% 0 / 6113 Branchbran 0.0% 0 / 62 Conditioncond 0.0% 0 / 319 MC/DCmcdc 0.0% 0 / 163 Subroutinesub 0.0% 0 / 78 Podpod 0.0% 0 / 66 totaltotal 0.0% 0 / 6801 CC 31 SCAR 27.8
CC
31
Cov
0%
_system
72.0
_rect
56.0
_stdinc
56.0
CRAP 16.1
1 package SDL3 v0.0.5 {
2 use v5.40;
3 use base 'Exporter';
4 use Affix qw[:all];
5 use Alien::SDL3;
6 use Carp qw[croak cluck confess];
7 use Config qw[%Config];
8  
9 =encoding utf-8
10  
11 =head1 NAME
12  
13 SDL3 - Perl Wrapper for the Simple DirectMedia Layer 3.0
14  
15 =head1 SYNOPSIS
16  
17 use v5.40;
18 use SDL3 qw[:all :main];
19 my ( $x, $y, $dx, $dy, $ren ) = ( 300, 200, 5, 5 );
20  
21 sub SDL_AppInit( $app, $ac, $av ) {
22 state $win;
23 SDL_Init(SDL_INIT_VIDEO);
24 SDL_CreateWindowAndRenderer( 'Bouncing Box', 640, 480, 0, \$win, \$ren );
25 SDL_SetRenderVSync( $ren, 1 );
26 SDL_APP_CONTINUE;
27 }
28  
29 sub SDL_AppEvent( $app, $ev ) {
30 $ev->{type} == SDL_EVENT_QUIT ? SDL_APP_SUCCESS : SDL_APP_CONTINUE;
31 }
32  
33 sub SDL_AppIterate($app) {
34 $dx *= -1 if $x <= 0 || $x >= 620; # Bounce X (Window 640 - Rect 20)
35 $dy *= -1 if $y <= 0 || $y >= 460; # Bounce Y (Window 480 - Rect 20)
36 $x += $dx;
37 $y += $dy;
38 SDL_SetRenderDrawColor( $ren, 20, 20, 30, 255 );
39 SDL_RenderClear($ren);
40 SDL_SetRenderDrawColor( $ren, int($x) % 255, int($y) % 255, 200, 255 );
41 SDL_RenderFillRect( $ren, { x => $x, y => $y, w => 20, h => 20 } );
42 SDL_RenderPresent($ren);
43 SDL_APP_CONTINUE;
44 }
45 sub SDL_AppQuit { }
46  
47 =for html <center><img src="https://raw.githubusercontent.com/Perl-SDL3/.github/refs/heads/main/screenshots/synopsis.gif" /></center>
48  
49 =head1 DESCRIPTION
50  
51 This module provides a Perl wrapper for SDL3, a cross-platform development library designed to provide low level access
52 to audio, keyboard, mouse, joystick, and graphics hardware.
53  
54 There are a few examples in this distribution's C<eg/> directory.
55  
56 =head2 Features
57  
58 Each feature listed below is a tag you may use.
59  
60 =cut
61  
62 my ( $lib, @etc ) = Alien::SDL3->dynamic_libs;
63 croak 'Could not find library' unless $lib;
64 Affix::load_library($_) or die 'Could not find ' . $_ for $lib, @etc;
65 our ( %EXPORT_TAGS, @EXPORT_OK );
66 my $main_hook;
67  
68 sub import ( $pkg, @wants ) {
69 {
70 no strict 'refs';
71 (s[^:][_]r)->() for @wants;
72 }
73 $main_hook //= caller if grep { $_ eq ':main' } @wants;
74 #
75 require List::Util;
76 @EXPORT_OK = sort map {@$_} values %EXPORT_TAGS;
77 $EXPORT_TAGS{all} = [@EXPORT_OK];
78 SDL3->export_to_level( 1, $pkg, @wants );
79 }
80 #
81 sub _affix_and_export( $name, $args, $ret ) {
82 my ( $n, $r ) = ref $name ? @$name : ( $name, $name );
83 confess 'Failed to affix ' . $name . ': ' . $n unless affix $lib, $name, $args, $ret;
84 push @{ $EXPORT_TAGS{ [ caller(1) ]->[3] =~ s/^.+?_//r } }, $n;
85 }
86  
87 sub _const_and_export( $name, $value ) {
88 no strict 'refs';
89 *{$name} = sub() {$value};
90 push @{ $EXPORT_TAGS{ [ caller(1) ]->[3] =~ s/^.+?_//r } }, $name;
91 }
92 sub _export( $name, @tags ) { push @{ $EXPORT_TAGS{ [ caller(1) ]->[3] =~ s/^.+?_//r } }, $name }
93  
94 sub _func_and_export( $name, $sub ) {
95 no strict 'refs';
96 my ( undef, undef, undef, $tag ) = caller;
97 *{$name} = $sub;
98 push @{ $EXPORT_TAGS{ [ caller(1) ]->[3] =~ s/^.+?_//r } }, $name;
99 }
100  
101 sub _typedef_and_export( $name, $type //= () ) {
102 no strict 'refs';
103 my ( undef, undef, undef, $tag ) = caller;
104 if ( defined $type ) {
105 typedef $name, $type;
106 }
107 else {
108 typedef $name;
109 }
110 push @{ $EXPORT_TAGS{ [ caller(1) ]->[3] =~ s/^.+?_//r } }, $name;
111 }
112  
113 sub _enum_and_export( $name, $values ) {
114 no strict 'refs';
115 my ( undef, undef, undef, $tag ) = caller;
116 typedef $name, Enum [@$values];
117 push @{ $EXPORT_TAGS{ [ caller(1) ]->[3] =~ s/^.+?_//r } }, $name;
118  
119 #~ my $value = 0;
120 for my $enum (@$values) {
121 push @{ $EXPORT_TAGS{ [ caller(1) ]->[3] =~ s/^.+?_//r } }, ref $enum ? $enum->[0] : $enum;
122 }
123 }
124  
125 =head3 C<:all>
126  
127 This binds all functions, defines all types, and imports them into your package.
128  
129 See L<the SDL3 Wiki|https://wiki.libsdl.org/SDL3/FrontPage> for documentation of the hundreds of types and functions
130 you'll have access to with this import tag.
131  
132 =cut
133  
134 sub _all() {
135 state $done++ && return;
136 _stdinc();
137 _assert();
138 _asyncio();
139 _atomic();
140 _audio();
141 _bits();
142 _blendmode();
143 _camera();
144 _clipboard();
145 _cpuinfo();
146 _dialog();
147 _error();
148 _events();
149 _filesystem();
150 _gamepad();
151 _gpu();
152 _guid();
153 _haptic();
154 _hidapi();
155 _hints();
156 _init();
157 _iostream();
158 _joystick();
159 _keyboard();
160 _keycode();
161 _loadso();
162 _locale();
163 _log();
164 _messagebox();
165 _metal();
166 _misc();
167 _mouse();
168 _mutex();
169 _pen();
170 _pixels();
171 _platform();
172 _power();
173 _process();
174 _properties();
175 _rect();
176 _render();
177 _scancode();
178 _sensor();
179 _storage();
180 _surface();
181 _system();
182 _thread();
183 _time();
184 _timer();
185 _tray();
186 _touch();
187 _version();
188 _video();
189 #
190 }
191  
192 # No docs because this is a no-op.
193 sub _assert () {
194 state $done++ && return;
195 _error();
196 }
197  
198 =head3 C<:asyncio> - Async I/O
199  
200 SDL offers a way to perform I/O asynchronously. This allows an app to read or write files without waiting for data to
201 actually transfer; the functions that request I/O never block while the request is fulfilled.
202  
203 See L<SDL3: CategoryAsyncIO|https://wiki.libsdl.org/SDL3/CategoryAsyncIO>
204  
205 =cut
206  
207 sub _asyncio() {
208 state $done++ && return;
209 #
210 _stdinc();
211 #
212 _typedef_and_export SDL_AsyncIO => Void;
213 _enum_and_export SDL_AsyncIOTaskType => [ 'SDL_ASYNCIO_TASK_READ', 'SDL_ASYNCIO_TASK_WRITE', 'SDL_ASYNCIO_TASK_CLOSE' ];
214 _enum_and_export SDL_AsyncIOResult => [ 'SDL_ASYNCIO_COMPLETE', 'SDL_ASYNCIO_FAILURE', 'SDL_ASYNCIO_CANCELED' ];
215 _typedef_and_export SDL_AsyncIOOutcome => Struct [
216 asyncio => Pointer [ SDL_AsyncIO() ],
217 type => SDL_AsyncIOTaskType(),
218 result => SDL_AsyncIOResult(),
219 buffer => Pointer [Void],
220 offset => UInt64,
221 bytes_requested => UInt64,
222 bytes_transferred => UInt64,
223 userdata => Pointer [Void]
224 ];
225 _typedef_and_export SDL_AsyncIOQueue => Void;
226 _affix_and_export SDL_AsyncIOFromFile => [ String, String ], Pointer [ SDL_AsyncIO() ];
227 _affix_and_export SDL_GetAsyncIOSize => [ Pointer [ SDL_AsyncIO() ] ], SInt64;
228 _affix_and_export
229 SDL_ReadAsyncIO => [ Pointer [ SDL_AsyncIO() ], Pointer [Void], UInt64, UInt64, Pointer [ SDL_AsyncIOQueue() ], Pointer [Void] ],
230 Bool;
231 _affix_and_export
232 SDL_WriteAsyncIO => [ Pointer [ SDL_AsyncIO() ], Pointer [Void], UInt64, UInt64, Pointer [ SDL_AsyncIOQueue() ], Pointer [Void] ],
233 Bool;
234 _affix_and_export
235 SDL_CloseAsyncIO => [ Pointer [ SDL_AsyncIO() ], Bool, Pointer [ SDL_AsyncIOQueue() ], Pointer [Void] ],
236 Bool;
237 _affix_and_export SDL_CreateAsyncIOQueue => [], Pointer [ SDL_AsyncIOQueue() ];
238 _affix_and_export SDL_DestroyAsyncIOQueue => [ Pointer [ SDL_AsyncIOQueue() ] ], Void;
239 _affix_and_export SDL_GetAsyncIOResult => [ Pointer [ SDL_AsyncIOQueue() ], Pointer [ SDL_AsyncIOOutcome() ] ], Bool;
240 _affix_and_export
241 SDL_WaitAsyncIOResult => [ Pointer [ SDL_AsyncIOQueue() ], Pointer [ SDL_AsyncIOOutcome() ], SInt32 ],
242 Bool;
243 _affix_and_export SDL_SignalAsyncIOQueue => [ Pointer [ SDL_AsyncIOQueue() ] ], Void;
244 _affix_and_export SDL_LoadFileAsync => [ String, Pointer [ SDL_AsyncIOQueue() ], Pointer [Void] ], Bool;
245 }
246  
247 =head3 C<:atomic> - Atomic Operations
248  
249 Atomic operations.
250  
251 IMPORTANT: If you are not an expert in concurrent lockless programming, you should not be using any functions in this
252 file. You should be protecting your data structures with full mutexes instead.
253  
254 See L<SDL3: CategoryAtomic|https://wiki.libsdl.org/SDL3/CategoryAtomic>
255  
256 =cut
257  
258 sub _atomic () {
259 state $done++ && return;
260 #
261 _platform_defines();
262 _stdinc();
263 #
264 _typedef_and_export SDL_SpinLock => Int;
265 _affix_and_export SDL_TryLockSpinlock => [ Pointer [ SDL_SpinLock() ] ], Bool;
266 _affix_and_export SDL_LockSpinlock => [ Pointer [ SDL_SpinLock() ] ], Void;
267 _affix_and_export SDL_UnlockSpinlock => [ Pointer [ SDL_SpinLock() ] ], Void;
268 _affix_and_export SDL_MemoryBarrierReleaseFunction => [], Void;
269 _affix_and_export SDL_MemoryBarrierAcquireFunction => [], Void;
270 _typedef_and_export SDL_AtomicInt => Struct [ value => Int ];
271 _affix_and_export SDL_CompareAndSwapAtomicInt => [ Pointer [ SDL_AtomicInt() ], Int, Int ], Bool;
272 _affix_and_export SDL_SetAtomicInt => [ Pointer [ SDL_AtomicInt() ], Int ], Int;
273 _affix_and_export SDL_GetAtomicInt => [ Pointer [ SDL_AtomicInt() ] ], Int;
274 _affix_and_export SDL_AddAtomicInt => [ Pointer [ SDL_AtomicInt() ], Int ], Int;
275 _typedef_and_export SDL_AtomicU32 => Struct [ value => UInt32 ];
276 _affix_and_export SDL_CompareAndSwapAtomicU32 => [ Pointer [ SDL_AtomicU32() ], UInt32, UInt32 ], Bool;
277 _affix_and_export SDL_SetAtomicU32 => [ Pointer [ SDL_AtomicU32() ], UInt32 ], UInt32;
278 _affix_and_export SDL_GetAtomicU32 => [ Pointer [ SDL_AtomicU32() ] ], UInt32;
279  
280 #~ _affix_and_export SDL_AddAtomicU32 => [ Pointer [ SDL_AtomicU32() ], Int ], UInt32;
281 _affix_and_export SDL_CompareAndSwapAtomicPointer => [ Pointer [ Pointer [Void] ], Pointer [Void], Pointer [Void] ], Bool;
282 _affix_and_export SDL_SetAtomicPointer => [ Pointer [ Pointer [Void] ], Pointer [Void] ], Pointer [Void];
283 _affix_and_export SDL_GetAtomicPointer => [ Pointer [ Pointer [Void] ] ], Pointer [Void];
284 }
285  
286 =head3 C<:audio> - Audio Playback, Recording, and Mixing
287  
288 Audio functionality for the SDL library.
289  
290 All audio in SDL3 revolves around C<SDL_AudioStream>. Whether you want to play or record audio, convert it, stream it,
291 buffer it, or mix it, you're going to be passing it through an audio stream.
292  
293 See L<SDL3: CategoryAudio|https://wiki.libsdl.org/SDL3/CategoryAudio>
294  
295 =cut
296  
297 sub _audio() {
298 state $done++ && return;
299 _error();
300 _iostream();
301 _mutex();
302 _properties();
303 _stdinc();
304 #
305 _const_and_export SDL_AUDIO_MASK_BITSIZE => (0xFF);
306 _const_and_export SDL_AUDIO_MASK_FLOAT => ( 1 << 8 );
307 _const_and_export SDL_AUDIO_MASK_BIG_ENDIAN => ( 1 << 12 );
308 _const_and_export SDL_AUDIO_MASK_SIGNED => ( 1 << 15 );
309 _func_and_export(
310 SDL_DEFINE_AUDIO_FORMAT => sub ( $signed, $bigendian, $flt, $size ) {
311 ( ( ($signed) << 15 ) | ( ($bigendian) << 12 ) | ( ($flt) << 8 ) | ( ($size) & SDL_AUDIO_MASK_BITSIZE() ) )
312 }
313 );
314 _enum_and_export SDL_AudioFormat => [
315 [ SDL_AUDIO_UNKNOWN => 0x0000 ], [ SDL_AUDIO_U8 => 0x0008 ], [ SDL_AUDIO_S8 => 0x8008 ], [ SDL_AUDIO_S16LE => 0x8010 ],
316 [ SDL_AUDIO_S16BE => 0x9010 ], [ SDL_AUDIO_S32LE => 0x8020 ], [ SDL_AUDIO_S32BE => 0x9020 ], [ SDL_AUDIO_F32LE => 0x8120 ],
317 [ SDL_AUDIO_F32BE => 0x9120 ], [ SDL_AUDIO_S16 => 0x8010 ], # Little Endian default?
318 [ SDL_AUDIO_S32 => 0x8020 ], [ SDL_AUDIO_F32 => 0x8120 ]
319 ];
320 _func_and_export( SDL_AUDIO_BITSIZE => sub ($x) { ( ($x) & SDL_AUDIO_MASK_BITSIZE() ) } );
321 _func_and_export( SDL_AUDIO_BYTESIZE => sub ($x) { ( SDL_AUDIO_BITSIZE($x) / 8 ) } );
322 _func_and_export( SDL_AUDIO_ISFLOAT => sub ($x) { ( ($x) & SDL_AUDIO_MASK_FLOAT() ) } );
323 _func_and_export( SDL_AUDIO_ISBIGENDIAN => sub ($x) { ( ($x) & SDL_AUDIO_MASK_BIG_ENDIAN() ) } );
324 _func_and_export( SDL_AUDIO_ISLITTLEENDIAN => sub ($x) { ( !SDL_AUDIO_ISBIGENDIAN($x) ) } );
325 _func_and_export( SDL_AUDIO_ISSIGNED => sub ($x) { ( ($x) & SDL_AUDIO_MASK_SIGNED() ) } );
326 _func_and_export( SDL_AUDIO_ISINT => sub ($x) { ( !SDL_AUDIO_ISFLOAT($x) ) } );
327 _func_and_export( SDL_AUDIO_ISUNSIGNED => sub ($x) { ( !SDL_AUDIO_ISSIGNED($x) ) } );
328 _typedef_and_export SDL_AudioDeviceID => UInt32;
329 _const_and_export SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK => 0xFFFFFFFF;
330 _const_and_export SDL_AUDIO_DEVICE_DEFAULT_RECORDING => 0xFFFFFFFE;
331 _func_and_export( SDL_AUDIO_FRAMESIZE => sub ($x) { ( SDL_AUDIO_BYTESIZE( $x->{format} ) * $x->{channels} ) } );
332 _typedef_and_export SDL_AudioSpec => Struct [ format => SDL_AudioFormat(), channels => Int, freq => Int ];
333 _typedef_and_export SDL_AudioStream => Void;
334 _affix_and_export SDL_GetNumAudioDrivers => [], Int;
335 _affix_and_export SDL_GetAudioDriver => [Int], String;
336 _affix_and_export SDL_GetCurrentAudioDriver => [], String;
337 _affix_and_export SDL_GetAudioPlaybackDevices => [ Pointer [Int] ], Pointer [ SDL_AudioDeviceID() ];
338 _affix_and_export SDL_GetAudioRecordingDevices => [ Pointer [Int] ], Pointer [ SDL_AudioDeviceID() ];
339 _affix_and_export SDL_GetAudioDeviceName => [ SDL_AudioDeviceID() ], String;
340 _affix_and_export SDL_GetAudioDeviceFormat => [ SDL_AudioDeviceID(), Pointer [ SDL_AudioSpec() ], Pointer [Int] ], Bool;
341 _affix_and_export SDL_GetAudioDeviceChannelMap => [ SDL_AudioDeviceID(), Pointer [Int] ], Pointer [Int];
342 _affix_and_export SDL_OpenAudioDevice => [ SDL_AudioDeviceID(), Pointer [ SDL_AudioSpec() ] ], SDL_AudioDeviceID();
343 _affix_and_export SDL_IsAudioDevicePhysical => [ SDL_AudioDeviceID() ], Bool;
344 _affix_and_export SDL_IsAudioDevicePlayback => [ SDL_AudioDeviceID() ], Bool;
345 _affix_and_export SDL_PauseAudioDevice => [ SDL_AudioDeviceID() ], Bool;
346 _affix_and_export SDL_ResumeAudioDevice => [ SDL_AudioDeviceID() ], Bool;
347 _affix_and_export SDL_AudioDevicePaused => [ SDL_AudioDeviceID() ], Bool;
348 _affix_and_export SDL_GetAudioDeviceGain => [ SDL_AudioDeviceID() ], Float;
349 _affix_and_export SDL_SetAudioDeviceGain => [ SDL_AudioDeviceID(), Float ], Bool;
350 _affix_and_export SDL_CloseAudioDevice => [ SDL_AudioDeviceID() ], Void;
351 _affix_and_export SDL_BindAudioStreams => [ SDL_AudioDeviceID(), Pointer [ Pointer [ SDL_AudioStream() ] ], Int ], Bool;
352 _affix_and_export SDL_BindAudioStream => [ SDL_AudioDeviceID(), Pointer [ SDL_AudioStream() ] ], Bool;
353 _affix_and_export SDL_UnbindAudioStreams => [ Pointer [ Pointer [ SDL_AudioStream() ] ], Int ], Void;
354 _affix_and_export SDL_UnbindAudioStream => [ Pointer [ SDL_AudioStream() ] ], Void;
355 _affix_and_export SDL_GetAudioStreamDevice => [ Pointer [ SDL_AudioStream() ] ], SDL_AudioDeviceID();
356 _affix_and_export
357 SDL_CreateAudioStream => [ Pointer [ SDL_AudioSpec() ], Pointer [ SDL_AudioSpec() ] ],
358 Pointer [ SDL_AudioStream() ];
359 _affix_and_export SDL_GetAudioStreamProperties => [ Pointer [ SDL_AudioStream() ] ], SDL_PropertiesID();
360 _const_and_export SDL_PROP_AUDIOSTREAM_AUTO_CLEANUP_BOOLEAN => 'SDL.audiostream.auto_cleanup';
361 _affix_and_export
362 SDL_GetAudioStreamFormat => [ Pointer [ SDL_AudioStream() ], Pointer [ SDL_AudioSpec() ], Pointer [ SDL_AudioSpec() ] ],
363 Bool;
364 _affix_and_export
365 SDL_SetAudioStreamFormat => [ Pointer [ SDL_AudioStream() ], Pointer [ SDL_AudioSpec() ], Pointer [ SDL_AudioSpec() ] ],
366 Bool;
367 _affix_and_export SDL_GetAudioStreamFrequencyRatio => [ Pointer [ SDL_AudioStream() ] ], Float;
368 _affix_and_export SDL_SetAudioStreamFrequencyRatio => [ Pointer [ SDL_AudioStream() ], Float ], Bool;
369 _affix_and_export SDL_GetAudioStreamGain => [ Pointer [ SDL_AudioStream() ] ], Float;
370 _affix_and_export SDL_SetAudioStreamGain => [ Pointer [ SDL_AudioStream() ], Float ], Bool;
371 _affix_and_export SDL_GetAudioStreamInputChannelMap => [ Pointer [ SDL_AudioStream() ], Pointer [Int] ], Pointer [Int];
372 _affix_and_export SDL_GetAudioStreamOutputChannelMap => [ Pointer [ SDL_AudioStream() ], Pointer [Int] ], Pointer [Int];
373 _affix_and_export SDL_SetAudioStreamInputChannelMap => [ Pointer [ SDL_AudioStream() ], Pointer [Int], Int ], Bool;
374 _affix_and_export SDL_SetAudioStreamOutputChannelMap => [ Pointer [ SDL_AudioStream() ], Pointer [Int], Int ], Bool;
375 _affix_and_export SDL_PutAudioStreamData => [ Pointer [ SDL_AudioStream() ], Pointer [Void], Int ], Bool;
376 _typedef_and_export SDL_AudioStreamDataCompleteCallback => Callback [ [ Pointer [Void], Pointer [Void], Int ] => Void ];
377  
378 #~ _affix_and_export
379 #~ SDL_PutAudioStreamDataNoCopy =>
380 #~ [ Pointer [ SDL_AudioStream() ], Pointer [Void], Int, SDL_AudioStreamDataCompleteCallback(), Pointer [Void] ],
381 #~ Bool;
382 #~ _affix_and_export
383 #~ SDL_PutAudioStreamPlanarData => [ Pointer [ SDL_AudioStream() ], Pointer [ Pointer [Void] ], Int, Int ],
384 #~ Bool;
385 _affix_and_export SDL_GetAudioStreamData => [ Pointer [ SDL_AudioStream() ], Pointer [Void], Int ], Int;
386 _affix_and_export SDL_GetAudioStreamAvailable => [ Pointer [ SDL_AudioStream() ] ], Int;
387 _affix_and_export SDL_GetAudioStreamQueued => [ Pointer [ SDL_AudioStream() ] ], Int;
388 _affix_and_export SDL_FlushAudioStream => [ Pointer [ SDL_AudioStream() ] ], Bool;
389 _affix_and_export SDL_ClearAudioStream => [ Pointer [ SDL_AudioStream() ] ], Bool;
390 _affix_and_export SDL_PauseAudioStreamDevice => [ Pointer [ SDL_AudioStream() ] ], Bool;
391 _affix_and_export SDL_ResumeAudioStreamDevice => [ Pointer [ SDL_AudioStream() ] ], Bool;
392 _affix_and_export SDL_AudioStreamDevicePaused => [ Pointer [ SDL_AudioStream() ] ], Bool;
393 _affix_and_export SDL_LockAudioStream => [ Pointer [ SDL_AudioStream() ] ], Bool;
394 _affix_and_export SDL_UnlockAudioStream => [ Pointer [ SDL_AudioStream() ] ], Bool;
395 _typedef_and_export SDL_AudioStreamCallback => Callback [ [ Pointer [Void], Pointer [ SDL_AudioStream() ], Int, Int ] => Void ];
396 _affix_and_export
397 SDL_SetAudioStreamGetCallback => [ Pointer [ SDL_AudioStream() ], SDL_AudioStreamCallback(), Pointer [Void] ],
398 Bool;
399 _affix_and_export
400 SDL_SetAudioStreamPutCallback => [ Pointer [ SDL_AudioStream() ], SDL_AudioStreamCallback(), Pointer [Void] ],
401 Bool;
402 _affix_and_export SDL_DestroyAudioStream => [ Pointer [ SDL_AudioStream() ] ], Void;
403 _affix_and_export
404 SDL_OpenAudioDeviceStream => [ SDL_AudioDeviceID(), Pointer [ SDL_AudioSpec() ], SDL_AudioStreamCallback(), Pointer [Void] ],
405 Pointer [ SDL_AudioStream() ];
406 _typedef_and_export SDL_AudioPostmixCallback => Callback [ [ Pointer [Void], Pointer [ SDL_AudioSpec() ], Pointer [Float], Int ] => Void ];
407 _affix_and_export
408 SDL_SetAudioPostmixCallback => [ SDL_AudioDeviceID(), SDL_AudioPostmixCallback(), Pointer [Void] ],
409 Bool;
410 _affix_and_export
411 SDL_LoadWAV_IO => [ Pointer [ SDL_IOStream() ], Bool, Pointer [ SDL_AudioSpec() ], Pointer [ Pointer [UInt8] ], Pointer [UInt32] ],
412 Bool;
413 _affix_and_export
414 SDL_LoadWAV => [ String, Pointer [ SDL_AudioSpec() ], Pointer [ Pointer [UInt8] ], Pointer [UInt32] ],
415 Bool;
416 _affix_and_export SDL_MixAudio => [ Pointer [UInt8], Pointer [UInt8], SDL_AudioFormat(), UInt32, Float ], Bool;
417 _affix_and_export
418 SDL_ConvertAudioSamples =>
419 [ Pointer [ SDL_AudioSpec() ], Pointer [UInt8], Int, Pointer [ SDL_AudioSpec() ], Pointer [ Pointer [UInt8] ], Pointer [Int] ],
420 Bool;
421 _affix_and_export SDL_GetAudioFormatName => [ SDL_AudioFormat() ], String;
422 _affix_and_export SDL_GetSilenceValueForFormat => [ SDL_AudioFormat() ], Int;
423 }
424  
425 =head3 C<:bits> - CategoryBlendmode
426  
427 Functions for fiddling with bits and bitmasks.
428  
429 See L<SDL3: CategoryBits|https://wiki.libsdl.org/SDL3/CategoryBits>
430  
431 =cut
432  
433 sub _bits() {
434 state $done++ && return;
435  
436 # We don't need this... do we?
437 }
438  
439 =head3 C<:blendmode> - Blend modes
440  
441 Blend modes decide how two colors will mix together. There are both standard modes for basic needs and a means to
442 create custom modes, dictating what sort of math to do on what color components.
443  
444 See L<SDL3: CategoryBlendmode|https://wiki.libsdl.org/SDL3/CategoryBlendmode>
445  
446 =cut
447  
448 sub _blendmode() { # Based on sdl-main/include/sdl3/sdl_blendmode.h
449 state $done++ && return;
450 #
451 _stdinc();
452 #
453 _typedef_and_export SDL_BlendMode => UInt32;
454 _const_and_export SDL_BLENDMODE_NONE => 0x00000000;
455 _const_and_export SDL_BLENDMODE_BLEND => 0x00000001;
456 _const_and_export SDL_BLENDMODE_BLEND_PREMULTIPLIED => 0x00000010;
457 _const_and_export SDL_BLENDMODE_ADD => 0x00000002;
458 _const_and_export SDL_BLENDMODE_ADD_PREMULTIPLIED => 0x00000020;
459 _const_and_export SDL_BLENDMODE_MOD => 0x00000004;
460 _const_and_export SDL_BLENDMODE_MUL => 0x00000008;
461 _const_and_export SDL_BLENDMODE_INVALID => 0x7FFFFFFF;
462 _enum_and_export SDL_BlendOperation => [
463 [ SDL_BLENDOPERATION_ADD => 0x1 ],
464 [ SDL_BLENDOPERATION_SUBTRACT => 0x2 ],
465 [ SDL_BLENDOPERATION_REV_SUBTRACT => 0x3 ],
466 [ SDL_BLENDOPERATION_MINIMUM => 0x4 ],
467 [ SDL_BLENDOPERATION_MAXIMUM => 0x5 ]
468 ];
469 _enum_and_export SDL_BlendFactor => [
470 [ SDL_BLENDFACTOR_ZERO => 0x1 ],
471 [ SDL_BLENDFACTOR_ONE => 0x2 ],
472 [ SDL_BLENDFACTOR_SRC_COLOR => 0x3 ],
473 [ SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR => 0x4 ],
474 [ SDL_BLENDFACTOR_SRC_ALPHA => 0x5 ],
475 [ SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA => 0x6 ],
476 [ SDL_BLENDFACTOR_DST_COLOR => 0x7 ],
477 [ SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR => 0x8 ],
478 [ SDL_BLENDFACTOR_DST_ALPHA => 0x9 ],
479 [ SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA => 0xA ]
480 ];
481 _affix_and_export
482 SDL_ComposeCustomBlendMode =>
483 [ SDL_BlendFactor(), SDL_BlendFactor(), SDL_BlendOperation(), SDL_BlendFactor(), SDL_BlendFactor(), SDL_BlendOperation() ],
484 SDL_BlendMode();
485 }
486  
487 =head3 C<:camera> - Camera Support
488  
489 Video capture for the SDL library.
490  
491 See L<SDL3: CategoryCamera|https://wiki.libsdl.org/SDL3/CategoryCamera>
492  
493 =cut
494  
495 sub _camera() {
496 state $done++ && return;
497 #
498 _error();
499 _pixels();
500 _properties();
501 _surface();
502 #
503 _typedef_and_export SDL_CameraID => UInt32;
504 _typedef_and_export SDL_Camera => Void;
505 _typedef_and_export SDL_CameraSpec => Struct [
506 format => SDL_PixelFormat(),
507 colorspace => SDL_Colorspace(),
508 width => Int,
509 height => Int,
510 framerate_numerator => Int,
511 framerate_denominator => Int
512 ];
513 _enum_and_export SDL_CameraPosition =>
514 [ 'SDL_CAMERA_POSITION_UNKNOWN', 'SDL_CAMERA_POSITION_FRONT_FACING', 'SDL_CAMERA_POSITION_BACK_FACING' ];
515 _enum_and_export SDL_CameraPermissionState =>
516 [ [ SDL_CAMERA_PERMISSION_STATE_DENIED => -1 ], 'SDL_CAMERA_PERMISSION_STATE_PENDING', 'SDL_CAMERA_PERMISSION_STATE_APPROVED' ];
517 _affix_and_export SDL_GetNumCameraDrivers => [], Int;
518 _affix_and_export SDL_GetCameraDriver => [Int], String;
519 _affix_and_export SDL_GetCurrentCameraDriver => [], String;
520 _affix_and_export SDL_GetCameras => [ Pointer [Int] ], Pointer [ SDL_CameraID() ];
521 _affix_and_export SDL_GetCameraSupportedFormats => [ SDL_CameraID(), Pointer [Int] ], Pointer [ Pointer [ SDL_CameraSpec() ] ];
522 _affix_and_export SDL_GetCameraName => [ SDL_CameraID() ], String;
523 _affix_and_export SDL_GetCameraPosition => [ SDL_CameraID() ], SDL_CameraPosition();
524 _affix_and_export SDL_OpenCamera => [ SDL_CameraID(), Pointer [ SDL_CameraSpec() ] ], Pointer [ SDL_Camera() ];
525 _affix_and_export SDL_GetCameraPermissionState => [ Pointer [ SDL_Camera() ] ], SDL_CameraPermissionState();
526 _affix_and_export SDL_GetCameraID => [ Pointer [ SDL_Camera() ] ], SDL_CameraID();
527 _affix_and_export SDL_GetCameraProperties => [ Pointer [ SDL_Camera() ] ], SDL_PropertiesID();
528 _affix_and_export SDL_GetCameraFormat => [ Pointer [ SDL_Camera() ], Pointer [ SDL_CameraSpec() ] ], Bool;
529 _affix_and_export SDL_AcquireCameraFrame => [ Pointer [ SDL_Camera() ], Pointer [UInt64] ], Pointer [ SDL_Surface() ];
530 _affix_and_export SDL_ReleaseCameraFrame => [ Pointer [ SDL_Camera() ], Pointer [ SDL_Surface() ] ], Void;
531 _affix_and_export SDL_CloseCamera => [ Pointer [ SDL_Camera() ] ], Void;
532 }
533  
534 =head3 C<:clipboard> - Clipboard Handling
535  
536 SDL provides access to the system clipboard, both for reading information from other processes and publishing
537 information of its own.
538  
539 This is not just text! SDL apps can access and publish data by mimetype.
540  
541 See L<SDL3: CategoryClipboard|https://wiki.libsdl.org/SDL3/CategoryClipboard>
542  
543 =cut
544  
545 sub _clipboard() {
546 state $done++ && return;
547 #
548 _error();
549 _stdinc();
550 #
551 _affix_and_export SDL_SetClipboardText => [String], Bool;
552 _affix_and_export SDL_GetClipboardText => [], String;
553 _affix_and_export SDL_HasClipboardText => [], Bool;
554 _affix_and_export SDL_SetPrimarySelectionText => [String], Bool;
555 _affix_and_export SDL_GetPrimarySelectionText => [], String;
556 _affix_and_export SDL_HasPrimarySelectionText => [], Bool;
557 _typedef_and_export SDL_ClipboardDataCallback => Callback [ [ Pointer [Void], String, Pointer [Size_t] ] => Pointer [Void] ];
558 _typedef_and_export SDL_ClipboardCleanupCallback => Callback [ [ Pointer [Void] ] => Void ];
559 _affix_and_export
560 SDL_SetClipboardData => [ SDL_ClipboardDataCallback(), SDL_ClipboardCleanupCallback(), Pointer [Void], Pointer [String], Size_t ],
561 Bool;
562 _affix_and_export SDL_ClearClipboardData => [], Bool;
563 _affix_and_export SDL_GetClipboardData => [ String, Pointer [Size_t] ], Pointer [Void];
564 _affix_and_export SDL_HasClipboardData => [String], Bool;
565 _affix_and_export SDL_GetClipboardMimeTypes => [ Pointer [Size_t] ], Pointer [String];
566 }
567  
568 =head3 C<:cpuinfo> - CPU Feature Detection
569  
570 CPU feature detection for SDL.
571  
572 These functions are largely concerned with reporting if the system has access to various SIMD instruction sets, but
573 also has other important info to share, such as system RAM size and number of logical CPU cores.
574  
575 See L<SDL3: CategoryCPUInfo|https://wiki.libsdl.org/SDL3/CategoryCPUInfo>
576  
577 =cut
578  
579 sub _cpuinfo() {
580 state $done++ && return;
581 #
582 _stdinc();
583 #
584 _const_and_export SDL_CACHELINE_SIZE => 128;
585 _affix_and_export SDL_GetNumLogicalCPUCores => [], Int;
586 _affix_and_export SDL_GetCPUCacheLineSize => [], Int;
587 _affix_and_export SDL_HasAltiVec => [], Bool;
588 _affix_and_export SDL_HasMMX => [], Bool;
589 _affix_and_export SDL_HasSSE => [], Bool;
590 _affix_and_export SDL_HasSSE2 => [], Bool;
591 _affix_and_export SDL_HasSSE3 => [], Bool;
592 _affix_and_export SDL_HasSSE41 => [], Bool;
593 _affix_and_export SDL_HasSSE42 => [], Bool;
594 _affix_and_export SDL_HasAVX => [], Bool;
595 _affix_and_export SDL_HasAVX2 => [], Bool;
596 _affix_and_export SDL_HasAVX512F => [], Bool;
597 _affix_and_export SDL_HasARMSIMD => [], Bool;
598 _affix_and_export SDL_HasNEON => [], Bool;
599 _affix_and_export SDL_HasLSX => [], Bool;
600 _affix_and_export SDL_HasLASX => [], Bool;
601 _affix_and_export SDL_GetSystemRAM => [], Int;
602 _affix_and_export SDL_GetSIMDAlignment => [], Size_t;
603  
604 #~ _affix_and_export SDL_GetSystemPageSize => [], Int;
605 }
606  
607 =head3 C<:dialog> - File Dialogs
608  
609 File dialog support.
610  
611 SDL offers file dialogs, to let users select files with native GUI interfaces. There are "open" dialogs, "save"
612 dialogs, and folder selection dialogs. The app can control some details, such as filtering to specific files, or
613 whether multiple files can be selected by the user.
614  
615 Note that launching a file dialog is a non-blocking operation; control returns to the app immediately, and a callback
616 is called later (possibly in another thread) when the user makes a choice.
617  
618 See L<SDL3: CategoryDialog|https://wiki.libsdl.org/SDL3/CategoryDialog>
619  
620 =cut
621  
622 sub _dialog() {
623 state $done++ && return;
624 #
625 _error();
626 _properties();
627 _video();
628 #
629 _typedef_and_export SDL_DialogFileFilter => Struct [ name => String, pattern => String ];
630 _typedef_and_export SDL_DialogFileCallback => Callback [ [ Pointer [Void], Pointer [String], Int ] => Void ];
631 _affix_and_export
632 SDL_ShowOpenFileDialog =>
633 [ SDL_DialogFileCallback(), Pointer [Void], Pointer [ SDL_Window() ], Pointer [ SDL_DialogFileFilter() ], Int, String, Bool ],
634 Void;
635 _affix_and_export
636 SDL_ShowSaveFileDialog =>
637 [ SDL_DialogFileCallback(), Pointer [Void], Pointer [ SDL_Window() ], Pointer [ SDL_DialogFileFilter() ], Int, String ],
638 Void;
639 _affix_and_export
640 SDL_ShowOpenFolderDialog => [ SDL_DialogFileCallback(), Pointer [Void], Pointer [ SDL_Window() ], String, Bool ],
641 Void;
642 _enum_and_export SDL_FileDialogType => [ 'SDL_FILEDIALOG_OPENFILE', 'SDL_FILEDIALOG_SAVEFILE', 'SDL_FILEDIALOG_OPENFOLDER' ];
643 _affix_and_export
644 SDL_ShowFileDialogWithProperties => [ SDL_FileDialogType(), SDL_DialogFileCallback(), Pointer [Void], SDL_PropertiesID() ],
645 Void;
646 _const_and_export SDL_PROP_FILE_DIALOG_FILTERS_POINTER => 'SDL.filedialog.filters';
647 _const_and_export SDL_PROP_FILE_DIALOG_NFILTERS_NUMBER => 'SDL.filedialog.nfilters';
648 _const_and_export SDL_PROP_FILE_DIALOG_WINDOW_POINTER => 'SDL.filedialog.window';
649 _const_and_export SDL_PROP_FILE_DIALOG_LOCATION_STRING => 'SDL.filedialog.location';
650 _const_and_export SDL_PROP_FILE_DIALOG_MANY_BOOLEAN => 'SDL.filedialog.many';
651 _const_and_export SDL_PROP_FILE_DIALOG_TITLE_STRING => 'SDL.filedialog.title';
652 _const_and_export SDL_PROP_FILE_DIALOG_ACCEPT_STRING => 'SDL.filedialog.accept';
653 _const_and_export SDL_PROP_FILE_DIALOG_CANCEL_STRING => 'SDL.filedialog.cancel';
654 }
655  
656 =head3 C<:error> - Error Handling
657  
658 Simple error message routines for SDL.
659  
660 Most apps will interface with these APIs in exactly one function: when almost any SDL function call reports failure,
661 you can get a human-readable string of the problem from L<SDL_GetError()|https://wiki.libsdl.org/SDL3/SDL_GetError>.
662  
663 See L<SDL3: CategoryError|https://wiki.libsdl.org/SDL3/CategoryError>
664  
665 =cut
666  
667 sub _error() {
668 state $done++ && return;
669 #
670 _affix_and_export 'SDL_SetError', [String] => Bool;
671 _affix_and_export 'SDL_OutOfMemory', [] => Bool;
672 _affix_and_export 'SDL_GetError', [] => String;
673 _affix_and_export 'SDL_ClearError', [] => Bool;
674 #
675 _func_and_export( SDL_Unsupported => sub () { SDL_SetError('That operation is not supported') } );
676 _func_and_export( SDL_InvalidParamError => sub ($param) { SDL_SetError( sprintf q[Parameter '%s' is invalid], $param ) } );
677 }
678  
679 =head3 C<:events> - Event Handling
680  
681 Event queue management.
682  
683 See L<SDL3: CategoryEvents|https://wiki.libsdl.org/SDL3/CategoryEvents>
684  
685 =cut
686  
687 sub _events() {
688 state $done++ && return;
689 _audio();
690 _camera();
691 _error();
692 _gamepad();
693 _joystick();
694 _keyboard();
695 _keycode();
696 _mouse();
697 _pen();
698 _power();
699 _scancode();
700 _sensor();
701 _stdinc();
702 _touch();
703 _video();
704 #
705 _enum_and_export SDL_EventType => [
706 [ SDL_EVENT_FIRST => 0 ], [ SDL_EVENT_QUIT => 0x100 ], 'SDL_EVENT_TERMINATING', 'SDL_EVENT_LOW_MEMORY',
707 'SDL_EVENT_WILL_ENTER_BACKGROUND', 'SDL_EVENT_DID_ENTER_BACKGROUND', 'SDL_EVENT_WILL_ENTER_FOREGROUND', 'SDL_EVENT_DID_ENTER_FOREGROUND',
708 'SDL_EVENT_LOCALE_CHANGED', 'SDL_EVENT_SYSTEM_THEME_CHANGED',
709  
710 # Display events
711 # 0x150 was SDL_DISPLAYEVENT, reserve the number for sdl2-compat
712 [ SDL_EVENT_DISPLAY_ORIENTATION => 0x151 ], 'SDL_EVENT_DISPLAY_ADDED', 'SDL_EVENT_DISPLAY_REMOVED', 'SDL_EVENT_DISPLAY_MOVED',
713 'SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED', 'SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED', 'SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED',
714 'SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED', [ SDL_EVENT_DISPLAY_FIRST => 'SDL_EVENT_DISPLAY_ORIENTATION' ],
715 [ SDL_EVENT_DISPLAY_LAST => 'SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED' ],
716  
717 # Window events
718 # 0x200 was SDL_WINDOWEVENT, reserve the number for sdl2-compat
719 # 0x201 was SDL_SYSWMEVENT, reserve the number for sdl2-compat
720 [ SDL_EVENT_WINDOW_SHOWN => 0x202 ], 'SDL_EVENT_WINDOW_HIDDEN', 'SDL_EVENT_WINDOW_EXPOSED', 'SDL_EVENT_WINDOW_MOVED',
721 'SDL_EVENT_WINDOW_RESIZED', 'SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED', 'SDL_EVENT_WINDOW_METAL_VIEW_RESIZED', 'SDL_EVENT_WINDOW_MINIMIZED',
722 'SDL_EVENT_WINDOW_MAXIMIZED', 'SDL_EVENT_WINDOW_RESTORED', 'SDL_EVENT_WINDOW_MOUSE_ENTER', 'SDL_EVENT_WINDOW_MOUSE_LEAVE',
723 'SDL_EVENT_WINDOW_FOCUS_GAINED', 'SDL_EVENT_WINDOW_FOCUS_LOST', 'SDL_EVENT_WINDOW_CLOSE_REQUESTED', 'SDL_EVENT_WINDOW_HIT_TEST',
724 'SDL_EVENT_WINDOW_ICCPROF_CHANGED', 'SDL_EVENT_WINDOW_DISPLAY_CHANGED', 'SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED',
725 'SDL_EVENT_WINDOW_SAFE_AREA_CHANGED', 'SDL_EVENT_WINDOW_OCCLUDED', 'SDL_EVENT_WINDOW_ENTER_FULLSCREEN',
726 'SDL_EVENT_WINDOW_LEAVE_FULLSCREEN', 'SDL_EVENT_WINDOW_DESTROYED', 'SDL_EVENT_WINDOW_HDR_STATE_CHANGED',
727 [ SDL_EVENT_WINDOW_FIRST => 'SDL_EVENT_WINDOW_SHOWN' ], [ SDL_EVENT_WINDOW_LAST => 'SDL_EVENT_WINDOW_HDR_STATE_CHANGED' ],
728  
729 # Keyboard events
730 [ SDL_EVENT_KEY_DOWN => 0x300 ], 'SDL_EVENT_KEY_UP', 'SDL_EVENT_TEXT_EDITING', 'SDL_EVENT_TEXT_INPUT', 'SDL_EVENT_KEYMAP_CHANGED',
731 'SDL_EVENT_KEYBOARD_ADDED', 'SDL_EVENT_KEYBOARD_REMOVED', 'SDL_EVENT_TEXT_EDITING_CANDIDATES', 'SDL_EVENT_SCREEN_KEYBOARD_SHOWN',
732 'SDL_EVENT_SCREEN_KEYBOARD_HIDDEN',
733  
734 # Mouse events
735 [ SDL_EVENT_MOUSE_MOTION => 0x400 ], 'SDL_EVENT_MOUSE_BUTTON_DOWN', 'SDL_EVENT_MOUSE_BUTTON_UP', 'SDL_EVENT_MOUSE_WHEEL',
736 'SDL_EVENT_MOUSE_ADDED', 'SDL_EVENT_MOUSE_REMOVED',
737  
738 # Joystick events
739 [ SDL_EVENT_JOYSTICK_AXIS_MOTION => 0x600 ], 'SDL_EVENT_JOYSTICK_BALL_MOTION', 'SDL_EVENT_JOYSTICK_HAT_MOTION',
740 'SDL_EVENT_JOYSTICK_BUTTON_DOWN', 'SDL_EVENT_JOYSTICK_BUTTON_UP', 'SDL_EVENT_JOYSTICK_ADDED', 'SDL_EVENT_JOYSTICK_REMOVED',
741 'SDL_EVENT_JOYSTICK_BATTERY_UPDATED', 'SDL_EVENT_JOYSTICK_UPDATE_COMPLETE',
742  
743 # Gamepad events
744 [ SDL_EVENT_GAMEPAD_AXIS_MOTION => 0x650 ], 'SDL_EVENT_GAMEPAD_BUTTON_DOWN', 'SDL_EVENT_GAMEPAD_BUTTON_UP', 'SDL_EVENT_GAMEPAD_ADDED',
745 'SDL_EVENT_GAMEPAD_REMOVED', 'SDL_EVENT_GAMEPAD_REMAPPED', 'SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN', 'SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION',
746 'SDL_EVENT_GAMEPAD_TOUCHPAD_UP', 'SDL_EVENT_GAMEPAD_SENSOR_UPDATE', 'SDL_EVENT_GAMEPAD_UPDATE_COMPLETE',
747 'SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED',
748  
749 # Touch events
750 [ SDL_EVENT_FINGER_DOWN => 0x700 ], 'SDL_EVENT_FINGER_UP', 'SDL_EVENT_FINGER_MOTION', 'SDL_EVENT_FINGER_CANCELED',
751  
752 # Pinch events
753 [ SDL_EVENT_PINCH_BEGIN => 0x710 ], 'SDL_EVENT_PINCH_UPDATE', 'SDL_EVENT_PINCH_END',
754  
755 # 0x800, 0x801, and 0x802 were the Gesture events from SDL2. Do not reuse these values! sdl2-compat needs them!
756 # Clipboard events
757 [ SDL_EVENT_CLIPBOARD_UPDATE => 0x900 ],
758  
759 # Drag and drop events
760 [ SDL_EVENT_DROP_FILE => 0x1000 ], 'SDL_EVENT_DROP_TEXT', 'SDL_EVENT_DROP_BEGIN', 'SDL_EVENT_DROP_COMPLETE', 'SDL_EVENT_DROP_POSITION',
761  
762 # Audio hotplug events
763 [ SDL_EVENT_AUDIO_DEVICE_ADDED => 0x1100 ], 'SDL_EVENT_AUDIO_DEVICE_REMOVED', 'SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED',
764  
765 # Sensor events
766 [ SDL_EVENT_SENSOR_UPDATE => 0x1200 ],
767  
768 # Pressure-sensitive pen events
769 [ SDL_EVENT_PEN_PROXIMITY_IN => 0x1300 ], 'SDL_EVENT_PEN_PROXIMITY_OUT', 'SDL_EVENT_PEN_DOWN', 'SDL_EVENT_PEN_UP',
770 'SDL_EVENT_PEN_BUTTON_DOWN', 'SDL_EVENT_PEN_BUTTON_UP', 'SDL_EVENT_PEN_MOTION', 'SDL_EVENT_PEN_AXIS',
771  
772 # Camera hotplug events
773 [ SDL_EVENT_CAMERA_DEVICE_ADDED => 0x1400 ], 'SDL_EVENT_CAMERA_DEVICE_REMOVED', 'SDL_EVENT_CAMERA_DEVICE_APPROVED',
774 'SDL_EVENT_CAMERA_DEVICE_DENIED',
775  
776 # Render events
777 [ SDL_EVENT_RENDER_TARGETS_RESET => 0x2000 ], 'SDL_EVENT_RENDER_DEVICE_RESET', 'SDL_EVENT_RENDER_DEVICE_LOST',
778  
779 # Reserved events for private platforms
780 [ SDL_EVENT_PRIVATE0 => 0x4000 ], 'SDL_EVENT_PRIVATE1', 'SDL_EVENT_PRIVATE2', 'SDL_EVENT_PRIVATE3',
781  
782 # Internal events
783 [ SDL_EVENT_POLL_SENTINEL => 0x7F00 ],
784  
785 # Events SDL_EVENT_USER through SDL_EVENT_LAST are for your use,
786 # and should be allocated with SDL_RegisterEvents()
787 [ SDL_EVENT_USER => 0x8000 ],
788  
789 # This last event is only for bounding internal arrays
790 [ SDL_EVENT_LAST => 0xFFFF ],
791  
792 # This just makes sure the enum is the size of Uint32
793 [ SDL_EVENT_ENUM_PADDING => 0x7FFFFFFF ]
794 ];
795 _typedef_and_export SDL_CommonEvent => Struct [ type => UInt32, reserved => UInt32, timestamp => UInt64 ];
796 _typedef_and_export SDL_DisplayEvent => Struct [
797 type => SDL_EventType(),
798 reserved => UInt32,
799 timestamp => UInt64,
800 displayID => SDL_DisplayID(),
801 data1 => SInt32,
802 data2 => SInt32
803 ];
804 _typedef_and_export SDL_WindowEvent =>
805 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, windowID => SDL_WindowID(), data1 => SInt32, data2 => SInt32 ];
806 _typedef_and_export SDL_KeyboardDeviceEvent =>
807 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, which => SDL_KeyboardID() ];
808 _typedef_and_export SDL_KeyboardEvent => Struct [
809 type => SDL_EventType(),
810 reserved => UInt32,
811 timestamp => UInt64,
812 windowID => SDL_WindowID(),
813 which => SDL_KeyboardID(),
814 scancode => SDL_Scancode(),
815 key => SDL_Keycode(),
816 mod => SDL_Keymod(),
817 raw => UInt16,
818 down => Bool,
819 repeat => Bool
820 ];
821 _typedef_and_export SDL_TextEditingEvent => Struct [
822 type => SDL_EventType(),
823 reserved => UInt32,
824 timestamp => UInt64,
825 windowID => SDL_WindowID(),
826 text => String,
827 start => SInt32,
828 length => SInt32
829 ];
830 _typedef_and_export SDL_TextEditingCandidatesEvent => Struct [
831 type => SDL_EventType(),
832 reserved => UInt32,
833 timestamp => UInt64,
834 windowID => SDL_WindowID(),
835 candidates => Pointer [String],
836 num_candidates => SInt32,
837 selected_candidate => SInt32,
838 horizontal => Bool,
839 padding1 => UInt8,
840 padding2 => UInt8,
841 padding3 => UInt8
842 ];
843 _typedef_and_export SDL_TextInputEvent =>
844 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, windowID => SDL_WindowID(), text => String ];
845 _typedef_and_export SDL_MouseDeviceEvent =>
846 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, which => SDL_MouseID() ];
847 _typedef_and_export SDL_MouseMotionEvent => Struct [
848 type => SDL_EventType(),
849 reserved => UInt32,
850 timestamp => UInt64,
851 windowID => SDL_WindowID(),
852 which => SDL_MouseID(),
853 state => SDL_MouseButtonFlags(),
854 x => Float,
855 y => Float,
856 xrel => Float,
857 yrel => Float
858 ];
859 _typedef_and_export SDL_MouseButtonEvent => Struct [
860 type => SDL_EventType(),
861 reserved => UInt32,
862 timestamp => UInt64,
863 windowID => SDL_WindowID(),
864 which => SDL_MouseID(),
865 button => UInt8,
866 down => Bool,
867 clicks => UInt8,
868 padding => UInt8,
869 x => Float,
870 y => Float
871 ];
872 _typedef_and_export SDL_MouseWheelEvent => Struct [
873 type => SDL_EventType(),
874 reserved => UInt32,
875 timestamp => UInt64,
876 windowID => SDL_WindowID(),
877 which => SDL_MouseID(),
878 x => Float,
879 y => Float,
880 direction => SDL_MouseWheelDirection(),
881 mouse_x => Float,
882 mouse_y => Float,
883 integer_x => SInt32,
884 integer_y => SInt32
885 ];
886 _typedef_and_export SDL_JoyAxisEvent => Struct [
887 type => SDL_EventType(),
888 reserved => UInt32,
889 timestamp => UInt64,
890 which => SDL_JoystickID(),
891 axis => UInt8,
892 padding1 => UInt8,
893 padding2 => UInt8,
894 padding3 => UInt8,
895 value => SInt16,
896 padding4 => UInt16
897 ];
898 _typedef_and_export SDL_JoyBallEvent => Struct [
899 type => SDL_EventType(),
900 reserved => UInt32,
901 timestamp => UInt64,
902 which => SDL_JoystickID(),
903 ball => UInt8,
904 padding1 => UInt8,
905 padding2 => UInt8,
906 padding3 => UInt8,
907 xrel => SInt16,
908 yrel => SInt16
909 ];
910 _typedef_and_export SDL_JoyHatEvent => Struct [
911 type => SDL_EventType(),
912 reserved => UInt32,
913 timestamp => UInt64,
914 which => SDL_JoystickID(),
915 hat => UInt8,
916 value => UInt8,
917 padding1 => UInt8,
918 padding2 => UInt8
919 ];
920 _typedef_and_export SDL_JoyButtonEvent => Struct [
921 type => SDL_EventType(),
922 reserved => UInt32,
923 timestamp => UInt64,
924 which => SDL_JoystickID(),
925 button => UInt8,
926 down => Bool,
927 padding1 => UInt8,
928 padding2 => UInt8
929 ];
930 _typedef_and_export SDL_JoyDeviceEvent =>
931 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, which => SDL_JoystickID() ];
932 _typedef_and_export SDL_JoyBatteryEvent => Struct [
933 type => SDL_EventType(),
934 reserved => UInt32,
935 timestamp => UInt64,
936 which => SDL_JoystickID(),
937 state => SDL_PowerState(),
938 percent => Int
939 ];
940 _typedef_and_export SDL_GamepadAxisEvent => Struct [
941 type => SDL_EventType(),
942 reserved => UInt32,
943 timestamp => UInt64,
944 which => SDL_JoystickID(),
945 axis => UInt8,
946 padding1 => UInt8,
947 padding2 => UInt8,
948 padding3 => UInt8,
949 value => SInt16,
950 padding4 => UInt16
951 ];
952 _typedef_and_export SDL_GamepadButtonEvent => Struct [
953 type => SDL_EventType(),
954 reserved => UInt32,
955 timestamp => UInt64,
956 which => SDL_JoystickID(),
957 button => UInt8,
958 down => Bool,
959 padding1 => UInt8,
960 padding2 => UInt8
961 ];
962 _typedef_and_export SDL_GamepadDeviceEvent =>
963 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, which => SDL_JoystickID() ];
964 _typedef_and_export SDL_GamepadTouchpadEvent => Struct [
965 type => SDL_EventType(),
966 reserved => UInt32,
967 timestamp => UInt64,
968 which => SDL_JoystickID(),
969 touchpad => SInt32,
970 finger => SInt32,
971 x => Float,
972 y => Float,
973 pressure => Float
974 ];
975 _typedef_and_export SDL_GamepadSensorEvent => Struct [
976 type => SDL_EventType(),
977 reserved => UInt32,
978 timestamp => UInt64,
979 which => SDL_JoystickID(),
980 sensor => SInt32,
981 data => Array [ Float, 3 ],
982 sensor_timestamp => UInt64
983 ];
984 _typedef_and_export SDL_AudioDeviceEvent => Struct [
985 type => SDL_EventType(),
986 reserved => UInt32,
987 timestamp => UInt64,
988 which => SDL_AudioDeviceID(),
989 recording => Bool,
990 padding1 => UInt8,
991 padding2 => UInt8,
992 padding3 => UInt8
993 ];
994 _typedef_and_export SDL_CameraDeviceEvent =>
995 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, which => SDL_CameraID() ];
996 _typedef_and_export SDL_RenderEvent =>
997 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, windowID => SDL_WindowID() ];
998 _typedef_and_export SDL_TouchFingerEvent => Struct [
999 type => SDL_EventType(),
1000 reserved => UInt32,
1001 timestamp => UInt64,
1002 touchID => SDL_TouchID(),
1003 fingerID => SDL_FingerID(),
1004 x => Float,
1005 y => Float,
1006 dx => Float,
1007 dy => Float,
1008 pressure => Float,
1009 windowID => SDL_WindowID()
1010 ];
1011 _typedef_and_export SDL_PinchFingerEvent =>
1012 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, scale => Float, windowID => SDL_WindowID() ];
1013 _typedef_and_export SDL_PenProximityEvent =>
1014 Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64, windowID => SDL_WindowID(), which => SDL_PenID() ];
1015 _typedef_and_export SDL_PenMotionEvent => Struct [
1016 type => SDL_EventType(),
1017 reserved => UInt32,
1018 timestamp => UInt64,
1019 windowID => SDL_WindowID(),
1020 which => SDL_PenID(),
1021 pen_state => SDL_PenInputFlags(),
1022 x => Float,
1023 y => Float
1024 ];
1025 _typedef_and_export SDL_PenTouchEvent => Struct [
1026 type => SDL_EventType(),
1027 reserved => UInt32,
1028 timestamp => UInt64,
1029 windowID => SDL_WindowID(),
1030 which => SDL_PenID(),
1031 pen_state => SDL_PenInputFlags(),
1032 x => Float,
1033 y => Float,
1034 eraser => Bool,
1035 down => Bool
1036 ];
1037 _typedef_and_export SDL_PenButtonEvent => Struct [
1038 type => SDL_EventType(),
1039 reserved => UInt32,
1040 timestamp => UInt64,
1041 windowID => SDL_WindowID(),
1042 which => SDL_PenID(),
1043 pen_state => SDL_PenInputFlags(),
1044 x => Float,
1045 y => Float,
1046 button => UInt8,
1047 down => Bool
1048 ];
1049 _typedef_and_export SDL_PenAxisEvent => Struct [
1050 type => SDL_EventType(),
1051 reserved => UInt32,
1052 timestamp => UInt64,
1053 windowID => SDL_WindowID(),
1054 which => SDL_PenID(),
1055 pen_state => SDL_PenInputFlags(),
1056 x => Float,
1057 y => Float,
1058 axis => SDL_PenAxis(),
1059 value => Float
1060 ];
1061 _typedef_and_export SDL_DropEvent => Struct [
1062 type => SDL_EventType(),
1063 reserved => UInt32,
1064 timestamp => UInt64,
1065 windowID => SDL_WindowID(),
1066 x => Float,
1067 y => Float,
1068 source => String,
1069 data => String
1070 ];
1071 _typedef_and_export SDL_ClipboardEvent => Struct [
1072 type => SDL_EventType(),
1073 reserved => UInt32,
1074 timestamp => UInt64,
1075 owner => Bool,
1076 num_mime_types => SInt32,
1077 mime_types => Pointer [String]
1078 ];
1079 _typedef_and_export SDL_SensorEvent => Struct [
1080 type => SDL_EventType(),
1081 reserved => UInt32,
1082 timestamp => UInt64,
1083 which => SDL_SensorID(),
1084 data => Array [ Float, 6 ],
1085 sensor_timestamp => UInt64
1086 ];
1087 _typedef_and_export SDL_QuitEvent => Struct [ type => SDL_EventType(), reserved => UInt32, timestamp => UInt64 ];
1088 _typedef_and_export SDL_UserEvent => Struct [
1089 type => UInt32,
1090 reserved => UInt32,
1091 timestamp => UInt64,
1092 windowID => SDL_WindowID(),
1093 code => SInt32,
1094 data1 => Pointer [Void],
1095 data2 => Pointer [Void]
1096 ];
1097 _typedef_and_export SDL_Event => Union [
1098 type => UInt32,
1099 common => SDL_CommonEvent(),
1100 display => SDL_DisplayEvent(),
1101 window => SDL_WindowEvent(),
1102 kdevice => SDL_KeyboardDeviceEvent(),
1103 key => SDL_KeyboardEvent(),
1104 edit => SDL_TextEditingEvent(),
1105 edit_candidates => SDL_TextEditingCandidatesEvent(),
1106 text => SDL_TextInputEvent(),
1107 mdevice => SDL_MouseDeviceEvent(),
1108 motion => SDL_MouseMotionEvent(),
1109 button => SDL_MouseButtonEvent(),
1110 wheel => SDL_MouseWheelEvent(),
1111 jdevice => SDL_JoyDeviceEvent(),
1112 jaxis => SDL_JoyAxisEvent(),
1113 jball => SDL_JoyBallEvent(),
1114 jhat => SDL_JoyHatEvent(),
1115 jbutton => SDL_JoyButtonEvent(),
1116 jbattery => SDL_JoyBatteryEvent(),
1117 gdevice => SDL_GamepadDeviceEvent(),
1118 gaxis => SDL_GamepadAxisEvent(),
1119 gbutton => SDL_GamepadButtonEvent(),
1120 gtouchpad => SDL_GamepadTouchpadEvent(),
1121 gsensor => SDL_GamepadSensorEvent(),
1122 adevice => SDL_AudioDeviceEvent(),
1123 cdevice => SDL_CameraDeviceEvent(),
1124 sensor => SDL_SensorEvent(),
1125 quit => SDL_QuitEvent(),
1126 user => SDL_UserEvent(),
1127 tfinger => SDL_TouchFingerEvent(),
1128 pinch => SDL_PinchFingerEvent(),
1129 pproximity => SDL_PenProximityEvent(),
1130 ptouch => SDL_PenTouchEvent(),
1131 pmotion => SDL_PenMotionEvent(),
1132 pbutton => SDL_PenButtonEvent(),
1133 paxis => SDL_PenAxisEvent(),
1134 render => SDL_RenderEvent(),
1135 drop => SDL_DropEvent(),
1136 clipboard => SDL_ClipboardEvent(),
1137 padding => Array [ UInt8, 128 ]
1138 ];
1139 _affix_and_export SDL_PumpEvents => [], Void;
1140 _enum_and_export SDL_EventAction => [ 'SDL_ADDEVENT', 'SDL_PEEKEVENT', 'SDL_GETEVENT' ];
1141 _affix_and_export SDL_PeepEvents => [ Pointer [ SDL_Event() ], Int, SDL_EventAction(), UInt32, UInt32 ], Int;
1142 _affix_and_export SDL_HasEvent => [UInt32], Bool;
1143 _affix_and_export SDL_HasEvents => [ UInt32, UInt32 ], Bool;
1144 _affix_and_export SDL_FlushEvent => [UInt32], Void;
1145 _affix_and_export SDL_FlushEvents => [ UInt32, UInt32 ], Void;
1146 _affix_and_export SDL_PollEvent => [ Pointer [ SDL_Event() ] ], Bool;
1147 _affix_and_export SDL_WaitEvent => [ Pointer [ SDL_Event() ] ], Bool;
1148 _affix_and_export SDL_WaitEventTimeout => [ Pointer [ SDL_Event() ], SInt32 ], Bool;
1149 _affix_and_export SDL_PushEvent => [ Pointer [ SDL_Event() ] ], Bool;
1150 _typedef_and_export SDL_EventFilter => Callback [ [ Pointer [Void], Pointer [ SDL_Event() ] ] => Bool ];
1151 _affix_and_export SDL_SetEventFilter => [ SDL_EventFilter(), Pointer [Void] ], Void;
1152 _affix_and_export SDL_GetEventFilter => [ Pointer [ SDL_EventFilter() ], Pointer [ Pointer [Void] ] ], Bool;
1153 _affix_and_export SDL_AddEventWatch => [ SDL_EventFilter(), Pointer [Void] ], Bool;
1154 _affix_and_export SDL_RemoveEventWatch => [ SDL_EventFilter(), Pointer [Void] ], Void;
1155 _affix_and_export SDL_FilterEvents => [ SDL_EventFilter(), Pointer [Void] ], Void;
1156 _affix_and_export SDL_SetEventEnabled => [ UInt32, Bool ], Void;
1157 _affix_and_export SDL_EventEnabled => [UInt32], Bool;
1158 _affix_and_export SDL_RegisterEvents => [Int], UInt32;
1159 _affix_and_export SDL_GetWindowFromEvent => [ Pointer [ SDL_Event() ] ], Pointer [ SDL_Window() ];
1160  
1161 #~ _affix_and_export SDL_GetEventDescription => [ Pointer [ SDL_Event() ], String, Int ], Int;
1162 }
1163  
1164 =head3 C<:filesystem> - Filesystem Access
1165  
1166 SDL offers an API for examining and manipulating the system's filesystem. This covers most things one would need to do
1167 with directories, except for actual file I/O.
1168  
1169 See L<SDL3: CategoryFilesystem|https://wiki.libsdl.org/SDL3/CategoryFilesystem>
1170  
1171 =cut
1172  
1173 sub _filesystem() {
1174 state $done++ && return;
1175 #
1176 _error();
1177 _stdinc();
1178 #
1179 _affix_and_export SDL_GetBasePath => [], String;
1180 _affix_and_export SDL_GetPrefPath => [ String, String ], String;
1181 _enum_and_export SDL_Folder => [
1182 'SDL_FOLDER_HOME', 'SDL_FOLDER_DESKTOP', 'SDL_FOLDER_DOCUMENTS', 'SDL_FOLDER_DOWNLOADS',
1183 'SDL_FOLDER_MUSIC', 'SDL_FOLDER_PICTURES', 'SDL_FOLDER_PUBLICSHARE', 'SDL_FOLDER_SAVEDGAMES',
1184 'SDL_FOLDER_SCREENSHOTS', 'SDL_FOLDER_TEMPLATES', 'SDL_FOLDER_VIDEOS', 'SDL_FOLDER_COUNT'
1185 ];
1186 _affix_and_export SDL_GetUserFolder => [ SDL_Folder() ], String;
1187 _enum_and_export SDL_PathType => [ 'SDL_PATHTYPE_NONE', 'SDL_PATHTYPE_FILE', 'SDL_PATHTYPE_DIRECTORY', 'SDL_PATHTYPE_OTHER' ];
1188 _typedef_and_export SDL_PathInfo => Struct [
1189 type => SDL_PathType(),
1190 size => UInt64,
1191 create_time => SInt64, # SDL_Time
1192 modify_time => SInt64,
1193 access_time => SInt64
1194 ];
1195 _typedef_and_export SDL_GlobFlags => UInt32;
1196 _const_and_export SDL_GLOB_CASEINSENSITIVE => ( 1 << 0 );
1197 _affix_and_export SDL_CreateDirectory => [String], Bool;
1198 _enum_and_export SDL_EnumerationResult => [ 'SDL_ENUM_CONTINUE', 'SDL_ENUM_SUCCESS', 'SDL_ENUM_FAILURE' ];
1199 _typedef_and_export SDL_EnumerateDirectoryCallback => Callback [ [ Pointer [Void], String, String ] => SDL_EnumerationResult() ];
1200 _affix_and_export
1201 SDL_EnumerateDirectory => [ String, SDL_EnumerateDirectoryCallback(), Pointer [Void] ],
1202 Bool;
1203 _affix_and_export SDL_RemovePath => [String], Bool;
1204 _affix_and_export SDL_RenamePath => [ String, String ], Bool;
1205 _affix_and_export SDL_CopyFile => [ String, String ], Bool;
1206 _affix_and_export SDL_GetPathInfo => [ String, Pointer [ SDL_PathInfo() ] ], Bool;
1207 _affix_and_export
1208 SDL_GlobDirectory => [ String, String, SDL_GlobFlags(), Pointer [Int] ],
1209 Pointer [String];
1210 _affix_and_export SDL_GetCurrentDirectory => [], String;
1211 }
1212  
1213 =head3 C<:gamepad> - Gamepad Support
1214  
1215 SDL provides a low-level joystick API, which just treats joysticks as an arbitrary pile of buttons, axes, and hat
1216 switches. If you're planning to write your own control configuration screen, this can give you a lot of flexibility,
1217 but that's a lot of work, and most things that we consider "joysticks" now are actually console-style gamepads. So SDL
1218 provides the gamepad API on top of the lower-level joystick functionality.
1219  
1220 See L<SDL3: CategoryGamepad|https://wiki.libsdl.org/SDL3/CategoryGamepad>
1221  
1222 =cut
1223  
1224 sub _gamepad() {
1225 state $done++ && return;
1226 #
1227 _error();
1228 _guid();
1229 _iostream();
1230 _joystick();
1231 _power();
1232 _properties();
1233 _sensor();
1234 _stdinc();
1235 #
1236 _typedef_and_export SDL_Gamepad => Void;
1237 _enum_and_export SDL_GamepadType => [
1238 'SDL_GAMEPAD_TYPE_UNKNOWN', 'SDL_GAMEPAD_TYPE_STANDARD',
1239 'SDL_GAMEPAD_TYPE_XBOX360', 'SDL_GAMEPAD_TYPE_XBOXONE',
1240 'SDL_GAMEPAD_TYPE_PS3', 'SDL_GAMEPAD_TYPE_PS4',
1241 'SDL_GAMEPAD_TYPE_PS5', 'SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO',
1242 'SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT', 'SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT',
1243 'SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR', 'SDL_GAMEPAD_TYPE_GAMECUBE',
1244 'SDL_GAMEPAD_TYPE_COUNT'
1245 ];
1246 _enum_and_export SDL_GamepadButton => [
1247 [ SDL_GAMEPAD_BUTTON_INVALID => -1 ], 'SDL_GAMEPAD_BUTTON_SOUTH',
1248 'SDL_GAMEPAD_BUTTON_EAST', 'SDL_GAMEPAD_BUTTON_WEST',
1249 'SDL_GAMEPAD_BUTTON_NORTH', 'SDL_GAMEPAD_BUTTON_BACK',
1250 'SDL_GAMEPAD_BUTTON_GUIDE', 'SDL_GAMEPAD_BUTTON_START',
1251 'SDL_GAMEPAD_BUTTON_LEFT_STICK', 'SDL_GAMEPAD_BUTTON_RIGHT_STICK',
1252 'SDL_GAMEPAD_BUTTON_LEFT_SHOULDER', 'SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER',
1253 'SDL_GAMEPAD_BUTTON_DPAD_UP', 'SDL_GAMEPAD_BUTTON_DPAD_DOWN',
1254 'SDL_GAMEPAD_BUTTON_DPAD_LEFT', 'SDL_GAMEPAD_BUTTON_DPAD_RIGHT',
1255 'SDL_GAMEPAD_BUTTON_MISC1', 'SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1',
1256 'SDL_GAMEPAD_BUTTON_LEFT_PADDLE1', 'SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2',
1257 'SDL_GAMEPAD_BUTTON_LEFT_PADDLE2', 'SDL_GAMEPAD_BUTTON_TOUCHPAD',
1258 'SDL_GAMEPAD_BUTTON_MISC2', 'SDL_GAMEPAD_BUTTON_MISC3',
1259 'SDL_GAMEPAD_BUTTON_MISC4', 'SDL_GAMEPAD_BUTTON_MISC5',
1260 'SDL_GAMEPAD_BUTTON_MISC6', 'SDL_GAMEPAD_BUTTON_COUNT'
1261 ];
1262 _enum_and_export SDL_GamepadButtonLabel => [
1263 'SDL_GAMEPAD_BUTTON_LABEL_UNKNOWN', 'SDL_GAMEPAD_BUTTON_LABEL_A',
1264 'SDL_GAMEPAD_BUTTON_LABEL_B', 'SDL_GAMEPAD_BUTTON_LABEL_X',
1265 'SDL_GAMEPAD_BUTTON_LABEL_Y', 'SDL_GAMEPAD_BUTTON_LABEL_CROSS',
1266 'SDL_GAMEPAD_BUTTON_LABEL_CIRCLE', 'SDL_GAMEPAD_BUTTON_LABEL_SQUARE',
1267 'SDL_GAMEPAD_BUTTON_LABEL_TRIANGLE'
1268 ];
1269 _enum_and_export SDL_GamepadAxis => [
1270 [ SDL_GAMEPAD_AXIS_INVALID => -1 ], 'SDL_GAMEPAD_AXIS_LEFTX',
1271 'SDL_GAMEPAD_AXIS_LEFTY', 'SDL_GAMEPAD_AXIS_RIGHTX',
1272 'SDL_GAMEPAD_AXIS_RIGHTY', 'SDL_GAMEPAD_AXIS_LEFT_TRIGGER',
1273 'SDL_GAMEPAD_AXIS_RIGHT_TRIGGER', 'SDL_GAMEPAD_AXIS_COUNT'
1274 ];
1275 _enum_and_export SDL_GamepadBindingType =>
1276 [ 'SDL_GAMEPAD_BINDTYPE_NONE', 'SDL_GAMEPAD_BINDTYPE_BUTTON', 'SDL_GAMEPAD_BINDTYPE_AXIS', 'SDL_GAMEPAD_BINDTYPE_HAT' ];
1277 _typedef_and_export SDL_GamepadBinding => Struct [
1278 input_type => SDL_GamepadBindingType(),
1279 input => Union [
1280 button => Int,
1281 axis => Struct [ axis => Int, axis_min => Int, axis_max => Int ],
1282 hat => Struct [ hat => Int, hat_mask => Int ]
1283 ],
1284 output_type => SDL_GamepadBindingType(),
1285 output => Union [ button => SDL_GamepadButton(), axis => Struct [ axis => SDL_GamepadAxis(), axis_min => Int, axis_max => Int ] ]
1286 ];
1287 _affix_and_export SDL_AddGamepadMapping => [String], Int;
1288 _affix_and_export SDL_AddGamepadMappingsFromIO => [ Pointer [ SDL_IOStream() ], Bool ], Int;
1289 _affix_and_export SDL_AddGamepadMappingsFromFile => [String], Int;
1290 _affix_and_export SDL_ReloadGamepadMappings => [], Bool;
1291 _affix_and_export SDL_GetGamepadMappings => [ Pointer [Int] ], Pointer [String];
1292 _affix_and_export SDL_GetGamepadMappingForGUID => [ SDL_GUID() ], String;
1293 _affix_and_export SDL_GetGamepadMapping => [ Pointer [ SDL_Gamepad() ] ], String;
1294 _affix_and_export SDL_SetGamepadMapping => [ SDL_JoystickID(), String ], Bool;
1295 _affix_and_export SDL_HasGamepad => [], Bool;
1296 _affix_and_export SDL_GetGamepads => [ Pointer [Int] ], Pointer [ SDL_JoystickID() ];
1297 _affix_and_export SDL_IsGamepad => [ SDL_JoystickID() ], Bool;
1298 _affix_and_export SDL_GetGamepadNameForID => [ SDL_JoystickID() ], String;
1299 _affix_and_export SDL_GetGamepadPathForID => [ SDL_JoystickID() ], String;
1300 _affix_and_export SDL_GetGamepadPlayerIndexForID => [ SDL_JoystickID() ], Int;
1301 _affix_and_export SDL_GetGamepadGUIDForID => [ SDL_JoystickID() ], SDL_GUID();
1302 _affix_and_export SDL_GetGamepadVendorForID => [ SDL_JoystickID() ], UInt16;
1303 _affix_and_export SDL_GetGamepadProductForID => [ SDL_JoystickID() ], UInt16;
1304 _affix_and_export SDL_GetGamepadProductVersionForID => [ SDL_JoystickID() ], UInt16;
1305 _affix_and_export SDL_GetGamepadTypeForID => [ SDL_JoystickID() ], SDL_GamepadType();
1306 _affix_and_export SDL_GetRealGamepadTypeForID => [ SDL_JoystickID() ], SDL_GamepadType();
1307 _affix_and_export SDL_GetGamepadMappingForID => [ SDL_JoystickID() ], String;
1308 _affix_and_export SDL_OpenGamepad => [ SDL_JoystickID() ], Pointer [ SDL_Gamepad() ];
1309 _affix_and_export SDL_GetGamepadFromID => [ SDL_JoystickID() ], Pointer [ SDL_Gamepad() ];
1310 _affix_and_export SDL_GetGamepadFromPlayerIndex => [Int], Pointer [ SDL_Gamepad() ];
1311 _affix_and_export SDL_GetGamepadProperties => [ Pointer [ SDL_Gamepad() ] ], SDL_PropertiesID();
1312 _const_and_export SDL_PROP_GAMEPAD_CAP_MONO_LED_BOOLEAN => 'SDL.joystick.cap.mono_led';
1313 _const_and_export SDL_PROP_GAMEPAD_CAP_RGB_LED_BOOLEAN => 'SDL.joystick.cap.rgb_led';
1314 _const_and_export SDL_PROP_GAMEPAD_CAP_PLAYER_LED_BOOLEAN => 'SDL.joystick.cap.player_led';
1315 _const_and_export SDL_PROP_GAMEPAD_CAP_RUMBLE_BOOLEAN => 'SDL.joystick.cap.rumble';
1316 _const_and_export SDL_PROP_GAMEPAD_CAP_TRIGGER_RUMBLE_BOOLEAN => 'SDL.joystick.cap.trigger_rumble';
1317 _affix_and_export SDL_GetGamepadID => [ Pointer [ SDL_Gamepad() ] ], SDL_JoystickID();
1318 _affix_and_export SDL_GetGamepadName => [ Pointer [ SDL_Gamepad() ] ], String;
1319 _affix_and_export SDL_GetGamepadPath => [ Pointer [ SDL_Gamepad() ] ], String;
1320 _affix_and_export SDL_GetGamepadType => [ Pointer [ SDL_Gamepad() ] ], SDL_GamepadType();
1321 _affix_and_export SDL_GetRealGamepadType => [ Pointer [ SDL_Gamepad() ] ], SDL_GamepadType();
1322 _affix_and_export SDL_GetGamepadPlayerIndex => [ Pointer [ SDL_Gamepad() ] ], Int;
1323 _affix_and_export SDL_SetGamepadPlayerIndex => [ Pointer [ SDL_Gamepad() ], Int ], Bool;
1324 _affix_and_export SDL_GetGamepadVendor => [ Pointer [ SDL_Gamepad() ] ], UInt16;
1325 _affix_and_export SDL_GetGamepadProduct => [ Pointer [ SDL_Gamepad() ] ], UInt16;
1326 _affix_and_export SDL_GetGamepadProductVersion => [ Pointer [ SDL_Gamepad() ] ], UInt16;
1327 _affix_and_export SDL_GetGamepadFirmwareVersion => [ Pointer [ SDL_Gamepad() ] ], UInt16;
1328 _affix_and_export SDL_GetGamepadSerial => [ Pointer [ SDL_Gamepad() ] ], String;
1329 _affix_and_export SDL_GetGamepadSteamHandle => [ Pointer [ SDL_Gamepad() ] ], UInt64;
1330 _affix_and_export SDL_GetGamepadConnectionState => [ Pointer [ SDL_Gamepad() ] ], SDL_JoystickConnectionState();
1331 _affix_and_export SDL_GetGamepadPowerInfo => [ Pointer [ SDL_Gamepad() ], Pointer [Int] ], SDL_PowerState();
1332 _affix_and_export SDL_GamepadConnected => [ Pointer [ SDL_Gamepad() ] ], Bool;
1333 _affix_and_export SDL_GetGamepadJoystick => [ Pointer [ SDL_Gamepad() ] ], Pointer [ SDL_Joystick() ];
1334 _affix_and_export SDL_SetGamepadEventsEnabled => [Bool], Void;
1335 _affix_and_export SDL_GamepadEventsEnabled => [], Bool;
1336 _affix_and_export
1337 SDL_GetGamepadBindings => [ Pointer [ SDL_Gamepad() ], Pointer [Int] ],
1338 Pointer [ Pointer [ SDL_GamepadBinding() ] ];
1339 _affix_and_export SDL_UpdateGamepads => [], Void;
1340 _affix_and_export SDL_GetGamepadTypeFromString => [String], SDL_GamepadType();
1341 _affix_and_export SDL_GetGamepadStringForType => [ SDL_GamepadType() ], String;
1342 _affix_and_export SDL_GetGamepadAxisFromString => [String], SDL_GamepadAxis();
1343 _affix_and_export SDL_GetGamepadStringForAxis => [ SDL_GamepadAxis() ], String;
1344 _affix_and_export SDL_GamepadHasAxis => [ Pointer [ SDL_Gamepad() ], SDL_GamepadAxis() ], Bool;
1345 _affix_and_export SDL_GetGamepadAxis => [ Pointer [ SDL_Gamepad() ], SDL_GamepadAxis() ], SInt16;
1346 _affix_and_export SDL_GetGamepadButtonFromString => [String], SDL_GamepadButton();
1347 _affix_and_export SDL_GetGamepadStringForButton => [ SDL_GamepadButton() ], String;
1348 _affix_and_export SDL_GamepadHasButton => [ Pointer [ SDL_Gamepad() ], SDL_GamepadButton() ], Bool;
1349 _affix_and_export SDL_GetGamepadButton => [ Pointer [ SDL_Gamepad() ], SDL_GamepadButton() ], Bool;
1350 _affix_and_export SDL_GetGamepadButtonLabelForType => [ SDL_GamepadType(), SDL_GamepadButton() ], SDL_GamepadButtonLabel();
1351 _affix_and_export SDL_GetGamepadButtonLabel => [ Pointer [ SDL_Gamepad() ], SDL_GamepadButton() ], SDL_GamepadButtonLabel();
1352 _affix_and_export SDL_GetNumGamepadTouchpads => [ Pointer [ SDL_Gamepad() ] ], Int;
1353 _affix_and_export SDL_GetNumGamepadTouchpadFingers => [ Pointer [ SDL_Gamepad() ], Int ], Int;
1354 _affix_and_export
1355 SDL_GetGamepadTouchpadFinger =>
1356 [ Pointer [ SDL_Gamepad() ], Int, Int, Pointer [Bool], Pointer [Float], Pointer [Float], Pointer [Float] ],
1357 Bool;
1358 _affix_and_export SDL_GamepadHasSensor => [ Pointer [ SDL_Gamepad() ], SDL_SensorType() ], Bool;
1359 _affix_and_export SDL_SetGamepadSensorEnabled => [ Pointer [ SDL_Gamepad() ], SDL_SensorType(), Bool ], Bool;
1360 _affix_and_export SDL_GamepadSensorEnabled => [ Pointer [ SDL_Gamepad() ], SDL_SensorType() ], Bool;
1361 _affix_and_export SDL_GetGamepadSensorDataRate => [ Pointer [ SDL_Gamepad() ], SDL_SensorType() ], Float;
1362 _affix_and_export SDL_GetGamepadSensorData => [ Pointer [ SDL_Gamepad() ], SDL_SensorType(), Pointer [Float], Int ], Bool;
1363 _affix_and_export SDL_RumbleGamepad => [ Pointer [ SDL_Gamepad() ], UInt16, UInt16, UInt32 ], Bool;
1364 _affix_and_export SDL_RumbleGamepadTriggers => [ Pointer [ SDL_Gamepad() ], UInt16, UInt16, UInt32 ], Bool;
1365 _affix_and_export SDL_SetGamepadLED => [ Pointer [ SDL_Gamepad() ], UInt8, UInt8, UInt8 ], Bool;
1366 _affix_and_export SDL_SendGamepadEffect => [ Pointer [ SDL_Gamepad() ], Pointer [Void], Int ], Bool;
1367 _affix_and_export SDL_CloseGamepad => [ Pointer [ SDL_Gamepad() ] ], Void;
1368 _affix_and_export SDL_GetGamepadAppleSFSymbolsNameForButton => [ Pointer [ SDL_Gamepad() ], SDL_GamepadButton() ], String;
1369 _affix_and_export SDL_GetGamepadAppleSFSymbolsNameForAxis => [ Pointer [ SDL_Gamepad() ], SDL_GamepadAxis() ], String;
1370 }
1371  
1372 =head3 C<:gpu> - 3D Rendering and GPU Compute
1373  
1374 The GPU API offers a cross-platform way for apps to talk to modern graphics hardware. It offers both 3D graphics and
1375 compute support, in the style of Metal, Vulkan, and Direct3D 12.
1376  
1377 See L<SDL3: CategoryGPU|https://wiki.libsdl.org/SDL3/CategoryGPU>
1378  
1379 =cut
1380  
1381 sub _gpu() {
1382 state $done++ && return;
1383 #
1384 _pixels();
1385 _properties();
1386 _rect();
1387 _stdinc();
1388 _surface();
1389 _video();
1390 #
1391 _typedef_and_export SDL_GPUDevice => Void;
1392 _typedef_and_export SDL_GPUBuffer => Void;
1393 _typedef_and_export SDL_GPUTransferBuffer => Void;
1394 _typedef_and_export SDL_GPUTexture => Void;
1395 _typedef_and_export SDL_GPUSampler => Void;
1396 _typedef_and_export SDL_GPUShader => Void;
1397 _typedef_and_export SDL_GPUComputePipeline => Void;
1398 _typedef_and_export SDL_GPUGraphicsPipeline => Void;
1399 _typedef_and_export SDL_GPUCommandBuffer => Void;
1400 _typedef_and_export SDL_GPURenderPass => Void;
1401 _typedef_and_export SDL_GPUComputePass => Void;
1402 _typedef_and_export SDL_GPUCopyPass => Void;
1403 _typedef_and_export SDL_GPUFence => Void;
1404 _enum_and_export SDL_GPUPrimitiveType => [
1405 'SDL_GPU_PRIMITIVETYPE_TRIANGLELIST', 'SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP',
1406 'SDL_GPU_PRIMITIVETYPE_LINELIST', 'SDL_GPU_PRIMITIVETYPE_LINESTRIP',
1407 'SDL_GPU_PRIMITIVETYPE_POINTLIST'
1408 ];
1409 _enum_and_export SDL_GPULoadOp => [ 'SDL_GPU_LOADOP_LOAD', 'SDL_GPU_LOADOP_CLEAR', 'SDL_GPU_LOADOP_DONT_CARE' ];
1410 _enum_and_export SDL_GPUStoreOp =>
1411 [ 'SDL_GPU_STOREOP_STORE', 'SDL_GPU_STOREOP_DONT_CARE', 'SDL_GPU_STOREOP_RESOLVE', 'SDL_GPU_STOREOP_RESOLVE_AND_STORE' ];
1412 _enum_and_export SDL_GPUIndexElementSize => [ 'SDL_GPU_INDEXELEMENTSIZE_16BIT', 'SDL_GPU_INDEXELEMENTSIZE_32BIT' ];
1413 _enum_and_export SDL_GPUTextureFormat => [
1414 'SDL_GPU_TEXTUREFORMAT_INVALID', 'SDL_GPU_TEXTUREFORMAT_A8_UNORM',
1415 'SDL_GPU_TEXTUREFORMAT_R8_UNORM', 'SDL_GPU_TEXTUREFORMAT_R8G8_UNORM',
1416 'SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM', 'SDL_GPU_TEXTUREFORMAT_R16_UNORM',
1417 'SDL_GPU_TEXTUREFORMAT_R16G16_UNORM', 'SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM',
1418 'SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM', 'SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM',
1419 'SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM', 'SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM',
1420 'SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM', 'SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM',
1421 'SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM', 'SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM',
1422 'SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM', 'SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM',
1423 'SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM', 'SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT',
1424 'SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT', 'SDL_GPU_TEXTUREFORMAT_R8_SNORM',
1425 'SDL_GPU_TEXTUREFORMAT_R8G8_SNORM', 'SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM',
1426 'SDL_GPU_TEXTUREFORMAT_R16_SNORM', 'SDL_GPU_TEXTUREFORMAT_R16G16_SNORM',
1427 'SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM', 'SDL_GPU_TEXTUREFORMAT_R16_FLOAT',
1428 'SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT', 'SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT',
1429 'SDL_GPU_TEXTUREFORMAT_R32_FLOAT', 'SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT',
1430 'SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT', 'SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT',
1431 'SDL_GPU_TEXTUREFORMAT_R8_UINT', 'SDL_GPU_TEXTUREFORMAT_R8G8_UINT',
1432 'SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT', 'SDL_GPU_TEXTUREFORMAT_R16_UINT',
1433 'SDL_GPU_TEXTUREFORMAT_R16G16_UINT', 'SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT',
1434 'SDL_GPU_TEXTUREFORMAT_R32_UINT', 'SDL_GPU_TEXTUREFORMAT_R32G32_UINT',
1435 'SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT', 'SDL_GPU_TEXTUREFORMAT_R8_INT',
1436 'SDL_GPU_TEXTUREFORMAT_R8G8_INT', 'SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT',
1437 'SDL_GPU_TEXTUREFORMAT_R16_INT', 'SDL_GPU_TEXTUREFORMAT_R16G16_INT',
1438 'SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT', 'SDL_GPU_TEXTUREFORMAT_R32_INT',
1439 'SDL_GPU_TEXTUREFORMAT_R32G32_INT', 'SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT',
1440 'SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB',
1441 'SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB',
1442 'SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB',
1443 'SDL_GPU_TEXTUREFORMAT_D16_UNORM', 'SDL_GPU_TEXTUREFORMAT_D24_UNORM',
1444 'SDL_GPU_TEXTUREFORMAT_D32_FLOAT', 'SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT',
1445 'SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT', 'SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM',
1446 'SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM', 'SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM',
1447 'SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM', 'SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM',
1448 'SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM', 'SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM',
1449 'SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM', 'SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM',
1450 'SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM', 'SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM',
1451 'SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM', 'SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM',
1452 'SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM', 'SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB',
1453 'SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB',
1454 'SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB',
1455 'SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB',
1456 'SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB',
1457 'SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB',
1458 'SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB',
1459 'SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB', 'SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT',
1460 'SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT', 'SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT',
1461 'SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT', 'SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT',
1462 'SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT', 'SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT',
1463 'SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT', 'SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT',
1464 'SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT', 'SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT',
1465 'SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT', 'SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT',
1466 'SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT'
1467 ];
1468 _typedef_and_export SDL_GPUTextureUsageFlags => UInt32;
1469 _const_and_export SDL_GPU_TEXTUREUSAGE_SAMPLER => ( 1 << 0 );
1470 _const_and_export SDL_GPU_TEXTUREUSAGE_COLOR_TARGET => ( 1 << 1 );
1471 _const_and_export SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET => ( 1 << 2 );
1472 _const_and_export SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ => ( 1 << 3 );
1473 _const_and_export SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ => ( 1 << 4 );
1474 _const_and_export SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE => ( 1 << 5 );
1475 _const_and_export SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE => ( 1 << 6 );
1476 _enum_and_export SDL_GPUTextureType => [
1477 'SDL_GPU_TEXTURETYPE_2D', 'SDL_GPU_TEXTURETYPE_2D_ARRAY', 'SDL_GPU_TEXTURETYPE_3D', 'SDL_GPU_TEXTURETYPE_CUBE',
1478 'SDL_GPU_TEXTURETYPE_CUBE_ARRAY'
1479 ];
1480 _enum_and_export SDL_GPUSampleCount => [ 'SDL_GPU_SAMPLECOUNT_1', 'SDL_GPU_SAMPLECOUNT_2', 'SDL_GPU_SAMPLECOUNT_4', 'SDL_GPU_SAMPLECOUNT_8' ];
1481 _enum_and_export SDL_GPUCubeMapFace => [
1482 'SDL_GPU_CUBEMAPFACE_POSITIVEX', 'SDL_GPU_CUBEMAPFACE_NEGATIVEX', 'SDL_GPU_CUBEMAPFACE_POSITIVEY', 'SDL_GPU_CUBEMAPFACE_NEGATIVEY',
1483 'SDL_GPU_CUBEMAPFACE_POSITIVEZ', 'SDL_GPU_CUBEMAPFACE_NEGATIVEZ'
1484 ];
1485 _typedef_and_export SDL_GPUBufferUsageFlags => UInt32;
1486 _const_and_export SDL_GPU_BUFFERUSAGE_VERTEX => ( 1 << 0 );
1487 _const_and_export SDL_GPU_BUFFERUSAGE_INDEX => ( 1 << 1 );
1488 _const_and_export SDL_GPU_BUFFERUSAGE_INDIRECT => ( 1 << 2 );
1489 _const_and_export SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ => ( 1 << 3 );
1490 _const_and_export SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ => ( 1 << 4 );
1491 _const_and_export SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE => ( 1 << 5 );
1492 _enum_and_export SDL_GPUTransferBufferUsage => [ 'SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD', 'SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD' ];
1493 _enum_and_export SDL_GPUShaderStage => [ 'SDL_GPU_SHADERSTAGE_VERTEX', 'SDL_GPU_SHADERSTAGE_FRAGMENT' ];
1494 _typedef_and_export SDL_GPUShaderFormat => UInt32;
1495 _const_and_export SDL_GPU_SHADERFORMAT_INVALID => 0;
1496 _const_and_export SDL_GPU_SHADERFORMAT_PRIVATE => ( 1 << 0 );
1497 _const_and_export SDL_GPU_SHADERFORMAT_SPIRV => ( 1 << 1 );
1498 _const_and_export SDL_GPU_SHADERFORMAT_DXBC => ( 1 << 2 );
1499 _const_and_export SDL_GPU_SHADERFORMAT_DXIL => ( 1 << 3 );
1500 _const_and_export SDL_GPU_SHADERFORMAT_MSL => ( 1 << 4 );
1501 _const_and_export SDL_GPU_SHADERFORMAT_METALLIB => ( 1 << 5 );
1502 _enum_and_export SDL_GPUVertexElementFormat => [
1503 'SDL_GPU_VERTEXELEMENTFORMAT_INVALID', 'SDL_GPU_VERTEXELEMENTFORMAT_INT',
1504 'SDL_GPU_VERTEXELEMENTFORMAT_INT2', 'SDL_GPU_VERTEXELEMENTFORMAT_INT3',
1505 'SDL_GPU_VERTEXELEMENTFORMAT_INT4', 'SDL_GPU_VERTEXELEMENTFORMAT_UINT',
1506 'SDL_GPU_VERTEXELEMENTFORMAT_UINT2', 'SDL_GPU_VERTEXELEMENTFORMAT_UINT3',
1507 'SDL_GPU_VERTEXELEMENTFORMAT_UINT4', 'SDL_GPU_VERTEXELEMENTFORMAT_FLOAT',
1508 'SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2', 'SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3',
1509 'SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4', 'SDL_GPU_VERTEXELEMENTFORMAT_BYTE2',
1510 'SDL_GPU_VERTEXELEMENTFORMAT_BYTE4', 'SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2',
1511 'SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4', 'SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM',
1512 'SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM', 'SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM',
1513 'SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM', 'SDL_GPU_VERTEXELEMENTFORMAT_SHORT2',
1514 'SDL_GPU_VERTEXELEMENTFORMAT_SHORT4', 'SDL_GPU_VERTEXELEMENTFORMAT_USHORT2',
1515 'SDL_GPU_VERTEXELEMENTFORMAT_USHORT4', 'SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM',
1516 'SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM', 'SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM',
1517 'SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM', 'SDL_GPU_VERTEXELEMENTFORMAT_HALF2',
1518 'SDL_GPU_VERTEXELEMENTFORMAT_HALF4'
1519 ];
1520 _enum_and_export SDL_GPUVertexInputRate => [ 'SDL_GPU_VERTEXINPUTRATE_VERTEX', 'SDL_GPU_VERTEXINPUTRATE_INSTANCE' ];
1521 _enum_and_export SDL_GPUFillMode => [ 'SDL_GPU_FILLMODE_FILL', 'SDL_GPU_FILLMODE_LINE' ];
1522 _enum_and_export SDL_GPUCullMode => [ 'SDL_GPU_CULLMODE_NONE', 'SDL_GPU_CULLMODE_FRONT', 'SDL_GPU_CULLMODE_BACK' ];
1523 _enum_and_export SDL_GPUFrontFace => [ 'SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE', 'SDL_GPU_FRONTFACE_CLOCKWISE' ];
1524 _enum_and_export SDL_GPUCompareOp => [
1525 'SDL_GPU_COMPAREOP_INVALID', 'SDL_GPU_COMPAREOP_NEVER',
1526 'SDL_GPU_COMPAREOP_LESS', 'SDL_GPU_COMPAREOP_EQUAL',
1527 'SDL_GPU_COMPAREOP_LESS_OR_EQUAL', 'SDL_GPU_COMPAREOP_GREATER',
1528 'SDL_GPU_COMPAREOP_NOT_EQUAL', 'SDL_GPU_COMPAREOP_GREATER_OR_EQUAL',
1529 'SDL_GPU_COMPAREOP_ALWAYS'
1530 ];
1531 _enum_and_export SDL_GPUStencilOp => [
1532 'SDL_GPU_STENCILOP_INVALID', 'SDL_GPU_STENCILOP_KEEP',
1533 'SDL_GPU_STENCILOP_ZERO', 'SDL_GPU_STENCILOP_REPLACE',
1534 'SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP', 'SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP',
1535 'SDL_GPU_STENCILOP_INVERT', 'SDL_GPU_STENCILOP_INCREMENT_AND_WRAP',
1536 'SDL_GPU_STENCILOP_DECREMENT_AND_WRAP'
1537 ];
1538 _enum_and_export SDL_GPUBlendOp => [
1539 'SDL_GPU_BLENDOP_INVALID', 'SDL_GPU_BLENDOP_ADD', 'SDL_GPU_BLENDOP_SUBTRACT', 'SDL_GPU_BLENDOP_REVERSE_SUBTRACT',
1540 'SDL_GPU_BLENDOP_MIN', 'SDL_GPU_BLENDOP_MAX'
1541 ];
1542 _enum_and_export SDL_GPUBlendFactor => [
1543 'SDL_GPU_BLENDFACTOR_INVALID', 'SDL_GPU_BLENDFACTOR_ZERO',
1544 'SDL_GPU_BLENDFACTOR_ONE', 'SDL_GPU_BLENDFACTOR_SRC_COLOR',
1545 'SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR', 'SDL_GPU_BLENDFACTOR_DST_COLOR',
1546 'SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR', 'SDL_GPU_BLENDFACTOR_SRC_ALPHA',
1547 'SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA', 'SDL_GPU_BLENDFACTOR_DST_ALPHA',
1548 'SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA', 'SDL_GPU_BLENDFACTOR_CONSTANT_COLOR',
1549 'SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR', 'SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE'
1550 ];
1551 _typedef_and_export SDL_GPUColorComponentFlags => UInt8;
1552 _const_and_export SDL_GPU_COLORCOMPONENT_R => ( 1 << 0 );
1553 _const_and_export SDL_GPU_COLORCOMPONENT_G => ( 1 << 1 );
1554 _const_and_export SDL_GPU_COLORCOMPONENT_B => ( 1 << 2 );
1555 _const_and_export SDL_GPU_COLORCOMPONENT_A => ( 1 << 3 );
1556 _enum_and_export SDL_GPUFilter => [ 'SDL_GPU_FILTER_NEAREST', 'SDL_GPU_FILTER_LINEAR' ];
1557 _enum_and_export SDL_GPUSamplerMipmapMode => [ 'SDL_GPU_SAMPLERMIPMAPMODE_NEAREST', 'SDL_GPU_SAMPLERMIPMAPMODE_LINEAR' ];
1558 _enum_and_export SDL_GPUSamplerAddressMode =>
1559 [ 'SDL_GPU_SAMPLERADDRESSMODE_REPEAT', 'SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT', 'SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE' ];
1560 _enum_and_export SDL_GPUPresentMode => [ 'SDL_GPU_PRESENTMODE_VSYNC', 'SDL_GPU_PRESENTMODE_IMMEDIATE', 'SDL_GPU_PRESENTMODE_MAILBOX' ];
1561 _enum_and_export SDL_GPUSwapchainComposition => [
1562 'SDL_GPU_SWAPCHAINCOMPOSITION_SDR', 'SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR',
1563 'SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR', 'SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084'
1564 ];
1565 _typedef_and_export SDL_GPUViewport => Struct [ x => Float, y => Float, w => Float, h => Float, min_depth => Float, max_depth => Float ];
1566 _typedef_and_export SDL_GPUTextureTransferInfo =>
1567 Struct [ transfer_buffer => Pointer [ SDL_GPUTransferBuffer() ], offset => UInt32, pixels_per_row => UInt32, rows_per_layer => UInt32 ];
1568 _typedef_and_export SDL_GPUTransferBufferLocation => Struct [ transfer_buffer => Pointer [ SDL_GPUTransferBuffer() ], offset => UInt32 ];
1569 _typedef_and_export SDL_GPUTextureLocation =>
1570 Struct [ texture => Pointer [ SDL_GPUTexture() ], mip_level => UInt32, layer => UInt32, x => UInt32, y => UInt32, z => UInt32 ];
1571 _typedef_and_export SDL_GPUTextureRegion => Struct [
1572 texture => Pointer [ SDL_GPUTexture() ],
1573 mip_level => UInt32,
1574 layer => UInt32,
1575 x => UInt32,
1576 y => UInt32,
1577 z => UInt32,
1578 w => UInt32,
1579 h => UInt32,
1580 d => UInt32
1581 ];
1582 _typedef_and_export SDL_GPUBlitRegion => Struct [
1583 texture => Pointer [ SDL_GPUTexture() ],
1584 mip_level => UInt32,
1585 layer_or_depth_plane => UInt32,
1586 x => UInt32,
1587 y => UInt32,
1588 w => UInt32,
1589 h => UInt32
1590 ];
1591 _typedef_and_export SDL_GPUBufferLocation => Struct [ buffer => Pointer [ SDL_GPUBuffer() ], offset => UInt32 ];
1592 _typedef_and_export SDL_GPUBufferRegion => Struct [ buffer => Pointer [ SDL_GPUBuffer() ], offset => UInt32, size => UInt32 ];
1593 _typedef_and_export SDL_GPUIndirectDrawCommand =>
1594 Struct [ num_vertices => UInt32, num_instances => UInt32, first_vertex => UInt32, first_instance => UInt32 ];
1595 _typedef_and_export SDL_GPUIndexedIndirectDrawCommand =>
1596 Struct [ num_indices => UInt32, num_instances => UInt32, first_index => UInt32, vertex_offset => SInt32, first_instance => UInt32 ];
1597 _typedef_and_export SDL_GPUIndirectDispatchCommand => Struct [ groupcount_x => UInt32, groupcount_y => UInt32, groupcount_z => UInt32 ];
1598 _typedef_and_export SDL_GPUSamplerCreateInfo => Struct [
1599 min_filter => SDL_GPUFilter(),
1600 mag_filter => SDL_GPUFilter(),
1601 mipmap_mode => SDL_GPUSamplerMipmapMode(),
1602 address_mode_u => SDL_GPUSamplerAddressMode(),
1603 address_mode_v => SDL_GPUSamplerAddressMode(),
1604 address_mode_w => SDL_GPUSamplerAddressMode(),
1605 mip_lod_bias => Float,
1606 max_anisotropy => Float,
1607 compare_op => SDL_GPUCompareOp(),
1608 min_lod => Float,
1609 max_lod => Float,
1610 enable_anisotropy => Bool,
1611 enable_compare => Bool,
1612 padding1 => UInt8,
1613 padding2 => UInt8,
1614 props => SDL_PropertiesID()
1615 ];
1616 _typedef_and_export SDL_GPUVertexBufferDescription =>
1617 Struct [ slot => UInt32, pitch => UInt32, input_rate => SDL_GPUVertexInputRate(), instance_step_rate => UInt32 ];
1618 _typedef_and_export SDL_GPUVertexAttribute =>
1619 Struct [ location => UInt32, buffer_slot => UInt32, format => SDL_GPUVertexElementFormat(), offset => UInt32 ];
1620 _typedef_and_export SDL_GPUVertexInputState => Struct [
1621 vertex_buffer_descriptions => Pointer [ SDL_GPUVertexBufferDescription() ],
1622 num_vertex_buffers => UInt32,
1623 vertex_attributes => Pointer [ SDL_GPUVertexAttribute() ],
1624 num_vertex_attributes => UInt32
1625 ];
1626 _typedef_and_export SDL_GPUStencilOpState => Struct [
1627 fail_op => SDL_GPUStencilOp(),
1628 pass_op => SDL_GPUStencilOp(),
1629 depth_fail_op => SDL_GPUStencilOp(),
1630 compare_op => SDL_GPUCompareOp()
1631 ];
1632 _typedef_and_export SDL_GPUColorTargetBlendState => Struct [
1633 src_color_blendfactor => SDL_GPUBlendFactor(),
1634 dst_color_blendfactor => SDL_GPUBlendFactor(),
1635 color_blend_op => SDL_GPUBlendOp(),
1636 src_alpha_blendfactor => SDL_GPUBlendFactor(),
1637 dst_alpha_blendfactor => SDL_GPUBlendFactor(),
1638 alpha_blend_op => SDL_GPUBlendOp(),
1639 color_write_mask => SDL_GPUColorComponentFlags(),
1640 enable_blend => Bool,
1641 enable_color_write_mask => Bool,
1642 padding1 => UInt8,
1643 padding2 => UInt8
1644 ];
1645 _typedef_and_export SDL_GPUShaderCreateInfo => Struct [
1646 code_size => Size_t,
1647 code => Pointer [UInt8],
1648 entrypoint => String,
1649 format => SDL_GPUShaderFormat(),
1650 stage => SDL_GPUShaderStage(),
1651 num_samplers => UInt32,
1652 num_storage_textures => UInt32,
1653 num_storage_buffers => UInt32,
1654 num_uniform_buffers => UInt32,
1655 props => SDL_PropertiesID()
1656 ];
1657 _typedef_and_export SDL_GPUTextureCreateInfo => Struct [
1658 type => SDL_GPUTextureType(),
1659 format => SDL_GPUTextureFormat(),
1660 usage => SDL_GPUTextureUsageFlags(),
1661 width => UInt32,
1662 height => UInt32,
1663 layer_count_or_depth => UInt32,
1664 num_levels => UInt32,
1665 sample_count => SDL_GPUSampleCount(),
1666 props => SDL_PropertiesID()
1667 ];
1668 _typedef_and_export SDL_GPUBufferCreateInfo => Struct [ usage => SDL_GPUBufferUsageFlags(), size => UInt32, props => SDL_PropertiesID() ];
1669 _typedef_and_export SDL_GPUTransferBufferCreateInfo =>
1670 Struct [ usage => SDL_GPUTransferBufferUsage(), size => UInt32, props => SDL_PropertiesID() ];
1671 _typedef_and_export SDL_GPURasterizerState => Struct [
1672 fill_mode => SDL_GPUFillMode(),
1673 cull_mode => SDL_GPUCullMode(),
1674 front_face => SDL_GPUFrontFace(),
1675 depth_bias_constant_factor => Float,
1676 depth_bias_clamp => Float,
1677 depth_bias_slope_factor => Float,
1678 enable_depth_bias => Bool,
1679 enable_depth_clip => Bool,
1680 padding1 => UInt8,
1681 padding2 => UInt8
1682 ];
1683 _typedef_and_export SDL_GPUMultisampleState => Struct [
1684 sample_count => SDL_GPUSampleCount(),
1685 sample_mask => UInt32,
1686 enable_mask => Bool,
1687 enable_alpha_to_coverage => Bool,
1688 padding2 => UInt8,
1689 padding3 => UInt8
1690 ];
1691 _typedef_and_export SDL_GPUDepthStencilState => Struct [
1692 compare_op => SDL_GPUCompareOp(),
1693 back_stencil_state => SDL_GPUStencilOpState(),
1694 front_stencil_state => SDL_GPUStencilOpState(),
1695 compare_mask => UInt8,
1696 write_mask => UInt8,
1697 enable_depth_test => Bool,
1698 enable_depth_write => Bool,
1699 enable_stencil_test => Bool,
1700 padding1 => UInt8,
1701 padding2 => UInt8,
1702 padding3 => UInt8
1703 ];
1704 _typedef_and_export SDL_GPUColorTargetDescription =>
1705 Struct [ format => SDL_GPUTextureFormat(), blend_state => SDL_GPUColorTargetBlendState() ];
1706 _typedef_and_export SDL_GPUGraphicsPipelineTargetInfo => Struct [
1707 color_target_descriptions => Pointer [ SDL_GPUColorTargetDescription() ],
1708 num_color_targets => UInt32,
1709 depth_stencil_format => SDL_GPUTextureFormat(),
1710 has_depth_stencil_target => Bool,
1711 padding1 => UInt8,
1712 padding2 => UInt8,
1713 padding3 => UInt8
1714 ];
1715 _typedef_and_export SDL_GPUGraphicsPipelineCreateInfo => Struct [
1716 vertex_shader => Pointer [ SDL_GPUShader() ],
1717 fragment_shader => Pointer [ SDL_GPUShader() ],
1718 vertex_input_state => SDL_GPUVertexInputState(),
1719 primitive_type => SDL_GPUPrimitiveType(),
1720 rasterizer_state => SDL_GPURasterizerState(),
1721 multisample_state => SDL_GPUMultisampleState(),
1722 depth_stencil_state => SDL_GPUDepthStencilState(),
1723 target_info => SDL_GPUGraphicsPipelineTargetInfo(),
1724 props => SDL_PropertiesID()
1725 ];
1726 _typedef_and_export SDL_GPUComputePipelineCreateInfo => Struct [
1727 code_size => Size_t,
1728 code => Pointer [UInt8],
1729 entrypoint => String,
1730 format => SDL_GPUShaderFormat(),
1731 num_samplers => UInt32,
1732 num_readonly_storage_textures => UInt32,
1733 num_readonly_storage_buffers => UInt32,
1734 num_readwrite_storage_textures => UInt32,
1735 num_readwrite_storage_buffers => UInt32,
1736 num_uniform_buffers => UInt32,
1737 threadcount_x => UInt32,
1738 threadcount_y => UInt32,
1739 threadcount_z => UInt32,
1740 props => SDL_PropertiesID()
1741 ];
1742 _typedef_and_export SDL_GPUColorTargetInfo => Struct [
1743 texture => Pointer [ SDL_GPUTexture() ],
1744 mip_level => UInt32,
1745 layer_or_depth_plane => UInt32,
1746 clear_color => SDL_FColor(),
1747 load_op => SDL_GPULoadOp(),
1748 store_op => SDL_GPUStoreOp(),
1749 resolve_texture => Pointer [ SDL_GPUTexture() ],
1750 resolve_mip_level => UInt32,
1751 resolve_layer => UInt32,
1752 cycle => Bool,
1753 cycle_resolve_texture => Bool,
1754 padding1 => UInt8,
1755 padding2 => UInt8
1756 ];
1757 _typedef_and_export SDL_GPUDepthStencilTargetInfo => Struct [
1758 texture => Pointer [ SDL_GPUTexture() ],
1759 clear_depth => Float,
1760 load_op => SDL_GPULoadOp(),
1761 store_op => SDL_GPUStoreOp(),
1762 stencil_load_op => SDL_GPULoadOp(),
1763 stencil_store_op => SDL_GPUStoreOp(),
1764 cycle => Bool,
1765 clear_stencil => UInt8,
1766 mip_level => UInt8,
1767 layer => UInt8
1768 ];
1769 _typedef_and_export SDL_GPUBlitInfo => Struct [
1770 source => SDL_GPUBlitRegion(),
1771 destination => SDL_GPUBlitRegion(),
1772 load_op => SDL_GPULoadOp(),
1773 clear_color => SDL_FColor(),
1774 flip_mode => SDL_FlipMode(),
1775 filter => SDL_GPUFilter(),
1776 cycle => Bool,
1777 padding1 => UInt8,
1778 padding2 => UInt8,
1779 padding3 => UInt8
1780 ];
1781 _typedef_and_export SDL_GPUBufferBinding => Struct [ buffer => Pointer [ SDL_GPUBuffer() ], offset => UInt32 ];
1782 _typedef_and_export SDL_GPUTextureSamplerBinding =>
1783 Struct [ texture => Pointer [ SDL_GPUTexture() ], sampler => Pointer [ SDL_GPUSampler() ] ];
1784 _typedef_and_export SDL_GPUStorageBufferReadWriteBinding =>
1785 Struct [ buffer => Pointer [ SDL_GPUBuffer() ], cycle => Bool, padding1 => UInt8, padding2 => UInt8, padding3 => UInt8 ];
1786 _typedef_and_export SDL_GPUStorageTextureReadWriteBinding => Struct [
1787 texture => Pointer [ SDL_GPUTexture() ],
1788 mip_level => UInt32,
1789 layer => UInt32,
1790 cycle => Bool,
1791 padding1 => UInt8,
1792 padding2 => UInt8,
1793 padding3 => UInt8
1794 ];
1795 _affix_and_export SDL_GPUSupportsShaderFormats => [ SDL_GPUShaderFormat(), String ], Bool;
1796 _affix_and_export SDL_GPUSupportsProperties => [ SDL_PropertiesID() ], Bool;
1797 _affix_and_export SDL_CreateGPUDevice => [ SDL_GPUShaderFormat(), Bool, String ], Pointer [ SDL_GPUDevice() ];
1798 _affix_and_export SDL_CreateGPUDeviceWithProperties => [ SDL_PropertiesID() ], Pointer [ SDL_GPUDevice() ];
1799 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN => 'SDL.gpu.device.create.debugmode';
1800 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN => 'SDL.gpu.device.create.preferlowpower';
1801 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_VERBOSE_BOOLEAN => 'SDL.gpu.device.create.verbose';
1802 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING => 'SDL.gpu.device.create.name';
1803 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_FEATURE_CLIP_DISTANCE_BOOLEAN => 'SDL.gpu.device.create.feature.clip_distance';
1804 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN => 'SDL.gpu.device.create.feature.depth_clamping';
1805 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_FEATURE_INDIRECT_DRAW_FIRST_INSTANCE_BOOLEAN =>
1806 'SDL.gpu.device.create.feature.indirect_draw_first_instance';
1807 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN => 'SDL.gpu.device.create.feature.anisotropy';
1808 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN => 'SDL.gpu.device.create.shaders.private';
1809 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN => 'SDL.gpu.device.create.shaders.spirv';
1810 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN => 'SDL.gpu.device.create.shaders.dxbc';
1811 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN => 'SDL.gpu.device.create.shaders.dxil';
1812 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN => 'SDL.gpu.device.create.shaders.msl';
1813 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN => 'SDL.gpu.device.create.shaders.metallib';
1814 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN =>
1815 'SDL.gpu.device.create.d3d12.allowtier1resourcebinding';
1816 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING => 'SDL.gpu.device.create.d3d12.semantic';
1817 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN =>
1818 'SDL.gpu.device.create.vulkan.requirehardwareacceleration';
1819 _const_and_export SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER => 'SDL.gpu.device.create.vulkan.options';
1820 _typedef_and_export SDL_GPUVulkanOptions => Struct [
1821 vulkan_api_version => UInt32,
1822 feature_list => Pointer [Void],
1823 vulkan_10_physical_device_features => Pointer [Void],
1824 device_extension_count => UInt32,
1825 device_extension_names => Pointer [String],
1826 instance_extension_count => UInt32,
1827 instance_extension_names => Pointer [String]
1828 ];
1829 _affix_and_export SDL_DestroyGPUDevice => [ Pointer [ SDL_GPUDevice() ] ], Void;
1830 _affix_and_export SDL_GetNumGPUDrivers => [], Int;
1831 _affix_and_export SDL_GetGPUDriver => [Int], String;
1832 _affix_and_export SDL_GetGPUDeviceDriver => [ Pointer [ SDL_GPUDevice() ] ], String;
1833 _affix_and_export SDL_GetGPUShaderFormats => [ Pointer [ SDL_GPUDevice() ] ], SDL_GPUShaderFormat();
1834  
1835 #~ _affix_and_export SDL_GetGPUDeviceProperties => [ Pointer [ SDL_GPUDevice() ] ], SDL_PropertiesID();
1836 _const_and_export SDL_PROP_GPU_DEVICE_NAME_STRING => 'SDL.gpu.device.name';
1837 _const_and_export SDL_PROP_GPU_DEVICE_DRIVER_NAME_STRING => 'SDL.gpu.device.driver_name';
1838 _const_and_export SDL_PROP_GPU_DEVICE_DRIVER_VERSION_STRING => 'SDL.gpu.device.driver_version';
1839 _const_and_export SDL_PROP_GPU_DEVICE_DRIVER_INFO_STRING => 'SDL.gpu.device.driver_info';
1840 _affix_and_export
1841 SDL_CreateGPUComputePipeline => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUComputePipelineCreateInfo() ] ],
1842 Pointer [ SDL_GPUComputePipeline() ];
1843 _const_and_export SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING => 'SDL.gpu.computepipeline.create.name';
1844 _affix_and_export
1845 SDL_CreateGPUGraphicsPipeline => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUGraphicsPipelineCreateInfo() ] ],
1846 Pointer [ SDL_GPUGraphicsPipeline() ];
1847 _const_and_export SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING => 'SDL.gpu.graphicspipeline.create.name';
1848 _affix_and_export
1849 SDL_CreateGPUSampler => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUSamplerCreateInfo() ] ],
1850 Pointer [ SDL_GPUSampler() ];
1851 _const_and_export SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING => 'SDL.gpu.sampler.create.name';
1852 _affix_and_export SDL_CreateGPUShader => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUShaderCreateInfo() ] ], Pointer [ SDL_GPUShader() ];
1853 _const_and_export SDL_PROP_GPU_SHADER_CREATE_NAME_STRING => 'SDL.gpu.shader.create.name';
1854 _affix_and_export
1855 SDL_CreateGPUTexture => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUTextureCreateInfo() ] ],
1856 Pointer [ SDL_GPUTexture() ];
1857 _const_and_export SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT => 'SDL.gpu.texture.create.d3d12.clear.r';
1858 _const_and_export SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT => 'SDL.gpu.texture.create.d3d12.clear.g';
1859 _const_and_export SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT => 'SDL.gpu.texture.create.d3d12.clear.b';
1860 _const_and_export SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT => 'SDL.gpu.texture.create.d3d12.clear.a';
1861 _const_and_export SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT => 'SDL.gpu.texture.create.d3d12.clear.depth';
1862 _const_and_export SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER => 'SDL.gpu.texture.create.d3d12.clear.stencil';
1863 _const_and_export SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING => 'SDL.gpu.texture.create.name';
1864 _affix_and_export SDL_CreateGPUBuffer => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUBufferCreateInfo() ] ], Pointer [ SDL_GPUBuffer() ];
1865 _const_and_export SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING => 'SDL.gpu.buffer.create.name';
1866 _affix_and_export
1867 SDL_CreateGPUTransferBuffer => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUTransferBufferCreateInfo() ] ],
1868 Pointer [ SDL_GPUTransferBuffer() ];
1869 _const_and_export SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING => 'SDL.gpu.transferbuffer.create.name';
1870 _affix_and_export SDL_SetGPUBufferName => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUBuffer() ], String ], Void;
1871 _affix_and_export SDL_SetGPUTextureName => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUTexture() ], String ], Void;
1872 _affix_and_export SDL_InsertGPUDebugLabel => [ Pointer [ SDL_GPUCommandBuffer() ], String ], Void;
1873 _affix_and_export SDL_PushGPUDebugGroup => [ Pointer [ SDL_GPUCommandBuffer() ], String ], Void;
1874 _affix_and_export SDL_PopGPUDebugGroup => [ Pointer [ SDL_GPUCommandBuffer() ] ], Void;
1875 _affix_and_export SDL_ReleaseGPUTexture => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUTexture() ] ], Void;
1876 _affix_and_export SDL_ReleaseGPUSampler => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUSampler() ] ], Void;
1877 _affix_and_export SDL_ReleaseGPUBuffer => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUBuffer() ] ], Void;
1878 _affix_and_export
1879 SDL_ReleaseGPUTransferBuffer => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUTransferBuffer() ] ],
1880 Void;
1881 _affix_and_export
1882 SDL_ReleaseGPUComputePipeline => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUComputePipeline() ] ],
1883 Void;
1884 _affix_and_export SDL_ReleaseGPUShader => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUShader() ] ], Void;
1885 _affix_and_export
1886 SDL_ReleaseGPUGraphicsPipeline => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUGraphicsPipeline() ] ],
1887 Void;
1888 _affix_and_export SDL_AcquireGPUCommandBuffer => [ Pointer [ SDL_GPUDevice() ] ], Pointer [ SDL_GPUCommandBuffer() ];
1889 _affix_and_export
1890 SDL_PushGPUVertexUniformData => [ Pointer [ SDL_GPUCommandBuffer() ], UInt32, Pointer [Void], UInt32 ],
1891 Void;
1892 _affix_and_export
1893 SDL_PushGPUFragmentUniformData => [ Pointer [ SDL_GPUCommandBuffer() ], UInt32, Pointer [Void], UInt32 ],
1894 Void;
1895 _affix_and_export
1896 SDL_PushGPUComputeUniformData => [ Pointer [ SDL_GPUCommandBuffer() ], UInt32, Pointer [Void], UInt32 ],
1897 Void;
1898 _affix_and_export
1899 SDL_BeginGPURenderPass =>
1900 [ Pointer [ SDL_GPUCommandBuffer() ], Pointer [ SDL_GPUColorTargetInfo() ], UInt32, Pointer [ SDL_GPUDepthStencilTargetInfo() ] ],
1901 Pointer [ SDL_GPURenderPass() ];
1902 _affix_and_export
1903 SDL_BindGPUGraphicsPipeline => [ Pointer [ SDL_GPURenderPass() ], Pointer [ SDL_GPUGraphicsPipeline() ] ],
1904 Void;
1905 _affix_and_export SDL_SetGPUViewport => [ Pointer [ SDL_GPURenderPass() ], Pointer [ SDL_GPUViewport() ] ], Void;
1906 _affix_and_export SDL_SetGPUScissor => [ Pointer [ SDL_GPURenderPass() ], Pointer [ SDL_Rect() ] ], Void;
1907 _affix_and_export SDL_SetGPUBlendConstants => [ Pointer [ SDL_GPURenderPass() ], SDL_FColor() ], Void;
1908 _affix_and_export SDL_SetGPUStencilReference => [ Pointer [ SDL_GPURenderPass() ], UInt8 ], Void;
1909 _affix_and_export
1910 SDL_BindGPUVertexBuffers => [ Pointer [ SDL_GPURenderPass() ], UInt32, Pointer [ SDL_GPUBufferBinding() ], UInt32 ],
1911 Void;
1912 _affix_and_export
1913 SDL_BindGPUIndexBuffer => [ Pointer [ SDL_GPURenderPass() ], Pointer [ SDL_GPUBufferBinding() ], SDL_GPUIndexElementSize() ],
1914 Void;
1915 _affix_and_export
1916 SDL_BindGPUVertexSamplers => [ Pointer [ SDL_GPURenderPass() ], UInt32, Pointer [ SDL_GPUTextureSamplerBinding() ], UInt32 ],
1917 Void;
1918 _affix_and_export
1919 SDL_BindGPUVertexStorageTextures => [ Pointer [ SDL_GPURenderPass() ], UInt32, Pointer [ Pointer [ SDL_GPUTexture() ] ], UInt32 ],
1920 Void;
1921 _affix_and_export
1922 SDL_BindGPUVertexStorageBuffers => [ Pointer [ SDL_GPURenderPass() ], UInt32, Pointer [ Pointer [ SDL_GPUBuffer() ] ], UInt32 ],
1923 Void;
1924 _affix_and_export
1925 SDL_BindGPUFragmentSamplers => [ Pointer [ SDL_GPURenderPass() ], UInt32, Pointer [ SDL_GPUTextureSamplerBinding() ], UInt32 ],
1926 Void;
1927 _affix_and_export
1928 SDL_BindGPUFragmentStorageTextures => [ Pointer [ SDL_GPURenderPass() ], UInt32, Pointer [ Pointer [ SDL_GPUTexture() ] ], UInt32 ],
1929 Void;
1930 _affix_and_export
1931 SDL_BindGPUFragmentStorageBuffers => [ Pointer [ SDL_GPURenderPass() ], UInt32, Pointer [ Pointer [ SDL_GPUBuffer() ] ], UInt32 ],
1932 Void;
1933 _affix_and_export
1934 SDL_DrawGPUIndexedPrimitives => [ Pointer [ SDL_GPURenderPass() ], UInt32, UInt32, UInt32, SInt32, UInt32 ],
1935 Void;
1936 _affix_and_export
1937 SDL_DrawGPUPrimitives => [ Pointer [ SDL_GPURenderPass() ], UInt32, UInt32, UInt32, UInt32 ],
1938 Void;
1939 _affix_and_export
1940 SDL_DrawGPUPrimitivesIndirect => [ Pointer [ SDL_GPURenderPass() ], Pointer [ SDL_GPUBuffer() ], UInt32, UInt32 ],
1941 Void;
1942 _affix_and_export
1943 SDL_DrawGPUIndexedPrimitivesIndirect => [ Pointer [ SDL_GPURenderPass() ], Pointer [ SDL_GPUBuffer() ], UInt32, UInt32 ],
1944 Void;
1945 _affix_and_export SDL_EndGPURenderPass => [ Pointer [ SDL_GPURenderPass() ] ], Void;
1946 _affix_and_export
1947 SDL_BeginGPUComputePass => [
1948 Pointer [ SDL_GPUCommandBuffer() ],
1949 Pointer [ SDL_GPUStorageTextureReadWriteBinding() ],
1950 UInt32, Pointer [ SDL_GPUStorageBufferReadWriteBinding() ], UInt32
1951 ],
1952 Pointer [ SDL_GPUComputePass() ];
1953 _affix_and_export
1954 SDL_BindGPUComputePipeline => [ Pointer [ SDL_GPUComputePass() ], Pointer [ SDL_GPUComputePipeline() ] ],
1955 Void;
1956 _affix_and_export
1957 SDL_BindGPUComputeSamplers => [ Pointer [ SDL_GPUComputePass() ], UInt32, Pointer [ SDL_GPUTextureSamplerBinding() ], UInt32 ],
1958 Void;
1959 _affix_and_export
1960 SDL_BindGPUComputeStorageTextures => [ Pointer [ SDL_GPUComputePass() ], UInt32, Pointer [ Pointer [ SDL_GPUTexture() ] ], UInt32 ],
1961 Void;
1962 _affix_and_export
1963 SDL_BindGPUComputeStorageBuffers => [ Pointer [ SDL_GPUComputePass() ], UInt32, Pointer [ Pointer [ SDL_GPUBuffer() ] ], UInt32 ],
1964 Void;
1965 _affix_and_export SDL_DispatchGPUCompute => [ Pointer [ SDL_GPUComputePass() ], UInt32, UInt32, UInt32 ], Void;
1966 _affix_and_export
1967 SDL_DispatchGPUComputeIndirect => [ Pointer [ SDL_GPUComputePass() ], Pointer [ SDL_GPUBuffer() ], UInt32 ],
1968 Void;
1969 _affix_and_export SDL_EndGPUComputePass => [ Pointer [ SDL_GPUComputePass() ] ], Void;
1970 _affix_and_export
1971 SDL_MapGPUTransferBuffer => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUTransferBuffer() ], Bool ],
1972 Pointer [Void];
1973 _affix_and_export SDL_UnmapGPUTransferBuffer => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUTransferBuffer() ] ], Void;
1974 _affix_and_export SDL_BeginGPUCopyPass => [ Pointer [ SDL_GPUCommandBuffer() ] ], Pointer [ SDL_GPUCopyPass() ];
1975 _affix_and_export
1976 SDL_UploadToGPUTexture =>
1977 [ Pointer [ SDL_GPUCopyPass() ], Pointer [ SDL_GPUTextureTransferInfo() ], Pointer [ SDL_GPUTextureRegion() ], Bool ],
1978 Void;
1979 _affix_and_export
1980 SDL_UploadToGPUBuffer =>
1981 [ Pointer [ SDL_GPUCopyPass() ], Pointer [ SDL_GPUTransferBufferLocation() ], Pointer [ SDL_GPUBufferRegion() ], Bool ],
1982 Void;
1983 _affix_and_export
1984 SDL_CopyGPUTextureToTexture => [
1985 Pointer [ SDL_GPUCopyPass() ],
1986 Pointer [ SDL_GPUTextureLocation() ],
1987 Pointer [ SDL_GPUTextureLocation() ],
1988 UInt32, UInt32, UInt32, Bool
1989 ],
1990 Void;
1991 _affix_and_export
1992 SDL_CopyGPUBufferToBuffer =>
1993 [ Pointer [ SDL_GPUCopyPass() ], Pointer [ SDL_GPUBufferLocation() ], Pointer [ SDL_GPUBufferLocation() ], UInt32, Bool ],
1994 Void;
1995 _affix_and_export
1996 SDL_DownloadFromGPUTexture =>
1997 [ Pointer [ SDL_GPUCopyPass() ], Pointer [ SDL_GPUTextureRegion() ], Pointer [ SDL_GPUTextureTransferInfo() ] ],
1998 Void;
1999 _affix_and_export
2000 SDL_DownloadFromGPUBuffer =>
2001 [ Pointer [ SDL_GPUCopyPass() ], Pointer [ SDL_GPUBufferRegion() ], Pointer [ SDL_GPUTransferBufferLocation() ] ],
2002 Void;
2003 _affix_and_export SDL_EndGPUCopyPass => [ Pointer [ SDL_GPUCopyPass() ] ], Void;
2004 _affix_and_export
2005 SDL_GenerateMipmapsForGPUTexture => [ Pointer [ SDL_GPUCommandBuffer() ], Pointer [ SDL_GPUTexture() ] ],
2006 Void;
2007 _affix_and_export SDL_BlitGPUTexture => [ Pointer [ SDL_GPUCommandBuffer() ], Pointer [ SDL_GPUBlitInfo() ] ], Void;
2008 _affix_and_export
2009 SDL_WindowSupportsGPUSwapchainComposition => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ], SDL_GPUSwapchainComposition() ],
2010 Bool;
2011 _affix_and_export
2012 SDL_WindowSupportsGPUPresentMode => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ], SDL_GPUPresentMode() ],
2013 Bool;
2014 _affix_and_export SDL_ClaimWindowForGPUDevice => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ] ], Bool;
2015 _affix_and_export SDL_ReleaseWindowFromGPUDevice => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ] ], Void;
2016 _affix_and_export
2017 SDL_SetGPUSwapchainParameters =>
2018 [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ], SDL_GPUSwapchainComposition(), SDL_GPUPresentMode() ],
2019 Bool;
2020 _affix_and_export SDL_SetGPUAllowedFramesInFlight => [ Pointer [ SDL_GPUDevice() ], UInt32 ], Bool;
2021 _affix_and_export
2022 SDL_GetGPUSwapchainTextureFormat => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ] ],
2023 SDL_GPUTextureFormat();
2024 _affix_and_export
2025 SDL_AcquireGPUSwapchainTexture => [
2026 Pointer [ SDL_GPUCommandBuffer() ],
2027 Pointer [ SDL_Window() ],
2028 Pointer [ Pointer [ SDL_GPUTexture() ] ],
2029 Pointer [UInt32],
2030 Pointer [UInt32]
2031 ],
2032 Bool;
2033 _affix_and_export SDL_WaitForGPUSwapchain => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ] ], Bool;
2034 _affix_and_export
2035 SDL_WaitAndAcquireGPUSwapchainTexture => [
2036 Pointer [ SDL_GPUCommandBuffer() ],
2037 Pointer [ SDL_Window() ],
2038 Pointer [ Pointer [ SDL_GPUTexture() ] ],
2039 Pointer [UInt32],
2040 Pointer [UInt32]
2041 ],
2042 Bool;
2043 _affix_and_export SDL_SubmitGPUCommandBuffer => [ Pointer [ SDL_GPUCommandBuffer() ] ], Bool;
2044 _affix_and_export SDL_SubmitGPUCommandBufferAndAcquireFence => [ Pointer [ SDL_GPUCommandBuffer() ] ], Pointer [ SDL_GPUFence() ];
2045 _affix_and_export SDL_CancelGPUCommandBuffer => [ Pointer [ SDL_GPUCommandBuffer() ] ], Bool;
2046 _affix_and_export SDL_WaitForGPUIdle => [ Pointer [ SDL_GPUDevice() ] ], Bool;
2047 _affix_and_export
2048 SDL_WaitForGPUFences => [ Pointer [ SDL_GPUDevice() ], Bool, Pointer [ Pointer [ SDL_GPUFence() ] ], UInt32 ],
2049 Bool;
2050 _affix_and_export SDL_QueryGPUFence => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUFence() ] ], Bool;
2051 _affix_and_export SDL_ReleaseGPUFence => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_GPUFence() ] ], Void;
2052 _affix_and_export SDL_GPUTextureFormatTexelBlockSize => [ SDL_GPUTextureFormat() ], UInt32;
2053 _affix_and_export
2054 SDL_GPUTextureSupportsFormat => [ Pointer [ SDL_GPUDevice() ], SDL_GPUTextureFormat(), SDL_GPUTextureType(), SDL_GPUTextureUsageFlags() ],
2055 Bool;
2056 _affix_and_export
2057 SDL_GPUTextureSupportsSampleCount => [ Pointer [ SDL_GPUDevice() ], SDL_GPUTextureFormat(), SDL_GPUSampleCount() ],
2058 Bool;
2059 _affix_and_export
2060 SDL_CalculateGPUTextureFormatSize => [ SDL_GPUTextureFormat(), UInt32, UInt32, UInt32 ],
2061 UInt32;
2062  
2063 #~ _affix_and_export SDL_GetPixelFormatFromGPUTextureFormat => [ SDL_GPUTextureFormat() ], SDL_PixelFormat();
2064 #~ _affix_and_export SDL_GetGPUTextureFormatFromPixelFormat => [ SDL_PixelFormat() ], SDL_GPUTextureFormat();
2065 }
2066  
2067 =head3 C<:guid> - GUIDs
2068  
2069 A GUID is a 128-bit value that represents something that is uniquely identifiable by this value: "globally unique."
2070  
2071 SDL provides functions to convert a GUID to/from a string.
2072  
2073 See L<SDL3: CategoryGUID|https://wiki.libsdl.org/SDL3/CategoryGUID>
2074  
2075 =cut
2076  
2077 sub _guid() {
2078 state $done++ && return;
2079 #
2080 _stdinc();
2081 #
2082 _typedef_and_export SDL_GUID => Struct [ data => Array [ UInt8, 16 ] ];
2083 #
2084 _affix_and_export SDL_GUIDToString => [ SDL_GUID(), String, Int ], Void;
2085 _affix_and_export SDL_StringToGUID => [String], SDL_GUID();
2086 }
2087  
2088 =head3 C<:haptic> - Force Feedback Support
2089  
2090 The SDL haptic subsystem manages haptic (force feedback) devices.
2091  
2092 See L<SDL3: CategoryHaptic|https://wiki.libsdl.org/SDL3/CategoryHaptic>
2093  
2094 =cut
2095  
2096 sub _haptic() {
2097 state $done++ && return;
2098 #
2099 _error();
2100 _joystick();
2101 _stdinc();
2102 #
2103 _typedef_and_export SDL_Haptic => Void;
2104 _typedef_and_export SDL_HapticID => UInt32;
2105 _const_and_export SDL_HAPTIC_INFINITY => 4294967295;
2106 _typedef_and_export SDL_HapticEffectType => UInt16;
2107 _const_and_export SDL_HAPTIC_CONSTANT => ( 1 << 0 );
2108 _const_and_export SDL_HAPTIC_SINE => ( 1 << 1 );
2109 _const_and_export SDL_HAPTIC_SQUARE => ( 1 << 2 );
2110 _const_and_export SDL_HAPTIC_TRIANGLE => ( 1 << 3 );
2111 _const_and_export SDL_HAPTIC_SAWTOOTHUP => ( 1 << 4 );
2112 _const_and_export SDL_HAPTIC_SAWTOOTHDOWN => ( 1 << 5 );
2113 _const_and_export SDL_HAPTIC_RAMP => ( 1 << 6 );
2114 _const_and_export SDL_HAPTIC_SPRING => ( 1 << 7 );
2115 _const_and_export SDL_HAPTIC_DAMPER => ( 1 << 8 );
2116 _const_and_export SDL_HAPTIC_INERTIA => ( 1 << 9 );
2117 _const_and_export SDL_HAPTIC_FRICTION => ( 1 << 10 );
2118 _const_and_export SDL_HAPTIC_LEFTRIGHT => ( 1 << 11 );
2119 _const_and_export SDL_HAPTIC_RESERVED1 => ( 1 << 12 );
2120 _const_and_export SDL_HAPTIC_RESERVED2 => ( 1 << 13 );
2121 _const_and_export SDL_HAPTIC_RESERVED3 => ( 1 << 14 );
2122 _const_and_export SDL_HAPTIC_CUSTOM => ( 1 << 15 );
2123 _const_and_export SDL_HAPTIC_GAIN => ( 1 << 16 );
2124 _const_and_export SDL_HAPTIC_AUTOCENTER => ( 1 << 17 );
2125 _const_and_export SDL_HAPTIC_STATUS => ( 1 << 18 );
2126 _const_and_export SDL_HAPTIC_PAUSE => ( 1 << 19 );
2127 _typedef_and_export SDL_HapticDirectionType => UInt8;
2128 _const_and_export SDL_HAPTIC_POLAR => 0;
2129 _const_and_export SDL_HAPTIC_CARTESIAN => 1;
2130 _const_and_export SDL_HAPTIC_SPHERICAL => 2;
2131 _const_and_export SDL_HAPTIC_STEERING_AXIS => 3;
2132 _typedef_and_export SDL_HapticEffectID => Int;
2133 _typedef_and_export SDL_HapticDirection => Struct [ type => SDL_HapticDirectionType(), dir => Array [ SInt32, 3 ] ];
2134 _typedef_and_export SDL_HapticConstant => Struct [
2135 type => SDL_HapticEffectType(),
2136 direction => SDL_HapticDirection(),
2137 length => UInt32,
2138 delay => UInt16,
2139 button => UInt16,
2140 interval => UInt16,
2141 level => SInt16,
2142 attack_length => UInt16,
2143 attack_level => UInt16,
2144 fade_length => UInt16,
2145 fade_level => UInt16
2146 ];
2147 _typedef_and_export SDL_HapticPeriodic => Struct [
2148 type => SDL_HapticEffectType(),
2149 direction => SDL_HapticDirection(),
2150 length => UInt32,
2151 delay => UInt16,
2152 button => UInt16,
2153 interval => UInt16,
2154 period => UInt16,
2155 magnitude => SInt16,
2156 offset => SInt16,
2157 phase => UInt16,
2158 attack_length => UInt16,
2159 attack_level => UInt16,
2160 fade_length => UInt16,
2161 fade_level => UInt16
2162 ];
2163 _typedef_and_export SDL_HapticCondition => Struct [
2164 type => SDL_HapticEffectType(),
2165 direction => SDL_HapticDirection(),
2166 length => UInt32,
2167 delay => UInt16,
2168 button => UInt16,
2169 interval => UInt16,
2170 right_sat => Array [ UInt16, 3 ],
2171 left_sat => Array [ UInt16, 3 ],
2172 right_coeff => Array [ SInt16, 3 ],
2173 left_coeff => Array [ SInt16, 3 ],
2174 deadband => Array [ UInt16, 3 ],
2175 center => Array [ SInt16, 3 ]
2176 ];
2177 _typedef_and_export SDL_HapticRamp => Struct [
2178 type => SDL_HapticEffectType(),
2179 direction => SDL_HapticDirection(),
2180 length => UInt32,
2181 delay => UInt16,
2182 button => UInt16,
2183 interval => UInt16,
2184 start => SInt16,
2185 end => SInt16,
2186 attack_length => UInt16,
2187 attack_level => UInt16,
2188 fade_length => UInt16,
2189 fade_level => UInt16
2190 ];
2191 _typedef_and_export SDL_HapticLeftRight =>
2192 Struct [ type => SDL_HapticEffectType(), length => UInt32, large_magnitude => UInt16, small_magnitude => UInt16 ];
2193 _typedef_and_export SDL_HapticCustom => Struct [
2194 type => SDL_HapticEffectType(),
2195 direction => SDL_HapticDirection(),
2196 length => UInt32,
2197 delay => UInt16,
2198 button => UInt16,
2199 interval => UInt16,
2200 channels => UInt8,
2201 period => UInt16,
2202 samples => UInt16,
2203 data => Pointer [UInt16],
2204 attack_length => UInt16,
2205 attack_level => UInt16,
2206 fade_length => UInt16,
2207 fade_level => UInt16
2208 ];
2209 _typedef_and_export SDL_HapticEffect => Union [
2210 type => SDL_HapticEffectType(),
2211 constant => SDL_HapticConstant(),
2212 periodic => SDL_HapticPeriodic(),
2213 condition => SDL_HapticCondition(),
2214 ramp => SDL_HapticRamp(),
2215 leftright => SDL_HapticLeftRight(),
2216 custom => SDL_HapticCustom()
2217 ];
2218 _affix_and_export SDL_GetHaptics => [ Pointer [Int] ], Pointer [ SDL_HapticID() ];
2219 _affix_and_export SDL_GetHapticNameForID => [ SDL_HapticID() ], String;
2220 _affix_and_export SDL_OpenHaptic => [ SDL_HapticID() ], Pointer [ SDL_Haptic() ];
2221 _affix_and_export SDL_GetHapticFromID => [ SDL_HapticID() ], Pointer [ SDL_Haptic() ];
2222 _affix_and_export SDL_GetHapticID => [ Pointer [ SDL_Haptic() ] ], SDL_HapticID();
2223 _affix_and_export SDL_GetHapticName => [ Pointer [ SDL_Haptic() ] ], String;
2224 _affix_and_export SDL_IsMouseHaptic => [], Bool;
2225 _affix_and_export SDL_OpenHapticFromMouse => [], Pointer [ SDL_Haptic() ];
2226 _affix_and_export SDL_IsJoystickHaptic => [ Pointer [ SDL_Joystick() ] ], Bool;
2227 _affix_and_export SDL_OpenHapticFromJoystick => [ Pointer [ SDL_Joystick() ] ], Pointer [ SDL_Haptic() ];
2228 _affix_and_export SDL_CloseHaptic => [ Pointer [ SDL_Haptic() ] ], Void;
2229 _affix_and_export SDL_GetMaxHapticEffects => [ Pointer [ SDL_Haptic() ] ], Int;
2230 _affix_and_export SDL_GetMaxHapticEffectsPlaying => [ Pointer [ SDL_Haptic() ] ], Int;
2231 _affix_and_export SDL_GetHapticFeatures => [ Pointer [ SDL_Haptic() ] ], UInt32;
2232 _affix_and_export SDL_GetNumHapticAxes => [ Pointer [ SDL_Haptic() ] ], Int;
2233 _affix_and_export SDL_HapticEffectSupported => [ Pointer [ SDL_Haptic() ], Pointer [ SDL_HapticEffect() ] ], Bool;
2234 _affix_and_export SDL_CreateHapticEffect => [ Pointer [ SDL_Haptic() ], Pointer [ SDL_HapticEffect() ] ], SDL_HapticEffectID();
2235 _affix_and_export
2236 SDL_UpdateHapticEffect => [ Pointer [ SDL_Haptic() ], SDL_HapticEffectID(), Pointer [ SDL_HapticEffect() ] ],
2237 Bool;
2238 _affix_and_export SDL_RunHapticEffect => [ Pointer [ SDL_Haptic() ], SDL_HapticEffectID(), UInt32 ], Bool;
2239 _affix_and_export SDL_StopHapticEffect => [ Pointer [ SDL_Haptic() ], SDL_HapticEffectID() ], Bool;
2240 _affix_and_export SDL_DestroyHapticEffect => [ Pointer [ SDL_Haptic() ], SDL_HapticEffectID() ], Void;
2241 _affix_and_export SDL_GetHapticEffectStatus => [ Pointer [ SDL_Haptic() ], SDL_HapticEffectID() ], Bool;
2242 _affix_and_export SDL_SetHapticGain => [ Pointer [ SDL_Haptic() ], Int ], Bool;
2243 _affix_and_export SDL_SetHapticAutocenter => [ Pointer [ SDL_Haptic() ], Int ], Bool;
2244 _affix_and_export SDL_PauseHaptic => [ Pointer [ SDL_Haptic() ] ], Bool;
2245 _affix_and_export SDL_ResumeHaptic => [ Pointer [ SDL_Haptic() ] ], Bool;
2246 _affix_and_export SDL_StopHapticEffects => [ Pointer [ SDL_Haptic() ] ], Bool;
2247 _affix_and_export SDL_HapticRumbleSupported => [ Pointer [ SDL_Haptic() ] ], Bool;
2248 _affix_and_export SDL_InitHapticRumble => [ Pointer [ SDL_Haptic() ] ], Bool;
2249 _affix_and_export SDL_PlayHapticRumble => [ Pointer [ SDL_Haptic() ], Float, UInt32 ], Bool;
2250 _affix_and_export SDL_StopHapticRumble => [ Pointer [ SDL_Haptic() ] ], Bool;
2251 }
2252  
2253 =head3 C<:hidapi> - HIDAPI
2254  
2255 HID devices.
2256  
2257 See L<SDL3: CategoryHIDAPI|https://wiki.libsdl.org/SDL3/CategoryHIDAPI>
2258  
2259 =cut
2260  
2261 sub _hidapi() {
2262 state $done++ && return;
2263 #
2264 _error();
2265 _properties();
2266 _stdinc();
2267 #
2268 _typedef_and_export SDL_hid_device => Void;
2269 _enum_and_export SDL_hid_bus_type => [
2270 [ SDL_HID_API_BUS_UNKNOWN => 0x00 ],
2271 [ SDL_HID_API_BUS_USB => 0x01 ],
2272 [ SDL_HID_API_BUS_BLUETOOTH => 0x02 ],
2273 [ SDL_HID_API_BUS_I2C => 0x03 ],
2274 [ SDL_HID_API_BUS_SPI => 0x04 ]
2275 ];
2276 typedef 'SDL_hid_device_info';
2277 _typedef_and_export SDL_hid_device_info => Struct [
2278 path => String,
2279 vendor_id => UShort,
2280 product_id => UShort,
2281 serial_number => WString,
2282 release_number => UShort,
2283 manufacturer_string => WString,
2284 product_string => WString,
2285 usage_page => UShort,
2286 usage => UShort,
2287 interface_number => Int,
2288 interface_class => Int,
2289 interface_subclass => Int,
2290 interface_protocol => Int,
2291 bus_type => SDL_hid_bus_type(),
2292 next => Pointer [ SDL_hid_device_info() ]
2293 ];
2294 _affix_and_export SDL_hid_init => [], Int;
2295 _affix_and_export SDL_hid_exit => [], Int;
2296 _affix_and_export SDL_hid_device_change_count => [], UInt32;
2297 _affix_and_export SDL_hid_enumerate => [ UShort, UShort ], Pointer [ SDL_hid_device_info() ];
2298 _affix_and_export SDL_hid_free_enumeration => [ Pointer [ SDL_hid_device_info() ] ], Void;
2299 _affix_and_export SDL_hid_open => [ UShort, UShort, WString ], Pointer [ SDL_hid_device() ];
2300 _affix_and_export SDL_hid_open_path => [String], Pointer [ SDL_hid_device() ];
2301  
2302 #~ _affix_and_export SDL_hid_get_properties => [ Pointer [ SDL_hid_device() ] ], SDL_PropertiesID();
2303 _const_and_export SDL_PROP_HIDAPI_LIBUSB_DEVICE_HANDLE_POINTER => 'SDL.hidapi.libusb.device.handle';
2304 _affix_and_export SDL_hid_write => [ Pointer [ SDL_hid_device() ], Pointer [UChar], Size_t ], Int;
2305 _affix_and_export SDL_hid_read_timeout => [ Pointer [ SDL_hid_device() ], Pointer [UChar], Size_t, Int ], Int;
2306 _affix_and_export SDL_hid_read => [ Pointer [ SDL_hid_device() ], Pointer [UChar], Size_t ], Int;
2307 _affix_and_export SDL_hid_set_nonblocking => [ Pointer [ SDL_hid_device() ], Int ], Int;
2308 _affix_and_export SDL_hid_send_feature_report => [ Pointer [ SDL_hid_device() ], Pointer [UChar], Size_t ], Int;
2309 _affix_and_export SDL_hid_get_feature_report => [ Pointer [ SDL_hid_device() ], Pointer [UChar], Size_t ], Int;
2310 _affix_and_export SDL_hid_get_input_report => [ Pointer [ SDL_hid_device() ], Pointer [UChar], Size_t ], Int;
2311 _affix_and_export SDL_hid_close => [ Pointer [ SDL_hid_device() ] ], Int;
2312 _affix_and_export SDL_hid_get_manufacturer_string => [ Pointer [ SDL_hid_device() ], WString, Size_t ], Int;
2313 _affix_and_export SDL_hid_get_product_string => [ Pointer [ SDL_hid_device() ], WString, Size_t ], Int;
2314 _affix_and_export SDL_hid_get_serial_number_string => [ Pointer [ SDL_hid_device() ], WString, Size_t ], Int;
2315 _affix_and_export SDL_hid_get_indexed_string => [ Pointer [ SDL_hid_device() ], Int, WString, Size_t ], Int;
2316 _affix_and_export SDL_hid_get_device_info => [ Pointer [ SDL_hid_device() ] ], Pointer [ SDL_hid_device_info() ];
2317 _affix_and_export SDL_hid_get_report_descriptor => [ Pointer [ SDL_hid_device() ], Pointer [UChar], Size_t ], Int;
2318 _affix_and_export SDL_hid_ble_scan => [Bool], Void;
2319 }
2320  
2321 =head3 C<:hints> - Configuration Variables
2322  
2323 Functions to set and get configuration hints, as well as listing each of them alphabetically.
2324  
2325 See L<SDL3: CategoryHints|https://wiki.libsdl.org/SDL3/CategoryHints>
2326  
2327 =cut
2328  
2329 sub _hints() {
2330 state $done++ && return;
2331 #
2332 _error();
2333 _stdinc();
2334 #
2335 _const_and_export SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED => 'SDL_ALLOW_ALT_TAB_WHILE_GRABBED';
2336 _const_and_export SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY => 'SDL_ANDROID_ALLOW_RECREATE_ACTIVITY';
2337 _const_and_export SDL_HINT_ANDROID_BLOCK_ON_PAUSE => 'SDL_ANDROID_BLOCK_ON_PAUSE';
2338 _const_and_export SDL_HINT_ANDROID_LOW_LATENCY_AUDIO => 'SDL_ANDROID_LOW_LATENCY_AUDIO';
2339 _const_and_export SDL_HINT_ANDROID_TRAP_BACK_BUTTON => 'SDL_ANDROID_TRAP_BACK_BUTTON';
2340 _const_and_export SDL_HINT_APP_ID => 'SDL_APP_ID';
2341 _const_and_export SDL_HINT_APP_NAME => 'SDL_APP_NAME';
2342 _const_and_export SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS => 'SDL_APPLE_TV_CONTROLLER_UI_EVENTS';
2343 _const_and_export SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION => 'SDL_APPLE_TV_REMOTE_ALLOW_ROTATION';
2344 _const_and_export SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE => 'SDL_AUDIO_ALSA_DEFAULT_DEVICE';
2345 _const_and_export SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE => 'SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE';
2346 _const_and_export SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE => 'SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE';
2347 _const_and_export SDL_HINT_AUDIO_CATEGORY => 'SDL_AUDIO_CATEGORY';
2348 _const_and_export SDL_HINT_AUDIO_CHANNELS => 'SDL_AUDIO_CHANNELS';
2349 _const_and_export SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME => 'SDL_AUDIO_DEVICE_APP_ICON_NAME';
2350 _const_and_export SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES => 'SDL_AUDIO_DEVICE_SAMPLE_FRAMES';
2351 _const_and_export SDL_HINT_AUDIO_DEVICE_STREAM_NAME => 'SDL_AUDIO_DEVICE_STREAM_NAME';
2352 _const_and_export SDL_HINT_AUDIO_DEVICE_STREAM_ROLE => 'SDL_AUDIO_DEVICE_STREAM_ROLE';
2353 _const_and_export SDL_HINT_AUDIO_DEVICE_RAW_STREAM => 'SDL_AUDIO_DEVICE_RAW_STREAM';
2354 _const_and_export SDL_HINT_AUDIO_DISK_INPUT_FILE => 'SDL_AUDIO_DISK_INPUT_FILE';
2355 _const_and_export SDL_HINT_AUDIO_DISK_OUTPUT_FILE => 'SDL_AUDIO_DISK_OUTPUT_FILE';
2356 _const_and_export SDL_HINT_AUDIO_DISK_TIMESCALE => 'SDL_AUDIO_DISK_TIMESCALE';
2357 _const_and_export SDL_HINT_AUDIO_DRIVER => 'SDL_AUDIO_DRIVER';
2358 _const_and_export SDL_HINT_AUDIO_DUMMY_TIMESCALE => 'SDL_AUDIO_DUMMY_TIMESCALE';
2359 _const_and_export SDL_HINT_AUDIO_FORMAT => 'SDL_AUDIO_FORMAT';
2360 _const_and_export SDL_HINT_AUDIO_FREQUENCY => 'SDL_AUDIO_FREQUENCY';
2361 _const_and_export SDL_HINT_AUDIO_INCLUDE_MONITORS => 'SDL_AUDIO_INCLUDE_MONITORS';
2362 _const_and_export SDL_HINT_AUTO_UPDATE_JOYSTICKS => 'SDL_AUTO_UPDATE_JOYSTICKS';
2363 _const_and_export SDL_HINT_AUTO_UPDATE_SENSORS => 'SDL_AUTO_UPDATE_SENSORS';
2364 _const_and_export SDL_HINT_BMP_SAVE_LEGACY_FORMAT => 'SDL_BMP_SAVE_LEGACY_FORMAT';
2365 _const_and_export SDL_HINT_CAMERA_DRIVER => 'SDL_CAMERA_DRIVER';
2366 _const_and_export SDL_HINT_CPU_FEATURE_MASK => 'SDL_CPU_FEATURE_MASK';
2367 _const_and_export SDL_HINT_JOYSTICK_DIRECTINPUT => 'SDL_JOYSTICK_DIRECTINPUT';
2368 _const_and_export SDL_HINT_FILE_DIALOG_DRIVER => 'SDL_FILE_DIALOG_DRIVER';
2369 _const_and_export SDL_HINT_DISPLAY_USABLE_BOUNDS => 'SDL_DISPLAY_USABLE_BOUNDS';
2370 _const_and_export SDL_HINT_INVALID_PARAM_CHECKS => 'SDL_INVALID_PARAM_CHECKS';
2371 _const_and_export SDL_HINT_EMSCRIPTEN_ASYNCIFY => 'SDL_EMSCRIPTEN_ASYNCIFY';
2372 _const_and_export SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR => 'SDL_EMSCRIPTEN_CANVAS_SELECTOR';
2373 _const_and_export SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT => 'SDL_EMSCRIPTEN_KEYBOARD_ELEMENT';
2374 _const_and_export SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT => 'SDL_EMSCRIPTEN_FILL_DOCUMENT';
2375 _const_and_export SDL_HINT_ENABLE_SCREEN_KEYBOARD => 'SDL_ENABLE_SCREEN_KEYBOARD';
2376 _const_and_export SDL_HINT_EVDEV_DEVICES => 'SDL_EVDEV_DEVICES';
2377 _const_and_export SDL_HINT_EVENT_LOGGING => 'SDL_EVENT_LOGGING';
2378 _const_and_export SDL_HINT_FORCE_RAISEWINDOW => 'SDL_FORCE_RAISEWINDOW';
2379 _const_and_export SDL_HINT_FRAMEBUFFER_ACCELERATION => 'SDL_FRAMEBUFFER_ACCELERATION';
2380 _const_and_export SDL_HINT_GAMECONTROLLERCONFIG => 'SDL_GAMECONTROLLERCONFIG';
2381 _const_and_export SDL_HINT_GAMECONTROLLERCONFIG_FILE => 'SDL_GAMECONTROLLERCONFIG_FILE';
2382 _const_and_export SDL_HINT_GAMECONTROLLERTYPE => 'SDL_GAMECONTROLLERTYPE';
2383 _const_and_export SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES => 'SDL_GAMECONTROLLER_IGNORE_DEVICES';
2384 _const_and_export SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT => 'SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT';
2385 _const_and_export SDL_HINT_GAMECONTROLLER_SENSOR_FUSION => 'SDL_GAMECONTROLLER_SENSOR_FUSION';
2386 _const_and_export SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT => 'SDL_GDK_TEXTINPUT_DEFAULT_TEXT';
2387 _const_and_export SDL_HINT_GDK_TEXTINPUT_DESCRIPTION => 'SDL_GDK_TEXTINPUT_DESCRIPTION';
2388 _const_and_export SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH => 'SDL_GDK_TEXTINPUT_MAX_LENGTH';
2389 _const_and_export SDL_HINT_GDK_TEXTINPUT_SCOPE => 'SDL_GDK_TEXTINPUT_SCOPE';
2390 _const_and_export SDL_HINT_GDK_TEXTINPUT_TITLE => 'SDL_GDK_TEXTINPUT_TITLE';
2391 _const_and_export SDL_HINT_HIDAPI_LIBUSB => 'SDL_HIDAPI_LIBUSB';
2392 _const_and_export SDL_HINT_HIDAPI_LIBUSB_WHITELIST => 'SDL_HIDAPI_LIBUSB_WHITELIST';
2393 _const_and_export SDL_HINT_HIDAPI_UDEV => 'SDL_HIDAPI_UDEV';
2394 _const_and_export SDL_HINT_GPU_DRIVER => 'SDL_GPU_DRIVER';
2395 _const_and_export SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS => 'SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS';
2396 _const_and_export SDL_HINT_HIDAPI_IGNORE_DEVICES => 'SDL_HIDAPI_IGNORE_DEVICES';
2397 _const_and_export SDL_HINT_IME_IMPLEMENTED_UI => 'SDL_IME_IMPLEMENTED_UI';
2398 _const_and_export SDL_HINT_IOS_HIDE_HOME_INDICATOR => 'SDL_IOS_HIDE_HOME_INDICATOR';
2399 _const_and_export SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS => 'SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS';
2400 _const_and_export SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES => 'SDL_JOYSTICK_ARCADESTICK_DEVICES';
2401 _const_and_export SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED => 'SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED';
2402 _const_and_export SDL_HINT_JOYSTICK_BLACKLIST_DEVICES => 'SDL_JOYSTICK_BLACKLIST_DEVICES';
2403 _const_and_export SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED => 'SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED';
2404 _const_and_export SDL_HINT_JOYSTICK_DEVICE => 'SDL_JOYSTICK_DEVICE';
2405 _const_and_export SDL_HINT_JOYSTICK_ENHANCED_REPORTS => 'SDL_JOYSTICK_ENHANCED_REPORTS';
2406 _const_and_export SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES => 'SDL_JOYSTICK_FLIGHTSTICK_DEVICES';
2407 _const_and_export SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED => 'SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED';
2408 _const_and_export SDL_HINT_JOYSTICK_GAMEINPUT => 'SDL_JOYSTICK_GAMEINPUT';
2409 _const_and_export SDL_HINT_JOYSTICK_GAMECUBE_DEVICES => 'SDL_JOYSTICK_GAMECUBE_DEVICES';
2410 _const_and_export SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED => 'SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED';
2411 _const_and_export SDL_HINT_JOYSTICK_HIDAPI => 'SDL_JOYSTICK_HIDAPI';
2412 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS => 'SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS';
2413 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE => 'SDL_JOYSTICK_HIDAPI_GAMECUBE';
2414 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE => 'SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE';
2415 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS => 'SDL_JOYSTICK_HIDAPI_JOY_CONS';
2416 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED => 'SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED';
2417 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_LUNA => 'SDL_JOYSTICK_HIDAPI_LUNA';
2418 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC => 'SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC';
2419 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_PS3 => 'SDL_JOYSTICK_HIDAPI_PS3';
2420 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER => 'SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER';
2421 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_PS4 => 'SDL_JOYSTICK_HIDAPI_PS4';
2422 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL => 'SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL';
2423 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_PS5 => 'SDL_JOYSTICK_HIDAPI_PS5';
2424 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED => 'SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED';
2425 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_SHIELD => 'SDL_JOYSTICK_HIDAPI_SHIELD';
2426 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_STADIA => 'SDL_JOYSTICK_HIDAPI_STADIA';
2427 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_STEAM => 'SDL_JOYSTICK_HIDAPI_STEAM';
2428 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED => 'SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED';
2429 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK => 'SDL_JOYSTICK_HIDAPI_STEAMDECK';
2430 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI => 'SDL_JOYSTICK_HIDAPI_STEAM_HORI';
2431 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_LG4FF => 'SDL_JOYSTICK_HIDAPI_LG4FF';
2432 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_8BITDO => 'SDL_JOYSTICK_HIDAPI_8BITDO';
2433 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_SINPUT => 'SDL_JOYSTICK_HIDAPI_SINPUT';
2434 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_ZUIKI => 'SDL_JOYSTICK_HIDAPI_ZUIKI';
2435 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI => 'SDL_JOYSTICK_HIDAPI_FLYDIGI';
2436 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_SWITCH => 'SDL_JOYSTICK_HIDAPI_SWITCH';
2437 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED => 'SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED';
2438 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED => 'SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED';
2439 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_SWITCH2 => 'SDL_JOYSTICK_HIDAPI_SWITCH2';
2440 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS => 'SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS';
2441 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_WII => 'SDL_JOYSTICK_HIDAPI_WII';
2442 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED => 'SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED';
2443 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_XBOX => 'SDL_JOYSTICK_HIDAPI_XBOX';
2444 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 => 'SDL_JOYSTICK_HIDAPI_XBOX_360';
2445 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED => 'SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED';
2446 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS => 'SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS';
2447 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE => 'SDL_JOYSTICK_HIDAPI_XBOX_ONE';
2448 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED => 'SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED';
2449 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_GIP => 'SDL_JOYSTICK_HIDAPI_GIP';
2450 _const_and_export SDL_HINT_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA => 'SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA';
2451 _const_and_export SDL_HINT_JOYSTICK_IOKIT => 'SDL_JOYSTICK_IOKIT';
2452 _const_and_export SDL_HINT_JOYSTICK_LINUX_CLASSIC => 'SDL_JOYSTICK_LINUX_CLASSIC';
2453 _const_and_export SDL_HINT_JOYSTICK_LINUX_DEADZONES => 'SDL_JOYSTICK_LINUX_DEADZONES';
2454 _const_and_export SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS => 'SDL_JOYSTICK_LINUX_DIGITAL_HATS';
2455 _const_and_export SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES => 'SDL_JOYSTICK_LINUX_HAT_DEADZONES';
2456 _const_and_export SDL_HINT_JOYSTICK_MFI => 'SDL_JOYSTICK_MFI';
2457 _const_and_export SDL_HINT_JOYSTICK_RAWINPUT => 'SDL_JOYSTICK_RAWINPUT';
2458 _const_and_export SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT => 'SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT';
2459 _const_and_export SDL_HINT_JOYSTICK_ROG_CHAKRAM => 'SDL_JOYSTICK_ROG_CHAKRAM';
2460 _const_and_export SDL_HINT_JOYSTICK_THREAD => 'SDL_JOYSTICK_THREAD';
2461 _const_and_export SDL_HINT_JOYSTICK_THROTTLE_DEVICES => 'SDL_JOYSTICK_THROTTLE_DEVICES';
2462 _const_and_export SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED => 'SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED';
2463 _const_and_export SDL_HINT_JOYSTICK_WGI => 'SDL_JOYSTICK_WGI';
2464 _const_and_export SDL_HINT_JOYSTICK_WHEEL_DEVICES => 'SDL_JOYSTICK_WHEEL_DEVICES';
2465 _const_and_export SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED => 'SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED';
2466 _const_and_export SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES => 'SDL_JOYSTICK_ZERO_CENTERED_DEVICES';
2467 _const_and_export SDL_HINT_JOYSTICK_HAPTIC_AXES => 'SDL_JOYSTICK_HAPTIC_AXES';
2468 _const_and_export SDL_HINT_KEYCODE_OPTIONS => 'SDL_KEYCODE_OPTIONS';
2469 _const_and_export SDL_HINT_KMSDRM_DEVICE_INDEX => 'SDL_KMSDRM_DEVICE_INDEX';
2470 _const_and_export SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER => 'SDL_KMSDRM_REQUIRE_DRM_MASTER';
2471 _const_and_export SDL_HINT_KMSDRM_ATOMIC => 'SDL_KMSDRM_ATOMIC';
2472 _const_and_export SDL_HINT_LOGGING => 'SDL_LOGGING';
2473 _const_and_export SDL_HINT_MAC_BACKGROUND_APP => 'SDL_MAC_BACKGROUND_APP';
2474 _const_and_export SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK => 'SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK';
2475 _const_and_export SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH => 'SDL_MAC_OPENGL_ASYNC_DISPATCH';
2476 _const_and_export SDL_HINT_MAC_OPTION_AS_ALT => 'SDL_MAC_OPTION_AS_ALT';
2477 _const_and_export SDL_HINT_MAC_SCROLL_MOMENTUM => 'SDL_MAC_SCROLL_MOMENTUM';
2478 _const_and_export SDL_HINT_MAIN_CALLBACK_RATE => 'SDL_MAIN_CALLBACK_RATE';
2479 _const_and_export SDL_HINT_MOUSE_AUTO_CAPTURE => 'SDL_MOUSE_AUTO_CAPTURE';
2480 _const_and_export SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS => 'SDL_MOUSE_DOUBLE_CLICK_RADIUS';
2481 _const_and_export SDL_HINT_MOUSE_DOUBLE_CLICK_TIME => 'SDL_MOUSE_DOUBLE_CLICK_TIME';
2482 _const_and_export SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR => 'SDL_MOUSE_DEFAULT_SYSTEM_CURSOR';
2483 _const_and_export SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE => 'SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE';
2484 _const_and_export SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH => 'SDL_MOUSE_FOCUS_CLICKTHROUGH';
2485 _const_and_export SDL_HINT_MOUSE_NORMAL_SPEED_SCALE => 'SDL_MOUSE_NORMAL_SPEED_SCALE';
2486 _const_and_export SDL_HINT_MOUSE_RELATIVE_MODE_CENTER => 'SDL_MOUSE_RELATIVE_MODE_CENTER';
2487 _const_and_export SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE => 'SDL_MOUSE_RELATIVE_SPEED_SCALE';
2488 _const_and_export SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE => 'SDL_MOUSE_RELATIVE_SYSTEM_SCALE';
2489 _const_and_export SDL_HINT_MOUSE_RELATIVE_WARP_MOTION => 'SDL_MOUSE_RELATIVE_WARP_MOTION';
2490 _const_and_export SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE => 'SDL_MOUSE_RELATIVE_CURSOR_VISIBLE';
2491 _const_and_export SDL_HINT_MOUSE_TOUCH_EVENTS => 'SDL_MOUSE_TOUCH_EVENTS';
2492 _const_and_export SDL_HINT_MUTE_CONSOLE_KEYBOARD => 'SDL_MUTE_CONSOLE_KEYBOARD';
2493 _const_and_export SDL_HINT_NO_SIGNAL_HANDLERS => 'SDL_NO_SIGNAL_HANDLERS';
2494 _const_and_export SDL_HINT_OPENGL_LIBRARY => 'SDL_OPENGL_LIBRARY';
2495 _const_and_export SDL_HINT_EGL_LIBRARY => 'SDL_EGL_LIBRARY';
2496 _const_and_export SDL_HINT_OPENGL_ES_DRIVER => 'SDL_OPENGL_ES_DRIVER';
2497 _const_and_export SDL_HINT_OPENVR_LIBRARY => 'SDL_OPENVR_LIBRARY';
2498 _const_and_export SDL_HINT_ORIENTATIONS => 'SDL_ORIENTATIONS';
2499 _const_and_export SDL_HINT_POLL_SENTINEL => 'SDL_POLL_SENTINEL';
2500 _const_and_export SDL_HINT_PREFERRED_LOCALES => 'SDL_PREFERRED_LOCALES';
2501 _const_and_export SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE => 'SDL_QUIT_ON_LAST_WINDOW_CLOSE';
2502 _const_and_export SDL_HINT_RENDER_DIRECT3D_THREADSAFE => 'SDL_RENDER_DIRECT3D_THREADSAFE';
2503 _const_and_export SDL_HINT_RENDER_DIRECT3D11_DEBUG => 'SDL_RENDER_DIRECT3D11_DEBUG';
2504 _const_and_export SDL_HINT_RENDER_DIRECT3D11_WARP => 'SDL_RENDER_DIRECT3D11_WARP';
2505 _const_and_export SDL_HINT_RENDER_VULKAN_DEBUG => 'SDL_RENDER_VULKAN_DEBUG';
2506 _const_and_export SDL_HINT_RENDER_GPU_DEBUG => 'SDL_RENDER_GPU_DEBUG';
2507 _const_and_export SDL_HINT_RENDER_GPU_LOW_POWER => 'SDL_RENDER_GPU_LOW_POWER';
2508 _const_and_export SDL_HINT_RENDER_DRIVER => 'SDL_RENDER_DRIVER';
2509 _const_and_export SDL_HINT_RENDER_LINE_METHOD => 'SDL_RENDER_LINE_METHOD';
2510 _const_and_export SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE => 'SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE';
2511 _const_and_export SDL_HINT_RENDER_VSYNC => 'SDL_RENDER_VSYNC';
2512 _const_and_export SDL_HINT_RETURN_KEY_HIDES_IME => 'SDL_RETURN_KEY_HIDES_IME';
2513 _const_and_export SDL_HINT_ROG_GAMEPAD_MICE => 'SDL_ROG_GAMEPAD_MICE';
2514 _const_and_export SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED => 'SDL_ROG_GAMEPAD_MICE_EXCLUDED';
2515 _const_and_export SDL_HINT_PS2_GS_WIDTH => 'SDL_PS2_GS_WIDTH';
2516 _const_and_export SDL_HINT_PS2_GS_HEIGHT => 'SDL_PS2_GS_HEIGHT';
2517 _const_and_export SDL_HINT_PS2_GS_PROGRESSIVE => 'SDL_PS2_GS_PROGRESSIVE';
2518 _const_and_export SDL_HINT_PS2_GS_MODE => 'SDL_PS2_GS_MODE';
2519 _const_and_export SDL_HINT_RPI_VIDEO_LAYER => 'SDL_RPI_VIDEO_LAYER';
2520 _const_and_export SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME => 'SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME';
2521 _const_and_export SDL_HINT_SHUTDOWN_DBUS_ON_QUIT => 'SDL_SHUTDOWN_DBUS_ON_QUIT';
2522 _const_and_export SDL_HINT_STORAGE_TITLE_DRIVER => 'SDL_STORAGE_TITLE_DRIVER';
2523 _const_and_export SDL_HINT_STORAGE_USER_DRIVER => 'SDL_STORAGE_USER_DRIVER';
2524 _const_and_export SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL => 'SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL';
2525 _const_and_export SDL_HINT_THREAD_PRIORITY_POLICY => 'SDL_THREAD_PRIORITY_POLICY';
2526 _const_and_export SDL_HINT_TIMER_RESOLUTION => 'SDL_TIMER_RESOLUTION';
2527 _const_and_export SDL_HINT_TOUCH_MOUSE_EVENTS => 'SDL_TOUCH_MOUSE_EVENTS';
2528 _const_and_export SDL_HINT_TRACKPAD_IS_TOUCH_ONLY => 'SDL_TRACKPAD_IS_TOUCH_ONLY';
2529 _const_and_export SDL_HINT_TV_REMOTE_AS_JOYSTICK => 'SDL_TV_REMOTE_AS_JOYSTICK';
2530 _const_and_export SDL_HINT_VIDEO_ALLOW_SCREENSAVER => 'SDL_VIDEO_ALLOW_SCREENSAVER';
2531 _const_and_export SDL_HINT_VIDEO_DISPLAY_PRIORITY => 'SDL_VIDEO_DISPLAY_PRIORITY';
2532 _const_and_export SDL_HINT_VIDEO_DOUBLE_BUFFER => 'SDL_VIDEO_DOUBLE_BUFFER';
2533 _const_and_export SDL_HINT_VIDEO_DRIVER => 'SDL_VIDEO_DRIVER';
2534 _const_and_export SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES => 'SDL_VIDEO_DUMMY_SAVE_FRAMES';
2535 _const_and_export SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK => 'SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK';
2536 _const_and_export SDL_HINT_VIDEO_FORCE_EGL => 'SDL_VIDEO_FORCE_EGL';
2537 _const_and_export SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES => 'SDL_VIDEO_MAC_FULLSCREEN_SPACES';
2538 _const_and_export SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY => 'SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY';
2539 _const_and_export SDL_HINT_VIDEO_METAL_AUTO_RESIZE_DRAWABLE => 'SDL_VIDEO_METAL_AUTO_RESIZE_DRAWABLE';
2540 _const_and_export SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE => 'SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE';
2541 _const_and_export SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS => 'SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS';
2542 _const_and_export SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES => 'SDL_VIDEO_OFFSCREEN_SAVE_FRAMES';
2543 _const_and_export SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS => 'SDL_VIDEO_SYNC_WINDOW_OPERATIONS';
2544 _const_and_export SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR => 'SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR';
2545 _const_and_export SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION => 'SDL_VIDEO_WAYLAND_MODE_EMULATION';
2546 _const_and_export SDL_HINT_VIDEO_WAYLAND_MODE_SCALING => 'SDL_VIDEO_WAYLAND_MODE_SCALING';
2547 _const_and_export SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR => 'SDL_VIDEO_WAYLAND_PREFER_LIBDECOR';
2548 _const_and_export SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY => 'SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY';
2549 _const_and_export SDL_HINT_VIDEO_WIN_D3DCOMPILER => 'SDL_VIDEO_WIN_D3DCOMPILER';
2550 _const_and_export SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT => 'SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT';
2551 _const_and_export SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR => 'SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR';
2552 _const_and_export SDL_HINT_VIDEO_X11_NET_WM_PING => 'SDL_VIDEO_X11_NET_WM_PING';
2553 _const_and_export SDL_HINT_VIDEO_X11_NODIRECTCOLOR => 'SDL_VIDEO_X11_NODIRECTCOLOR';
2554 _const_and_export SDL_HINT_VIDEO_X11_SCALING_FACTOR => 'SDL_VIDEO_X11_SCALING_FACTOR';
2555 _const_and_export SDL_HINT_VIDEO_X11_VISUALID => 'SDL_VIDEO_X11_VISUALID';
2556 _const_and_export SDL_HINT_VIDEO_X11_WINDOW_VISUALID => 'SDL_VIDEO_X11_WINDOW_VISUALID';
2557 _const_and_export SDL_HINT_VIDEO_X11_XRANDR => 'SDL_VIDEO_X11_XRANDR';
2558 _const_and_export SDL_HINT_VITA_ENABLE_BACK_TOUCH => 'SDL_VITA_ENABLE_BACK_TOUCH';
2559 _const_and_export SDL_HINT_VITA_ENABLE_FRONT_TOUCH => 'SDL_VITA_ENABLE_FRONT_TOUCH';
2560 _const_and_export SDL_HINT_VITA_MODULE_PATH => 'SDL_VITA_MODULE_PATH';
2561 _const_and_export SDL_HINT_VITA_PVR_INIT => 'SDL_VITA_PVR_INIT';
2562 _const_and_export SDL_HINT_VITA_RESOLUTION => 'SDL_VITA_RESOLUTION';
2563 _const_and_export SDL_HINT_VITA_PVR_OPENGL => 'SDL_VITA_PVR_OPENGL';
2564 _const_and_export SDL_HINT_VITA_TOUCH_MOUSE_DEVICE => 'SDL_VITA_TOUCH_MOUSE_DEVICE';
2565 _const_and_export SDL_HINT_VULKAN_DISPLAY => 'SDL_VULKAN_DISPLAY';
2566 _const_and_export SDL_HINT_VULKAN_LIBRARY => 'SDL_VULKAN_LIBRARY';
2567 _const_and_export SDL_HINT_WAVE_FACT_CHUNK => 'SDL_WAVE_FACT_CHUNK';
2568 _const_and_export SDL_HINT_WAVE_CHUNK_LIMIT => 'SDL_WAVE_CHUNK_LIMIT';
2569 _const_and_export SDL_HINT_WAVE_RIFF_CHUNK_SIZE => 'SDL_WAVE_RIFF_CHUNK_SIZE';
2570 _const_and_export SDL_HINT_WAVE_TRUNCATION => 'SDL_WAVE_TRUNCATION';
2571 _const_and_export SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED => 'SDL_WINDOW_ACTIVATE_WHEN_RAISED';
2572 _const_and_export SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN => 'SDL_WINDOW_ACTIVATE_WHEN_SHOWN';
2573 _const_and_export SDL_HINT_WINDOW_ALLOW_TOPMOST => 'SDL_WINDOW_ALLOW_TOPMOST';
2574 _const_and_export SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN => 'SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN';
2575 _const_and_export SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 => 'SDL_WINDOWS_CLOSE_ON_ALT_F4';
2576 _const_and_export SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS => 'SDL_WINDOWS_ENABLE_MENU_MNEMONICS';
2577 _const_and_export SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP => 'SDL_WINDOWS_ENABLE_MESSAGELOOP';
2578 _const_and_export SDL_HINT_WINDOWS_GAMEINPUT => 'SDL_WINDOWS_GAMEINPUT';
2579 _const_and_export SDL_HINT_WINDOWS_RAW_KEYBOARD => 'SDL_WINDOWS_RAW_KEYBOARD';
2580 _const_and_export SDL_HINT_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS => 'SDL_WINDOWS_RAW_KEYBOARD_EXCLUDE_HOTKEYS';
2581 _const_and_export SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL => 'SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL';
2582 _const_and_export SDL_HINT_WINDOWS_INTRESOURCE_ICON => 'SDL_WINDOWS_INTRESOURCE_ICON';
2583 _const_and_export SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL => 'SDL_WINDOWS_INTRESOURCE_ICON_SMALL';
2584 _const_and_export SDL_HINT_WINDOWS_USE_D3D9EX => 'SDL_WINDOWS_USE_D3D9EX';
2585 _const_and_export SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE => 'SDL_WINDOWS_ERASE_BACKGROUND_MODE';
2586 _const_and_export SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT => 'SDL_X11_FORCE_OVERRIDE_REDIRECT';
2587 _const_and_export SDL_HINT_X11_WINDOW_TYPE => 'SDL_X11_WINDOW_TYPE';
2588 _const_and_export SDL_HINT_X11_XCB_LIBRARY => 'SDL_X11_XCB_LIBRARY';
2589 _const_and_export SDL_HINT_XINPUT_ENABLED => 'SDL_XINPUT_ENABLED';
2590 _const_and_export SDL_HINT_ASSERT => 'SDL_ASSERT';
2591 _const_and_export SDL_HINT_PEN_MOUSE_EVENTS => 'SDL_PEN_MOUSE_EVENTS';
2592 _const_and_export SDL_HINT_PEN_TOUCH_EVENTS => 'SDL_PEN_TOUCH_EVENTS';
2593 _enum_and_export SDL_HintPriority => [ 'SDL_HINT_DEFAULT', 'SDL_HINT_NORMAL', 'SDL_HINT_OVERRIDE' ];
2594 _affix_and_export SDL_SetHintWithPriority => [ String, String, SDL_HintPriority() ], Bool;
2595 _affix_and_export SDL_SetHint => [ String, String ], Bool;
2596 _affix_and_export SDL_ResetHint => [String], Bool;
2597 _affix_and_export SDL_ResetHints => [], Void;
2598 _affix_and_export SDL_GetHint => [String], String;
2599 _affix_and_export SDL_GetHintBoolean => [ String, Bool ], Bool;
2600 _typedef_and_export SDL_HintCallback => Callback [ [ Pointer [Void], String, String, String ] => Void ];
2601 _affix_and_export SDL_AddHintCallback => [ String, SDL_HintCallback(), Pointer [Void] ], Bool;
2602 _affix_and_export SDL_RemoveHintCallback => [ String, SDL_HintCallback(), Pointer [Void] ], Void;
2603 }
2604  
2605 =head3 C<:init> - Initialization and Shutdown
2606  
2607 All SDL programs need to initialize the library before starting to work with it.
2608  
2609 See L<SDL3: CategoryInit|https://wiki.libsdl.org/SDL3/CategoryInit>
2610  
2611 =cut
2612  
2613 sub _init() { # Based on sdl-main/include/sdl3/sdl_init.h
2614 state $done++ && return;
2615 _stdinc();
2616 _error();
2617 _events();
2618 #
2619 _typedef_and_export SDL_InitFlags => UInt32;
2620 _const_and_export SDL_INIT_AUDIO => 0x00000010;
2621 _const_and_export SDL_INIT_VIDEO => 0x00000020;
2622 _const_and_export SDL_INIT_JOYSTICK => 0x00000200;
2623 _const_and_export SDL_INIT_HAPTIC => 0x00001000;
2624 _const_and_export SDL_INIT_GAMEPAD => 0x00002000;
2625 _const_and_export SDL_INIT_EVENTS => 0x00004000;
2626 _const_and_export SDL_INIT_SENSOR => 0x00008000;
2627 _const_and_export SDL_INIT_CAMERA => 0x00010000;
2628 _enum_and_export SDL_AppResult => [ [ SDL_APP_CONTINUE => 0 ], [ SDL_APP_SUCCESS => 1 ], [ SDL_APP_FAILURE => 2 ] ];
2629 _typedef_and_export SDL_AppInit_func => Callback [ [ Pointer [ Pointer [Void] ], Int, Pointer [String] ] => SDL_AppResult() ];
2630 _typedef_and_export SDL_AppIterate_func => Callback [ [ Pointer [Void] ] => SDL_AppResult() ];
2631 _typedef_and_export SDL_AppEvent_func => Callback [ [ Pointer [Void], Pointer [ SDL_Event() ] ] => SDL_AppResult() ];
2632 _typedef_and_export SDL_AppQuit_func => Callback [ [ Pointer [Void], SDL_AppResult() ] => Void ];
2633 _affix_and_export SDL_Init => [ SDL_InitFlags() ], Bool;
2634 _affix_and_export SDL_InitSubSystem => [ SDL_InitFlags() ], Bool;
2635 _affix_and_export SDL_QuitSubSystem => [ SDL_InitFlags() ], Void;
2636 _affix_and_export SDL_WasInit => [ SDL_InitFlags() ], SDL_InitFlags();
2637 _affix_and_export SDL_Quit => [], Void;
2638 _affix_and_export SDL_IsMainThread => [], Bool;
2639 _typedef_and_export SDL_MainThreadCallback => Callback [ [ Pointer [Void] ] => Void ];
2640 _affix_and_export SDL_RunOnMainThread => [ SDL_MainThreadCallback(), Pointer [Void], Bool ], Bool;
2641 _affix_and_export SDL_SetAppMetadata => [ String, String, String ], Bool;
2642 _affix_and_export SDL_SetAppMetadataProperty => [ String, String ], Bool;
2643 _const_and_export SDL_PROP_APP_METADATA_NAME_STRING => 'SDL.app.metadata.name';
2644 _const_and_export SDL_PROP_APP_METADATA_VERSION_STRING => 'SDL.app.metadata.version';
2645 _const_and_export SDL_PROP_APP_METADATA_IDENTIFIER_STRING => 'SDL.app.metadata.identifier';
2646 _const_and_export SDL_PROP_APP_METADATA_CREATOR_STRING => 'SDL.app.metadata.creator';
2647 _const_and_export SDL_PROP_APP_METADATA_COPYRIGHT_STRING => 'SDL.app.metadata.copyright';
2648 _const_and_export SDL_PROP_APP_METADATA_URL_STRING => 'SDL.app.metadata.url';
2649 _const_and_export SDL_PROP_APP_METADATA_TYPE_STRING => 'SDL.app.metadata.type';
2650 _affix_and_export SDL_GetAppMetadataProperty => [String], String;
2651 }
2652  
2653 =head3 C<:iostream> - I/O Streams
2654  
2655 SDL provides an abstract interface for reading and writing data streams. It offers implementations for files, memory,
2656 etc, and the app can provide their own implementations, too.
2657  
2658 SDL_IOStream is not related to the standard C++ iostream class, other than both are abstract interfaces to read/write
2659 data.
2660  
2661 See L<SDL3: CategoryIOStream|https://wiki.libsdl.org/SDL3/CategoryIOStream>
2662  
2663 =cut
2664  
2665 sub _iostream() {
2666 state $done++ && return;
2667 _error();
2668 _properties();
2669 _stdinc();
2670 #
2671 _enum_and_export SDL_IOStatus => [
2672 'SDL_IO_STATUS_READY', 'SDL_IO_STATUS_ERROR', 'SDL_IO_STATUS_EOF', 'SDL_IO_STATUS_NOT_READY',
2673 'SDL_IO_STATUS_READONLY', 'SDL_IO_STATUS_WRITEONLY'
2674 ];
2675 _enum_and_export SDL_IOWhence => [ 'SDL_IO_SEEK_SET', 'SDL_IO_SEEK_CUR', 'SDL_IO_SEEK_END' ];
2676 _typedef_and_export SDL_IOStreamInterface => Struct [
2677 version => UInt32,
2678 size => Callback [ [ Pointer [Void] ] => SInt64 ],
2679 seek => Callback [ [ Pointer [Void], SInt64, SDL_IOWhence() ] => SInt64 ],
2680 read => Callback [ [ Pointer [Void], Pointer [Void], Size_t, Pointer [ SDL_IOStatus() ] ] => Size_t ],
2681 write => Callback [ [ Pointer [Void], Pointer [Void], Size_t, Pointer [ SDL_IOStatus() ] ] => Size_t ],
2682 flush => Callback [ [ Pointer [Void], Pointer [ SDL_IOStatus() ] ] => Bool ],
2683 close => Callback [ [ Pointer [Void] ] => Bool ]
2684 ];
2685 _typedef_and_export SDL_IOStream => Void;
2686 _affix_and_export SDL_IOFromFile => [ String, String ], Pointer [ SDL_IOStream() ];
2687 _const_and_export SDL_PROP_IOSTREAM_WINDOWS_HANDLE_POINTER => 'SDL.iostream.windows.handle';
2688 _const_and_export SDL_PROP_IOSTREAM_STDIO_FILE_POINTER => 'SDL.iostream.stdio.file';
2689 _const_and_export SDL_PROP_IOSTREAM_FILE_DESCRIPTOR_NUMBER => 'SDL.iostream.file_descriptor';
2690 _const_and_export SDL_PROP_IOSTREAM_ANDROID_AASSET_POINTER => 'SDL.iostream.android.aasset';
2691 _affix_and_export SDL_IOFromMem => [ Pointer [Void], Size_t ], Pointer [ SDL_IOStream() ];
2692 _const_and_export SDL_PROP_IOSTREAM_MEMORY_POINTER => 'SDL.iostream.memory.base';
2693 _const_and_export SDL_PROP_IOSTREAM_MEMORY_SIZE_NUMBER => 'SDL.iostream.memory.size';
2694 _const_and_export SDL_PROP_IOSTREAM_MEMORY_FREE_FUNC_POINTER => 'SDL.iostream.memory.free';
2695 _affix_and_export SDL_IOFromConstMem => [ Pointer [Void], Size_t ], Pointer [ SDL_IOStream() ];
2696 _affix_and_export SDL_IOFromDynamicMem => [], Pointer [ SDL_IOStream() ];
2697 _const_and_export SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER => 'SDL.iostream.dynamic.memory';
2698 _const_and_export SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER => 'SDL.iostream.dynamic.chunksize';
2699 _affix_and_export
2700 SDL_OpenIO => [ Pointer [ SDL_IOStreamInterface() ], Pointer [Void] ],
2701 Pointer [ SDL_IOStream() ];
2702 _affix_and_export SDL_CloseIO => [ Pointer [ SDL_IOStream() ] ], Bool;
2703 _affix_and_export SDL_GetIOProperties => [ Pointer [ SDL_IOStream() ] ], SDL_PropertiesID();
2704 _affix_and_export SDL_GetIOStatus => [ Pointer [ SDL_IOStream() ] ], SDL_IOStatus();
2705 _affix_and_export SDL_GetIOSize => [ Pointer [ SDL_IOStream() ] ], SInt64;
2706 _affix_and_export SDL_SeekIO => [ Pointer [ SDL_IOStream() ], SInt64, SDL_IOWhence() ], SInt64;
2707 _affix_and_export SDL_TellIO => [ Pointer [ SDL_IOStream() ] ], SInt64;
2708 _affix_and_export SDL_ReadIO => [ Pointer [ SDL_IOStream() ], Pointer [Void], Size_t ], Size_t;
2709 _affix_and_export SDL_WriteIO => [ Pointer [ SDL_IOStream() ], Pointer [Void], Size_t ], Size_t;
2710  
2711 #~ _affix_and_export SDL_IOprintf => [ Pointer [ SDL_IOStream() ], String, VarArgs ], Size_t;
2712 #~ _affix_and_export SDL_IOvprintf => [ Pointer [ SDL_IOStream() ], String, Pointer [Void] ], Size_t;
2713 _affix_and_export SDL_FlushIO => [ Pointer [ SDL_IOStream() ] ], Bool;
2714 _affix_and_export SDL_LoadFile_IO => [ Pointer [ SDL_IOStream() ], Pointer [Size_t], Bool ], Pointer [Void];
2715 _affix_and_export SDL_LoadFile => [ String, Pointer [Size_t] ], Pointer [Void];
2716 _affix_and_export SDL_SaveFile_IO => [ Pointer [ SDL_IOStream() ], Pointer [Void], Size_t, Bool ], Bool;
2717 _affix_and_export SDL_SaveFile => [ String, Pointer [Void], Size_t ], Bool;
2718 _affix_and_export SDL_ReadU8 => [ Pointer [ SDL_IOStream() ], Pointer [UInt8] ], Bool;
2719 _affix_and_export SDL_ReadS8 => [ Pointer [ SDL_IOStream() ], Pointer [SInt8] ], Bool;
2720 _affix_and_export SDL_ReadU16LE => [ Pointer [ SDL_IOStream() ], Pointer [UInt16] ], Bool;
2721 _affix_and_export SDL_ReadS16LE => [ Pointer [ SDL_IOStream() ], Pointer [SInt16] ], Bool;
2722 _affix_and_export SDL_ReadU16BE => [ Pointer [ SDL_IOStream() ], Pointer [UInt16] ], Bool;
2723 _affix_and_export SDL_ReadS16BE => [ Pointer [ SDL_IOStream() ], Pointer [SInt16] ], Bool;
2724 _affix_and_export SDL_ReadU32LE => [ Pointer [ SDL_IOStream() ], Pointer [UInt32] ], Bool;
2725 _affix_and_export SDL_ReadS32LE => [ Pointer [ SDL_IOStream() ], Pointer [SInt32] ], Bool;
2726 _affix_and_export SDL_ReadU32BE => [ Pointer [ SDL_IOStream() ], Pointer [UInt32] ], Bool;
2727 _affix_and_export SDL_ReadS32BE => [ Pointer [ SDL_IOStream() ], Pointer [SInt32] ], Bool;
2728 _affix_and_export SDL_ReadU64LE => [ Pointer [ SDL_IOStream() ], Pointer [UInt64] ], Bool;
2729 _affix_and_export SDL_ReadS64LE => [ Pointer [ SDL_IOStream() ], Pointer [SInt64] ], Bool;
2730 _affix_and_export SDL_ReadU64BE => [ Pointer [ SDL_IOStream() ], Pointer [UInt64] ], Bool;
2731 _affix_and_export SDL_ReadS64BE => [ Pointer [ SDL_IOStream() ], Pointer [SInt64] ], Bool;
2732 _affix_and_export SDL_WriteU8 => [ Pointer [ SDL_IOStream() ], UInt8 ], Bool;
2733 _affix_and_export SDL_WriteS8 => [ Pointer [ SDL_IOStream() ], SInt8 ], Bool;
2734 _affix_and_export SDL_WriteU16LE => [ Pointer [ SDL_IOStream() ], UInt16 ], Bool;
2735 _affix_and_export SDL_WriteS16LE => [ Pointer [ SDL_IOStream() ], SInt16 ], Bool;
2736 _affix_and_export SDL_WriteU16BE => [ Pointer [ SDL_IOStream() ], UInt16 ], Bool;
2737 _affix_and_export SDL_WriteS16BE => [ Pointer [ SDL_IOStream() ], SInt16 ], Bool;
2738 _affix_and_export SDL_WriteU32LE => [ Pointer [ SDL_IOStream() ], UInt32 ], Bool;
2739 _affix_and_export SDL_WriteS32LE => [ Pointer [ SDL_IOStream() ], SInt32 ], Bool;
2740 _affix_and_export SDL_WriteU32BE => [ Pointer [ SDL_IOStream() ], UInt32 ], Bool;
2741 _affix_and_export SDL_WriteS32BE => [ Pointer [ SDL_IOStream() ], SInt32 ], Bool;
2742 _affix_and_export SDL_WriteU64LE => [ Pointer [ SDL_IOStream() ], UInt64 ], Bool;
2743 _affix_and_export SDL_WriteS64LE => [ Pointer [ SDL_IOStream() ], SInt64 ], Bool;
2744 _affix_and_export SDL_WriteU64BE => [ Pointer [ SDL_IOStream() ], UInt64 ], Bool;
2745 _affix_and_export SDL_WriteS64BE => [ Pointer [ SDL_IOStream() ], SInt64 ], Bool;
2746 }
2747  
2748 =head3 C<:joystick> - Joystick Support
2749  
2750 SDL joystick support.
2751  
2752 This is the lower-level joystick handling. If you want the simpler option, where what each button does is well-defined,
2753 you should use the gamepad API instead.
2754  
2755 See L<SDL3: CategoryJoystick|https://wiki.libsdl.org/SDL3/CategoryJoystick>
2756  
2757 =cut
2758  
2759 sub _joystick() {
2760 state $done++ && return;
2761 _error();
2762 _guid();
2763 _mutex();
2764 _power();
2765 _properties();
2766 _sensor();
2767 _stdinc();
2768 #
2769 _typedef_and_export SDL_Joystick => Void;
2770 _typedef_and_export SDL_JoystickID => UInt32;
2771 _enum_and_export SDL_JoystickType => [
2772 'SDL_JOYSTICK_TYPE_UNKNOWN', 'SDL_JOYSTICK_TYPE_GAMEPAD', 'SDL_JOYSTICK_TYPE_WHEEL', 'SDL_JOYSTICK_TYPE_ARCADE_STICK',
2773 'SDL_JOYSTICK_TYPE_FLIGHT_STICK', 'SDL_JOYSTICK_TYPE_DANCE_PAD', 'SDL_JOYSTICK_TYPE_GUITAR', 'SDL_JOYSTICK_TYPE_DRUM_KIT',
2774 'SDL_JOYSTICK_TYPE_ARCADE_PAD', 'SDL_JOYSTICK_TYPE_THROTTLE', 'SDL_JOYSTICK_TYPE_COUNT'
2775 ];
2776 _enum_and_export SDL_JoystickConnectionState => [
2777 [ SDL_JOYSTICK_CONNECTION_INVALID => -1 ], 'SDL_JOYSTICK_CONNECTION_UNKNOWN',
2778 'SDL_JOYSTICK_CONNECTION_WIRED', 'SDL_JOYSTICK_CONNECTION_WIRELESS'
2779 ];
2780 _const_and_export SDL_JOYSTICK_AXIS_MAX => 32767;
2781 _const_and_export SDL_JOYSTICK_AXIS_MIN => -32768;
2782 _affix_and_export SDL_LockJoysticks => [], Void;
2783 _affix_and_export SDL_UnlockJoysticks => [], Void;
2784 _affix_and_export SDL_HasJoystick => [], Bool;
2785 _affix_and_export SDL_GetJoysticks => [ Pointer [Int] ], Pointer [ SDL_JoystickID() ];
2786 _affix_and_export SDL_GetJoystickNameForID => [ SDL_JoystickID() ], String;
2787 _affix_and_export SDL_GetJoystickPathForID => [ SDL_JoystickID() ], String;
2788 _affix_and_export SDL_GetJoystickPlayerIndexForID => [ SDL_JoystickID() ], Int;
2789 _affix_and_export SDL_GetJoystickGUIDForID => [ SDL_JoystickID() ], SDL_GUID();
2790 _affix_and_export SDL_GetJoystickVendorForID => [ SDL_JoystickID() ], UInt16;
2791 _affix_and_export SDL_GetJoystickProductForID => [ SDL_JoystickID() ], UInt16;
2792 _affix_and_export SDL_GetJoystickProductVersionForID => [ SDL_JoystickID() ], UInt16;
2793 _affix_and_export SDL_GetJoystickTypeForID => [ SDL_JoystickID() ], SDL_JoystickType();
2794 _affix_and_export SDL_OpenJoystick => [ SDL_JoystickID() ], Pointer [ SDL_Joystick() ];
2795 _affix_and_export SDL_GetJoystickFromID => [ SDL_JoystickID() ], Pointer [ SDL_Joystick() ];
2796 _affix_and_export SDL_GetJoystickFromPlayerIndex => [Int], Pointer [ SDL_Joystick() ];
2797 _typedef_and_export SDL_VirtualJoystickTouchpadDesc => Struct [ nfingers => UInt16, padding => Array [ UInt16, 3 ] ];
2798 _typedef_and_export SDL_VirtualJoystickSensorDesc => Struct [ type => SDL_SensorType(), rate => Float ];
2799 _typedef_and_export SDL_VirtualJoystickDesc => Struct [
2800 version => UInt32,
2801 type => UInt16,
2802 padding => UInt16,
2803 vendor_id => UInt16,
2804 product_id => UInt16,
2805 naxes => UInt16,
2806 nbuttons => UInt16,
2807 nballs => UInt16,
2808 nhats => UInt16,
2809 ntouchpads => UInt16,
2810 nsensors => UInt16,
2811 padding2 => Array [ UInt16, 2 ],
2812 button_mask => UInt32,
2813 axis_mask => UInt32,
2814 name => String,
2815 touchpads => Pointer [ SDL_VirtualJoystickTouchpadDesc() ],
2816 sensors => Pointer [ SDL_VirtualJoystickSensorDesc() ],
2817 userdata => Pointer [Void],
2818 Update => Callback [ [ Pointer [Void] ] => Void ],
2819 SetPlayerIndex => Callback [ [ Pointer [Void], Int ] => Void ],
2820 Rumble => Callback [ [ Pointer [Void], UInt16, UInt16 ] => Bool ],
2821 RumbleTriggers => Callback [ [ Pointer [Void], UInt16, UInt16 ] => Bool ],
2822 SetLED => Callback [ [ Pointer [Void], UInt8, UInt8, UInt8 ] => Bool ],
2823 SendEffect => Callback [ [ Pointer [Void], Pointer [Void], Int ] => Bool ],
2824 SetSensorsEnabled => Callback [ [ Pointer [Void], Bool ] => Bool ],
2825 Cleanup => Callback [ [ Pointer [Void] ] => Void ]
2826 ];
2827 _affix_and_export SDL_AttachVirtualJoystick => [ Pointer [ SDL_VirtualJoystickDesc() ] ], SDL_JoystickID();
2828 _affix_and_export SDL_DetachVirtualJoystick => [ SDL_JoystickID() ], Bool;
2829 _affix_and_export SDL_IsJoystickVirtual => [ SDL_JoystickID() ], Bool;
2830 _affix_and_export SDL_SetJoystickVirtualAxis => [ Pointer [ SDL_Joystick() ], Int, SInt16 ], Bool;
2831 _affix_and_export SDL_SetJoystickVirtualBall => [ Pointer [ SDL_Joystick() ], Int, SInt16, SInt16 ], Bool;
2832 _affix_and_export SDL_SetJoystickVirtualButton => [ Pointer [ SDL_Joystick() ], Int, Bool ], Bool;
2833 _affix_and_export SDL_SetJoystickVirtualHat => [ Pointer [ SDL_Joystick() ], Int, UInt8 ], Bool;
2834 _affix_and_export SDL_SetJoystickVirtualTouchpad => [ Pointer [ SDL_Joystick() ], Int, Int, Bool, Float, Float, Float ], Bool;
2835 _affix_and_export
2836 SDL_SendJoystickVirtualSensorData => [ Pointer [ SDL_Joystick() ], SDL_SensorType(), UInt64, Pointer [Float], Int ],
2837 Bool;
2838 _affix_and_export SDL_GetJoystickProperties => [ Pointer [ SDL_Joystick() ] ], SDL_PropertiesID();
2839 _const_and_export SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN => 'SDL.joystick.cap.mono_led';
2840 _const_and_export SDL_PROP_JOYSTICK_CAP_RGB_LED_BOOLEAN => 'SDL.joystick.cap.rgb_led';
2841 _const_and_export SDL_PROP_JOYSTICK_CAP_PLAYER_LED_BOOLEAN => 'SDL.joystick.cap.player_led';
2842 _const_and_export SDL_PROP_JOYSTICK_CAP_RUMBLE_BOOLEAN => 'SDL.joystick.cap.rumble';
2843 _const_and_export SDL_PROP_JOYSTICK_CAP_TRIGGER_RUMBLE_BOOLEAN => 'SDL.joystick.cap.trigger_rumble';
2844 _affix_and_export SDL_GetJoystickName => [ Pointer [ SDL_Joystick() ] ], String;
2845 _affix_and_export SDL_GetJoystickPath => [ Pointer [ SDL_Joystick() ] ], String;
2846 _affix_and_export SDL_GetJoystickPlayerIndex => [ Pointer [ SDL_Joystick() ] ], Int;
2847 _affix_and_export SDL_SetJoystickPlayerIndex => [ Pointer [ SDL_Joystick() ], Int ], Bool;
2848 _affix_and_export SDL_GetJoystickGUID => [ Pointer [ SDL_Joystick() ] ], SDL_GUID();
2849 _affix_and_export SDL_GetJoystickVendor => [ Pointer [ SDL_Joystick() ] ], UInt16;
2850 _affix_and_export SDL_GetJoystickProduct => [ Pointer [ SDL_Joystick() ] ], UInt16;
2851 _affix_and_export SDL_GetJoystickProductVersion => [ Pointer [ SDL_Joystick() ] ], UInt16;
2852 _affix_and_export SDL_GetJoystickFirmwareVersion => [ Pointer [ SDL_Joystick() ] ], UInt16;
2853 _affix_and_export SDL_GetJoystickSerial => [ Pointer [ SDL_Joystick() ] ], String;
2854 _affix_and_export SDL_GetJoystickType => [ Pointer [ SDL_Joystick() ] ], SDL_JoystickType();
2855 _affix_and_export
2856 SDL_GetJoystickGUIDInfo => [ SDL_GUID(), Pointer [UInt16], Pointer [UInt16], Pointer [UInt16], Pointer [UInt16] ],
2857 Void;
2858 _affix_and_export SDL_JoystickConnected => [ Pointer [ SDL_Joystick() ] ], Bool;
2859 _affix_and_export SDL_GetJoystickID => [ Pointer [ SDL_Joystick() ] ], SDL_JoystickID();
2860 _affix_and_export SDL_GetNumJoystickAxes => [ Pointer [ SDL_Joystick() ] ], Int;
2861 _affix_and_export SDL_GetNumJoystickBalls => [ Pointer [ SDL_Joystick() ] ], Int;
2862 _affix_and_export SDL_GetNumJoystickHats => [ Pointer [ SDL_Joystick() ] ], Int;
2863 _affix_and_export SDL_GetNumJoystickButtons => [ Pointer [ SDL_Joystick() ] ], Int;
2864 _affix_and_export SDL_SetJoystickEventsEnabled => [Bool], Void;
2865 _affix_and_export SDL_JoystickEventsEnabled => [], Bool;
2866 _affix_and_export SDL_UpdateJoysticks => [], Void;
2867 _affix_and_export SDL_GetJoystickAxis => [ Pointer [ SDL_Joystick() ], Int ], SInt16;
2868 _affix_and_export SDL_GetJoystickAxisInitialState => [ Pointer [ SDL_Joystick() ], Int, Pointer [SInt16] ], Bool;
2869 _affix_and_export SDL_GetJoystickBall => [ Pointer [ SDL_Joystick() ], Int, Pointer [Int], Pointer [Int] ], Bool;
2870 _affix_and_export SDL_GetJoystickHat => [ Pointer [ SDL_Joystick() ], Int ], UInt8;
2871 _const_and_export SDL_HAT_CENTERED => 0x00;
2872 _const_and_export SDL_HAT_UP => 0x01;
2873 _const_and_export SDL_HAT_RIGHT => 0x02;
2874 _const_and_export SDL_HAT_DOWN => 0x04;
2875 _const_and_export SDL_HAT_LEFT => 0x08;
2876 _const_and_export SDL_HAT_RIGHTUP => 0x03;
2877 _const_and_export SDL_HAT_RIGHTDOWN => 0x06;
2878 _const_and_export SDL_HAT_LEFTUP => 0x09;
2879 _const_and_export SDL_HAT_LEFTDOWN => 0x0C;
2880 _affix_and_export SDL_GetJoystickButton => [ Pointer [ SDL_Joystick() ], Int ], Bool;
2881 _affix_and_export SDL_RumbleJoystick => [ Pointer [ SDL_Joystick() ], UInt16, UInt16, UInt32 ], Bool;
2882 _affix_and_export SDL_RumbleJoystickTriggers => [ Pointer [ SDL_Joystick() ], UInt16, UInt16, UInt32 ], Bool;
2883 _affix_and_export SDL_SetJoystickLED => [ Pointer [ SDL_Joystick() ], UInt8, UInt8, UInt8 ], Bool;
2884 _affix_and_export SDL_SendJoystickEffect => [ Pointer [ SDL_Joystick() ], Pointer [Void], Int ], Bool;
2885 _affix_and_export SDL_CloseJoystick => [ Pointer [ SDL_Joystick() ] ], Void;
2886 _affix_and_export SDL_GetJoystickConnectionState => [ Pointer [ SDL_Joystick() ] ], SDL_JoystickConnectionState();
2887 _affix_and_export SDL_GetJoystickPowerInfo => [ Pointer [ SDL_Joystick() ], Pointer [Int] ], SDL_PowerState();
2888 }
2889  
2890 =head3 C<:keyboard> - Keyboard Support
2891  
2892 SDL keyboard management.
2893  
2894 See L<SDL3: CategoryKeyboard|https://wiki.libsdl.org/SDL3/CategoryKeyboard>
2895  
2896 =cut
2897  
2898 sub _keyboard() {
2899 state $done++ && return;
2900 _error();
2901 _keycode();
2902 _properties();
2903 _rect();
2904 _scancode();
2905 _stdinc();
2906 _video();
2907 #
2908 _typedef_and_export SDL_KeyboardID => UInt32;
2909 _affix_and_export SDL_HasKeyboard => [], Bool;
2910 _affix_and_export SDL_GetKeyboards => [ Pointer [Int] ], Pointer [ SDL_KeyboardID() ];
2911 _affix_and_export SDL_GetKeyboardNameForID => [ SDL_KeyboardID() ], String;
2912 _affix_and_export SDL_GetKeyboardFocus => [], Pointer [ SDL_Window() ];
2913 _affix_and_export SDL_GetKeyboardState => [ Pointer [Int] ], Pointer [Bool];
2914 _affix_and_export SDL_ResetKeyboard => [], Void;
2915 _affix_and_export SDL_GetModState => [], SDL_Keymod();
2916 _affix_and_export SDL_SetModState => [ SDL_Keymod() ], Void;
2917 _affix_and_export SDL_GetKeyFromScancode => [ SDL_Scancode(), SDL_Keymod(), Bool ], SDL_Keycode();
2918 _affix_and_export SDL_GetScancodeFromKey => [ SDL_Keycode(), Pointer [ SDL_Keymod() ] ], SDL_Scancode();
2919 _affix_and_export SDL_SetScancodeName => [ SDL_Scancode(), String ], Bool;
2920 _affix_and_export SDL_GetScancodeName => [ SDL_Scancode() ], String;
2921 _affix_and_export SDL_GetScancodeFromName => [String], SDL_Scancode();
2922 _affix_and_export SDL_GetKeyName => [ SDL_Keycode() ], String;
2923 _affix_and_export SDL_GetKeyFromName => [String], SDL_Keycode();
2924 _affix_and_export SDL_StartTextInput => [ Pointer [ SDL_Window() ] ], Bool;
2925 _enum_and_export SDL_TextInputType => [
2926 'SDL_TEXTINPUT_TYPE_TEXT', 'SDL_TEXTINPUT_TYPE_TEXT_NAME',
2927 'SDL_TEXTINPUT_TYPE_TEXT_EMAIL', 'SDL_TEXTINPUT_TYPE_TEXT_USERNAME',
2928 'SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_HIDDEN', 'SDL_TEXTINPUT_TYPE_TEXT_PASSWORD_VISIBLE',
2929 'SDL_TEXTINPUT_TYPE_NUMBER', 'SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_HIDDEN',
2930 'SDL_TEXTINPUT_TYPE_NUMBER_PASSWORD_VISIBLE'
2931 ];
2932 _enum_and_export SDL_Capitalization =>
2933 [ 'SDL_CAPITALIZE_NONE', 'SDL_CAPITALIZE_SENTENCES', 'SDL_CAPITALIZE_WORDS', 'SDL_CAPITALIZE_LETTERS' ];
2934 _affix_and_export SDL_StartTextInputWithProperties => [ Pointer [ SDL_Window() ], SDL_PropertiesID() ], Bool;
2935 _const_and_export SDL_PROP_TEXTINPUT_TYPE_NUMBER => 'SDL.textinput.type';
2936 _const_and_export SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER => 'SDL.textinput.capitalization';
2937 _const_and_export SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN => 'SDL.textinput.autocorrect';
2938 _const_and_export SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN => 'SDL.textinput.multiline';
2939 _const_and_export SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER => 'SDL.textinput.android.inputtype';
2940 _affix_and_export SDL_TextInputActive => [ Pointer [ SDL_Window() ] ], Bool;
2941 _affix_and_export SDL_StopTextInput => [ Pointer [ SDL_Window() ] ], Bool;
2942 _affix_and_export SDL_ClearComposition => [ Pointer [ SDL_Window() ] ], Bool;
2943 _affix_and_export SDL_SetTextInputArea => [ Pointer [ SDL_Window() ], Pointer [ SDL_Rect() ], Int ], Bool;
2944 _affix_and_export SDL_GetTextInputArea => [ Pointer [ SDL_Window() ], Pointer [ SDL_Rect() ], Pointer [Int] ], Bool;
2945 _affix_and_export SDL_HasScreenKeyboardSupport => [], Bool;
2946 _affix_and_export SDL_ScreenKeyboardShown => [ Pointer [ SDL_Window() ] ], Bool;
2947 }
2948  
2949 =head3 C<:keycode> - Keyboard Keycodes
2950  
2951 Defines constants which identify keyboard keys and modifiers.
2952  
2953 See L<SDL3: CategoryKeycode|https://wiki.libsdl.org/SDL3/CategoryKeycode>
2954  
2955 =cut
2956  
2957 sub _keycode() { # Based on sdl-main/include/sdl3/sdl_keycode.h
2958 state $done++ && return;
2959 #
2960 _scancode();
2961 _stdinc();
2962 #
2963 _typedef_and_export SDL_Keycode => UInt32;
2964 _const_and_export SDLK_EXTENDED_MASK => ( 1 << 29 );
2965 _const_and_export SDLK_SCANCODE_MASK => ( 1 << 30 );
2966 _func_and_export( SDL_SCANCODE_TO_KEYCODE => sub ($X) { ( $X | SDLK_SCANCODE_MASK() ) } );
2967 _const_and_export SDLK_UNKNOWN => 0x00000000;
2968 _const_and_export SDLK_RETURN => 0x0000000d;
2969 _const_and_export SDLK_ESCAPE => 0x0000001b;
2970 _const_and_export SDLK_BACKSPACE => 0x00000008;
2971 _const_and_export SDLK_TAB => 0x00000009;
2972 _const_and_export SDLK_SPACE => 0x00000020;
2973 _const_and_export SDLK_EXCLAIM => 0x00000021;
2974 _const_and_export SDLK_DBLAPOSTROPHE => 0x00000022;
2975 _const_and_export SDLK_HASH => 0x00000023;
2976 _const_and_export SDLK_DOLLAR => 0x00000024;
2977 _const_and_export SDLK_PERCENT => 0x00000025;
2978 _const_and_export SDLK_AMPERSAND => 0x00000026;
2979 _const_and_export SDLK_APOSTROPHE => 0x00000027;
2980 _const_and_export SDLK_LEFTPAREN => 0x00000028;
2981 _const_and_export SDLK_RIGHTPAREN => 0x00000029;
2982 _const_and_export SDLK_ASTERISK => 0x0000002a;
2983 _const_and_export SDLK_PLUS => 0x0000002b;
2984 _const_and_export SDLK_COMMA => 0x0000002c;
2985 _const_and_export SDLK_MINUS => 0x0000002d;
2986 _const_and_export SDLK_PERIOD => 0x0000002e;
2987 _const_and_export SDLK_SLASH => 0x0000002f;
2988 _const_and_export SDLK_0 => 0x00000030;
2989 _const_and_export SDLK_1 => 0x00000031;
2990 _const_and_export SDLK_2 => 0x00000032;
2991 _const_and_export SDLK_3 => 0x00000033;
2992 _const_and_export SDLK_4 => 0x00000034;
2993 _const_and_export SDLK_5 => 0x00000035;
2994 _const_and_export SDLK_6 => 0x00000036;
2995 _const_and_export SDLK_7 => 0x00000037;
2996 _const_and_export SDLK_8 => 0x00000038;
2997 _const_and_export SDLK_9 => 0x00000039;
2998 _const_and_export SDLK_COLON => 0x0000003a;
2999 _const_and_export SDLK_SEMICOLON => 0x0000003b;
3000 _const_and_export SDLK_LESS => 0x0000003c;
3001 _const_and_export SDLK_EQUALS => 0x0000003d;
3002 _const_and_export SDLK_GREATER => 0x0000003e;
3003 _const_and_export SDLK_QUESTION => 0x0000003f;
3004 _const_and_export SDLK_AT => 0x00000040;
3005 _const_and_export SDLK_LEFTBRACKET => 0x0000005b;
3006 _const_and_export SDLK_BACKSLASH => 0x0000005c;
3007 _const_and_export SDLK_RIGHTBRACKET => 0x0000005d;
3008 _const_and_export SDLK_CARET => 0x0000005e;
3009 _const_and_export SDLK_UNDERSCORE => 0x0000005f;
3010 _const_and_export SDLK_GRAVE => 0x00000060;
3011 _const_and_export SDLK_A => 0x00000061;
3012 _const_and_export SDLK_B => 0x00000062;
3013 _const_and_export SDLK_C => 0x00000063;
3014 _const_and_export SDLK_D => 0x00000064;
3015 _const_and_export SDLK_E => 0x00000065;
3016 _const_and_export SDLK_F => 0x00000066;
3017 _const_and_export SDLK_G => 0x00000067;
3018 _const_and_export SDLK_H => 0x00000068;
3019 _const_and_export SDLK_I => 0x00000069;
3020 _const_and_export SDLK_J => 0x0000006a;
3021 _const_and_export SDLK_K => 0x0000006b;
3022 _const_and_export SDLK_L => 0x0000006c;
3023 _const_and_export SDLK_M => 0x0000006d;
3024 _const_and_export SDLK_N => 0x0000006e;
3025 _const_and_export SDLK_O => 0x0000006f;
3026 _const_and_export SDLK_P => 0x00000070;
3027 _const_and_export SDLK_Q => 0x00000071;
3028 _const_and_export SDLK_R => 0x00000072;
3029 _const_and_export SDLK_S => 0x00000073;
3030 _const_and_export SDLK_T => 0x00000074;
3031 _const_and_export SDLK_U => 0x00000075;
3032 _const_and_export SDLK_V => 0x00000076;
3033 _const_and_export SDLK_W => 0x00000077;
3034 _const_and_export SDLK_X => 0x00000078;
3035 _const_and_export SDLK_Y => 0x00000079;
3036 _const_and_export SDLK_Z => 0x0000007a;
3037 _const_and_export SDLK_LEFTBRACE => 0x0000007b;
3038 _const_and_export SDLK_PIPE => 0x0000007c;
3039 _const_and_export SDLK_RIGHTBRACE => 0x0000007d;
3040 _const_and_export SDLK_TILDE => 0x0000007e;
3041 _const_and_export SDLK_DELETE => 0x0000007f;
3042 _const_and_export SDLK_PLUSMINUS => 0x000000b1;
3043 _const_and_export SDLK_CAPSLOCK => 0x40000039;
3044 _const_and_export SDLK_F1 => 0x4000003a;
3045 _const_and_export SDLK_F2 => 0x4000003b;
3046 _const_and_export SDLK_F3 => 0x4000003c;
3047 _const_and_export SDLK_F4 => 0x4000003d;
3048 _const_and_export SDLK_F5 => 0x4000003e;
3049 _const_and_export SDLK_F6 => 0x4000003f;
3050 _const_and_export SDLK_F7 => 0x40000040;
3051 _const_and_export SDLK_F8 => 0x40000041;
3052 _const_and_export SDLK_F9 => 0x40000042;
3053 _const_and_export SDLK_F10 => 0x40000043;
3054 _const_and_export SDLK_F11 => 0x40000044;
3055 _const_and_export SDLK_F12 => 0x40000045;
3056 _const_and_export SDLK_PRINTSCREEN => 0x40000046;
3057 _const_and_export SDLK_SCROLLLOCK => 0x40000047;
3058 _const_and_export SDLK_PAUSE => 0x40000048;
3059 _const_and_export SDLK_INSERT => 0x40000049;
3060 _const_and_export SDLK_HOME => 0x4000004a;
3061 _const_and_export SDLK_PAGEUP => 0x4000004b;
3062 _const_and_export SDLK_END => 0x4000004d;
3063 _const_and_export SDLK_PAGEDOWN => 0x4000004e;
3064 _const_and_export SDLK_RIGHT => 0x4000004f;
3065 _const_and_export SDLK_LEFT => 0x40000050;
3066 _const_and_export SDLK_DOWN => 0x40000051;
3067 _const_and_export SDLK_UP => 0x40000052;
3068 _const_and_export SDLK_NUMLOCKCLEAR => 0x40000053;
3069 _const_and_export SDLK_KP_DIVIDE => 0x40000054;
3070 _const_and_export SDLK_KP_MULTIPLY => 0x40000055;
3071 _const_and_export SDLK_KP_MINUS => 0x40000056;
3072 _const_and_export SDLK_KP_PLUS => 0x40000057;
3073 _const_and_export SDLK_KP_ENTER => 0x40000058;
3074 _const_and_export SDLK_KP_1 => 0x40000059;
3075 _const_and_export SDLK_KP_2 => 0x4000005a;
3076 _const_and_export SDLK_KP_3 => 0x4000005b;
3077 _const_and_export SDLK_KP_4 => 0x4000005c;
3078 _const_and_export SDLK_KP_5 => 0x4000005d;
3079 _const_and_export SDLK_KP_6 => 0x4000005e;
3080 _const_and_export SDLK_KP_7 => 0x4000005f;
3081 _const_and_export SDLK_KP_8 => 0x40000060;
3082 _const_and_export SDLK_KP_9 => 0x40000061;
3083 _const_and_export SDLK_KP_0 => 0x40000062;
3084 _const_and_export SDLK_KP_PERIOD => 0x40000063;
3085 _const_and_export SDLK_APPLICATION => 0x40000065;
3086 _const_and_export SDLK_POWER => 0x40000066;
3087 _const_and_export SDLK_KP_EQUALS => 0x40000067;
3088 _const_and_export SDLK_F13 => 0x40000068;
3089 _const_and_export SDLK_F14 => 0x40000069;
3090 _const_and_export SDLK_F15 => 0x4000006a;
3091 _const_and_export SDLK_F16 => 0x4000006b;
3092 _const_and_export SDLK_F17 => 0x4000006c;
3093 _const_and_export SDLK_F18 => 0x4000006d;
3094 _const_and_export SDLK_F19 => 0x4000006e;
3095 _const_and_export SDLK_F20 => 0x4000006f;
3096 _const_and_export SDLK_F21 => 0x40000070;
3097 _const_and_export SDLK_F22 => 0x40000071;
3098 _const_and_export SDLK_F23 => 0x40000072;
3099 _const_and_export SDLK_F24 => 0x40000073;
3100 _const_and_export SDLK_EXECUTE => 0x40000074;
3101 _const_and_export SDLK_HELP => 0x40000075;
3102 _const_and_export SDLK_MENU => 0x40000076;
3103 _const_and_export SDLK_SELECT => 0x40000077;
3104 _const_and_export SDLK_STOP => 0x40000078;
3105 _const_and_export SDLK_AGAIN => 0x40000079;
3106 _const_and_export SDLK_UNDO => 0x4000007a;
3107 _const_and_export SDLK_CUT => 0x4000007b;
3108 _const_and_export SDLK_COPY => 0x4000007c;
3109 _const_and_export SDLK_PASTE => 0x4000007d;
3110 _const_and_export SDLK_FIND => 0x4000007e;
3111 _const_and_export SDLK_MUTE => 0x4000007f;
3112 _const_and_export SDLK_VOLUMEUP => 0x40000080;
3113 _const_and_export SDLK_VOLUMEDOWN => 0x40000081;
3114 _const_and_export SDLK_KP_COMMA => 0x40000085;
3115 _const_and_export SDLK_KP_EQUALSAS400 => 0x40000086;
3116 _const_and_export SDLK_ALTERASE => 0x40000099;
3117 _const_and_export SDLK_SYSREQ => 0x4000009a;
3118 _const_and_export SDLK_CANCEL => 0x4000009b;
3119 _const_and_export SDLK_CLEAR => 0x4000009c;
3120 _const_and_export SDLK_PRIOR => 0x4000009d;
3121 _const_and_export SDLK_RETURN2 => 0x4000009e;
3122 _const_and_export SDLK_SEPARATOR => 0x4000009f;
3123 _const_and_export SDLK_OUT => 0x400000a0;
3124 _const_and_export SDLK_OPER => 0x400000a1;
3125 _const_and_export SDLK_CLEARAGAIN => 0x400000a2;
3126 _const_and_export SDLK_CRSEL => 0x400000a3;
3127 _const_and_export SDLK_EXSEL => 0x400000a4;
3128 _const_and_export SDLK_KP_00 => 0x400000b0;
3129 _const_and_export SDLK_KP_000 => 0x400000b1;
3130 _const_and_export SDLK_THOUSANDSSEPARATOR => 0x400000b2;
3131 _const_and_export SDLK_DECIMALSEPARATOR => 0x400000b3;
3132 _const_and_export SDLK_CURRENCYUNIT => 0x400000b4;
3133 _const_and_export SDLK_CURRENCYSUBUNIT => 0x400000b5;
3134 _const_and_export SDLK_KP_LEFTPAREN => 0x400000b6;
3135 _const_and_export SDLK_KP_RIGHTPAREN => 0x400000b7;
3136 _const_and_export SDLK_KP_LEFTBRACE => 0x400000b8;
3137 _const_and_export SDLK_KP_RIGHTBRACE => 0x400000b9;
3138 _const_and_export SDLK_KP_TAB => 0x400000ba;
3139 _const_and_export SDLK_KP_BACKSPACE => 0x400000bb;
3140 _const_and_export SDLK_KP_A => 0x400000bc;
3141 _const_and_export SDLK_KP_B => 0x400000bd;
3142 _const_and_export SDLK_KP_C => 0x400000be;
3143 _const_and_export SDLK_KP_D => 0x400000bf;
3144 _const_and_export SDLK_KP_E => 0x400000c0;
3145 _const_and_export SDLK_KP_F => 0x400000c1;
3146 _const_and_export SDLK_KP_XOR => 0x400000c2;
3147 _const_and_export SDLK_KP_POWER => 0x400000c3;
3148 _const_and_export SDLK_KP_PERCENT => 0x400000c4;
3149 _const_and_export SDLK_KP_LESS => 0x400000c5;
3150 _const_and_export SDLK_KP_GREATER => 0x400000c6;
3151 _const_and_export SDLK_KP_AMPERSAND => 0x400000c7;
3152 _const_and_export SDLK_KP_DBLAMPERSAND => 0x400000c8;
3153 _const_and_export SDLK_KP_VERTICALBAR => 0x400000c9;
3154 _const_and_export SDLK_KP_DBLVERTICALBAR => 0x400000ca;
3155 _const_and_export SDLK_KP_COLON => 0x400000cb;
3156 _const_and_export SDLK_KP_HASH => 0x400000cc;
3157 _const_and_export SDLK_KP_SPACE => 0x400000cd;
3158 _const_and_export SDLK_KP_AT => 0x400000ce;
3159 _const_and_export SDLK_KP_EXCLAM => 0x400000cf;
3160 _const_and_export SDLK_KP_MEMSTORE => 0x400000d0;
3161 _const_and_export SDLK_KP_MEMRECALL => 0x400000d1;
3162 _const_and_export SDLK_KP_MEMCLEAR => 0x400000d2;
3163 _const_and_export SDLK_KP_MEMADD => 0x400000d3;
3164 _const_and_export SDLK_KP_MEMSUBTRACT => 0x400000d4;
3165 _const_and_export SDLK_KP_MEMMULTIPLY => 0x400000d5;
3166 _const_and_export SDLK_KP_MEMDIVIDE => 0x400000d6;
3167 _const_and_export SDLK_KP_PLUSMINUS => 0x400000d7;
3168 _const_and_export SDLK_KP_CLEAR => 0x400000d8;
3169 _const_and_export SDLK_KP_CLEARENTRY => 0x400000d9;
3170 _const_and_export SDLK_KP_BINARY => 0x400000da;
3171 _const_and_export SDLK_KP_OCTAL => 0x400000db;
3172 _const_and_export SDLK_KP_DECIMAL => 0x400000dc;
3173 _const_and_export SDLK_KP_HEXADECIMAL => 0x400000dd;
3174 _const_and_export SDLK_LCTRL => 0x400000e0;
3175 _const_and_export SDLK_LSHIFT => 0x400000e1;
3176 _const_and_export SDLK_LALT => 0x400000e2;
3177 _const_and_export SDLK_LGUI => 0x400000e3;
3178 _const_and_export SDLK_RCTRL => 0x400000e4;
3179 _const_and_export SDLK_RSHIFT => 0x400000e5;
3180 _const_and_export SDLK_RALT => 0x400000e6;
3181 _const_and_export SDLK_RGUI => 0x400000e7;
3182 _const_and_export SDLK_MODE => 0x40000101;
3183 _const_and_export SDLK_SLEEP => 0x40000102;
3184 _const_and_export SDLK_WAKE => 0x40000103;
3185 _const_and_export SDLK_CHANNEL_INCREMENT => 0x40000104;
3186 _const_and_export SDLK_CHANNEL_DECREMENT => 0x40000105;
3187 _const_and_export SDLK_MEDIA_PLAY => 0x40000106;
3188 _const_and_export SDLK_MEDIA_PAUSE => 0x40000107;
3189 _const_and_export SDLK_MEDIA_RECORD => 0x40000108;
3190 _const_and_export SDLK_MEDIA_FAST_FORWARD => 0x40000109;
3191 _const_and_export SDLK_MEDIA_REWIND => 0x4000010a;
3192 _const_and_export SDLK_MEDIA_NEXT_TRACK => 0x4000010b;
3193 _const_and_export SDLK_MEDIA_PREVIOUS_TRACK => 0x4000010c;
3194 _const_and_export SDLK_MEDIA_STOP => 0x4000010d;
3195 _const_and_export SDLK_MEDIA_EJECT => 0x4000010e;
3196 _const_and_export SDLK_MEDIA_PLAY_PAUSE => 0x4000010f;
3197 _const_and_export SDLK_MEDIA_SELECT => 0x40000110;
3198 _const_and_export SDLK_AC_NEW => 0x40000111;
3199 _const_and_export SDLK_AC_OPEN => 0x40000112;
3200 _const_and_export SDLK_AC_CLOSE => 0x40000113;
3201 _const_and_export SDLK_AC_EXIT => 0x40000114;
3202 _const_and_export SDLK_AC_SAVE => 0x40000115;
3203 _const_and_export SDLK_AC_PRINT => 0x40000116;
3204 _const_and_export SDLK_AC_PROPERTIES => 0x40000117;
3205 _const_and_export SDLK_AC_SEARCH => 0x40000118;
3206 _const_and_export SDLK_AC_HOME => 0x40000119;
3207 _const_and_export SDLK_AC_BACK => 0x4000011a;
3208 _const_and_export SDLK_AC_FORWARD => 0x4000011b;
3209 _const_and_export SDLK_AC_STOP => 0x4000011c;
3210 _const_and_export SDLK_AC_REFRESH => 0x4000011d;
3211 _const_and_export SDLK_AC_BOOKMARKS => 0x4000011e;
3212 _const_and_export SDLK_SOFTLEFT => 0x4000011f;
3213 _const_and_export SDLK_SOFTRIGHT => 0x40000120;
3214 _const_and_export SDLK_CALL => 0x40000121;
3215 _const_and_export SDLK_ENDCALL => 0x40000122;
3216 _const_and_export SDLK_LEFT_TAB => 0x20000001;
3217 _const_and_export SDLK_LEVEL5_SHIFT => 0x20000002;
3218 _const_and_export SDLK_MULTI_KEY_COMPOSE => 0x20000003;
3219 _const_and_export SDLK_LMETA => 0x20000004;
3220 _const_and_export SDLK_RMETA => 0x20000005;
3221 _const_and_export SDLK_LHYPER => 0x20000006;
3222 _const_and_export SDLK_RHYPER => 0x20000007;
3223 _typedef_and_export SDL_Keymod => UInt16;
3224 _const_and_export SDL_KMOD_NONE => 0x0000;
3225 _const_and_export SDL_KMOD_LSHIFT => 0x0001;
3226 _const_and_export SDL_KMOD_RSHIFT => 0x0002;
3227 _const_and_export SDL_KMOD_LEVEL5 => 0x0004;
3228 _const_and_export SDL_KMOD_LCTRL => 0x0040;
3229 _const_and_export SDL_KMOD_RCTRL => 0x0080;
3230 _const_and_export SDL_KMOD_LALT => 0x0100;
3231 _const_and_export SDL_KMOD_RALT => 0x0200;
3232 _const_and_export SDL_KMOD_LGUI => 0x0400;
3233 _const_and_export SDL_KMOD_RGUI => 0x0800;
3234 _const_and_export SDL_KMOD_NUM => 0x1000;
3235 _const_and_export SDL_KMOD_CAPS => 0x2000;
3236 _const_and_export SDL_KMOD_MODE => 0x4000;
3237 _const_and_export SDL_KMOD_SCROLL => 0x8000;
3238 _const_and_export SDL_KMOD_CTRL => ( 0x0040 | 0x0080 );
3239 _const_and_export SDL_KMOD_SHIFT => ( 0x0001 | 0x0002 );
3240 _const_and_export SDL_KMOD_ALT => ( 0x0100 | 0x0200 );
3241 _const_and_export SDL_KMOD_GUI => ( 0x0400 | 0x0800 );
3242 }
3243  
3244 =head3 C<:loadso> - Shared Object/DLL Management
3245  
3246 System-dependent library loading routines.
3247  
3248 See L<SDL3: CategorySharedObject|https://wiki.libsdl.org/SDL3/CategorySharedObject>
3249  
3250 =cut
3251  
3252 sub _loadso() {
3253 state $done++ && return;
3254 #
3255 _error();
3256 _stdinc();
3257 #
3258 _typedef_and_export SDL_SharedObject => Void;
3259 #
3260 _affix_and_export SDL_LoadObject => [String], Pointer [ SDL_SharedObject() ];
3261 _affix_and_export SDL_LoadFunction => [ Pointer [ SDL_SharedObject() ], String ], Pointer [ SDL_FunctionPointer() ];
3262 _affix_and_export SDL_UnloadObject => [ Pointer [ SDL_SharedObject() ] ], Void;
3263 }
3264  
3265 =head3 C<:locale> - Locale Info
3266  
3267 A struct to provide locale data.
3268  
3269 This provides a way to get a list of preferred locales (language plus country) for the user. There is exactly one
3270 function: L<SDL_GetPreferredLocales()|https://wiki.libsdl.org/SDL3/SDL_GetPreferredLocales>, which handles all the
3271 heavy lifting, and offers documentation on all the strange ways humans might have configured their language settings.
3272  
3273 See L<SDL3: CategoryLocale|https://wiki.libsdl.org/SDL3/CategoryLocale>
3274  
3275 =cut
3276  
3277 sub _locale() {
3278 state $done++ && return;
3279 #
3280 _error();
3281 _stdinc();
3282 #
3283 _typedef_and_export SDL_Locale => Struct [ language => String, country => String ];
3284 _affix_and_export SDL_GetPreferredLocales => [ Pointer [Int] ], Pointer [ Pointer [ SDL_Locale() ] ];
3285 }
3286  
3287 =head3 C<:log> - Log Handling
3288  
3289 Simple log messages with priorities and categories. A message's C<SDL_LogPriority> signifies how important the message
3290 is. A message's C<SDL_LogCategory> signifies from what domain it belongs to. Every category has a minimum priority
3291 specified: when a message belongs to that category, it will only be sent out if it has that minimum priority or higher.
3292  
3293 See L<SDL3: CategoryLog|https://wiki.libsdl.org/SDL3/CategoryLog>
3294  
3295 =cut
3296  
3297 sub _log() {
3298 state $done++ && return;
3299 #
3300 _stdinc();
3301 #
3302 _enum_and_export SDL_LogCategory => [
3303 'SDL_LOG_CATEGORY_APPLICATION', 'SDL_LOG_CATEGORY_ERROR', 'SDL_LOG_CATEGORY_ASSERT', 'SDL_LOG_CATEGORY_SYSTEM',
3304 'SDL_LOG_CATEGORY_AUDIO', 'SDL_LOG_CATEGORY_VIDEO', 'SDL_LOG_CATEGORY_RENDER', 'SDL_LOG_CATEGORY_INPUT',
3305 'SDL_LOG_CATEGORY_TEST', 'SDL_LOG_CATEGORY_GPU', 'SDL_LOG_CATEGORY_RESERVED2', 'SDL_LOG_CATEGORY_RESERVED3',
3306 'SDL_LOG_CATEGORY_RESERVED4', 'SDL_LOG_CATEGORY_RESERVED5', 'SDL_LOG_CATEGORY_RESERVED6', 'SDL_LOG_CATEGORY_RESERVED7',
3307 'SDL_LOG_CATEGORY_RESERVED8', 'SDL_LOG_CATEGORY_RESERVED9', 'SDL_LOG_CATEGORY_RESERVED10', 'SDL_LOG_CATEGORY_CUSTOM'
3308 ];
3309 _enum_and_export SDL_LogPriority => [
3310 'SDL_LOG_PRIORITY_INVALID', 'SDL_LOG_PRIORITY_TRACE', 'SDL_LOG_PRIORITY_VERBOSE', 'SDL_LOG_PRIORITY_DEBUG',
3311 'SDL_LOG_PRIORITY_INFO', 'SDL_LOG_PRIORITY_WARN', 'SDL_LOG_PRIORITY_ERROR', 'SDL_LOG_PRIORITY_CRITICAL',
3312 'SDL_LOG_PRIORITY_COUNT'
3313 ];
3314 #
3315 _typedef_and_export SDL_LogOutputFunction => Callback [ [ Pointer [Void], Int, SDL_LogPriority(), String ] => Void ];
3316 #
3317 _affix_and_export SDL_SetLogPriorities => [ SDL_LogPriority() ], Void;
3318 _affix_and_export SDL_SetLogPriority => [ Int, SDL_LogPriority() ], Void;
3319 _affix_and_export SDL_GetLogPriority => [Int], SDL_LogPriority();
3320 _affix_and_export SDL_ResetLogPriorities => [], Void;
3321 _affix_and_export SDL_SetLogPriorityPrefix => [ SDL_LogPriority(), String ], Bool;
3322 #
3323 _affix_and_export SDL_Log => [ String, VarArgs ], Void;
3324 _affix_and_export SDL_LogTrace => [ Int, String, VarArgs ], Void;
3325 _affix_and_export SDL_LogVerbose => [ Int, String, VarArgs ], Void;
3326 _affix_and_export SDL_LogDebug => [ Int, String, VarArgs ], Void;
3327 _affix_and_export SDL_LogInfo => [ Int, String, VarArgs ], Void;
3328 _affix_and_export SDL_LogWarn => [ Int, String, VarArgs ], Void;
3329 _affix_and_export SDL_LogError => [ Int, String, VarArgs ], Void;
3330 _affix_and_export SDL_LogCritical => [ Int, String, VarArgs ], Void;
3331 _affix_and_export SDL_LogMessage => [ Int, SDL_LogPriority(), String, VarArgs ], Void;
3332 _affix_and_export SDL_GetDefaultLogOutputFunction => [], SDL_LogOutputFunction();
3333 _affix_and_export SDL_GetLogOutputFunction => [ Pointer [ SDL_LogOutputFunction() ], Pointer [ Pointer [Void] ] ], Void;
3334 _affix_and_export SDL_SetLogOutputFunction => [ SDL_LogOutputFunction(), Pointer [Void] ], Void;
3335 }
3336  
3337 =head3 C<:main> - Application entry points
3338  
3339 This is a special import tag that informs SDL to use its new callback based App system.
3340  
3341 You B<must> define L<SDL_AppInit|https://wiki.libsdl.org/SDL3/SDL_AppInit>,
3342 L<SDL_AppEvent|https://wiki.libsdl.org/SDL3/SDL_AppEvent>,
3343 L<SDL_AppIterate|https://wiki.libsdl.org/SDL3/SDL_AppIterate>, and
3344 L<SDL_AppQuit|https://wiki.libsdl.org/SDL3/SDL_AppQuit> in your code.
3345  
3346 See F<eg/hello_world.pl> for an example and L<SDL3: CategoryMain|https://wiki.libsdl.org/SDL3/CategoryMain>.
3347  
3348 =cut
3349  
3350 sub _main() {
3351 state $done++ && return;
3352 #
3353 _error();
3354 _events();
3355 _platform_defines();
3356 _stdinc();
3357 #
3358 _typedef_and_export SDL_main_func => Callback [ [ Int, Pointer [String] ] => Int ];
3359 _affix_and_export SDL_SetMainReady => [], Void;
3360 _affix_and_export SDL_RunApp => [ Int, Pointer [String], SDL_main_func(), Pointer [Void] ], Int;
3361 _affix_and_export
3362 SDL_EnterAppMainCallbacks =>
3363 [ Int, Pointer [String], SDL_AppInit_func(), SDL_AppIterate_func(), SDL_AppEvent_func(), SDL_AppQuit_func() ],
3364 Int;
3365 if ( $^O eq 'MSWin32' ) {
3366 _affix_and_export SDL_RegisterApp => [ String, UInt32, Pointer [Void] ], Bool;
3367 _affix_and_export SDL_UnregisterApp => [], Void;
3368 _affix_and_export SDL_GDKSuspendComplete => [], Void;
3369 }
3370 }
3371  
3372 =head3 C<:messagebox> - Message Boxes
3373  
3374 SDL offers a simple message box API, which is useful for simple alerts, such as informing the user when something fatal
3375 happens at startup without the need to build a UI for it (or informing the user _before_ your UI is ready).
3376  
3377 See L<SDL3: CategoryMessagebox|https://wiki.libsdl.org/SDL3/CategoryMessagebox>
3378  
3379 =cut
3380  
3381 sub _messagebox() {
3382 state $done++ && return;
3383 #
3384 _error();
3385 _stdinc();
3386 _video();
3387 #
3388 _typedef_and_export SDL_MessageBoxFlags => UInt32;
3389 _const_and_export SDL_MESSAGEBOX_ERROR => 0x00000010;
3390 _const_and_export SDL_MESSAGEBOX_WARNING => 0x00000020;
3391 _const_and_export SDL_MESSAGEBOX_INFORMATION => 0x00000040;
3392 _const_and_export SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT => 0x00000080;
3393 _const_and_export SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT => 0x00000100;
3394 _typedef_and_export SDL_MessageBoxButtonFlags => UInt32;
3395 _const_and_export SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT => 0x00000001;
3396 _const_and_export SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT => 0x00000002;
3397 _typedef_and_export SDL_MessageBoxButtonData => Struct [ flags => SDL_MessageBoxButtonFlags(), buttonID => Int, text => String ];
3398 _typedef_and_export SDL_MessageBoxColor => Struct [ r => UInt8, g => UInt8, b => UInt8 ];
3399 _enum_and_export SDL_MessageBoxColorType => [
3400 'SDL_MESSAGEBOX_COLOR_BACKGROUND', 'SDL_MESSAGEBOX_COLOR_TEXT',
3401 'SDL_MESSAGEBOX_COLOR_BUTTON_BORDER', 'SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND',
3402 'SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED', 'SDL_MESSAGEBOX_COLOR_COUNT'
3403 ];
3404 _typedef_and_export SDL_MessageBoxColorScheme => Struct [
3405 colors => Array [ SDL_MessageBoxColor(), 5 ] # SDL_MESSAGEBOX_COLOR_COUNT
3406 ];
3407 _typedef_and_export SDL_MessageBoxData => Struct [
3408 flags => SDL_MessageBoxFlags(),
3409 window => Pointer [ SDL_Window() ],
3410 title => String,
3411 message => String,
3412 numbuttons => Int,
3413 buttons => Pointer [ SDL_MessageBoxButtonData() ],
3414 colorScheme => Pointer [ SDL_MessageBoxColorScheme() ]
3415 ];
3416 _affix_and_export SDL_ShowMessageBox => [ Pointer [ SDL_MessageBoxData() ], Pointer [Int] ], Bool;
3417 _affix_and_export SDL_ShowSimpleMessageBox => [ SDL_MessageBoxFlags(), String, String, Pointer [ SDL_Window() ] ], Bool;
3418 }
3419  
3420 =head3 C<:metal> - Metal support
3421  
3422 Functions to creating Metal layers and views on SDL windows.
3423  
3424 This provides some platform-specific glue for Apple platforms. Most macOS and iOS apps can use SDL without these
3425 functions, but this API they can be useful for specific OS-level integration tasks.
3426  
3427 See L<SDL3: CategoryMetal|https://wiki.libsdl.org/SDL3/CategoryMetal>
3428  
3429 =cut
3430  
3431 sub _metal() { # Based on sdl-main/include/sdl3/sdl_metal.h
3432 state $done++ && return;
3433 _video();
3434 #
3435 _typedef_and_export SDL_MetalView => Pointer [Void];
3436 _affix_and_export SDL_Metal_CreateView => [ Pointer [ SDL_Window() ] ], SDL_MetalView();
3437 _affix_and_export SDL_Metal_DestroyView => [ SDL_MetalView() ], Void;
3438 _affix_and_export SDL_Metal_GetLayer => [ SDL_MetalView() ], Pointer [Void];
3439 }
3440  
3441 =head3 C<:misc> - Miscellaneous
3442  
3443 SDL API functions that don't fit elsewhere.
3444  
3445 See L<SDL3: CategoryMisc|https://wiki.libsdl.org/SDL3/CategoryMisc>
3446  
3447 =cut
3448  
3449 sub _misc() { # Based on sdl-main/include/sdl3/sdl_misc.h
3450 state $done++ && return;
3451 _error();
3452 #
3453 _affix_and_export 'SDL_OpenURL', [String], Bool;
3454 }
3455  
3456 =head3 C<:mouse> - Mouse Support
3457  
3458 Any GUI application has to deal with the mouse, and SDL provides functions to manage mouse input and the displayed
3459 cursor.
3460  
3461 See L<SDL3: CategoryMouse|https://wiki.libsdl.org/SDL3/CategoryMouse>
3462  
3463 =cut
3464  
3465 sub _mouse() {
3466 state $done++ && return;
3467 _error();
3468 _stdinc();
3469 _surface();
3470 _video();
3471 #
3472 _typedef_and_export SDL_MouseID => UInt32;
3473 _typedef_and_export SDL_Cursor => Void;
3474 _enum_and_export SDL_SystemCursor => [
3475 'SDL_SYSTEM_CURSOR_DEFAULT', 'SDL_SYSTEM_CURSOR_TEXT', 'SDL_SYSTEM_CURSOR_WAIT', 'SDL_SYSTEM_CURSOR_CROSSHAIR',
3476 'SDL_SYSTEM_CURSOR_PROGRESS', 'SDL_SYSTEM_CURSOR_NWSE_RESIZE', 'SDL_SYSTEM_CURSOR_NESW_RESIZE', 'SDL_SYSTEM_CURSOR_EW_RESIZE',
3477 'SDL_SYSTEM_CURSOR_NS_RESIZE', 'SDL_SYSTEM_CURSOR_MOVE', 'SDL_SYSTEM_CURSOR_NOT_ALLOWED', 'SDL_SYSTEM_CURSOR_POINTER',
3478 'SDL_SYSTEM_CURSOR_NW_RESIZE', 'SDL_SYSTEM_CURSOR_N_RESIZE', 'SDL_SYSTEM_CURSOR_NE_RESIZE', 'SDL_SYSTEM_CURSOR_E_RESIZE',
3479 'SDL_SYSTEM_CURSOR_SE_RESIZE', 'SDL_SYSTEM_CURSOR_S_RESIZE', 'SDL_SYSTEM_CURSOR_SW_RESIZE', 'SDL_SYSTEM_CURSOR_W_RESIZE',
3480 'SDL_SYSTEM_CURSOR_COUNT'
3481 ];
3482 _enum_and_export SDL_MouseWheelDirection => [ 'SDL_MOUSEWHEEL_NORMAL', 'SDL_MOUSEWHEEL_FLIPPED' ];
3483 _typedef_and_export SDL_CursorFrameInfo => Struct [ surface => Pointer [ SDL_Surface() ], duration => UInt32 ];
3484 _typedef_and_export SDL_MouseButtonFlags => UInt32;
3485 _const_and_export SDL_BUTTON_LEFT => 1;
3486 _const_and_export SDL_BUTTON_MIDDLE => 2;
3487 _const_and_export SDL_BUTTON_RIGHT => 3;
3488 _const_and_export SDL_BUTTON_X1 => 4;
3489 _const_and_export SDL_BUTTON_X2 => 5;
3490 _func_and_export SDL_BUTTON_MASK => sub ($X) { ( 1 << ( ($X) - 1 ) ) };
3491 _const_and_export SDL_BUTTON_LMASK => 1 << ( 1 - 1 );
3492 _const_and_export SDL_BUTTON_MMASK => 1 << ( 2 - 1 );
3493 _const_and_export SDL_BUTTON_RMASK => 1 << ( 3 - 1 );
3494 _const_and_export SDL_BUTTON_X1MASK => 1 << ( 4 - 1 );
3495 _const_and_export SDL_BUTTON_X2MASK => 1 << ( 5 - 1 );
3496 _typedef_and_export SDL_MouseMotionTransformCallback =>
3497 Callback [ [ Pointer [Void], UInt64, Pointer [ SDL_Window() ], SDL_MouseID(), Pointer [Float], Pointer [Float] ] => Void ];
3498 _affix_and_export SDL_HasMouse => [], Bool;
3499 _affix_and_export SDL_GetMice => [ Pointer [Int] ], Pointer [ SDL_MouseID() ];
3500 _affix_and_export SDL_GetMouseNameForID => [ SDL_MouseID() ], String;
3501 _affix_and_export SDL_GetMouseFocus => [], Pointer [ SDL_Window() ];
3502 _affix_and_export SDL_GetMouseState => [ Pointer [Float], Pointer [Float] ], SDL_MouseButtonFlags();
3503 _affix_and_export SDL_GetGlobalMouseState => [ Pointer [Float], Pointer [Float] ], SDL_MouseButtonFlags();
3504 _affix_and_export SDL_GetRelativeMouseState => [ Pointer [Float], Pointer [Float] ], SDL_MouseButtonFlags();
3505 _affix_and_export SDL_WarpMouseInWindow => [ Pointer [ SDL_Window() ], Float, Float ], Void;
3506 _affix_and_export SDL_WarpMouseGlobal => [ Float, Float ], Bool;
3507  
3508 #~ _affix_and_export SDL_SetRelativeMouseTransform => [ SDL_MouseMotionTransformCallback(), Pointer [Void] ], Bool;
3509 _affix_and_export SDL_SetWindowRelativeMouseMode => [ Pointer [ SDL_Window() ], Bool ], Bool;
3510 _affix_and_export SDL_GetWindowRelativeMouseMode => [ Pointer [ SDL_Window() ] ], Bool;
3511 _affix_and_export SDL_CaptureMouse => [Bool], Bool;
3512 _affix_and_export SDL_CreateCursor => [ Pointer [UInt8], Pointer [UInt8], Int, Int, Int, Int ], Pointer [ SDL_Cursor() ];
3513 _affix_and_export SDL_CreateColorCursor => [ Pointer [ SDL_Surface() ], Int, Int ], Pointer [ SDL_Cursor() ];
3514  
3515 #~ _affix_and_export
3516 #~ SDL_CreateAnimatedCursor => [ Pointer [ SDL_CursorFrameInfo() ], Int, Int, Int ],
3517 #~ Pointer [ SDL_Cursor() ];
3518 _affix_and_export SDL_CreateSystemCursor => [ SDL_SystemCursor() ], Pointer [ SDL_Cursor() ];
3519 _affix_and_export SDL_SetCursor => [ Pointer [ SDL_Cursor() ] ], Bool;
3520 _affix_and_export SDL_GetCursor => [], Pointer [ SDL_Cursor() ];
3521 _affix_and_export SDL_GetDefaultCursor => [], Pointer [ SDL_Cursor() ];
3522 _affix_and_export SDL_DestroyCursor => [ Pointer [ SDL_Cursor() ] ], Void;
3523 _affix_and_export SDL_ShowCursor => [], Bool;
3524 _affix_and_export SDL_HideCursor => [], Bool;
3525 _affix_and_export SDL_CursorVisible => [], Bool;
3526 }
3527  
3528 =head3 C<:mutex> - Thread Synchronization Primitives
3529  
3530 SDL offers several thread synchronization primitives. This document can't cover the complicated topic of thread safety,
3531 but reading up on what each of these primitives are, why they are useful, and how to correctly use them is vital to
3532 writing correct and safe multithreaded programs.
3533  
3534 See L<SDL3: CategoryMutex|https://wiki.libsdl.org/SDL3/CategoryMutex>
3535  
3536 =cut
3537  
3538 sub _mutex() {
3539 state $done++ && return;
3540 #
3541 _atomic();
3542 _error();
3543 _stdinc();
3544 _thread();
3545 #
3546 _typedef_and_export SDL_Mutex => Void;
3547 _typedef_and_export SDL_RWLock => Void;
3548 _typedef_and_export SDL_Semaphore => Void;
3549 _typedef_and_export SDL_Condition => Void;
3550 _affix_and_export SDL_CreateMutex => [], Pointer [ SDL_Mutex() ];
3551 _affix_and_export SDL_LockMutex => [ Pointer [ SDL_Mutex() ] ], Void;
3552 _affix_and_export SDL_TryLockMutex => [ Pointer [ SDL_Mutex() ] ], Bool;
3553 _affix_and_export SDL_UnlockMutex => [ Pointer [ SDL_Mutex() ] ], Void;
3554 _affix_and_export SDL_DestroyMutex => [ Pointer [ SDL_Mutex() ] ], Void;
3555 _affix_and_export SDL_CreateRWLock => [], Pointer [ SDL_RWLock() ];
3556 _affix_and_export SDL_LockRWLockForReading => [ Pointer [ SDL_RWLock() ] ], Void;
3557 _affix_and_export SDL_LockRWLockForWriting => [ Pointer [ SDL_RWLock() ] ], Void;
3558 _affix_and_export SDL_TryLockRWLockForReading => [ Pointer [ SDL_RWLock() ] ], Bool;
3559 _affix_and_export SDL_TryLockRWLockForWriting => [ Pointer [ SDL_RWLock() ] ], Bool;
3560 _affix_and_export SDL_UnlockRWLock => [ Pointer [ SDL_RWLock() ] ], Void;
3561 _affix_and_export SDL_DestroyRWLock => [ Pointer [ SDL_RWLock() ] ], Void;
3562 _affix_and_export SDL_CreateSemaphore => [UInt32], Pointer [ SDL_Semaphore() ];
3563 _affix_and_export SDL_DestroySemaphore => [ Pointer [ SDL_Semaphore() ] ], Void;
3564 _affix_and_export SDL_WaitSemaphore => [ Pointer [ SDL_Semaphore() ] ], Void;
3565 _affix_and_export SDL_TryWaitSemaphore => [ Pointer [ SDL_Semaphore() ] ], Bool;
3566 _affix_and_export SDL_WaitSemaphoreTimeout => [ Pointer [ SDL_Semaphore() ], SInt32 ], Bool;
3567 _affix_and_export SDL_SignalSemaphore => [ Pointer [ SDL_Semaphore() ] ], Void;
3568 _affix_and_export SDL_GetSemaphoreValue => [ Pointer [ SDL_Semaphore() ] ], UInt32;
3569 _affix_and_export SDL_CreateCondition => [], Pointer [ SDL_Condition() ];
3570 _affix_and_export SDL_DestroyCondition => [ Pointer [ SDL_Condition() ] ], Void;
3571 _affix_and_export SDL_SignalCondition => [ Pointer [ SDL_Condition() ] ], Void;
3572 _affix_and_export SDL_BroadcastCondition => [ Pointer [ SDL_Condition() ] ], Void;
3573 _affix_and_export SDL_WaitCondition => [ Pointer [ SDL_Condition() ], Pointer [ SDL_Mutex() ] ], Void;
3574 _affix_and_export SDL_WaitConditionTimeout => [ Pointer [ SDL_Condition() ], Pointer [ SDL_Mutex() ], SInt32 ], Bool;
3575 _enum_and_export SDL_InitStatus =>
3576 [ 'SDL_INIT_STATUS_UNINITIALIZED', 'SDL_INIT_STATUS_INITIALIZING', 'SDL_INIT_STATUS_INITIALIZED', 'SDL_INIT_STATUS_UNINITIALIZING' ];
3577 _typedef_and_export SDL_InitState => Struct [ status => SDL_AtomicInt(), thread => SDL_ThreadID(), reserved => Pointer [Void] ];
3578 _affix_and_export SDL_ShouldInit => [ Pointer [ SDL_InitState() ] ], Bool;
3579 _affix_and_export SDL_ShouldQuit => [ Pointer [ SDL_InitState() ] ], Bool;
3580 _affix_and_export SDL_SetInitialized => [ Pointer [ SDL_InitState() ], Bool ], Void;
3581 }
3582  
3583 # This is on my TODO list...
3584 sub _opengl() {
3585 state $done++ && return;
3586 _platform();
3587 }
3588  
3589 =head3 C<:pen> - Pen Support
3590  
3591 SDL pen event handling.
3592  
3593 SDL provides an API for pressure-sensitive pen (stylus and/or eraser) handling, e.g., for input and drawing tablets or
3594 suitably equipped mobile / tablet devices.
3595  
3596 See L<SDL3: CategoryPen|https://wiki.libsdl.org/SDL3/CategoryPen>
3597  
3598 =cut
3599  
3600 sub _pen() {
3601 state $done++ && return;
3602 #
3603 _mouse();
3604 _stdinc();
3605 _touch();
3606 #
3607 _typedef_and_export SDL_PenID => UInt32;
3608 _const_and_export SDL_PEN_MOUSEID => -2;
3609 _const_and_export SDL_PEN_TOUCHID => -2;
3610 _typedef_and_export SDL_PenInputFlags => UInt32;
3611 _const_and_export SDL_PEN_INPUT_DOWN => ( 1 << 0 );
3612 _const_and_export SDL_PEN_INPUT_BUTTON_1 => ( 1 << 1 );
3613 _const_and_export SDL_PEN_INPUT_BUTTON_2 => ( 1 << 2 );
3614 _const_and_export SDL_PEN_INPUT_BUTTON_3 => ( 1 << 3 );
3615 _const_and_export SDL_PEN_INPUT_BUTTON_4 => ( 1 << 4 );
3616 _const_and_export SDL_PEN_INPUT_BUTTON_5 => ( 1 << 5 );
3617 _const_and_export SDL_PEN_INPUT_ERASER_TIP => ( 1 << 30 );
3618 _const_and_export SDL_PEN_INPUT_IN_PROXIMITY => ( 1 << 31 );
3619 _enum_and_export SDL_PenAxis => [
3620 'SDL_PEN_AXIS_PRESSURE', 'SDL_PEN_AXIS_XTILT', 'SDL_PEN_AXIS_YTILT', 'SDL_PEN_AXIS_DISTANCE',
3621 'SDL_PEN_AXIS_ROTATION', 'SDL_PEN_AXIS_SLIDER', 'SDL_PEN_AXIS_TANGENTIAL_PRESSURE', 'SDL_PEN_AXIS_COUNT'
3622 ];
3623 _enum_and_export SDL_PenDeviceType =>
3624 [ [ SDL_PEN_DEVICE_TYPE_INVALID => -1 ], 'SDL_PEN_DEVICE_TYPE_UNKNOWN', 'SDL_PEN_DEVICE_TYPE_DIRECT', 'SDL_PEN_DEVICE_TYPE_INDIRECT' ];
3625  
3626 #~ _affix_and_export SDL_GetPenDeviceType => [ SDL_PenID() ], SDL_PenDeviceType();
3627 }
3628  
3629 =head3 C<:pixels> - Pixel Formats and Conversion Routines
3630  
3631 SDL offers facilities for pixel management.
3632  
3633 See L<SDL3: CategoryPixels|https://wiki.libsdl.org/SDL3/CategoryPixels>
3634  
3635 =cut
3636  
3637 sub _pixels() {
3638 state $done++ && return;
3639 _error();
3640 _stdinc();
3641 #
3642 _const_and_export SDL_ALPHA_OPAQUE => 255;
3643 _const_and_export SDL_ALPHA_OPAQUE_FLOAT => 1.0;
3644 _const_and_export SDL_ALPHA_TRANSPARENT => 0;
3645 _const_and_export SDL_ALPHA_TRANSPARENT_FLOAT => 0.0;
3646 _enum_and_export SDL_PixelType => [
3647 [ SDL_PIXELTYPE_UNKNOWN => 0 ],
3648 [ SDL_PIXELTYPE_INDEX1 => 1 ],
3649 [ SDL_PIXELTYPE_INDEX4 => 2 ],
3650 [ SDL_PIXELTYPE_INDEX8 => 3 ],
3651 [ SDL_PIXELTYPE_PACKED8 => 4 ],
3652 [ SDL_PIXELTYPE_PACKED16 => 5 ],
3653 [ SDL_PIXELTYPE_PACKED32 => 6 ],
3654 [ SDL_PIXELTYPE_ARRAYU8 => 7 ],
3655 [ SDL_PIXELTYPE_ARRAYU16 => 8 ],
3656 [ SDL_PIXELTYPE_ARRAYU32 => 9 ],
3657 [ SDL_PIXELTYPE_ARRAYF16 => 10 ],
3658 [ SDL_PIXELTYPE_ARRAYF32 => 11 ],
3659 [ SDL_PIXELTYPE_INDEX2 => 12 ],
3660 ];
3661 _enum_and_export SDL_BitmapOrder => [qw[SDL_BITMAPORDER_NONE SDL_BITMAPORDER_4321 SDL_BITMAPORDER_1234]];
3662 _enum_and_export SDL_PackedOrder => [
3663 qw[SDL_PACKEDORDER_NONE
3664 SDL_PACKEDORDER_XRGB SDL_PACKEDORDER_RGBX SDL_PACKEDORDER_ARGB SDL_PACKEDORDER_RGBA
3665 SDL_PACKEDORDER_XBGR SDL_PACKEDORDER_BGRX SDL_PACKEDORDER_ABGR SDL_PACKEDORDER_BGRA]
3666 ];
3667 _enum_and_export SDL_ArrayOrder => [
3668 qw[
3669 SDL_ARRAYORDER_NONE SDL_ARRAYORDER_RGB SDL_ARRAYORDER_RGBA SDL_ARRAYORDER_ARGB
3670 SDL_ARRAYORDER_BGR SDL_ARRAYORDER_BGRA SDL_ARRAYORDER_ABGR]
3671 ];
3672 _enum_and_export SDL_PackedLayout => [
3673 qw[
3674 SDL_PACKEDLAYOUT_NONE
3675 SDL_PACKEDLAYOUT_332 SDL_PACKEDLAYOUT_4444 SDL_PACKEDLAYOUT_1555
3676 SDL_PACKEDLAYOUT_5551 SDL_PACKEDLAYOUT_565 SDL_PACKEDLAYOUT_8888
3677 SDL_PACKEDLAYOUT_2101010 SDL_PACKEDLAYOUT_1010102
3678 ]
3679 ];
3680 _func_and_export( SDL_DEFINE_PIXELFOURCC => sub ( $A, $B, $C, $D ) { SDL_FOURCC( $A, $B, $C, $D ) } );
3681 _func_and_export(
3682 SDL_DEFINE_PIXELFORMAT => sub ( $type, $order, $layout, $bits, $bytes ) {
3683 ( ( 1 << 28 ) | ( ($type) << 24 ) | ( ($order) << 20 ) | ( ($layout) << 16 ) | ( ($bits) << 8 ) | ( ($bytes) << 0 ) )
3684 }
3685 );
3686 _func_and_export( SDL_PIXELFLAG => sub ($format) { ( ( ($format) >> 28 ) & 0x0F ) } );
3687 _func_and_export( SDL_PIXELTYPE => sub ($format) { ( ( ($format) >> 24 ) & 0x0F ) } );
3688 _func_and_export( SDL_PIXELORDER => sub ($format) { ( ( ($format) >> 20 ) & 0x0F ) } );
3689 _func_and_export( SDL_PIXELLAYOUT => sub ($format) { ( ( ($format) >> 16 ) & 0x0F ) } );
3690 _func_and_export( SDL_BITSPERPIXEL => sub ($format) { ( SDL_ISPIXELFORMAT_FOURCC($format) ? 0 : ( ( ($format) >> 8 ) & 0xFF ) ) } );
3691 _func_and_export(
3692 SDL_BYTESPERPIXEL => sub ($format) {
3693 (
3694 SDL_ISPIXELFORMAT_FOURCC($format) ?
3695 (
3696 (
3697 ( ($format) == SDL_PIXELFORMAT_YUY2() ) ||
3698 ( ($format) == SDL_PIXELFORMAT_UYVY() ) ||
3699 ( ($format) == SDL_PIXELFORMAT_YVYU() ) ||
3700 ( ($format) == SDL_PIXELFORMAT_P010() )
3701 ) ? 2 : 1
3702 ) :
3703 ( ( ($format) >> 0 ) & 0xFF )
3704 )
3705 }
3706 );
3707 _func_and_export(
3708 SDL_ISPIXELFORMAT_INDEXED => sub ($format) {
3709 (
3710 !SDL_ISPIXELFORMAT_FOURCC($format) &&
3711 ( ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_INDEX1() ) ||
3712 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_INDEX2() ) ||
3713 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_INDEX4() ) ||
3714 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_INDEX8() ) )
3715 )
3716 }
3717 );
3718 _func_and_export(
3719 SDL_ISPIXELFORMAT_PACKED => sub ($format) {
3720 (
3721 !SDL_ISPIXELFORMAT_FOURCC($format) &&
3722 ( ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_PACKED8() ) ||
3723 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_PACKED16() ) ||
3724 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_PACKED32() ) )
3725 )
3726 }
3727 );
3728 _func_and_export(
3729 SDL_ISPIXELFORMAT_ARRAY => sub ($format) {
3730 (
3731 !SDL_ISPIXELFORMAT_FOURCC($format) &&
3732 ( ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_ARRAYU8() ) ||
3733 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_ARRAYU16() ) ||
3734 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_ARRAYU32() ) ||
3735 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_ARRAYF16() ) ||
3736 ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_ARRAYF32() ) )
3737 )
3738 }
3739 );
3740 _func_and_export(
3741 SDL_ISPIXELFORMAT_10BIT => sub ($format) {
3742 ( !SDL_ISPIXELFORMAT_FOURCC($format) &&
3743 ( ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_PACKED32() ) && ( SDL_PIXELLAYOUT($format) == SDL_PACKEDLAYOUT_2101010() ) ) )
3744 }
3745 );
3746 _func_and_export(
3747 SDL_ISPIXELFORMAT_FLOAT => sub ($format) {
3748 ( !SDL_ISPIXELFORMAT_FOURCC($format) &&
3749 ( ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_ARRAYF16() ) || ( SDL_PIXELTYPE($format) == SDL_PIXELTYPE_ARRAYF32() ) ) )
3750 }
3751 );
3752 _func_and_export(
3753 SDL_ISPIXELFORMAT_ALPHA => sub ($format) {
3754 (
3755 (
3756 SDL_ISPIXELFORMAT_PACKED($format) &&
3757 ( ( SDL_PIXELORDER($format) == SDL_PACKEDORDER_ARGB() ) ||
3758 ( SDL_PIXELORDER($format) == SDL_PACKEDORDER_RGBA() ) ||
3759 ( SDL_PIXELORDER($format) == SDL_PACKEDORDER_ABGR() ) ||
3760 ( SDL_PIXELORDER($format) == SDL_PACKEDORDER_BGRA() ) )
3761 ) ||
3762 (
3763 SDL_ISPIXELFORMAT_ARRAY($format) &&
3764 ( ( SDL_PIXELORDER($format) == SDL_ARRAYORDER_ARGB() ) ||
3765 ( SDL_PIXELORDER($format) == SDL_ARRAYORDER_RGBA() ) ||
3766 ( SDL_PIXELORDER($format) == SDL_ARRAYORDER_ABGR() ) ||
3767 ( SDL_PIXELORDER($format) == SDL_ARRAYORDER_BGRA() ) )
3768 )
3769 )
3770 }
3771 );
3772 _func_and_export( SDL_ISPIXELFORMAT_FOURCC => sub ($format) { ( ($format) && ( SDL_PIXELFLAG($format) != 1 ) ) } );
3773 _enum_and_export SDL_PixelFormat => [
3774 [ SDL_PIXELFORMAT_UNKNOWN => 0 ], [ SDL_PIXELFORMAT_INDEX1LSB => 0x11100100 ], [ SDL_PIXELFORMAT_INDEX1MSB => 0x11200100 ],
3775 [ SDL_PIXELFORMAT_INDEX2LSB => 0x1c100200 ], [ SDL_PIXELFORMAT_INDEX2MSB => 0x1c200200 ], [ SDL_PIXELFORMAT_INDEX4LSB => 0x12100400 ],
3776 [ SDL_PIXELFORMAT_INDEX4MSB => 0x12200400 ], [ SDL_PIXELFORMAT_INDEX8 => 0x13000801 ], [ SDL_PIXELFORMAT_RGB332 => 0x14110801 ],
3777 [ SDL_PIXELFORMAT_XRGB4444 => 0x15120c02 ], [ SDL_PIXELFORMAT_XBGR4444 => 0x15520c02 ], [ SDL_PIXELFORMAT_XRGB1555 => 0x15130f02 ],
3778 [ SDL_PIXELFORMAT_XBGR1555 => 0x15530f02 ], [ SDL_PIXELFORMAT_ARGB4444 => 0x15321002 ], [ SDL_PIXELFORMAT_RGBA4444 => 0x15421002 ],
3779 [ SDL_PIXELFORMAT_ABGR4444 => 0x15721002 ], [ SDL_PIXELFORMAT_BGRA4444 => 0x15821002 ], [ SDL_PIXELFORMAT_ARGB1555 => 0x15331002 ],
3780 [ SDL_PIXELFORMAT_RGBA5551 => 0x15441002 ], [ SDL_PIXELFORMAT_ABGR1555 => 0x15731002 ], [ SDL_PIXELFORMAT_BGRA5551 => 0x15841002 ],
3781 [ SDL_PIXELFORMAT_RGB565 => 0x15151002 ], [ SDL_PIXELFORMAT_BGR565 => 0x15551002 ], [ SDL_PIXELFORMAT_RGB24 => 0x17101803 ],
3782 [ SDL_PIXELFORMAT_BGR24 => 0x17401803 ], [ SDL_PIXELFORMAT_XRGB8888 => 0x16161804 ], [ SDL_PIXELFORMAT_RGBX8888 => 0x16261804 ],
3783 [ SDL_PIXELFORMAT_XBGR8888 => 0x16561804 ], [ SDL_PIXELFORMAT_BGRX8888 => 0x16661804 ], [ SDL_PIXELFORMAT_ARGB8888 => 0x16362004 ],
3784 [ SDL_PIXELFORMAT_RGBA8888 => 0x16462004 ], [ SDL_PIXELFORMAT_ABGR8888 => 0x16762004 ], [ SDL_PIXELFORMAT_BGRA8888 => 0x16862004 ],
3785 [ SDL_PIXELFORMAT_XRGB2101010 => 0x16172004 ], [ SDL_PIXELFORMAT_XBGR2101010 => 0x16572004 ],
3786 [ SDL_PIXELFORMAT_ARGB2101010 => 0x16372004 ], [ SDL_PIXELFORMAT_ABGR2101010 => 0x16772004 ], [ SDL_PIXELFORMAT_RGB48 => 0x18103006 ],
3787 [ SDL_PIXELFORMAT_BGR48 => 0x18403006 ], [ SDL_PIXELFORMAT_RGBA64 => 0x18204008 ], [ SDL_PIXELFORMAT_ARGB64 => 0x18304008 ],
3788 [ SDL_PIXELFORMAT_BGRA64 => 0x18504008 ], [ SDL_PIXELFORMAT_ABGR64 => 0x18604008 ], [ SDL_PIXELFORMAT_RGB48_FLOAT => 0x1a103006 ],
3789 [ SDL_PIXELFORMAT_BGR48_FLOAT => 0x1a403006 ], [ SDL_PIXELFORMAT_RGBA64_FLOAT => 0x1a204008 ],
3790 [ SDL_PIXELFORMAT_ARGB64_FLOAT => 0x1a304008 ], [ SDL_PIXELFORMAT_BGRA64_FLOAT => 0x1a504008 ],
3791 [ SDL_PIXELFORMAT_ABGR64_FLOAT => 0x1a604008 ], [ SDL_PIXELFORMAT_RGB96_FLOAT => 0x1b10600c ],
3792 [ SDL_PIXELFORMAT_BGR96_FLOAT => 0x1b40600c ], [ SDL_PIXELFORMAT_RGBA128_FLOAT => 0x1b208010 ],
3793 [ SDL_PIXELFORMAT_ARGB128_FLOAT => 0x1b308010 ], [ SDL_PIXELFORMAT_BGRA128_FLOAT => 0x1b508010 ],
3794 [ SDL_PIXELFORMAT_ABGR128_FLOAT => 0x1b608010 ], [ SDL_PIXELFORMAT_YV12 => 0x32315659 ], [ SDL_PIXELFORMAT_IYUV => 0x56555949 ],
3795 [ SDL_PIXELFORMAT_YUY2 => 0x32595559 ], [ SDL_PIXELFORMAT_UYVY => 0x59565955 ], [ SDL_PIXELFORMAT_YVYU => 0x55595659 ],
3796 [ SDL_PIXELFORMAT_NV12 => 0x3231564e ], [ SDL_PIXELFORMAT_NV21 => 0x3132564e ], [ SDL_PIXELFORMAT_P010 => 0x30313050 ],
3797 [ SDL_PIXELFORMAT_EXTERNAL_OES => 0x2053454f ], [ SDL_PIXELFORMAT_MJPG => 0x47504a4d ],
3798  
3799 # Aliases for RGBA byte arrays of color data, for the current platform
3800 (
3801 $Config{byteorder} =~ /1$/ ?
3802 (
3803 [ SDL_PIXELFORMAT_RGBA32 => 'SDL_PIXELFORMAT_RGBA8888' ],
3804 [ SDL_PIXELFORMAT_ARGB32 => 'SDL_PIXELFORMAT_ARGB8888' ],
3805 [ SDL_PIXELFORMAT_BGRA32 => 'SDL_PIXELFORMAT_BGRA8888' ],
3806 [ SDL_PIXELFORMAT_ABGR32 => 'SDL_PIXELFORMAT_ABGR8888' ],
3807 [ SDL_PIXELFORMAT_RGBX32 => 'SDL_PIXELFORMAT_RGBX8888' ],
3808 [ SDL_PIXELFORMAT_XRGB32 => 'SDL_PIXELFORMAT_XRGB8888' ],
3809 [ SDL_PIXELFORMAT_BGRX32 => 'SDL_PIXELFORMAT_BGRX8888' ],
3810 [ SDL_PIXELFORMAT_XBGR32 => 'SDL_PIXELFORMAT_XBGR8888' ]
3811 ) :
3812 (
3813 [ SDL_PIXELFORMAT_RGBA32 => 'SDL_PIXELFORMAT_ABGR8888' ],
3814 [ SDL_PIXELFORMAT_ARGB32 => 'SDL_PIXELFORMAT_BGRA8888' ],
3815 [ SDL_PIXELFORMAT_BGRA32 => 'SDL_PIXELFORMAT_ARGB8888' ],
3816 [ SDL_PIXELFORMAT_ABGR32 => 'SDL_PIXELFORMAT_RGBA8888' ],
3817 [ SDL_PIXELFORMAT_RGBX32 => 'SDL_PIXELFORMAT_XBGR8888' ],
3818 [ SDL_PIXELFORMAT_XRGB32 => 'SDL_PIXELFORMAT_BGRX8888' ],
3819 [ SDL_PIXELFORMAT_BGRX32 => 'SDL_PIXELFORMAT_XRGB8888' ],
3820 [ SDL_PIXELFORMAT_XBGR32 => 'SDL_PIXELFORMAT_RGBX8888' ]
3821 )
3822 )
3823 ];
3824 _func_and_export(
3825 SDL_DEFINE_COLORSPACE => sub ( $type, $range, $primaries, $transfer, $matrix, $chroma ) {
3826 ( ( ($type) << 28 ) | ( ($range) << 24 ) | ( ($chroma) << 20 ) | ( ($primaries) << 10 ) | ( ($transfer) << 5 ) | ( ($matrix) << 0 ) )
3827 }
3828 );
3829 _func_and_export( SDL_COLORSPACETYPE => sub ($cspace) { ( ( ($cspace) >> 28 ) & 0x0F ) } );
3830 _func_and_export( SDL_COLORSPACERANGE => sub ($cspace) { ( ( ($cspace) >> 24 ) & 0x0F ) } );
3831 _func_and_export( SDL_COLORSPACECHROMA => sub ($cspace) { ( ( ($cspace) >> 20 ) & 0x0F ) } );
3832 _func_and_export( SDL_COLORSPACEPRIMARIES => sub ($cspace) { ( ( ($cspace) >> 10 ) & 0x1F ) } );
3833 _func_and_export( SDL_COLORSPACETRANSFER => sub ($cspace) { ( ( ($cspace) >> 5 ) & 0x1F ) } );
3834 _func_and_export( SDL_COLORSPACEMATRIX => sub ($cspace) { ( ($cspace) & 0x1F ) } );
3835 _func_and_export(
3836 SDL_ISCOLORSPACE_MATRIX_BT601 => sub ($cspace) {
3837 ( SDL_COLORSPACEMATRIX($cspace) == SDL_MATRIX_COEFFICIENTS_BT601() ||
3838 SDL_COLORSPACEMATRIX($cspace) == SDL_MATRIX_COEFFICIENTS_BT470BG() )
3839 }
3840 );
3841 _func_and_export( SDL_ISCOLORSPACE_MATRIX_BT709 => sub ($cspace) { ( SDL_COLORSPACEMATRIX($cspace) == SDL_MATRIX_COEFFICIENTS_BT709() ) } );
3842 _func_and_export(
3843 SDL_ISCOLORSPACE_MATRIX_BT2020_NCL => sub ($cspace) { ( SDL_COLORSPACEMATRIX($cspace) == SDL_MATRIX_COEFFICIENTS_BT2020_NCL() ) } );
3844 _func_and_export( SDL_ISCOLORSPACE_LIMITED_RANGE => sub ($cspace) { ( SDL_COLORSPACERANGE($cspace) != SDL_COLOR_RANGE_FULL() ) } );
3845 _func_and_export( SDL_ISCOLORSPACE_FULL_RANGE => sub ($cspace) { ( SDL_COLORSPACERANGE($cspace) == SDL_COLOR_RANGE_FULL() ) } );
3846 _enum_and_export SDL_Colorspace => [
3847 [ SDL_COLORSPACE_UNKNOWN => 0 ],
3848 [ SDL_COLORSPACE_SRGB => 0x120005a0 ],
3849 [ SDL_COLORSPACE_SRGB_LINEAR => 0x12000500 ],
3850 [ SDL_COLORSPACE_HDR10 => 0x12002600 ],
3851 [ SDL_COLORSPACE_JPEG => 0x220004c6 ],
3852 [ SDL_COLORSPACE_BT601_LIMITED => 0x211018c6 ],
3853 [ SDL_COLORSPACE_BT601_FULL => 0x221018c6 ],
3854 [ SDL_COLORSPACE_BT709_LIMITED => 0x21100421 ],
3855 [ SDL_COLORSPACE_BT709_FULL => 0x22100421 ],
3856 [ SDL_COLORSPACE_BT2020_LIMITED => 0x21102609 ],
3857 [ SDL_COLORSPACE_BT2020_FULL => 0x22102609 ],
3858 [ SDL_COLORSPACE_RGB_DEFAULT => 'SDL_COLORSPACE_SRGB' ],
3859 [ SDL_COLORSPACE_YUV_DEFAULT => 'SDL_COLORSPACE_BT601_LIMITED' ]
3860 ];
3861 _typedef_and_export SDL_Color => Struct [ r => UInt8, g => UInt8, b => UInt8, a => UInt8 ];
3862 _typedef_and_export SDL_FColor => Struct [ r => Float, g => Float, b => Float, a => Float ];
3863 _typedef_and_export SDL_Palette => Struct [ ncolors => Int, colors => Pointer [ SDL_Color() ], version => UInt32, refcount => Int ];
3864 _typedef_and_export SDL_PixelFormatDetails => Struct [
3865 format => SDL_PixelFormat(),
3866 bits_per_pixel => UInt8,
3867 bytes_per_pixel => UInt8,
3868 padding => Array [ UInt8, 2 ],
3869 Rmask => UInt32,
3870 Gmask => UInt32,
3871 Bmask => UInt32,
3872 Amask => UInt32,
3873 Rbits => UInt8,
3874 Gbits => UInt8,
3875 Bbits => UInt8,
3876 Abits => UInt8,
3877 Rshift => UInt8,
3878 Gshift => UInt8,
3879 Bshift => UInt8,
3880 Ashift => UInt8
3881 ];
3882 _affix_and_export SDL_GetPixelFormatName => [ SDL_PixelFormat() ], String;
3883 _affix_and_export
3884 SDL_GetMasksForPixelFormat =>
3885 [ SDL_PixelFormat(), Pointer [Int], Pointer [UInt32], Pointer [UInt32], Pointer [UInt32], Pointer [UInt32] ],
3886 Bool;
3887 _affix_and_export SDL_GetPixelFormatForMasks => [ Int, UInt32, UInt32, UInt32, UInt32 ], SDL_PixelFormat();
3888 _affix_and_export SDL_GetPixelFormatDetails => [ SDL_PixelFormat() ], Pointer [ SDL_PixelFormatDetails() ];
3889 _affix_and_export SDL_CreatePalette => [Int], Pointer [ SDL_Palette() ];
3890 _affix_and_export SDL_SetPaletteColors => [ Pointer [ SDL_Palette() ], Pointer [ SDL_Color() ], Int, Int ], Bool;
3891 _affix_and_export SDL_DestroyPalette => [ Pointer [ SDL_Palette() ] ], Void;
3892 _affix_and_export SDL_MapRGB => [ Pointer [ SDL_PixelFormatDetails() ], Pointer [ SDL_Palette() ], UInt8, UInt8, UInt8 ], UInt32;
3893 _affix_and_export
3894 SDL_MapRGBA => [ Pointer [ SDL_PixelFormatDetails() ], Pointer [ SDL_Palette() ], UInt8, UInt8, UInt8, UInt8 ],
3895 UInt32;
3896 _affix_and_export
3897 SDL_GetRGB =>
3898 [ UInt32, Pointer [ SDL_PixelFormatDetails() ], Pointer [ SDL_Palette() ], Pointer [UInt8], Pointer [UInt8], Pointer [UInt8] ],
3899 Void;
3900 _affix_and_export
3901 SDL_GetRGBA => [
3902 UInt32,
3903 Pointer [ SDL_PixelFormatDetails() ],
3904 Pointer [ SDL_Palette() ],
3905 Pointer [UInt8],
3906 Pointer [UInt8],
3907 Pointer [UInt8],
3908 Pointer [UInt8]
3909 ],
3910 Void;
3911 }
3912  
3913 =head3 C<:platform> - Platform Detection
3914  
3915 SDL provides a means to identify the app's platform, both at compile time and runtime.
3916  
3917 See L<SDL3: CategoryPlatform|https://wiki.libsdl.org/SDL3/CategoryPlatform>
3918  
3919 =cut
3920  
3921 sub _platform() {
3922 state $done++ && return;
3923 _platform_defines();
3924 #
3925 _affix_and_export 'SDL_GetPlatform', [], String;
3926 }
3927  
3928 sub _platform_defines() {
3929 state $done++ && return;
3930  
3931 # We don't need this
3932 }
3933  
3934 =head3 C<:power> - Power Management Status
3935  
3936 SDL power management routines.
3937  
3938 Well, routine.
3939  
3940 There is a single function in this category: L<SDL_GetPowerInfo()|https://wiki.libsdl.org/SDL3/SDL_GetPowerInfo>.
3941  
3942 This function is useful for games on the go. This allows an app to know if it's running on a draining battery, which
3943 can be useful if the app wants to reduce processing, or perhaps framerate, to extend the duration of the battery's
3944 charge. Perhaps the app just wants to show a battery meter when fullscreen, or alert the user when the power is getting
3945 extremely low, so they can save their game.
3946  
3947 See L<SDL3: CategoryPower|https://wiki.libsdl.org/SDL3/CategoryPower>
3948  
3949 =cut
3950  
3951 sub _power() {
3952 state $done++ && return;
3953 #
3954 _error();
3955 _stdinc();
3956 #
3957 _enum_and_export SDL_PowerState => [
3958 [ SDL_POWERSTATE_ERROR => -1 ],
3959 [ SDL_POWERSTATE_UNKNOWN => 0 ],
3960 [ SDL_POWERSTATE_ON_BATTERY => 1 ],
3961 [ SDL_POWERSTATE_NO_BATTERY => 2 ],
3962 [ SDL_POWERSTATE_CHARGING => 3 ],
3963 [ SDL_POWERSTATE_CHARGED => 4 ],
3964 ];
3965 _affix_and_export SDL_GetPowerInfo => [ Pointer [Int], Pointer [Int] ], SDL_PowerState();
3966 }
3967  
3968 =head3 C<:process> - Process Control
3969  
3970 Process control support.
3971  
3972 These functions provide a cross-platform way to spawn and manage OS-level processes.
3973  
3974 See L<SDL3: CategoryProcess|https://wiki.libsdl.org/SDL3/CategoryProcess>
3975  
3976 =cut
3977  
3978 sub _process() {
3979 state $done++ && return;
3980 #
3981 _error();
3982 _iostream();
3983 _properties();
3984 _stdinc();
3985 #
3986 _typedef_and_export SDL_Process => Void;
3987 _affix_and_export SDL_CreateProcess => [ Pointer [String], Bool ], Pointer [ SDL_Process() ];
3988 _enum_and_export SDL_ProcessIO =>
3989 [ 'SDL_PROCESS_STDIO_INHERITED', 'SDL_PROCESS_STDIO_NULL', 'SDL_PROCESS_STDIO_APP', 'SDL_PROCESS_STDIO_REDIRECT' ];
3990 _affix_and_export SDL_CreateProcessWithProperties => [ SDL_PropertiesID() ], Pointer [ SDL_Process() ];
3991 _const_and_export SDL_PROP_PROCESS_CREATE_ARGS_POINTER => 'SDL.process.create.args';
3992 _const_and_export SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER => 'SDL.process.create.environment';
3993 _const_and_export SDL_PROP_PROCESS_CREATE_WORKING_DIRECTORY_STRING => 'SDL.process.create.working_directory';
3994 _const_and_export SDL_PROP_PROCESS_CREATE_STDIN_NUMBER => 'SDL.process.create.stdin_option';
3995 _const_and_export SDL_PROP_PROCESS_CREATE_STDIN_POINTER => 'SDL.process.create.stdin_source';
3996 _const_and_export SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER => 'SDL.process.create.stdout_option';
3997 _const_and_export SDL_PROP_PROCESS_CREATE_STDOUT_POINTER => 'SDL.process.create.stdout_source';
3998 _const_and_export SDL_PROP_PROCESS_CREATE_STDERR_NUMBER => 'SDL.process.create.stderr_option';
3999 _const_and_export SDL_PROP_PROCESS_CREATE_STDERR_POINTER => 'SDL.process.create.stderr_source';
4000 _const_and_export SDL_PROP_PROCESS_CREATE_STDERR_TO_STDOUT_BOOLEAN => 'SDL.process.create.stderr_to_stdout';
4001 _const_and_export SDL_PROP_PROCESS_CREATE_BACKGROUND_BOOLEAN => 'SDL.process.create.background';
4002 _const_and_export SDL_PROP_PROCESS_CREATE_CMDLINE_STRING => 'SDL.process.create.cmdline';
4003 _affix_and_export SDL_GetProcessProperties => [ Pointer [ SDL_Process() ] ], SDL_PropertiesID();
4004 _const_and_export SDL_PROP_PROCESS_PID_NUMBER => 'SDL.process.pid';
4005 _const_and_export SDL_PROP_PROCESS_STDIN_POINTER => 'SDL.process.stdin';
4006 _const_and_export SDL_PROP_PROCESS_STDOUT_POINTER => 'SDL.process.stdout';
4007 _const_and_export SDL_PROP_PROCESS_STDERR_POINTER => 'SDL.process.stderr';
4008 _const_and_export SDL_PROP_PROCESS_BACKGROUND_BOOLEAN => 'SDL.process.background';
4009 _affix_and_export SDL_ReadProcess => [ Pointer [ SDL_Process() ], Pointer [Size_t], Pointer [Int] ], Pointer [Void];
4010 _affix_and_export SDL_GetProcessInput => [ Pointer [ SDL_Process() ] ], Pointer [ SDL_IOStream() ];
4011 _affix_and_export SDL_GetProcessOutput => [ Pointer [ SDL_Process() ] ], Pointer [ SDL_IOStream() ];
4012 _affix_and_export SDL_KillProcess => [ Pointer [ SDL_Process() ], Bool ], Bool;
4013 _affix_and_export SDL_WaitProcess => [ Pointer [ SDL_Process() ], Bool, Pointer [Int] ], Bool;
4014 _affix_and_export SDL_DestroyProcess => [ Pointer [ SDL_Process() ] ], Void;
4015 }
4016  
4017 =head3 C<:properties> - Object Properties
4018  
4019 A property is a variable that can be created and retrieved by name at runtime.
4020  
4021 See L<SDL3: CategoryProperties|https://wiki.libsdl.org/SDL3/CategoryProperties>
4022  
4023 =cut
4024  
4025 sub _properties() {
4026 state $done++ && return;
4027 #
4028 _error();
4029 _stdinc();
4030 #
4031 _typedef_and_export SDL_PropertiesID => UInt32;
4032 _enum_and_export SDL_PropertyType => [
4033 'SDL_PROPERTY_TYPE_INVALID', 'SDL_PROPERTY_TYPE_POINTER', 'SDL_PROPERTY_TYPE_STRING', 'SDL_PROPERTY_TYPE_NUMBER',
4034 'SDL_PROPERTY_TYPE_FLOAT', 'SDL_PROPERTY_TYPE_BOOLEAN'
4035 ];
4036 _const_and_export SDL_PROP_NAME_STRING => 'SDL.name';
4037 _affix_and_export SDL_GetGlobalProperties => [], SDL_PropertiesID();
4038 _affix_and_export SDL_CreateProperties => [], SDL_PropertiesID();
4039 _affix_and_export SDL_CopyProperties => [ SDL_PropertiesID(), SDL_PropertiesID() ], Bool;
4040 _affix_and_export SDL_LockProperties => [ SDL_PropertiesID() ], Bool;
4041 _affix_and_export SDL_UnlockProperties => [ SDL_PropertiesID() ], Void;
4042 _typedef_and_export SDL_CleanupPropertyCallback => Callback [ [ Pointer [Void], Pointer [Void] ] => Void ];
4043 _affix_and_export
4044 SDL_SetPointerPropertyWithCleanup => [ SDL_PropertiesID(), String, Pointer [Void], SDL_CleanupPropertyCallback(), Pointer [Void] ],
4045 Bool;
4046 _affix_and_export SDL_SetPointerProperty => [ SDL_PropertiesID(), String, Pointer [Void] ], Bool;
4047 _affix_and_export SDL_SetStringProperty => [ SDL_PropertiesID(), String, String ], Bool;
4048 _affix_and_export SDL_SetNumberProperty => [ SDL_PropertiesID(), String, SInt64 ], Bool;
4049 _affix_and_export SDL_SetFloatProperty => [ SDL_PropertiesID(), String, Float ], Bool;
4050 _affix_and_export SDL_SetBooleanProperty => [ SDL_PropertiesID(), String, Bool ], Bool;
4051 _affix_and_export SDL_HasProperty => [ SDL_PropertiesID(), String ], Bool;
4052 _affix_and_export SDL_GetPropertyType => [ SDL_PropertiesID(), String ], SDL_PropertyType();
4053 _affix_and_export SDL_GetPointerProperty => [ SDL_PropertiesID(), String, Pointer [Void] ], Pointer [Void];
4054 _affix_and_export SDL_GetStringProperty => [ SDL_PropertiesID(), String, String ], String;
4055 _affix_and_export SDL_GetNumberProperty => [ SDL_PropertiesID(), String, SInt64 ], SInt64;
4056 _affix_and_export SDL_GetFloatProperty => [ SDL_PropertiesID(), String, Float ], Float;
4057 _affix_and_export SDL_GetBooleanProperty => [ SDL_PropertiesID(), String, Bool ], Bool;
4058 _affix_and_export SDL_ClearProperty => [ SDL_PropertiesID(), String ], Bool;
4059 _typedef_and_export SDL_EnumeratePropertiesCallback => Callback [ [ Pointer [Void], SDL_PropertiesID(), String ] => Void ];
4060 _affix_and_export
4061 SDL_EnumerateProperties => [ SDL_PropertiesID(), SDL_EnumeratePropertiesCallback(), Pointer [Void] ],
4062 Bool;
4063 _affix_and_export SDL_DestroyProperties => [ SDL_PropertiesID() ], Void;
4064 }
4065  
4066 =head3 C<:rect> - Rectangle Functions
4067  
4068 Some helper functions for managing rectangles and 2D points, in both integer and floating point versions.
4069  
4070 See L<SDL3: CategoryRect|https://wiki.libsdl.org/SDL3/CategoryRect>
4071  
4072 =cut
4073  
4074 sub _rect() {
4075 state $done++ && return;
4076 _error();
4077 _stdinc();
4078 #
4079 _typedef_and_export SDL_Point => Struct [ x => Int, y => Int ];
4080 _typedef_and_export SDL_FPoint => Struct [ x => Float, y => Float ];
4081 _typedef_and_export SDL_Rect => Struct [ x => Int, y => Int, w => Int, h => Int ];
4082 _typedef_and_export SDL_FRect => Struct [ x => Float, y => Float, w => Float, h => Float ];
4083 _func_and_export SDL_PointInRect => sub ( $p, $r ) {
4084 return ( $p &&
4085 $r &&
4086 ( $p->{x} >= $r->{x} ) &&
4087 ( $p->{x} < ( $r->{x} + $r->{w} ) ) &&
4088 ( $p->{y} >= $r->{y} ) &&
4089 ( $p->{y} < ( $r->{y} + $r->{h} ) ) ) ? 1 : 0;
4090 };
4091 _func_and_export SDL_RectEmpty => sub ($r) { ( ( !$r ) || ( $r->{w} <= 0 ) || ( $r->{h} <= 0 ) ) ? 1 : 0 };
4092 _func_and_export SDL_RectsEqual => sub ( $a, $b ) {
4093 return ( $a && $b && ( $a->{x} == $b->{x} ) && ( $a->{y} == $b->{y} ) && ( $a->{w} == $b->{w} ) && ( $a->{h} == $b->{h} ) ) ? 1 : 0;
4094 };
4095 _affix_and_export SDL_HasRectIntersection => [ Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ] ], Bool;
4096 _affix_and_export SDL_GetRectIntersection => [ Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ] ], Bool;
4097 _affix_and_export SDL_GetRectUnion => [ Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ] ], Bool;
4098 _affix_and_export SDL_GetRectEnclosingPoints => [ Pointer [ SDL_Point() ], Int, Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ] ], Bool;
4099 _affix_and_export SDL_GetRectAndLineIntersection => [ Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Rect() ] ], Bool;
4100 _func_and_export SDL_PointInRectFloat => sub ( $p, $r ) {
4101 return ( $p &&
4102 $r &&
4103 ( $p->{x} >= $r->{x} ) &&
4104 ( $p->{x} <= ( $r->{x} + $r->{w} ) ) &&
4105 ( $p->{y} >= $r->{y} ) &&
4106 ( $p->{y} <= ( $r->{y} + $r->{h} ) ) ) ? 1 : 0;
4107 };
4108 _func_and_export SDL_RectEmptyFloat => sub ($r) {
4109 return ( ( !$r ) || ( $r->{w} < 0.0 ) || ( $r->{h} < 0.0 ) ) ? 1 : 0;
4110 };
4111 _func_and_export SDL_RectsEqualEpsilon => sub ( $a, $b, $epsilon ) {
4112 return (
4113 $a && $b && (
4114 ( $a == $b ) ||
4115 ( ( SDL_fabsf( $a->{x} - $b->{x} ) <= $epsilon ) &&
4116 ( SDL_fabsf( $a->{y} - $b->{y} ) <= $epsilon ) &&
4117 ( SDL_fabsf( $a->{w} - $b->{w} ) <= $epsilon ) &&
4118 ( SDL_fabsf( $a->{h} - $b->{h} ) <= $epsilon ) )
4119 )
4120 ) ? 1 : 0;
4121 };
4122 _func_and_export SDL_RectsEqualFloat => sub ( $a, $b ) {
4123 SDL_RectsEqualEpsilon( $a, $b, SDL_FLT_EPSILON() );
4124 };
4125 _affix_and_export SDL_HasRectIntersectionFloat => [ Pointer [ SDL_FRect() ], Pointer [ SDL_FRect() ] ], Bool;
4126 _affix_and_export SDL_GetRectIntersectionFloat => [ Pointer [ SDL_FRect() ], Pointer [ SDL_FRect() ], Pointer [ SDL_FRect() ] ], Bool;
4127 _affix_and_export SDL_GetRectUnionFloat => [ Pointer [ SDL_FRect() ], Pointer [ SDL_FRect() ], Pointer [ SDL_FRect() ] ], Bool;
4128 _affix_and_export SDL_GetRectEnclosingPointsFloat => [ Pointer [ SDL_FRect() ], Int, Pointer [ SDL_FRect() ], Pointer [ SDL_FRect() ] ], Bool;
4129 _affix_and_export
4130 SDL_GetRectAndLineIntersectionFloat => [ Pointer [ SDL_FRect() ], Pointer [Float], Pointer [Float], Pointer [Float], Pointer [Float] ],
4131 Bool;
4132 }
4133  
4134 =head3 C<:render> - 2D Accelerated Rendering
4135  
4136 SDL 2D rendering functions.
4137  
4138 See L<SDL3: CategoryRender|https://wiki.libsdl.org/SDL3/CategoryRender>
4139  
4140 =cut
4141  
4142 sub _render() {
4143 state $done++ && return;
4144 #
4145 _blendmode();
4146 _error();
4147 _events();
4148 _gpu();
4149 _pixels();
4150 _properties();
4151 _rect();
4152 _stdinc();
4153 _surface();
4154 _video();
4155 #
4156 _const_and_export SDL_SOFTWARE_RENDERER => 'software';
4157 _const_and_export SDL_GPU_RENDERER => 'gpu';
4158 _typedef_and_export SDL_Vertex => Struct [ position => SDL_FPoint(), color => SDL_FColor(), tex_coord => SDL_FPoint() ];
4159 _enum_and_export SDL_TextureAccess => [ 'SDL_TEXTUREACCESS_STATIC', 'SDL_TEXTUREACCESS_STREAMING', 'SDL_TEXTUREACCESS_TARGET' ];
4160 _enum_and_export SDL_TextureAddressMode =>
4161 [ [ SDL_TEXTURE_ADDRESS_INVALID => -1 ], 'SDL_TEXTURE_ADDRESS_AUTO', 'SDL_TEXTURE_ADDRESS_CLAMP', 'SDL_TEXTURE_ADDRESS_WRAP' ];
4162 _enum_and_export SDL_RendererLogicalPresentation => [
4163 'SDL_LOGICAL_PRESENTATION_DISABLED', 'SDL_LOGICAL_PRESENTATION_STRETCH',
4164 'SDL_LOGICAL_PRESENTATION_LETTERBOX', 'SDL_LOGICAL_PRESENTATION_OVERSCAN',
4165 'SDL_LOGICAL_PRESENTATION_INTEGER_SCALE'
4166 ];
4167 _typedef_and_export SDL_Renderer => Void;
4168 _typedef_and_export SDL_Texture => Struct [ format => SDL_PixelFormat(), w => Int, h => Int, refcount => Int ];
4169 _affix_and_export SDL_GetNumRenderDrivers => [], Int;
4170 _affix_and_export SDL_GetRenderDriver => [Int], String;
4171 _affix_and_export
4172 SDL_CreateWindowAndRenderer =>
4173 [ String, Int, Int, SDL_WindowFlags(), Pointer [ Pointer [ SDL_Window() ] ], Pointer [ Pointer [ SDL_Renderer() ] ] ],
4174 Bool;
4175 _affix_and_export SDL_CreateRenderer => [ Pointer [ SDL_Window() ], String ], Pointer [ SDL_Renderer() ];
4176 _affix_and_export SDL_CreateRendererWithProperties => [ SDL_PropertiesID() ], Pointer [ SDL_Renderer() ];
4177 _const_and_export SDL_PROP_RENDERER_CREATE_NAME_STRING => 'SDL.renderer.create.name';
4178 _const_and_export SDL_PROP_RENDERER_CREATE_WINDOW_POINTER => 'SDL.renderer.create.window';
4179 _const_and_export SDL_PROP_RENDERER_CREATE_SURFACE_POINTER => 'SDL.renderer.create.surface';
4180 _const_and_export SDL_PROP_RENDERER_CREATE_OUTPUT_COLORSPACE_NUMBER => 'SDL.renderer.create.output_colorspace';
4181 _const_and_export SDL_PROP_RENDERER_CREATE_PRESENT_VSYNC_NUMBER => 'SDL.renderer.create.present_vsync';
4182 _const_and_export SDL_PROP_RENDERER_CREATE_GPU_DEVICE_POINTER => 'SDL.renderer.create.gpu.device';
4183 _const_and_export SDL_PROP_RENDERER_CREATE_GPU_SHADERS_SPIRV_BOOLEAN => 'SDL.renderer.create.gpu.shaders_spirv';
4184 _const_and_export SDL_PROP_RENDERER_CREATE_GPU_SHADERS_DXIL_BOOLEAN => 'SDL.renderer.create.gpu.shaders_dxil';
4185 _const_and_export SDL_PROP_RENDERER_CREATE_GPU_SHADERS_MSL_BOOLEAN => 'SDL.renderer.create.gpu.shaders_msl';
4186 _const_and_export SDL_PROP_RENDERER_CREATE_VULKAN_INSTANCE_POINTER => 'SDL.renderer.create.vulkan.instance';
4187 _const_and_export SDL_PROP_RENDERER_CREATE_VULKAN_SURFACE_NUMBER => 'SDL.renderer.create.vulkan.surface';
4188 _const_and_export SDL_PROP_RENDERER_CREATE_VULKAN_PHYSICAL_DEVICE_POINTER => 'SDL.renderer.create.vulkan.physical_device';
4189 _const_and_export SDL_PROP_RENDERER_CREATE_VULKAN_DEVICE_POINTER => 'SDL.renderer.create.vulkan.device';
4190 _const_and_export SDL_PROP_RENDERER_CREATE_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER =>
4191 'SDL.renderer.create.vulkan.graphics_queue_family_index';
4192 _const_and_export SDL_PROP_RENDERER_CREATE_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER =>
4193 'SDL.renderer.create.vulkan.present_queue_family_index';
4194  
4195 #~ _affix_and_export
4196 #~ SDL_CreateGPURenderer => [ Pointer [ SDL_GPUDevice() ], Pointer [ SDL_Window() ] ],
4197 #~ Pointer [ SDL_Renderer() ];
4198 #~ _affix_and_export SDL_GetGPURendererDevice => [ Pointer [ SDL_Renderer() ] ], Pointer [ SDL_GPUDevice() ];
4199 _affix_and_export SDL_CreateSoftwareRenderer => [ Pointer [ SDL_Surface() ] ], Pointer [ SDL_Renderer() ];
4200 _affix_and_export SDL_GetRenderer => [ Pointer [ SDL_Window() ] ], Pointer [ SDL_Renderer() ];
4201 _affix_and_export SDL_GetRenderWindow => [ Pointer [ SDL_Renderer() ] ], Pointer [ SDL_Window() ];
4202 _affix_and_export SDL_GetRendererName => [ Pointer [ SDL_Renderer() ] ], String;
4203 _affix_and_export SDL_GetRendererProperties => [ Pointer [ SDL_Renderer() ] ], SDL_PropertiesID();
4204 _const_and_export SDL_PROP_RENDERER_NAME_STRING => 'SDL.renderer.name';
4205 _const_and_export SDL_PROP_RENDERER_WINDOW_POINTER => 'SDL.renderer.window';
4206 _const_and_export SDL_PROP_RENDERER_SURFACE_POINTER => 'SDL.renderer.surface';
4207 _const_and_export SDL_PROP_RENDERER_VSYNC_NUMBER => 'SDL.renderer.vsync';
4208 _const_and_export SDL_PROP_RENDERER_MAX_TEXTURE_SIZE_NUMBER => 'SDL.renderer.max_texture_size';
4209 _const_and_export SDL_PROP_RENDERER_TEXTURE_FORMATS_POINTER => 'SDL.renderer.texture_formats';
4210 _const_and_export SDL_PROP_RENDERER_TEXTURE_WRAPPING_BOOLEAN => 'SDL.renderer.texture_wrapping';
4211 _const_and_export SDL_PROP_RENDERER_OUTPUT_COLORSPACE_NUMBER => 'SDL.renderer.output_colorspace';
4212 _const_and_export SDL_PROP_RENDERER_HDR_ENABLED_BOOLEAN => 'SDL.renderer.HDR_enabled';
4213 _const_and_export SDL_PROP_RENDERER_SDR_WHITE_POINT_FLOAT => 'SDL.renderer.SDR_white_point';
4214 _const_and_export SDL_PROP_RENDERER_HDR_HEADROOM_FLOAT => 'SDL.renderer.HDR_headroom';
4215 _const_and_export SDL_PROP_RENDERER_D3D9_DEVICE_POINTER => 'SDL.renderer.d3d9.device';
4216 _const_and_export SDL_PROP_RENDERER_D3D11_DEVICE_POINTER => 'SDL.renderer.d3d11.device';
4217 _const_and_export SDL_PROP_RENDERER_D3D11_SWAPCHAIN_POINTER => 'SDL.renderer.d3d11.swap_chain';
4218 _const_and_export SDL_PROP_RENDERER_D3D12_DEVICE_POINTER => 'SDL.renderer.d3d12.device';
4219 _const_and_export SDL_PROP_RENDERER_D3D12_SWAPCHAIN_POINTER => 'SDL.renderer.d3d12.swap_chain';
4220 _const_and_export SDL_PROP_RENDERER_D3D12_COMMAND_QUEUE_POINTER => 'SDL.renderer.d3d12.command_queue';
4221 _const_and_export SDL_PROP_RENDERER_VULKAN_INSTANCE_POINTER => 'SDL.renderer.vulkan.instance';
4222 _const_and_export SDL_PROP_RENDERER_VULKAN_SURFACE_NUMBER => 'SDL.renderer.vulkan.surface';
4223 _const_and_export SDL_PROP_RENDERER_VULKAN_PHYSICAL_DEVICE_POINTER => 'SDL.renderer.vulkan.physical_device';
4224 _const_and_export SDL_PROP_RENDERER_VULKAN_DEVICE_POINTER => 'SDL.renderer.vulkan.device';
4225 _const_and_export SDL_PROP_RENDERER_VULKAN_GRAPHICS_QUEUE_FAMILY_INDEX_NUMBER => 'SDL.renderer.vulkan.graphics_queue_family_index';
4226 _const_and_export SDL_PROP_RENDERER_VULKAN_PRESENT_QUEUE_FAMILY_INDEX_NUMBER => 'SDL.renderer.vulkan.present_queue_family_index';
4227 _const_and_export SDL_PROP_RENDERER_VULKAN_SWAPCHAIN_IMAGE_COUNT_NUMBER => 'SDL.renderer.vulkan.swapchain_image_count';
4228 _const_and_export SDL_PROP_RENDERER_GPU_DEVICE_POINTER => 'SDL.renderer.gpu.device';
4229 _affix_and_export SDL_GetRenderOutputSize => [ Pointer [ SDL_Renderer() ], Pointer [Int], Pointer [Int] ], Bool;
4230 _affix_and_export SDL_GetCurrentRenderOutputSize => [ Pointer [ SDL_Renderer() ], Pointer [Int], Pointer [Int] ], Bool;
4231 _affix_and_export
4232 SDL_CreateTexture => [ Pointer [ SDL_Renderer() ], SDL_PixelFormat(), SDL_TextureAccess(), Int, Int ],
4233 Pointer [ SDL_Texture() ];
4234 _affix_and_export
4235 SDL_CreateTextureFromSurface => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Surface() ] ],
4236 Pointer [ SDL_Texture() ];
4237 _affix_and_export
4238 SDL_CreateTextureWithProperties => [ Pointer [ SDL_Renderer() ], SDL_PropertiesID() ],
4239 Pointer [ SDL_Texture() ];
4240 _const_and_export SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER => 'SDL.texture.create.colorspace';
4241 _const_and_export SDL_PROP_TEXTURE_CREATE_FORMAT_NUMBER => 'SDL.texture.create.format';
4242 _const_and_export SDL_PROP_TEXTURE_CREATE_ACCESS_NUMBER => 'SDL.texture.create.access';
4243 _const_and_export SDL_PROP_TEXTURE_CREATE_WIDTH_NUMBER => 'SDL.texture.create.width';
4244 _const_and_export SDL_PROP_TEXTURE_CREATE_HEIGHT_NUMBER => 'SDL.texture.create.height';
4245 _const_and_export SDL_PROP_TEXTURE_CREATE_PALETTE_POINTER => 'SDL.texture.create.palette';
4246 _const_and_export SDL_PROP_TEXTURE_CREATE_SDR_WHITE_POINT_FLOAT => 'SDL.texture.create.SDR_white_point';
4247 _const_and_export SDL_PROP_TEXTURE_CREATE_HDR_HEADROOM_FLOAT => 'SDL.texture.create.HDR_headroom';
4248 _const_and_export SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_POINTER => 'SDL.texture.create.d3d11.texture';
4249 _const_and_export SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_U_POINTER => 'SDL.texture.create.d3d11.texture_u';
4250 _const_and_export SDL_PROP_TEXTURE_CREATE_D3D11_TEXTURE_V_POINTER => 'SDL.texture.create.d3d11.texture_v';
4251 _const_and_export SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_POINTER => 'SDL.texture.create.d3d12.texture';
4252 _const_and_export SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_U_POINTER => 'SDL.texture.create.d3d12.texture_u';
4253 _const_and_export SDL_PROP_TEXTURE_CREATE_D3D12_TEXTURE_V_POINTER => 'SDL.texture.create.d3d12.texture_v';
4254 _const_and_export SDL_PROP_TEXTURE_CREATE_METAL_PIXELBUFFER_POINTER => 'SDL.texture.create.metal.pixelbuffer';
4255 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_NUMBER => 'SDL.texture.create.opengl.texture';
4256 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_UV_NUMBER => 'SDL.texture.create.opengl.texture_uv';
4257 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_U_NUMBER => 'SDL.texture.create.opengl.texture_u';
4258 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGL_TEXTURE_V_NUMBER => 'SDL.texture.create.opengl.texture_v';
4259 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_NUMBER => 'SDL.texture.create.opengles2.texture';
4260 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_UV_NUMBER => 'SDL.texture.create.opengles2.texture_uv';
4261 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_U_NUMBER => 'SDL.texture.create.opengles2.texture_u';
4262 _const_and_export SDL_PROP_TEXTURE_CREATE_OPENGLES2_TEXTURE_V_NUMBER => 'SDL.texture.create.opengles2.texture_v';
4263 _const_and_export SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER => 'SDL.texture.create.vulkan.texture';
4264 _const_and_export SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_POINTER => 'SDL.texture.create.gpu.texture';
4265 _const_and_export SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_UV_POINTER => 'SDL.texture.create.gpu.texture_uv';
4266 _const_and_export SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_U_POINTER => 'SDL.texture.create.gpu.texture_u';
4267 _const_and_export SDL_PROP_TEXTURE_CREATE_GPU_TEXTURE_V_POINTER => 'SDL.texture.create.gpu.texture_v';
4268 _affix_and_export SDL_GetTextureProperties => [ Pointer [ SDL_Texture() ] ], SDL_PropertiesID();
4269 _const_and_export SDL_PROP_TEXTURE_COLORSPACE_NUMBER => 'SDL.texture.colorspace';
4270 _const_and_export SDL_PROP_TEXTURE_FORMAT_NUMBER => 'SDL.texture.format';
4271 _const_and_export SDL_PROP_TEXTURE_ACCESS_NUMBER => 'SDL.texture.access';
4272 _const_and_export SDL_PROP_TEXTURE_WIDTH_NUMBER => 'SDL.texture.width';
4273 _const_and_export SDL_PROP_TEXTURE_HEIGHT_NUMBER => 'SDL.texture.height';
4274 _const_and_export SDL_PROP_TEXTURE_SDR_WHITE_POINT_FLOAT => 'SDL.texture.SDR_white_point';
4275 _const_and_export SDL_PROP_TEXTURE_HDR_HEADROOM_FLOAT => 'SDL.texture.HDR_headroom';
4276 _const_and_export SDL_PROP_TEXTURE_D3D11_TEXTURE_POINTER => 'SDL.texture.d3d11.texture';
4277 _const_and_export SDL_PROP_TEXTURE_D3D11_TEXTURE_U_POINTER => 'SDL.texture.d3d11.texture_u';
4278 _const_and_export SDL_PROP_TEXTURE_D3D11_TEXTURE_V_POINTER => 'SDL.texture.d3d11.texture_v';
4279 _const_and_export SDL_PROP_TEXTURE_D3D12_TEXTURE_POINTER => 'SDL.texture.d3d12.texture';
4280 _const_and_export SDL_PROP_TEXTURE_D3D12_TEXTURE_U_POINTER => 'SDL.texture.d3d12.texture_u';
4281 _const_and_export SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER => 'SDL.texture.d3d12.texture_v';
4282 _const_and_export SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER => 'SDL.texture.opengl.texture';
4283 _const_and_export SDL_PROP_TEXTURE_OPENGL_TEXTURE_UV_NUMBER => 'SDL.texture.opengl.texture_uv';
4284 _const_and_export SDL_PROP_TEXTURE_OPENGL_TEXTURE_U_NUMBER => 'SDL.texture.opengl.texture_u';
4285 _const_and_export SDL_PROP_TEXTURE_OPENGL_TEXTURE_V_NUMBER => 'SDL.texture.opengl.texture_v';
4286 _const_and_export SDL_PROP_TEXTURE_OPENGL_TEXTURE_TARGET_NUMBER => 'SDL.texture.opengl.target';
4287 _const_and_export SDL_PROP_TEXTURE_OPENGL_TEX_W_FLOAT => 'SDL.texture.opengl.tex_w';
4288 _const_and_export SDL_PROP_TEXTURE_OPENGL_TEX_H_FLOAT => 'SDL.texture.opengl.tex_h';
4289 _const_and_export SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_NUMBER => 'SDL.texture.opengles2.texture';
4290 _const_and_export SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_UV_NUMBER => 'SDL.texture.opengles2.texture_uv';
4291 _const_and_export SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER => 'SDL.texture.opengles2.texture_u';
4292 _const_and_export SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER => 'SDL.texture.opengles2.texture_v';
4293 _const_and_export SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER => 'SDL.texture.opengles2.target';
4294 _const_and_export SDL_PROP_TEXTURE_VULKAN_TEXTURE_NUMBER => 'SDL.texture.vulkan.texture';
4295 _const_and_export SDL_PROP_TEXTURE_GPU_TEXTURE_POINTER => 'SDL.texture.gpu.texture';
4296 _const_and_export SDL_PROP_TEXTURE_GPU_TEXTURE_UV_POINTER => 'SDL.texture.gpu.texture_uv';
4297 _const_and_export SDL_PROP_TEXTURE_GPU_TEXTURE_U_POINTER => 'SDL.texture.gpu.texture_u';
4298 _const_and_export SDL_PROP_TEXTURE_GPU_TEXTURE_V_POINTER => 'SDL.texture.gpu.texture_v';
4299 _affix_and_export SDL_GetRendererFromTexture => [ Pointer [ SDL_Texture() ] ], Pointer [ SDL_Renderer() ];
4300 _affix_and_export SDL_GetTextureSize => [ Pointer [ SDL_Texture() ], Pointer [Float], Pointer [Float] ], Bool;
4301  
4302 #~ _affix_and_export SDL_SetTexturePalette => [ Pointer [ SDL_Texture() ], Pointer [ SDL_Palette() ] ], Bool;
4303 #~ _affix_and_export SDL_GetTexturePalette => [ Pointer [ SDL_Texture() ] ], Pointer [ SDL_Palette() ];
4304 _affix_and_export SDL_SetTextureColorMod => [ Pointer [ SDL_Texture() ], UInt8, UInt8, UInt8 ], Bool;
4305 _affix_and_export SDL_SetTextureColorModFloat => [ Pointer [ SDL_Texture() ], Float, Float, Float ], Bool;
4306 _affix_and_export
4307 SDL_GetTextureColorMod => [ Pointer [ SDL_Texture() ], Pointer [UInt8], Pointer [UInt8], Pointer [UInt8] ],
4308 Bool;
4309 _affix_and_export
4310 SDL_GetTextureColorModFloat => [ Pointer [ SDL_Texture() ], Pointer [Float], Pointer [Float], Pointer [Float] ],
4311 Bool;
4312 _affix_and_export SDL_SetTextureAlphaMod => [ Pointer [ SDL_Texture() ], UInt8 ], Bool;
4313 _affix_and_export SDL_SetTextureAlphaModFloat => [ Pointer [ SDL_Texture() ], Float ], Bool;
4314 _affix_and_export SDL_GetTextureAlphaMod => [ Pointer [ SDL_Texture() ], Pointer [UInt8] ], Bool;
4315 _affix_and_export SDL_GetTextureAlphaModFloat => [ Pointer [ SDL_Texture() ], Pointer [Float] ], Bool;
4316 _affix_and_export SDL_SetTextureBlendMode => [ Pointer [ SDL_Texture() ], SDL_BlendMode() ], Bool;
4317 _affix_and_export SDL_GetTextureBlendMode => [ Pointer [ SDL_Texture() ], Pointer [ SDL_BlendMode() ] ], Bool;
4318 _affix_and_export SDL_SetTextureScaleMode => [ Pointer [ SDL_Texture() ], SDL_ScaleMode() ], Bool;
4319 _affix_and_export SDL_GetTextureScaleMode => [ Pointer [ SDL_Texture() ], Pointer [ SDL_ScaleMode() ] ], Bool;
4320 _affix_and_export
4321 SDL_UpdateTexture => [ Pointer [ SDL_Texture() ], Pointer [ SDL_Rect() ], Pointer [Void], Int ],
4322 Bool;
4323 _affix_and_export
4324 SDL_UpdateYUVTexture =>
4325 [ Pointer [ SDL_Texture() ], Pointer [ SDL_Rect() ], Pointer [UInt8], Int, Pointer [UInt8], Int, Pointer [UInt8], Int ],
4326 Bool;
4327 _affix_and_export
4328 SDL_UpdateNVTexture => [ Pointer [ SDL_Texture() ], Pointer [ SDL_Rect() ], Pointer [UInt8], Int, Pointer [UInt8], Int ],
4329 Bool;
4330 _affix_and_export
4331 SDL_LockTexture => [ Pointer [ SDL_Texture() ], Pointer [ SDL_Rect() ], Pointer [ Pointer [Void] ], Pointer [Int] ],
4332 Bool;
4333 _affix_and_export
4334 SDL_LockTextureToSurface => [ Pointer [ SDL_Texture() ], Pointer [ SDL_Rect() ], Pointer [ Pointer [ SDL_Surface() ] ] ],
4335 Bool;
4336 _affix_and_export SDL_UnlockTexture => [ Pointer [ SDL_Texture() ] ], Void;
4337 _affix_and_export SDL_SetRenderTarget => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Texture() ] ], Bool;
4338 _affix_and_export SDL_GetRenderTarget => [ Pointer [ SDL_Renderer() ] ], Pointer [ SDL_Texture() ];
4339 _affix_and_export
4340 SDL_SetRenderLogicalPresentation => [ Pointer [ SDL_Renderer() ], Int, Int, SDL_RendererLogicalPresentation() ],
4341 Bool;
4342 _affix_and_export
4343 SDL_GetRenderLogicalPresentation =>
4344 [ Pointer [ SDL_Renderer() ], Pointer [Int], Pointer [Int], Pointer [ SDL_RendererLogicalPresentation() ] ],
4345 Bool;
4346 _affix_and_export SDL_GetRenderLogicalPresentationRect => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_FRect() ] ], Bool;
4347 _affix_and_export
4348 SDL_RenderCoordinatesFromWindow => [ Pointer [ SDL_Renderer() ], Float, Float, Pointer [Float], Pointer [Float] ],
4349 Bool;
4350 _affix_and_export
4351 SDL_RenderCoordinatesToWindow => [ Pointer [ SDL_Renderer() ], Float, Float, Pointer [Float], Pointer [Float] ],
4352 Bool;
4353 _affix_and_export
4354 SDL_ConvertEventToRenderCoordinates => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Event() ] ],
4355 Bool;
4356 _affix_and_export SDL_SetRenderViewport => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Rect() ] ], Bool;
4357 _affix_and_export SDL_GetRenderViewport => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Rect() ] ], Bool;
4358 _affix_and_export SDL_RenderViewportSet => [ Pointer [ SDL_Renderer() ] ], Bool;
4359 _affix_and_export SDL_GetRenderSafeArea => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Rect() ] ], Bool;
4360 _affix_and_export SDL_SetRenderClipRect => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Rect() ] ], Bool;
4361 _affix_and_export SDL_GetRenderClipRect => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Rect() ] ], Bool;
4362 _affix_and_export SDL_RenderClipEnabled => [ Pointer [ SDL_Renderer() ] ], Bool;
4363 _affix_and_export SDL_SetRenderScale => [ Pointer [ SDL_Renderer() ], Float, Float ], Bool;
4364 _affix_and_export SDL_GetRenderScale => [ Pointer [ SDL_Renderer() ], Pointer [Float], Pointer [Float] ], Bool;
4365 _affix_and_export SDL_SetRenderDrawColor => [ Pointer [ SDL_Renderer() ], UInt8, UInt8, UInt8, UInt8 ], Bool;
4366 _affix_and_export SDL_SetRenderDrawColorFloat => [ Pointer [ SDL_Renderer() ], Float, Float, Float, Float ], Bool;
4367 _affix_and_export
4368 SDL_GetRenderDrawColor => [ Pointer [ SDL_Renderer() ], Pointer [UInt8], Pointer [UInt8], Pointer [UInt8], Pointer [UInt8] ],
4369 Bool;
4370 _affix_and_export
4371 SDL_GetRenderDrawColorFloat => [ Pointer [ SDL_Renderer() ], Pointer [Float], Pointer [Float], Pointer [Float], Pointer [Float] ],
4372 Bool;
4373 _affix_and_export SDL_SetRenderColorScale => [ Pointer [ SDL_Renderer() ], Float ], Bool;
4374 _affix_and_export SDL_GetRenderColorScale => [ Pointer [ SDL_Renderer() ], Pointer [Float] ], Bool;
4375 _affix_and_export SDL_SetRenderDrawBlendMode => [ Pointer [ SDL_Renderer() ], SDL_BlendMode() ], Bool;
4376 _affix_and_export SDL_GetRenderDrawBlendMode => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_BlendMode() ] ], Bool;
4377 _affix_and_export SDL_RenderClear => [ Pointer [ SDL_Renderer() ] ], Bool;
4378 _affix_and_export SDL_RenderPoint => [ Pointer [ SDL_Renderer() ], Float, Float ], Bool;
4379 _affix_and_export SDL_RenderPoints => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_FPoint() ], Int ], Bool;
4380 _affix_and_export SDL_RenderLine => [ Pointer [ SDL_Renderer() ], Float, Float, Float, Float ], Bool;
4381 _affix_and_export SDL_RenderLines => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_FPoint() ], Int ], Bool;
4382 _affix_and_export SDL_RenderRect => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_FRect() ] ], Bool;
4383 _affix_and_export SDL_RenderRects => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_FRect() ], Int ], Bool;
4384 _affix_and_export SDL_RenderFillRect => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_FRect() ] ], Bool;
4385 _affix_and_export SDL_RenderFillRects => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_FRect() ], Int ], Bool;
4386 _affix_and_export
4387 SDL_RenderTexture => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Texture() ], Pointer [ SDL_FRect() ], Pointer [ SDL_FRect() ] ],
4388 Bool;
4389 _affix_and_export
4390 SDL_RenderTextureRotated => [
4391 Pointer [ SDL_Renderer() ],
4392 Pointer [ SDL_Texture() ],
4393 Pointer [ SDL_FRect() ],
4394 Pointer [ SDL_FRect() ],
4395 Double,
4396 Pointer [ SDL_FPoint() ],
4397 SDL_FlipMode()
4398 ],
4399 Bool;
4400 _affix_and_export
4401 SDL_RenderTextureAffine => [
4402 Pointer [ SDL_Renderer() ],
4403 Pointer [ SDL_Texture() ],
4404 Pointer [ SDL_FRect() ],
4405 Pointer [ SDL_FPoint() ],
4406 Pointer [ SDL_FPoint() ],
4407 Pointer [ SDL_FPoint() ]
4408 ],
4409 Bool;
4410 _affix_and_export
4411 SDL_RenderTextureTiled =>
4412 [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Texture() ], Pointer [ SDL_FRect() ], Float, Pointer [ SDL_FRect() ] ],
4413 Bool;
4414 _affix_and_export
4415 SDL_RenderTexture9Grid => [
4416 Pointer [ SDL_Renderer() ],
4417 Pointer [ SDL_Texture() ],
4418 Pointer [ SDL_FRect() ],
4419 Float, Float, Float, Float, Float, Pointer [ SDL_FRect() ]
4420 ],
4421 Bool;
4422  
4423 #~ _affix_and_export
4424 #~ SDL_RenderTexture9GridTiled => [
4425 #~ Pointer [ SDL_Renderer() ],
4426 #~ Pointer [ SDL_Texture() ],
4427 #~ Pointer [ SDL_FRect() ],
4428 #~ Float, Float, Float, Float, Float, Pointer [ SDL_FRect() ], Float
4429 #~ ],
4430 #~ Bool;
4431 _affix_and_export
4432 SDL_RenderGeometry => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Texture() ], Pointer [ SDL_Vertex() ], Int, Pointer [Int], Int ],
4433 Bool;
4434 _affix_and_export
4435 SDL_RenderGeometryRaw => [
4436 Pointer [ SDL_Renderer() ],
4437 Pointer [ SDL_Texture() ],
4438 Pointer [Float],
4439 Int, Pointer [ SDL_FColor() ],
4440 Int, Pointer [Float],
4441 Int, Int, Pointer [Void],
4442 Int, Int
4443 ],
4444 Bool;
4445  
4446 #~ _affix_and_export
4447 #~ SDL_SetRenderTextureAddressMode => [ Pointer [ SDL_Renderer() ], SDL_TextureAddressMode(), SDL_TextureAddressMode() ],
4448 #~ Bool;
4449 #~ _affix_and_export
4450 #~ SDL_GetRenderTextureAddressMode =>
4451 #~ [ Pointer [ SDL_Renderer() ], Pointer [ SDL_TextureAddressMode() ], Pointer [ SDL_TextureAddressMode() ] ],
4452 #~ Bool;
4453 _affix_and_export SDL_RenderReadPixels => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_Rect() ] ], Pointer [ SDL_Surface() ];
4454 _affix_and_export SDL_RenderPresent => [ Pointer [ SDL_Renderer() ] ], Bool;
4455 _affix_and_export SDL_DestroyTexture => [ Pointer [ SDL_Texture() ] ], Void;
4456 _affix_and_export SDL_DestroyRenderer => [ Pointer [ SDL_Renderer() ] ], Void;
4457 _affix_and_export SDL_FlushRenderer => [ Pointer [ SDL_Renderer() ] ], Bool;
4458 _affix_and_export SDL_GetRenderMetalLayer => [ Pointer [ SDL_Renderer() ] ], Pointer [Void];
4459 _affix_and_export SDL_GetRenderMetalCommandEncoder => [ Pointer [ SDL_Renderer() ] ], Pointer [Void];
4460 _affix_and_export SDL_AddVulkanRenderSemaphores => [ Pointer [ SDL_Renderer() ], UInt32, SInt64, SInt64 ], Bool;
4461 _affix_and_export SDL_SetRenderVSync => [ Pointer [ SDL_Renderer() ], Int ], Bool;
4462 _const_and_export SDL_RENDERER_VSYNC_DISABLED => 0;
4463 _const_and_export SDL_RENDERER_VSYNC_ADAPTIVE => -1;
4464 _affix_and_export SDL_GetRenderVSync => [ Pointer [ SDL_Renderer() ], Pointer [Int] ], Bool;
4465 _const_and_export SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE => 8;
4466 _affix_and_export SDL_RenderDebugText => [ Pointer [ SDL_Renderer() ], Float, Float, String ], Bool;
4467  
4468 #~ _affix_and_export SDL_RenderDebugTextFormat => [ Pointer [ SDL_Renderer() ], Float, Float, String, VarArgs ], Bool;
4469 #~ _affix_and_export SDL_SetDefaultTextureScaleMode => [ Pointer [ SDL_Renderer() ], SDL_ScaleMode() ], Bool;
4470 #~ _affix_and_export SDL_GetDefaultTextureScaleMode => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_ScaleMode() ] ], Bool;
4471 _typedef_and_export SDL_GPURenderStateCreateInfo => Struct [
4472 fragment_shader => Pointer [ SDL_GPUShader() ],
4473 num_sampler_bindings => SInt32,
4474 sampler_bindings => Pointer [ SDL_GPUTextureSamplerBinding() ],
4475 num_storage_textures => SInt32,
4476 storage_textures => Pointer [ Pointer [ SDL_GPUTexture() ] ],
4477 num_storage_buffers => SInt32,
4478 storage_buffers => Pointer [ Pointer [ SDL_GPUBuffer() ] ],
4479 props => SDL_PropertiesID()
4480 ];
4481 _typedef_and_export SDL_GPURenderState => Void;
4482  
4483 #~ _affix_and_export
4484 #~ SDL_CreateGPURenderState => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_GPURenderStateCreateInfo() ] ],
4485 #~ Pointer [ SDL_GPURenderState() ];
4486 #~ _affix_and_export
4487 #~ SDL_SetGPURenderStateFragmentUniforms => [ Pointer [ SDL_GPURenderState() ], UInt32, Pointer [Void], UInt32 ],
4488 #~ Bool;
4489 #~ _affix_and_export SDL_SetGPURenderState => [ Pointer [ SDL_Renderer() ], Pointer [ SDL_GPURenderState() ] ], Bool;
4490 #~ _affix_and_export SDL_DestroyGPURenderState => [ Pointer [ SDL_GPURenderState() ] ], Void;
4491 }
4492  
4493 =head3 C<:scancode> - Keyboard Scancodes
4494  
4495 The SDL keyboard scancode representation.
4496  
4497 An SDL scancode is the physical representation of a key on the keyboard, independent of language and keyboard mapping.
4498  
4499 See L<SDL3: CategoryScancode|https://wiki.libsdl.org/SDL3/CategoryScancode>
4500  
4501 =cut
4502  
4503 sub _scancode() {
4504 state $done++ && return;
4505 _enum_and_export SDL_Scancode => [
4506 [ SDL_SCANCODE_A => 4 ], [ SDL_SCANCODE_B => 5 ], [ SDL_SCANCODE_C => 6 ], [ SDL_SCANCODE_D => 7 ], [ SDL_SCANCODE_E => 8 ],
4507 [ SDL_SCANCODE_F => 9 ], [ SDL_SCANCODE_G => 10 ], [ SDL_SCANCODE_H => 11 ], [ SDL_SCANCODE_I => 12 ], [ SDL_SCANCODE_J => 13 ],
4508 [ SDL_SCANCODE_K => 14 ], [ SDL_SCANCODE_L => 15 ], [ SDL_SCANCODE_M => 16 ], [ SDL_SCANCODE_N => 17 ], [ SDL_SCANCODE_O => 18 ],
4509 [ SDL_SCANCODE_P => 19 ], [ SDL_SCANCODE_Q => 20 ], [ SDL_SCANCODE_R => 21 ], [ SDL_SCANCODE_S => 22 ], [ SDL_SCANCODE_T => 23 ],
4510 [ SDL_SCANCODE_U => 24 ], [ SDL_SCANCODE_V => 25 ], [ SDL_SCANCODE_W => 26 ], [ SDL_SCANCODE_X => 27 ], [ SDL_SCANCODE_Y => 28 ],
4511 [ SDL_SCANCODE_Z => 29 ],
4512 #
4513 [ SDL_SCANCODE_1 => 30 ], [ SDL_SCANCODE_2 => 31 ], [ SDL_SCANCODE_3 => 32 ], [ SDL_SCANCODE_4 => 33 ], [ SDL_SCANCODE_5 => 34 ],
4514 [ SDL_SCANCODE_6 => 35 ], [ SDL_SCANCODE_7 => 36 ], [ SDL_SCANCODE_8 => 37 ], [ SDL_SCANCODE_9 => 38 ], [ SDL_SCANCODE_0 => 39 ],
4515 #
4516 [ SDL_SCANCODE_RETURN => 40 ], [ SDL_SCANCODE_ESCAPE => 41 ], [ SDL_SCANCODE_BACKSPACE => 42 ], [ SDL_SCANCODE_TAB => 43 ],
4517 [ SDL_SCANCODE_SPACE => 44 ],
4518 #
4519 [ SDL_SCANCODE_MINUS => 45 ], [ SDL_SCANCODE_EQUALS => 46 ], [ SDL_SCANCODE_LEFTBRACKET => 47 ], [ SDL_SCANCODE_RIGHTBRACKET => 48 ],
4520 [ SDL_SCANCODE_BACKSLASH => 49 ], # Located at the lower left of the return key on ISO
4521  
4522 # keyboards and at the right end of the QWERTY row on ANSI keyboards. Produces REVERSE
4523 # SOLIDUS (backslash) and VERTICAL LINE in a US layout, REVERSE SOLIDUS and VERTICAL
4524 # LINE in a UK Mac layout, NUMBER SIGN and TILDE in a UK Windows layout, DOLLAR SIGN
4525 # and POUND SIGN in a Swiss German layout, NUMBER SIGN and APOSTROPHE in a German
4526 # layout, GRAVE ACCENT and POUND SIGN in a French Mac layout, and ASTERISK and MICRO
4527 # SIGN in a French Windows layout.
4528 [ SDL_SCANCODE_NONUSHASH => 50 ], # ISO USB keyboards actually use this code instead
4529  
4530 # of 49 for the same key, but all OSes I've seen treat the two codes identically. So,
4531 # as an implementor, unless your keyboard generates both of those codes and your OS
4532 # treats them differently, you should generate SDL_SCANCODE_BACKSLASH instead of this
4533 # code. As a user, you should not rely on this code because SDL will never generate it
4534 # with most (all?) keyboards.
4535 [ SDL_SCANCODE_SEMICOLON => 51 ], [ SDL_SCANCODE_APOSTROPHE => 52 ],
4536 [ SDL_SCANCODE_GRAVE => 53 ], # Located in the top left corner (on both ANSI and
4537  
4538 # ISO keyboards). Produces GRAVE ACCENT and TILDE in a US Windows layout and in US and
4539 # UK Mac layouts on ANSI keyboards, GRAVE ACCENT and NOT SIGN in a UK Windows layout,
4540 # SECTION SIGN and PLUS-MINUS SIGN in US and UK Mac layouts on ISO keyboards, SECTION
4541 # SIGN and DEGREE SIGN in a Swiss German layout (Mac: only on ISO keyboards),
4542 # CIRCUMFLEX ACCENT and DEGREE SIGN in a German layout (Mac: only on ISO keyboards),
4543 # SUPERSCRIPT TWO and TILDE in a French Windows layout, COMMERCIAL AT and NUMBER SIGN
4544 # in a French Mac layout on ISO keyboards, and LESS-THAN SIGN and GREATER-THAN SIGN in
4545 # a Swiss German, German, or French Mac layout on ANSI keyboards.
4546 [ SDL_SCANCODE_COMMA => 54 ], [ SDL_SCANCODE_PERIOD => 55 ], [ SDL_SCANCODE_SLASH => 56 ],
4547 #
4548 [ SDL_SCANCODE_CAPSLOCK => 57 ],
4549 #
4550 [ SDL_SCANCODE_F1 => 58 ], [ SDL_SCANCODE_F2 => 59 ], [ SDL_SCANCODE_F3 => 60 ], [ SDL_SCANCODE_F4 => 61 ], [ SDL_SCANCODE_F5 => 62 ],
4551 [ SDL_SCANCODE_F6 => 63 ], [ SDL_SCANCODE_F7 => 64 ], [ SDL_SCANCODE_F8 => 65 ], [ SDL_SCANCODE_F9 => 66 ], [ SDL_SCANCODE_F10 => 67 ],
4552 [ SDL_SCANCODE_F11 => 68 ], [ SDL_SCANCODE_F12 => 69 ], [ SDL_SCANCODE_PRINTSCREEN => 70 ], [ SDL_SCANCODE_SCROLLLOCK => 71 ],
4553 [ SDL_SCANCODE_PAUSE => 72 ], [ SDL_SCANCODE_INSERT => 73 ], # insert on PC, help on some Mac keyboards (but does send code 73, not 117)
4554 [ SDL_SCANCODE_HOME => 74 ], [ SDL_SCANCODE_PAGEUP => 75 ], [ SDL_SCANCODE_DELETE => 76 ], [ SDL_SCANCODE_END => 77 ],
4555 [ SDL_SCANCODE_PAGEDOWN => 78 ], [ SDL_SCANCODE_RIGHT => 79 ], [ SDL_SCANCODE_LEFT => 80 ], [ SDL_SCANCODE_DOWN => 81 ],
4556 [ SDL_SCANCODE_UP => 82 ], [ SDL_SCANCODE_NUMLOCKCLEAR => 83 ], # num lock on PC, clear on Mac keyboards
4557 [ SDL_SCANCODE_KP_DIVIDE => 84 ], [ SDL_SCANCODE_KP_MULTIPLY => 85 ], [ SDL_SCANCODE_KP_MINUS => 86 ], [ SDL_SCANCODE_KP_PLUS => 87 ],
4558 [ SDL_SCANCODE_KP_ENTER => 88 ], [ SDL_SCANCODE_KP_1 => 89 ], [ SDL_SCANCODE_KP_2 => 90 ], [ SDL_SCANCODE_KP_3 => 91 ],
4559 [ SDL_SCANCODE_KP_4 => 92 ], [ SDL_SCANCODE_KP_5 => 93 ], [ SDL_SCANCODE_KP_6 => 94 ], [ SDL_SCANCODE_KP_7 => 95 ],
4560 [ SDL_SCANCODE_KP_8 => 96 ], [ SDL_SCANCODE_KP_9 => 97 ], [ SDL_SCANCODE_KP_0 => 98 ], [ SDL_SCANCODE_KP_PERIOD => 99 ],
4561 [ SDL_SCANCODE_NONUSBACKSLASH => 100 ], # This is the additional key that ISO keyboards
4562  
4563 # have over ANSI ones, located between left shift and Z. Produces GRAVE ACCENT and
4564 # TILDE in a US or UK Mac layout, REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US
4565 # or UK Windows layout, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German,
4566 # German, or French layout.
4567 [ SDL_SCANCODE_APPLICATION => 101 ], # windows contextual menu, compose
4568 [ SDL_SCANCODE_POWER => 102 ], # The USB document says this is a status flag,
4569  
4570 # not a physical key - but some Mac keyboards
4571 # do have a power key.
4572 [ SDL_SCANCODE_KP_EQUALS => 103 ], [ SDL_SCANCODE_F13 => 104 ], [ SDL_SCANCODE_F14 => 105 ], [ SDL_SCANCODE_F15 => 106 ],
4573 [ SDL_SCANCODE_F16 => 107 ], [ SDL_SCANCODE_F17 => 108 ], [ SDL_SCANCODE_F18 => 109 ], [ SDL_SCANCODE_F19 => 110 ],
4574 [ SDL_SCANCODE_F20 => 111 ], [ SDL_SCANCODE_F21 => 112 ], [ SDL_SCANCODE_F22 => 113 ], [ SDL_SCANCODE_F23 => 114 ],
4575 [ SDL_SCANCODE_F24 => 115 ], [ SDL_SCANCODE_EXECUTE => 116 ], [ SDL_SCANCODE_HELP => 117 ], # AL Integrated Help Center
4576 [ SDL_SCANCODE_MENU => 118 ], # Menu (show menu)
4577 [ SDL_SCANCODE_SELECT => 119 ], [ SDL_SCANCODE_STOP => 120 ], # AC Stop
4578 [ SDL_SCANCODE_AGAIN => 121 ], # AC Redo/Repeat
4579 [ SDL_SCANCODE_UNDO => 122 ], # AC Undo
4580 [ SDL_SCANCODE_CUT => 123 ], # AC Cut
4581 [ SDL_SCANCODE_COPY => 124 ], # AC Copy
4582 [ SDL_SCANCODE_PASTE => 125 ], # AC Paste
4583 [ SDL_SCANCODE_FIND => 126 ], # AC Find
4584 [ SDL_SCANCODE_MUTE => 127 ], [ SDL_SCANCODE_VOLUMEUP => 128 ], [ SDL_SCANCODE_VOLUMEDOWN => 129 ],
4585  
4586 # not sure whether there's a reason to enable these
4587 # [SDL_SCANCODE_LOCKINGCAPSLOCK => 130],
4588 # [SDL_SCANCODE_LOCKINGNUMLOCK => 131],
4589 # [SDL_SCANCODE_LOCKINGSCROLLLOCK => 132],
4590 [ SDL_SCANCODE_KP_COMMA => 133 ], [ SDL_SCANCODE_KP_EQUALSAS400 => 134 ],
4591 #
4592 [ SDL_SCANCODE_INTERNATIONAL1 => 135 ], # used on Asian keyboards, see footnotes in USB doc
4593 [ SDL_SCANCODE_INTERNATIONAL2 => 136 ], [ SDL_SCANCODE_INTERNATIONAL3 => 137 ], # Yen
4594 [ SDL_SCANCODE_INTERNATIONAL4 => 138 ], [ SDL_SCANCODE_INTERNATIONAL5 => 139 ], [ SDL_SCANCODE_INTERNATIONAL6 => 140 ],
4595 [ SDL_SCANCODE_INTERNATIONAL7 => 141 ], [ SDL_SCANCODE_INTERNATIONAL8 => 142 ], [ SDL_SCANCODE_INTERNATIONAL9 => 143 ],
4596 [ SDL_SCANCODE_LANG1 => 144 ], # Hangul/English toggle
4597 [ SDL_SCANCODE_LANG2 => 145 ], # Hanja conversion
4598 [ SDL_SCANCODE_LANG3 => 146 ], # Katakana
4599 [ SDL_SCANCODE_LANG4 => 147 ], # Hiragana
4600 [ SDL_SCANCODE_LANG5 => 148 ], # Zenkaku/Hankaku
4601 [ SDL_SCANCODE_LANG6 => 149 ], # reserved
4602 [ SDL_SCANCODE_LANG7 => 150 ], # reserved
4603 [ SDL_SCANCODE_LANG8 => 151 ], # reserved
4604 [ SDL_SCANCODE_LANG9 => 152 ], # reserved
4605  
4606 #
4607 [ SDL_SCANCODE_ALTERASE => 153 ], # Erase-Eaze
4608 [ SDL_SCANCODE_SYSREQ => 154 ], [ SDL_SCANCODE_CANCEL => 155 ], # AC Cancel
4609 [ SDL_SCANCODE_CLEAR => 156 ], [ SDL_SCANCODE_PRIOR => 157 ], [ SDL_SCANCODE_RETURN2 => 158 ], [ SDL_SCANCODE_SEPARATOR => 159 ],
4610 [ SDL_SCANCODE_OUT => 160 ], [ SDL_SCANCODE_OPER => 161 ], [ SDL_SCANCODE_CLEARAGAIN => 162 ], [ SDL_SCANCODE_CRSEL => 163 ],
4611 [ SDL_SCANCODE_EXSEL => 164 ],
4612 #
4613 [ SDL_SCANCODE_KP_00 => 176 ], [ SDL_SCANCODE_KP_000 => 177 ], [ SDL_SCANCODE_THOUSANDSSEPARATOR => 178 ],
4614 [ SDL_SCANCODE_DECIMALSEPARATOR => 179 ], [ SDL_SCANCODE_CURRENCYUNIT => 180 ], [ SDL_SCANCODE_CURRENCYSUBUNIT => 181 ],
4615 [ SDL_SCANCODE_KP_LEFTPAREN => 182 ], [ SDL_SCANCODE_KP_RIGHTPAREN => 183 ], [ SDL_SCANCODE_KP_LEFTBRACE => 184 ],
4616 [ SDL_SCANCODE_KP_RIGHTBRACE => 185 ], [ SDL_SCANCODE_KP_TAB => 186 ], [ SDL_SCANCODE_KP_BACKSPACE => 187 ],
4617 [ SDL_SCANCODE_KP_A => 188 ], [ SDL_SCANCODE_KP_B => 189 ], [ SDL_SCANCODE_KP_C => 190 ], [ SDL_SCANCODE_KP_D => 191 ],
4618 [ SDL_SCANCODE_KP_E => 192 ], [ SDL_SCANCODE_KP_F => 193 ], [ SDL_SCANCODE_KP_XOR => 194 ], [ SDL_SCANCODE_KP_POWER => 195 ],
4619 [ SDL_SCANCODE_KP_PERCENT => 196 ], [ SDL_SCANCODE_KP_LESS => 197 ], [ SDL_SCANCODE_KP_GREATER => 198 ],
4620 [ SDL_SCANCODE_KP_AMPERSAND => 199 ], [ SDL_SCANCODE_KP_DBLAMPERSAND => 200 ], [ SDL_SCANCODE_KP_VERTICALBAR => 201 ],
4621 [ SDL_SCANCODE_KP_DBLVERTICALBAR => 202 ], [ SDL_SCANCODE_KP_COLON => 203 ], [ SDL_SCANCODE_KP_HASH => 204 ],
4622 [ SDL_SCANCODE_KP_SPACE => 205 ], [ SDL_SCANCODE_KP_AT => 206 ], [ SDL_SCANCODE_KP_EXCLAM => 207 ], [ SDL_SCANCODE_KP_MEMSTORE => 208 ],
4623 [ SDL_SCANCODE_KP_MEMRECALL => 209 ], [ SDL_SCANCODE_KP_MEMCLEAR => 210 ], [ SDL_SCANCODE_KP_MEMADD => 211 ],
4624 [ SDL_SCANCODE_KP_MEMSUBTRACT => 212 ], [ SDL_SCANCODE_KP_MEMMULTIPLY => 213 ], [ SDL_SCANCODE_KP_MEMDIVIDE => 214 ],
4625 [ SDL_SCANCODE_KP_PLUSMINUS => 215 ], [ SDL_SCANCODE_KP_CLEAR => 216 ], [ SDL_SCANCODE_KP_CLEARENTRY => 217 ],
4626 [ SDL_SCANCODE_KP_BINARY => 218 ], [ SDL_SCANCODE_KP_OCTAL => 219 ], [ SDL_SCANCODE_KP_DECIMAL => 220 ],
4627 [ SDL_SCANCODE_KP_HEXADECIMAL => 221 ],
4628 #
4629 [ SDL_SCANCODE_LCTRL => 224 ], [ SDL_SCANCODE_LSHIFT => 225 ], [ SDL_SCANCODE_LALT => 226 ], # alt, option
4630 [ SDL_SCANCODE_LGUI => 227 ], # windows, command (apple), meta
4631 [ SDL_SCANCODE_RCTRL => 228 ], [ SDL_SCANCODE_RSHIFT => 229 ], [ SDL_SCANCODE_RALT => 230 ], # alt gr, option
4632 [ SDL_SCANCODE_RGUI => 231 ], # windows, command (apple), meta
4633  
4634 #
4635 [ SDL_SCANCODE_MODE => 257 ], # I'm not sure if this is really not covered by any of
4636  
4637 # the above, but since there's a special SDL_KMOD_MODE for it I'm adding it here
4638 #
4639 # These values are mapped from usage page 0x0C (USB consumer page).
4640 #
4641 # There are way more keys in the spec than we can represent in the current scancode
4642 # range, so pick the ones that commonly come up in real world usage.
4643 [ SDL_SCANCODE_SLEEP => 258 ], # Sleep
4644 [ SDL_SCANCODE_WAKE => 259 ], # Wake
4645 [ SDL_SCANCODE_CHANNEL_INCREMENT => 260 ], # Channel Increment
4646 [ SDL_SCANCODE_CHANNEL_DECREMENT => 261 ], # Channel Decrement
4647 [ SDL_SCANCODE_MEDIA_PLAY => 262 ], # Play
4648 [ SDL_SCANCODE_MEDIA_PAUSE => 263 ], # Pause
4649 [ SDL_SCANCODE_MEDIA_RECORD => 264 ], # Record
4650 [ SDL_SCANCODE_MEDIA_FAST_FORWARD => 265 ], # Fast Forward
4651 [ SDL_SCANCODE_MEDIA_REWIND => 266 ], # Rewind
4652 [ SDL_SCANCODE_MEDIA_NEXT_TRACK => 267 ], # Next Track
4653 [ SDL_SCANCODE_MEDIA_PREVIOUS_TRACK => 268 ], # Previous Track
4654 [ SDL_SCANCODE_MEDIA_STOP => 269 ], # Stop
4655 [ SDL_SCANCODE_MEDIA_EJECT => 270 ], # Eject
4656 [ SDL_SCANCODE_MEDIA_PLAY_PAUSE => 271 ], # Play / Pause
4657 [ SDL_SCANCODE_MEDIA_SELECT => 272 ], # Media Select
4658 [ SDL_SCANCODE_AC_NEW => 273 ], # AC New
4659 [ SDL_SCANCODE_AC_OPEN => 274 ], # AC Open
4660 [ SDL_SCANCODE_AC_CLOSE => 275 ], # AC Close
4661 [ SDL_SCANCODE_AC_EXIT => 276 ], # AC Exit
4662 [ SDL_SCANCODE_AC_SAVE => 277 ], # AC Save
4663 [ SDL_SCANCODE_AC_PRINT => 278 ], # AC Print
4664 [ SDL_SCANCODE_AC_PROPERTIES => 279 ], # AC Properties
4665 [ SDL_SCANCODE_AC_SEARCH => 280 ], # AC Search
4666 [ SDL_SCANCODE_AC_HOME => 281 ], # AC Home
4667 [ SDL_SCANCODE_AC_BACK => 282 ], # AC Back
4668 [ SDL_SCANCODE_AC_FORWARD => 283 ], # AC Forward
4669 [ SDL_SCANCODE_AC_STOP => 284 ], # AC Stop
4670 [ SDL_SCANCODE_AC_REFRESH => 285 ], # AC Refresh
4671 [ SDL_SCANCODE_AC_BOOKMARKS => 286 ], # AC Bookmarks
4672  
4673 # These are values that are often used on mobile phones.
4674 [ SDL_SCANCODE_SOFTLEFT => 287 ], # Usually situated below the display on phones and
4675  
4676 # used as a multi-function feature key for selecting
4677 # a software defined function shown on the bottom left
4678 # of the display.
4679 [ SDL_SCANCODE_SOFTRIGHT => 288 ], # Usually situated below the display on phones and
4680  
4681 # used as a multi-function feature key for selecting
4682 # a software defined function shown on the bottom right
4683 # of the display.
4684 [ SDL_SCANCODE_CALL => 289 ], # Used for accepting phone calls.
4685 [ SDL_SCANCODE_ENDCALL => 290 ], # Used for rejecting phone calls.
4686  
4687 # Add any other keys here.
4688 [ SDL_SCANCODE_RESERVED => 400 ], # 400-500 reserved for dynamic keycodes
4689 [ SDL_SCANCODE_COUNT => 512 ] # not a key, just marks the number of scancodes for array bounds
4690 ];
4691 }
4692  
4693 =head3 C<:sensor> - Sensors
4694  
4695 SDL sensor management.
4696  
4697 These APIs grant access to gyros and accelerometers on various platforms.
4698  
4699 See L<SDL3: CategorySensor|https://wiki.libsdl.org/SDL3/CategorySensor>
4700  
4701 =cut
4702  
4703 sub _sensor() {
4704 state $done++ && return;
4705 _error();
4706 _properties();
4707 _stdinc();
4708 #
4709 _typedef_and_export SDL_Sensor => Void;
4710 _typedef_and_export SDL_SensorID => UInt32;
4711 _const_and_export SDL_STANDARD_GRAVITY => 9.80665;
4712 _enum_and_export SDL_SensorType => [
4713 [ SDL_SENSOR_INVALID => -1 ], 'SDL_SENSOR_UNKNOWN', 'SDL_SENSOR_ACCEL', 'SDL_SENSOR_GYRO',
4714 'SDL_SENSOR_ACCEL_L', 'SDL_SENSOR_GYRO_L', 'SDL_SENSOR_ACCEL_R', 'SDL_SENSOR_GYRO_R',
4715 'SDL_SENSOR_COUNT'
4716 ];
4717 _affix_and_export SDL_GetSensors => [ Pointer [Int] ], Pointer [ SDL_SensorID() ];
4718 _affix_and_export SDL_GetSensorNameForID => [ SDL_SensorID() ], String;
4719 _affix_and_export SDL_GetSensorTypeForID => [ SDL_SensorID() ], SDL_SensorType();
4720 _affix_and_export SDL_GetSensorNonPortableTypeForID => [ SDL_SensorID() ], Int;
4721 _affix_and_export SDL_OpenSensor => [ SDL_SensorID() ], Pointer [ SDL_Sensor() ];
4722 _affix_and_export SDL_GetSensorFromID => [ SDL_SensorID() ], Pointer [ SDL_Sensor() ];
4723 _affix_and_export SDL_GetSensorProperties => [ Pointer [ SDL_Sensor() ] ], SDL_PropertiesID();
4724 _affix_and_export SDL_GetSensorName => [ Pointer [ SDL_Sensor() ] ], String;
4725 _affix_and_export SDL_GetSensorType => [ Pointer [ SDL_Sensor() ] ], SDL_SensorType();
4726 _affix_and_export SDL_GetSensorNonPortableType => [ Pointer [ SDL_Sensor() ] ], Int;
4727 _affix_and_export SDL_GetSensorID => [ Pointer [ SDL_Sensor() ] ], SDL_SensorID();
4728 _affix_and_export SDL_GetSensorData => [ Pointer [ SDL_Sensor() ], Pointer [Float], Int ], Bool;
4729 _affix_and_export SDL_CloseSensor => [ Pointer [ SDL_Sensor() ] ], Void;
4730 _affix_and_export SDL_UpdateSensors => [], Void;
4731 }
4732  
4733 =head3 C<:storage> - Storage Abstraction
4734  
4735 The storage API is a high-level API designed to abstract away the portability issues that come up when using something
4736 lower-level.
4737  
4738 See L<SDL3: CategoryStorage|https://wiki.libsdl.org/SDL3/CategoryStorage>
4739  
4740 =cut
4741  
4742 sub _storage() {
4743 state $done++ && return;
4744 _error();
4745 _filesystem();
4746 _properties();
4747 _stdinc();
4748 #
4749 _typedef_and_export SDL_Storage => Void;
4750 _typedef_and_export SDL_StorageInterface => Struct [
4751 version => UInt32,
4752 close => Callback [ [ Pointer [Void] ] => Bool ],
4753 ready => Callback [ [ Pointer [Void] ] => Bool ],
4754 enumerate => Callback [ [ Pointer [Void], String, SDL_EnumerateDirectoryCallback(), Pointer [Void] ] => Bool ],
4755 info => Callback [ [ Pointer [Void], String, Pointer [ SDL_PathInfo() ] ] => Bool ],
4756 read_file => Callback [ [ Pointer [Void], String, Pointer [Void], UInt64 ] => Bool ],
4757 write_file => Callback [ [ Pointer [Void], String, Pointer [Void], UInt64 ] => Bool ],
4758 mkdir => Callback [ [ Pointer [Void], String ] => Bool ],
4759 remove => Callback [ [ Pointer [Void], String ] => Bool ],
4760 rename => Callback [ [ Pointer [Void], String, String ] => Bool ],
4761 copy => Callback [ [ Pointer [Void], String, String ] => Bool ],
4762 space_remaining => Callback [ [ Pointer [Void] ] => UInt64 ]
4763 ];
4764 _affix_and_export SDL_OpenTitleStorage => [ String, SDL_PropertiesID() ], Pointer [ SDL_Storage() ];
4765 _affix_and_export SDL_OpenUserStorage => [ String, String, SDL_PropertiesID() ], Pointer [ SDL_Storage() ];
4766 _affix_and_export SDL_OpenFileStorage => [String], Pointer [ SDL_Storage() ];
4767 _affix_and_export SDL_OpenStorage => [ Pointer [ SDL_StorageInterface() ], Pointer [Void] ], Pointer [ SDL_Storage() ];
4768 _affix_and_export SDL_CloseStorage => [ Pointer [ SDL_Storage() ] ], Bool;
4769 _affix_and_export SDL_StorageReady => [ Pointer [ SDL_Storage() ] ], Bool;
4770 _affix_and_export SDL_GetStorageFileSize => [ Pointer [ SDL_Storage() ], String, Pointer [UInt64] ], Bool;
4771 _affix_and_export SDL_ReadStorageFile => [ Pointer [ SDL_Storage() ], String, Pointer [Void], UInt64 ], Bool;
4772 _affix_and_export SDL_WriteStorageFile => [ Pointer [ SDL_Storage() ], String, Pointer [Void], UInt64 ], Bool;
4773 _affix_and_export SDL_CreateStorageDirectory => [ Pointer [ SDL_Storage() ], String ], Bool;
4774 _affix_and_export
4775 SDL_EnumerateStorageDirectory => [ Pointer [ SDL_Storage() ], String, SDL_EnumerateDirectoryCallback(), Pointer [Void] ],
4776 Bool;
4777 _affix_and_export SDL_RemoveStoragePath => [ Pointer [ SDL_Storage() ], String ], Bool;
4778 _affix_and_export SDL_RenameStoragePath => [ Pointer [ SDL_Storage() ], String, String ], Bool;
4779 _affix_and_export SDL_CopyStorageFile => [ Pointer [ SDL_Storage() ], String, String ], Bool;
4780 _affix_and_export SDL_GetStoragePathInfo => [ Pointer [ SDL_Storage() ], String, Pointer [ SDL_PathInfo() ] ], Bool;
4781 _affix_and_export SDL_GetStorageSpaceRemaining => [ Pointer [ SDL_Storage() ] ], UInt64;
4782 _affix_and_export
4783 SDL_GlobStorageDirectory => [ Pointer [ SDL_Storage() ], String, String, SDL_GlobFlags(), Pointer [Int] ],
4784 Pointer [String];
4785 }
4786  
4787 =head3 C<:surface> - Surface Creation and Simple Drawing
4788  
4789 SDL surfaces are buffers of pixels in system RAM. These are useful for passing around and manipulating images that are
4790 not stored in GPU memory.
4791  
4792 See L<SDL3: CategorySurface|https://wiki.libsdl.org/SDL3/CategorySurface>
4793  
4794 =cut
4795  
4796 sub _surface() {
4797 state $done++ && return;
4798 _blendmode();
4799 _error();
4800 _iostream();
4801 _pixels();
4802 _properties();
4803 _rect();
4804 _stdinc();
4805 #
4806 _typedef_and_export SDL_SurfaceFlags => UInt32;
4807 _const_and_export SDL_SURFACE_PREALLOCATED => 0x00000001;
4808 _const_and_export SDL_SURFACE_LOCK_NEEDED => 0x00000002;
4809 _const_and_export SDL_SURFACE_LOCKED => 0x00000004;
4810 _const_and_export SDL_SURFACE_SIMD_ALIGNED => 0x00000008;
4811 _func_and_export( SDL_MUSTLOCK => sub ($S) { ( ( ($S)->flags & SDL_SURFACE_LOCK_NEEDED() ) == SDL_SURFACE_LOCK_NEEDED() ) } );
4812 _enum_and_export SDL_ScaleMode =>
4813 [ [ SDL_SCALEMODE_INVALID => -1 ], 'SDL_SCALEMODE_NEAREST', 'SDL_SCALEMODE_LINEAR', 'SDL_SCALEMODE_PIXELART' ];
4814 _enum_and_export SDL_FlipMode => [
4815 'SDL_FLIP_NONE', 'SDL_FLIP_HORIZONTAL',
4816 'SDL_FLIP_VERTICAL', [ SDL_FLIP_HORIZONTAL_AND_VERTICAL => ('SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL') ]
4817 ];
4818 _typedef_and_export SDL_Surface => Struct [
4819 flags => SDL_SurfaceFlags(),
4820 format => SDL_PixelFormat(),
4821 w => Int,
4822 h => Int,
4823 pitch => Int,
4824 pixels => Pointer [Void],
4825 refcount => Int,
4826 reserved => Pointer [Void]
4827 ];
4828 _affix_and_export SDL_CreateSurface => [ Int, Int, SDL_PixelFormat() ], Pointer [ SDL_Surface() ];
4829 _affix_and_export SDL_CreateSurfaceFrom => [ Int, Int, SDL_PixelFormat(), Pointer [Void], Int ], Pointer [ SDL_Surface() ];
4830 _affix_and_export SDL_DestroySurface => [ Pointer [ SDL_Surface() ] ], Void;
4831 _affix_and_export SDL_GetSurfaceProperties => [ Pointer [ SDL_Surface() ] ], SDL_PropertiesID();
4832 _const_and_export SDL_PROP_SURFACE_SDR_WHITE_POINT_FLOAT => 'SDL.surface.SDR_white_point';
4833 _const_and_export SDL_PROP_SURFACE_HDR_HEADROOM_FLOAT => 'SDL.surface.HDR_headroom';
4834 _const_and_export SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING => 'SDL.surface.tonemap';
4835 _const_and_export SDL_PROP_SURFACE_HOTSPOT_X_NUMBER => 'SDL.surface.hotspot.x';
4836 _const_and_export SDL_PROP_SURFACE_HOTSPOT_Y_NUMBER => 'SDL.surface.hotspot.y';
4837 _affix_and_export SDL_SetSurfaceColorspace => [ Pointer [ SDL_Surface() ], SDL_Colorspace() ], Bool;
4838 _affix_and_export SDL_GetSurfaceColorspace => [ Pointer [ SDL_Surface() ] ], SDL_Colorspace();
4839 _affix_and_export SDL_CreateSurfacePalette => [ Pointer [ SDL_Surface() ] ], Pointer [ SDL_Palette() ];
4840 _affix_and_export SDL_SetSurfacePalette => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Palette() ] ], Bool;
4841 _affix_and_export SDL_GetSurfacePalette => [ Pointer [ SDL_Surface() ] ], Pointer [ SDL_Palette() ];
4842 _affix_and_export SDL_AddSurfaceAlternateImage => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Surface() ] ], Bool;
4843 _affix_and_export SDL_SurfaceHasAlternateImages => [ Pointer [ SDL_Surface() ] ], Bool;
4844 _affix_and_export SDL_GetSurfaceImages => [ Pointer [ SDL_Surface() ], Pointer [Int] ], Pointer [ Pointer [ SDL_Surface() ] ];
4845 _affix_and_export SDL_RemoveSurfaceAlternateImages => [ Pointer [ SDL_Surface() ] ], Void;
4846 _affix_and_export SDL_LockSurface => [ Pointer [ SDL_Surface() ] ], Bool;
4847 _affix_and_export SDL_UnlockSurface => [ Pointer [ SDL_Surface() ] ], Void;
4848  
4849 #~ _affix_and_export SDL_LoadSurface_IO => [ Pointer [ SDL_IOStream() ], Bool ], Pointer [ SDL_Surface() ];
4850 #_affix_and_export SDL_LoadSurface => [String], Pointer [ SDL_Surface() ];
4851 #~ _affix_and_export SDL_LoadBMP_IO => [ Pointer [ SDL_IOStream() ], Bool ], Pointer [ SDL_Surface() ];
4852 #~ _affix_and_export SDL_LoadBMP => [String], Pointer [ SDL_Surface() ];
4853 #~ _affix_and_export SDL_SaveBMP_IO => [ Pointer [ SDL_Surface() ], Pointer [ SDL_IOStream() ], Bool ], Bool;
4854 #~ _affix_and_export SDL_SaveBMP => [ Pointer [ SDL_Surface() ], String ], Bool;
4855 #~ _affix_and_export SDL_LoadPNG_IO => [ Pointer [ SDL_IOStream() ], Bool ], Pointer [ SDL_Surface() ];
4856 #~ _affix_and_export SDL_LoadPNG => [String], Pointer [ SDL_Surface() ]
4857 #~ _affix_and_export SDL_SavePNG_IO => [ Pointer [ SDL_Surface() ], Pointer [ SDL_IOStream() ], Bool ], Bool;
4858 #~ _affix_and_export SDL_SavePNG => [ Pointer [ SDL_Surface() ], String ], Bool;
4859 _affix_and_export SDL_SetSurfaceRLE => [ Pointer [ SDL_Surface() ], Bool ], Bool;
4860 _affix_and_export SDL_SurfaceHasRLE => [ Pointer [ SDL_Surface() ] ], Bool;
4861 _affix_and_export SDL_SetSurfaceColorKey => [ Pointer [ SDL_Surface() ], Bool, UInt32 ], Bool;
4862 _affix_and_export SDL_SurfaceHasColorKey => [ Pointer [ SDL_Surface() ] ], Bool;
4863 _affix_and_export SDL_GetSurfaceColorKey => [ Pointer [ SDL_Surface() ], Pointer [UInt32] ], Bool;
4864 _affix_and_export SDL_SetSurfaceColorMod => [ Pointer [ SDL_Surface() ], UInt8, UInt8, UInt8 ], Bool;
4865 _affix_and_export
4866 SDL_GetSurfaceColorMod => [ Pointer [ SDL_Surface() ], Pointer [UInt8], Pointer [UInt8], Pointer [UInt8] ],
4867 Bool;
4868 _affix_and_export SDL_SetSurfaceAlphaMod => [ Pointer [ SDL_Surface() ], UInt8 ], Bool;
4869 _affix_and_export SDL_GetSurfaceAlphaMod => [ Pointer [ SDL_Surface() ], Pointer [UInt8] ], Bool;
4870 _affix_and_export SDL_SetSurfaceBlendMode => [ Pointer [ SDL_Surface() ], SDL_BlendMode() ], Bool;
4871 _affix_and_export SDL_GetSurfaceBlendMode => [ Pointer [ SDL_Surface() ], Pointer [ SDL_BlendMode() ] ], Bool;
4872 _affix_and_export SDL_SetSurfaceClipRect => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ] ], Bool;
4873 _affix_and_export SDL_GetSurfaceClipRect => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ] ], Bool;
4874 _affix_and_export SDL_FlipSurface => [ Pointer [ SDL_Surface() ], SDL_FlipMode() ], Bool;
4875  
4876 #~ _affix_and_export SDL_RotateSurface => [ Pointer [ SDL_Surface() ], Float ], Pointer [ SDL_Surface() ];
4877 _affix_and_export SDL_DuplicateSurface => [ Pointer [ SDL_Surface() ] ], Pointer [ SDL_Surface() ];
4878 _affix_and_export SDL_ScaleSurface => [ Pointer [ SDL_Surface() ], Int, Int, SDL_ScaleMode() ], Pointer [ SDL_Surface() ];
4879 _affix_and_export SDL_ConvertSurface => [ Pointer [ SDL_Surface() ], SDL_PixelFormat() ], Pointer [ SDL_Surface() ];
4880 _affix_and_export
4881 SDL_ConvertSurfaceAndColorspace =>
4882 [ Pointer [ SDL_Surface() ], SDL_PixelFormat(), Pointer [ SDL_Palette() ], SDL_Colorspace(), SDL_PropertiesID() ],
4883 Pointer [ SDL_Surface() ];
4884 _affix_and_export
4885 SDL_ConvertPixels => [ Int, Int, SDL_PixelFormat(), Pointer [Void], Int, SDL_PixelFormat(), Pointer [Void], Int ],
4886 Bool;
4887 _affix_and_export
4888 SDL_ConvertPixelsAndColorspace => [
4889 Int, Int, SDL_PixelFormat(), SDL_Colorspace(), SDL_PropertiesID(), Pointer [Void],
4890 Int, SDL_PixelFormat(), SDL_Colorspace(), SDL_PropertiesID(), Pointer [Void], Int
4891 ],
4892 Bool;
4893 _affix_and_export
4894 SDL_PremultiplyAlpha => [ Int, Int, SDL_PixelFormat(), Pointer [Void], Int, SDL_PixelFormat(), Pointer [Void], Int, Bool ],
4895 Bool;
4896 _affix_and_export SDL_PremultiplySurfaceAlpha => [ Pointer [ SDL_Surface() ], Bool ], Bool;
4897 _affix_and_export SDL_ClearSurface => [ Pointer [ SDL_Surface() ], Float, Float, Float, Float ], Bool;
4898 _affix_and_export SDL_FillSurfaceRect => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], UInt32 ], Bool;
4899 _affix_and_export SDL_FillSurfaceRects => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Int, UInt32 ], Bool;
4900 _affix_and_export
4901 SDL_BlitSurface => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ] ],
4902 Bool;
4903 _affix_and_export
4904 SDL_BlitSurfaceUnchecked => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ] ],
4905 Bool;
4906 _affix_and_export
4907 SDL_BlitSurfaceScaled =>
4908 [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], SDL_ScaleMode() ],
4909 Bool;
4910 _affix_and_export
4911 SDL_BlitSurfaceUncheckedScaled =>
4912 [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], SDL_ScaleMode() ],
4913 Bool;
4914 _affix_and_export
4915 SDL_StretchSurface =>
4916 [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], SDL_ScaleMode() ],
4917 Bool;
4918 _affix_and_export
4919 SDL_BlitSurfaceTiled => [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ] ],
4920 Bool;
4921 _affix_and_export
4922 SDL_BlitSurfaceTiledWithScale =>
4923 [ Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ], Float, SDL_ScaleMode(), Pointer [ SDL_Surface() ], Pointer [ SDL_Rect() ] ],
4924 Bool;
4925 _affix_and_export
4926 SDL_BlitSurface9Grid => [
4927 Pointer [ SDL_Surface() ],
4928 Pointer [ SDL_Rect() ],
4929 Int, Int, Int, Int, Float, SDL_ScaleMode(),
4930 Pointer [ SDL_Surface() ],
4931 Pointer [ SDL_Rect() ]
4932 ],
4933 Bool;
4934 _affix_and_export SDL_MapSurfaceRGB => [ Pointer [ SDL_Surface() ], UInt8, UInt8, UInt8 ], UInt32;
4935 _affix_and_export SDL_MapSurfaceRGBA => [ Pointer [ SDL_Surface() ], UInt8, UInt8, UInt8, UInt8 ], UInt32;
4936 _affix_and_export
4937 SDL_ReadSurfacePixel => [ Pointer [ SDL_Surface() ], Int, Int, Pointer [UInt8], Pointer [UInt8], Pointer [UInt8], Pointer [UInt8] ],
4938 Bool;
4939 _affix_and_export
4940 SDL_ReadSurfacePixelFloat => [ Pointer [ SDL_Surface() ], Int, Int, Pointer [Float], Pointer [Float], Pointer [Float], Pointer [Float] ],
4941 Bool;
4942 _affix_and_export SDL_WriteSurfacePixel => [ Pointer [ SDL_Surface() ], Int, Int, UInt8, UInt8, UInt8, UInt8 ], Bool;
4943 _affix_and_export SDL_WriteSurfacePixelFloat => [ Pointer [ SDL_Surface() ], Int, Int, Float, Float, Float, Float ], Bool;
4944 }
4945  
4946 =head3 C<:stdinc> - Standard Library Functionality
4947  
4948 SDL provides its own implementation of some of the most important C runtime functions. Using these functions allows an
4949 app to have access to common C functionality without depending on a specific C runtime (or a C runtime at all).
4950  
4951 See L<SDL3: CategoryStdinc|https://wiki.libsdl.org/SDL3/CategoryStdinc>
4952  
4953 =cut
4954  
4955 sub _stdinc() {
4956 state $done++ && return;
4957 _error();
4958 #
4959 _affix_and_export SDL_malloc => [Size_t], Pointer [Void];
4960 _affix_and_export SDL_calloc => [ Size_t, Size_t ], Pointer [Void];
4961 _affix_and_export SDL_realloc => [ Pointer [Void], Size_t ], Pointer [Void];
4962 _affix_and_export SDL_free => [ Pointer [Void] ], Void;
4963 _typedef_and_export SDL_malloc_func => Callback [ [Size_t] => Pointer [Void] ];
4964 _typedef_and_export SDL_calloc_func => Callback [ [ Size_t, Size_t ] => Pointer [Void] ];
4965 _typedef_and_export SDL_realloc_func => Callback [ [ Pointer [Void], Size_t ] => Pointer [Void] ];
4966 _typedef_and_export SDL_free_func => Callback [ [ Pointer [Void] ] => Void ];
4967 _affix_and_export
4968 SDL_GetOriginalMemoryFunctions =>
4969 [ Pointer [ SDL_malloc_func() ], Pointer [ SDL_calloc_func() ], Pointer [ SDL_realloc_func() ], Pointer [ SDL_free_func() ] ],
4970 Void;
4971 _affix_and_export
4972 SDL_GetMemoryFunctions =>
4973 [ Pointer [ SDL_malloc_func() ], Pointer [ SDL_calloc_func() ], Pointer [ SDL_realloc_func() ], Pointer [ SDL_free_func() ] ],
4974 Void;
4975 _affix_and_export
4976 SDL_SetMemoryFunctions =>
4977 [ Pointer [ SDL_malloc_func() ], Pointer [ SDL_calloc_func() ], Pointer [ SDL_realloc_func() ], Pointer [ SDL_free_func() ] ],
4978 Void;
4979 _affix_and_export SDL_aligned_alloc => [ Size_t, Size_t ], Pointer [Void];
4980 _affix_and_export SDL_aligned_free => [ Pointer [Void] ], Void;
4981 _affix_and_export SDL_GetNumAllocations => [], Int;
4982 _typedef_and_export SDL_Environment => Pointer [Void];
4983 _affix_and_export SDL_GetEnvironment => [], SDL_Environment();
4984 _affix_and_export
4985 SDL_CreateEnvironment => [Bool],
4986 SDL_Environment();
4987 _affix_and_export SDL_GetEnvironmentVariable => [ SDL_Environment(), String ], String;
4988 _affix_and_export SDL_GetEnvironmentVariables => [ SDL_Environment() ], Pointer [String];
4989 _affix_and_export SDL_SetEnvironmentVariable => [ SDL_Environment(), String, String, Bool ], Bool;
4990 _affix_and_export SDL_UnsetEnvironmentVariable => [ SDL_Environment(), String ], Bool;
4991 _affix_and_export SDL_DestroyEnvironment => [ SDL_Environment() ], Void;
4992 _affix_and_export SDL_getenv => [String], String;
4993 _affix_and_export SDL_getenv_unsafe => [String], String;
4994 _affix_and_export SDL_setenv_unsafe => [ String, String, Int ], Int;
4995 _affix_and_export SDL_unsetenv_unsafe => [String], Int;
4996 _typedef_and_export SDL_CompareCallback => Callback [ [ Pointer [Void], Pointer [Void] ] => Int ];
4997 _affix_and_export SDL_qsort => [ Pointer [Void], Size_t, Size_t, SDL_CompareCallback() ], Void;
4998 _affix_and_export SDL_bsearch => [ Pointer [Void], Pointer [Void], Size_t, Size_t, SDL_CompareCallback() ], Pointer [Void];
4999 _typedef_and_export SDL_CompareCallback_r => Callback [ [ Pointer [Void], Pointer [Void], Pointer [Void] ] => Int ];
5000 _affix_and_export SDL_qsort_r => [ Pointer [Void], Size_t, Size_t, SDL_CompareCallback_r(), Pointer [Void] ], Void;
5001 _affix_and_export
5002 SDL_bsearch_r => [ Pointer [Void], Pointer [Void], Size_t, Size_t, SDL_CompareCallback_r(), Pointer [Void] ],
5003 Pointer [Void];
5004 _affix_and_export SDL_abs => [Int], Int;
5005 _func_and_export SDL_min => sub ( $x, $y ) { ( ( ($x) < ($y) ) ? ($x) : ($y) ) };
5006 _func_and_export SDL_max => sub ( $x, $y ) { ( ( ($x) > ($y) ) ? ($x) : ($y) ) };
5007 _func_and_export SDL_clamp => sub ( $x, $a, $b ) { ( ( ($x) < ($a) ) ? ($a) : ( ( ($x) > ($b) ) ? ($b) : ($x) ) ) };
5008 _affix_and_export SDL_isalpha => [Int], Int;
5009 _affix_and_export SDL_isalnum => [Int], Int;
5010 _affix_and_export SDL_isblank => [Int], Int;
5011 _affix_and_export SDL_iscntrl => [Int], Int;
5012 _affix_and_export SDL_isdigit => [Int], Int;
5013 _affix_and_export SDL_isxdigit => [Int], Int;
5014 _affix_and_export SDL_ispunct => [Int], Int;
5015 _affix_and_export SDL_isspace => [Int], Int;
5016 _affix_and_export SDL_isupper => [Int], Int;
5017 _affix_and_export SDL_islower => [Int], Int;
5018 _affix_and_export SDL_isprint => [Int], Int;
5019 _affix_and_export SDL_isgraph => [Int], Int;
5020 _affix_and_export SDL_toupper => [Int], Int;
5021 _affix_and_export SDL_tolower => [Int], Int;
5022 _affix_and_export SDL_crc16 => [ UInt16, Pointer [Void], Size_t ], UInt16;
5023 _affix_and_export SDL_crc32 => [ UInt32, Pointer [Void], Size_t ], UInt32;
5024 _affix_and_export SDL_murmur3_32 => [ Pointer [Void], Size_t, UInt32 ], UInt32;
5025 _affix_and_export SDL_memcpy => [ Pointer [Void], Pointer [Void], Size_t ], Pointer [Void];
5026 _affix_and_export SDL_memmove => [ Pointer [Void], Pointer [Void], Size_t ], Pointer [Void];
5027 _affix_and_export SDL_memset => [ Pointer [Void], Int, Size_t ], Pointer [Void];
5028 _affix_and_export SDL_memset4 => [ Pointer [Void], UInt32, Size_t ], Pointer [Void];
5029 _affix_and_export SDL_memcmp => [ Pointer [Void], Pointer [Void], Size_t ], Int;
5030 _affix_and_export SDL_wcslen => [ Pointer [WChar] ], Size_t;
5031 _affix_and_export SDL_wcsnlen => [ Pointer [WChar], Size_t ], Size_t;
5032 _affix_and_export SDL_wcslcpy => [ Pointer [WChar], WString, Size_t ], Size_t;
5033 _affix_and_export SDL_wcslcat => [ Pointer [WChar], WString, Size_t ], Size_t;
5034 _affix_and_export SDL_wcsdup => [WString], WString;
5035 _affix_and_export SDL_wcsstr => [ WString, WString ], WString;
5036 _affix_and_export SDL_wcsnstr => [ WString, WString, Size_t ], WString;
5037 _affix_and_export SDL_wcscmp => [ WString, WString ], Int;
5038 _affix_and_export SDL_wcsncmp => [ WString, WString, Size_t ], Int;
5039 _affix_and_export SDL_wcscasecmp => [ WString, WString ], Int;
5040 _affix_and_export SDL_wcsncasecmp => [ WString, WString, Size_t ], Int;
5041 _affix_and_export SDL_wcstol => [ WString, Pointer [ Pointer [WChar] ], Int ], Long;
5042 _affix_and_export SDL_strlen => [String], Size_t;
5043 _affix_and_export SDL_strnlen => [ String, Size_t ], Size_t;
5044 _affix_and_export SDL_strlcpy => [ Pointer [UInt8], String, Size_t ], Size_t;
5045 _affix_and_export SDL_utf8strlcpy => [ Pointer [UInt8], String, Size_t ], Size_t;
5046 _affix_and_export SDL_strlcat => [ Pointer [UInt8], String, Size_t ], Size_t;
5047 _affix_and_export SDL_strdup => [String], String;
5048 _affix_and_export SDL_strndup => [ String, Size_t ], String;
5049 _affix_and_export SDL_strrev => [ Pointer [UInt8] ], String;
5050 _affix_and_export SDL_strupr => [ Pointer [UInt8] ], String;
5051 _affix_and_export SDL_strlwr => [ Pointer [UInt8] ], String;
5052 _affix_and_export SDL_strchr => [ String, Int ], String;
5053 _affix_and_export SDL_strrchr => [ String, Int ], String;
5054 _affix_and_export SDL_strstr => [ String, String ], String;
5055 _affix_and_export SDL_strnstr => [ String, String, Size_t ], String;
5056 _affix_and_export SDL_strcasestr => [ String, String ], String;
5057 _affix_and_export SDL_strtok_r => [ Pointer [UInt8], String, Pointer [ Pointer [UInt8] ] ], String;
5058 _affix_and_export SDL_utf8strlen => [String], Size_t;
5059 _affix_and_export SDL_utf8strnlen => [ String, Size_t ], Size_t;
5060 _affix_and_export SDL_itoa => [ Int, Pointer [UInt8], Int ], String;
5061 _affix_and_export SDL_uitoa => [ UInt, Pointer [UInt8], Int ], String;
5062 _affix_and_export SDL_ltoa => [ Long, Pointer [UInt8], Int ], String;
5063 _affix_and_export SDL_ultoa => [ ULong, Pointer [UInt8], Int ], String;
5064 _affix_and_export SDL_lltoa => [ LongLong, Pointer [UInt8], Int ], String;
5065 _affix_and_export SDL_ulltoa => [ ULongLong, Pointer [UInt8], Int ], String;
5066 _affix_and_export SDL_atoi => [String], Int;
5067 _affix_and_export SDL_atof => [String], Double;
5068 _affix_and_export SDL_strtol => [ String, Pointer [ Pointer [UInt8] ], Int ], Long;
5069 _affix_and_export SDL_strtoul => [ String, Pointer [ Pointer [UInt8] ], Int ], ULong;
5070 _affix_and_export SDL_strtoll => [ String, Pointer [ Pointer [UInt8] ], Int ], LongLong;
5071 _affix_and_export SDL_strtoull => [ String, Pointer [ Pointer [UInt8] ], Int ], ULongLong;
5072 _affix_and_export SDL_strtod => [ String, Pointer [ Pointer [UInt8] ] ], Double;
5073 _affix_and_export SDL_strcmp => [ String, String ], Int;
5074 _affix_and_export SDL_strncmp => [ String, String, Size_t ], Int;
5075 _affix_and_export SDL_strcasecmp => [ String, String ], Int;
5076 _affix_and_export SDL_strncasecmp => [ String, String, Size_t ], Int;
5077 _affix_and_export SDL_strpbrk => [ String, String ], String;
5078 _const_and_export SDL_INVALID_UNICODE_CODEPOINT => 0xFFFD;
5079 _affix_and_export SDL_StepUTF8 => [ Pointer [String], Pointer [Size_t] ], UInt32;
5080 _affix_and_export SDL_StepBackUTF8 => [ String, Pointer [String] ], UInt32;
5081 _affix_and_export SDL_UCS4ToUTF8 => [ UInt32, Pointer [UInt8] ], String;
5082  
5083 #~ _affix_and_export SDL_sscanf => [ String, String, VarArgs ], Int;
5084 _affix_and_export SDL_vsscanf => [ String, String, Pointer [Void] ], Int;
5085  
5086 #~ _affix_and_export SDL_snprintf => [ Pointer [UInt8], Size_t, String, VarArgs ], Int;
5087 #~ _affix_and_export SDL_swprintf => [ Pointer [WChar], Size_t, WString, VarArgs ], Int;
5088 _affix_and_export SDL_vsnprintf => [ Pointer [UInt8], Size_t, String, Pointer [Void] ], Int;
5089 _affix_and_export SDL_vswprintf => [ Pointer [WChar], Size_t, WString, Pointer [Void] ], Int;
5090  
5091 #~ _affix_and_export SDL_asprintf => [ Pointer [ Pointer [UInt8] ], String, VarArgs ], Int;
5092 _affix_and_export SDL_vasprintf => [ Pointer [ Pointer [UInt8] ], String, Pointer [Void] ], Int;
5093 _affix_and_export SDL_srand => [UInt64], Void;
5094 _affix_and_export SDL_rand => [SInt32], SInt32;
5095 _affix_and_export SDL_randf => [], Float;
5096 _affix_and_export SDL_rand_bits => [], UInt32;
5097 _affix_and_export SDL_rand_r => [ Pointer [UInt64], SInt32 ], SInt32;
5098 _affix_and_export SDL_randf_r => [ Pointer [UInt64] ], Float;
5099 _affix_and_export SDL_rand_bits_r => [ Pointer [UInt64] ], UInt32;
5100 _const_and_export SDL_PI_D => 3.141592653589793238462643383279502884;
5101 _const_and_export SDL_PI_F => 3.141592653589793238462643383279502884;
5102 _affix_and_export SDL_acos => [Double], Double;
5103 _affix_and_export SDL_acosf => [Float], Float;
5104 _affix_and_export SDL_asin => [Double], Double;
5105 _affix_and_export SDL_asinf => [Float], Float;
5106 _affix_and_export SDL_atan => [Double], Double;
5107 _affix_and_export SDL_atanf => [Float], Float;
5108 _affix_and_export SDL_atan2 => [ Double, Double ], Double;
5109 _affix_and_export SDL_atan2f => [ Float, Float ], Float;
5110 _affix_and_export SDL_ceil => [Double], Double;
5111 _affix_and_export SDL_ceilf => [Float], Float;
5112 _affix_and_export SDL_copysign => [ Double, Double ], Double;
5113 _affix_and_export SDL_copysignf => [ Float, Float ], Float;
5114 _affix_and_export SDL_cos => [Double], Double;
5115 _affix_and_export SDL_cosf => [Float], Float;
5116 _affix_and_export SDL_exp => [Double], Double;
5117 _affix_and_export SDL_expf => [Float], Float;
5118 _affix_and_export SDL_fabs => [Double], Double;
5119 _affix_and_export SDL_fabsf => [Float], Float;
5120 _affix_and_export SDL_floor => [Double], Double;
5121 _affix_and_export SDL_floorf => [Float], Float;
5122 _affix_and_export SDL_trunc => [Double], Double;
5123 _affix_and_export SDL_truncf => [Float], Float;
5124 _affix_and_export SDL_fmod => [ Double, Double ], Double;
5125 _affix_and_export SDL_fmodf => [ Float, Float ], Float;
5126 _affix_and_export SDL_isinf => [Double], Int;
5127 _affix_and_export SDL_isinff => [Float], Int;
5128 _affix_and_export SDL_isnan => [Double], Int;
5129 _affix_and_export SDL_isnanf => [Float], Int;
5130 _affix_and_export SDL_log => [Double], Double;
5131 _affix_and_export SDL_logf => [Float], Float;
5132 _affix_and_export SDL_log10 => [Double], Double;
5133 _affix_and_export SDL_log10f => [Float], Float;
5134 _affix_and_export SDL_modf => [ Double, Pointer [Double] ], Double;
5135 _affix_and_export SDL_modff => [ Float, Pointer [Float] ], Float;
5136 _affix_and_export SDL_pow => [ Double, Double ], Double;
5137 _affix_and_export SDL_powf => [ Float, Float ], Float;
5138 _affix_and_export SDL_round => [Double], Double;
5139 _affix_and_export SDL_roundf => [Float], Float;
5140 _affix_and_export SDL_lround => [Double], Long;
5141 _affix_and_export SDL_lroundf => [Float], Long;
5142 _affix_and_export SDL_scalbn => [ Double, Int ], Double;
5143 _affix_and_export SDL_scalbnf => [ Float, Int ], Float;
5144 _affix_and_export SDL_sin => [Double], Double;
5145 _affix_and_export SDL_sinf => [Float], Float;
5146 _affix_and_export SDL_sqrt => [Double], Double;
5147 _affix_and_export SDL_sqrtf => [Float], Float;
5148 _affix_and_export SDL_tan => [Double], Double;
5149 _affix_and_export SDL_tanf => [Float], Float;
5150 _typedef_and_export SDL_iconv_t => Pointer [Void];
5151 _affix_and_export SDL_iconv_open => [ String, String ], SDL_iconv_t();
5152 _affix_and_export SDL_iconv_close => [ SDL_iconv_t() ], Int;
5153 _affix_and_export
5154 SDL_iconv => [ SDL_iconv_t(), Pointer [ Pointer [UInt8] ], Pointer [Size_t], Pointer [ Pointer [UInt8] ], Pointer [Size_t] ],
5155 Size_t;
5156 _const_and_export SDL_ICONV_ERROR => -1;
5157 _const_and_export SDL_ICONV_E2BIG => -2;
5158 _const_and_export SDL_ICONV_EILSEQ => -3;
5159 _const_and_export SDL_ICONV_EINVAL => -4;
5160 #
5161 _affix_and_export SDL_iconv_string => [ String, String, String, Size_t ], Pointer [UInt8];
5162 _func_and_export SDL_iconv_utf8_locale => sub ($S) { SDL_iconv_string( '', 'UTF-8', $S, SDL_strlen($S) + 1 ) };
5163 _func_and_export SDL_iconv_utf8_ucs2 => sub ($S) { SDL_iconv_string( 'UCS-2', 'UTF-8', $S, SDL_strlen($S) + 1 ) };
5164 _func_and_export SDL_iconv_utf8_ucs4 => sub ($S) { SDL_iconv_string( 'UCS-4', 'UTF-8', $S, SDL_strlen($S) + 1 ) };
5165 _func_and_export SDL_iconv_wchar_utf8 => sub ($S) { SDL_iconv_string( 'UTF-8', 'WCHAR_T', $S, ( SDL_wcslen($S) + 1 ) * length( pack 'P' ) ) };
5166 #
5167 my $max_size_t = ( 2**( $Config{ptrsize} * 8 ) ) - 1;
5168 _func_and_export SDL_size_mul_check_overflow => sub ( $a, $b, $ret ) {
5169 return 0 if ( $a != 0 && $b > $max_size_t / $a );
5170 $$ret = $a * $b;
5171 return 1;
5172 };
5173 _func_and_export SDL_size_add_check_overflow => sub ( $a, $b, $ret ) {
5174 return 0 if ( $b > $max_size_t - $a );
5175 $$ret = $a + $b;
5176 return 1;
5177 };
5178 #
5179 _typedef_and_export SDL_FunctionPointer => Callback [ [] => Void ];
5180 }
5181  
5182 =head3 C<:system> - Platform-specific Functionality
5183  
5184 Platform-specific SDL API functions. These are functions that deal with needs of specific operating systems, that
5185 didn't make sense to offer as platform-independent, generic APIs.
5186  
5187 Most apps can make do without these functions, but they can be useful for integrating with other parts of a specific
5188 system, adding platform-specific polish to an app, or solving problems that only affect one target.
5189  
5190 See L<SDL3: CategorySystem|https://wiki.libsdl.org/SDL3/CategorySystem>
5191  
5192 =cut
5193  
5194 sub _system() {
5195 state $done++ && return;
5196 #
5197 _error();
5198 _keyboard();
5199 _stdinc();
5200 _video();
5201  
5202 # if defined(SDL_PLATFORM_WINDOWS)
5203 if ( $^O eq 'MSWin32' ) {
5204 _typedef_and_export MSG => Void;
5205 _typedef_and_export SDL_WindowsMessageHook => Callback [ [ Pointer [Void], Pointer [ MSG() ] ] => Bool ];
5206 _affix_and_export SDL_SetWindowsMessageHook => [ SDL_WindowsMessageHook(), Pointer [Void] ], Void;
5207 }
5208  
5209 # if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
5210 if ( $^O eq 'MSWin32' ) {
5211 _affix_and_export SDL_GetDirect3D9AdapterIndex => [ SDL_DisplayID() ], Int;
5212 _affix_and_export SDL_GetDXGIOutputInfo => [ SDL_DisplayID(), Pointer [Int], Pointer [Int] ], Bool;
5213 }
5214  
5215 # Unconditional in header, though usually implies X11 support
5216 _typedef_and_export XEvent => Void;
5217 _typedef_and_export SDL_X11EventHook => Callback [ [ Pointer [Void], Pointer [ XEvent() ] ] => Bool ];
5218 _affix_and_export SDL_SetX11EventHook => [ SDL_X11EventHook(), Pointer [Void] ], Void;
5219  
5220 # ifdef SDL_PLATFORM_LINUX
5221 if ( $^O eq 'linux' ) {
5222 _affix_and_export SDL_SetLinuxThreadPriority => [ SInt64, Int ], Bool;
5223 _affix_and_export SDL_SetLinuxThreadPriorityAndPolicy => [ SInt64, Int, Int ], Bool;
5224 }
5225  
5226 # ifdef SDL_PLATFORM_IOS
5227 if ( $^O eq 'darwin' && 0 ) { # Perl on iOS? Yeah, right...
5228 _typedef_and_export SDL_iOSAnimationCallback => Callback [ [ Pointer [Void] ] => Void ];
5229 _affix_and_export
5230 SDL_SetiOSAnimationCallback => [ Pointer [ SDL_Window() ], Int, SDL_iOSAnimationCallback(), Pointer [Void] ],
5231 Bool;
5232 _affix_and_export SDL_SetiOSEventPump => [Bool], Void;
5233 }
5234  
5235 # ifdef SDL_PLATFORM_ANDROID
5236 if ( $^O eq 'android' ) {
5237 _affix_and_export SDL_GetAndroidJNIEnv => [], Pointer [Void];
5238 _affix_and_export SDL_GetAndroidActivity => [], Pointer [Void];
5239 _affix_and_export SDL_GetAndroidSDKVersion => [], Int;
5240 _affix_and_export SDL_IsChromebook => [], Bool;
5241 _affix_and_export SDL_IsDeXMode => [], Bool;
5242 _affix_and_export SDL_SendAndroidBackButton => [], Void;
5243 _const_and_export SDL_ANDROID_EXTERNAL_STORAGE_READ => 0x01;
5244 _const_and_export SDL_ANDROID_EXTERNAL_STORAGE_WRITE => 0x02;
5245 _affix_and_export SDL_GetAndroidInternalStoragePath => [], String;
5246 _affix_and_export SDL_GetAndroidExternalStorageState => [], UInt32;
5247 _affix_and_export SDL_GetAndroidExternalStoragePath => [], String;
5248 _affix_and_export SDL_GetAndroidCachePath => [], String;
5249 _typedef_and_export SDL_RequestAndroidPermissionCallback => Callback [ [ Pointer [Void], String, Bool ] => Void ];
5250 _affix_and_export
5251 SDL_RequestAndroidPermission => [ String, SDL_RequestAndroidPermissionCallback(), Pointer [Void] ],
5252 Bool;
5253 _affix_and_export SDL_ShowAndroidToast => [ String, Int, Int, Int, Int ], Bool;
5254 _affix_and_export SDL_SendAndroidMessage => [ UInt32, Int ], Bool;
5255 }
5256  
5257 # General
5258 _affix_and_export SDL_IsTablet => [], Bool;
5259 _affix_and_export SDL_IsTV => [], Bool;
5260 _enum_and_export SDL_Sandbox =>
5261 [ 'SDL_SANDBOX_NONE', 'SDL_SANDBOX_UNKNOWN_CONTAINER', 'SDL_SANDBOX_FLATPAK', 'SDL_SANDBOX_SNAP', 'SDL_SANDBOX_MACOS' ];
5262 _affix_and_export SDL_GetSandbox => [], SDL_Sandbox();
5263 _affix_and_export SDL_OnApplicationWillTerminate => [], Void;
5264 _affix_and_export SDL_OnApplicationDidReceiveMemoryWarning => [], Void;
5265 _affix_and_export SDL_OnApplicationWillEnterBackground => [], Void;
5266 _affix_and_export SDL_OnApplicationDidEnterBackground => [], Void;
5267 _affix_and_export SDL_OnApplicationWillEnterForeground => [], Void;
5268 _affix_and_export SDL_OnApplicationDidEnterForeground => [], Void;
5269  
5270 # ifdef SDL_PLATFORM_IOS
5271 if ( $^O eq 'darwin' && 0 ) {
5272 _affix_and_export SDL_OnApplicationDidChangeStatusBarOrientation => [], Void;
5273 }
5274  
5275 # ifdef SDL_PLATFORM_GDK
5276 # Note: No standard Perl $^O for GDK, usually handled via custom build flags
5277 if (0) {
5278 _typedef_and_export XTaskQueueHandle => Pointer [Void];
5279 _typedef_and_export XUserHandle => Pointer [Void];
5280 _affix_and_export SDL_GetGDKTaskQueue => [ Pointer [ XTaskQueueHandle() ] ], Bool;
5281 _affix_and_export SDL_GetGDKDefaultUser => [ Pointer [ XUserHandle() ] ], Bool;
5282 }
5283 }
5284  
5285 =head3 C<:thread> - Thread Management
5286  
5287 SDL offers cross-platform thread management functions. These are mostly concerned with starting threads, setting their
5288 priority, and dealing with their termination.
5289  
5290 See L<SDL3: CategoryThread|https://wiki.libsdl.org/SDL3/CategoryThread>
5291  
5292 =cut
5293  
5294 sub _thread () {
5295 state $done++ && return;
5296 #
5297 _error();
5298 _properties();
5299 _stdinc();
5300 _atomic();
5301 #
5302 _typedef_and_export SDL_TLSID => SDL_AtomicInt();
5303 _enum_and_export SDL_ThreadPriority =>
5304 [ 'SDL_THREAD_PRIORITY_LOW', 'SDL_THREAD_PRIORITY_NORMAL', 'SDL_THREAD_PRIORITY_HIGH', 'SDL_THREAD_PRIORITY_TIME_CRITICAL' ];
5305 _enum_and_export SDL_ThreadState => [ 'SDL_THREAD_UNKNOWN', 'SDL_THREAD_ALIVE', 'SDL_THREAD_DETACHED', 'SDL_THREAD_COMPLETE' ];
5306 _typedef_and_export SDL_ThreadFunction => Callback [ [ Pointer [Void] ] => Int ];
5307 _typedef_and_export SDL_Thread => Void;
5308 _typedef_and_export SDL_ThreadID => UInt64;
5309 _affix_and_export
5310 SDL_CreateThreadRuntime => [ SDL_ThreadFunction(), String, Pointer [Void], Pointer [Void], Pointer [Void] ],
5311 Pointer [ SDL_Thread() ];
5312 _func_and_export SDL_CreateThread => sub ( $fn, $name, $data ) {
5313 SDL_CreateThreadRuntime( $fn, $name, $data, SDL_BeginThreadFunction(), SDL_EndThreadFunction() );
5314  
5315 # Since SDL_CreateThread is defined as a preprocessor macro wrapping
5316 # SDL_CreateThreadRuntime in the C header, I have bound
5317 # SDL_CreateThreadRuntime but aliased it to SDL_CreateThread. Callers will need
5318 # to pass undef (NULL) for the two function pointer arguments (pfnBeginThread,
5319 # pfnEndThread) which are used internally by the CRT.
5320 };
5321 _affix_and_export
5322 SDL_CreateThreadWithPropertiesRuntime => [ SDL_PropertiesID(), Pointer [Void], Pointer [Void] ],
5323 Pointer [ SDL_Thread() ];
5324 _func_and_export SDL_CreateThreadWithProperties => sub ($props) {
5325 SDL_CreateThreadWithPropertiesRuntime( $props, SDL_BeginThreadFunction(), SDL_EndThreadFunction() );
5326 };
5327 _const_and_export SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER => 'SDL.thread.create.entry_function';
5328 _const_and_export SDL_PROP_THREAD_CREATE_NAME_STRING => 'SDL.thread.create.name';
5329 _const_and_export SDL_PROP_THREAD_CREATE_USERDATA_POINTER => 'SDL.thread.create.userdata';
5330 _const_and_export SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER => 'SDL.thread.create.stacksize';
5331 _affix_and_export SDL_GetThreadName => [ Pointer [ SDL_Thread() ] ], String;
5332 _affix_and_export SDL_GetCurrentThreadID => [], SDL_ThreadID();
5333 _affix_and_export SDL_GetThreadID => [ Pointer [ SDL_Thread() ] ], SDL_ThreadID();
5334 _affix_and_export SDL_SetCurrentThreadPriority => [ SDL_ThreadPriority() ], Bool;
5335 _affix_and_export SDL_WaitThread => [ Pointer [ SDL_Thread() ], Pointer [Int] ], Void;
5336 _affix_and_export SDL_GetThreadState => [ Pointer [ SDL_Thread() ] ], SDL_ThreadState();
5337 _affix_and_export SDL_DetachThread => [ Pointer [ SDL_Thread() ] ], Void;
5338 _affix_and_export SDL_GetTLS => [ Pointer [ SDL_TLSID() ] ], Pointer [Void];
5339 _typedef_and_export SDL_TLSDestructorCallback => Callback [ [ Pointer [Void] ] => Void ];
5340 _affix_and_export SDL_SetTLS => [ Pointer [ SDL_TLSID() ], Pointer [Void], SDL_TLSDestructorCallback() ], Bool;
5341 _affix_and_export SDL_CleanupTLS => [], Void;
5342 }
5343  
5344 =head3 C<:time> - Date and Time
5345  
5346 SDL realtime clock and date/time routines.
5347  
5348 There are two data types that are used in this category: L<SDL_Time|https://wiki.libsdl.org/SDL3/SDL_Time>, which
5349 represents the nanoseconds since a specific moment (an "epoch"), and
5350 L<SDL_DateTime|https://wiki.libsdl.org/SDL3/SDL_DateTime>, which breaks time down into human-understandable components:
5351 years, months, days, hours, etc.
5352  
5353 Much of the functionality is involved in converting those two types to other useful forms.
5354  
5355 See L<SDL3: CategoryTime|https://wiki.libsdl.org/SDL3/CategoryTime>
5356  
5357 =cut
5358  
5359 sub _time () {
5360 state $done++ && return;
5361 #
5362 _error();
5363 _stdinc();
5364 #
5365 _typedef_and_export SDL_DateTime => Struct [
5366 year => Int,
5367 month => Int,
5368 day => Int,
5369 hour => Int,
5370 minute => Int,
5371 second => Int,
5372 nanosecond => Int,
5373 day_of_week => Int,
5374 utc_offset => Int
5375 ];
5376 _enum_and_export SDL_DateFormat => [ 'SDL_DATE_FORMAT_YYYYMMDD', 'SDL_DATE_FORMAT_DDMMYYYY', 'SDL_DATE_FORMAT_MMDDYYYY' ];
5377 _enum_and_export SDL_TimeFormat => [ 'SDL_TIME_FORMAT_24HR', 'SDL_TIME_FORMAT_12HR' ];
5378 _typedef_and_export SDL_Time => SInt64;
5379 _affix_and_export
5380 SDL_GetDateTimeLocalePreferences => [ Pointer [ SDL_DateFormat() ], Pointer [ SDL_TimeFormat() ] ],
5381 Bool;
5382 _affix_and_export SDL_GetCurrentTime => [ Pointer [ SDL_Time() ] ], Bool;
5383 _affix_and_export SDL_TimeToDateTime => [ SDL_Time(), Pointer [ SDL_DateTime() ], Bool ], Bool;
5384 _affix_and_export SDL_DateTimeToTime => [ Pointer [ SDL_DateTime() ], Pointer [ SDL_Time() ] ], Bool;
5385 _affix_and_export SDL_TimeToWindows => [ SDL_Time(), Pointer [UInt32], Pointer [UInt32] ], Void;
5386 _affix_and_export SDL_TimeFromWindows => [ UInt32, UInt32 ], SDL_Time();
5387 _affix_and_export SDL_GetDaysInMonth => [ Int, Int ], Int;
5388 _affix_and_export SDL_GetDayOfYear => [ Int, Int, Int ], Int;
5389 _affix_and_export SDL_GetDayOfWeek => [ Int, Int, Int ], Int;
5390 }
5391  
5392 =head3 C<:timer> - Timer Support
5393  
5394 SDL provides time management functionality. It is useful for dealing with (usually) small durations of time.
5395  
5396 See L<SDL3: CategoryTimer|https://wiki.libsdl.org/SDL3/CategoryTimer>
5397  
5398 =cut
5399  
5400 sub _timer() {
5401 state $done++ && return;
5402 #
5403 _error();
5404 _stdinc();
5405 #
5406 _const_and_export SDL_MS_PER_SECOND => 1000;
5407 _const_and_export SDL_US_PER_SECOND => 1000000;
5408 _const_and_export SDL_NS_PER_SECOND => 1000000000;
5409 _const_and_export SDL_NS_PER_MS => 1000000;
5410 _const_and_export SDL_NS_PER_US => 1000;
5411 _func_and_export( SDL_SECONDS_TO_NS => sub ($S) { ( ( ($S) ) * SDL_NS_PER_SECOND() ) } );
5412 _func_and_export( SDL_NS_TO_SECONDS => sub ($NS) { ( ($NS) / SDL_NS_PER_SECOND() ) } );
5413 _func_and_export( SDL_MS_TO_NS => sub ($MS) { ( ( ($MS) ) * SDL_NS_PER_MS() ) } );
5414 _func_and_export( SDL_NS_TO_MS => sub ($NS) { ( ($NS) / SDL_NS_PER_MS() ) } );
5415 _func_and_export( SDL_US_TO_NS => sub ($US) { ( ( ($US) ) * SDL_NS_PER_US() ) } );
5416 _func_and_export( SDL_NS_TO_US => sub ($NS) { ( ($NS) / SDL_NS_PER_US() ) } );
5417 _affix_and_export 'SDL_GetTicks', [], UInt64;
5418 _affix_and_export 'SDL_GetTicksNS', [], UInt64;
5419 _affix_and_export 'SDL_GetPerformanceCounter', [], UInt64;
5420 _affix_and_export 'SDL_GetPerformanceFrequency', [], UInt64;
5421 _affix_and_export 'SDL_Delay', [UInt32], Void;
5422 _affix_and_export 'SDL_DelayNS', [UInt64], Void;
5423 _affix_and_export 'SDL_DelayPrecise', [UInt64], Void;
5424 _typedef_and_export SDL_TimerID => UInt32;
5425 _typedef_and_export SDL_TimerCallback => Callback [ [ Pointer [Void], SDL_TimerID(), UInt32 ] => UInt32 ];
5426 _affix_and_export SDL_AddTimer => [ UInt32, SDL_TimerCallback(), Pointer [Void] ], SDL_TimerID();
5427 _typedef_and_export SDL_NSTimerCallback => Callback [ [ Pointer [Void], SDL_TimerID(), UInt64 ] => UInt64 ];
5428 _affix_and_export SDL_AddTimerNS => [ UInt64, SDL_NSTimerCallback(), Pointer [Void] ], SDL_TimerID();
5429 _affix_and_export SDL_RemoveTimer => [ SDL_TimerID() ], Bool;
5430 }
5431  
5432 =head3 C<:touch> - Touch Support
5433  
5434 SDL offers touch input, on platforms that support it. It can manage multiple touch devices and track multiple fingers
5435 on those devices.
5436  
5437 See L<SDL3: CategoryTouch|https://wiki.libsdl.org/SDL3/CategoryTouch>
5438  
5439 =cut
5440  
5441 sub _touch() {
5442 state $done++ && return;
5443 _error();
5444 _mouse();
5445 _stdinc();
5446 #
5447 _typedef_and_export SDL_TouchID => UInt64;
5448 _typedef_and_export SDL_FingerID => UInt64;
5449 _enum_and_export SDL_TouchDeviceType => [
5450 [ SDL_TOUCH_DEVICE_INVALID => -1 ], 'SDL_TOUCH_DEVICE_DIRECT',
5451 'SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE', 'SDL_TOUCH_DEVICE_INDIRECT_RELATIVE'
5452 ];
5453 _typedef_and_export SDL_Finger => Struct [ id => SDL_FingerID(), x => Float, y => Float, pressure => Float ];
5454 _const_and_export SDL_TOUCH_MOUSEID => -1;
5455 _const_and_export SDL_MOUSE_TOUCHID => -1;
5456 _affix_and_export SDL_GetTouchDevices => [ Pointer [ SDL_TouchID() ] ], Pointer [Int];
5457 _affix_and_export SDL_GetTouchDeviceName => [ SDL_TouchID() ], String;
5458 _affix_and_export SDL_GetTouchDeviceType => [ SDL_TouchID() ], SDL_TouchDeviceType();
5459 _affix_and_export SDL_GetTouchFingers => [ SDL_TouchID(), Pointer [Int] ], Pointer [ Pointer [ SDL_Finger() ] ];
5460 }
5461  
5462 =head3 C<:tray> - System Tray
5463  
5464 SDL offers a way to add items to the "system tray" (more correctly called the "notification area" on Windows). On
5465 platforms that offer this concept, an SDL app can add a tray icon, submenus, checkboxes, and clickable entries, and
5466 register a callback that is fired when the user clicks on these pieces.
5467  
5468 See L<SDL3: CategoryTray|https://wiki.libsdl.org/SDL3/CategoryTray>
5469  
5470 =cut
5471  
5472 sub _tray () {
5473 state $done++ && return;
5474 #
5475 _error();
5476 _stdinc();
5477 _surface();
5478 _video();
5479 #
5480 _typedef_and_export SDL_Tray => Void;
5481 _typedef_and_export SDL_TrayMenu => Void;
5482 _typedef_and_export SDL_TrayEntry => Void;
5483 _typedef_and_export SDL_TrayEntryFlags => UInt32;
5484 _const_and_export SDL_TRAYENTRY_BUTTON => 0x00000001;
5485 _const_and_export SDL_TRAYENTRY_CHECKBOX => 0x00000002;
5486 _const_and_export SDL_TRAYENTRY_SUBMENU => 0x00000004;
5487 _const_and_export SDL_TRAYENTRY_DISABLED => 0x80000000;
5488 _const_and_export SDL_TRAYENTRY_CHECKED => 0x40000000;
5489 _typedef_and_export SDL_TrayCallback => Callback [ [ Pointer [Void], Pointer [ SDL_TrayEntry() ] ] => Void ];
5490 _affix_and_export SDL_CreateTray => [ Pointer [ SDL_Surface() ], String ], Pointer [ SDL_Tray() ];
5491 _affix_and_export SDL_SetTrayIcon => [ Pointer [ SDL_Tray() ], Pointer [ SDL_Surface() ] ], Void;
5492 _affix_and_export SDL_SetTrayTooltip => [ Pointer [ SDL_Tray() ], String ], Void;
5493 _affix_and_export SDL_CreateTrayMenu => [ Pointer [ SDL_Tray() ] ], Pointer [ SDL_TrayMenu() ];
5494 _affix_and_export SDL_CreateTraySubmenu => [ Pointer [ SDL_TrayEntry() ] ], Pointer [ SDL_TrayMenu() ];
5495 _affix_and_export SDL_GetTrayMenu => [ Pointer [ SDL_Tray() ] ], Pointer [ SDL_TrayMenu() ];
5496 _affix_and_export SDL_GetTraySubmenu => [ Pointer [ SDL_TrayEntry() ] ], Pointer [ SDL_TrayMenu() ];
5497 _affix_and_export
5498 SDL_GetTrayEntries => [ Pointer [ SDL_TrayMenu() ], Pointer [Int] ],
5499 Pointer [ Pointer [ SDL_TrayEntry() ] ];
5500 _affix_and_export SDL_RemoveTrayEntry => [ Pointer [ SDL_TrayEntry() ] ], Void;
5501 _affix_and_export
5502 SDL_InsertTrayEntryAt => [ Pointer [ SDL_TrayMenu() ], Int, String, SDL_TrayEntryFlags() ],
5503 Pointer [ SDL_TrayEntry() ];
5504 _affix_and_export SDL_SetTrayEntryLabel => [ Pointer [ SDL_TrayEntry() ], String ], Void;
5505 _affix_and_export SDL_GetTrayEntryLabel => [ Pointer [ SDL_TrayEntry() ] ], String;
5506 _affix_and_export SDL_SetTrayEntryChecked => [ Pointer [ SDL_TrayEntry() ], Bool ], Void;
5507 _affix_and_export SDL_GetTrayEntryChecked => [ Pointer [ SDL_TrayEntry() ] ], Bool;
5508 _affix_and_export SDL_SetTrayEntryEnabled => [ Pointer [ SDL_TrayEntry() ], Bool ], Void;
5509 _affix_and_export SDL_GetTrayEntryEnabled => [ Pointer [ SDL_TrayEntry() ] ], Bool;
5510 _affix_and_export
5511 SDL_SetTrayEntryCallback => [ Pointer [ SDL_TrayEntry() ], SDL_TrayCallback(), Pointer [Void] ],
5512 Void;
5513 _affix_and_export SDL_ClickTrayEntry => [ Pointer [ SDL_TrayEntry() ] ], Void;
5514 _affix_and_export SDL_DestroyTray => [ Pointer [ SDL_Tray() ] ], Void;
5515 _affix_and_export SDL_GetTrayEntryParent => [ Pointer [ SDL_TrayEntry() ] ], Pointer [ SDL_TrayMenu() ];
5516 _affix_and_export SDL_GetTrayMenuParentEntry => [ Pointer [ SDL_TrayMenu() ] ], Pointer [ SDL_TrayEntry() ];
5517 _affix_and_export SDL_GetTrayMenuParentTray => [ Pointer [ SDL_TrayMenu() ] ], Pointer [ SDL_Tray() ];
5518 _affix_and_export SDL_UpdateTrays => [], Void;
5519 }
5520  
5521 =head3 C<:version> - Querying SDL Version
5522  
5523 Functionality to query the current SDL version, both as headers the app was compiled against, and a library the app is
5524 linked to.
5525  
5526 See L<SDL3: CategoryVersion|https://wiki.libsdl.org/SDL3/CategoryVersion>
5527  
5528 =cut
5529  
5530 sub _version() {
5531 state $done++ && return;
5532 #
5533 _stdinc();
5534 #
5535 _affix_and_export 'SDL_GetVersion', [], Int;
5536 _affix_and_export 'SDL_GetRevision', [], Int;
5537 _func_and_export SDL_MAJOR_VERSION => sub () { state $i //= SDL_VERSIONNUM_MAJOR( SDL_GetVersion() ); $i };
5538 _func_and_export SDL_MINOR_VERSION => sub () { state $i //= SDL_VERSIONNUM_MINOR( SDL_GetVersion() ); $i };
5539 _func_and_export SDL_MICRO_VERSION => sub () { state $i //= SDL_VERSIONNUM_MICRO( SDL_GetVersion() ); $i };
5540 _func_and_export SDL_VERSIONNUM => sub ( $major, $minor, $patch ) { ( ($major) * 1000000 + ($minor) * 1000 + ($patch) ) };
5541 _func_and_export SDL_VERSIONNUM_MAJOR => sub ($version) { int( ($version) / 1000000 ) };
5542 _func_and_export SDL_VERSIONNUM_MINOR => sub ($version) { int( ( ($version) / 1000 ) % 1000 ) };
5543 _func_and_export SDL_VERSIONNUM_MICRO => sub ($version) { int( ($version) % 1000 ) };
5544 _const_and_export SDL_VERSION => SDL_VERSIONNUM( SDL_MAJOR_VERSION(), SDL_MINOR_VERSION(), SDL_MICRO_VERSION() );
5545 _func_and_export SDL_VERSION_ATLEAST => sub ( $X, $Y, $Z ) { ( SDL_VERSION() >= SDL_VERSIONNUM( $X, $Y, $Z ) ); };
5546 }
5547  
5548 =head3 C<:video> - Display and Window Management
5549  
5550 SDL's video subsystem is largely interested in abstracting window management from the underlying operating system. You
5551 can create windows, manage them in various ways, set them fullscreen, and get events when interesting things happen
5552 with them, such as the mouse or keyboard interacting with a window.
5553  
5554 See L<SDL3: CategoryVideo|https://wiki.libsdl.org/SDL3/CategoryVideo>
5555  
5556 =cut
5557  
5558 sub _video() {
5559 state $done++ && return;
5560 _error();
5561 _pixels();
5562 _properties();
5563 _rect();
5564 _stdinc();
5565 _surface();
5566 #
5567 _typedef_and_export SDL_DisplayID => UInt32;
5568 _typedef_and_export SDL_WindowID => UInt32;
5569 _const_and_export SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER => 'SDL.video.wayland.wl_display';
5570 _enum_and_export SDL_SystemTheme => [qw[SDL_SYSTEM_THEME_UNKNOWN SDL_SYSTEM_THEME_LIGHT SDL_SYSTEM_THEME_DARK]];
5571 _typedef_and_export 'SDL_DisplayModeData' => Pointer [Void];
5572 _typedef_and_export SDL_DisplayMode => Struct [
5573 displayID => SDL_DisplayID(),
5574 format => SDL_PixelFormat(),
5575 w => Int,
5576 h => Int,
5577 pixel_density => Float,
5578 refresh_rate => Float,
5579 refresh_rate_numerator => Int,
5580 refresh_rate_denominator => Int,
5581 internal => Pointer [ SDL_DisplayModeData() ]
5582 ];
5583 _enum_and_export SDL_DisplayOrientation => [
5584 'SDL_ORIENTATION_UNKNOWN', 'SDL_ORIENTATION_LANDSCAPE', 'SDL_ORIENTATION_LANDSCAPE_FLIPPED', 'SDL_ORIENTATION_PORTRAIT',
5585 'SDL_ORIENTATION_PORTRAIT_FLIPPED'
5586 ];
5587 _typedef_and_export SDL_Window => Void; # opaque
5588  
5589 #
5590 _typedef_and_export SDL_WindowFlags => UInt64;
5591 _const_and_export SDL_WINDOW_FULLSCREEN => 0x0000000000000001;
5592 _const_and_export SDL_WINDOW_OPENGL => 0x0000000000000002;
5593 _const_and_export SDL_WINDOW_OCCLUDED => 0x0000000000000004;
5594 _const_and_export SDL_WINDOW_HIDDEN => 0x0000000000000008;
5595 _const_and_export SDL_WINDOW_BORDERLESS => 0x0000000000000010;
5596 _const_and_export SDL_WINDOW_RESIZABLE => 0x0000000000000020;
5597 _const_and_export SDL_WINDOW_MINIMIZED => 0x0000000000000040;
5598 _const_and_export SDL_WINDOW_MAXIMIZED => 0x0000000000000080;
5599 _const_and_export SDL_WINDOW_MOUSE_GRABBED => 0x0000000000000100;
5600 _const_and_export SDL_WINDOW_INPUT_FOCUS => 0x0000000000000200;
5601 _const_and_export SDL_WINDOW_MOUSE_FOCUS => 0x0000000000000400;
5602 _const_and_export SDL_WINDOW_EXTERNAL => 0x0000000000000800;
5603 _const_and_export SDL_WINDOW_MODAL => 0x0000000000001000;
5604 _const_and_export SDL_WINDOW_HIGH_PIXEL_DENSITY => 0x0000000000002000;
5605 _const_and_export SDL_WINDOW_MOUSE_CAPTURE => 0x0000000000004000;
5606 _const_and_export SDL_WINDOW_MOUSE_RELATIVE_MODE => 0x0000000000008000;
5607 _const_and_export SDL_WINDOW_ALWAYS_ON_TOP => 0x0000000000010000;
5608 _const_and_export SDL_WINDOW_UTILITY => 0x0000000000020000;
5609 _const_and_export SDL_WINDOW_TOOLTIP => 0x0000000000040000;
5610 _const_and_export SDL_WINDOW_POPUP_MENU => 0x0000000000080000;
5611 _const_and_export SDL_WINDOW_KEYBOARD_GRABBED => 0x0000000000100000;
5612 _const_and_export SDL_WINDOW_VULKAN => 0x0000000010000000;
5613 _const_and_export SDL_WINDOW_METAL => 0x0000000020000000;
5614 _const_and_export SDL_WINDOW_TRANSPARENT => 0x0000000040000000;
5615 _const_and_export SDL_WINDOW_NOT_FOCUSABLE => 0x0000000080000000;
5616 #
5617 _const_and_export SDL_WINDOWPOS_UNDEFINED_MASK => 0x1FFF0000;
5618 _func_and_export( SDL_WINDOWPOS_UNDEFINED_DISPLAY => sub ($X) { ( SDL_WINDOWPOS_UNDEFINED_MASK() | ($X) ) } );
5619 _const_and_export SDL_WINDOWPOS_UNDEFINED => SDL_WINDOWPOS_UNDEFINED_DISPLAY(0);
5620 _func_and_export( SDL_WINDOWPOS_ISUNDEFINED => sub ($X) { ( ( ($X) & 0xFFFF0000 ) == SDL_WINDOWPOS_UNDEFINED_MASK() ) } );
5621 _const_and_export SDL_WINDOWPOS_CENTERED_MASK => 0x2FFF0000;
5622 _func_and_export( SDL_WINDOWPOS_CENTERED_DISPLAY => sub ($X) { ( SDL_WINDOWPOS_CENTERED_MASK() | ($X) ) } );
5623 _const_and_export SDL_WINDOWPOS_CENTERED => SDL_WINDOWPOS_CENTERED_DISPLAY(0);
5624 _func_and_export( SDL_WINDOWPOS_ISCENTERED => sub ($X) { ( ( ($X) & 0xFFFF0000 ) == SDL_WINDOWPOS_CENTERED_MASK() ) } );
5625 #
5626 _enum_and_export SDL_FlashOperation => [qw[SDL_FLASH_CANCEL SDL_FLASH_BRIEFLY SDL_FLASH_UNTIL_FOCUSED]];
5627 #
5628 _enum_and_export SDL_ProgressState => [
5629 [ SDL_PROGRESS_STATE_INVALID => -1 ], qw[SDL_PROGRESS_STATE_NONE SDL_PROGRESS_STATE_INDETERMINATE SDL_PROGRESS_STATE_NORMAL
5630 SDL_PROGRESS_STATE_PAUSED SDL_PROGRESS_STATE_ERROR]
5631 ];
5632  
5633 # Defined in src\video\openvr\SDL_openvrvideo.c as
5634 # struct SDL_GLContextState {
5635 # HGLRC hglrc;
5636 # };
5637 _typedef_and_export SDL_GLContextState => Struct [ hglrc => Pointer [Void] ];
5638 _typedef_and_export SDL_GLContext => Pointer [ SDL_GLContextState() ];
5639 _typedef_and_export SDL_EGLDisplay => Pointer [Void];
5640 _typedef_and_export SDL_EGLConfig => Pointer [Void];
5641 _typedef_and_export SDL_EGLSurface => Pointer [Void];
5642 _typedef_and_export SDL_EGLAttrib => Pointer [Void];
5643 _typedef_and_export SDL_EGLint => Int;
5644 _typedef_and_export SDL_EGLAttribArrayCallback => Callback [ [ Pointer [Void] ] => SDL_EGLAttrib() ];
5645 _typedef_and_export SDL_EGLIntArrayCallback => Callback [ [ Pointer [Void], SDL_EGLDisplay(), SDL_EGLConfig() ] => SDL_EGLint() ];
5646 _enum_and_export SDL_GLAttr => [
5647 qw[
5648 SDL_GL_RED_SIZE
5649 SDL_GL_GREEN_SIZE
5650 SDL_GL_BLUE_SIZE
5651 SDL_GL_ALPHA_SIZE
5652 SDL_GL_BUFFER_SIZE
5653 SDL_GL_DOUBLEBUFFER
5654 SDL_GL_DEPTH_SIZE
5655 SDL_GL_STENCIL_SIZE
5656 SDL_GL_ACCUM_RED_SIZE
5657 SDL_GL_ACCUM_GREEN_SIZE
5658 SDL_GL_ACCUM_BLUE_SIZE
5659 SDL_GL_ACCUM_ALPHA_SIZE
5660 SDL_GL_STEREO
5661 SDL_GL_MULTISAMPLEBUFFERS
5662 SDL_GL_MULTISAMPLESAMPLES
5663 SDL_GL_ACCELERATED_VISUAL
5664 SDL_GL_RETAINED_BACKING
5665 SDL_GL_CONTEXT_MAJOR_VERSION
5666 SDL_GL_CONTEXT_MINOR_VERSION
5667 SDL_GL_CONTEXT_FLAGS
5668 SDL_GL_CONTEXT_PROFILE_MASK
5669 SDL_GL_SHARE_WITH_CURRENT_CONTEXT
5670 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
5671 SDL_GL_CONTEXT_RELEASE_BEHAVIOR
5672 SDL_GL_CONTEXT_RESET_NOTIFICATION
5673 SDL_GL_CONTEXT_NO_ERROR
5674 SDL_GL_FLOATBUFFERS
5675 SDL_GL_EGL_PLATFORM
5676 ]
5677 ];
5678 #
5679 _typedef_and_export SDL_GLProfile => UInt32;
5680 _const_and_export SDL_GL_CONTEXT_PROFILE_CORE => 0x0001;
5681 _const_and_export SDL_GL_CONTEXT_PROFILE_COMPATIBILITY => 0x0002;
5682 _const_and_export SDL_GL_CONTEXT_PROFILE_ES => 0x0004;
5683 #
5684 _typedef_and_export SDL_GLContextFlag => UInt32;
5685 _const_and_export SDL_GL_CONTEXT_DEBUG_FLAG => 0x0001;
5686 _const_and_export SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG => 0x0002;
5687 _const_and_export SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG => 0x0004;
5688 _const_and_export SDL_GL_CONTEXT_RESET_ISOLATION_FLAG => 0x0008;
5689 #
5690 _typedef_and_export SDL_GLContextReleaseFlag => UInt32;
5691 _const_and_export SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE => 0x0000;
5692 _const_and_export SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH => 0x0001;
5693 #
5694 _typedef_and_export SDL_GLContextResetNotification => UInt32;
5695 _const_and_export SDL_GL_CONTEXT_RESET_NO_NOTIFICATION => 0x0000;
5696 _const_and_export SDL_GL_CONTEXT_RESET_LOSE_CONTEXT => 0x0001;
5697 #
5698 _affix_and_export SDL_GetNumVideoDrivers => [], Int;
5699 _affix_and_export SDL_GetVideoDriver => [Int], String;
5700 _affix_and_export SDL_GetCurrentVideoDriver => [], String;
5701 _affix_and_export SDL_GetSystemTheme => [], SDL_SystemTheme();
5702 _affix_and_export SDL_GetDisplays => [ Pointer [Int] ], Pointer [ SDL_DisplayID() ];
5703 _affix_and_export SDL_GetPrimaryDisplay => [], SDL_DisplayID();
5704 #
5705 _affix_and_export SDL_GetDisplayProperties => [ SDL_DisplayID() ], SDL_PropertiesID();
5706 _const_and_export SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN => 'SDL.display.HDR_enabled';
5707 _const_and_export SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER => 'SDL.display.KMSDRM.panel_orientation';
5708 _const_and_export SDL_PROP_DISPLAY_WAYLAND_WL_OUTPUT_POINTER => 'SDL.display.wayland.wl_output';
5709 _const_and_export SDL_PROP_DISPLAY_WINDOWS_HMONITOR_POINTER => 'SDL.display.windows.hmonitor';
5710 #
5711 _affix_and_export SDL_GetDisplayName => [ SDL_DisplayID() ], String;
5712 _affix_and_export SDL_GetDisplayBounds => [ SDL_DisplayID(), Pointer [ SDL_Rect() ] ], Bool;
5713 _affix_and_export SDL_GetDisplayUsableBounds => [ SDL_DisplayID(), Pointer [ SDL_Rect() ] ], Bool;
5714 _affix_and_export SDL_GetNaturalDisplayOrientation => [ SDL_DisplayID() ], SDL_DisplayOrientation();
5715 _affix_and_export SDL_GetCurrentDisplayOrientation => [ SDL_DisplayID() ], SDL_DisplayOrientation();
5716 _affix_and_export SDL_GetDisplayContentScale => [ SDL_DisplayID() ], Float;
5717 _affix_and_export SDL_GetFullscreenDisplayModes => [ SDL_DisplayID(), Pointer [Int] ], Pointer [ Pointer [ SDL_DisplayMode() ] ];
5718 _affix_and_export SDL_GetClosestFullscreenDisplayMode => [ SDL_DisplayID(), Int, Int, Float, Bool, SDL_DisplayMode() ], Bool;
5719 _affix_and_export SDL_GetDesktopDisplayMode => [ SDL_DisplayID() ], Pointer [ SDL_DisplayMode() ];
5720 _affix_and_export SDL_GetCurrentDisplayMode => [ SDL_DisplayID() ], Pointer [ SDL_DisplayMode() ];
5721 _affix_and_export SDL_GetDisplayForPoint => [ Pointer [ SDL_Point() ] ], SDL_DisplayID();
5722 _affix_and_export SDL_GetDisplayForRect => [ Pointer [ SDL_Point() ] ], SDL_DisplayID();
5723 _affix_and_export SDL_GetDisplayForWindow => [ Pointer [ SDL_Window() ] ], SDL_DisplayID();
5724 _affix_and_export SDL_GetWindowPixelDensity => [ Pointer [ SDL_Window() ] ], Float;
5725 _affix_and_export SDL_GetWindowDisplayScale => [ Pointer [ SDL_Window() ] ], Float;
5726 _affix_and_export SDL_SetWindowFullscreenMode => [ Pointer [ SDL_Window() ], Pointer [ SDL_DisplayMode() ] ], Bool;
5727 _affix_and_export SDL_GetWindowFullscreenMode => [ Pointer [ SDL_Window() ] ], Pointer [ SDL_DisplayMode() ];
5728 _affix_and_export SDL_GetWindowICCProfile => [ Pointer [ SDL_Window() ], Pointer [Size_t] ], Pointer [Void];
5729 _affix_and_export SDL_GetWindowPixelFormat => [ Pointer [ SDL_Window() ] ], SDL_PixelFormat();
5730 _affix_and_export SDL_GetWindows => [ Pointer [Int] ], Pointer [ Pointer [ SDL_Window() ] ];
5731 _affix_and_export SDL_CreateWindow => [ String, Int, Int, SDL_WindowFlags() ], Pointer [ SDL_Window() ];
5732 _affix_and_export SDL_CreatePopupWindow => [ Pointer [ SDL_Window() ], Int, Int, Int, Int, SDL_WindowFlags() ], Pointer [ SDL_Window() ];
5733 _affix_and_export SDL_CreateWindowWithProperties => [ SDL_PropertiesID() ], Pointer [ SDL_Window() ];
5734 #
5735 _affix_and_export SDL_GetWindowID => [ Pointer [ SDL_Window() ] ], SDL_WindowID();
5736 _affix_and_export SDL_GetWindowFromID => [ SDL_WindowID() ], Pointer [ SDL_Window() ];
5737 _affix_and_export SDL_GetWindowParent => [ Pointer [ SDL_Window() ] ], Pointer [ SDL_Window() ];
5738 _affix_and_export SDL_GetWindowProperties => [ Pointer [ SDL_Window() ] ], SDL_PropertiesID();
5739 #
5740 _const_and_export SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN => 'SDL.window.create.always_on_top';
5741 _const_and_export SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN => 'SDL.window.create.borderless';
5742 _const_and_export SDL_PROP_WINDOW_CREATE_CONSTRAIN_POPUP_BOOLEAN => 'SDL.window.create.constrain_popup';
5743 _const_and_export SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN => 'SDL.window.create.focusable';
5744 _const_and_export SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN => 'SDL.window.create.external_graphics_context';
5745 _const_and_export SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER => 'SDL.window.create.flags';
5746 _const_and_export SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN => 'SDL.window.create.fullscreen';
5747 _const_and_export SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER => 'SDL.window.create.height';
5748 _const_and_export SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN => 'SDL.window.create.hidden';
5749 _const_and_export SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN => 'SDL.window.create.high_pixel_density';
5750 _const_and_export SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN => 'SDL.window.create.maximized';
5751 _const_and_export SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN => 'SDL.window.create.menu';
5752 _const_and_export SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN => 'SDL.window.create.metal';
5753 _const_and_export SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN => 'SDL.window.create.minimized';
5754 _const_and_export SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN => 'SDL.window.create.modal';
5755 _const_and_export SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN => 'SDL.window.create.mouse_grabbed';
5756 _const_and_export SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN => 'SDL.window.create.opengl';
5757 _const_and_export SDL_PROP_WINDOW_CREATE_PARENT_POINTER => 'SDL.window.create.parent';
5758 _const_and_export SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN => 'SDL.window.create.resizable';
5759 _const_and_export SDL_PROP_WINDOW_CREATE_TITLE_STRING => 'SDL.window.create.title';
5760 _const_and_export SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN => 'SDL.window.create.transparent';
5761 _const_and_export SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN => 'SDL.window.create.tooltip';
5762 _const_and_export SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN => 'SDL.window.create.utility';
5763 _const_and_export SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN => 'SDL.window.create.vulkan';
5764 _const_and_export SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER => 'SDL.window.create.width';
5765 _const_and_export SDL_PROP_WINDOW_CREATE_X_NUMBER => 'SDL.window.create.x';
5766 _const_and_export SDL_PROP_WINDOW_CREATE_Y_NUMBER => 'SDL.window.create.y';
5767 _const_and_export SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER => 'SDL.window.create.cocoa.window';
5768 _const_and_export SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER => 'SDL.window.create.cocoa.view';
5769 _const_and_export SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER => 'SDL.window.create.uikit.windowscene';
5770 _const_and_export SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN => 'SDL.window.create.wayland.surface_role_custom';
5771 _const_and_export SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN => 'SDL.window.create.wayland.create_egl_window';
5772 _const_and_export SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER => 'SDL.window.create.wayland.wl_surface';
5773 _const_and_export SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER => 'SDL.window.create.win32.hwnd';
5774 _const_and_export SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER => 'SDL.window.create.win32.pixel_format_hwnd';
5775 _const_and_export SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER => 'SDL.window.create.x11.window';
5776 _const_and_export SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID_STRING => 'SDL.window.create.emscripten.canvas_id';
5777 _const_and_export SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN => 'SDL.window.create.emscripten.fill_document';
5778 _const_and_export SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING => 'SDL.window.create.emscripten.keyboard_element';
5779 #
5780 _const_and_export SDL_PROP_WINDOW_SHAPE_POINTER => 'SDL.window.shape';
5781 _const_and_export SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN => 'SDL.window.HDR_enabled';
5782 _const_and_export SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT => 'SDL.window.SDR_white_level';
5783 _const_and_export SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT => 'SDL.window.HDR_headroom';
5784 _const_and_export SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER => 'SDL.window.android.window';
5785 _const_and_export SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER => 'SDL.window.android.surface';
5786 _const_and_export SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER => 'SDL.window.uikit.window';
5787 _const_and_export SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER => 'SDL.window.uikit.metal_view_tag';
5788 _const_and_export SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER => 'SDL.window.uikit.opengl.framebuffer';
5789 _const_and_export SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER => 'SDL.window.uikit.opengl.renderbuffer';
5790 _const_and_export SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER => 'SDL.window.uikit.opengl.resolve_framebuffer';
5791 _const_and_export SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER => 'SDL.window.kmsdrm.dev_index';
5792 _const_and_export SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER => 'SDL.window.kmsdrm.drm_fd';
5793 _const_and_export SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER => 'SDL.window.kmsdrm.gbm_dev';
5794 _const_and_export SDL_PROP_WINDOW_COCOA_WINDOW_POINTER => 'SDL.window.cocoa.window';
5795 _const_and_export SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER => 'SDL.window.cocoa.metal_view_tag';
5796 _const_and_export SDL_PROP_WINDOW_OPENVR_OVERLAY_ID_NUMBER => 'SDL.window.openvr.overlay_id';
5797 _const_and_export SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER => 'SDL.window.vivante.display';
5798 _const_and_export SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER => 'SDL.window.vivante.window';
5799 _const_and_export SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER => 'SDL.window.vivante.surface';
5800 _const_and_export SDL_PROP_WINDOW_WIN32_HWND_POINTER => 'SDL.window.win32.hwnd';
5801 _const_and_export SDL_PROP_WINDOW_WIN32_HDC_POINTER => 'SDL.window.win32.hdc';
5802 _const_and_export SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER => 'SDL.window.win32.instance';
5803 _const_and_export SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER => 'SDL.window.wayland.display';
5804 _const_and_export SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER => 'SDL.window.wayland.surface';
5805 _const_and_export SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER => 'SDL.window.wayland.viewport';
5806 _const_and_export SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER => 'SDL.window.wayland.egl_window';
5807 _const_and_export SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER => 'SDL.window.wayland.xdg_surface';
5808 _const_and_export SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER => 'SDL.window.wayland.xdg_toplevel';
5809 _const_and_export SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING => 'SDL.window.wayland.xdg_toplevel_export_handle';
5810 _const_and_export SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER => 'SDL.window.wayland.xdg_popup';
5811 _const_and_export SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER => 'SDL.window.wayland.xdg_positioner';
5812 _const_and_export SDL_PROP_WINDOW_X11_DISPLAY_POINTER => 'SDL.window.x11.display';
5813 _const_and_export SDL_PROP_WINDOW_X11_SCREEN_NUMBER => 'SDL.window.x11.screen';
5814 _const_and_export SDL_PROP_WINDOW_X11_WINDOW_NUMBER => 'SDL.window.x11.window';
5815 _const_and_export SDL_PROP_WINDOW_EMSCRIPTEN_CANVAS_ID_STRING => 'SDL.window.emscripten.canvas_id';
5816 _const_and_export SDL_PROP_WINDOW_EMSCRIPTEN_FILL_DOCUMENT_BOOLEAN => 'SDL.window.emscripten.fill_document';
5817 _const_and_export SDL_PROP_WINDOW_EMSCRIPTEN_KEYBOARD_ELEMENT_STRING => 'SDL.window.emscripten.keyboard_element';
5818 #
5819 _affix_and_export SDL_GetWindowFlags => [ Pointer [ SDL_Window() ] ], SDL_WindowFlags();
5820 _affix_and_export SDL_SetWindowTitle => [ Pointer [ SDL_Window() ], String ], Bool;
5821 _affix_and_export SDL_GetWindowTitle => [ Pointer [ SDL_Window() ] ], String;
5822 _affix_and_export SDL_SetWindowIcon => [ Pointer [ SDL_Window() ], Pointer [ SDL_Surface() ] ], Bool;
5823 _affix_and_export SDL_SetWindowPosition => [ Pointer [ SDL_Window() ], Int, Int ], Bool;
5824 _affix_and_export SDL_GetWindowPosition => [ Pointer [ SDL_Window() ], Pointer [Int], Pointer [Int] ], Bool;
5825 _affix_and_export SDL_SetWindowSize => [ Pointer [ SDL_Window() ], Int, Int, ], Bool;
5826 _affix_and_export SDL_GetWindowSize => [ Pointer [ SDL_Window() ], Pointer [Int], Pointer [Int] ], Bool;
5827 _affix_and_export SDL_GetWindowSafeArea => [ Pointer [ SDL_Window() ], Pointer [ SDL_Rect() ] ], Bool;
5828 _affix_and_export SDL_SetWindowAspectRatio => [ Pointer [ SDL_Window() ], Float, Float ], Bool;
5829 _affix_and_export SDL_GetWindowAspectRatio => [ Pointer [ SDL_Window() ], Pointer [Float], Pointer [Float] ], Bool;
5830 _affix_and_export SDL_GetWindowBordersSize => [ Pointer [ SDL_Window() ], Pointer [Int], Pointer [Int], Pointer [Int], Pointer [Int] ], Bool;
5831 _affix_and_export SDL_GetWindowSizeInPixels => [ Pointer [ SDL_Window() ], Pointer [Int], Pointer [Int] ], Bool;
5832 _affix_and_export SDL_SetWindowMinimumSize => [ Pointer [ SDL_Window() ], Int, Int ], Bool;
5833 _affix_and_export SDL_GetWindowMinimumSize => [ Pointer [ SDL_Window() ], Pointer [Int], Pointer [Int] ], Bool;
5834 _affix_and_export SDL_SetWindowMaximumSize => [ Pointer [ SDL_Window() ], Int, Int ], Bool;
5835 _affix_and_export SDL_GetWindowMaximumSize => [ Pointer [ SDL_Window() ], Pointer [Int], Pointer [Int] ], Bool;
5836 _affix_and_export SDL_SetWindowBordered => [ Pointer [ SDL_Window() ], Bool ], Bool;
5837 _affix_and_export SDL_SetWindowResizable => [ Pointer [ SDL_Window() ], Bool ], Bool;
5838 _affix_and_export SDL_SetWindowAlwaysOnTop => [ Pointer [ SDL_Window() ], Bool ], Bool;
5839 _affix_and_export SDL_ShowWindow => [ Pointer [ SDL_Window() ] ], Bool;
5840 _affix_and_export SDL_HideWindow => [ Pointer [ SDL_Window() ] ], Bool;
5841 _affix_and_export SDL_RaiseWindow => [ Pointer [ SDL_Window() ] ], Bool;
5842 _affix_and_export SDL_MaximizeWindow => [ Pointer [ SDL_Window() ] ], Bool;
5843 _affix_and_export SDL_MinimizeWindow => [ Pointer [ SDL_Window() ] ], Bool;
5844 _affix_and_export SDL_RestoreWindow => [ Pointer [ SDL_Window() ] ], Bool;
5845 _affix_and_export SDL_SetWindowFullscreen => [ Pointer [ SDL_Window() ], Bool ], Bool;
5846 _affix_and_export SDL_SyncWindow => [ Pointer [ SDL_Window() ] ], Bool;
5847 _affix_and_export SDL_WindowHasSurface => [ Pointer [ SDL_Window() ] ], Bool;
5848 _affix_and_export SDL_GetWindowSurface => [ Pointer [ SDL_Window() ] ], Pointer [ SDL_Surface() ];
5849 _affix_and_export SDL_SetWindowSurfaceVSync => [ Pointer [ SDL_Window() ], Int ], Bool;
5850 #
5851 _const_and_export SDL_WINDOW_SURFACE_VSYNC_DISABLED => 0;
5852 _const_and_export SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE => (-1);
5853 #
5854 _affix_and_export SDL_GetWindowSurfaceVSync => [ Pointer [ SDL_Window() ], Pointer [Int] ], Bool;
5855 _affix_and_export SDL_UpdateWindowSurface => [ Pointer [ SDL_Window() ] ], Bool;
5856 _affix_and_export SDL_UpdateWindowSurfaceRects => [ Pointer [ SDL_Window() ], Pointer [ SDL_Rect() ], Int ], Bool;
5857 _affix_and_export SDL_DestroyWindowSurface => [ Pointer [ SDL_Window() ] ], Bool;
5858 _affix_and_export SDL_SetWindowKeyboardGrab => [ Pointer [ SDL_Window() ], Bool ], Bool;
5859 _affix_and_export SDL_SetWindowMouseGrab => [ Pointer [ SDL_Window() ], Bool ], Bool;
5860 _affix_and_export SDL_GetWindowKeyboardGrab => [ Pointer [ SDL_Window() ] ], Bool;
5861 _affix_and_export SDL_GetWindowMouseGrab => [ Pointer [ SDL_Window() ] ], Bool;
5862 _affix_and_export SDL_GetGrabbedWindow => [], Pointer [ SDL_Window() ];
5863 _affix_and_export SDL_SetWindowMouseRect => [ Pointer [ SDL_Window() ], Pointer [ SDL_Rect() ] ], Bool;
5864 _affix_and_export SDL_GetWindowMouseRect => [ Pointer [ SDL_Window() ] ], Pointer [ SDL_Rect() ];
5865 _affix_and_export SDL_SetWindowOpacity => [ Pointer [ SDL_Window() ], Float ], Bool;
5866 _affix_and_export SDL_GetWindowOpacity => [ Pointer [ SDL_Window() ] ], Float;
5867 _affix_and_export SDL_SetWindowParent => [ Pointer [ SDL_Window() ], Pointer [ SDL_Window() ] ], Bool;
5868 _affix_and_export SDL_SetWindowModal => [ Pointer [ SDL_Window() ], Bool ], Bool;
5869 _affix_and_export SDL_SetWindowFocusable => [ Pointer [ SDL_Window() ], Bool ], Bool;
5870 _affix_and_export SDL_ShowWindowSystemMenu => [ Pointer [ SDL_Window() ], Int, Int ], Bool;
5871 #
5872 _enum_and_export SDL_HitTestResult => [
5873 qw[
5874 SDL_HITTEST_NORMAL SDL_HITTEST_DRAGGABLE
5875 SDL_HITTEST_RESIZE_TOPLEFT SDL_HITTEST_RESIZE_TOP SDL_HITTEST_RESIZE_TOPRIGHT SDL_HITTEST_RESIZE_RIGHT
5876 SDL_HITTEST_RESIZE_BOTTOMRIGHT SDL_HITTEST_RESIZE_BOTTOM SDL_HITTEST_RESIZE_BOTTOMLEFT SDL_HITTEST_RESIZE_LEFT
5877 ]
5878 ];
5879 #
5880 _typedef_and_export SDL_HitTest => Callback [ [ Pointer [ SDL_Window() ], Pointer [ SDL_Point() ], Pointer [Void] ] => SDL_HitTestResult() ];
5881 _affix_and_export SDL_SetWindowHitTest => [ Pointer [ SDL_Window() ], SDL_HitTest(), Pointer [Void] ], Bool;
5882 _affix_and_export SDL_SetWindowShape => [ Pointer [ SDL_Window() ], Pointer [ SDL_Surface() ] ], Bool;
5883 _affix_and_export SDL_FlashWindow => [ Pointer [ SDL_Window() ], SDL_FlashOperation() ], Bool;
5884  
5885 #~ _affix_and_export SDL_SetWindowProgressState => [ Pointer [ SDL_Window() ], SDL_ProgressState() ], Bool;
5886 #~ _affix_and_export SDL_GetWindowProgressState => [ Pointer [ SDL_Window() ] ], SDL_ProgressState();
5887 #~ _affix_and_export SDL_SetWindowProgressValue => [ Pointer [ SDL_Window() ], Float ], Bool;
5888 #~ _affix_and_export SDL_GetWindowProgressValue => [ Pointer [ SDL_Window() ] ], Float;
5889 _affix_and_export SDL_DestroyWindow => [ Pointer [ SDL_Window() ] ], Void;
5890 _affix_and_export SDL_ScreenSaverEnabled => [], Bool;
5891 _affix_and_export SDL_EnableScreenSaver => [], Bool;
5892 _affix_and_export SDL_DisableScreenSaver => [], Bool;
5893 _affix_and_export SDL_GL_LoadLibrary => [String], Bool;
5894 _affix_and_export SDL_GL_GetProcAddress => [String], SDL_FunctionPointer();
5895 _affix_and_export SDL_EGL_GetProcAddress => [String], SDL_FunctionPointer();
5896 _affix_and_export SDL_GL_UnloadLibrary => [], Void;
5897 _affix_and_export SDL_GL_ExtensionSupported => [String], Bool;
5898 _affix_and_export SDL_GL_ResetAttributes => [], Void;
5899 _affix_and_export SDL_GL_SetAttribute => [ SDL_GLAttr() ], Bool;
5900 _affix_and_export SDL_GL_GetAttribute => [ SDL_GLAttr(), Pointer [Int] ], Bool;
5901 _affix_and_export SDL_GL_CreateContext => [ Pointer [ SDL_Window() ] ], SDL_GLContext();
5902 _affix_and_export SDL_GL_MakeCurrent => [ Pointer [ SDL_Window(), SDL_GLContext() ] ], Bool;
5903 _affix_and_export SDL_GL_GetCurrentWindow => [], Pointer [ SDL_Window() ];
5904 _affix_and_export SDL_GL_GetCurrentContext => [], SDL_GLContext();
5905 _affix_and_export SDL_EGL_GetCurrentDisplay => [], SDL_EGLDisplay();
5906 _affix_and_export SDL_EGL_GetCurrentConfig => [], SDL_EGLConfig();
5907 _affix_and_export SDL_EGL_GetWindowSurface => [ Pointer [ SDL_Window() ] ], SDL_EGLSurface();
5908 _affix_and_export
5909 SDL_EGL_SetAttributeCallbacks => [ SDL_EGLAttribArrayCallback(), SDL_EGLIntArrayCallback(), SDL_EGLIntArrayCallback(), Pointer [Void] ],
5910 Void;
5911 _affix_and_export SDL_GL_SetSwapInterval => [Int], Bool;
5912 _affix_and_export SDL_GL_GetSwapInterval => [ Pointer [Int] ], Bool;
5913 _affix_and_export SDL_GL_SwapWindow => [ Pointer [ SDL_Window() ] ], Bool;
5914 _affix_and_export SDL_GL_DestroyContext => [ SDL_GLContext() ], Bool;
5915 }
5916  
5917 =head3 C<:vulkan> - Vulkan Support
5918  
5919 Functions for creating Vulkan surfaces on SDL windows.
5920  
5921 See L<SDL3: CategoryVulkan|https://wiki.libsdl.org/SDL3/CategoryVulkan>
5922  
5923 =cut
5924  
5925 sub _vulkan () {
5926 state $done++ && return;
5927 #
5928 _error();
5929 _stdinc();
5930 _video();
5931  
5932 # opaque pointers
5933 typedef VkInstance => Pointer [Void];
5934 typedef VkAllocationCallbacks => Pointer [Void];
5935 typedef VkSurfaceKHR => Pointer [Void];
5936 typedef VkPhysicalDevice => Pointer [Void];
5937 #
5938 _affix_and_export 'SDL_Vulkan_LoadLibrary', [String] => Bool;
5939 _affix_and_export 'SDL_Vulkan_GetVkGetInstanceProcAddr', [] => SDL_FunctionPointer();
5940 _affix_and_export 'SDL_Vulkan_UnloadLibrary', [] => Void;
5941 _affix_and_export 'SDL_Vulkan_GetInstanceExtensions', [ Pointer [UInt32] ] => Pointer [String];
5942 _affix_and_export 'SDL_Vulkan_CreateSurface', [ SDL_Window(), VkInstance(), VkAllocationCallbacks(), VkSurfaceKHR() ] => Bool;
5943 _affix_and_export 'SDL_Vulkan_DestroySurface', [ VkInstance(), VkSurfaceKHR(), VkAllocationCallbacks() ] => Void;
5944 _affix_and_export 'SDL_Vulkan_GetPresentationSupport', [ VkInstance(), VkPhysicalDevice(), UInt32 ] => Bool;
5945 }
5946  
5947 END { # For :main
5948 return if $? != 0; # Don't run hook, we're crashing or exiting with an error
5949 $main_hook // return;
5950 my $SDL_AppInit = $main_hook->can('SDL_AppInit') // sub { SDL_Log('Missing SDL_AppInit callback for :main'); SDL_APP_FAILURE() };
5951 my $SDL_AppEvent = $main_hook->can('SDL_AppEvent') // sub { SDL_Log('Missing SDL_AppEvent callback for :main'); SDL_APP_FAILURE() };
5952 my $SDL_AppIterate = $main_hook->can('SDL_AppIterate') // sub { SDL_Log('Missing SDL_AppIterate callback for :main'); SDL_APP_FAILURE() };
5953 my $SDL_AppQuit = $main_hook->can('SDL_AppQuit') // sub { SDL_Log('Missing SDL_AppQuit callback for :main'); SDL_APP_FAILURE() };
5954 SDL_EnterAppMainCallbacks( scalar(@ARGV), \@ARGV, $SDL_AppInit, $SDL_AppIterate, $SDL_AppEvent, $SDL_AppQuit );
5955 }
5956 }
5957 1;
5958  
5959 =head1 See Also
5960  
5961 The project's repo: L<https://github.com/Perl-SDL3/>
5962  
5963 The SDL3 Wiki: L<https://wiki.libsdl.org/SDL3/FrontPage>
5964  
5965 L<Affix>
5966  
5967 =head1 LICENSE
5968  
5969 This software is Copyright (c) 2025 by Sanko Robinson.
5970  
5971 This is free software, licensed under:
5972  
5973 The Artistic License 2.0 (GPL Compatible)
5974  
5975 See the F<LICENSE> file for full text.
5976  
5977 =head1 AUTHOR
5978  
5979 Sanko Robinson L<https://github.com/sanko>
5980  
5981 =begin stopwords
5982  
5983  
5984 =end stopwords
5985  
5986 =cut