summaryrefslogtreecommitdiff
path: root/sdl2/bindings.scm
diff options
context:
space:
mode:
Diffstat (limited to 'sdl2/bindings.scm')
-rw-r--r--sdl2/bindings.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/sdl2/bindings.scm b/sdl2/bindings.scm
index 43f0be6..a25822f 100644
--- a/sdl2/bindings.scm
+++ b/sdl2/bindings.scm
@@ -816,6 +816,16 @@ RETURN-TYPE and accept arguments of ARG-TYPES."
(define-public SDL_BUTTON_X1 4)
(define-public SDL_BUTTON_X2 5)
+(define (button-mask n)
+ (ash 1 (1- n)))
+
+(define-public SDL_BUTTON_LMASK (button-mask SDL_BUTTON_LEFT))
+(define-public SDL_BUTTON_MMASK (button-mask SDL_BUTTON_MIDDLE))
+(define-public SDL_BUTTON_RMASK (button-mask SDL_BUTTON_RIGHT))
+(define-public SDL_BUTTON_X1MASK (button-mask SDL_BUTTON_X1))
+(define-public SDL_BUTTON_X2MASK (button-mask SDL_BUTTON_X2))
+
+
;;;
;;; Timer