ADC Home > Reference Library > Reference > User Experience > Accessibility > Accessibility (ApplicationServices/HIServices) Reference

 


AXNotificationConstants.h

Overview

Assistive applications can register to be notified about certain events in a target application. For example, creation of a window or the destruction of a UIElement. To receive notifications you must first create an observer and specify a callback function; second, add the observer's run loop source to the run loop on which you want the callback executed; and third, register the observer for one or more notifications.

When you create the observer, you specify the application being observed. An observer can receive notifications only from UIElements in that application. To handle multiple applications, you have to create at least one observer per application.

When you register an observer for a notification, you specify the UIElement you are interested in observing. When you want to receive a notification from any element in an application, use the application UIElement; you then receive the notification regardless of which element in the application sends the notification. This is useful if the UIElement does not exist yet, such as when a new window is created, or if you care about state changes, such as the keyboard focus moving, without having to observe every element separately. When the callback function is executed it is passed the UIElement that was affected by the notification.

Observers are represented by the AXObserverRef type, which is a CFType. Like all CFTypes they are reference counted (CFRetain/CFRelease).



Groups

Table

and Outline Notifications

Group members:

kAXRowCountChangedNotification
kAXSelectedColumnsChangedNotification
kAXSelectedRowsChangedNotification

 

New

Drawer, Sheet, and Help Notifications

Group members:

kAXDrawerCreatedNotification
kAXHelpTagCreatedNotification
kAXSheetCreatedNotification

 

Other

Notifications

Group members:

kAXCreatedNotification
kAXMovedNotification
kAXResizedNotification
kAXSelectedChildrenChangedNotification
kAXSelectedTextChangedNotification

 

Focus

Notifications

Group members:

kAXFocusedUIElementChangedNotification
kAXFocusedWindowChangedNotification
kAXMainWindowChangedNotification

 

Application

Notifications

Group members:

kAXApplicationActivatedNotification
kAXApplicationDeactivatedNotification
kAXApplicationHiddenNotification
kAXApplicationShownNotification

 

Element

Notifications

Group members:

kAXUIElementDestroyedNotification
kAXValueChangedNotification

 

Window

Notifications

Group members:

kAXWindowCreatedNotification
kAXWindowDeminiaturizedNotification
kAXWindowMiniaturizedNotification
kAXWindowMovedNotification
kAXWindowResizedNotification

 

Menu

Notifications

Group members:

kAXMenuClosedNotification
kAXMenuItemSelectedNotification
kAXMenuOpenedNotification

#defines


kAXApplicationActivatedNotification


#define kAXApplicationActivatedNotification CFSTR("AXApplicationActivated") 


kAXApplicationDeactivatedNotification


#define kAXApplicationDeactivatedNotification CFSTR("AXApplicationDeactivated") 


kAXApplicationHiddenNotification


#define kAXApplicationHiddenNotification CFSTR("AXApplicationHidden") 


kAXApplicationShownNotification


#define kAXApplicationShownNotification CFSTR("AXApplicationShown") 


kAXCreatedNotification


#define kAXCreatedNotification CFSTR("AXCreated") 
Discussion

An element was created.


kAXDrawerCreatedNotification


#define kAXDrawerCreatedNotification CFSTR("AXDrawerCreated") 


kAXFocusedUIElementChangedNotification


#define kAXFocusedUIElementChangedNotification CFSTR("AXFocusedUIElementChanged") 


kAXFocusedWindowChangedNotification


#define kAXFocusedWindowChangedNotification CFSTR("AXFocusedWindowChanged") 


kAXHelpTagCreatedNotification


#define kAXHelpTagCreatedNotification CFSTR("AXHelpTagCreated") 


kAXMainWindowChangedNotification


#define kAXMainWindowChangedNotification CFSTR("AXMainWindowChanged") 


kAXMenuClosedNotification


#define kAXMenuClosedNotification CFSTR("AXMenuClosed") 


kAXMenuItemSelectedNotification


#define kAXMenuItemSelectedNotification CFSTR("AXMenuItemSelected") 


kAXMenuOpenedNotification


#define kAXMenuOpenedNotification CFSTR("AXMenuOpened") 


kAXMovedNotification


#define kAXMovedNotification CFSTR("AXMoved") 
Discussion

This element has moved.


kAXResizedNotification


#define kAXResizedNotification CFSTR("AXResized") 
Discussion

This element has been resized.


kAXRowCountChangedNotification


#define kAXRowCountChangedNotification CFSTR("AXRowCountChangedNotification") 
Discussion

The number of rows in this table has changed.


kAXSelectedChildrenChangedNotification


#define kAXSelectedChildrenChangedNotification CFSTR("AXSelectedChildrenChanged") 
Discussion

A different subset of this element's children were selected.


kAXSelectedColumnsChangedNotification


#define kAXSelectedColumnsChangedNotification CFSTR("AXSelectedColumnsChanged") 
Discussion

A different set of columns was selected.


kAXSelectedRowsChangedNotification


#define kAXSelectedRowsChangedNotification CFSTR("AXSelectedRowsChanged") 
Discussion

A different set of rows was selected.


kAXSelectedTextChangedNotification


#define kAXSelectedTextChangedNotification CFSTR("AXSelectedTextChanged") 
Discussion

A different set of text was selected.


kAXSheetCreatedNotification


#define kAXSheetCreatedNotification CFSTR("AXSheetCreated") 


kAXUIElementDestroyedNotification


#define kAXUIElementDestroyedNotification CFSTR("AXUIElementDestroyed") 
Discussion

The returned UIElement is no longer valid in the target application. You can still use the local reference with calls like CFEqual (for example, to remove it from a list), but you should not pass it to the accessibility APIs.


kAXValueChangedNotification


#define kAXValueChangedNotification CFSTR("AXValueChanged") 
Discussion

This notification is sent when the value of the UIElement's value attribute has changed, not when the value of any other attribute has changed.


kAXWindowCreatedNotification


#define kAXWindowCreatedNotification CFSTR("AXWindowCreated") 


kAXWindowDeminiaturizedNotification


#define kAXWindowDeminiaturizedNotification CFSTR("AXWindowDeminiaturized") 


kAXWindowMiniaturizedNotification


#define kAXWindowMiniaturizedNotification CFSTR("AXWindowMiniaturized") 


kAXWindowMovedNotification


#define kAXWindowMovedNotification CFSTR("AXWindowMoved") 
Discussion

This notification is sent at the end of the window move, not continuously as the window is being moved.


kAXWindowResizedNotification


#define kAXWindowResizedNotification CFSTR("AXWindowResized") 
Discussion

This notification is sent at the end of the window resize, not continuously as the window is being resized.


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.

 

Last Updated: 2008-08-07