CGWaitForScreenRefreshRects(_:_:)
Waits for screen refresh operations.
Declaration
func CGWaitForScreenRefreshRects(_ rects: UnsafeMutablePointer<UnsafeMutablePointer<CGRect>?>?, _ count: UnsafeMutablePointer<UInt32>?) -> CGErrorParameters
- rects:
A pointer to a
CGRect*variable. On return, the variable contains an array of rectangles that bound the refreshed areas, specified in the global display coordinate space. When you no longer need the array, you should deallocate it by calling Cgreleasescreenrefreshrects(_:). - count:
A pointer to a
CGRectCountvariable. On return, the variable contains the number of entries in the returned array of rectangles.
Return Value
A result code. See Core Graphics Data Types and Constants.
Discussion
In some applications it may be preferable to wait for screen-refresh data synchronously, using this function. You should call this function in a thread other than the main event-processing thread.
As an alternative, Quartz also supports asynchronous notification—see CGRegisterScreenRefreshCallback(_:_:). If refresh callback functions are registered, this function should not be used.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()