Generates and returns information about the selected windows in the current user session.
- macOS 10.5+
- Mac Catalyst 13.0+Beta
- Core Graphics
The options describing which window dictionaries to return. Typical options let you return dictionaries for all windows or for windows above or below the window specified in the
relativeparameter. For more information, see
Window List Option Constants.
The ID of the window to use as a reference point when determining which other window dictionaries to return. For options that do not require a reference window, this parameter can be
CGNull Window ID
An array of
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
You can use this function to get detailed information about the configuration of one or more windows in the current user session. For example, you can use this function to get the bounds of the window, its window ID, and information about how it is managed by the window server. For the list of keys and values that may be present in the dictionary, see Required Window List Keys and Optional Window List Keys.
Generating the dictionaries for system windows is a relatively expensive operation. As always, you should profile your code and adjust your usage of this function appropriately for your needs.