Contents

CGConfigureDisplayWithDisplayMode(_:_:_:_:)

Configures the display mode of a display.

Declaration

func CGConfigureDisplayWithDisplayMode(_ config: CGDisplayConfigRef?, _ display: CGDirectDisplayID, _ mode: CGDisplayMode?, _ options: CFDictionary?) -> CGError

Parameters

  • config:

    A display configuration you aquire by calling Cgbegindisplayconfiguration(_:).

  • display:

    The identifier of the display to configure.

  • mode:

    A display mode to configure.

  • options:

    Reserved for future expansion. Pass NULL for now.

Return Value

A result code. If the request to change modes is successful, the result is kCGErrorSuccess. For other possible values, see CGError.

Discussion

This function allows you to specify a display mode with which to configure the display using a transaction. Before using this function, call CGBeginDisplayConfiguration(_:) to acquire the display configuration token for the desired display. Call CGCompleteDisplayConfiguration(_:_:) to execute the transaction.

Using this function to change the mode of a display in a mirroring set might cause Quartz to adjust settings of the other displays in the set. When necessary, Quartz adjusts the bounds, resolutions, and depth of the displays to a safe mode with matching depth and the smallest enclosing size.

See Also

Functions