SDL_GetTrayMenuParentEntry(3)
β¨ SDL_GetTrayMenuParentEntry β¨
okay bestie, welcome to SDL_GetTrayMenuParentEntry(3) β yes it's a mouthful, yes it's from the SDL3 functions squad, and yes it's about to make your tray menus make sense π
π NAME π
SDL_GetTrayMenuParentEntry β the girl who tells you which entry a menu is a submenu of, when that menu is, in fact, a submenu. no cap, that's the whole job π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_tray.h>
SDL_TrayEntry * SDL_GetTrayMenuParentEntry(SDL_TrayMenu *menu);
π DESCRIPTION π
so here's the vibe check: for literally any given menu, either this function or SDL_GetTrayMenuParentTray() is gonna hand you a non-NULL back. one of them always comes through, bestie. that's the whole dynamic β a menu either has a parent tray, or it's living its submenu life nested under an entry, and this function is the one that catches the submenu case π
π«Ά FUNCTION PARAMETERS π«Ά
menuβ the menu you're asking about, i.e. the menu for which to get the parent entry. it's giving "who's your parent, babe" π
β RETURN VALUE β
Returns the parent entry, or NULL if this menu is not a submenu. no submenu, no parent entry, no drama. the NULL is not a bug, it's just her being honest with you π
π₯ THREAD SAFETY π₯
this one has RULES, bestie: call it on the thread that created the tray. periodt. don't be out here calling it from a random thread and then acting surprised π
π AVAILABILITY π
this function has been serving looks since SDL 3.2.0. iconic behavior, honestly π
π SEE ALSO π
iykyk, go read those next π§
mwah π that's a wrap β brought to you by the Simple Directmedia Layer girlies, page version SDL 3.4.18. slay, 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