(bind-func gui_inbounds_p
(lambda (bounds:Rect*)
(let ((x (gui_mouse_x))
(y (gui_mouse_y))
(xmin (tref bounds 0))
(xmax (+ xmin (tref bounds 2)))
(ymin (tref bounds 1))
(ymax (+ ymin (tref bounds 3))))
;; a simple hit-test
(and (< xmin x) (> xmax x)
(< ymin y) (> ymax y)))))