Wiki Page Content

Differences between revisions 6 and 7
Revision 6 as of 2010-08-18 22:56:08
Size: 2921
Editor: SheenaSmith
Comment: update content - changeset 4635
Revision 7 as of 2010-09-22 22:53:19
Size: 2928
Editor: SheenaSmith
Comment: update content - standard return value
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
Returns the number of events actually stored, or -1 if there was an error; call [[SDL_GetError]]() for more information. Returns the number of events actually stored or a negative error code on failure; call [[SDL_GetError]]() for more information.

DRAFT

SDL_PeepEvents

Use this function to check the event queue for messages and optionally return them.

Syntax

int SDL_PeepEvents(SDL_Event*      events,
                   int             numevents,
                   SDL_eventaction action,
                   Uint32          minType,
                   Uint32          maxType)

Function Parameters

events

a pointer to the ID of the event queue to query

numevents

the number of events to work with; see Remarks for details

action

how to handle the events in the queue; see Remarks for details

minType

the minimum number of events of a specified type ???

maxType

the maximum number of events of a specified type ???

Return Value

Returns the number of events actually stored or a negative error code on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

action may be any of the following green

:

SDL_ADDEVENT

up to numevents events will be added to the back of the event queue

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

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

green

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.

{i} This function is thread-safe.

*
green

You may have to call SDL_PumpEvents() before calling this function. Otherwise, the events may not be ready to be filtered when you call SDL_PeepEvents().
*


CategoryAPI, CategoryEvents

None: SDL_PeepEvents (last edited 2015-04-26 19:50:04 by PhilippWiesemann)

Feedback
Please include your contact information if you'd like to receive a reply.
Submit