sdlRegisterEvents function

int sdlRegisterEvents(
  1. int numevents
)

Allocate a set of user-defined events, and return the beginning event number for that set of events.

\param numevents the number of events to be allocated. \returns the beginning event number, or 0 if numevents is invalid or if there are not enough user-defined events left.

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

\since This function is available since SDL 3.1.3.

\sa SDL_PushEvent

extern SDL_DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents)

Implementation

int sdlRegisterEvents(int numevents) {
  final sdlRegisterEventsLookupFunction = libSdl3.lookupFunction<
      Uint32 Function(Int32 numevents),
      int Function(int numevents)>('SDL_RegisterEvents');
  return sdlRegisterEventsLookupFunction(numevents);
}