Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
sources/BoxPaint_utility.c
/* utility.c |
Nick Thompson |
Michael Bishop - August 21 1996 |
(c)1994-96 Apple computer Inc., All Rights Reserved |
*/ |
/* -------------------------------------------------------------------- |
** INCLUDES |
*/ |
#include <QuickDraw.h> |
#include <Events.h> |
#include "BoxPaint_utility.h" |
/* -------------------------------------------------------------------- |
** GLOBAL VARIABLES |
*/ |
/* -------------------------------------------------------------------- |
** LOCAL FUNCTION DEFINITIONS |
*/ |
/* -------------------------------------------------------------------- |
** Utility_HiWrd |
** DESCRIPTION |
*/ |
short Utility_HiWrd(long aLong) |
{ |
return (((aLong) >> 16) & 0xFFFF) ; |
} |
/* -------------------------------------------------------------------- |
** Utility_LoWrd |
** DESCRIPTION |
*/ |
short Utility_LoWrd(long aLong) |
{ |
return ((aLong) & 0xFFFF) ; |
} |
/* -------------------------------------------------------------------- |
** Utility_MyGetMouse |
** Abstract GetMouse Function for Porting |
*/ |
void Utility_MyGetMouse(TQ3Point2D *thePoint) |
{ |
Point macPoint; |
GetMouse(&macPoint); |
/* GlobalToLocal(&macPoint); |
*/ |
thePoint->x = (float)(macPoint.h); |
thePoint->y = (float)(macPoint.v); |
} |
/* -------------------------------------------------------------------- |
** Utility_MyStillDown |
** Abstract StillDown Function for Porting |
*/ |
int Utility_MyStillDown(void) |
{ |
return StillDown(); |
} |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14