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

# CGCaptureAllDisplays()

Obtains exclusive use of all active displays, preventing other applications and system services from using the display or changing its configuration.

```
func CGCaptureAllDisplays() -> CGError
```

## Return Value

A result code. To interpret the result code, see [`CGError`](/documentation/CoreGraphics/CGError).

## Discussion

This function captures all attached displays in a single operation. When an application captures a display, Quartz doesn’t allow other applications and system services to use the display or change its configuration. This can provide a more immersive environment for your application.

---

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)