sdlHasEvents function events

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 true if events with type >= minType and <= maxType are present, or false if not.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

\sa SDL_HasEvents

extern SDL_DECLSPEC bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType)

Implementation

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