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

# CGScrollEventUnit

Constants that specify the unit of measurement for a scrolling event.

```
enum CGScrollEventUnit
```

## Overview

You may pass one of these constants to the function [`CGEventCreateScrollWheelEvent`](/documentation/CoreGraphics/CGEventCreateScrollWheelEvent) to specify the unit of measurement for the event. The constant `kCGScrollEventUnitPixel` produces an event that most applications interpret as a smooth scrolling event. By default, the scale is about ten pixels per line. You can alter the scale with the function [`CGEventSourceSetPixelsPerLine`](/documentation/CoreGraphics/CGEventSourceSetPixelsPerLine).

## Topics

### Constants

[`CGScrollEventUnit.pixel`](/documentation/CoreGraphics/CGScrollEventUnit/pixel)

Specifies that the unit of measurement is pixels.

[`CGScrollEventUnit.line`](/documentation/CoreGraphics/CGScrollEventUnit/line)

Specifies that the unit of measurement is lines.



---

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)