sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.System

Description

Platform-specific SDL API functions.

FFI conventions

Unsuffixed aliases are unsafe foreign imports; aliases suffixed Safe are safe. Functions whose callbacks fire during the call export only the Safe alias (the genuine unsafe import stays reachable under SDL3.Sys.Bindgen.System.Unsafe); functions curated unsafe-only export only the unsuffixed one. Each alias's documentation records its flavor and rationale.

Full conventions: SDL3.Sys.

Synopsis

Documentation

Function aliases

setX11EventHook Source #

Arguments

:: SDL_X11EventHook
callback
the SDL_X11EventHook function to call.
-> Ptr Void
userdata
a pointer to pass to every iteration of callback.
-> IO () 

Set a callback for every X11 event.

The callback may modify the event, and should return true if the event should continue to be processed, or false to prevent further processing.

Thread safety
This function should only be called on the main thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_SetX11EventHook. The safe flavor is setX11EventHookSafe : registration; the hook runs during event pumping.
C declaration
SDL_SetX11EventHook, defined at SDL3/SDL_system.h 178:34

Since: 3.2.0

setX11EventHookSafe Source #

Arguments

:: SDL_X11EventHook
callback
the SDL_X11EventHook function to call.
-> Ptr Void
userdata
a pointer to pass to every iteration of callback.
-> IO () 

Set a callback for every X11 event.

The callback may modify the event, and should return true if the event should continue to be processed, or false to prevent further processing.

Thread safety
This function should only be called on the main thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_SetX11EventHook. The unsafe flavor is setX11EventHook : registration; the hook runs during event pumping.
C declaration
SDL_SetX11EventHook, defined at SDL3/SDL_system.h 178:34

Since: 3.2.0

setLinuxThreadPriority Source #

Arguments

:: Int64
C declaration
threadID
-> Int32
C declaration
priority
-> IO Bool 

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_SetLinuxThreadPriority. The safe flavor is setLinuxThreadPrioritySafe .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLinuxThreadPriority, defined at SDL3/SDL_system.h 197:34

setLinuxThreadPrioritySafe Source #

Arguments

:: Int64
C declaration
threadID
-> Int32
C declaration
priority
-> IO Bool 

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_SetLinuxThreadPriority. The unsafe flavor is setLinuxThreadPriority .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLinuxThreadPriority, defined at SDL3/SDL_system.h 197:34

setLinuxThreadPriorityAndPolicy Source #

Arguments

:: Int64
C declaration
threadID
-> Int32
C declaration
sdlPriority
-> Int32
C declaration
schedPolicy
-> IO Bool 

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_SetLinuxThreadPriorityAndPolicy. The safe flavor is setLinuxThreadPriorityAndPolicySafe .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLinuxThreadPriorityAndPolicy, defined at SDL3/SDL_system.h 215:34

setLinuxThreadPriorityAndPolicySafe Source #

Arguments

:: Int64
C declaration
threadID
-> Int32
C declaration
sdlPriority
-> Int32
C declaration
schedPolicy
-> IO Bool 

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_SetLinuxThreadPriorityAndPolicy. The unsafe flavor is setLinuxThreadPriorityAndPolicy .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_SetLinuxThreadPriorityAndPolicy, defined at SDL3/SDL_system.h 215:34

isTablet :: IO Bool Source #

Query if the current device is a tablet.

If SDL can't determine this, it will return false.

Returns
true if the device is a tablet, false otherwise.
Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_IsTablet. The safe flavor is isTabletSafe .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_IsTablet, defined at SDL3/SDL_system.h 630:34

Since: 3.2.0

isTabletSafe :: IO Bool Source #

Query if the current device is a tablet.

If SDL can't determine this, it will return false.

Returns
true if the device is a tablet, false otherwise.
Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_IsTablet. The unsafe flavor is isTablet .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_IsTablet, defined at SDL3/SDL_system.h 630:34

Since: 3.2.0

isTV :: IO Bool Source #

Query if the current device is a TV.

If SDL can't determine this, it will return false.

Returns
true if the device is a TV, false otherwise.
Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_IsTV. The safe flavor is isTVSafe .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_IsTV, defined at SDL3/SDL_system.h 643:34

Since: 3.2.0

isTVSafe :: IO Bool Source #

Query if the current device is a TV.

If SDL can't determine this, it will return false.

Returns
true if the device is a TV, false otherwise.
Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_IsTV. The unsafe flavor is isTV .
Scalars
The binding generation has mapped C scalars to native Haskell scalars for this function. Pointers and structs are untouched by this best-effort mapping. Higher-level bindings are expected to map structs and pointers as appropriate.
C declaration
SDL_IsTV, defined at SDL3/SDL_system.h 643:34

Since: 3.2.0

getSandbox :: IO SDL_Sandbox Source #

Get the application sandbox environment, if any.

Returns
the application sandbox environment or SDL_SANDBOX_NONE if the application is not running in a sandbox environment.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_GetSandbox. The safe flavor is getSandboxSafe .
C declaration
SDL_GetSandbox, defined at SDL3/SDL_system.h 667:41

Since: 3.2.0

getSandboxSafe :: IO SDL_Sandbox Source #

Get the application sandbox environment, if any.

