SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_CreateTray

Create an icon to be placed in the operating system's tray, or equivalent.

Header File

Defined in <SDL3/SDL_tray.h>

Syntax

SDL_Tray* SDL_CreateTray(SDL_Surface *icon, const char *tooltip);

Function Parameters

SDL_Surface * icon a surface to be used as icon. May be NULL.
const char * tooltip a tooltip to be displayed when the mouse hovers the icon. Not supported on all platforms. May be NULL.

Return Value

(SDL_Tray *) Returns The newly created system tray icon.

Remarks

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.

Version

This function is available since SDL 3.2.0.

See Also


CategoryAPI, CategoryAPIFunction, CategoryTray


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.