PFAssistive FrameworkIntroduction
An Objective-C framework for Cocoa wrapping Apple's accessibility API DiscussionThe 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 macOS ApplicationServices framework. The API was introduced in Mac OS X 10.2 (Jaguar) and is installed by default on every Macintosh computer running Jaguar or later. See Apple's ApplicationServices Framework reference document and, if you can find it, the old Apple Accessibility (ApplicationServices/HIServices) Reference and its Accessibility Roles and Attributes Reference for documentation of the C API, and the Accessibility Programming Guide for OS X and NSAccessibility Protocol Reference for documentation of the method-based NSAccessibilityProtocol introduced in OS X Yosemite 10.10. 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.9.0 of the framework. This version requires Mac OS X 10.7 (Lion) or later, and it supports accessibility features introduced through macOS Mojave 10.14. It is a universal binary supporting clients that run natively on Intel processors using a 64-bit architecture with reference counted memory management or ARC. It supports clients that are written in Objective-C or Swift. 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 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 monitors 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. |