10 Mouse Operations
The graphics library contains functions that determine where the mouse is, if there are any clicks, etc. The functions get-mouse-click and ready-mouse-click first return a “mouse-click descriptor,” and then other functions take the descriptor and return the mouse’s position, which button was pushed, etc. Mouse clicks are buffered and returned in the same order in which they occurred. Thus, the descriptors returned by get-mouse-click and ready-mouse-click may be from clicks that occurred long before these functions were called.
procedure
(get-mouse-click viewport) → mouse-click?
viewport : viewport?
procedure
(ready-mouse-click viewport) → (or/c mouse-click? false/c)
viewport : viewport?
procedure
(ready-mouse-release viewport) → (or/c mouse-click? false/c)
viewport : viewport?
procedure
(query-mouse-posn viewport) → (or/c posn? false/c)
viewport : viewport?
procedure
(mouse-click-posn mouse-click) → posn?
mouse-click : mouse-click?
procedure
(left-mouse-click? mouse-click) → boolean?
mouse-click : mouse-click?
procedure
(middle-mouse-click? mouse-click) → boolean?
mouse-click : mouse-click?
procedure
(right-mouse-click? mouse-click) → boolean?
mouse-click : mouse-click?