Added SDL_ClickTrayEntry()

Also removed the app delegate from the tray code on Cocoa and folded that into SDL3AppDelegate.

Fixes https://github.com/libsdl-org/SDL/issues/11906
This commit is contained in:
Sam Lantinga
2025-01-10 12:20:37 -08:00
parent fb0f6a1196
commit 042898995c
9 changed files with 70 additions and 31 deletions

View File

@@ -388,6 +388,15 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTrayEntryEnabled(SDL_TrayEntry *entry);
*/
extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, SDL_TrayCallback callback, void *userdata);
/**
* Simulate a click on a tray entry.
*
* \param entry The entry to activate.
*
* \since This function is available since SDL 3.1.9.
*/
extern SDL_DECLSPEC void SDLCALL SDL_ClickTrayEntry(SDL_TrayEntry *entry);
/**
* Destroys a tray object.
*