SDL_PeepEvents

Name

SDL_PeepEvents -- Checks the event queue for messages and optionally returns them.

Synopsis

uses
SDL;

function SDL_PeepEvents( events : PSDL_Event; numevents : Integer; action : TSDL_eventaction; mask : UInt32 ) : Integer;

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, matching mask, 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, matching mask, will be returned and will be removed from the queue.

This function is thread-safe.

Return Value

This function returns the number of events actually stored, or -1 if there was an error.

See Also

TSDL_Event , SDL_PollEvent , SDL_PushEvent