sdlGetTrayMenu function

Pointer<SdlTrayMenu> sdlGetTrayMenu(
  1. Pointer<SdlTray> tray
)

Gets a previously created tray menu.

You should have called SDL_CreateTrayMenu() on the tray object. This function allows you to fetch it again later.

This function does the same thing as SDL_GetTraySubmenu(), except that it takes a SDL_Tray instead of a SDL_TrayEntry.

A menu does not need to be destroyed; it will be destroyed with the tray.

\param tray the tray entry to bind the menu to. \returns the newly created menu.

\since This function is available since SDL 3.2.0.

\sa SDL_CreateTray \sa SDL_CreateTrayMenu

extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayMenu(SDL_Tray *tray)

Implementation

Pointer<SdlTrayMenu> sdlGetTrayMenu(Pointer<SdlTray> tray) {
  final sdlGetTrayMenuLookupFunction = libSdl3.lookupFunction<
      Pointer<SdlTrayMenu> Function(Pointer<SdlTray> tray),
      Pointer<SdlTrayMenu> Function(Pointer<SdlTray> tray)>('SDL_GetTrayMenu');
  return sdlGetTrayMenuLookupFunction(tray);
}