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

# CGEventCreateScrollWheelEvent

Returns a new Quartz scrolling event.

```
extern CGEventRefCGEventCreateScrollWheelEvent(CGEventSourceRef source, CGScrollEventUnit units, uint32_t wheelCount, int32_t wheel1, ...);
```

## Discussion

### Parameters

- source: An event source taken from another event, or `NULL`.
- units: The unit of measurement for the scrolling event. Pass one of the constants listed in [`CGScrollEventUnit`](/documentation/CoreGraphics/CGScrollEventUnit).
- wheelCount: The number of scrolling devices on the mouse, up to a maximum of 3.
- wheel1: A value that reflects the movement of the primary scrolling device on the mouse. Scrolling movement is generally represented by small signed integer values, typically in a range from -10 to +10.  Large values may have unexpected results, depending on the application that processes the event.
- …: Up to two values that reflect the movements of the other scrolling devices on the mouse, if any.

### Returns

A new scrolling event, or `NULL` if the event could not be created. When you no longer need the event, you should release it using the function `CFRelease`.

## Discussion

This function allows you to create a scrolling event and customize the event before posting it to the event system.

---

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)