sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Hints.Unsafe

Synopsis

Documentation

sDL_SetHintWithPriority Source #

Arguments

:: PtrConst CChar
name
the hint to set.
-> PtrConst CChar
value
the value of the hint variable.
-> SDL_HintPriority
priority
the SDL_HintPriority level for the hint.
-> IO CBool 

Set a hint with a specific priority.

The priority controls the behavior when setting a hint that already has a value. Hints will replace existing hints of their priority and lower. Environment variables are considered to have override priority.

Returns
true on success or false on failure; call SDL_GetError() for more information.
Thread safety
It is safe to call this function from any thread.
See also
sDL_GetHint, sDL_ResetHint, sDL_SetHint
C declaration
SDL_SetHintWithPriority, defined at SDL3/SDL_hints.h 4870:34

Since: 3.2.0

sDL_SetHint Source #

Arguments

:: PtrConst CChar
name
the hint to set.
-> PtrConst CChar
value
the value of the hint variable.
-> IO CBool 

Set a hint with normal priority.

Hints will not be set if there is an existing override hint or environment variable that takes precedence. You can use SDL_SetHintWithPriority() to set the hint with override priority instead.

Returns
true on success or false on failure; call SDL_GetError() for more information.
Thread safety
It is safe to call this function from any thread.
See also
sDL_GetHint, sDL_ResetHint, sDL_SetHintWithPriority
C declaration
SDL_SetHint, defined at SDL3/SDL_hints.h 4892:34

Since: 3.2.0

sDL_ResetHint Source #

Arguments

:: PtrConst CChar
name
the hint to set.
-> IO CBool 

Reset a hint to the default value.

This will reset a hint to the value of the environment variable, or NULL if the environment isn't set. Callbacks will be called normally with this change.

Returns
true on success or false on failure; call SDL_GetError() for more information.
Thread safety
It is safe to call this function from any thread.
See also
sDL_SetHint, sDL_ResetHints
C declaration
SDL_ResetHint, defined at SDL3/SDL_hints.h 4912:34

Since: 3.2.0

sDL_ResetHints :: IO () Source #

Reset all hints to the default values.

This will reset all hints to the value of the associated environment variable, or NULL if the environment isn't set. Callbacks will be called normally with this change.

Thread safety
It is safe to call this function from any thread.
See also
sDL_ResetHint
C declaration
SDL_ResetHints, defined at SDL3/SDL_hints.h 4927:34

Since: 3.2.0

sDL_GetHint Source #

Arguments

:: PtrConst CChar
name
the hint to query.
-> IO (PtrConst CChar) 

Get the value of a hint.

Returns
the string value of a hint or NULL if the hint isn't set.
Thread safety
It is safe to call this function from any thread.
See also
sDL_SetHint, sDL_SetHintWithPriority
C declaration
SDL_GetHint, defined at SDL3/SDL_hints.h 4942:41

Since: 3.2.0

sDL_GetHintBoolean Source #

Arguments

:: PtrConst CChar
name
the name of the hint to get the boolean value from.
-> CBool
default_value
the value to return if the hint does not exist.
-> IO CBool 

Get the boolean value of a hint variable.

Returns
the boolean value of a hint or the provided default value if the hint does not exist.
Thread safety
It is safe to call this function from any thread.
See also
sDL_GetHint, sDL_SetHint
C declaration
SDL_GetHintBoolean, defined at SDL3/SDL_hints.h 4959:34

Since: 3.2.0

sDL_AddHintCallback Source #

Arguments

:: PtrConst CChar
name
the hint to watch.
-> SDL_HintCallback
callback
An SDL_HintCallback function that will be called when the hint value changes.
-> Ptr Void
userdata
a pointer to pass to the callback function.
-> IO CBool 

Add a function to watch a particular hint.

The callback function is called during this function, to provide it an initial value, and again each time the hint's value changes.

Returns
true on success or false on failure; call SDL_GetError() for more information.
Thread safety
It is safe to call this function from any thread.
See also
sDL_RemoveHintCallback
C declaration
SDL_AddHintCallback, defined at SDL3/SDL_hints.h 5002:34

Since: 3.2.0

sDL_RemoveHintCallback Source #

Arguments

:: PtrConst CChar
name
the hint being watched.
-> SDL_HintCallback
callback
an SDL_HintCallback function that will be called when the hint value changes.
-> Ptr Void
userdata
a pointer being passed to the callback function.
-> IO () 

Remove a function watching a particular hint.

Thread safety
It is safe to call this function from any thread.
See also
sDL_AddHintCallback
C declaration
SDL_RemoveHintCallback, defined at SDL3/SDL_hints.h 5018:34

Since: 3.2.0