AXObserverCreate(_:_:_:)
Creates a new observer that can receive notifications from the specified application.
Declaration
func AXObserverCreate(_ application: pid_t, _ callback: AXObserverCallback, _ 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, AXObserverCreate 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 AXObserverCallback.