---
title: "CGGetOnlineDisplayList(_:_:_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cggetonlinedisplaylist(_:_:_:)"
---

# CGGetOnlineDisplayList(_:_:_:)

Provides a list of displays that are online (active, mirrored, or sleeping).

## Declaration

```swift
func CGGetOnlineDisplayList(_ maxDisplays: UInt32, _ onlineDisplays: UnsafeMutablePointer<CGDirectDisplayID>?, _ displayCount: UnsafeMutablePointer<UInt32>?) -> CGError
```

## Parameters

- `maxDisplays`: The size of the onlineDisplays array. This value determines the maximum number of display IDs that can be returned.
- `onlineDisplays`: A pointer to storage provided by the caller for an array of display IDs. On return, the array contains a list of the online displays. If you pass NULL, on return the display count contains the total number of online displays.
- `displayCount`: A pointer to a display count variable provided by the caller. On return, the display count contains the actual number of displays returned in the onlineDisplays array. This value is at most maxDisplays.

## Return Value

Return Value A result code. See Core Graphics Data Types and Constants.

## Discussion

Discussion If the framebuffer hardware is connected, a display is considered connected or online. When hardware mirroring is used, a display can be online but not active or drawable. Programs that manipulate display settings (such as gamma tables) need access to all displays, including hardware mirrors, which are not drawable.

## See Also

### Functions

- [CGAcquireDisplayFadeReservation(_:_:)](coregraphics/cgacquiredisplayfadereservation(_:_:).md)
- [CGAssociateMouseAndMouseCursorPosition(_:)](coregraphics/cgassociatemouseandmousecursorposition(_:).md)
- [CGBeginDisplayConfiguration(_:)](coregraphics/cgbegindisplayconfiguration(_:).md)
- [CGCancelDisplayConfiguration(_:)](coregraphics/cgcanceldisplayconfiguration(_:).md)
- [CGCaptureAllDisplays()](coregraphics/cgcapturealldisplays().md)
- [CGCaptureAllDisplaysWithOptions(_:)](coregraphics/cgcapturealldisplayswithoptions(_:).md)
- [CGCompleteDisplayConfiguration(_:_:)](coregraphics/cgcompletedisplayconfiguration(_:_:).md)
- [CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)](coregraphics/cgconfiguredisplayfadeeffect(_:_:_:_:_:_:).md)
- [CGConfigureDisplayMirrorOfDisplay(_:_:_:)](coregraphics/cgconfiguredisplaymirrorofdisplay(_:_:_:).md)
- [CGConfigureDisplayMode(_:_:_:)](coregraphics/cgconfiguredisplaymode(_:_:_:).md)
- [CGConfigureDisplayOrigin(_:_:_:_:)](coregraphics/cgconfiguredisplayorigin(_:_:_:_:).md)
- [CGConfigureDisplayStereoOperation(_:_:_:_:)](coregraphics/cgconfiguredisplaystereooperation(_:_:_:_:).md)
- [CGConfigureDisplayWithDisplayMode(_:_:_:_:)](coregraphics/cgconfiguredisplaywithdisplaymode(_:_:_:_:).md)
- [CGCursorIsDrawnInFramebuffer()](coregraphics/cgcursorisdrawninframebuffer().md)
- [CGCursorIsVisible()](coregraphics/cgcursorisvisible().md)
