sdlGetWindowFromEvent function

Pointer<SdlWindow> sdlGetWindowFromEvent(
  1. Pointer<SdlEvent> event
)

Get window associated with an event.

\param event an event containing a windowID. \returns the associated window on success or NULL if there is none.

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

\since This function is available since SDL 3.1.3.

\sa SDL_PollEvent \sa SDL_WaitEvent \sa SDL_WaitEventTimeout

extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromEvent(const SDL_Event *event)

Implementation

Pointer<SdlWindow> sdlGetWindowFromEvent(Pointer<SdlEvent> event) {
  final sdlGetWindowFromEventLookupFunction = libSdl3.lookupFunction<
      Pointer<SdlWindow> Function(Pointer<SdlEvent> event),
      Pointer<SdlWindow> Function(
          Pointer<SdlEvent> event)>('SDL_GetWindowFromEvent');
  return sdlGetWindowFromEventLookupFunction(event);
}