sdlGetWindowMouseGrab function

bool sdlGetWindowMouseGrab(
  1. Pointer<SdlWindow> window
)

Get a window's mouse grab mode.

\param window the window to query. \returns true if mouse is grabbed, and 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_GetWindowMouseRect \sa SDL_SetWindowMouseRect \sa SDL_SetWindowMouseGrab \sa SDL_SetWindowKeyboardGrab

extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window *window)

Implementation

bool sdlGetWindowMouseGrab(Pointer<SdlWindow> window) {
  final sdlGetWindowMouseGrabLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlWindow> window),
      int Function(Pointer<SdlWindow> window)>('SDL_GetWindowMouseGrab');
  return sdlGetWindowMouseGrabLookupFunction(window) == 1;
}