SDL_CreateTraySubmenu(3)
π SDL_CreateTraySubmenu π
okay bestie, welcome to the SDL3 FUNCTIONS page for SDL_CreateTraySubmenu(3) β yes that's the manual section number, she's fancy like that. let's get into it β¨
πΈ NAME πΈ
SDL_CreateTraySubmenu β Create a submenu for a system tray entry.
like, a menu inside a menu. nesting era. πͺ
π SYNOPSIS π
#include <SDL3/SDL_tray.h>
SDL_TrayMenu * SDL_CreateTraySubmenu(SDL_TrayEntry *entry);
β¨ DESCRIPTION β¨
okay so. this one should be called at most once per tray entry. one entry, one submenu. that's the whole vibe. don't be greedy π
this function does the same thing as SDL_CreateTrayMenu, except that it takes a SDL_TrayEntry instead of a SDL_Tray. same energy, different argument type, iykyk.
and here's the best part: a menu does not need to be destroyed. it gets destroyed with the tray. no cleanup arc, no manual free, no nothing. it's giving "the tray handles it, you just live your life" π¦
π«Ά FUNCTION PARAMETERS π«Ά
entryβ the tray entry to bind the menu to. that's her. that's the one getting a whole submenu attached. iconic behavior honestly π
β RETURN VALUE β
Returns the newly created menu. brand new, fresh out of the oven, ready to be filled with stuff π
π§ THREAD SAFETY π§
this function should be called on the thread that created the tray. not a different thread, bestie. same thread. the tray's thread. periodt. don't cross the streams π
π AVAILABILITY π
this function is available since SDL 3.2.0. so if you're on anything older, sorry babe, no submenu for you π
π SEE ALSO π
lowkey a whole submenu system living inside your system tray. main character energy fr fr π
okay that's the page!! this one was brought to you by Simple Directmedia Layer, version SDL 3.4.18 β go make a tray, make a submenu, make it cute. 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