---
title: "windowNumbers(options:)"
framework: appkit
role: symbol
role_heading: Type Method
path: "appkit/nswindow/windownumbers(options:)"
---

# windowNumbers(options:)

Returns the window numbers for all visible windows satisfying the specified options.

## Declaration

```swift
class func windowNumbers(options: NSWindow.NumberListOptions = []) -> [NSNumber]?
```

## Parameters

- `options`: The possible options are specified in doc://com.apple.appkit/documentation/AppKit/NSWindow/NumberListOptions.

## Return Value

Return Value An array of window numbers for all visible windows satisfying the specified options. (Windows on the active space are returned in z-order; that is, front to back.)

## See Also

### Accessing Window Information

- [depthLimit](appkit/nswindow/depthlimit.md)
- [hasDynamicDepthLimit](appkit/nswindow/hasdynamicdepthlimit.md)
- [defaultDepthLimit](appkit/nswindow/defaultdepthlimit.md)
- [windowNumber](appkit/nswindow/windownumber.md)
- [deviceDescription](appkit/nswindow/devicedescription.md)
- [NSDeviceDescriptionKey](appkit/nsdevicedescriptionkey.md)
- [canBecomeVisibleWithoutLogin](appkit/nswindow/canbecomevisiblewithoutlogin.md)
- [sharingType](appkit/nswindow/sharingtype-swift.property.md)
- [backingType](appkit/nswindow/backingtype.md)
- [displayLink(target:selector:)](appkit/nswindow/displaylink(target:selector:).md)
