Getting notified when VoiceOver cursor changes?
Getting notified when VoiceOver cursor changes?
- Subject: Getting notified when VoiceOver cursor changes?
- From: Tomas Zahradnicky <email@hidden>
- Date: Sat, 11 Mar 2006 16:21:19 +0100
Dear accessibility list members,
my app needs to know when the VoiceOver cursor moves from one UI
element to the another but I have no luck with it so far.
I have tried to install AXObserver at application level UI element
for kAXFocusedUIElementChangedNotification notification but despite
it gets added to the runloop, it does not get ever called. When I use
Accessibility Inspector, AXFocusedUIElement does not change and still
points to AXWindow.
My window constists mostly of User Pane controls created with
CreateUserPaneControl function with
kControlSupportsEmbedding|kControlSupportsFocus attributes. User
panes get also installed an event handler for accessibility purposes
so I can dynamically provide element attributes. The code I use is:
AXUIElement appElement = AXUIElementCreateApplication ( getpid() );
AXObserverCreate( getpid(), AXObserver, &gAXObserverRef );
AXObserverAddNotification( gAXObserverRef,
appElement,
kAXFocusedUIElementChangedNotification,
NULL );
CFRunLoopAddSource( CFRunLoopGetCurrent(),
AXObserverGetRunLoopSource( gAXObserverRef ),
kCFRunLoopDefaultMode );
Does the fact that the application still uses WNE event dispatching
model play some role?
Is kAXFocusedUIElementChangedNotification intended for such purposes?
If not, is there a way how to find out that the VO cursor has moved?
Thanks,
Tomas
--
# Ing. Tomas Zahradnicky, Jr.
# The Czech Technical University
# Dept of Computer Science, FEE-CTU Prague
_______________________________________________
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