• 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: How does Pixie get the mouse position?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does Pixie get the mouse position?


  • Subject: Re: How does Pixie get the mouse position?
  • From: John MacDonnell <email@hidden>
  • Date: Wed, 9 Jun 2004 23:09:52 +0200

On 9 Jun 2004, at 10:36 PM, Dietmar Planitzer wrote:

I suspect that it simply does what the QuickTime movie controller and many interactive media components do: namely, they call GetMouse(), Button() and GetKeys() for each and every frame of a movie.

Yeah.. but I don't understand why at lower level, thanks to hardware interrupts we don't have to poll.... whereas at higher level at the API level we have to pool the mouse...

that simply sucks so much that I think that there must be a solution to get mouse events

Those functions return the current state of the mouse and keyboard input devices as far as I known no matter if your app is in the foreground or the background. The only thing you have to keep in mind is that you must set a valid GrafPort before you call GetMouse() because it returns the mouse coordinates in local coordinates (relative to the current GrafPort).

if you use cocoa's

[NSEvent mouseLocation]

you don't have to mess with any GrafPort

Thank you for your reply it was interesting

John
_______________________________________________
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: 
 >How does Pixie get the mouse position? (From: John MacDonnell <email@hidden>)
 >Re: How does Pixie get the mouse position? (From: Dietmar Planitzer <email@hidden>)

  • Prev by Date: Re: How does Pixie get the mouse position?
  • Next by Date: How to create a easy of use Installer?
  • Previous by thread: Re: How does Pixie get the mouse position?
  • Next by thread: NSTextView with top indent
  • Index(es):
    • Date
    • Thread