SDL_GetTraySubmenu(3)
π SDL_GetTraySubmenu(3) π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we talk about getting your lil tray submenu back π
β¨ NAME β¨
SDL_GetTraySubmenu</puruple> β gets a previously created tray entry submenu. no cap, that's the whole job π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_tray.h>
SDL_TrayMenu * SDL_GetTraySubmenu(SDL_TrayEntry *entry);
π¦ DESCRIPTION π¦
so here's the vibe: at some point you should have called SDL_CreateTraySubmenu() on the entry object. like, that's the prerequisite, queen π. and this function? it lets you fetch it again later. that's it, that's the whole thing.
this function does the same thing as SDL_GetTrayMenu(), except β and this is the plot twist β it takes a SDL_TrayEntry instead of a SDL_Tray. the way that it's literally the same energy but with a different type π
and here's the good news, the part that's giving stress-free:
a menu does not need to be destroyed. it will be destroyed with the tray. so don't you dare go freeing it yourself, bestie π«Ά
π FUNCTION PARAMETERS π
entryβ the tray entry to bind the menu to.
β RETURN VALUE β
returns the newly created menu. periodt. β¨
π₯ THREAD SAFETY π₯
this function should be called on the thread that created the tray. so like, same thread, no games, iykyk π§
π AVAILABILITY π
this function is available since SDL 3.2.0. iconic behavior honestly π
π SEE ALSO π
and that's a wrap on our lil tray submenu moment π this cutie came to you courtesy of Simple Directmedia Layer, straight out of the SDL 3.4.18 era, filed under SDL3 FUNCTIONS. slay, go build something cute, and remember: the tray destroys the menu, not you. bye bestie π¦πΈπ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms