SDL_HideWindow(3)

πŸ’– SDL_HideWindow β€” hide a window, bestie πŸ’–

okay so real talk: this is a page out of the SDL3 FUNCTIONS manual, and it's about the little function that makes a window go bye-bye (visually, at least). No cap. Let's get into it.


✨ NAME ✨

SDL_HideWindow β€” Hide a window. That's it. That's the whole job. She's a one-trick pony and she ate. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_video.h>

bool SDL_HideWindow(SDL_Window *window);

the way that you just include the header and call her. Iconic. πŸ¦‹


🌸 FUNCTION PARAMETERS 🌸

  • window β€” the window to hide. Like, the actual window you want to disappear. Hand her over and she's gone. πŸ«₯

⭐ RETURN VALUE ⭐

Returns true on success or false on failure β€” and if it's a flop, pls pls pls call SDL_GetError() for more information. She will tell you what went wrong, she's not gonna gatekeep. 😭


🧚 THREAD SAFETY 🧚

⚠️ bestie. LISTEN. This function should only be called on the main thread. Do not be out here calling her from some random worker thread. She is main character energy only, and that means the main thread. Periodt. πŸ’€

🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. So if you're on something older, sorry babe, no window-hiding for you. πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

  • SDL_ShowWindow(3) β€” the opposite queen, brings her back πŸ‘‘
  • SDL_WINDOW_HIDDEN(3) β€” the flag that says "yeah she's hidden" 🌸

and that's the whole vibe check, fr fr. This lil' page came to you straight from the Simple Directmedia Layer girlies, shipped as part of SDL 3.4.18. Go hide a window, slay, and remember: main thread only. bye bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

πŸ“¦ where this page comes from