| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.System
Contents
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
- module SDL3.Sys.Bindgen.System
- setX11EventHook :: SDL_X11EventHook -> Ptr Void -> IO ()
- setX11EventHookSafe :: SDL_X11EventHook -> Ptr Void -> IO ()
- setLinuxThreadPriority :: Int64 -> Int32 -> IO Bool
- setLinuxThreadPrioritySafe :: Int64 -> Int32 -> IO Bool
- setLinuxThreadPriorityAndPolicy :: Int64 -> Int32 -> Int32 -> IO Bool
- setLinuxThreadPriorityAndPolicySafe :: Int64 -> Int32 -> Int32 -> IO Bool
- isTablet :: IO Bool
- isTabletSafe :: IO Bool
- isTV :: IO Bool
- isTVSafe :: IO Bool
- getSandbox :: IO SDL_Sandbox
- getSandboxSafe :: IO SDL_Sandbox
- onApplicationWillTerminate :: IO ()
- onApplicationWillTerminateSafe :: IO ()
- onApplicationDidReceiveMemoryWarning :: IO ()
- onApplicationDidReceiveMemoryWarningSafe :: IO ()
- onApplicationWillEnterBackground :: IO ()
- onApplicationWillEnterBackgroundSafe :: IO ()
- onApplicationDidEnterBackground :: IO ()
- onApplicationDidEnterBackgroundSafe :: IO ()
- onApplicationWillEnterForeground :: IO ()
- onApplicationWillEnterForegroundSafe :: IO ()
- onApplicationDidEnterForeground :: IO ()
- onApplicationDidEnterForegroundSafe :: IO ()
Documentation
module SDL3.Sys.Bindgen.System
Function aliases
Arguments
| :: SDL_X11EventHook |
|
| -> Ptr Void |
|
| -> 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
- FFI safety
- Unsafe foreign import of
SDL_SetX11EventHook. The safe flavor issetX11EventHookSafe: registration; the hook runs during event pumping. - C declaration
SDL_SetX11EventHook, defined atSDL3/SDL_system.h 178:34
Since: 3.2.0
Arguments
| :: SDL_X11EventHook |
|
| -> Ptr Void |
|
| -> 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
- FFI safety
- Safe foreign import of
SDL_SetX11EventHook. The unsafe flavor issetX11EventHook: registration; the hook runs during event pumping. - C declaration
SDL_SetX11EventHook, defined atSDL3/SDL_system.h 178:34
Since: 3.2.0
setLinuxThreadPriority Source #
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetLinuxThreadPriority. The safe flavor issetLinuxThreadPrioritySafe. - 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 atSDL3/SDL_system.h 197:34
setLinuxThreadPrioritySafe Source #
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetLinuxThreadPriority. The unsafe flavor issetLinuxThreadPriority. - 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 atSDL3/SDL_system.h 197:34
setLinuxThreadPriorityAndPolicy Source #
Arguments
| :: Int64 |
|
| -> Int32 |
|
| -> Int32 |
|
| -> IO Bool |
sdl3-bindgen-sys notes
- FFI safety
- Unsafe foreign import of
SDL_SetLinuxThreadPriorityAndPolicy. The safe flavor issetLinuxThreadPriorityAndPolicySafe. - 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 atSDL3/SDL_system.h 215:34
setLinuxThreadPriorityAndPolicySafe Source #
Arguments
| :: Int64 |
|
| -> Int32 |
|
| -> Int32 |
|
| -> IO Bool |
sdl3-bindgen-sys notes
- FFI safety
- Safe foreign import of
SDL_SetLinuxThreadPriorityAndPolicy. The unsafe flavor issetLinuxThreadPriorityAndPolicy. - 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 atSDL3/SDL_system.h 215:34
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
- FFI safety
- Unsafe foreign import of
SDL_IsTablet. The safe flavor isisTabletSafe. - 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 atSDL3/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
- FFI safety
- Safe foreign import of
SDL_IsTablet. The unsafe flavor isisTablet. - 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 atSDL3/SDL_system.h 630:34
Since: 3.2.0
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
- FFI safety
- Unsafe foreign import of
SDL_IsTV. The safe flavor isisTVSafe. - 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 atSDL3/SDL_system.h 643:34
Since: 3.2.0
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
- FFI safety
- Safe foreign import of
SDL_IsTV. The unsafe flavor isisTV. - 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 atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_GetSandbox. The safe flavor isgetSandboxSafe. - C declaration
SDL_GetSandbox, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_GetSandbox. The unsafe flavor isgetSandbox. - C declaration
SDL_GetSandbox, defined atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_OnApplicationWillTerminate. The safe flavor isonApplicationWillTerminateSafe. - C declaration
SDL_OnApplicationWillTerminate, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_OnApplicationWillTerminate. The unsafe flavor isonApplicationWillTerminate. - C declaration
SDL_OnApplicationWillTerminate, defined atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_OnApplicationDidReceiveMemoryWarning. The safe flavor isonApplicationDidReceiveMemoryWarningSafe. - C declaration
SDL_OnApplicationDidReceiveMemoryWarning, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_OnApplicationDidReceiveMemoryWarning. The unsafe flavor isonApplicationDidReceiveMemoryWarning. - C declaration
SDL_OnApplicationDidReceiveMemoryWarning, defined atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_OnApplicationWillEnterBackground. The safe flavor isonApplicationWillEnterBackgroundSafe. - C declaration
SDL_OnApplicationWillEnterBackground, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_OnApplicationWillEnterBackground. The unsafe flavor isonApplicationWillEnterBackground. - C declaration
SDL_OnApplicationWillEnterBackground, defined atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_OnApplicationDidEnterBackground. The safe flavor isonApplicationDidEnterBackgroundSafe. - C declaration
SDL_OnApplicationDidEnterBackground, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_OnApplicationDidEnterBackground. The unsafe flavor isonApplicationDidEnterBackground. - C declaration
SDL_OnApplicationDidEnterBackground, defined atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_OnApplicationWillEnterForeground. The safe flavor isonApplicationWillEnterForegroundSafe. - C declaration
SDL_OnApplicationWillEnterForeground, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_OnApplicationWillEnterForeground. The unsafe flavor isonApplicationWillEnterForeground. - C declaration
SDL_OnApplicationWillEnterForeground, defined atSDL3/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
- FFI safety
- Unsafe foreign import of
SDL_OnApplicationDidEnterForeground. The safe flavor isonApplicationDidEnterForegroundSafe. - C declaration
SDL_OnApplicationDidEnterForeground, defined atSDL3/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
- FFI safety
- Safe foreign import of
SDL_OnApplicationDidEnterForeground. The unsafe flavor isonApplicationDidEnterForeground. - C declaration
SDL_OnApplicationDidEnterForeground, defined atSDL3/SDL_system.h 772:34
Since: 3.2.0