sdlGetTrayEntryLabel function

String? sdlGetTrayEntryLabel(
  1. Pointer<SdlTrayEntry> entry
)

Gets the label of an entry.

If the returned value is NULL, the entry is a separator.

\param entry the entry to be read. \returns the label of the entry.

\since This function is available since SDL 3.2.0.

\sa SDL_GetTrayEntries \sa SDL_InsertTrayEntryAt \sa SDL_SetTrayEntryLabel

extern SDL_DECLSPEC const char *SDLCALL SDL_GetTrayEntryLabel(SDL_TrayEntry *entry)

Implementation

String? sdlGetTrayEntryLabel(Pointer<SdlTrayEntry> entry) {
  final sdlGetTrayEntryLabelLookupFunction = libSdl3.lookupFunction<
      Pointer<Utf8> Function(Pointer<SdlTrayEntry> entry),
      Pointer<Utf8> Function(
          Pointer<SdlTrayEntry> entry)>('SDL_GetTrayEntryLabel');
  final result = sdlGetTrayEntryLabelLookupFunction(entry);
  if (result == nullptr) {
    return null;
  }
  return result.toDartString();
}