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

# CGWindowListCreateDescriptionFromArray(_:)

Generates and returns information about windows with the specified window IDs.

```
func CGWindowListCreateDescriptionFromArray(_ windowArray: CFArray?) -> CFArray?
```

## Parameters

`windowArray`

An array of [`CGWindowID`](/documentation/CoreGraphics/CGWindowID) types, each of which corresponds to a window whose information you want to retrieve.

## Return Value

An array of <doc://com.apple.documentation/documentation/CoreFoundation/CFDictionary> types, each of which contains information about one of the windows in the current user session. If there are no windows matching the desired criteria, the function returns an empty array. If you call this function from outside of a GUI security session or when no window server is running, this function returns `NULL`.

## Discussion

This function ignores any window IDs in the `windowArray` parameter that refer to windows that no longer exist. (This can occur if the user closes a window between the time you retrieve its ID and the time you call this function.) You should therefore not assume that the returned array of dictionaries contains the same number of entries as this parameter. To make it easier to associate window IDs with the correct information, however, each dictionary does contain a [`kCGWindowNumber`](/documentation/CoreGraphics/kCGWindowNumber) key whose value is the corresponding window ID. For the list of keys and values that may be present in the dictionary, see [Required Window List Keys](/documentation/CoreGraphics/required-window-list-keys) and [Optional Window List Keys](/documentation/CoreGraphics/optional-window-list-keys).

---

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)