Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

SDL_PeepEvents (3)

Name

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

Synopsis

#include "SDL.h"

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

Description

SDL_PeepEvents(3)              SDL API Reference             SDL_PeepEvents(3)



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

SYNOPSIS
       #include "SDL.h"

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

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.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | library/sdl      |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+
SEE ALSO
       SDL_Event, SDL_PollEvent, SDL_PushEvent



NOTES
       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source        was        downloaded        from        https://www.lib-
       sdl.org/release/SDL-1.2.15.tar.gz

       Further information about this software can be found on the open source
       community website at https://www.libsdl.org/.



SDL                         Tue 11 Sep 2001, 22:59           SDL_PeepEvents(3)