SDL_SetWindowFillDocument(3)
๐ SDL_SetWindowFillDocument(3) ๐
okay so bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_SetWindowFillDocument ๐
โจ NAME โจ
SDL_SetWindowFillDocument โ set the window to fill the current document space (Emscripten only). no cap, that's the whole gig ๐
๐ธ SYNOPSIS ๐ธ
#include <SDL3/SDL_video.h>
bool SDL_SetWindowFillDocument(SDL_Window *window, bool fill);
๐ฆ DESCRIPTION ๐ฆ
so what this does is it adds or removes the window's SDL_WINDOW_FILL_DOCUMENT flag. that's it, that's the vibe โจ
currently this flag only applies to the Emscripten target. like, only Emscripten, fr fr.
when it's enabled, the canvas element fills the entire document. resize events get generated as the browser window is resized, because that resizes the canvas too โ it's giving responsive, honestly. and the canvas will cover anything else on the page, including any controls that Emscripten provides in its generated HTML file. in fact, any elements on the page that aren't the canvas get moved into a hidden div element ๐ like, they're still there, just... banished.
often times this is desirable for a browser-based game ๐ฎ but bestie, it means several things we expect of an SDL window on other platforms might not work as expected โ like minimum window sizes and aspect ratios. so know what you're signing up for, okay? ๐
๐ FUNCTION PARAMETERS ๐
windowโ the window of which to change the fill-document state. (your girl ๐ซถ)fillโtrueto set the window to fill the document,falseto disable. on/off, slay/unsay ๐
โญ RETURN VALUE โญ
returns true on success or false on failure ๐ญ and if it's a fail, call SDL_GetError() for more information. she'll tell you what went wrong, i promise.
๐ง THREAD SAFETY ๐ง
this function should only be called on the main thread. periodt. don't be chaotic about it ๐ฅ
๐ AVAILABILITY ๐
this function is available since SDL 3.4.0. iconic behavior, honestly ๐
๐ SEE ALSO ๐
and that's the tea, bestie ๐ this page came to you from Simple Directmedia Layer, version SDL 3.4.18, and it's literally the SDL_SetWindowFillDocument(3) manual page. go forth and fill that document ๐โจ๐๐ฆ๐ธ๐
๐ซถ
๐ฆ 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