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