Structs

Represents a window’s position.

Represents a window’s size.

Functions

Frees a display handle. Parameters: NSTDDisplay *display - Pointer to the display handle.

Returns the display’s scale factor. Parameters: NSTDDisplay display - The display. Returns: double scale_factor - The scale factor of the display.

Returns a display’s size. Parameters: NSTDDisplay display - The display. Returns: NSTDWindowSize size - The size of the display.

Closes a window. Parameters: NSTDWindow *window - Pointer to the window.

Creates a new window. Parameters: NSTDEventLoop event_loop - The event loop to attach to the window. Returns: NSTDWindow window - The new window, null on error.

Creates a child window with parent being the parent window. NOTE: This is only functional on Windows targets and will always return a null window handle on any other platform. Parameters: NSTDEventLoop event_loop - The event loop to attach to the window. NSTDWindow parent - The parent window. Returns: NSTDWindow child - The new child window.

Gets a window’s client position. Parameters: NSTDWindow window - The window. NSTDWindowPosition *pos - Returns as the position. Returns: int errc - Nonzero on error.

Gets a window’s client size. Parameters: NSTDWindow window - The window. Returns: NSTDWindowSize size - The size of the window’s client area.

Gets the display that the given window resides in. Parameters: NSTDWindow window - The window. Returns: NSTDDisplay display - The display that the window is in.

Gets the window’s ID. Parameters: NSTDWindow window - The window. Returns: NSTDWindowID window_id - The window ID.

Gets a window’s position. Parameters: NSTDWindow window - The window. NSTDWindowPosition *pos - Returns as the position. Returns: int errc - Nonzero on error.

Gets a window’s scale factor. Parameters: NSTDWindow window - The window. Returns: double factor - The scale factor of the window.

Gets a window’s size. Parameters: NSTDWindow window - The window. Returns: NSTDWindowSize size - The size of the window.

Compares two window IDs. Parameters: NSTDWindowID id1 - A window ID. NSTDWindowID id2 - Another window ID. Returns: int are_same - 1 if the two IDs refer to the same window, 0 otherwise.

Frees a window ID. Parameters: NSTDWindowID *window_id - Pointer to the window ID.

Checks if the window is maximized. Parameters: NSTDWindow window - The window. Returns: int maximized - Nonzero if the window is maximized.

Requests the window to be drawn. Parameters: NSTDWindow window - The window.

Sets a window’s client max size. Parameters: NSTDWindow window - The window. const NSTDWindowSize *const size - An array of 2 NSTDUInt32s, null for no max.

Sets a window’s client min size. Parameters: NSTDWindow window - The window. const NSTDWindowSize *const size - An array of 2 NSTDUInt32s, null for no min.

Sets a window’s client size. Parameters: NSTDWindow window - The window. const NSTDWindowSize size - An array of 2 NSTDInt32s.

Turn window decorations on or off. Parameters: NSTDWindow window - The window. const int decorations - Whether to allow window decorations or not.

Sets a window’s icon image. Parameters: NSTDWindow window - The window. const NSTDImage *const img - The icon image, null for default. Returns: int errc - Nonzero on error.

Sets the window’s maximization mode. Parameters: NSTDWindow window - The window. const int maximized - Whether the window should be maximized or not.

Sets the window’s minimization mode. Parameters: NSTDWindow window - The window. const int minimized - Whether the window should be minimized or not.

Sets a window’s position. Parameters: NSTDWindow window - The window. const NSTDWindowPosition pos - The new position.

Sets whether the window is resizable or not. Parameters: NSTDWindow window - The window. const int resizable - Whether the window should be resizable or not.

Sets a window’s title. Parameters: NSTDWindow window - The window. const char *const title - The new window title. Returns: int errc - Nonzero on error.

Sets a window’s visibility. Parameters: NSTDWindow window - The window. const int visible - Whether to show or hide the window.

Type Definitions

Represents a display handle.

Represents a window.