system topic

CategorySystem

Platform-specific SDL API functions. These are functions that deal with needs of specific operating systems, that didn't make sense to offer as platform-independent, generic APIs.

Most apps can make do without these functions, but they can be useful for integrating with other parts of a specific system, adding platform-specific polish to an app, or solving problems that only affect one target.

Functions

sdlGetAndroidActivity() Pointer<NativeType> system
Retrieve the Java instance of the Android activity class.
sdlGetAndroidCachePath() String? system
Get the path used for caching data for this Android application.
sdlGetAndroidExternalStoragePath() String? system
Get the path used for external storage for this Android application.
sdlGetAndroidExternalStorageState() int system
Get the current state of external storage for this Android application.
sdlGetAndroidInternalStoragePath() String? system
Get the path used for internal storage for this Android application.
sdlGetAndroidJniEnv() Pointer<NativeType> system
Get the Android Java Native Interface Environment of the current thread.
sdlGetAndroidSdkVersion() int system
Query Android API level of the current device.
sdlGetDirect3D9AdapterIndex(int displayId) int system
Get the D3D9 adapter index that matches the specified display.
sdlGetDxgiOutputInfo(int displayId, Pointer<Int32> adapterIndex, Pointer<Int32> outputIndex) bool system
Get the DXGI Adapter and Output indices for the specified display.
sdlGetGdkDefaultUser(Pointer<XUserHandle> outUserHandle) bool system
Gets a reference to the default user handle for GDK.
sdlGetGdkTaskQueue(Pointer<XTaskQueueHandle> outTaskQueue) bool system
Gets a reference to the global async task queue handle for GDK, initializing if needed.
sdlGetSandbox() int system
Get the application sandbox environment, if any.
sdlIsChromebook() bool system
Query if the application is running on a Chromebook.
sdlIsDeXMode() bool system
Query if the application is running on a Samsung DeX docking station.
sdlIsTablet() bool system
Query if the current device is a tablet.
sdlIsTv() bool system
Query if the current device is a TV.
sdlOnApplicationDidChangeStatusBarOrientation() → void system
Let iOS apps with external event handling report onApplicationDidChangeStatusBarOrientation.
sdlOnApplicationDidEnterBackground() → void system
Let iOS apps with external event handling report onApplicationDidEnterBackground.
sdlOnApplicationDidEnterForeground() → void system
Let iOS apps with external event handling report onApplicationDidBecomeActive.
sdlOnApplicationDidReceiveMemoryWarning() → void system
Let iOS apps with external event handling report onApplicationDidReceiveMemoryWarning.
sdlOnApplicationWillEnterBackground() → void system
Let iOS apps with external event handling report onApplicationWillResignActive.
sdlOnApplicationWillEnterForeground() → void system
Let iOS apps with external event handling report onApplicationWillEnterForeground.
sdlOnApplicationWillTerminate() → void system
Let iOS apps with external event handling report onApplicationWillTerminate.
sdlRequestAndroidPermission(String? permission, Pointer<NativeFunction<SdlRequestAndroidPermissionCallback>> cb, Pointer<NativeType> userdata) bool system
Request permissions at runtime, asynchronously.
sdlSendAndroidBackButton() → void system
Trigger the Android system back button behavior.
sdlSendAndroidMessage(int command, int param) bool system
Send a user command to SDLActivity.
sdlSetiOsAnimationCallback(Pointer<SdlWindow> window, int interval, Pointer<NativeFunction<SdlIOsAnimationCallback>> callback, Pointer<NativeType> callbackParam) bool system
Use this function to set the animation callback on Apple iOS.
sdlSetiOsEventPump(bool enabled) → void system
Use this function to enable or disable the SDL event pump on Apple iOS.
sdlSetLinuxThreadPriority(int threadId, int priority) bool system
Sets the UNIX nice value for a thread.
sdlSetLinuxThreadPriorityAndPolicy(int threadId, int sdlPriority, int schedPolicy) bool system
Sets the priority (not nice level) and scheduling policy for a thread.
sdlSetWindowsMessageHook(Pointer<NativeFunction<SdlWindowsMessageHook>> callback, Pointer<NativeType> userdata) → void system
Set a callback for every Windows message, run before TranslateMessage().
sdlSetX11EventHook(Pointer<NativeFunction<SdlX11EventHook>> callback, Pointer<NativeType> userdata) → void system
Set a callback for every X11 event.
sdlShowAndroidToast(String? message, int duration, int gravity, int xoffset, int yoffset) bool system
Shows an Android toast notification.