SDL 3.0
SDL_system.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2024 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/**
23 * \file SDL_system.h
24 *
25 * Include file for platform specific SDL API functions
26 */
27
28#ifndef SDL_system_h_
29#define SDL_system_h_
30
31#include <SDL3/SDL_stdinc.h>
32#include <SDL3/SDL_error.h>
33#include <SDL3/SDL_keyboard.h>
34#include <SDL3/SDL_render.h>
35#include <SDL3/SDL_video.h>
36
37#include <SDL3/SDL_begin_code.h>
38/* Set up for C function definitions, even when using C++ */
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43
44/*
45 * Platform specific functions for Windows
46 */
47#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK)
48
49typedef struct tagMSG MSG;
50typedef SDL_bool (SDLCALL *SDL_WindowsMessageHook)(void *userdata, MSG *msg);
51
52/**
53 * Set a callback for every Windows message, run before TranslateMessage().
54 *
55 * The callback may modify the message, and should return SDL_TRUE if the
56 * message should continue to be processed, or SDL_FALSE to prevent further
57 * processing.
58 *
59 * \param callback The SDL_WindowsMessageHook function to call.
60 * \param userdata a pointer to pass to every iteration of `callback`
61 *
62 * \since This function is available since SDL 3.0.0.
63 */
64extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook callback, void *userdata);
65
66#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_GDK) */
67
68#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
69
70/**
71 * Get the D3D9 adapter index that matches the specified display.
72 *
73 * The returned adapter index can be passed to `IDirect3D9::CreateDevice` and
74 * controls on which monitor a full screen application will appear.
75 *
76 * \param displayID the instance of the display to query
77 * \returns the D3D9 adapter index on success or a negative error code on
78 * failure; call SDL_GetError() for more information.
79 *
80 * \since This function is available since SDL 3.0.0.
81 */
82extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex(SDL_DisplayID displayID);
83
84#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) */
85
86#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
87
88/**
89 * Get the DXGI Adapter and Output indices for the specified display.
90 *
91 * The DXGI Adapter and Output indices can be passed to `EnumAdapters` and
92 * `EnumOutputs` respectively to get the objects required to create a DX10 or
93 * DX11 device and swap chain.
94 *
95 * \param displayID the instance of the display to query
96 * \param adapterIndex a pointer to be filled in with the adapter index
97 * \param outputIndex a pointer to be filled in with the output index
98 * \returns SDL_TRUE on success or SDL_FALSE on failure; call SDL_GetError()
99 * for more information.
100 *
101 * \since This function is available since SDL 3.0.0.
102 */
103extern DECLSPEC SDL_bool SDLCALL SDL_DXGIGetOutputInfo(SDL_DisplayID displayID, int *adapterIndex, int *outputIndex);
104
105#endif /* defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK) */
106
107/*
108 * Platform specific functions for UNIX
109 */
110
111typedef union _XEvent XEvent;
112typedef SDL_bool (SDLCALL *SDL_X11EventHook)(void *userdata, XEvent *xevent);
113
114/**
115 * Set a callback for every X11 event.
116 *
117 * The callback may modify the event, and should return SDL_TRUE if the event
118 * should continue to be processed, or SDL_FALSE to prevent further
119 * processing.
120 *
121 * \param callback The SDL_X11EventHook function to call.
122 * \param userdata a pointer to pass to every iteration of `callback`
123 *
124 * \since This function is available since SDL 3.0.0.
125 */
126extern DECLSPEC void SDLCALL SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata);
127
128/* Platform specific functions for Linux*/
129#ifdef SDL_PLATFORM_LINUX
130
131/**
132 * Sets the UNIX nice value for a thread.
133 *
134 * This uses setpriority() if possible, and RealtimeKit if available.
135 *
136 * \param threadID the Unix thread ID to change priority of.
137 * \param priority The new, Unix-specific, priority value.
138 * \returns 0 on success, or -1 on error.
139 *
140 * \since This function is available since SDL 3.0.0.
141 */
142extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int priority);
143
144/**
145 * Sets the priority (not nice level) and scheduling policy for a thread.
146 *
147 * This uses setpriority() if possible, and RealtimeKit if available.
148 *
149 * \param threadID The Unix thread ID to change priority of.
150 * \param sdlPriority The new SDL_ThreadPriority value.
151 * \param schedPolicy The new scheduling policy (SCHED_FIFO, SCHED_RR,
152 * SCHED_OTHER, etc...)
153 * \returns 0 on success or a negative error code on failure; call
154 * SDL_GetError() for more information.
155 *
156 * \since This function is available since SDL 3.0.0.
157 */
158extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy);
159
160#endif /* SDL_PLATFORM_LINUX */
161
162/*
163 * Platform specific functions for iOS
164 */
165#ifdef SDL_PLATFORM_IOS
166
167/**
168 * Use this function to set the animation callback on Apple iOS.
169 *
170 * The function prototype for `callback` is:
171 *
172 * ```c
173 * void callback(void* callbackParam);
174 * ```
175 *
176 * Where its parameter, `callbackParam`, is what was passed as `callbackParam`
177 * to SDL_iOSSetAnimationCallback().
178 *
179 * This function is only available on Apple iOS.
180 *
181 * For more information see:
182 *
183 * https://wiki.libsdl.org/SDL3/README/ios
184 *
185 * Note that if you use the "main callbacks" instead of a standard C `main`
186 * function, you don't have to use this API, as SDL will manage this for you.
187 *
188 * Details on main callbacks are here:
189 *
190 * https://wiki.libsdl.org/SDL3/README/main-functions
191 *
192 * \param window the window for which the animation callback should be set
193 * \param interval the number of frames after which **callback** will be
194 * called
195 * \param callback the function to call for every frame.
196 * \param callbackParam a pointer that is passed to `callback`.
197 * \returns 0 on success or a negative error code on failure; call
198 * SDL_GetError() for more information.
199 *
200 * \since This function is available since SDL 3.0.0.
201 *
202 * \sa SDL_iOSSetEventPump
203 */
204extern DECLSPEC int SDLCALL SDL_iOSSetAnimationCallback(SDL_Window * window, int interval, void (SDLCALL *callback)(void*), void *callbackParam);
205
206/**
207 * Use this function to enable or disable the SDL event pump on Apple iOS.
208 *
209 * This function is only available on Apple iOS.
210 *
211 * \param enabled SDL_TRUE to enable the event pump, SDL_FALSE to disable it
212 *
213 * \since This function is available since SDL 3.0.0.
214 *
215 * \sa SDL_iOSSetAnimationCallback
216 */
217extern DECLSPEC void SDLCALL SDL_iOSSetEventPump(SDL_bool enabled);
218
219#endif /* SDL_PLATFORM_IOS */
220
221
222/*
223 * Platform specific functions for Android
224 */
225#ifdef SDL_PLATFORM_ANDROID
226
227/**
228 * Get the Android Java Native Interface Environment of the current thread.
229 *
230 * This is the JNIEnv one needs to access the Java virtual machine from native
231 * code, and is needed for many Android APIs to be usable from C.
232 *
233 * The prototype of the function in SDL's code actually declare a void* return
234 * type, even if the implementation returns a pointer to a JNIEnv. The
235 * rationale being that the SDL headers can avoid including jni.h.
236 *
237 * \returns a pointer to Java native interface object (JNIEnv) to which the
238 * current thread is attached, or 0 on error.
239 *
240 * \since This function is available since SDL 3.0.0.
241 *
242 * \sa SDL_AndroidGetActivity
243 */
244extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
245
246/**
247 * Retrieve the Java instance of the Android activity class.
248 *
249 * The prototype of the function in SDL's code actually declares a void*
250 * return type, even if the implementation returns a jobject. The rationale
251 * being that the SDL headers can avoid including jni.h.
252 *
253 * The jobject returned by the function is a local reference and must be
254 * released by the caller. See the PushLocalFrame() and PopLocalFrame() or
255 * DeleteLocalRef() functions of the Java native interface:
256 *
257 * https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/functions.html
258 *
259 * \returns the jobject representing the instance of the Activity class of the
260 * Android application, or NULL on error.
261 *
262 * \since This function is available since SDL 3.0.0.
263 *
264 * \sa SDL_AndroidGetJNIEnv
265 */
266extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
267
268/**
269 * Query Android API level of the current device.
270 *
271 * - API level 34: Android 14 (UPSIDE_DOWN_CAKE)
272 * - API level 33: Android 13 (TIRAMISU)
273 * - API level 32: Android 12L (S_V2)
274 * - API level 31: Android 12 (S)
275 * - API level 30: Android 11 (R)
276 * - API level 29: Android 10 (Q)
277 * - API level 28: Android 9 (P)
278 * - API level 27: Android 8.1 (O_MR1)
279 * - API level 26: Android 8.0 (O)
280 * - API level 25: Android 7.1 (N_MR1)
281 * - API level 24: Android 7.0 (N)
282 * - API level 23: Android 6.0 (M)
283 * - API level 22: Android 5.1 (LOLLIPOP_MR1)
284 * - API level 21: Android 5.0 (LOLLIPOP, L)
285 * - API level 20: Android 4.4W (KITKAT_WATCH)
286 * - API level 19: Android 4.4 (KITKAT)
287 * - API level 18: Android 4.3 (JELLY_BEAN_MR2)
288 * - API level 17: Android 4.2 (JELLY_BEAN_MR1)
289 * - API level 16: Android 4.1 (JELLY_BEAN)
290 * - API level 15: Android 4.0.3 (ICE_CREAM_SANDWICH_MR1)
291 * - API level 14: Android 4.0 (ICE_CREAM_SANDWICH)
292 * - API level 13: Android 3.2 (HONEYCOMB_MR2)
293 * - API level 12: Android 3.1 (HONEYCOMB_MR1)
294 * - API level 11: Android 3.0 (HONEYCOMB)
295 * - API level 10: Android 2.3.3 (GINGERBREAD_MR1)
296 *
297 * \returns the Android API level.
298 *
299 * \since This function is available since SDL 3.0.0.
300 */
301extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
302
303/**
304 * Query if the application is running on Android TV.
305 *
306 * \returns SDL_TRUE if this is Android TV, SDL_FALSE otherwise.
307 *
308 * \since This function is available since SDL 3.0.0.
309 */
310extern DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
311
312/**
313 * Query if the application is running on a Chromebook.
314 *
315 * \returns SDL_TRUE if this is a Chromebook, SDL_FALSE otherwise.
316 *
317 * \since This function is available since SDL 3.0.0.
318 */
319extern DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
320
321/**
322 * Query if the application is running on a Samsung DeX docking station.
323 *
324 * \returns SDL_TRUE if this is a DeX docking station, SDL_FALSE otherwise.
325 *
326 * \since This function is available since SDL 3.0.0.
327 */
328extern DECLSPEC SDL_bool SDLCALL SDL_IsDeXMode(void);
329
330/**
331 * Trigger the Android system back button behavior.
332 *
333 * \since This function is available since SDL 3.0.0.
334 */
335extern DECLSPEC void SDLCALL SDL_AndroidBackButton(void);
336
337/**
338 * See the official Android developer guide for more information:
339 * http://developer.android.com/guide/topics/data/data-storage.html
340 *
341 * \since This macro is available since SDL 3.0.0.
342 */
343#define SDL_ANDROID_EXTERNAL_STORAGE_READ 0x01
344#define SDL_ANDROID_EXTERNAL_STORAGE_WRITE 0x02
345
346/**
347 * Get the path used for internal storage for this application.
348 *
349 * This path is unique to your application and cannot be written to by other
350 * applications.
351 *
352 * Your internal storage path is typically:
353 * `/data/data/your.app.package/files`.
354 *
355 * \returns the path used for internal storage or NULL on failure; call
356 * SDL_GetError() for more information.
357 *
358 * \since This function is available since SDL 3.0.0.
359 *
360 * \sa SDL_AndroidGetExternalStorageState
361 */
362extern DECLSPEC const char * SDLCALL SDL_AndroidGetInternalStoragePath(void);
363
364/**
365 * Get the current state of external storage.
366 *
367 * The current state of external storage, a bitmask of these values:
368 * `SDL_ANDROID_EXTERNAL_STORAGE_READ`, `SDL_ANDROID_EXTERNAL_STORAGE_WRITE`.
369 *
370 * If external storage is currently unavailable, this will return 0.
371 *
372 * \param state filled with the current state of external storage. 0 if
373 * external storage is currently unavailable.
374 * \returns 0 on success or a negative error code on failure; call
375 * SDL_GetError() for more information.
376 *
377 * \since This function is available since SDL 3.0.0.
378 *
379 * \sa SDL_AndroidGetExternalStoragePath
380 */
381extern DECLSPEC int SDLCALL SDL_AndroidGetExternalStorageState(Uint32 *state);
382
383/**
384 * Get the path used for external storage for this application.
385 *
386 * This path is unique to your application, but is public and can be written
387 * to by other applications.
388 *
389 * Your external storage path is typically:
390 * `/storage/sdcard0/Android/data/your.app.package/files`.
391 *
392 * \returns the path used for external storage for this application on success
393 * or NULL on failure; call SDL_GetError() for more information.
394 *
395 * \since This function is available since SDL 3.0.0.
396 *
397 * \sa SDL_AndroidGetExternalStorageState
398 */
399extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
400
401
402typedef void (SDLCALL *SDL_AndroidRequestPermissionCallback)(void *userdata, const char *permission, SDL_bool granted);
403
404/**
405 * Request permissions at runtime, asynchronously.
406 *
407 * You do not need to call this for built-in functionality of SDL; recording
408 * from a microphone or reading images from a camera, using standard SDL APIs,
409 * will manage permission requests for you.
410 *
411 * This function never blocks. Instead, the app-supplied callback will be
412 * called when a decision has been made. This callback may happen on a
413 * different thread, and possibly much later, as it might wait on a user to
414 * respond to a system dialog. If permission has already been granted for a
415 * specific entitlement, the callback will still fire, probably on the current
416 * thread and before this function returns.
417 *
418 * If the request submission fails, this function returns -1 and the callback
419 * will NOT be called, but this should only happen in catastrophic conditions,
420 * like memory running out. Normally there will be a yes or no to the request
421 * through the callback.
422 *
423 * \param permission The permission to request.
424 * \param cb The callback to trigger when the request has a response.
425 * \param userdata An app-controlled pointer that is passed to the callback.
426 * \returns zero if the request was submitted, -1 if there was an error
427 * submitting. The result of the request is only ever reported
428 * through the callback, not this return value.
429 *
430 * \since This function is available since SDL 3.0.0.
431 */
432extern DECLSPEC int SDLCALL SDL_AndroidRequestPermission(const char *permission, SDL_AndroidRequestPermissionCallback cb, void *userdata);
433
434/**
435 * Shows an Android toast notification.
436 *
437 * Toasts are a sort of lightweight notification that are unique to Android.
438 *
439 * https://developer.android.com/guide/topics/ui/notifiers/toasts
440 *
441 * Shows toast in UI thread.
442 *
443 * For the `gravity` parameter, choose a value from here, or -1 if you don't
444 * have a preference:
445 *
446 * https://developer.android.com/reference/android/view/Gravity
447 *
448 * \param message text message to be shown
449 * \param duration 0=short, 1=long
450 * \param gravity where the notification should appear on the screen.
451 * \param xoffset set this parameter only when gravity >=0
452 * \param yoffset set this parameter only when gravity >=0
453 * \returns 0 on success or a negative error code on failure; call
454 * SDL_GetError() for more information.
455 *
456 * \since This function is available since SDL 3.0.0.
457 */
458extern DECLSPEC int SDLCALL SDL_AndroidShowToast(const char* message, int duration, int gravity, int xoffset, int yoffset);
459
460/**
461 * Send a user command to SDLActivity.
462 *
463 * Override "boolean onUnhandledMessage(Message msg)" to handle the message.
464 *
465 * \param command user command that must be greater or equal to 0x8000
466 * \param param user parameter
467 * \returns 0 on success or a negative error code on failure; call
468 * SDL_GetError() for more information.
469 *
470 * \since This function is available since SDL 3.0.0.
471 */
472extern DECLSPEC int SDLCALL SDL_AndroidSendMessage(Uint32 command, int param);
473
474#endif /* SDL_PLATFORM_ANDROID */
475
476/*
477 * Platform specific functions for WinRT
478 */
479#ifdef SDL_PLATFORM_WINRT
480
481/**
482 * WinRT / Windows Phone path types
483 *
484 * \since This enum is available since SDL 3.0.0.
485 */
486typedef enum SDL_WinRT_Path
487{
488 /** The installed app's root directory.
489 Files here are likely to be read-only. */
490 SDL_WINRT_PATH_INSTALLED_LOCATION,
491
492 /** The app's local data store. Files may be written here */
493 SDL_WINRT_PATH_LOCAL_FOLDER,
494
495 /** The app's roaming data store. Unsupported on Windows Phone.
496 Files written here may be copied to other machines via a network
497 connection.
498 */
499 SDL_WINRT_PATH_ROAMING_FOLDER,
500
501 /** The app's temporary data store. Unsupported on Windows Phone.
502 Files written here may be deleted at any time. */
503 SDL_WINRT_PATH_TEMP_FOLDER
504} SDL_WinRT_Path;
505
506
507/**
508 * WinRT Device Family
509 *
510 * \since This enum is available since SDL 3.0.0.
511 */
512typedef enum SDL_WinRT_DeviceFamily
513{
514 /** Unknown family */
515 SDL_WINRT_DEVICEFAMILY_UNKNOWN,
516
517 /** Desktop family*/
518 SDL_WINRT_DEVICEFAMILY_DESKTOP,
519
520 /** Mobile family (for example smartphone) */
521 SDL_WINRT_DEVICEFAMILY_MOBILE,
522
523 /** XBox family */
524 SDL_WINRT_DEVICEFAMILY_XBOX,
525} SDL_WinRT_DeviceFamily;
526
527
528/**
529 * Retrieve a WinRT defined path on the local file system.
530 *
531 * Not all paths are available on all versions of Windows. This is especially
532 * true on Windows Phone. Check the documentation for the given SDL_WinRT_Path
533 * for more information on which path types are supported where.
534 *
535 * Documentation on most app-specific path types on WinRT can be found on
536 * MSDN, at the URL:
537 *
538 * https://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
539 *
540 * \param pathType the type of path to retrieve, one of SDL_WinRT_Path
541 * \returns a UTF-8 string (8-bit, multi-byte) containing the path, or NULL if
542 * the path is not available for any reason; call SDL_GetError() for
543 * more information.
544 *
545 * \since This function is available since SDL 3.0.0.
546 */
547extern DECLSPEC const char * SDLCALL SDL_WinRTGetFSPath(SDL_WinRT_Path pathType);
548
549/**
550 * Detects the device family of WinRT platform at runtime.
551 *
552 * \returns a value from the SDL_WinRT_DeviceFamily enum.
553 *
554 * \since This function is available since SDL 3.0.0.
555 */
556extern DECLSPEC SDL_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
557
558#endif /* SDL_PLATFORM_WINRT */
559
560/**
561 * Query if the current device is a tablet.
562 *
563 * If SDL can't determine this, it will return SDL_FALSE.
564 *
565 * \returns SDL_TRUE if the device is a tablet, SDL_FALSE otherwise.
566 *
567 * \since This function is available since SDL 3.0.0.
568 */
569extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
570
571/* Functions used by iOS app delegates to notify SDL about state changes.
572 *
573 * These functions allow iOS apps that have their own event handling to hook
574 * into SDL to generate SDL events. These map directly to iOS-specific
575 * events, but since they don't do anything iOS-specific internally, they
576 * are available on all platforms, in case they might be useful for some
577 * specific paradigm. Most apps do not need to use these directly; SDL's
578 * internal event code will handle all this for windows created by
579 * SDL_CreateWindow!
580 */
581
582/*
583 * \since This function is available since SDL 3.0.0.
584 */
585extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
586
587/*
588 * \since This function is available since SDL 3.0.0.
589 */
590extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
591
592/*
593 * \since This function is available since SDL 3.0.0.
594 */
595extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
596
597/*
598 * \since This function is available since SDL 3.0.0.
599 */
600extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
601
602/*
603 * \since This function is available since SDL 3.0.0.
604 */
605extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
606
607/*
608 * \since This function is available since SDL 3.0.0.
609 */
610extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
611
612#ifdef SDL_PLATFORM_IOS
613/*
614 * \since This function is available since SDL 3.0.0.
615 */
616extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
617#endif
618
619/*
620 * Functions used only by GDK
621 */
622#ifdef SDL_PLATFORM_GDK
623typedef struct XTaskQueueObject *XTaskQueueHandle;
624typedef struct XUser *XUserHandle;
625
626/**
627 * Gets a reference to the global async task queue handle for GDK,
628 * initializing if needed.
629 *
630 * Once you are done with the task queue, you should call
631 * XTaskQueueCloseHandle to reduce the reference count to avoid a resource
632 * leak.
633 *
634 * \param outTaskQueue a pointer to be filled in with task queue handle.
635 * \returns 0 on success or a negative error code on failure; call
636 * SDL_GetError() for more information.
637 *
638 * \since This function is available since SDL 3.0.0.
639 */
640extern DECLSPEC int SDLCALL SDL_GDKGetTaskQueue(XTaskQueueHandle * outTaskQueue);
641
642/**
643 * Gets a reference to the default user handle for GDK.
644 *
645 * This is effectively a synchronous version of XUserAddAsync, which always
646 * prefers the default user and allows a sign-in UI.
647 *
648 * \param outUserHandle a pointer to be filled in with the default user
649 * handle.
650 * \returns 0 if success, -1 if any error occurs.
651 *
652 * \since This function is available since SDL 3.0.0.
653 */
654extern DECLSPEC int SDLCALL SDL_GDKGetDefaultUser(XUserHandle * outUserHandle);
655
656#endif
657
658/* Ends C function definitions when using C++ */
659#ifdef __cplusplus
660}
661#endif
662#include <SDL3/SDL_close_code.h>
663
664#endif /* SDL_system_h_ */
int64_t Sint64
Definition SDL_stdinc.h:233
int SDL_bool
Definition SDL_stdinc.h:170
uint32_t Uint32
Definition SDL_stdinc.h:224
union _XEvent XEvent
Definition SDL_system.h:111
SDL_bool(* SDL_X11EventHook)(void *userdata, XEvent *xevent)
Definition SDL_system.h:112
SDL_bool SDL_IsTablet(void)
void SDL_OnApplicationWillEnterForeground(void)
void SDL_OnApplicationDidBecomeActive(void)
void SDL_OnApplicationDidEnterBackground(void)
void SDL_SetX11EventHook(SDL_X11EventHook callback, void *userdata)
void SDL_OnApplicationDidReceiveMemoryWarning(void)
void SDL_OnApplicationWillResignActive(void)
void SDL_OnApplicationWillTerminate(void)
Uint32 SDL_DisplayID
Definition SDL_video.h:45
struct SDL_Window SDL_Window
Definition SDL_video.h:119