- get-events! num #!optional min-type max-typeprocedure
- peek-events num #!optional min-type max-typeprocedure
Get multiple matching events from the front of the event queue. Returns a list of managed sdl2:events. See SDL_PeepEvents.
- get-events! removes the returned events from the event queue.
- peek-events does not remove the returned events from the event queue.
num specifies the maximum number of events to return. May return fewer events if there are not enough matching events on the event queue.
min-type and max-type specify the range of event types to return. Events with a type outside of this range will not be returned (they will remain on the queue). min-type and max-type must be event type symbols or corresponding integers. min-type defaults to 'first and max-type defaults to 'last, which means all event types match by default.
Both procedures signal an exception of kind (exn sdl2) if an error occurs.