events: Add mouse button event bindings.
authorDavid Thompson <dthompson2@worcester.edu>
Thu, 17 Dec 2015 01:41:55 +0000 (20:41 -0500)
committerDavid Thompson <dthompson2@worcester.edu>
Thu, 17 Dec 2015 01:41:55 +0000 (20:41 -0500)
commit2818dfb3f860935ca3a036636d43f8405159897f
tree8717e82444be6c84650f3953f261c2fa34842867
parent2751b1a7380d52ff14e1cd50eac8f042252a02ac
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.
sdl2/bindings.scm
sdl2/events.scm