Mac Developer Library

Developer

AXNotificationConstants.h Reference

Options
Deployment Target:

On This Page
Language:

AXNotificationConstants.h Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import ApplicationServices

Objective-C

@import ApplicationServices;

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).

Callbacks

  • Priority values used for kAXPriorityKey

    Declaration

    Swift

    typealias CFIndex = Int

    Objective-C

    typedef CF_ENUM( CFIndex , AXPriority) { kAXPriorityLow = 10, kAXPriorityMedium = 50, kAXPriorityHigh = 90 } CF_ENUM_AVAILABLE_MAC ( 10_9);

    Import Statement

    Objective-C

    @import CoreFoundation;

    Swift

    import CoreFoundation

    Availability

    Available in OS X v10.0 and later.

Constants

See the Overview section above for header-level documentation.

  • Declaration

    Swift

    var kAXAnnouncementKey: String { get } var kAXAnnouncementRequestedNotification: String { get } var kAXApplicationActivatedNotification: String { get } var kAXApplicationDeactivatedNotification: String { get } var kAXApplicationHiddenNotification: String { get } var kAXApplicationShownNotification: String { get } var kAXCreatedNotification: String { get } var kAXDrawerCreatedNotification: String { get } var kAXFocusedUIElementChangedNotification: String { get } var kAXFocusedWindowChangedNotification: String { get } var kAXHelpTagCreatedNotification: String { get } var kAXLayoutChangedNotification: String { get } var kAXMainWindowChangedNotification: String { get } var kAXMenuClosedNotification: String { get } var kAXMenuItemSelectedNotification: String { get } var kAXMenuOpenedNotification: String { get } var kAXMovedNotification: String { get } var kAXPriorityKey: String { get } var kAXResizedNotification: String { get } var kAXRowCollapsedNotification: String { get } var kAXRowCountChangedNotification: String { get } var kAXRowExpandedNotification: String { get } var kAXSelectedCellsChangedNotification: String { get } var kAXSelectedChildrenChangedNotification: String { get } var kAXSelectedChildrenMovedNotification: String { get } var kAXSelectedColumnsChangedNotification: String { get } var kAXSelectedRowsChangedNotification: String { get } var kAXSelectedTextChangedNotification: String { get } var kAXSheetCreatedNotification: String { get } var kAXTitleChangedNotification: String { get } var kAXUIElementDestroyedNotification: String { get } var kAXUIElementsKey: String { get } var kAXUnitsChangedNotification: String { get } var kAXValueChangedNotification: String { get } var kAXWindowCreatedNotification: String { get } var kAXWindowDeminiaturizedNotification: String { get } var kAXWindowMiniaturizedNotification: String { get } var kAXWindowMovedNotification: String { get } var kAXWindowResizedNotification: String { get }

    Objective-C

    #define kAXAnnouncementKey CFSTR("AXAnnouncementKey") #define kAXAnnouncementRequestedNotification CFSTR("AXAnnouncementRequested") #define kAXApplicationActivatedNotification CFSTR("AXApplicationActivated") #define kAXApplicationDeactivatedNotification CFSTR("AXApplicationDeactivated") #define kAXApplicationHiddenNotification CFSTR("AXApplicationHidden") #define kAXApplicationShownNotification CFSTR("AXApplicationShown") #define kAXCreatedNotification CFSTR("AXCreated") #define kAXDrawerCreatedNotification CFSTR("AXDrawerCreated") #define kAXFocusedUIElementChangedNotification CFSTR("AXFocusedUIElementChanged") #define kAXFocusedWindowChangedNotification CFSTR("AXFocusedWindowChanged") #define kAXHelpTagCreatedNotification CFSTR("AXHelpTagCreated") #define kAXLayoutChangedNotification CFSTR("AXLayoutChanged") #define kAXMainWindowChangedNotification CFSTR("AXMainWindowChanged") #define kAXMenuClosedNotification CFSTR("AXMenuClosed") #define kAXMenuItemSelectedNotification CFSTR("AXMenuItemSelected") #define kAXMenuOpenedNotification CFSTR("AXMenuOpened") #define kAXMovedNotification CFSTR("AXMoved") #define kAXPriorityKey CFSTR("AXPriorityKey") #define kAXResizedNotification CFSTR("AXResized") #define kAXRowCollapsedNotification CFSTR("AXRowCollapsed") #define kAXRowCountChangedNotification CFSTR("AXRowCountChanged") #define kAXRowExpandedNotification CFSTR("AXRowExpanded") #define kAXSelectedCellsChangedNotification CFSTR("AXSelectedCellsChanged") #define kAXSelectedChildrenChangedNotification CFSTR("AXSelectedChildrenChanged") #define kAXSelectedChildrenMovedNotification CFSTR("AXSelectedChildrenMoved") #define kAXSelectedColumnsChangedNotification CFSTR("AXSelectedColumnsChanged") #define kAXSelectedRowsChangedNotification CFSTR("AXSelectedRowsChanged") #define kAXSelectedTextChangedNotification CFSTR("AXSelectedTextChanged") #define kAXSheetCreatedNotification CFSTR("AXSheetCreated") #define kAXTitleChangedNotification CFSTR("AXTitleChanged") #define kAXUIElementDestroyedNotification CFSTR("AXUIElementDestroyed") #define kAXUIElementsKey CFSTR("AXUIElementsKey") #define kAXUnitsChangedNotification CFSTR("AXUnitsChanged") #define kAXValueChangedNotification CFSTR("AXValueChanged") #define kAXWindowCreatedNotification CFSTR("AXWindowCreated") #define kAXWindowDeminiaturizedNotification CFSTR("AXWindowDeminiaturized") #define kAXWindowMiniaturizedNotification CFSTR("AXWindowMiniaturized") #define kAXWindowMovedNotification CFSTR("AXWindowMoved") #define kAXWindowResizedNotification CFSTR("AXWindowResized")

    Constants

    • kAXAnnouncementKey

      kAXAnnouncementKey

      Notification info key used to specify an announcement to be spoken with a notification.

      Available in OS X v10.9 and later.

    • kAXAnnouncementRequestedNotification

      kAXAnnouncementRequestedNotification

      Notification to request an announcement to be spoken.

      Available in OS X v10.9 and later.

    • kAXApplicationActivatedNotification

      kAXApplicationActivatedNotification

      Notification that an application was activated.

      Value is an application UIElement.

      Available in OS X v10.2 and later.

    • kAXApplicationDeactivatedNotification

      kAXApplicationDeactivatedNotification

      Notification that an application was deactivated.

      Value is an application UIElement

      Available in OS X v10.2 and later.

    • kAXApplicationHiddenNotification

      kAXApplicationHiddenNotification

      Notification that an application has been hidden.

      Value is an application UIElement

      Available in OS X v10.2 and later.

    • kAXApplicationShownNotification

      kAXApplicationShownNotification

      Notification that an application is no longer hidden.

      Value is an application UIElement

      Available in OS X v10.2 and later.

    • kAXCreatedNotification

      kAXCreatedNotification

      Notification that an element was created.

      Available in OS X v10.4 and later.

    • kAXDrawerCreatedNotification

      kAXDrawerCreatedNotification

      Notification that a drawer was created.

      Available in OS X v10.3 and later.

    • kAXFocusedUIElementChangedNotification

      kAXFocusedUIElementChangedNotification

      Notification that the focused UI element has changed.

      Value is the new focused UIElement or the Application UIElement if there's no focus

      Available in OS X v10.2 and later.

    • kAXFocusedWindowChangedNotification

      kAXFocusedWindowChangedNotification

      Notification that the focused window changed.

      Available in OS X v10.2 and later.

    • kAXHelpTagCreatedNotification

      kAXHelpTagCreatedNotification

      Notification that a help tag was created.

      Available in OS X v10.4 and later.

    • kAXLayoutChangedNotification

      kAXLayoutChangedNotification

      Notification that the layout changed.

      Available in OS X v10.9 and later.

    • kAXMainWindowChangedNotification

      kAXMainWindowChangedNotification

      Notification of a change in the main window.

      Value is the new main window UIElement or the Application UIElement if there's no main window.

      Available in OS X v10.2 and later.

    • kAXMenuClosedNotification

      kAXMenuClosedNotification

      Notification that a menu has been closed.

      Value is the closed menu UIElement.

      Available in OS X v10.2 and later.

    • kAXMenuItemSelectedNotification

      kAXMenuItemSelectedNotification

      Notification that a menu item has been seleted.

      Value is the selected menu item UIElement.

      Available in OS X v10.2 and later.

    • kAXMenuOpenedNotification

      kAXMenuOpenedNotification

      Notification that a menu has been opened.

      Value is the opened menu UIElement.

      Available in OS X v10.2 and later.

    • kAXMovedNotification

      kAXMovedNotification

      Notification that this element has moved.

      Available in OS X v10.4 and later.

    • kAXPriorityKey

      kAXPriorityKey

      Notification info key used to specify a priority for the notification. See AXPriority.

      Available in OS X v10.9 and later.

    • kAXResizedNotification

      kAXResizedNotification

      Notification that this element has been resized.

      Available in OS X v10.4 and later.

    • kAXRowCollapsedNotification

      kAXRowCollapsedNotification

      Notification that a row in an outline has been collapsed.

      The value is the collapsed row UIElement.

      Available in OS X v10.6 and later.

    • kAXRowCountChangedNotification

      kAXRowCountChangedNotification

      Notification that the number of rows in this table has changed.

      Available in OS X v10.4 and later.

    • kAXRowExpandedNotification

      kAXRowExpandedNotification

      Notification that a row in an outline has been expanded.

      The value is the collapsed row UIElement.

      Available in OS X v10.6 and later.

    • kAXSelectedCellsChangedNotification

      kAXSelectedCellsChangedNotification

      Notification that the selected cells have changed.

      Available in OS X v10.6 and later.

    • kAXSelectedChildrenChangedNotification

      kAXSelectedChildrenChangedNotification

      Notification that a different subset of this element's children were selected.

      Available in OS X v10.4 and later.

    • kAXSelectedChildrenMovedNotification

      kAXSelectedChildrenMovedNotification

      Notification that the selected children have moved.

      Available in OS X v10.6 and later.

    • kAXSelectedColumnsChangedNotification

      kAXSelectedColumnsChangedNotification

      Notification that the set of selected columns changed.

      Available in OS X v10.4 and later.

    • kAXSelectedRowsChangedNotification

      kAXSelectedRowsChangedNotification

      Notification that the set of selected rows changed.

      Available in OS X v10.4 and later.

    • kAXSelectedTextChangedNotification

      kAXSelectedTextChangedNotification

      Notification that a different set of text was selected.

      Available in OS X v10.4 and later.

    • kAXSheetCreatedNotification

      kAXSheetCreatedNotification

      Notification that a sheet was created.

      Available in OS X v10.3 and later.

    • kAXTitleChangedNotification

      kAXTitleChangedNotification

      Notification that the title changed.

      Available in OS X v10.5 and later.

    • kAXUIElementDestroyedNotification

      kAXUIElementDestroyedNotification

      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.

      Value is the destroyed UIElement

      Available in OS X v10.2 and later.

    • kAXUIElementsKey

      kAXUIElementsKey

      Notification info key used to specify an element.

      Available in OS X v10.9 and later.

    • kAXUnitsChangedNotification

      kAXUnitsChangedNotification

      Notification that the units have changed.

      Available in OS X v10.6 and later.

    • kAXValueChangedNotification

      kAXValueChangedNotification

      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.

      Value is the modified UIElement

      Available in OS X v10.2 and later.

    • kAXWindowCreatedNotification

      kAXWindowCreatedNotification

      Notification that a window was created.

      Value is a new window UIElement

      Available in OS X v10.2 and later.

    • kAXWindowDeminiaturizedNotification

      kAXWindowDeminiaturizedNotification

      Notification that a window is no longer minimized.

      Value is the unminimized window UIElement

      Available in OS X v10.2 and later.

    • kAXWindowMiniaturizedNotification

      kAXWindowMiniaturizedNotification

      Notification that a window was minimized.

      Value is the minimized window UIElement

      Available in OS X v10.2 and later.

    • kAXWindowMovedNotification

      kAXWindowMovedNotification

      Notification that a window moved.

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

      Value is the moved window UIElement

      Available in OS X v10.2 and later.

    • kAXWindowResizedNotification

      kAXWindowResizedNotification

      Notification that a window was resized.

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

      Value is the resized window UIElement

      Available in OS X v10.2 and later.