Returns
the application sandbox environment or SDL_SANDBOX_NONE if the application is not running in a sandbox environment.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_GetSandbox. The unsafe flavor is getSandbox .
C declaration
SDL_GetSandbox, defined at SDL3/SDL_system.h 667:41

Since: 3.2.0

onApplicationWillTerminate :: IO () Source #

Let iOS apps with external event handling report onApplicationWillTerminate.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_OnApplicationWillTerminate. The safe flavor is onApplicationWillTerminateSafe .
C declaration
SDL_OnApplicationWillTerminate, defined at SDL3/SDL_system.h 687:34

Since: 3.2.0

onApplicationWillTerminateSafe :: IO () Source #

Let iOS apps with external event handling report onApplicationWillTerminate.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_OnApplicationWillTerminate. The unsafe flavor is onApplicationWillTerminate .
C declaration
SDL_OnApplicationWillTerminate, defined at SDL3/SDL_system.h 687:34

Since: 3.2.0

onApplicationDidReceiveMemoryWarning :: IO () Source #

Let iOS apps with external event handling report onApplicationDidReceiveMemoryWarning.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_OnApplicationDidReceiveMemoryWarning. The safe flavor is onApplicationDidReceiveMemoryWarningSafe .
C declaration
SDL_OnApplicationDidReceiveMemoryWarning, defined at SDL3/SDL_system.h 704:34

Since: 3.2.0

onApplicationDidReceiveMemoryWarningSafe :: IO () Source #

Let iOS apps with external event handling report onApplicationDidReceiveMemoryWarning.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_OnApplicationDidReceiveMemoryWarning. The unsafe flavor is onApplicationDidReceiveMemoryWarning .
C declaration
SDL_OnApplicationDidReceiveMemoryWarning, defined at SDL3/SDL_system.h 704:34

Since: 3.2.0

onApplicationWillEnterBackground :: IO () Source #

Let iOS apps with external event handling report onApplicationWillResignActive.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_OnApplicationWillEnterBackground. The safe flavor is onApplicationWillEnterBackgroundSafe .
C declaration
SDL_OnApplicationWillEnterBackground, defined at SDL3/SDL_system.h 721:34

Since: 3.2.0

onApplicationWillEnterBackgroundSafe :: IO () Source #

Let iOS apps with external event handling report onApplicationWillResignActive.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_OnApplicationWillEnterBackground. The unsafe flavor is onApplicationWillEnterBackground .
C declaration
SDL_OnApplicationWillEnterBackground, defined at SDL3/SDL_system.h 721:34

Since: 3.2.0

onApplicationDidEnterBackground :: IO () Source #

Let iOS apps with external event handling report onApplicationDidEnterBackground.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_OnApplicationDidEnterBackground. The safe flavor is onApplicationDidEnterBackgroundSafe .
C declaration
SDL_OnApplicationDidEnterBackground, defined at SDL3/SDL_system.h 738:34

Since: 3.2.0

onApplicationDidEnterBackgroundSafe :: IO () Source #

Let iOS apps with external event handling report onApplicationDidEnterBackground.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_OnApplicationDidEnterBackground. The unsafe flavor is onApplicationDidEnterBackground .
C declaration
SDL_OnApplicationDidEnterBackground, defined at SDL3/SDL_system.h 738:34

Since: 3.2.0

onApplicationWillEnterForeground :: IO () Source #

Let iOS apps with external event handling report onApplicationWillEnterForeground.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_OnApplicationWillEnterForeground. The safe flavor is onApplicationWillEnterForegroundSafe .
C declaration
SDL_OnApplicationWillEnterForeground, defined at SDL3/SDL_system.h 755:34

Since: 3.2.0

onApplicationWillEnterForegroundSafe :: IO () Source #

Let iOS apps with external event handling report onApplicationWillEnterForeground.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_OnApplicationWillEnterForeground. The unsafe flavor is onApplicationWillEnterForeground .
C declaration
SDL_OnApplicationWillEnterForeground, defined at SDL3/SDL_system.h 755:34

Since: 3.2.0

onApplicationDidEnterForeground :: IO () Source #

Let iOS apps with external event handling report onApplicationDidBecomeActive.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_OnApplicationDidEnterForeground. The safe flavor is onApplicationDidEnterForegroundSafe .
C declaration
SDL_OnApplicationDidEnterForeground, defined at SDL3/SDL_system.h 772:34

Since: 3.2.0

onApplicationDidEnterForegroundSafe :: IO () Source #

Let iOS apps with external event handling report onApplicationDidBecomeActive.

This functions allows iOS apps that have their own event handling to hook into SDL to generate SDL events. This maps directly to an iOS-specific event, but since it doesn't do anything iOS-specific internally, it is available on all platforms, in case it might be useful for some specific paradigm. Most apps do not need to use this directly; SDL's internal event code will handle all this for windows created by createWindow!

Thread safety
It is safe to call this function from any thread.

sdl3-bindgen-sys notes

Expand
FFI safety
Safe foreign import of SDL_OnApplicationDidEnterForeground. The unsafe flavor is onApplicationDidEnterForeground .
C declaration
SDL_OnApplicationDidEnterForeground, defined at SDL3/SDL_system.h 772:34

Since: 3.2.0