Mac::Gestalt - Macintosh Toolbox Interface to the Gestalt Manager
# Only bring in the names we want use Mac::Gestalt qw(%Gestalt gestaltAppleTalkVersion); if ( $Gestalt{gestaltAppleTalkVersion} lt "58" ) { warn "Unable to use AppleTalk\n"; }
You can use the Gestalt function or the %Gestalt tied hash to obtain information about the operating environment. You specify what information you need by passing one of the selector codes recognized by Gestalt.
There is a huge list of codes. Many of them return a bitmask, so to find out whether e.g. the Code Fragment Manager is present, you write
$Gestalt{gestaltCFMAttr} & (1 << gestaltCFMPresent)
Address mode.
Alias manager.
AppleTalk.
A/UX.
CloseView.
Code Fragment Manager.
ColorSync.
ColorSync version.
Communications toolbox connection manager.
Component manager.
Color picker.
CPU type.
Communications toolbox connection resource manager.
Control strip manager.
Communications toolbox.
Database access manager.
Dictionary manager.
Dialog manager extensions.
Display manager.
Display manager version.
Drag manager.
Easy access.
Edition manager.
AppleEvent manager.
Finder attributes.
Folder manager.
Font manager.
680X0 FPU.
File system attributes.
File system manager.
File transfer manager.
QuickDraw GX attributes.
QuickDraw GX version.
Hardware attributes.
Help manager.
QuickTime image compression manager.
Icon utilities.
Keyboard types.
Size of low memory area.
Locical RAM size.
Macintosh system type.
Resource ID of 'STR ' resource containing machine type.
'STR '
Machine icon.
Miscellaneous attributes.
Mixed mode manager.
680X0 MMU types.
Standard NBP dialog.
Notification manager.
Name registry.
Number of NuBus solts.
Open firmware.
OS attributes.
OS Trap table.
PC Exchange.
Logical memory page size.
Popup menu controls.
Power manager.
Process-to-Process communications toolbox.
Processor type.
Memory parity checking.
QuickDraw attributes.
QuickDraw features.
QuickTime.
QuickTime features.
Size of physical RAM.
RBV, whatever that is.
Size of built in ROM.
ROM version.
Resource manager.
Realtime manager.
Serial controller read address.
Serial controller write address.
Scrap manager.
Script manager.
Number of installed script systems.
SCSI manager.
Control strip attributes.
Serial atrributes.
Number of NuBus connectors.
Slot attributes.
Number of first slot.
Sound attributes.
Standard file manager attributes.
System architecture.
System version.
Text system manager.
Text system manager attributes.
Text system manager for TextEdit.
Text system manager for TextEdit attributes.
TextEdit manager.
TextEdit attributes.
Telephone attributes.
Communications toolbox terminal manager.
Time manager.
Speech synthesis manager.
Toolbox dispatch table.
Thread manager.
TV interface.
Gestalt version.
VIA addresses.
Virtual memory.
Translation manager.
Extended toolbox dispatch table.
Written by Matthias Ulrich Neeracher <neeracher@mac.com>, documentation by Bob Dalgleish <bob.dalgleish@sasknet.sk.ca>. Currently maintained by Chris Nandor <pudge@pobox.com>.
1 POD Error
The following errors were encountered while parsing the POD:
Unknown directive: =include
To install Mac::Carbon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mac::Carbon
CPAN shell
perl -MCPAN -e shell install Mac::Carbon
For more information on module installation, please visit the detailed CPAN module installation guide.