sdlxGetWindowMouseRect function video

SdlxRect? sdlxGetWindowMouseRect(
  1. Pointer<SdlWindow> window
)

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.2.0.

\sa SDL_SetWindowMouseRect \sa SDL_GetWindowMouseGrab \sa SDL_SetWindowMouseGrab

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

Implementation

SdlxRect? sdlxGetWindowMouseRect(Pointer<SdlWindow> window) {
  final resultPointer = sdlGetWindowMouseRect(window);
  if (resultPointer == nullptr) {
    return null;
  }
  final result = SdlxRect()..loadFromPointer(resultPointer);
  return result;
}