|
SDL
2.0
|
Include dependency graph for SDL_hints.c:Go to the source code of this file.
Data Structures | |
| struct | SDL_HintWatch |
| struct | SDL_Hint |
Functions | |
| SDL_bool | SDL_SetHintWithPriority (const char *name, const char *value, SDL_HintPriority priority) |
| Set a hint with a specific priority. More... | |
| SDL_bool | SDL_SetHint (const char *name, const char *value) |
| Set a hint with normal priority. More... | |
| const char * | SDL_GetHint (const char *name) |
| Get a hint. More... | |
| void | SDL_AddHintCallback (const char *name, SDL_HintCallback callback, void *userdata) |
| void | SDL_DelHintCallback (const char *name, SDL_HintCallback callback, void *userdata) |
| Remove a function watching a particular hint. More... | |
| void | SDL_ClearHints (void) |
| Clear all hints. More... | |
Variables | |
| static SDL_Hint * | SDL_hints |
| void SDL_AddHintCallback | ( | const char * | name, |
| SDL_HintCallback | callback, | ||
| void * | userdata | ||
| ) |
Definition at line 122 of file SDL_hints.c.
References SDL_HintWatch::callback, SDL_Hint::callbacks, SDL_Hint::name, SDL_HintWatch::next, SDL_Hint::next, NULL, SDL_Hint::priority, SDL_DelHintCallback(), SDL_free(), SDL_GetHint(), SDL_HINT_DEFAULT, SDL_hints, SDL_InvalidParamError, SDL_malloc, SDL_OutOfMemory, SDL_strcmp, SDL_strdup, SDL_HintWatch::userdata, and SDL_Hint::value.
Clear all hints.
This function is called during SDL_Quit() to free stored hints.
Definition at line 203 of file SDL_hints.c.
References SDL_Hint::callbacks, SDL_Hint::name, SDL_HintWatch::next, SDL_Hint::next, SDL_free(), SDL_hints, and SDL_Hint::value.
| void SDL_DelHintCallback | ( | const char * | name, |
| SDL_HintCallback | callback, | ||
| void * | userdata | ||
| ) |
Remove a function watching a particular hint.
| name | The hint being watched |
| callback | The function being called when the hint value changes |
| userdata | A pointer being passed to the callback function |
Definition at line 178 of file SDL_hints.c.
References SDL_HintWatch::callback, SDL_Hint::callbacks, SDL_Hint::name, SDL_HintWatch::next, SDL_Hint::next, NULL, SDL_free(), SDL_strcmp, and SDL_HintWatch::userdata.
Referenced by SDL_AddHintCallback().
| const char* SDL_GetHint | ( | const char * | name | ) |
Get a hint.
Definition at line 104 of file SDL_hints.c.
References SDL_Hint::name, SDL_Hint::next, SDL_Hint::priority, SDL_getenv, SDL_HINT_OVERRIDE, SDL_strcmp, and SDL_Hint::value.
Referenced by SDL_AddHintCallback().
| SDL_bool SDL_SetHint | ( | const char * | name, |
| const char * | value | ||
| ) |
Set a hint with normal priority.
Definition at line 98 of file SDL_hints.c.
References SDL_HINT_NORMAL, and SDL_SetHintWithPriority().
| SDL_bool SDL_SetHintWithPriority | ( | const char * | name, |
| const char * | value, | ||
| SDL_HintPriority | priority | ||
| ) |
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.
Definition at line 47 of file SDL_hints.c.
References SDL_HintWatch::callback, SDL_Hint::callbacks, SDL_Hint::name, SDL_HintWatch::next, SDL_Hint::next, NULL, SDL_Hint::priority, SDL_FALSE, SDL_free(), SDL_getenv, SDL_HINT_OVERRIDE, SDL_hints, SDL_malloc, SDL_strcmp, SDL_strdup, SDL_TRUE, SDL_HintWatch::userdata, and SDL_Hint::value.
Referenced by SDL_SetHint().
|
static |
Definition at line 44 of file SDL_hints.c.
Referenced by SDL_AddHintCallback(), SDL_ClearHints(), and SDL_SetHintWithPriority().