<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 18.2.0 -",
    "macOS: 12.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenCaptureKit",
  "identifier" : "/documentation/ScreenCaptureKit/SCShareableContent/getExcludingDesktopWindows(_:onScreenWindowsOnlyBelow:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "ScreenCaptureKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCShareableContent(cm)getShareableContentExcludingDesktopWindows:onScreenWindowsOnlyBelowWindow:completionHandler:"
  },
  "title" : "getExcludingDesktopWindows(_:onScreenWindowsOnlyBelow:completionHandler:)"
}
-->

# getExcludingDesktopWindows(_:onScreenWindowsOnlyBelow:completionHandler:)

Retrieves the displays, apps, and windows that are behind the specified window.

```
class func getExcludingDesktopWindows(_ excludeDesktopWindows: Bool, onScreenWindowsOnlyBelow window: SCWindow, completionHandler: @escaping @Sendable (SCShareableContent?, (any Error)?) -> Void)
```

## Parameters

`excludeDesktopWindows`

A Boolean value that indicates whether to exclude desktop windows from the set of shareable content.

`window`

The window above which to retrieve shareable content.

`completionHandler`

A callback the system invokes with the shareable content, or an error if a failure occurs.

## Discussion

Use this method to retrieve the onscreen content matching your filtering criteria. If the call is successful, the system passes an [`SCShareableContent`](/documentation/ScreenCaptureKit/SCShareableContent) instance to the completion handler; otherwise, it returns an error that describes the failure.

---

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)