Package Name: toolutils
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Extensions; use Interfaces.C.Extensions;
with Types; use Types;
with Quickdraw; use Quickdraw;
package ToolUtils is
--
-- 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.
--
type Int64Bit is
record
hiLong : Long_Integer;
loLong : unsigned_long;
end record;
function FixRatio
(numer : in Short_Integer;
denom : in Short_Integer)
return Fixed;
pragma Import (C, FixRatio, "FixRatio", "FixRatio");
function FixMul
(a : in Fixed;
b : in Fixed)
return Fixed;
pragma Import (C, FixMul, "FixMul", "FixMul");
function FixRound
(x : in Fixed)
return Short_Integer;
pragma Import (C, FixRound, "FixRound", "FixRound");
procedure PackBits
(srcPtr : access Ptr;
dstPtr : access Ptr;
srcBytes : in Short_Integer);
pragma Import (C, PackBits, "PackBits", "PackBits");
procedure UnpackBits
(srcPtr : access Ptr;
dstPtr : access Ptr;
dstBytes : in Short_Integer);
pragma Import (C, UnpackBits, "UnpackBits", "UnpackBits");
function BitTst
(bytePtr : in Void_Ptr;
bitNum : in Long_Integer)
return Boolean;
pragma Import (C, BitTst, "BitTst", "BitTst");
procedure BitSet
(bytePtr : in Void_Ptr;
bitNum : in Long_Integer);
pragma Import (C, BitSet, "BitSet", "BitSet");
procedure BitClr
(bytePtr : in Void_Ptr;
bitNum : in Long_Integer);
pragma Import (C, BitClr, "BitClr", "BitClr");
function BitAnd
(value1 : in Long_Integer;
value2 : in Long_Integer)
return Long_Integer;
pragma Import (C, BitAnd, "BitAnd", "BitAnd");
function BitOr
(value1 : in Long_Integer;
value2 : in Long_Integer)
return Long_Integer;
pragma Import (C, BitOr, "BitOr", "BitOr");
function BitXor
(value1 : in Long_Integer;
value2 : in Long_Integer)
return Long_Integer;
pragma Import (C, BitXor, "BitXor", "BitXor");
function BitNot
(value : in Long_Integer)
return Long_Integer;
pragma Import (C, BitNot, "BitNot", "BitNot");
function BitShift
(value : in Long_Integer;
count : in Short_Integer)
return Long_Integer;
pragma Import (C, BitShift, "BitShift", "BitShift");
function GetIcon
(iconID : in Short_Integer)
return Handle;
pragma Import (C, GetIcon, "GetIcon", "GetIcon");
procedure PlotIcon
(theRect : access Rect;
theIcon : in Handle);
pragma Import (C, PlotIcon, "PlotIcon", "PlotIcon");
function GetPattern
(patternID : in Short_Integer)
return PatHandle;
pragma Import (C, GetPattern, "GetPattern", "GetPattern");
function GetCursor
(cursorID : in Short_Integer)
return CursHandle;
pragma Import (C, GetCursor, "GetCursor", "GetCursor");
function GetPicture
(pictureID : in Short_Integer)
return PicHandle;
pragma Import (C, GetPicture, "GetPicture", "GetPicture");
function SlopeFromAngle
(angle : in Short_Integer)
return Fixed;
pragma Import (C, SlopeFromAngle, "SlopeFromAngle", "SlopeFromAngle");
function AngleFromSlope
(slope : in Fixed)
return Short_Integer;
pragma Import (C, AngleFromSlope, "AngleFromSlope", "AngleFromSlope");
function DeltaPoint
(ptA : in Point;
ptB : in Point)
return Long_Integer;
pragma Import (C, DeltaPoint, "DeltaPoint", "DeltaPoint");
procedure ShieldCursor
(shieldRect : access Rect;
offsetPt : in Point);
pragma Import (C, ShieldCursor, "ShieldCursor", "ShieldCursor");
procedure ScreenRes
(scrnHRes : access Short_Integer;
scrnVRes : access Short_Integer);
pragma Import (C, ScreenRes, "ScreenRes", "ScreenRes");
procedure GetIndPattern
(thePat : access Pattern;
patternListID : in Short_Integer;
index : in Short_Integer);
pragma Import (C, GetIndPattern, "GetIndPattern", "GetIndPattern");
function HiWord (value : in Long_Integer) return Short_Integer;
function LoWord (value : in Long_Integer) return Short_Integer;
end ToolUtils;