Contents

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?>) -> AXError

Parameters

  • 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:

kAXErrorIllegalArgument

One or more of the arguments is an illegal value.

kAXErrorFailure

There is some sort of system memory failure.

Discussion

When an observed notification is received, it is passed to AXObserverCallbackWithInfo.

See Also

Notification API