sdlGetWindowId function video
Get the numeric ID of a window.
The numeric ID is what SDL_WindowEvent references, and is necessary to map these events to specific SDL_Window objects.
\param window the window to query. \returns the ID of the window on success or 0 on failure; call SDL_GetError() for more information.
\threadsafety This function should only be called on the main thread.
\since This function is available since SDL 3.2.0.
\sa SDL_GetWindowFromID
extern SDL_DECLSPEC SDL_WindowID SDLCALL SDL_GetWindowID(SDL_Window *window)
Implementation
int sdlGetWindowId(Pointer<SdlWindow> window) {
final sdlGetWindowIdLookupFunction = _libSdl
.lookupFunction<
Uint32 Function(Pointer<SdlWindow> window),
int Function(Pointer<SdlWindow> window)
>('SDL_GetWindowID');
return sdlGetWindowIdLookupFunction(window);
}