Does AXNotificationHIObjectNotify work?
Does AXNotificationHIObjectNotify work?
- Subject: Does AXNotificationHIObjectNotify work?
- From: Tomas Zahradnicky <email@hidden>
- Date: Tue, 12 Sep 2006 08:56:49 +0200
Title: Does AXNotificationHIObjectNotify
work?
Dear accessibility list members,
my app needs to move controls within a window and needs to
synchronize the VO cursor position --- otherwise it would be not very
usable. There's no way to don't move the controls, sorry.
I expected that if a control moves, it automatically broadcasts
its moved notification and VoiceOver learns about it. That does not
seem to happen and if I broadcast the notification for it myself, it
does nothing too.
Here's what I did in --- for testing purposes I install a timer
that moves push button by 5 pixels each second. VoiceOver cursor
should move with the control but it stays where it first
appeared:
void MainWindow::timer(EventLoopTimerRef
inTimer, void *inUserData)
{
MainWindow* self = (MainWindow*)inUserData;
WindowRef window =
self->GetWindowRef();
HIViewID viewID;
HIViewRef contentView, myView;
HIRect
myViewBounds;
viewID.id =
1;
viewID.signature = 'XXXX';
::HIViewFindByID( ::HIViewGetRoot(window),
kHIViewWindowContentID, &contentView );
::HIViewFindByID( contentView, viewID, &myView
);
::HIViewGetBounds( myView, &myViewBounds );
::HIRectConvert( &myViewBounds,
kHICoordSpaceView, myView, kHICoordSpaceView, contentView );
myViewBounds.origin.x += 5.0;
::HIViewPlaceInSuperviewAt( myView,
myViewBounds.origin.x, myViewBounds.origin.y );
::AXNotificationHIObjectNotify(
kAXMovedNotification, (HIObjectRef)myView, 0 );
}
There's however an interesting observation. If I move the window,
VoiceOver sticks its cursor to the current button position.
Am I doing something wrong or is there a bug involved?
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