sdlSetWindowTitle function
Set the title of a window.
This string is expected to be in UTF-8 encoding.
\param window the window to change \param title the desired window title in UTF-8 format
\since This function is available since SDL 2.0.0.
\sa SDL_GetWindowTitle
extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window, const char *title)
Implementation
void sdlSetWindowTitle(Pointer<SdlWindow> window, String? title) {
final sdlSetWindowTitleLookupFunction = libSdl2.lookupFunction<
Void Function(Pointer<SdlWindow> window, Pointer<Utf8> title),
void Function(Pointer<SdlWindow> window,
Pointer<Utf8> title)>('SDL_SetWindowTitle');
final titlePointer = title != null ? title.toNativeUtf8() : nullptr;
final result = sdlSetWindowTitleLookupFunction(window, titlePointer);
calloc.free(titlePointer);
return result;
}