---
name: "SDL_HintCallback"
section: "3type"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_HintCallback"
---

# SDL\_HintCallback(3type)

A callback used to send notifications of hint value changes.

## NAME

SDL\_HintCallback - A callback used to send notifications of hint value changes.

## HEADER FILE

Defined in SDL3/SDL\_hints.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**typedef void(SDLCALL \*SDL\_HintCallback)(void \*userdata, const char \*name, const char \*oldValue, const char \*newValue);**

## DESCRIPTION

This is called an initial time during

**SDL\_AddHintCallback**\
  with the hint's current value, and then again each time the hint's value changes.

## FUNCTION PARAMETERS

- *userdata*

  what was passed as **userdata** to  **SDL\_AddHintCallback** ().

- *name*

  what was passed as **name** to  **SDL\_AddHintCallback** ().

- *oldValue*

  the previous hint value.

- *newValue*

  the new value hint is to be set to.

## THREAD SAFETY

This callback is fired from whatever thread is setting a new hint value. SDL holds a lock on the hint subsystem when calling this callback.

## AVAILABILITY

This datatype is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_AddHintCallback**(3)](/SDL_AddHintCallback/3.md)
