summaryrefslogtreecommitdiff
path: root/sdl2/bindings.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-12-16 20:41:55 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-12-16 20:41:55 -0500
commit2818dfb3f860935ca3a036636d43f8405159897f (patch)
tree8717e82444be6c84650f3953f261c2fa34842867 /sdl2/bindings.scm
parent2751b1a7380d52ff14e1cd50eac8f042252a02ac (diff)
events: Add mouse button event bindings.
* sdl2/bindings.scm (SDL_BUTTON_LEFT, SDL_BUTTON_RIGHT, SDL_BUTTON_MIDDLE, SDL_BUTTON_X1, SDL_BUTTON_X2): New variables. * sdl2/events.scm (<mouse-button-event>): New record type. (make-mouse-button-event, mouse-button-event?, mouse-button-down-event?, mouse-button-up-event?, mouse-button-event-timestamp, mouse-button-event-window-id, mouse-button-event-which, mouse-button-event-button, mouse-button-event-pressed?, mouse-button-event-clicks, mouse-button-event-x, parse-mouse-button-event): New procedures. (poll-event): Add support for mouse button events.
Diffstat (limited to 'sdl2/bindings.scm')
-rw-r--r--sdl2/bindings.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/sdl2/bindings.scm b/sdl2/bindings.scm
index 9bf7913..43f0be6 100644
--- a/sdl2/bindings.scm
+++ b/sdl2/bindings.scm
@@ -807,6 +807,17 @@ RETURN-TYPE and accept arguments of ARG-TYPES."
;;;
+;;; Mouse
+;;;
+
+(define-public SDL_BUTTON_LEFT 1)
+(define-public SDL_BUTTON_MIDDLE 2)
+(define-public SDL_BUTTON_RIGHT 3)
+(define-public SDL_BUTTON_X1 4)
+(define-public SDL_BUTTON_X2 5)
+
+
+;;;
;;; Timer
;;;