sdlGetWindowDisplayIndex function

int sdlGetWindowDisplayIndex(
  1. Pointer<SdlWindow> window
)

Get the index of the display associated with a window.

\param window the window to query \returns the index of the display containing the center of the window on success or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_GetDisplayBounds \sa SDL_GetNumVideoDisplays

extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window)

Implementation

int sdlGetWindowDisplayIndex(Pointer<SdlWindow> window) {
  final sdlGetWindowDisplayIndexLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlWindow> window),
      int Function(Pointer<SdlWindow> window)>('SDL_GetWindowDisplayIndex');
  return sdlGetWindowDisplayIndexLookupFunction(window);
}