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

SDL_GetTrayIconRect

Get the area of a tray icon in global screen coordinates.

Header File

Defined in <SDL3/SDL_tray.h>

Syntax

bool SDL_GetTrayIconRect(SDL_Tray *tray, SDL_Rect *rect);

Function Parameters

SDL_Tray * tray the tray icon to query.
SDL_Rect * rect a pointer filled in with the tray icon area.

Return Value

(bool) Returns true on success or false on failure; call SDL_GetError() for more information.

Remarks

This can be used to position a window next to the tray icon.

This is not supported on Linux, where the desktop environment doesn't report where the tray icon is. The area may also not be available if the tray icon is hidden.

Thread Safety

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

Version

This function is available since SDL 3.6.0.


CategoryAPI, CategoryAPIFunction, CategoryTray


[ edit | delete | history | feedback | raw ]

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