<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.6.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindowList",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@F@NSWindowList"
  },
  "title" : "NSWindowList"
}
-->

# NSWindowList

Gets information about onscreen windows.

```
extern void NSWindowList(NSInteger size, NSInteger list[]);
```

## Discussion

Provides an ordered list of all onscreen windows. It fills `list` with up to `size` window numbers; the order of windows in the array is the same as their order in the window server’s screen list (their front-to-back order on the screen). Use the count obtained by [`NSCountWindows`](/documentation/AppKit/NSCountWindows) to specify the size of the array for this function.

---

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)