CGScreenRegisterMoveCallback(_:_:)
Registers a callback function to be invoked when an area of the display is moved.
Declaration
func CGScreenRegisterMoveCallback(_ callback: CGScreenUpdateMoveCallback, _ userInfo: UnsafeMutableRawPointer?) -> CGErrorParameters
- callback:
A pointer to the callback function to be registered.
- userInfo:
A pointer to user-defined data, or
NULL. TheuserInfoargument is passed back to the callback function each time it’s invoked.
Return Value
A result code. See Core Graphics Data Types and Constants.
Discussion
A callback function may be registered multiple times with different user-defined data pointers, resulting in multiple registration entries. For each registration, when notification is no longer needed, you should remove the registration by calling the function CGScreenUnregisterMoveCallback(_:_:).
The callback function you register is invoked only if your application has an active event loop. The callback is invoked in the same thread of execution that is processing events within your application.
Special Considerations
This function is implemented in macOS 10.4.3 and later.
See Also
Functions
CGAcquireDisplayFadeReservation(_:_:)CGAssociateMouseAndMouseCursorPosition(_:)CGBeginDisplayConfiguration(_:)CGCancelDisplayConfiguration(_:)CGCaptureAllDisplays()CGCaptureAllDisplaysWithOptions(_:)CGCompleteDisplayConfiguration(_:_:)CGConfigureDisplayFadeEffect(_:_:_:_:_:_:)CGConfigureDisplayMirrorOfDisplay(_:_:_:)CGConfigureDisplayMode(_:_:_:)CGConfigureDisplayOrigin(_:_:_:_:)CGConfigureDisplayStereoOperation(_:_:_:_:)CGConfigureDisplayWithDisplayMode(_:_:_:_:)CGCursorIsDrawnInFramebuffer()CGCursorIsVisible()