SDL_GetTrayEntries(3)

okay bestie, welcome to the SDL3 FUNCTIONS manual page for SDL_GetTrayEntries. it's giving tray menu lore and we are seated. πŸ’…

✨ NAME ✨

SDL_GetTrayEntries β€” returns a list of entries in the menu, in order. no cap, it's literally just that. πŸŽ€

🌸 SYNOPSIS 🌸

you need this include first, bestie:

#include <SDL3/SDL_tray.h>

and the function itself is:

const SDL_TrayEntry ** SDL_GetTrayEntries(SDL_TrayMenu *menu, int *count);

🫢 FUNCTION PARAMETERS 🫢

  • menu β€” the menu you're getting entries from. it's the main character here. πŸ‘‘
  • count β€” an optional pointer to obtain the number of entries in the menu. if you pass it, it gets filled in with the count. if not, no biggie. ✨

πŸ’– RETURN VALUE πŸ’–

okay so the original manpage has a lil stray ) right at the start of this section β€” we're keeping it because details are sacred, but the actual tea is:

) Returns a NULL-terminated list of entries within the given menu.

⚠️ the pointer becomes invalid when any function that inserts or deletes entries in the menu is called. so don't hold onto it like it's your emotional support pointer, bestie. 😭

🧚 THREAD SAFETY 🧚

This function should be called on the thread that created the tray. periodt. don't try to be cute and call it from a different thread, because the vibes will be off. πŸ’€

πŸ‘‘ AVAILABILITY πŸ‘‘

This function is available since SDL 3.2.0. so if you're on older SDL, it's not giving what you need. 🫠

🌈 SEE ALSO 🌈

go read these too, iykyk:


that's the whole page, bestie. it comes from Simple Directmedia Layer, version SDL 3.4.18, and the manual page is SDL_GetTrayEntries(3). stay iconic, hydrate, and may your tray entries always be in order. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from