AXUIElement.h
Overview
See the Overview section above for header-level documentation.
Overview
Assistive applications use the functions defined in this header file to communicate with and control accessible applications running in macOS.
Each accessible user interface element in an application is represented by an AXUIElementRef, which is a CFTypeRef. AXUIElementRefs (like all CFTypeRefs) can be used with all the Core Foundation polymorphic functions, such as CFRetain, CFRelease, and CFEqual(_:_:).
All functions defined in this header file return kAXErrorSuccess on success. If there is some sort of system memory failure, such as the failure to allocate an object, all functions can return kAXErrorFailure. In the unlikely event that some process does not fully support the accessibility API, a function can return kAXErrorNotImplemented.
In addition, some functions can return the following error codes:
kAXErrorInvalidUIElementThe passed-in AXUIElementRef is invalid. All functions that include an AXUIElementRef parameter can return this error code.
kAXErrorIllegalArgumentAt least one of the arguments is illegal (for example, NIL passed in for a pointer).
kAXErrorCannotCompleteThere is a problem with messaging (such as when messaging to the server fails or when the accessible application is unresponsive or waiting for user input). All functions that perform messaging can return this error code.
kAXErrorAPIDisabledThe accessibility API is disabled. All functions that perform messaging can return this error code.
For more information on the definition and use of accessibility objects and in macOS accessibility support in general, see Accessibility Programming Guide for OS X.
Included Headers
<AvailabilityMacros.h>
<CoreFoundation/CoreFoundation.h>
<ApplicationServices/ApplicationServices.h>
Topics
Notification API
AXObserverAddNotification(_:_:_:_:)AXObserverCreate(_:_:_:)AXObserverCreateWithInfoCallback(_:_:_:)AXObserverGetRunLoopSource(_:)AXObserverGetTypeID()AXObserverRemoveNotification(_:_:_:)
Miscellaneous
AXIsProcessTrusted()AXIsProcessTrustedWithOptions(_:)AXUIElementCopyActionDescription(_:_:_:)AXUIElementCopyActionNames(_:_:)AXUIElementCopyAttributeNames(_:_:)AXUIElementCopyAttributeValue(_:_:_:)AXUIElementCopyAttributeValues(_:_:_:_:_:)AXUIElementCopyElementAtPosition(_:_:_:_:)AXUIElementCopyMultipleAttributeValues(_:_:_:_:)AXUIElementCopyParameterizedAttributeNames(_:_:)AXUIElementCopyParameterizedAttributeValue(_:_:_:_:)AXUIElementCreateApplication(_:)AXUIElementCreateSystemWide()AXUIElementGetAttributeValueCount(_:_:_:)AXUIElementGetPid(_:_:)AXUIElementGetTypeID()AXUIElementIsAttributeSettable(_:_:_:)AXUIElementPerformAction(_:_:)AXUIElementSetAttributeValue(_:_:_:)AXUIElementSetMessagingTimeout(_:_:)