Re: Mouse movement and Edges of screen
Re: Mouse movement and Edges of screen
- Subject: Re: Mouse movement and Edges of screen
- From: "Kenneth C. Dyke" <email@hidden>
- Date: Sat, 21 Jul 2001 21:26:10 -0700
On Saturday, July 21, 2001, at 09:05 PM, Andreas Monitzer wrote:
On Sunday, July 22, 2001, at 04:58 , R. Eranki wrote:
How can I determine where the user is trying to move his mouse when
it's at
the edge of the screen, -or- how can I force the mouse into the center
of
the screen?
Maybe you should try using HIDManager.
Actually, there's an easier way than that...
From CGDirectDisplay.h.
void CGGetLastMouseDelta( CGMouseDelta * deltaX, CGMouseDelta * deltaY );
If you call this every time you receive a mouse moved event, you can get
back the raw mouse deltas before the mouse was pinned to the edge of the
screen. There are some other useful functions defined in
CGRemoteOperation.h that you may also find useful.
-Ken
Kenneth Dyke, email@hidden (personal), email@hidden (work)
Sr. Mad Scientist, MacOS X OpenGL Group, Apple Computer, Inc.
C++: The power, elegance and simplicity of a hand grenade.