Skip to main content

SDL_CreateTray

Function SDL_CreateTray 

Source
pub unsafe extern "C" fn SDL_CreateTray(
    icon: *mut SDL_Surface,
    tooltip: *const c_char,
) -> *mut SDL_Tray
Expand description

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

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.

Parameter: icon a surface to be used as icon. May be NULL. Parameter: tooltip a tooltip to be displayed when the mouse hovers the icon in UTF-8 encoding. Not supported on all platforms. May be NULL. Returns: The newly created system tray icon.

Thread Safety: This function should only be called on the main thread.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_CreateTrayWithProperties See Also: SDL_CreateTrayMenu See Also: SDL_GetTrayMenu See Also: SDL_DestroyTray