[−][src]Function sdl2_sys::SDL_PeepEvents
pub unsafe extern "C" fn SDL_PeepEvents(
events: *mut SDL_Event,
numevents: c_int,
action: SDL_eventaction,
minType: Uint32,
maxType: Uint32
) -> c_int
Checks the event queue for messages and optionally returns them.
If \c action is ::SDL_ADDEVENT, up to \c numevents events will be added to the back of the event queue.
If \c action is ::SDL_PEEKEVENT, up to \c numevents events at the front of the event queue, within the specified minimum and maximum type, will be returned and will not be removed from the queue.
If \c action is ::SDL_GETEVENT, up to \c numevents events at the front of the event queue, within the specified minimum and maximum type, will be returned and will be removed from the queue.
\return The number of events actually stored, or -1 if there was an error.
This function is thread-safe.