pub unsafe extern "C" fn SDL_SetWindowFillDocument(
window: *mut SDL_Window,
fill: bool,
) -> boolExpand description
Set the window to fill the current document space (Emscripten only).
This will add or remove the window’s SDL_WINDOW_FILL_DOCUMENT flag.
Currently this flag only applies to the Emscripten target.
When enabled, the canvas element fills the entire document. Resize events
will be generated as the browser window is resized, as that will adjust the
canvas size as well. The canvas will cover anything else on the page,
including any controls provided by Emscripten in its generated HTML file
(in fact, any elements on the page that aren’t the canvas will be moved
into a hidden div element).
Often times this is desirable for a browser-based game, but it means several things that we expect of an SDL window on other platforms might not work as expected, such as minimum window sizes and aspect ratios.
§Parameters
window: the window of which to change the fill-document state.fill: true to set the window to fill the document, false to disable.
§Return value
Returns true on success or false on failure; call SDL_GetError() for more
information.
§Thread safety
This function should only be called on the main thread.
§Availability
This function is available since SDL 3.4.0.