CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)
Modifies the settings of the built-in fade effect that occurs during a display configuration.
Declaration
func CGConfigureDisplayFadeEffect(_ config: CGDisplayConfigRef?, _ fadeOutSeconds: CGDisplayFadeInterval, _ fadeInSeconds: CGDisplayFadeInterval, _ fadeRed: Float, _ fadeGreen: Float, _ fadeBlue: Float) -> CGErrorParameters
- config:
A display configuration, acquired by calling Cgbegindisplayconfiguration(_:).
- fadeOutSeconds:
The time, in seconds, to fade from the normal display to the specified fade color. The fade out is completed before the display configuration is changed. If the interval is 0, Quartz applies the color immediately.
- fadeInSeconds:
The time, in seconds, to return from the specified fade color to the normal display. The fade-in is run asynchronously after the display configuration is changed.
- fadeRed:
An intensity value in the interval [0, 1] that represents the red component of the desired blend color.
- fadeGreen:
An intensity value in the interval [0, 1] that represents the green component of the desired blend color.
- fadeBlue:
An intensity value in the interval [0, 1] that represents the blue component of the desired blend color.
Return Value
A result code. See Core Graphics Data Types and Constants.
Discussion
This function provides a way to customize the built-in fade effect that Quartz performs when displays are reconfigured. The default time settings for this fade effect are 0.3 seconds to fade out, and 0.5 seconds to fade back in. The default fade color is French Blue for a normal desktop, and black for a captured display.
Before using this function, you need to call CGBeginDisplayConfiguration(_:) to acquire the display configuration token for the desired display. No fade reservation is needed—when you call CGCompleteDisplayConfiguration(_:_:), Quartz reserves the fade hardware (assuming it is available) and performs the fade.
Calling this function modifies the fade behavior for a single display configuration and has no permanent effect.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()CGDirectDisplayCopyCurrentMetalDevice(_:)