• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting cursor Position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting cursor Position


  • Subject: Re: Setting cursor Position
  • From: Darrel Anderson <email@hidden>
  • Date: Mon, 18 Aug 2003 09:22:39 -0600

Thanks j o a r,

...just what I needed.

-DA


> 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.

References: 
 >Re: Setting cursor Position (From: j o a r <email@hidden>)

  • Prev by Date: Beta Testers
  • Next by Date: Front-to-back ordering in IB changes
  • Previous by thread: Re: Setting cursor Position
  • Next by thread: Vermont Recipes...
  • Index(es):
    • Date
    • Thread