Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 2 - DrawSprocket / DrawSprocket Reference
DrawSprocket Functions / Handling a Mouse


DSpFindContextFromPoint

You can use the DSpFindContextFromPoint function to find out which context corresponds to a point given in global coordinates.

OSStatus DSpFindContextFromPoint (
Point inGlobalPoint,
DSpContextReference *outContext);
inGlobalPoint
A point in global coordinates.
outContext
On exit, a reference to a context that contains that point.
function result
A result code.
DESCRIPTION
If the user moves the mouse, the game needs to know which context it's in so that the global coordinates can be properly translated into local coordinates for the context. The function takes, in the inGlobalPoint parameter, the global coordinates of a point and returns, in the outContext parameter, a reference to the context that point is in.

CALLING RESTRICTIONS
Do not call this function during an interrupt.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help