SDL_SetTrayEntryChecked(3)

✨ NAME ✨

SDL_SetTrayEntryChecked β€” bestie, this is the one that ticks the little checkbox in your system tray πŸ’– it sets whether or not an entry is checked.

(also hello, you're reading a page from the SDL3 FUNCTIONS collection, in case the vibe check needed confirming 🫢)


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_tray.h>

void SDL_SetTrayEntryChecked(SDL_TrayEntry *entry, bool checked);

πŸŽ€ DESCRIPTION πŸŽ€

So like… this function flips the checked-ness of a tray entry. Checked? Not checked? You decide, queen πŸ‘‘

⚠️ Okay but listen: the entry must have been created with the SDL_TRAYENTRY_CHECKBOX flag. If it wasn't, this is not the function for you, no cap. Only checkbox entries get to be checked πŸ’…

πŸ¦‹ FUNCTION PARAMETERS πŸ¦‹

  • entry β€” the entry to be updated. That's the little guy getting its glow-up ✨
  • checked β€” true if the entry should be checked; false otherwise. Binary. Iconic. That's it, that's the choice 🌈

πŸ’œ THREAD SAFETY πŸ’œ

This function should be called on the thread that created the tray. Like, the tray has a home thread and it gets separation anxiety, so don't go calling this from somewhere else 😭 same thread, always 🫢


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. If you're on something older, it's giving "not yet, babe" πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole page, you ate that reading session fr fr πŸ‘‘ this was brought to you by the Simple Directmedia Layer girlies, SDL 3.4.18 edition, dated whenever this shipped bestie πŸ’– go forth and check those boxes, main character πŸŒΈπŸ¦‹πŸ’…

πŸ“¦ where this page comes from