SDL_SetWindowTitle(3)
π SDL_SetWindowTitle(3) β the SDL3 functions glow-up β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_SetWindowTitle π
πΈ NAME πΈ
SDL_SetWindowTitle β sets the title of a window, no cap πͺβ¨
π SYNOPSIS π
#include <SDL3/SDL_video.h>
bool SDL_SetWindowTitle(SDL_Window *window, const char *title);
π¦ DESCRIPTION π¦
okay so this is literally just "name your window" energy π you hand it a string and it becomes the title. and the tea is: that string is expected to be in UTF-8 encoding π«Ά so don't come at it with some random encoding, it's giving UTF-8 or nothing fr fr.
β¨ FUNCTION PARAMETERS β¨
windowβ the window to change π this is your victim, the one getting a new name.titleβ the desired window title, in UTF-8 format π yes, exactly like the description said. consistency slay.
π RETURN VALUE π
Returns true on success or false on failure π₯² and if it's a flop, call SDL_GetError() for more information β that's your group chat debrief on what went wrong π
π₯ THREAD SAFETY π₯
This function should only be called on the main thread. periodt. π don't be out here calling it from some random thread, that's not the vibe.
β AVAILABILITY β
This function is available since SDL 3.2.0 π so if you're on anything older... bestie. upgrade. π
π SEE ALSO π
SDL_GetWindowTitle(3)β the read-only sibling, for when you wanna know what the title currently is π§
and that's the whole page, you ate it, go forth and rename your windows π
mwah π this came to you from Simple Directmedia Layer, running SDL 3.4.18 β stay iconic, bestie π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms