MacPascal Units
Bill Catambay, Pascal Central Editor



MacPascal Units is an extension of Pascal Central. The intent is to provide useful Pascal units for Macintosh development. If you have some units you think others could benefit from, and don't mind sharing, please submit your units using the Pascal submission page.

NOTE: To save the unit to your desktop, Control-Click (or Right-Click) the link, and choose "Save Link As...", and save as Source.

Unit Author Description Posted On
MySQL Adriaan van Os Pascal interface to the MySQL library.

Function mysql_init_func
Function mysql_list_fields_func
Function mysql_master_query_func
[and more...]
5-22-06
ncurses Willett Kempton Pascal interface to the ncurses library.

Function define_key
Function resizeterm
Function baudrate
[and more...]
10-2-05
CarbonPrinting A.D. Jensen A printing unit that supports printing in Carbon.

Function HandlePageSetup
Function ReadyPrinting
Function PrintingOpenNextPage
[and more...]
11-1-02
Huffman James Derrick A utility unit encoding and decoding using Huffman compression.

Function HuffmanEncode
Function HuffmanDecode
6-13-02
genDialogs David Sinclair A utility unit focused on the dialog manager.

Function DlogGetKind
Function DlogFindKind
Function dlogSearchDItems
Function dlogItemIsCtrl
[and more...]
10-31-01
genEvents David Sinclair A utility unit focused on event routines (including a non-IC method for opening URLs in a browser).

Function EventKeyIsDown
Function eventGotRequiredParams
Function eventBringAppToFront
Function eventSendOpenURLAE
[and more...]
10-31-01
genFiles David Sinclair A utility unit focused on file I/O.

Function fileExists
Function fileRenameUnique
Function fileOpenDataFork
Function fileFromScrap
[and more...]
10-31-01
genGraphics David Sinclair A utility unit focused on graphics port routines.

Function grafHasColour
Function GrafGetIconSuite
Function grafGetClip
Function GrafGetItemRect
[and more...]
10-31-01
genNumerics David Sinclair A utility unit focused on numerics.

Function NumRnd
Function TestBit
Function numGetResource
Function numGetLineFromHandle
[and more...]
10-31-01
genPrefs David Sinclair A utility unit focused on saving and loading preferences.

Function prefsSave
Function prefsRead
Function prefsCopyRes
Function prefsSaveData
Function prefsCopyResList
10-31-01
genProgressDialogs David Sinclair A utility unit focused on displaying progress bars.

Function progGetColour
Procedure progProgressBar
Function progChangeMessage
Function progDisplayMessage
[and more...]
10-31-01
genResources David Sinclair A utility unit focused on resource handling routines.

Procedure resReallyBadError
Procedure resInit
Function resStrListLength
Function resBeginStrList
Function resAddToStrList
10-31-01
genSort David Sinclair A utility unit focused on general list sorting routines.

Function sortCreateList
Procedure sortAddString
Procedure sortTheStrings
Function sortReadString
Function sortCount
Procedure sortDisposeList
10-31-01
genStrings David Sinclair A utility unit focused on string handling.

Function StrBoolean
Function strGetIndString
Function strToNum
Function strLastPos
[and more...]
10-31-01
genToolbox David Sinclair A utility unit focused on event routines (including a non-IC method for opening URLs in a browser).

Procedure InitialiseToolbox
Function Abs
Function Copy
Function Geneva
Function Monaco
Function Palatino
10-31-01
genCustomCreators David Sinclair A utility unit focused on creating custom controls.

Procedure creatorSetupPopupMenu
Procedure creatorSetupItems
Procedure creatorHandleEditHits
Procedure creatorHandlePopupHits
Procedure CreatorHandleButtonHits
10-31-01
REWInternet Bob Williams A unit with Internet Config (IC) routines.

Function REWInitIC
Procedure REWOpenURL
Procedure REWDownloadFile
[and more...]
9-26-01
Binhex Ingemar Ragnemalm I took the best code I could find, DropBin, and made a nice stand-alone binhexing unit.

Procedure DoBinHex
9-11-01
arrowLines Michael J. Gibbs A small unit for drawing lines with arrowheads.

Procedure setArrowType
Procedure arrowLineTo
Procedure arrowLine
9-11-01
complexMath Michael J. Gibbs A unit that provides some basic arithmetic functions for complex numbers and functions for converting to and from polar coordinates.

Function addComplex
Function subComplex
Function mulComplex
Function divComplex
Function imag2Polar
Function polar2Imag
9-11-01
cStack Michael J. Gibbs A unit that provides stack management routines for user objects based on listObjs.p.

Procedure iStack
Procedure push
Function pop
Procedure free
[and more...]
9-11-01
CursorAnimation Michael J. Gibbs A unit that provides animated cursor routines in object form.

Procedure iAnimatedCursor
Procedure animateCursor
Procedure setCursorInterval
9-11-01
dottedLines Michael J. Gibbs A unit that handles drawing dashed and dotted lines.

Procedure SetBlackWhite
Procedure dottedLine
Procedure dottedLineTo
Procedure drawDotted
9-11-01
fileErrors Michael J. Gibbs A unit that provides file system error number to text description translation, based on the resources stored in fileErrors.rsrc.

