SDL_GetTrayEntryLabel(3)

πŸ’– SDL_GetTrayEntryLabel(3) β€” the SDL3 FUNCTIONS girlies' guide πŸ’–

okay so bestie, you're in the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_GetTrayEntryLabel. it does exactly one job and it does it slayfully. let's go 🫢


✨ NAME ✨

SDL_GetTrayEntryLabel β€” Gets the label of an entry.

like. that's it. that's the whole vibe. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_tray.h>

const char * SDL_GetTrayEntryLabel(SDL_TrayEntry *entry);

no cap, that's the whole signature. one param, one return, zero drama 🌸


✨ DESCRIPTION ✨

so here's the tea, and it's important tea: if the returned value is NULL, the entry is a separator.

that's the entire lore. a NULL back means "bestie this isn't a real clickable entry, it's a lil divider line" 😭


✨ FUNCTION PARAMETERS ✨

  • entry β€” the entry to be read. that's the one you're peeking at πŸ‘€

✨ RETURN VALUE ✨

returns the label of the entry, encoded in UTF-8. πŸ¦‹

(and remember from up top: NULL = separator. lowkey the most important thing on this whole page.)


✨ THREAD SAFETY ✨

okay this one's a rule, not a suggestion: this function should be called on the thread that created the tray. don't be out here calling it from some random thread, the tray will not be having it πŸ’€


✨ AVAILABILITY ✨

this function is available since SDL 3.2.0. so if you're on anything older, it's giving "not yet, babe" πŸ™ˆ


✨ SEE ALSO ✨

go read those too, they're all in the same friend group πŸ’œ


and that's the whole page, bestie!! this lil legend lives in Simple Directmedia Layer, documented for SDL 3.4.18 β€” mwah, take care of your tray entries and stay hydrated πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from