• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Which UIElements to observe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which UIElements to observe?


  • Subject: Re: Which UIElements to observe?
  • From: Mike Engber <email@hidden>
  • Date: Fri, 22 Nov 2002 11:11:23 -0800

On Friday, November 22, 2002, at 03:43 AM, Bill Cheeseman wrote:
It's hard for me to tell from the preliminary documentation which UIElements
it is sensible to observe for particular notifications. Can a table be
provided, or the underlying principle explained?

The constants are group in the header file (AXConstants.h) with
comments to give a hint as to their applicablity. I.e. "menu notifications" are for menus, "window notifications" are for windows, ...

As for "focus notifications," I'd expect you'd want to register for the app so you get all of them. If you registered for a particular window or UIElement you only get notified when it became focused, not when it lost it.

But what about lower-level UIElements?

There are only two notifications listed under "element notifications," value-changed and destroyed. That's all we currently have.

Any UIElement with a value attribute that can change should support the value changed notifications. I'm sure you'll find some exceptions/bugs.

Any UIElement can be destroyed - and should support the UIElement destroyed notification. One optimization we make in Cocoa here (not sure about Carbon) is that we only send the destroyed notification for UIElements that have actually been handed out through the accessibility API. If a UIElement has never been handed out, the information that it has been destroyed can't be useful to anyone (i.e. no one could be holding a ref to it).

In Cocoa, you'll also find we're more restrictive on which UIElements you can register for notifications on. I don't want to really get into this now, but don't be shocked if you find you can successfully register for value changed on one button, but not on another one (e.g. one inside a table view).

-ME

--- AXConstants.h ---

// focus notifications
#define kAXMainWindowChangedNotification CFSTR("AXMainWindowChanged")
#define kAXFocusedWindowChangedNotification CFSTR("AXFocusedWindowChanged")
#define kAXFocusedUIElementChangedNotification CFSTR("AXFocusedUIElementChanged")

// application notifications
#define kAXApplicationActivatedNotification CFSTR("AXApplicationActivated")
#define kAXApplicationDeactivatedNotification CFSTR("AXApplicationDeactivated")
#define kAXApplicationHiddenNotification CFSTR("AXApplicationHidden")
#define kAXApplicationShownNotification CFSTR("AXApplicationShown")

// window notifications
#define kAXWindowCreatedNotification CFSTR("AXWindowCreated")
#define kAXWindowMovedNotification CFSTR("AXWindowMoved")
#define kAXWindowResizedNotification CFSTR("AXWindowResized")
#define kAXWindowMiniaturizedNotification CFSTR("AXWindowMiniaturized")
#define kAXWindowDeminiaturizedNotification CFSTR("AXWindowDeminiaturized")

// element notifications
#define kAXValueChangedNotification CFSTR("AXValueChanged")
#define kAXUIElementDestroyedNotification CFSTR("AXUIElementDestroyed")

// menu notifications
#define kAXMenuOpenedNotification CFSTR("AXMenuOpened")
#define kAXMenuClosedNotification CFSTR("AXMenuClosed")
#define kAXMenuItemSelectedNotification CFSTR("AXMenuItemSelected")
_______________________________________________
accessibility-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/accessibility-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Which UIElements to observe?
      • From: Bill Cheeseman <email@hidden>
References: 
 >Which UIElements to observe? (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: NULL elements resolved
  • Next by Date: Re: Which UIElements to observe?
  • Previous by thread: Which UIElements to observe?
  • Next by thread: Re: Which UIElements to observe?
  • Index(es):
    • Date
    • Thread