sdlSetWindowMouseGrab function
Set a window's mouse grab mode.
Mouse grab confines the mouse cursor to the window.
\param window The window for which the mouse grab mode should be set. \param grabbed This is SDL_TRUE to grab mouse, and SDL_FALSE to release.
\since This function is available since SDL 2.0.16.
\sa SDL_GetWindowMouseGrab \sa SDL_SetWindowKeyboardGrab \sa SDL_SetWindowGrab
extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window, SDL_bool grabbed)
Implementation
void sdlSetWindowMouseGrab(Pointer<SdlWindow> window, bool grabbed) {
final sdlSetWindowMouseGrabLookupFunction = libSdl2.lookupFunction<
Void Function(Pointer<SdlWindow> window, Int32 grabbed),
void Function(
Pointer<SdlWindow> window, int grabbed)>('SDL_SetWindowMouseGrab');
return sdlSetWindowMouseGrabLookupFunction(window, grabbed ? 1 : 0);
}