natiny_window_get_state
C
int natiny_window_get_state(NatinyWindow id);
Returns the current window state observed by the platform.
Parameters
Returns
| Type |
Description |
int |
One of the NATINY_WINDOW_STATE_* constants; NATINY_WINDOW_STATE_NORMAL for an invalid handle |
Example
C
if (natiny_window_get_state(win) != NATINY_WINDOW_STATE_MINIMIZED)
draw_the_world();
Notes
- On desktop, the result reflects user actions such as minimizing from the
taskbar or leaving fullscreen with Escape.
- In a browser, the function returns only
NATINY_WINDOW_STATE_NORMAL or
NATINY_WINDOW_STATE_FULLSCREEN.
- On Android, the function returns the last supported state requested through
natiny_window_set_state: NATINY_WINDOW_STATE_NORMAL or
NATINY_WINDOW_STATE_FULLSCREEN.
- A state requested during the current frame becomes visible after the event
loop processes it, normally in the next frame.
- A minimized fullscreen desktop window returns
NATINY_WINDOW_STATE_MINIMIZED.