---
title: "CGGetDisplaysWithPoint(_:_:_:_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cggetdisplayswithpoint(_:_:_:_:)"
---

# CGGetDisplaysWithPoint(_:_:_:_:)

Provides a list of online displays with bounds that include the specified point.

## Declaration

```swift
func CGGetDisplaysWithPoint(_ point: CGPoint, _ maxDisplays: UInt32, _ displays: UnsafeMutablePointer<CGDirectDisplayID>?, _ matchingDisplayCount: UnsafeMutablePointer<UInt32>?) -> CGError
```

## Parameters

- `point`: The coordinates of a point in the global display coordinate space. The origin is the upper-left corner of the main display.
- `maxDisplays`: The size of the displays array. This value determines the maximum number of displays the list includes.
- `displays`: A pointer to storage you provide for an array of display IDs. On return, the array contains a list of displays with bounds that include the point. If you pass NULL, on return the display count contains the total number of displays with bounds that include the point.
- `matchingDisplayCount`: A pointer to a display count variable you provide. On return, the display count contains the actual number of displays the list includes in the dspys array. This value is at most maxDisplays.

## Return Value

Return Value A result code. To interpret the result code, see CGError.

## Discussion

Discussion If the displays array is nil, this function ignores the maxDisplays parameter. If the maxDisplays parameter is 0, this function ignores the displays array. In any case, this function fills in the matchingDisplayCount pointer with the number of displays that contain the specified point.

## 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)
