<!--
{
  "documentType" : "article",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/window-list-option-constants",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Window List Option Constants"
}
-->

# Window List Option Constants

Specifies which windows in the current user session to include in a generated list.

## Discussion

The [`optionIncludingWindow`](/documentation/CoreGraphics/CGWindowListOption/optionIncludingWindow) and [`excludeDesktopElements`](/documentation/CoreGraphics/CGWindowListOption/excludeDesktopElements) constants may be combined with the other constants by adding (or ORing) them together and passing the resulting value to the appropriate function.

These constants let you retrieve windows in the current user session only. You cannot use them to retrieve windows from other active user sessions running on the system.

## Topics

### Constants

[`static var optionAll: CGWindowListOption`](/documentation/CoreGraphics/CGWindowListOption/optionAll)

[`static var optionOnScreenOnly: CGWindowListOption`](/documentation/CoreGraphics/CGWindowListOption/optionOnScreenOnly)

[`static var optionOnScreenAboveWindow: CGWindowListOption`](/documentation/CoreGraphics/CGWindowListOption/optionOnScreenAboveWindow)

[`static var optionOnScreenBelowWindow: CGWindowListOption`](/documentation/CoreGraphics/CGWindowListOption/optionOnScreenBelowWindow)

[`static var optionIncludingWindow: CGWindowListOption`](/documentation/CoreGraphics/CGWindowListOption/optionIncludingWindow)

[`static var excludeDesktopElements: CGWindowListOption`](/documentation/CoreGraphics/CGWindowListOption/excludeDesktopElements)



---

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)