chickadee » sdl2 » event-type-set!

event-type eventprocedure
event-type-raw eventprocedure
set! (event-type event) valsetter
event-type-set! event valsetter

Get or set the sdl2:event's "type" field. You can use these procedures with any variant of sdl2:event. Setting this will change what variant of sdl2:event it is. E.g. if you set it to 'key-down, the event will become an sdl2:keyboard-event.

  • event-type returns an event type symbol.
  • event-type-raw returns an integer.
  • The setters accept either a symbol or an integer.