Function fermium::events::SDL_PeepEvents

source ·
pub unsafe extern "C" fn SDL_PeepEvents(
    events: *mut SDL_Event,
    numevents: c_int,
    action: SDL_eventaction,
    minType: SDL_EventType,
    maxType: SDL_EventType
) -> c_int
Expand description

Checks the event queue for messages and optionally returns them.

If action is SDL_ADDEVENT, up to numevents events will be added to the back of the event queue.

If action is SDL_PEEKEVENT, up to 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 action is SDL_GETEVENT, up to 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.

Returns: The number of events actually stored, or -1 if there was an error.

This function is thread-safe.