zenilib: zenilib/jni/external/sdl/src/SDL_hints.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Typedefs | Functions | Variables
SDL_hints.c File Reference
`#include "SDL_config.h"`
`#include "SDL_hints.h"`
`#include "SDL_error.h"`

Go to the source code of this file.

## Typedefs

typedef struct SDL_Hint | SDL_Hint
typedef struct SDL_HintWatch | SDL_HintWatch

## Functions

void | SDL_AddHintCallback (const char *name, SDL_HintCallback callback, void *userdata)
void | SDL_ClearHints (void)
| Clear all hints. More...
void | SDL_DelHintCallback (const char *name, SDL_HintCallback callback, void *userdata)
| Remove a function watching a particular hint. More...
const char * | SDL_GetHint (const char *name)
| Get a hint. More...
SDL_bool | SDL_SetHint (const char *name, const char *value)
| Set a hint with normal priority. More...
SDL_bool | SDL_SetHintWithPriority (const char *name, const char *value, SDL_HintPriority priority)
| Set a hint with a specific priority. More...

## Variables

static SDL_Hint * | SDL_hints

## Typedef Documentation

typedef struct SDL_Hint SDL_Hint

typedef struct SDL_HintWatch SDL_HintWatch

## Function Documentation

void SDL_AddHintCallback | ( | const char * | name,
|  | SDL_HintCallback | callback,
|  | void * | userdata
| ) |  |

Definition at line 122 of file SDL_hints.c.

References NULL, SDL_DelHintCallback(), SDL_GetHint(), SDL_HINT_DEFAULT, SDL_hints, SDL_InvalidParamError, SDL_malloc(), SDL_strcmp(), and SDL_strdup().

Referenced by SDL_JoystickInit().

void SDL_ClearHints | ( | void |  | ) |

Clear all hints.

This function is called during SDL_Quit() to free stored hints.

Definition at line 197 of file SDL_hints.c.

References SDL_free(), and SDL_hints.

Referenced by SDL_Quit().

void SDL_DelHintCallback | ( | const char * | name,
|  | SDL_HintCallback | callback,
|  | void * | userdata
| ) |  |

Remove a function watching a particular hint.

Parameters

  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 172 of file SDL_hints.c.

References NULL, SDL_free(), and SDL_strcmp().

Referenced by SDL_AddHintCallback().

const char* SDL_GetHint | ( | const char * | name | ) |

Get a hint.

Returns
  The string value of a hint variable.

Definition at line 104 of file SDL_hints.c.

References env, SDL_getenv(), SDL_HINT_OVERRIDE, and SDL_strcmp().

Referenced by GetScaleQuality(), SDL_AddHintCallback(), SDL_CreateRenderer(), SDL_CreateWindow(), SDL_CreateWindowTexture(), SDL_GameControllerLoadHints(), SDL_ShouldAllowTopmost(), ShouldMinimizeOnFocusLoss(), and ShouldUseTextureFramebuffer().

SDL_bool SDL_SetHint | ( | const char * | name,
|  | const char * | value
| ) |  |

Set a hint with normal priority.

Returns
  SDL_TRUE if the hint was set, SDL_FALSE otherwise

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.

Returns
  SDL_TRUE if the hint was set, SDL_FALSE otherwise

Definition at line 47 of file SDL_hints.c.

References env, NULL, SDL_FALSE, SDL_free(), SDL_getenv(), SDL_HINT_OVERRIDE, SDL_hints, SDL_malloc(), SDL_strcmp(), SDL_strdup(), and SDL_TRUE.

Referenced by SDL_SetHint().

## Variable Documentation

SDL_Hint* SDL_hints

static

Definition at line 44 of file SDL_hints.c.

Referenced by SDL_AddHintCallback(), SDL_ClearHints(), and SDL_SetHintWithPriority().