sdlGetWindowKeyboardGrab function

bool sdlGetWindowKeyboardGrab(
  1. Pointer<SdlWindow> window
)

Get a window's keyboard grab mode.

\param window the window to query. \returns true if keyboard is grabbed, and false otherwise.

\since This function is available since SDL 3.1.3.

\sa SDL_SetWindowKeyboardGrab

extern SDL_DECLSPEC bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window *window)

Implementation

bool sdlGetWindowKeyboardGrab(Pointer<SdlWindow> window) {
  final sdlGetWindowKeyboardGrabLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlWindow> window),
      int Function(Pointer<SdlWindow> window)>('SDL_GetWindowKeyboardGrab');
  return sdlGetWindowKeyboardGrabLookupFunction(window) == 1;
}