sdlGetTrayEntryLabel function tray
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 in UTF-8 encoding.
\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_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 = _libSdl
.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();
}