Quartz Window Services

Provides information about the windows managed by the macOS window server.

Overview

This includes the onscreen windows seen on the user’s desktop and any offscreen windows used by the running applications. You can also use Quartz Window Services to generate images based on the contents of windows.

Symbols

Getting Window Information

func CGWindowListCopyWindowInfo(CGWindowListOption, CGWindowID)

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

func CGWindowListCreateDescriptionFromArray(CFArray?)

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

func CGWindowListCreateImage(CGRect, CGWindowListOption, CGWindowID, CGWindowImageOption)

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

Data Types

CGWindowID

The data type used to store window identifiers.

CGWindowListOption

The data type used to specify the options for gathering a list of windows.

CGWindowImageOption

The data type to use to specify the type of image to be generated for a window.

CGWindowSharingType

The data type used to specify the sharing mode used by a window.

CGWindowBackingType

The data type used to specify the backing option for a given window.

Constants

Window Sharing Constants

Specifies whether and how windows are shared between applications.

Backing Store Types

Specifies how drawing commands are buffered by the window device.

Window List Option Constants

Specifies which windows in the current user session to include in a generated list.

Window Image Types

Specifies the options for capturing an image of a window.

Required Window List Keys

The keys that are guaranteed to be available in a window’s information dictionary.

Optional Window List Keys

The keys that may optionally be available inside a window’s information dictionary.