| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Hints.FunPtr
Synopsis
- sDL_SetHintWithPriority :: FunPtr (PtrConst CChar -> PtrConst CChar -> SDL_HintPriority -> IO CBool)
- sDL_SetHint :: FunPtr (PtrConst CChar -> PtrConst CChar -> IO CBool)
- sDL_ResetHint :: FunPtr (PtrConst CChar -> IO CBool)
- sDL_ResetHints :: FunPtr (IO ())
- sDL_GetHint :: FunPtr (PtrConst CChar -> IO (PtrConst CChar))
- sDL_GetHintBoolean :: FunPtr (PtrConst CChar -> CBool -> IO CBool)
- sDL_AddHintCallback :: FunPtr (PtrConst CChar -> SDL_HintCallback -> Ptr Void -> IO CBool)
- sDL_RemoveHintCallback :: FunPtr (PtrConst CChar -> SDL_HintCallback -> Ptr Void -> IO ())
Documentation
sDL_SetHintWithPriority :: FunPtr (PtrConst CChar -> PtrConst CChar -> SDL_HintPriority -> IO CBool) Source #
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.
name- the hint to set.
value- the value of the hint variable.
priority- the
SDL_HintPrioritylevel for the hint. - 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 atSDL3/SDL_hints.h 4870:34
Since: 3.2.0
sDL_SetHint :: FunPtr (PtrConst CChar -> PtrConst CChar -> IO CBool) Source #
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.
name- the hint to set.
value- the value of the hint variable.
- 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 atSDL3/SDL_hints.h 4892:34
Since: 3.2.0
sDL_ResetHint :: FunPtr (PtrConst CChar -> IO CBool) Source #
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.
name- the hint to set.
- 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 atSDL3/SDL_hints.h 4912:34
Since: 3.2.0
sDL_ResetHints :: FunPtr (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 atSDL3/SDL_hints.h 4927:34
Since: 3.2.0
sDL_GetHint :: FunPtr (PtrConst CChar -> IO (PtrConst CChar)) Source #
Get the value of a hint.
name- the hint to query.
- 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 atSDL3/SDL_hints.h 4942:41
Since: 3.2.0
sDL_GetHintBoolean :: FunPtr (PtrConst CChar -> CBool -> IO CBool) Source #
Get the boolean value of a hint variable.
name- the name of the hint to get the boolean value from.
default_value- the value to return if the hint does not exist.
- 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 atSDL3/SDL_hints.h 4959:34
Since: 3.2.0
sDL_AddHintCallback :: FunPtr (PtrConst CChar -> SDL_HintCallback -> Ptr Void -> IO CBool) Source #
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.
name- the hint to watch.
callback- An
SDL_HintCallbackfunction that will be called when the hint value changes. userdata- a pointer to pass to the callback function.
- 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 atSDL3/SDL_hints.h 5002:34
Since: 3.2.0
sDL_RemoveHintCallback :: FunPtr (PtrConst CChar -> SDL_HintCallback -> Ptr Void -> IO ()) Source #
Remove a function watching a particular hint.
name- the hint being watched.
callback- an
SDL_HintCallbackfunction that will be called when the hint value changes. userdata- a pointer being passed to the callback function.
- Thread safety
- It is safe to call this function from any thread.
- See also
sDL_AddHintCallback- C declaration
SDL_RemoveHintCallback, defined atSDL3/SDL_hints.h 5018:34
Since: 3.2.0