Added SDL_GetWindowFromEvent

This commit is contained in:
Anonymous Maarten
2024-08-02 23:47:03 +02:00
committed by Anonymous Maarten
parent 79f4de9f7e
commit f57c597c60
12 changed files with 377 additions and 21 deletions

View File

@@ -1400,6 +1400,20 @@ extern SDL_DECLSPEC SDL_bool SDLCALL SDL_EventEnabled(Uint32 type);
*/
extern SDL_DECLSPEC Uint32 SDLCALL SDL_RegisterEvents(int numevents);
/**
* 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.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_PollEvent
* \sa SDL_WaitEvent
* \sa SDL_WaitEventTimeout
*/
extern SDL_DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromEvent(const SDL_Event *event);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus