Position and Size
Position, Size, and Title
Set the Window Title
Changes the text shown in the window's title bar (which can differ from the <title> in the HTML).
int32_t set_window_title(uint32_t window_id, const char* title);Parameters:
window_iduint32_t- Target window idtitlestring- The new window title
Set the Window Size
Changes the window's width and height in pixels.
int32_t set_window_size(uint32_t window_id, int32_t width, int32_t height);Parameters:
window_iduint32_t- Target window idwidthint32_t- The new width (pixels)heightint32_t- The new height (pixels)
Set the Window Position
Changes the window's position on the screen in pixels.
int32_t set_window_position(uint32_t window_id, int32_t x, int32_t y);Parameters:
window_iduint32_t- Target window idxint32_t- The new X coordinateyint32_t- The new Y coordinate
Get Window Position and Size (get_window_bounds)
int32_t get_window_bounds(uint32_t window_id, char* buffer, int32_t buffer_size);Parameters:
window_iduint32_t- Target window idbufferchar*- Output bufferbuffer_sizeint- Buffer size
Return value: 1 = success, with the buffer written as JSON {"x":0,"y":0,"width":800,"height":600}; 0 = failure