sdlHasEvents function

bool sdlHasEvents(
  1. int minType,
  2. int maxType
)

Check for the existence of certain event types in the event queue.

If you need to check for a single event type, use SDL_HasEvent() instead.

\param minType the low end of event type to be queried, inclusive; see SDL_EventType for details \param maxType the high end of event type to be queried, inclusive; see SDL_EventType for details \returns SDL_TRUE if events with type >= minType and <= maxType are present, or SDL_FALSE if not.

\since This function is available since SDL 2.0.0.

\sa SDL_HasEvents

extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType)

Implementation

bool sdlHasEvents(int minType, int maxType) {
  final sdlHasEventsLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Uint32 minType, Uint32 maxType),
      int Function(int minType, int maxType)>('SDL_HasEvents');
  return sdlHasEventsLookupFunction(minType, maxType) == 1;
}