| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Platform
Contents
Description
SDL provides a means to identify the app's platform, both at compile time and runtime. Get the name of the platform.
Here are the names returned for some (but not all) supported platforms:
- "Windows"
- "macOS"
- "Linux"
- "iOS"
- "Android"
- Returns
- the name of the platform. If the correct platform name is not available, returns a string beginning with the text "Unknown".
- Thread safety
- It is safe to call this function from any thread.
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.Platform.Unsafe); functions curated unsafe-only export only the unsuffixed one. Each alias's documentation records its flavor and rationale.
Full conventions: SDL3.Sys.
Since: 3.2.0
Synopsis
- getPlatform :: IO (PtrConst CChar)