AXObserverCreateWithInfoCallback(_:_:_:)
Creates a new observer that can receive notifications with an information dictionary from the specified application.
Declaration
func AXObserverCreateWithInfoCallback(_ application: pid_t, _ callback: AXObserverCallbackWithInfo, _ outObserver: UnsafeMutablePointer<AXObserver?>) -> AXErrorParameters
- application:
The process ID of the application.
- callback:
The callback function.
- outObserver:
On return, an AXObserverRef representing the observer object.
Return Value
If unsuccessful, AXObserverCreateWithInfoCallback may return one of the following error codes, among others:
kAXErrorIllegalArgumentOne or more of the arguments is an illegal value.
kAXErrorFailureThere is some sort of system memory failure.
Discussion
When an observed notification is received, it is passed to AXObserverCallbackWithInfo.