sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Platform

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

Function aliases

getPlatform :: IO (PtrConst CChar) Source #

sdl3-bindgen-sys notes

Expand
FFI safety
Unsafe foreign import of SDL_GetPlatform. The safe import is not exported : returns a compiled-in constant; cannot block, lock, or call back.
C declaration
SDL_GetPlatform, defined at SDL3/SDL_platform.h 58:42