• 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
Getting mouse cursor position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting mouse cursor position


  • Subject: Getting mouse cursor position
  • From: Jim McGowan <email@hidden>
  • Date: Sat, 07 May 2011 12:11:38 +0100

On 7 May 2011, at 0:29 , Nick <email@hidden> wrote:
>
> May this is just a wrong function to retrieve the cursor's position?
> Or it doesnt work for some older builds of OX X 10.6.x ?

-hotSpot returns a point within in the cursor image, used to determine which part of the cursor is it's 'main point'.  From the docs:

"The point describing the position of the hot spot, specified according to the cursor’s flipped coordinate system."

If you want to get the onscreen position look at -[NSWindow mouseLocationOutsideOfEventStream] or +[NSEvent mouseLocation]

Jim_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: when to save user-data to disk?
  • Next by Date: Re: drawing onto CVPixelBuffer
  • Previous by thread: Re: Getting mouse cursor position
  • Next by thread: programmatically delete a file on ftp server
  • Index(es):
    • Date
    • Thread