sdlWindowHasSurface function

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

\sa SDL_GetWindowSurface

extern SDL_DECLSPEC bool SDLCALL SDL_WindowHasSurface(SDL_Window *window)

Implementation

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