CGAcquireDisplayFadeReservation(_:_:)
Reserves the fade hardware for a specified time interval.
Declaration
func CGAcquireDisplayFadeReservation(_ seconds: CGDisplayReservationInterval, _ token: UnsafeMutablePointer<CGDisplayFadeReservationToken>?) -> CGErrorParameters
- seconds:
The desired number of seconds to reserve the fade hardware. An application can specify any value in the interval
(0, kCGMaxDisplayReservationInterval]. - token:
A pointer to storage (provided by the caller) for a fade reservation token. On return, the storage contains a new token.
Return Value
Returns CGError.noneAvailable if another fade reservation is in effect. Otherwise, returns CGError.success.
Discussion
Before performing a fade operation, an application must reserve the fade hardware for a specified period of time. Quartz returns a token that represents a new fade reservation. The application uses this token as an argument in subsequent calls to other display fade functions.
During the fade reservation interval, the application has exclusive rights to use the fade hardware. At the end of the interval, the token becomes invalid and the hardware automatically returns to a normal state. Typically, the application calls CGReleaseDisplayFadeReservation(_:) to release the fade reservation before it expires.
See Also
Functions
CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()CGDirectDisplayCopyCurrentMetalDevice(_:)