SDL_GetTrayMenuParentTray(3)

🌸 NAME 🌸

SDL_GetTrayMenuParentTray β€” bestie, this one grabs the tray that this menu is the first-level menu of... but only if the menu you're holding isn't a submenu. iykyk πŸ’…

(also hi yes this is from the SDL3 manual, the SDL3 FUNCTIONS corner of the internet, we're home 🫢)


✨ SYNOPSIS ✨

#include <SDL3/SDL_tray.h>

SDL_Tray * SDL_GetTrayMenuParentTray(SDL_TrayMenu *menu);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. for any menu you've got, exactly one of these two functions is gonna hand you a non-NULL answer: this one, or SDL_GetTrayMenuParentEntry(). not both, not neither. it's giving "pick a lane, one of us has your back" πŸ’–


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • menu β€” the menu whose parent tray you're tryna find. like, "hey who's your tray bestie" πŸ₯Ί

πŸ‘‘ RETURN VALUE πŸ‘‘

returns the parent tray πŸŽ‰ ...or NULL if this menu is actually a submenu, in which case sorry babe, this function isn't your girl πŸ™ˆ


🧚 THREAD SAFETY 🧚

call this on the same thread that created the tray. no cap. don't be out here threading chaos into your tray menus, that's not the vibe 🌈

⭐ AVAILABILITY ⭐

this beauty has been around since SDL 3.2.0 ✨


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, bestie!! this little slice of the manual is brought to you by Simple Directmedia Layer, version SDL 3.4.18 β€” go forth, find those parent trays, and slay πŸ’…πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from