SDL_GetWindows(3)
π NAME π
okay so bestie, this is SDL_GetWindows(3) straight out of the SDL3 FUNCTIONS manual, and it is literally about getting a list of valid windows. that's the whole vibe. no cap. πͺβ¨
π¦ SYNOPSIS π¦
#include <SDL3/SDL_video.h>
SDL_Window ** SDL_GetWindows(int *count);
like, she takes a pointer to an int and hands you back a whole array of window pointers. iconic behavior honestly. π
π FUNCTION PARAMETERS π
countβ a pointer that gets filled in with the number of windows returned. it may beNULL, so like, no pressure if you're not ready for that info yet. π
β¨ RETURN VALUE β¨
she returns a NULL terminated array of SDL_Window pointers, or NULL on failure β and if that happens, bestie, you gotta call SDL_GetError() for more information. π
this is a single allocation that should be freed with SDL_free() when it is no longer needed. do not forget to free her, fr fr, she will haunt you otherwise. π«Ά
π₯ THREAD SAFETY π₯
This function should only be called on the main thread.
that's it. that's the rule. main thread only. do not try to be sneaky and call her from a side thread, she will not slay for you. π
π AVAILABILITY π
This function is available since SDL 3.2.0. so if you're on something older, bestie... it's giving outdated. π
Simple Directmedia Layer girlies made this, we're on SDL 3.4.18, and yeah, this was SDL_GetWindows(3). mwah, go free your arrays. πππ¦
π¦ 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