/* File: ToolUtils.h Contains: Toolbox Utilities Interfaces. Version: Technology: System 7.5 Package: Universal Interfaces 2.1 in ÒMPW LatestÓ on ETO #18 Copyright: © 1984-1995 by Apple Computer, Inc. All rights reserved. Bugs?: If you find a problem with this file, use the Apple Bug Reporter stack. Include the file and version information (from above) in the problem description and send to: Internet: apple.bugs@applelink.apple.com AppleLink: APPLE.BUGS */ #ifndef __TOOLUTILS__ #define __TOOLUTILS__ #ifndef __TYPES__ #include #endif /* #include */ #ifndef __OSUTILS__ #include #endif /* #include */ /* #include */ #ifndef __TEXTUTILS__ #include #endif /* #include */ /* #include */ /* #include */ /* #include */ /* #include */ #ifndef __FIXMATH__ #include #endif #if OLDROUTINELOCATIONS #ifndef __QUICKDRAW__ #include #endif #ifndef __ICONS__ #include #endif #endif #ifdef __cplusplus extern "C" { #endif #if PRAGMA_ALIGN_SUPPORTED #pragma options align=mac68k #endif #if PRAGMA_IMPORT_SUPPORTED #pragma import on #endif /* Note: The following have moved to Icons.h: PlotIcon and GetIcon The following have moved to Quickdraw.h: GetPattern, GetIndPattern, GetCursor, ShieldCursor, GetPicture, DeltaPoint and ScreenResGetCursor */ struct Int64Bit { SInt32 hiLong; UInt32 loLong; }; typedef struct Int64Bit Int64Bit; extern pascal Fixed FixRatio(short numer, short denom) ONEWORDINLINE(0xA869); extern pascal Fixed FixMul(Fixed a, Fixed b) ONEWORDINLINE(0xA868); extern pascal short FixRound(Fixed x) ONEWORDINLINE(0xA86C); extern pascal void PackBits(Ptr *srcPtr, Ptr *dstPtr, short srcBytes) ONEWORDINLINE(0xA8CF); extern pascal void UnpackBits(Ptr *srcPtr, Ptr *dstPtr, short dstBytes) ONEWORDINLINE(0xA8D0); extern pascal Boolean BitTst(const void *bytePtr, long bitNum) ONEWORDINLINE(0xA85D); extern pascal void BitSet(void *bytePtr, long bitNum) ONEWORDINLINE(0xA85E); extern pascal void BitClr(void *bytePtr, long bitNum) ONEWORDINLINE(0xA85F); extern pascal long BitAnd(long value1, long value2) ONEWORDINLINE(0xA858); extern pascal long BitOr(long value1, long value2) ONEWORDINLINE(0xA85B); extern pascal long BitXor(long value1, long value2) ONEWORDINLINE(0xA859); extern pascal long BitNot(long value) ONEWORDINLINE(0xA85A); extern pascal long BitShift(long value, short count) ONEWORDINLINE(0xA85C); extern pascal Fixed SlopeFromAngle(short angle) ONEWORDINLINE(0xA8BC); extern pascal short AngleFromSlope(Fixed slope) ONEWORDINLINE(0xA8C4); #if GENERATING68K extern pascal void LongMul(long a, long b, Int64Bit *result) ONEWORDINLINE(0xA867); #endif #if !GENERATING68K #define LongMul(a, b, result) ((void) WideMultiply((a), (b), (wide*)(result))) #endif #define HiWord(x) ((short)((long)(x) >> 16)) #define LoWord(x) ((short)(x)) #if PRAGMA_IMPORT_SUPPORTED #pragma import off #endif #if PRAGMA_ALIGN_SUPPORTED #pragma options align=reset #endif #ifdef __cplusplus } #endif #endif /* __TOOLUTILS__ */