The PFAssistive framework is an Objective-C wrapper for Apple's accessibility API. It enables you to use familiar Cocoa techniques to write assistive applications for persons with disabilities as well as other applications that monitor and control User Interface elements in any application running on the computer.

The accessibility API is a set of C header files located in the HIServices subframework of the Mac OS X ApplicationServices framework, in /System/Library/Frameworks. The API was introduced in Mac OS X 10.2.0 Jaguar and is installed by default on every Macintosh computer running Mac OS X 10.2 or newer. See Apple's Accessibility (ApplicationServices/HIServices Reference and its Accessibility Roles and Attributes Reference for documentation of the C API.

All standard UI elements in Cocoa and Carbon applications are prewired to support the accessibility API. Custom elements in an application may have been written to support the accessibility API, as well. However, some applications use custom elements that do not support the accessibility API.

The PFAssistive framework is brought to you by PFiddlesoft. You can see it in use by downloading the free 30-day trial version of UI Browser, available at pfiddlesoft.com/frameworks/. The framework has been the engine underlying UI Browser since UI Browser was introduced in 2003. The PFAssistive framework automatically works around all known accessibility API bugs. It is designed to make the accessibility API work seamlessly with applications based on Apple's Cocoa frameworks, using convenient Objective-C techniques such as delegate methods.

Sample code in the form of a simple screen reader is provided with the framework.

This documentation is written for version 3.0 of the framework. Version 3.0 requires Mac OS X 10.5 Leopard or newer, and it supports all accessibility features introduced through Mac OS X 10.6 Snow Leopard. It is a universal binary supporting clients that run natively on PowerPC or Intel processors using a 32-bit or 64-bit architecture with reference counted memory management. Support for garbage-collected client applications is not yet available.

Public methods in the framework, unless otherwise noted, take Objective-C objects as parameters and, when they return Objective-C objects, return them autoreleased. Unless otherwise noted, methods with return values return nil, NULL, 0, or NO in the event of an error.

The framework uses CFTypeRef-style Core Foundation structures internally, particularly the accessibility API's AXUIElementRef and AXObserverRef. The framework contains a few public methods that return CFTypeRef-style structures. All such structures are returned CFRetained.

The two most important classes in the framework are PFUIElement and PFObserver. The PFUIElement.h header covers the part of the accessibility API that reads and controls user interface elements in running applications, such as menus, windows, and buttons. The PFObserver.h header covers the part of the accessibility API that observes user interface elements in running applications and receives notifications in real time when changes occur.

The PFAssistive Framework is copyrighted software. See the licenses embedded in the framework bundle for applicable terms and conditions of use.



Headers

PFObserver
PFUIElement

Functions

