(bind-func toString
(lambda (gui:GUI*)
(let ((s:i8* (salloc 1024)))
(if (null? gui)
(sprintf s "<GUI 0x0>")
(sprintf s
"<GUI %p\n window=%p\n context=%p\n root=%p\n width=%.1f\n height=%.1f\n pixelRatio=%.1f\n>"
gui
(GUI_window gui)
(GUI_context gui)
(GUI_root gui)
(convert (GUI_width gui) double)
(convert (GUI_height gui) double)
(convert (GUI_pixel_ratio gui) double)))
(String s))))