[orca-list] How to tell if Orca is running?
- From: Carolyn MacLeod <Carolyn_MacLeod ca ibm com>
- To: orca-list gnome org
- Subject: [orca-list] How to tell if Orca is running?
- Date: Fri, 19 Apr 2013 16:31:18 -0400
Hi, all.
I need to reduce the memory footprint
of some Eclipse code that runs whenever a table cell gets focus.
Objects are created on the assumption
that a screen reader may be running, but when it is not running, the objects
are created but not used.
It would be great if there was a reliable
way to tell if Orca is running or not (or any AT, but I'll start with Orca).
Just for info, I managed to find a way
to do this on Windows and on Mac, but I have not been able to determine
how to do it on Linux (or even if it can be done).
In case anyone is curious, here's the
Windows and Mac code, in java, using SWT's Platform Interface (jni):
For Windows:
final
int SPI_GETSCREENREADER = 70;
int
[] pvParam = new int [1];
boolean
result = OS.SystemParametersInfo(SPI_GETSCREENREADER, 0, pvParam, 0);
return
result && (pvParam [0] != 0);
For Mac:
NSUserDefaults
defaults = NSUserDefaults.standardUserDefaults();
defaults.addSuiteNamed
(NSString.stringWith("com.apple.universalaccess"));
defaults.synchronize();
return
defaults.integerForKey (NSString.stringWith("voiceOverOnOffKey"))
!= 0;
Is there a way to programmatically tell
if Orca is running, and then tell if it is not running?
Thanks!
Carolyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]