---
name: "SDL_TrayCallback"
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_TrayCallback"
---

# SDL\_TrayCallback(3type)

A callback that is invoked when a tray entry is selected.

## NAME

SDL\_TrayCallback - A callback that is invoked when a tray entry is selected.

## HEADER FILE

Defined in SDL3/SDL\_tray.h

## SYNOPSIS

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

**typedef void (SDLCALL \*SDL\_TrayCallback)(void \*userdata, SDL\_TrayEntry \*entry);**

## FUNCTION PARAMETERS

- *userdata*

  an optional pointer to pass extra data to the callback when it will be invoked.

- *entry*

  the tray entry that was selected.

## AVAILABILITY

This datatype is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_SetTrayEntryCallback**(3)](/SDL_SetTrayEntryCallback/3.md)
