sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.ErrorShims.FunPtr

Synopsis

Documentation

lithon_SDL_SetError :: FunPtr (PtrConst CChar -> IO CBool) Source #

Set the SDL error message for the current thread.

A fixed-arity shim over the variadic SDL_SetError: message becomes the error message verbatim. It is never parsed as a printf-style format string, so a percent sign in it needs no escaping.

Calling this function will replace any previous error message that was set. It always returns false, since SDL frequently uses false to signify a failing result.

message
the error message, in UTF-8.
Returns
false.
Thread safety
It is safe to call this function from any thread.
See also
SDL_ClearError, SDL_GetError
C declaration
lithon_SDL_SetError, defined at sdl3-bindgen-sys/SDL_error_shims.h 45:24

Since: 3.2.0

lithon_SDL_Unsupported :: FunPtr (IO CBool) Source #

Report an unsupported operation with SDL's standard error message.

The SDL_Unsupported macro as a function: it sets the error message to "That operation is not supported".

Returns
false.
Thread safety
It is safe to call this function from any thread.
See also
SDL_SetError
C declaration
lithon_SDL_Unsupported, defined at sdl3-bindgen-sys/SDL_error_shims.h 64:24

Since: 3.2.0

lithon_SDL_InvalidParamError :: FunPtr (PtrConst CChar -> IO CBool) Source #

Report an invalid parameter with SDL's standard error message.

The SDL_InvalidParamError macro as a function: it sets the error message to "Parameter 'name' is invalid", with the parameter's name in place of name.

param
the name of the invalid parameter, in UTF-8.
Returns
false.
Thread safety
It is safe to call this function from any thread.
See also
SDL_SetError
C declaration
lithon_SDL_InvalidParamError, defined at sdl3-bindgen-sys/SDL_error_shims.h 84:24

Since: 3.2.0