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: John Louch <email@hidden>
- Date: Tue, 07 Feb 2006 06:52:02 -0800
- Thread-topic: How to test for VoiceOver being active?
This will find screenreaderd today, though how we register in the booststrap
server is an implementation detail. That could change at any time.
Thanks,
jl
> 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
--------------------------------------------------
John Louch Internet #: 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