Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 1 - Gestalt Manager / Gestalt Manager Reference


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.
SelectorResponse bits and response values
gestaltAddressingModeAttrCurrent addressing-mode attributes.
 CONST
gestalt32BitAddressing = 0;
gestalt32BitSysZone = 1;
gestalt32BitCapable = 2;
 The gestalt32BitAddressing attribute indicates that the machine started up with 32-bit addressing. The gestalt32BitSysZone 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.
gestaltAliasMgrAttrAlias Manager attributes.
 CONST
gestaltAliasMgrPresent = 0;
gestaltAliasMgrSupportsRemoteAppleTalk = 1;
gestaltAppleEventsAttrThe Apple events attribute.
 CONST
gestaltAppleEventsPresent = 0;
gestaltScriptingSupport = 1;
gestaltOSLInSystem = 2;
gestaltAppleTalkVersionThe 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.
gestaltATalkVersionThe 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.

gestaltAUXVersionThe 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 returns gestaltUnknownErr.
gestaltCFMAttrCode Fragment Manager attributes.
 CONST
gestaltCFMPresent = 0;
gestaltCloseViewAttrThe CloseView attributes
 CONST
gestaltCloseViewEnabled = 0;
gestaltCloseViewDisplayMgrFriendly
= 1;
getstaltComponentMgrThe version of the Component Manager.
getstaltCompressionMgrThe version of the Image Compression Manager.
gestaltConnMgrAttrConnection Manager attributes.
 CONST
gestaltConnMgrPresent = 0;
gestaltConnMgrCMSearchFix = 1;
gestaltConnMgrErrorString = 2;
gestaltConnMgrMultiAsyncIO = 3;
 The gestaltConnMgrCMSearchFix bit flag indicates that the fix is present that allows the CMAddSearch routine to work over the mAttn channel.
gestaltCRMAttrCommunications Resource Manager attributes.
 CONST
gestaltCRMPresent = 0;
gestaltCRMPersistentFix = 1;
gestaltCRMToolRsrcCalls = 2;
gestaltCTBVersionThe version number of the Communications Toolbox (in the low-order word of the return value).
gestaltDBAccessMgrAttrThe Data Access Manager attribute.
 CONST
gestaltDBAccessMgrPresent = 0;
gestaltDictionaryMgrAttrThe Dictionary Manager attributes.
 CONST
gestaltDictionaryMgrPresent = 0;
gestaltDisplayMgrAttr The Display Manager attributes.
 CONST
gestaltDisplayMgrPresent = 0;
gestaltDITLExtAttrThe 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.
gestaltDragMgrAttrDrag Manager attributes.
 CONST
gestaltDragMgrPresent = 0;
gestaltEasyAccessAttrEasy Access attributes.
 CONST
gestaltEasyAccessOff = 0;
gestaltEasyAccessOn = 1;
gestaltEasyAccessSticky = 2;
gestaltEasyAccessLocked = 3;
gestaltEditionMgrAttrEdition Manager attributes.
 CONST
gestaltEditionMgrPresent = 0;
gestaltEditionMgrTranslationAware
= 1;
gestaltExtToolboxTableThe 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.
gestaltFinderAttrFinder attributes.
 CONST
gestaltFinderDropEvent = 0;
gestaltFinderMagicPlacement
= 1;
gestaltFinderCallsAEProcess
= 2;
gestaltOSLCompliantFinder = 3;
gestaltFinderSupports4GBVolumes
= 4;
gestaltFinderHandlesCFMFailures
= 5;
gestaltFinderHasClippings = 6;
gestaltFindFolderAttrThe FindFolder function attribute.
 CONST
gestaltFindFolderPresent = 0;
gestaltFirstSlotNumberThe first physical slot.
gestaltFontMgrAttrThe Font Manager attribute.
 CONST
gestaltOutlineFonts = 0;
gestaltFPUTypeA constant that represents the type of floating-point unit currently installed, if any.
 CONST
gestaltNoFPU = 0;
gestalt68881 = 1;
gestalt68882 = 2;
gestalt68040FPU = 3;
gestaltFSAttrFile system attributes.
 CONST
gestaltFullExtFSDispatching = 0;
gestaltHasFSSpecCalls = 1;
gestaltHasFileSystemManager = 2;
gestaltFSMDoesDynamicLoad = 3;
gestaltFSSupports4GBVols = 4;
gestaltHasExtendedDiskInit = 6;
gestaltFXfrMgrAttrThe File Transfer Manager attributes.
 CONST
gestaltFXfrMgrPresent = 0;
gestaltFXfrMgrMultiFile = 1;
gestaltFXfrMgrErrorString = 2;
gestaltHelpMgrAttrThe Help Manager attribute.
 CONST
gestaltHelpMgrPresent = 0;
gestaltIconUtilitiesAttrThe Icon Utilities attribute.
 CONST
gestaltIconUtilitiesPresent = 0;
gestaltKeyboardTypeA 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 using Gestalt, check the system global variable KbdType, documented in Inside Macintosh: Devices.

 If the Gestalt Manager does not recognize the keyboard type, it returns an error.
gestaltLogicalPageSizeThe 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.
gestaltLogicalRAMSizeThe 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 by gestaltPhysicalRAMSize because some RAM may be used by the video display and the Operating System.
gestaltLowMemorySizeThe size (in bytes) of the low-memory area. The low-memory area is used for vectors, global variables, and dispatch tables.
gestaltMiscAttrInformation about miscellaneous pieces of the Operating System or hardware configuration.
 CONST
gestaltScrollingThrottle = 0;
gestaltSquareMenuBar = 2;
gestaltMixedModeVersionThe version of Mixed Mode Manager.
gestaltMMUTypeA constant that represents the type of MMU currently installed.
 CONST
gestaltNoMMU = 0;
gestaltAMU = 1;
gestalt68851 = 2;
gestalt68030MMU = 3;
gestalt68040MMU = 4;
gestaltEMMU1 = 5;
gestaltNativeCPUtypeNative CPU type.
 CONST
gestaltCPU68000 = $000;
gestaltCPU68010 = $001;
gestaltCPU68020 = $002;
gestaltCPU68030