getId method

int getId()

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.1.3.

\sa SDL_GetWindowFromID

extern SDL_DECLSPEC SDL_WindowID SDLCALL SDL_GetWindowID(SDL_Window *window)

Implementation

int getId() {
  return sdlGetWindowId(this);
}