SDL_CreateTray - Create an icon to be placed in the operating system's tray, or equivalent.
Contents
Availability
This function is available since SDL 3.2.0.
Description
Many platforms advise not using a system tray unless persistence is a necessary feature. Avoid needlessly
creating a tray icon, as the user may feel like it clutters their interface.
Using tray icons require the video subsystem.
Function Parameters
icon a surface to be used as icon. May be NULL.
tooltip
a tooltip to be displayed when the mouse hovers the icon in UTF-8 encoding. Not supported on all
platforms. May be NULL.
Name
SDL_CreateTray - Create an icon to be placed in the operating system's tray, or equivalent.
Return Value
Returns The newly created system tray icon.
See Also
SDL_CreateTrayMenu(3), SDL_GetTrayMenu(3), SDL_DestroyTray(3) Simple Directmedia Layer SDL 3.2.20 SDL_CreateTray(3)
Synopsis
#include<SDL3/SDL_tray.h>SDL_Tray*SDL_CreateTray(SDL_Surface*icon,constchar*tooltip);
Thread Safety
This function should only be called on the main thread.
