Re: How does Pixie get the mouse position?
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.