<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGGetLastMouseDelta",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGGetLastMouseDelta"
  },
  "title" : "CGGetLastMouseDelta"
}
-->

# CGGetLastMouseDelta

Reports the change in mouse position since the last mouse movement event received by the application.

```
extern void CGGetLastMouseDelta(int32_t *deltaX, int32_t *deltaY);
```

## Parameters

`deltaX`

A pointer to a `int32_t` variable. On return, this variable contains the horizontal change in the mouse position since the last mouse movement event.

`deltaY`

A pointer to a `int32_t` variable. On return, this variable contains the vertical change in the mouse position since the last mouse movement event.

## Discussion

This function is not recommended for general use. Instead, you should use the mouse-tracking functions provided by the `NSEvent` class.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)