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


CFArrayRef CGWindowListCreateDescriptionFromArray(CFArrayRef windowArray);



An array of CGWindowID types, each of which corresponds to a window whose information you want to retrieve.

Return Value

An array of CFDictionaryRef 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.


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 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 and Optional Window List Keys.

See Also

Getting Window Information


Generates and returns information about the selected windows in the current user session.


Returns the list of window IDs associated with the specified windows in the current user session.


Returns a composite image based on a dynamically generated list of windows.


Returns a composite image of the specified windows.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software