Important: The information in this document is obsolete and should not be used for new development.
Constants
This section lists the Apple-defined Gestalt Manager selector codes, describes the formats of their responses, and lists the constants defined for their return values.You pass a selector code when you call
Gestalt
to specify the kind of information you need. Apple defines two distinct kinds of selector codes: environmental selectors, which supply information you can use to control the behavior of your application, and informational selectors, which supply information you can't use to determine what hardware or software features are available.The selector code constants use a set of suffixes that indicate what format the response value will take. Selectors with the suffix
Attr
, for example, return a 32-bit response value in which the individual bits represent specific attributes. The constants listed for these response values represent bit numbers. For a more general description of selectors and their response values, see "Interpreting Gestalt Responses" beginning on page 1-9.The
Gestalt
function accepts the following environmental selectors.
Selector Response bits and response values gestaltAddressingModeAttr Current addressing-mode attributes. CONST
gestalt32BitAddressing = 0;
gestalt32BitSysZone = 1;
gestalt32BitCapable = 2;The gestalt32BitAddressing
attribute indicates that the machine started up with 32-bit addressing. Thegestalt32BitSysZone
attribute indicates that the system heap has 32-bit clean block headers (regardless of the type of addressing the machine started up in). See the book Inside Macintosh: Memory for more information about 32-bit addressing.gestaltAliasMgrAttr Alias Manager attributes. CONST
gestaltAliasMgrPresent = 0;
gestaltAliasMgrSupportsRemoteAppleTalk = 1;gestaltAppleEventsAttr The Apple events attribute. CONST
gestaltAppleEventsPresent = 0;
gestaltScriptingSupport = 1;
gestaltOSLInSystem = 2;gestaltAppleTalkVersion The version number of the AppleTalk driver (in particular, the .MPP driver) currently installed. The version number is placed into the low-order byte of the result; ignore the three high-order bytes. If an AppleTalk driver is not currently open, the response
parameter is 0.gestaltATalkVersion The version number of the AppleTalk driver, in the format introduced with AppleTalk version 56. (For a description of AppleTalk, see Inside AppleTalk, second edition.) The version is stored in the high 3 bytes of the return value. Byte 3 contains the major revision number, byte 2 contains the minor revision number, and byte 1 contains a constant that represents the release stage. gestaltATalkVersion
CONST
development = $20;
alpha = $40;
beta = $60;
final = $80;
release = $80;For example, if you call Gestalt
with the'atkv'
selector when AppleTalk version 57 is loaded, you receive the long integer response value$39008000
.Byte 0 always contains 0.
gestaltAUXVersion The version of A/UX if it is currently executing. The result is placed into the low-order word of the response
parameter. If A/UX is not executing,Gestalt
returnsgestaltUnknownErr
.gestaltCFMAttr Code Fragment Manager attributes. CONST
gestaltCFMPresent = 0;gestaltCloseViewAttr The CloseView attributes CONST
gestaltCloseViewEnabled = 0;
gestaltCloseViewDisplayMgrFriendly
= 1;getstaltComponentMgr The version of the Component Manager. getstaltCompressionMgr The version of the Image Compression Manager. gestaltConnMgrAttr Connection Manager attributes. CONST
gestaltConnMgrPresent = 0;
gestaltConnMgrCMSearchFix = 1;
gestaltConnMgrErrorString = 2;
gestaltConnMgrMultiAsyncIO = 3;The gestaltConnMgrCMSearchFix
bit flag indicates that the fix is present that allows theCMAddSearch
routine to work over themAttn
channel.gestaltCRMAttr Communications Resource Manager attributes. CONST
gestaltCRMPresent = 0;
gestaltCRMPersistentFix = 1;
gestaltCRMToolRsrcCalls = 2;gestaltCTBVersion The version number of the Communications Toolbox (in the low-order word of the return value). gestaltDBAccessMgrAttr The Data Access Manager attribute. CONST
gestaltDBAccessMgrPresent = 0;gestaltDictionaryMgrAttr The Dictionary Manager attributes. CONST
gestaltDictionaryMgrPresent = 0;gestaltDisplayMgrAttr The Display Manager attributes. CONST
gestaltDisplayMgrPresent = 0;gestaltDITLExtAttr The Dialog Manager extensions attributes. CONST
gestaltDITLExtPresent = 0;If this flag bit is TRUE
, then the Dialog Manager extensions included in System 7 are available. See the book Inside Macintosh: Macintosh Toolbox Essentials for details about the Dialog Manager.gestaltDragMgrAttr Drag Manager attributes. CONST
gestaltDragMgrPresent = 0;gestaltEasyAccessAttr Easy Access attributes. CONST
gestaltEasyAccessOff = 0;
gestaltEasyAccessOn = 1;
gestaltEasyAccessSticky = 2;
gestaltEasyAccessLocked = 3;gestaltEditionMgrAttr Edition Manager attributes. CONST
gestaltEditionMgrPresent = 0;
gestaltEditionMgrTranslationAware
= 1;gestaltExtToolboxTable The base address of the second half of the Toolbox trap table if the table is discontiguous. If the table is contiguous, this selector returns 0. gestaltFinderAttr Finder attributes. CONST
gestaltFinderDropEvent = 0;
gestaltFinderMagicPlacement
= 1;
gestaltFinderCallsAEProcess
= 2;
gestaltOSLCompliantFinder = 3;
gestaltFinderSupports4GBVolumes
= 4;
gestaltFinderHandlesCFMFailures
= 5;
gestaltFinderHasClippings = 6;gestaltFindFolderAttr The FindFolder
function attribute.CONST
gestaltFindFolderPresent = 0;gestaltFirstSlotNumber The first physical slot. gestaltFontMgrAttr The Font Manager attribute. CONST
gestaltOutlineFonts = 0;gestaltFPUType A constant that represents the type of floating-point unit currently installed, if any. CONST
gestaltNoFPU = 0;
gestalt68881 = 1;
gestalt68882 = 2;
gestalt68040FPU = 3;gestaltFSAttr File system attributes. CONST
gestaltFullExtFSDispatching = 0;
gestaltHasFSSpecCalls = 1;
gestaltHasFileSystemManager = 2;
gestaltFSMDoesDynamicLoad = 3;
gestaltFSSupports4GBVols = 4;
gestaltHasExtendedDiskInit = 6;gestaltFXfrMgrAttr The File Transfer Manager attributes. CONST
gestaltFXfrMgrPresent = 0;
gestaltFXfrMgrMultiFile = 1;
gestaltFXfrMgrErrorString = 2;gestaltHelpMgrAttr The Help Manager attribute. CONST
gestaltHelpMgrPresent = 0;gestaltIconUtilitiesAttr The Icon Utilities attribute. CONST
gestaltIconUtilitiesPresent = 0;gestaltKeyboardType A constant that represents the type of keyboard. CONST
gestaltMacKbd = 1;
gestaltMacAndPad = 2;
gestaltMacPlusKbd = 3;
gestaltExtADBKbd = 4;
gestaltStdADBKbd = 5;
gestaltPrtblADBKbd = 6;
gestaltPrtblISOKbd = 7;gestaltKeyboardType
gestaltStdISOADBKbd = 8;
gestaltExtISOADBKbd = 9;
gestaltADBKbdII = 10;
gestaltADBISOKbdII = 11;
gestaltPwrBookADBKbd = 12;
gestaltPwrBookISOADBKbd = 13;
gestaltAppleAdjustKeypad = 14;
gestaltAppleAdjustADBKbd = 15;
gestaltAppleAdjustISOKbd = 16;If the Apple Desktop Bus (ADB) is in use, there may be multiple keyboards or other ADB devices attached to the machine. The gestaltKeyboardType selector identifies only the type of the keyboard on which the last keystroke occurred. You cannot use this selector to find out what ADB devices are connected. For that, you can use the Apple Desktop Bus Manager, described in Inside Macintosh: Devices. Note that the ADB keyboard types described by
Gestalt
do not necessarily map directly to ADB device handler IDs.Future support for the
gestaltKeyboardType
selector is not guaranteed. To determine the type of the keyboard last touched without usingGestalt
, check the system global variableKbdType
, documented in Inside Macintosh: Devices.If the Gestalt Manager does not recognize the keyboard type, it returns an error. gestaltLogicalPageSize The logical page size. This value is defined only on machines with the MC68010, MC68020, MC68030, or MC68040 microprocessors. On a machine with the MC68000, Gestalt
returns an error when called with this selector.gestaltLogicalRAMSize The amount of logical memory available. This value is the same as that returned by gestaltPhysicalRAMSize
when virtual memory is not installed. On some machines, however, this value might be less than the value returned bygestaltPhysicalRAMSize
because some RAM may be used by the video display and the Operating System.gestaltLowMemorySize The size (in bytes) of the low-memory area. The low-memory area is used for vectors, global variables, and dispatch tables. gestaltMiscAttr Information about miscellaneous pieces of the Operating System or hardware configuration. CONST
gestaltScrollingThrottle = 0;
gestaltSquareMenuBar = 2;gestaltMixedModeVersion The version of Mixed Mode Manager. gestaltMMUType A constant that represents the type of MMU currently installed. CONST
gestaltNoMMU = 0;
gestaltAMU = 1;
gestalt68851 = 2;
gestalt68030MMU = 3;
gestalt68040MMU = 4;
gestaltEMMU1 = 5;gestaltNativeCPUtype Native CPU type. CONST
gestaltCPU68000 = $000;
gestaltCPU68010 = $001;
gestaltCPU68020 = $002;
gestaltCPU68030 = $003;
gestaltCPU68040 = $004;
gestaltCPU601 = $101;Note, to check whether the native system architecture is a MC680x0 or a PowerPC microprocessor, use the gestaltSysArchitecture
selector.gestaltNotificationMgrAttr The Notification Manager attribute. CONST
gestaltNotificationPresent = 0;gestaltNuBusConnectors A bitmap that describes the NuBus \xC5 slot connector locations. On a Macintosh II, for example, the return value would have bits 9 through 14 set, indicating that 6 NuBus slots are present, at locations 9 through 14. gestaltOSAttr General Operating System attributes, such as whether temporary memory handles are real handles. The low-order bits of the response
parameter are interpreted as bit flags. A flag is set to 1 to indicate that the corresponding feature is available. Currently, the following bits are significant:gestaltOSAttr
CONST
gestaltSysZoneGrowable = 0;
gestaltLaunchCanReturn = 1;
gestaltLaunchFullFileSpec = 2;
gestaltLaunchControl = 3;
gestaltTempMemSupport = 4;
gestaltRealTempMemory = 5;
gestaltTempMemTracked = 6;See the book Inside Macintosh: Memory for a full explanation of the temporary memory features, and see the book Inside Macintosh: Processes for a full explanation of the launch control features. gestaltOSTable The base address of the Operating System trap dispatch table. gestaltParityAttr Information about the machine's parity-checking features. CONST
gestaltHasParityCapability = 0;
gestaltParityEnabled = 1;Note that parity is not considered to be enabled unless all installed memory is parity RAM. gestaltPCXAttr PC Exchange attributes. CONST
gestaltPCXHas8and16BitFAT = 0;
gestaltPCXHasProDOS = 1;gestaltPhysicalRAMSize The number of bytes of physical RAM currently installed. gestaltPopupAttr The attribute of the pop-up control definition. CONST gestaltPopupPresent = 0; gestaltPowerMgrAttr Power Manager attributes. CONST
gestaltPMgrExists = 0;
gestaltPMgrCPUIdle = 1;
gestaltPMgrSCC = 2;
gestaltPMgrSound = 3;
gestaltPMgrDispatchExists = 4;gestaltPPCToolboxAttr Program-to-Program Communication (PPC) Toolbox attributes. Note that these constants are defined as masks, not bit numbers. CONST
gestaltPPCToolboxPresent = $0000;
gestaltPPCSupportsRealTime = $1000;
gestaltPPCSupportsIncoming = $0001;
gestaltPPCSupportsOutgoing = $0002;gestaltProcessorType A constant that represents the type of microprocessor currently running. CONST
gestalt68000 = 1;
gestalt68010 = 2;
gestalt68020 = 3;
gestalt68030 = 4;
gestalt68040 = 5;gestaltQuickdrawFeatures QuickDraw features. CONST
gestaltHasColor = 0;
gestaltHasDeepGWorlds = 1;
gestaltHasDirectPixMaps = 2;
gestaltHasGrayishTextOr = 3;
gestaltSupportsMirroring = 4;gestaltQuickdrawVersion The version of QuickDraw, encoded as a revision number in the low-order word of the return value. The high-order byte represents the major revision number, and the low-order byte represents the minor revision number. For example, version 1.3 of 32-Bit QuickDraw represents QuickDraw revision 2.3; its response
value is$0230
.CONST
gestaltOriginalQD = $000;
gestalt8BitQD = $100;
gestalt32BitQD = $200;
gestalt32BitQD11 = $210;
gestalt32BitQD12 = $220;
gestalt32BitQD13 = $230;Values having a major revision number of 1 or 2 indicate that Color QuickDraw is available, in either the 8-bit or 32-bit version. These results do not, however, indicate whether a color monitor is attached to the system. You must use high-level QuickDraw routines to obtain that information. gestaltQuickTimeVersion The QuickTime version. gestaltRealtimeMgrAttr Realtime Manager attributes. CONST
gestaltRealtimeMgrPresent = 0;gestaltResourceMgrAttr The Resource Manager attribute. CONST
gestaltPartialRsrcs = 0;gestaltScrapMgrAttr Scrap Manager attributes. CONST
gestaltScrapMgrTranslationAware= 0;
gestaltTranslationMgrHintOrder
= 1;gestaltScriptCount The number of script systems currently active. gestaltScriptMgrVersion The version number of the Script Manager (in the low-order word of the return value). gestaltSerialAttr Serial hardware attributes of the machine, such as whether or not the GPIa line is connected and can be used for external clocking. CONST
gestaltHasGPIaToDCDa = 0;
gestaltHasGPIaToRTxCa = 1;
gestaltHasGPIaToDCDb = 2;gestaltSlotAttr Slot Manager attributes. CONST
gestaltSlotMgrExists = 0;
gestaltNuBusPresent = 1;
gestaltSESlotPresent = 2;
gestaltSE30SlotPresent = 3;
gestaltPortableSlotPresent = 4;gestaltSoundAttr Sound attributes. CONST
gestaltStereoCapability = 0;
gestaltStereoMixing = 1;
gestaltSoundIOMgrPresent = 3;
gestaltBuiltInSoundInput = 4;
gestaltHasSoundInputDevice = 5;
gestaltPlayAndRecord = 6;
gestalt16BitSoundIO = 7;
gestaltStereoInput = 8;
gestaltLineLevelInput = 9;
gestaltSndPlayDoubleBuffer = 10;
gestaltMultiChannels = 11
gestalt16BitAudioSupport = 12;gestaltSoundAttr
If the bit gestaltStereoCapability
isTRUE
, the available hardware can play stereo sounds. The bitgestaltStereoMixing
indicates that the sound hardware of the machine mixes both left and right channels of stereo sound into a single audio signal for the internal speaker. ThegestaltSoundIOMgrPresent
bit indicates that the new sound input routines are available, and thegestaltBuiltInSoundInput
bit indicates that a built-in sound input device is available. ThegestaltHasSoundInputDevice
bit indicates that some sound input device is available.Note, bits 7 through 12 are not defined for versions of the Sound Manager prior to version 3.0.
gestaltSpeechAttr Speech Manager attributes. CONST
getaltSpeechMgrPresent
= 0;
getaltSpeechHasPPCGlue
= 1;
gestaltStandardFileAttr Standard File Package attributes. CONST
gestaltStandardFile58
= 0;
gestaltStandardFileTranslationAware
= 1;
gestaltStandardFileHasColorIcons
= 2;If the gestaltStandardFile58
flag bit is set, you can call the four new procedures--StandardPutFile
,StandardGetFile
,CustomPutFile
, andCustomGetFile
--introduced with System 7. (The name of the constant reflects the enabling of selectors 5 through 8 on the trap macro that handles the Standard File Package.)gestaltStdNBPAttr Information about the StandardNBP
(Name-Binding Protocol) function.CONST
gestaltStdNBPPresent = 0;gestaltSysArchitecture The native system architecture. CONST
gestalt68k= 1;
gestaltPowerPC= 2;
If the gestalt68k
flag bit is set, the native microprocessor is a MC680x0 chip. If thegestaltPowerPC
flag bit is set, the native microprocessor is a PowerPC chip.gestaltTEAttr TextEdit attributes. CONST
gestaltTEHasGetHiliteRgn= 0;
gestaltTermMgrAttr Terminal Manager attributes. CONST
gestaltTermMgrPresent = 0;
gestaltTermMgrErrorString = 2;gestaltTextEditVersion A constant that indicates which version of TextEdit is present. CONST
gestaltTE1 = 1;
gestaltTE2 = 2;
gestaltTE3 = 3;
gestaltTE4 = 4;
gestaltTE5 = 5;gestaltThreadMgrAtt Thread Manager attributes. CONST
gestaltThreadMgrPresent = 0;
gestaltSpecificMatchSupport = 1;gestaltTimeMgrVersion A constant that indicates which version of the Time Manager is present. CONST
gestaltStandardTimeMgr = 1;
gestaltRevisedTimeMgr = 2;
gestaltExtendedTimeMgr = 3;gestaltToolboxTable The base address of the Toolbox trap dispatch table. gestaltTranslationAttr The Translation Manager attributes. CONST
gestaltTranslationMgrExists = 0;gestaltTSMgrVersion The version of the Text Services. gestaltVersion The version of the Gestalt Manager (in the low-order word of the return value). The current version is 1, corresponding to a returned value of $0001. gestaltVMAttr The virtual memory attributes. CONST
gestaltVMPresent = 0;The
Gestalt
function also accepts the following informational selectors.
- WARNING
- Never infer the existence of certain hardware or software features from the responses that
Gestalt
returns when you pass it an informational selector.