sdlGetWindowMouseGrab function

bool sdlGetWindowMouseGrab(
  1. Pointer<SdlWindow> window
)

Get a window's mouse grab mode.

\param window the window to query \returns SDL_TRUE if mouse is grabbed, and SDL_FALSE otherwise.

\since This function is available since SDL 2.0.16.

\sa SDL_SetWindowKeyboardGrab \sa SDL_GetWindowGrab

extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window * window)

Implementation

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