开发者

API for accessing UI elements in Mac OS X

We are developing an appli开发者_JS百科cation which helps people with reading disabilities. The user can let the application read out loud any text on the screen (menus, button labels, window titles, etc.) by hovering the mouse cursor over it (I know many OS’s can do this already, but this is a pedagogical tool and we are doing some additional stuff). We have a working application for Windows and now we would like to do something similar in OS X. Basically we want to implement something similar to the VoiceOver feature of OS X. My question is if there is an API we can use to access UI elements in OS X (like the Microsoft Active Accessibility for Windows). I have been reading about the Mac OS X Accessibility, but that seems more like an API to enable accessibility in your own app, not to access elements from the OS (or other apps). Am I wrong here?


Accessibility will allow you to access other apps' UI elements as well. Check out the UIElementInspector sample code on Apple's site. It is very close to what you want to do.


Yes, it's called the Accessibility API. It's very well documented here:

https://developer.apple.com/library/mac/documentation/Accessibility/Conceptual/AccessibilityMacOSX/

http://developer.apple.com/library/mac/#documentation/Accessibility/Reference/AccessibilityLowlevel/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