sdlGetTrayMenuParentTray function tray

Pointer<SdlTray> sdlGetTrayMenuParentTray(
  1. Pointer<SdlTrayMenu> menu
)

Gets the tray for which this menu is the first-level menu, if the current menu isn't a submenu.

Either this function or SDL_GetTrayMenuParentEntry() will return non-NULL for any given menu.

\param menu the menu for which to get the parent enttrayry. \returns the parent tray, or NULL if this menu is a submenu.

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

\since This function is available since SDL 3.2.0.

\sa SDL_CreateTrayMenu \sa SDL_GetTrayMenuParentEntry

extern SDL_DECLSPEC SDL_Tray * SDLCALL SDL_GetTrayMenuParentTray(SDL_TrayMenu *menu)

Implementation

Pointer<SdlTray> sdlGetTrayMenuParentTray(Pointer<SdlTrayMenu> menu) {
  final sdlGetTrayMenuParentTrayLookupFunction = _libSdl
      .lookupFunction<
        Pointer<SdlTray> Function(Pointer<SdlTrayMenu> menu),
        Pointer<SdlTray> Function(Pointer<SdlTrayMenu> menu)
      >('SDL_GetTrayMenuParentTray');
  return sdlGetTrayMenuParentTrayLookupFunction(menu);
}