sdlCreateTraySubmenu function

Pointer<SdlTrayMenu> sdlCreateTraySubmenu(
  1. Pointer<SdlTrayEntry> entry
)

Create a submenu for a system tray entry.

This should be called at most once per tray entry.

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

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

\param entry 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_InsertTrayEntryAt \sa SDL_GetTraySubmenu \sa SDL_GetTrayMenuParentEntry

extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTraySubmenu(SDL_TrayEntry *entry)

Implementation

Pointer<SdlTrayMenu> sdlCreateTraySubmenu(Pointer<SdlTrayEntry> entry) {
  final sdlCreateTraySubmenuLookupFunction = libSdl3.lookupFunction<
      Pointer<SdlTrayMenu> Function(Pointer<SdlTrayEntry> entry),
      Pointer<SdlTrayMenu> Function(
          Pointer<SdlTrayEntry> entry)>('SDL_CreateTraySubmenu');
  return sdlCreateTraySubmenuLookupFunction(entry);
}