Skip to main content

SDL_CreateTrayMenu

Function SDL_CreateTrayMenu 

Source
pub unsafe extern "C" fn SDL_CreateTrayMenu(
    tray: *mut SDL_Tray,
) -> *mut SDL_TrayMenu
Expand description

Create a menu for a system tray.

This should be called at most once per tray icon.

This function does the same thing as SDL_CreateTraySubmenu(), except that it takes a SDL_Tray instead of a SDL_TrayEntry.

A menu does not need to be destroyed; it will be destroyed with the tray.

Parameter: tray the tray to bind the menu to. Returns: the newly created menu.

Thread Safety: This function should be called on the thread that created the tray.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_CreateTray See Also: SDL_GetTrayMenu See Also: SDL_GetTrayMenuParentTray