sdlWindowHasSurface function video

bool sdlWindowHasSurface(
  1. Pointer<SdlWindow> window
)

Return whether the window has a surface associated with it.

\param window the window to query. \returns true if there is a surface associated with the window, or false otherwise.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.2.0.

\sa SDL_GetWindowSurface

extern SDL_DECLSPEC bool SDLCALL SDL_WindowHasSurface(SDL_Window *window)

Implementation

bool sdlWindowHasSurface(Pointer<SdlWindow> window) {
  final sdlWindowHasSurfaceLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlWindow> window),
        int Function(Pointer<SdlWindow> window)
      >('SDL_WindowHasSurface');
  return sdlWindowHasSurfaceLookupFunction(window) == 1;
}