Re: How to test for VoiceOver being active?
Re: How to test for VoiceOver being active?
- Subject: Re: How to test for VoiceOver being active?
- From: Tomas Zahradnicky <email@hidden>
- Date: Mon, 6 Feb 2006 21:47:58 +0100
Hi Mike & Mark,
thanks against warning that AXEnhancedUserInterface is not a good way
to detect VoiceOver running. How about this way?
Boolean VOU_IsVoiceOverActive()
{
Boolean result = FALSE;
mach_port_t port;
mach_port_t serverPort;
kern_return_t kerr;
kerr = task_get_special_port( mach_task_self(),
TASK_BOOTSTRAP_PORT, &port );
if( kerr == KERN_SUCCESS )
{
kerr = bootstrap_look_up( port, "com.apple.screenreader",
&serverPort );
if( kerr == KERN_SUCCESS )
{
mach_port_deallocate( mach_task_self(), serverPort );
result = TRUE;
}
}
return result;
}
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