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

# CGEventSetLocation

Sets the location of a Quartz mouse event.

```
extern void CGEventSetLocation(CGEventRef event, CGPoint location);
```

## Parameters

`event`

The mouse event whose location to set.

`location`

The new location of the specified mouse event in global display coordinates.

## Discussion

---

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)