-[ PFApplicationUIElement elementAtPoint: ]
-[ PFApplicationUIElement initSystemWideWithDelegate: ]
-[ PFApplicationUIElement initWithPath:delegate: ]
-[ PFApplicationUIElement initWithPid:delegate: ]
-[ PFApplicationUIElement pidNumber ]
-[ PFApplicationUIElement typeCharacters:keyCode:withModifierFlags: ]
+[ PFApplicationUIElement typeCharactersSystemWide:keyCode:withModifierFlags: ]
-[ PFObserver delegate ]
-[ PFObserver description ]
-[ PFObserver initWithPath: ]
-[ PFObserver initWithPath:notificationDelegate:callbackSelector: ]
-[ PFObserver initWithPid: ]
-[ PFObserver initWithPid:notificationDelegate:callbackSelector: ]
-[ PFObserver invalidate ]
-[ PFObserver isEqualToObserver: ]
-[ PFObserver isRegisteredForNotification:fromElement: ]
-[ PFObserver isValid ]
+[ PFObserver observersForPid: ]
+[ PFObserver observerWithName: ]
+[ PFObserver observerWithName:notificationDelegate:callbackSelector: ]
+[ PFObserver observerWithPid: ]
+[ PFObserver observerWithPid:notificationDelegate:callbackSelector: ]
-[ PFObserver pidNumber ]
-[ PFObserver registerForNotification:fromElement:contextInfo: ]
-[ PFObserver registrations ]
+[ PFObserver removeObserversForPid: ]
-[ PFObserver setDelegate: ]
-[ PFObserver unregisterForAllNotifications ]
-[ PFObserver unregisterForAllNotificationsFromElement: ]
-[ PFObserver unregisterForNotification:fromElement: ]
+[ PFObserverDelegate applicationWithIdentifier:atPath:didPostAccessibilityNotification:fromObservedUIElement:forAffectedUIElement: ]
-[ PFUIElement(Attributes) AXAttributedStringForRange: ]
-[ PFUIElement(Attributes) AXBoundsForRange: ]
-[ PFUIElement(Attributes) AXCellForColumnAndRow: ]
-[ PFUIElement(Attributes) AXLayoutPointForScreenPoint: ]
-[ PFUIElement(Attributes) AXLayoutSizeForScreenSize: ]
-[ PFUIElement(Attributes) AXLineForIndex: ]
-[ PFUIElement(Attributes) AXRangeForIndex: ]
-[ PFUIElement(Attributes) AXRangeForLine: ]
-[ PFUIElement(Attributes) AXRangeForPosition: ]
-[ PFUIElement(Attributes) AXRTFForRange: ]
-[ PFUIElement(Attributes) AXScreenPointForLayoutPoint: ]
-[ PFUIElement(Attributes) AXScreenSizeForLayoutSize: ]
-[ PFUIElement(Attributes) AXStringForRange: ]
-[ PFUIElement(Attributes) AXStyleRangeForIndex: ]
-[ PFUIElement actions ]
-[ PFUIElement activateApplication ]
-[ PFUIElement applicationElement ]
-[ PFUIElement attributedStringFromAXAttributedString: ]
-[ PFUIElement attributes ]
-[ PFUIElement childrenCount ]
-[ PFUIElement clippedRect ]
-[ PFUIElement delegate ]
-[ PFUIElement description ]
-[ PFUIElement descriptionForAction: ]
-[ PFUIElement descriptionForAttribute: ]
+[ PFUIElement descriptionForNotification: ]
-[ PFUIElement descriptionForSubrole: ]
-[ PFUIElement descriptionOfTypeForAttribute: ]
+[ PFUIElement elementAtPoint:withDelegate:error: ]
-[ PFUIElement elementInfo ]
-[ PFUIElement elementRef ]
+[ PFUIElement elementsWithRole:inArray: ]
-[ PFUIElement exists ]
-[ PFUIElement existsAction: ]
-[ PFUIElement existsAttribute: ]
-[ PFUIElement existsNonParameterizedAttribute: ]
-[ PFUIElement existsParameterizedAttribute: ]
-[ PFUIElement existsValueForAttribute: ]
+[ PFUIElement firstElementWithRole:inArray: ]
-[ PFUIElement indexAmongLikeElementsInArray: ]
-[ PFUIElement initWithElementRef:delegate: ]
-[ PFUIElement invalidate ]
+[ PFUIElement isAccessEnabled ]
+[ PFUIElement isAccessImplemented ]
-[ PFUIElement isEqualToElement: ]
-[ PFUIElement isParameterizedAttribute: ]
+[ PFUIElement isProcessTrusted ]
-[ PFUIElement isRole: ]
-[ PFUIElement isSettableAttribute: ]
-[ PFUIElement isSiblingOfElement: ]
-[ PFUIElement isValid ]
-[ PFUIElement isVisibleAtPoint: ]
-[ PFUIElement nonParameterizedAttributes ]
-[ PFUIElement notifications ]
+[ PFUIElement notifications ]
-[ PFUIElement parameterizedAttributes ]
-[ PFUIElement parentPath ]
-[ PFUIElement path ]
-[ PFUIElement performAction: ]
-[ PFUIElement pid ]
-[ PFUIElement setDelegate: ]
-[ PFUIElement setElementInfo: ]
-[ PFUIElement setElementRef: ]
-[ PFUIElement setExists: ]
-[ PFUIElement setMessagingTimeout: ]
-[ PFUIElement setValue:forAttribute: ]
-[ PFUIElement typeForAttribute: ]
-[ PFUIElement valueForAttribute: ]
-[ PFUIElement valueForAttribute:atIndex: ]
-[ PFUIElement valueForAttribute:parameter: ]
-[ PFUIElement valuesForAttributes: ]
+[ PFUIElementDelegate PFUIElementReportError: ]
+[ PFUIElementDelegate PFUIElementWasDestroyed: ]