Re: Programmatically getting cursor size;
Re: Programmatically getting cursor size;
- Subject: Re: Programmatically getting cursor size;
- From: Frank Neumann <email@hidden>
- Date: Fri, 29 Feb 2008 07:59:35 +0100
Hi Matt,
me again. I found a code snippet I wrote lately. It determines if
VoiceOver is running. You should easily be able to adopt it to your needs.
-(NSDictionary *) getPropertyList:(NSString *) propertyList
{
NSString * pathExpanded = [ propertyList
stringByExpandingTildeInPath ];
return [ NSDictionary dictionaryWithContentsOfFile: pathExpanded ];
}
-(NSNumber *) getPropertiesNumber:(NSString *) numberName
from:(NSDictionary *) properties
{
NSNumber * theNumber = nil;
id item = [ properties objectForKey: numberName ];
if ( item != nil && [ item isKindOfClass: [ NSNumber class ] ] ) {
theNumber = ( NSNumber * ) item;
}
return theNumber;
}
-(MacOSBOOL) isVoiceOverRunning
{
MacOSBOOL running = false;
NSDictionary * properties = [ self getPropertyList:
@"~/Library/Preferences/com.apple.universalaccess.plist" ];
if ( properties != nil ) {
NSNumber * value = [ self getPropertiesNumber:
@"voiceOverOnOffKey" from: properties ];
if ( value != nil ) {
running = [ value boolValue ];
}
[ value release ];
[ properties release ];
}
return running;
}
Regards...
Frank
Matt Budd wrote:
Hello all,
There is an option in OS X for increasing the size of the mouse cursor
(System Preferences -> Universal Access -> Mouse -> “For difficulties
seeing the mouse”). I am wondering if there is a way to programmatically
get this value from my program.
I make a drawing program for OS X, and we would like to increase the
size of the resize handles on our shapes if the mouse cursor has been
expanded. This makes the resize handles easier to hit and drag.
Any thoughts?
- Matt
------------------------------------------------------------------------
_______________________________________________
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
--
Sun Microsystems GmbH Frank Neumann
Nagelsweg 55 Software Engineer
20097 Hamburg StarOffice / OpenOffice.org Development
Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551
Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
_______________________________________________
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