Combining NSAccessibility and AX APIs
Combining NSAccessibility and AX APIs
- Subject: Combining NSAccessibility and AX APIs
- From: Martin Pilkington <email@hidden>
- Date: Sat, 10 Oct 2009 22:55:39 +0100
Hey,
I'm wanting to write code that will drive another application via the accessibility APIs. Now to make things simpler for myself I'm wanting to wrap this in Cocoa APIs. NSAccessibility provides 99% of what I need, but doesn't seem to provide a way to get the AXApplication of another item. I'm hoping to take an approach where I have an object that represents a UI element and contains an AXUIElement, which will then implement NSAccessibility (mostly because the API is already there and so I don't have to invent my own) which will call the appropriate.
Now that is the bit that's obvious to me, what isn't so obvious is how well the various other parts of NSAccessibility interact with the C based AX APIs. Would I be right in assuming that all the string constants for notifications, attributes, roles etc in NSAccessibility are the exact same constants as defined in the AX APIs and so I can use them interchangeably due to toll free bridging? And when dealing with notifications, if my objects add themselves as observers to NSNotificationCenter, when I receive a notification via the AX APIs can I use NSAccessibilityPostNotification() to then forward that to the notification center observers?
Thanks
--------------------------------- Martin Pilkington Writer of Weird Symbols email@hidden
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden