Re: Setting cursor Position
Re: Setting cursor Position
- Subject: Re: Setting cursor Position
- From: j o a r <email@hidden>
- Date: Fri, 15 Aug 2003 18:02:25 +0200
Look at CGRemoteOperation.h. For example:
#import <ApplicationServices/ApplicationServices.h>
CGDisplayErr err;
if ((err = CGWarpMouseCursorPosition(CGPointMake(screenPoint.x,
screenPoint.y))) != CGEventNoErr)
{
NSLog(@"CGWarpMouseCursorPosition returned: \"%d\"", err);
}
...where screenPoint is an NSPoint in screen coordinates.
j o a r
On den 15 augusti 2003, at 17:39:05PM, Darrel Anderson wrote:
I'm looking for a way to programmatically set the cursor position in a
Cocoa
app.
I found the IOFBSetCursorPosition stuff, but as usual, was wondering if
there are any higher level options. Short of that, any sample code that
shows the proper use of IOFBSetCursorPosition would be very helpful.
I'm setting up a UI where the user alters variables by moving the mouse
within a view, and need the cursor to "wrap" (ex. have the cursor
reappear
on the right edge of the view when it exits left).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.