setTitle method

bool setTitle(
  1. String title
)

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. \returns true on success or false on failure; call SDL_GetError() for more information.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_GetWindowTitle

extern SDL_DECLSPEC bool SDLCALL SDL_SetWindowTitle(SDL_Window *window, const char *title)

Implementation

bool setTitle(String title) {
  return sdlSetWindowTitle(this, title);
}