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/uibrowser/. 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.1.2 of the framework. This version 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 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.