Registers a callback function to be invoked when local displays are refreshed or modified.
- macOS 10.0–10.8Deprecated
- UIKit for Mac 13.0–13.0Deprecated
- Core Graphics
A pointer to the callback function to be registered.
A pointer to user-defined data, or
userargument is passed back to the callback function each time it’s invoked.
A result code. See Core Graphics Data Types and Constants.
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 call the function
CGUnregister to remove the registration.
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.
In OS X v10.4 and earlier, the result code returned by this function is a random value and should be ignored. In macOS 10.5 and later, the result code is valid.