getMouseRect method

Rectangle<double>? getMouseRect()

Get the mouse confinement rectangle of a window.

\param window the window to query. \returns a pointer to the mouse confinement rectangle of a window, or NULL if there isn't one.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_SetWindowMouseRect \sa SDL_GetWindowMouseGrab \sa SDL_SetWindowMouseGrab

extern SDL_DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window *window)

Implementation

math.Rectangle<double>? getMouseRect() {
  math.Rectangle<double>? result;
  var rectPointer = sdlGetWindowMouseRect(this);
  if (rectPointer != nullptr) {
    result = rectPointer.create();
  }
  return result;
}