Procedure getErrorDescription
9-11-01
fileIO Michael J. Gibbs A unit providing a complete file I/O object class. Allows file objects to be initialized based on file name and volume reference or file system spec.

Function readFile
Function writeFile
Function writeLine
Function writeStr
Function readChar
Procedure getfName
[and more...]
9-11-01
hex Michael J. Gibbs A unit providing decimal to hexidecimal conversions for 4, 8, 16 and 32 bit integers and hexidecimal to decimal conversion for 32 bit integers.

Function nibble2Hex
Function byte2Hex
Function int2Hex
Function long2Hex
Function hex2Long
9-11-01
iconAnimation Michael J. Gibbs A unit providing an icon animation object class.

Procedure iAnimatedIcon
Procedure setAnimationInterval
Function getAnimationInterval
Procedure setFrameIncrement
Function getCurrentFrame
[and more...]
9-11-01
listObjs Michael J. Gibbs A unit providing a powerful class to manage lists of objects of any class, non-invasively.

Procedure prependToList
Procedure insertInList
Procedure mergeList
Function getElement
Function findElement
[and more...]
9-11-01
machineNames Michael J. Gibbs A small unit that returns the machine and owner names from the File Sharing control panel.

Procedure GetOwnerName
Procedure GetMachineName
9-11-01
money Michael J. Gibbs A small unit that provides a procedure for converting a numeric value into the format used on checks.

Procedure dollars2Text
9-11-01
mousePosn Michael J. Gibbs A unit that provides routines for setting and getting the mouse position under Mac OS 9 and earlier.

Procedure SetMouse
Procedure getRawMouse
9-11-01
pcFileIO Michael J. Gibbs A unit reading and writing MS-DOS/MS-Windows created text and binary files, object class. Performs byte order correction on integers, long integers, and single and double precision floating point (real) values for Mac applications using PC files directly.

Function readLine
Function writeLine
Function readInteger
Function writeDouble
[and more...]
9-11-01
preferences Michael J. Gibbs A unit for simplifying the use of preference settings in object-oriented applications.

Function getPreferences
Procedure setPreferences
Function updatePreferences
Function makeNewPreferences
[and more...]
9-11-01
NavigationServices Ken Beath A C unit with accompanying Pascal interface supporting Mac OS Navigation Services.

Function OpenFileDialog
Function SaveFileDialog
Function ConfirmSaveDialog
Function MyNavServicesAvailable
4-23-01
REWSleep Bob Williams A Sleep library which invokes your procedures upon sleep and doze states.

Function REWCanSleep
Procedure REWInitSleep
Procedure REWFinishSleep
3-9-01
DepthLib Bill Catambay Library routines for getting and setting the color depth for monitors.

Function MaxScreenDepth
Function GetScreenDepth
Procedure SetScreenDepth
Function GetScreenMode
Procedure SetScreenMode
[and more...]
3-9-01
GammaPaslib Matthew Mora Library routines for Altering the Gamma Tables of GDevices.

Function IsGammaAvailable
Function DoGammaFade
Procedure DelayFadeToBlack
Procedure DelayFadeFromBlack
[and more...]
3-9-01
Awesomefade Ingemar Ragnemalm Routines for performing various CLUT fading.

Function MakeRGB
Procedure CLUTFadeToBlack
Procedure FadeToCT
Procedure FadeToRGB
Procedure RotateCT
[and more...]
3-9-01
Carbon Michael Shopsin Necessary globals and functions to support carbonizing Pascal.

Function myGetMenuBarHeight
Procedure myDisposeFilter
Function myGetWindowRect
Function myGetDialogPort
Procedure myDisableItem
Function myLoWord
[and much more...]
11-21-00
CarbonStuff Ken Beath Routines to help you port your Pascal programs to Carbon.

Func GetWindowPort
Func GetDialogWindow
Func GetControlHilite
Func IsWindowVisible
[and much more...]
11-17-00
TextStuff Robert R. Dell Routines for various text utilities.

Proc Decit
Proc Comma
Proc Hexit
Proc MakeByte
Proc MakeWord
Proc MakeLong
Proc TrimEndingPadding
Proc TrimBeginningPadding
11-11-00
ControlsAndWindows Robert R. Dell Routines for handling data structures for multiple windows.

Proc InitControlsAndWindows
Proc CreateNewWindowEntry
Proc LocateWindowByName
Proc LocateWindowByWindow
Proc RemoveWindowEntry
Proc SetTheWindowTitle
[includes similar procs for Controls]
11-10-00
Fast Fourier Transforms Richard Palais Well tested routines for fast fourier tranforms.

Procedure fft
Procedure ifft
11-8-00
ArrowDraw
Philippe Casgrain Routines for drawing arrows, including indented arrows, and arrows at varying angles.

Procedure ArrowDraw
11-3-00
BarCodes Robert R. Dell Routines for drawing barcodes.

Procedure DrawBarCode
Procedure InitBarCodes
Procedure BarCodeError
Procedure BarCodeWidth
8-19-00


This page authored by Bill Catambay
Send Comments to: Pascal Central Editor