Tao.Sdl SDK Documentation

Sdl.SDL_PeepEvents Method 

Checks the event queue for messages and optionally returns them.

[Visual Basic]
Public Shared Function SDL_PeepEvents( _
   ByVal events As SDL_Event(), _
   ByVal numevents As Integer, _
   ByVal action As Integer, _
   ByVal mask As Integer _
) As Integer
[C#]
public static int SDL_PeepEvents(
   SDL_Event[] events,
   int numevents,
   int action,
   int mask
);

Parameters

events
numevents
action
SDL_eventaction enum
mask

Return Value

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

Remarks

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.

The mask parameter is an bitwise OR of SDL_EVENTMASK(event_type), for all event types you are interested in.

This function is thread-safe.

Binds to C-function in SDL_events.h

            int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 mask);
            

See Also

Sdl Class | Tao.Sdl Namespace | SDL_PollEvent | Sdl.SDL_Event | SDL_PushEvent