# SDL_Window

An application window, created via prosperon.engine_start or SDL calls. Freed on GC.


### fullscreen() <sub>function</sub>

Toggle fullscreen mode for this window (SDL_WINDOW_FULLSCREEN).



**Returns**: None


### make_renderer(name) <sub>function</sub>

Create an SDL_Renderer for 2D rendering tied to this window.



**name**: The renderer driver name, e.g. "opengl" (may be optional).


**Returns**: An SDL_Renderer object.


### make_gpu(debug, driverName) <sub>function</sub>

Create an SDL_GPUDevice for low-level GPU rendering on this window.



**debug**: If true, enable debugging in the GPU device.

**driverName**: The GPU back-end driver, e.g. "opengl".


**Returns**: An SDL_GPUDevice.


### keyboard_shown() <sub>function</sub>

Return whether the on-screen keyboard is visible (mobile/tablet).



**Returns**: True if shown, false otherwise.


### theme() <sub>function</sub>

Currently returns undefined. Placeholder for retrieving OS window theme info.



**Returns**: undefined


### safe_area() <sub>function</sub>

Return a rect describing any OS-specific "safe" region for UI, e.g. on iPhone with a notch.



**Returns**: A rect object {x, y, w, h}.


### bordered(flag) <sub>function</sub>

Enable or disable window borders.



**flag**: True to show borders, false to hide.


**Returns**: None


### set_icon(surface) <sub>function</sub>

Set the window's icon from an SDL_Surface.



**surface**: An SDL_Surface holding the icon.


**Returns**: None


### title <sub>accessor</sub>

Get or set the window's title text in the title bar.



**newTitle**: (when setting) A string title.


**Returns**: The current title if getting, or None if setting.


### size <sub>accessor</sub>

Get or set the window's size as [width, height].



**newSize**: (when setting) e.g. [640, 480]


**Returns**: The current [width, height] or None if setting.


### mouse_grab(flag) <sub>function</sub>

Grab or ungrab the mouse for this window (so the pointer won't leave).



**flag**: True to grab mouse input, false to release.


**Returns**: None

