SDL_GetTrayMenu(3)

πŸ’– SDL_GetTrayMenu πŸ’–

okay bestie, this one's from the SDL3 functions crew β€” it's the little getter that hands you back a tray menu you already made. no cap, that's the whole vibe. πŸŽ€


✨ NAME ✨

SDL_GetTrayMenu β€” gets a previously created tray menu. that's it, that's the job. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_tray.h>

SDL_TrayMenu * SDL_GetTrayMenu(SDL_Tray *tray);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the lore: you should have already called SDL_CreateTrayMenu() on the tray object. this function is literally just the "hey, can I see that again?" button β€” it lets you fetch it again later. lowkey it's a lil reunion. 🫢

the way that this is the same thing as SDL_GetTraySubmenu(), except it takes a SDL_Tray instead of a SDL_TrayEntry? iconic. same energy, different input type, iykyk. ✨

and here's the part that's actually a relief: a menu does not need to be destroyed. it will be destroyed with the tray. so no manual cleanup arc for you, the tray handles it. periodt. πŸ’…


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • tray β€” the tray entry to bind the menu to.

⭐ RETURN VALUE ⭐

returns the newly created menu. that's your menu, bestie, go be a main character with it. πŸ‘‘


🧡 THREAD SAFETY 🧡

this function should be called on the thread that created the tray. like, same thread, same energy, no jumping around. 🌈


🌟 AVAILABILITY 🌟

this function is available since SDL 3.2.0. ✨


πŸ’œ SEE ALSO πŸ’œ


okay so that's the whole page!! this lil cutie comes to you from the Simple Directmedia Layer squad, version SDL 3.4.18, and it's SDL_GetTrayMenu(3) forever and ever. go get your menu back, you absolute legend. πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from