Crate nstd_gui

Source

Structs§

NSTDWindowPosition
Represents a window’s position.
NSTDWindowSize
Represents a window’s size.

Functions§

nstd_gui_display_free
Frees a display handle. Parameters: NSTDDisplay *display - Pointer to the display handle.
nstd_gui_display_get_scale_factor
Returns the display’s scale factor. Parameters: NSTDDisplay display - The display. Returns: double scale_factor - The scale factor of the display.
nstd_gui_display_get_size
Returns a display’s size. Parameters: NSTDDisplay display - The display. Returns: NSTDWindowSize size - The size of the display.
nstd_gui_window_close
Closes a window. Parameters: NSTDWindow *window - Pointer to the window.
nstd_gui_window_create
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.
nstd_gui_window_create_child
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.
nstd_gui_window_get_client_position
Gets a window’s client position. Parameters: NSTDWindow window - The window. NSTDWindowPosition *pos - Returns as the position. Returns: int errc - Nonzero on error.
nstd_gui_window_get_client_size
Gets a window’s client size. Parameters: NSTDWindow window - The window. Returns: NSTDWindowSize size - The size of the window’s client area.
nstd_gui_window_get_display
Gets the display that the given window resides in. Parameters: NSTDWindow window - The window. Returns: NSTDDisplay display - The display that the window is in.
nstd_gui_window_get_id
Gets the window’s ID. Parameters: NSTDWindow window - The window. Returns: NSTDWindowID window_id - The window ID.
nstd_gui_window_get_position
Gets a window’s position. Parameters: NSTDWindow window - The window. NSTDWindowPosition *pos - Returns as the position. Returns: int errc - Nonzero on error.
nstd_gui_window_get_scale_factor
Gets a window’s scale factor. Parameters: NSTDWindow window - The window. Returns: double factor - The scale factor of the window.
nstd_gui_window_get_size
Gets a window’s size. Parameters: NSTDWindow window - The window. Returns: NSTDWindowSize size - The size of the window.
nstd_gui_window_id_compare
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.
nstd_gui_window_id_free
Frees a window ID. Parameters: NSTDWindowID *window_id - Pointer to the window ID.
nstd_gui_window_is_maximized
Checks if the window is maximized. Parameters: NSTDWindow window - The window. Returns: int maximized - Nonzero if the window is maximized.
nstd_gui_window_request_redraw
Requests the window to be drawn. Parameters: NSTDWindow window - The window.
nstd_gui_window_set_client_max_size
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.
nstd_gui_window_set_client_min_size
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.
nstd_gui_window_set_client_size
Sets a window’s client size. Parameters: NSTDWindow window - The window. const NSTDWindowSize size - An array of 2 NSTDInt32s.
nstd_gui_window_set_decorations
Turn window decorations on or off. Parameters: NSTDWindow window - The window. const int decorations - Whether to allow window decorations or not.
nstd_gui_window_set_icon
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.
nstd_gui_window_set_maximized
Sets the window’s maximization mode. Parameters: NSTDWindow window - The window. const int maximized - Whether the window should be maximized or not.
nstd_gui_window_set_minimized
Sets the window’s minimization mode. Parameters: NSTDWindow window - The window. const int minimized - Whether the window should be minimized or not.
nstd_gui_window_set_position
Sets a window’s position. Parameters: NSTDWindow window - The window. const NSTDWindowPosition pos - The new position.
nstd_gui_window_set_resizable
Sets whether the window is resizable or not. Parameters: NSTDWindow window - The window. const int resizable - Whether the window should be resizable or not.
nstd_gui_window_set_title
Sets a window’s title. Parameters: NSTDWindow window - The window. const char *const title - The new window title. Returns: int errc - Nonzero on error.
nstd_gui_window_set_visible
Sets a window’s visibility. Parameters: NSTDWindow window - The window. const int visible - Whether to show or hide the window.

Type Aliases§

NSTDDisplay
Represents a display handle.
NSTDWindow
Represents a window.