Next: , Previous: , Up: Input   [Contents][Index]


3.3.2 Mouse

(use-modules (sdl2 input mouse))
Procedure: mouse-x

Return the x coordinate of the mouse cursor.

Procedure: mouse-y

Return the y coordinate of the mouse cursor.

Procedure: mouse-button-pressed? button

Return #t if button is currently being pressed.

Procedure: mouse-button-released? button

Return #t if button is not currently being pressed.

Procedure: make-system-cursor cursor-type

Create a new cursor from the system’s available set, chosen by cursor-type. The possible values for cursor-type are:

Procedure: make-color-cursor surface hot-x hot-y

Create a new cursor from a surface and the given hotspot coordinates (hot-x, hot-y).

Procedure: get-cursor

Return the cursor currently in use. The returned cursor object is internally managed and it’s not necessary to call delete-cursor! for it.

Procedure: set-cursor! cursor

Set the current cursor to cursor. If cursor is #f, the system default cursor is restored.

Procedure: delete-cursor! cursor

Free the memory used by cursor. Be careful!