SDL_TrayCallback(3type)
π SDL_TrayCallback π
okay bestie, welcome to the SDL_TrayCallback(3type) page, part of the SDL3 DATATYPES squad π«Ά this is a type, not a function, so don't go calling it like one, mwah π
β¨ NAME β¨
SDL_TrayCallback β a callback that gets invoked when a tray entry is selected. that's it, that's the whole job. it's giving "you got picked, now do something" π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_tray.h>
typedef void (SDLCALL *SDL_TrayCallback)(void *userdata, SDL_TrayEntry *entry);
look at her. a function pointer typedef. iconic. no cap π₯
π¦ FUNCTION PARAMETERS π¦
userdataβ an optional pointer, so you can pass extra data along to the callback when it actually gets invoked. want to smuggle your own little struct in there? that's the door πͺβ¨entryβ the tray entry that was selected. the one that got chosen. the main character of this exact moment π
π AVAILABILITY π
this datatype has been available since SDL 3.2.0. so if you're on something older... bestie, it's not there. it's literally not there π
π SEE ALSO π
SDL_SetTrayEntryCallback(3)β the way you actually attach one of these bad boys. go look, iykyk β¨
and that's the whole page, fr fr π
Simple Directmedia Layer Β· SDL 3.4.18 Β· SDL_TrayCallback(3type) β that's the source, the version, and the page name, all wrapped up with a bow π byeeee, go set some tray entry callbacks, you're gonna slay π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms