SDL_SetTrayIcon(3)
π SDL_SetTrayIcon π
okay bestie, welcome to the SDL_SetTrayIcon(3) page, from the SDL3 FUNCTIONS manual π«Ά this one's short and sweet and it's literally just "swap out the little picture in your system tray" energy. iconic. let's go β¨
β¨ NAME β¨
SDL_SetTrayIcon β updates the system tray icon's icon. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_tray.h>
void SDL_SetTrayIcon(SDL_Tray *tray, SDL_Surface *icon);
no return value, she just does it. main character behavior fr fr π
π FUNCTION PARAMETERS π
trayβ the tray icon that's getting updated. this is the one you're messing with πΌοΈiconβ the new icon. and yes, it may beNULL. so null is a legal vibe here, no cap π
π§΅ THREAD SAFETY π§΅
ok so this is the part where you have to be careful, bestie π this function should be called on the thread that created the tray. not a random thread. not your friend's thread. the thread. the one that made the tray. periodt π«π§΅
π¦ AVAILABILITY π¦
this one's been around since SDL 3.2.0 π so if you're on something older, sorry babe, she's not there yet π
β SEE ALSO β
SDL_CreateTray(3)β like, you kinda need a tray before you can set its icon, so maybe start there? just a thought ππ
and that's the whole page, gorgeous π this was the Simple Directmedia Layer crew, shipping SDL 3.4.18, and honestly? obsessed with them for it. go set some tray icons, you absolute legend π
β¨π¦
π¦ 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