Gestalt Selectors List

Apple System Software (A-B)

This chapter lists selector codes of which the meaning is documented and the first character of the selector code is in the A-B range.

a/ux (A/UX [2.0?])
     (System [6.0.4])
     Returns the version of A/UX, if it is executing, as BCD?

     #define gestaltAUXVersion 'a/ux' /* A/UX version, if present */

     If Gestalt doesn't know the answer, test bit 9 of the HWCFgFlag
     system global (0x0B22; word). If set, assume you have A/UX 1.0.

     This selector also indicates if you're running under MAE on an
     UNIX machine. &AD08

     This selector may be installed but returns gestaltUnknownErr instead
     of zero when A/UX is not installed. (Rene Ros)

addr (System [6.0.4])
     Returns information about the current addressing mode.

     enum {
     #define gestaltAddressingModeAttr 'addr' /* addressing mode attr. */
     gestalt32BitAddressing = 0,  /* started up with 32-bit addr. */
     gestalt32BitSysZone    = 1,  /* system heap has 32-bit clean
                                      block headers */
     gestalt32BitCapable    = 2}; /* machine is 32-bit capable */

afps (AppleShare ext [3.5?], part of System 7.5) &AD18, &AT20
     Returns the version of the AppleShare client software as integer in
     the low-word of the response. The high-word of the response returns
     information about the AppleShare client software.
     (Rene Ros, Jean-Pierre Curcio)

     enum {
     gestaltAFPClient              = FOURCHARCODE('afps'),
     gestaltAFPClientVersionMask   = 0x0000FFFF,
                                             /* low word of long is
                                                the client version
                                                0x0001 -> 0x0007 */
     gestaltAFPClient3_5           = 0x0001,
     gestaltAFPClient3_6           = 0x0002,
     gestaltAFPClient361         = 0x0003,
     gestaltAFPClient362         = 0x0004,
     gestaltAFPClient363         = 0x0005, /* including 3.6.4, 3.6.5*/
     gestaltAFPClient3_7           = 0x0006, /* including 3.7.1 */
     gestaltAFPClient372         = 0x0007, /* including 3.7.3 */
     gestaltAFPClient3_8           = 0x0008, /* With Mac OS 8.5 */

     gestaltAFPClientAttributeMask = (long)0xFFFF0000,
                                             /* high word of long is a
                                                set of attribute bits */
     gestaltAFPClientCfgRsrc       = 16, /* Client uses config resources*/
     gestaltAFPClientUAMv2         = 27, /* AFP client supports the 1998
                                            UAM interface v2 */
     gestaltAFPClientUAMv2         = 28, /* same !? (AFPClient.h) */
     gestaltAFPClientSupportsIP    = 29, /* Client supports AFP over
     gestaltAFPClientVMUI          = 30, /* Client can put up UI from
                                            the PBVolMount trap*/
     gestaltAFPClientMultiReq      = 31  /* Client supports multiple
                                            outstanding requests*/

ag_v (Apple Guide ext [1.2.7])
     Returns the version number of Apple Guide as BCD.

     #define gestaltAppleGuideVersion? 'ag_v'

alis (System [7.0])
     (Remote Access Aliases ext [1.0?], part of Apple Remote Access)
     Returns information about the Alias Manager.

     enum {
     #define gestaltAliasMgrAttr 'alis' /* Alias Mgr attributes */
     gestaltAliasMgrPresent                 = 0,
     gestaltAliasMgrSupportsRemoteAppletalk = 1,  /* supports Remote
                                                     Appletalk &AD02 */
     gestaltAliasMgrSupportsAOCEKeychain    = 2,  /* True if the Alias Mgr
                                                     knows about the AOCE
                                                     AOCE Keychain
                                                     &AS22 */
     gestaltAliasMgrResolveAliasFileWithMountOptions = 3,
     /* True if the Alias Mgr implements IsAliasFile() and
        gestaltAliasMgrResolveAliasFileWithMountOptions()  &AS29 */
     gestalt???                             = 4,  /* With Mac OS 8.5 */
     gestalt???                             = 5}; /* With Mac OS 9.0 */

     NOTE: See 'Reports' chapter (QuickTime section) for more information.

appr (Appearance lib? [1.0a8])
     (System [8.5])
     Returns information about Appearance.

     enum {
     #define gestaltAppearanceAttr 'appr' /* Appearance attributes */
     gestaltAppearanceExists     = 0,  /* appearance is running. */
     gestaltAppearanceCompatMode = 1}; /* running in compatibility mode,
                                          using the system 7 defprocs */

     NOTE: See also 'apvr'.

apsw (Application Switcher ext [1.0] part of System 8.5)
     Returns information about the Application Switcher software.

     enum {
     #define gestaltApplicationSwitcherAttr? 'apsw'
     gestaltAppSwitcherWindowOpen? = 0,  /* window is open */
     gestaltAppSwitcherVertical?   = 1,  /* window is vertical,
                                            else horizontal */
     gestaltAppSwitcherHasTitles?  = 2,  /* processes have name listed */
     gestaltAppSwitcherIconSize?   = 3,  /* 1 = small, 0 = big */
     gestaltAppSwitcherNoFramw?    = 4,  /* window has no frame */
     gestaltAppSwitcherOrder?      = 5,  /* 1 = alphabetical, 0 = launch */
     gestaltAppSwitcherDirection?  = 7}; /* 1 = up/left, 0 = down/right */

apvr (Appearance lib? [1.0.1?])
     (System [8.5])
     Returns the version of Appearance as BCD.

     #define gestaltAppearanceVersion 'apvr' /* Appearance version */

     The presence of gestaltAppearanceAttr ('appr') and the absence of
     this selector indicates version 1.0 of the Appearance Mgr is
     present. (Anonymous)

     Version 1.0.2 returns the same value as version 1.0.1 does.

     See also 'appr'.

ascr (AppleScript ext [1.0])
     gestaltAppleScriptAttr &AS08
     Returns information about AppleScript.

     enum {
     #define gestaltAppleScriptAttr 'ascr' /* AppleScript attributes */
     gestaltAppleScriptPresent        = 0,
     gestaltAppleScriptPowerPCSupport = 1};

ascv (AppleScript ext [1.0])
     gestaltAppleScriptVersion &AS08
     Returns the version of AppleScript as NumVersion?

     #define gestaltAppleScriptVersion 'ascv' /* AppleScript version */

     AppleScript 1.1 returns 0x01100110 which doesn't look like a proper
     version number (version 1.0 returned 0x01008000). (Rene Ros)
     This is actually just a bug in the way AppleScript provides the
     version. Some day it will be fixed. (Jon Pugh)

     It appears the high word contains the interface version, while the
     lower word contains the implementation version. (Jean-Pierre Curcio)

aslm (Shared Library Manager ext [1.1.1?])
     (System [7.5.3])
     gestaltASLM68K &AS17
     Returns the version of the Shared Library Manager as BCD in the upper
     2 bytes and attribute bits in the lower 2 bits. NULL is returned when
     ASLM did not load properly at boot time and is not available.

     enum {
     #define gestaltASLM68K 'aslm' /* ASLM selector for 68K Macs */
     #define gestaltASLMPPC 'slmp' /* ASLM selector for PPC Macs */
     #define gestaltASLM 'aslm'    /* or 'slmp', see below */
     gestaltASLMVersionMask = 0xFFFF0000, /* Version is in upper 2 bytes
                                              of result */
     gestaltASLMPresentMask = 0x0001,     /* If set ASLM is or was
                                              loaded. */
     gestaltASLMLoadedMask  = 0x0002};    /* If set ASLM is currently
                                              loaded. */

         define gestaltASLM gestaltASLMPPC
         define gestaltASLM gestaltASLM68K

     Earlier (beta?) versions of the ASLM PowerPC used 'ASLM' as the
     selector instead of 'slmp'.

     Early releases of Shared Library Manager installed an INIT into the
     system file which registered this selector with an invalid function
     pointer in the case that the Shared Library Manager extension did not
     exist. Calling Gestalt with this selector would then cause a bus error.
     (Paul Cunningham, Teknosys, Inc.)

     Shared Library Manager 2.0 (beta) on a Power Macintosh 6100/60
     installs both 'aslm' and 'slmp' selectors. (Rene Ros)

ASLM (Shared Library Manager ext [1.1.1?])
     (System? [7.5?])
     gestaltASLMPPC (old!) &AS17

     See the gestaltASLM68K ('aslm') entry for more information.

ata  (System? [???])
     gestaltATAAttr &AS22
     Returns information about the ATA Manager. ATA is the driver to
     support IDE hard disks.

     enum {
     #define gestaltATAAttr 'ata '
     gestaltATAPresent = 0}; /* if set, ATA Manager is present */

     What to test for on machines with IDE drives but without this selector

atkv (System [7.0, AppleTalk 56])
     gestaltATalkVersion &AT02
     Returns AppleTalk version as NumVersion. If selector is not present
     then AppleTalk is not present (not loaded at startup). &AD18

     This is different from 'atlk' !

     #define gestaltATalkVersion 'atkv' /* AppleTalk version &AD01/M01 */

     This selector returns the majorRev field of the NumVersion record as
     hexadecimal instead of the usual BCD.

     NOTE: See 'Reports' chapter (AppleTalk section) for more information.

atlk (System [6.0.4])
     Returns the version of the .MPP driver as INTEGER. And returns zero
     when AppleTalk is off. &AD18

     #define gestaltAppleTalkVersion 'atlk' /* AppleTalk version */

aucd (Audio CD Access ext [4.0], part of Apple CD-ROM Software) &AT03
     Returns Audio CD Access version as BCD.

     #define gestaltAudioCDAccessVersion? 'aucd' /* Audio CD Access
                                                     version */

     NOTE: The returned version is obtained from 'vers' resource ID# 1.

bbox (Rhapsody [DR2?])
     Returns information about the Blue Box presence and features.

     enum {
     #define gestaltMacOSCompatibilityBoxAttr 'bbox')
     gestaltMacOSCompatibilityBoxPresent   = 0,  /* True if running under
                                                    the Blue Box */
     gestaltMacOSCompatibilityBoxHasSerial = 1}; /* True if Blue Box serial
                                                 support is implemented. */

bclk (System [7.5.2?) INF?
     gestaltBusClkSpeed &AS22
     Returns the main I/O bus clock speed in Hz.

     #define gestaltBusClkSpeed 'bclk'

     Only on Power Macintosh, not on 68K computers?

     Some 604-based Power Computing models return the wrong value.

     A Daystar Genesis MP (4x 604e at 200 MHz each) returns a value of
     50 MHz. There is no sign of a selector which returns the number of

     The Pippin has been observed to return the value for 66 MHz, which
     is equal to its processor clock speed. This value is correct, it was
     the only Macintosh to run the processor at 1:1, and with quickdraw in
     RAM, it ran at about PowerMac 7100/80 speeds WITHOUT any L2 cache and
     just 5MB of RAM. (Robert M. Seretny, former Pippin-engineer)

     A Power Macintosh 700 (PPC upgraded Quadra 700) using System 7.5.5
     returns 2 MHz. The 'pclk' value is also incorrect.

     See also 'pclk' in this chapter.

BSDa (CloseView cp [???], by Berkeley Systems, Inc.)
     Returns information about the CloseView Control Panel.

     enum {
     #define gestaltCloseViewAttr 'BSDa'      /* CloseView attributes */
     gestaltCloseViewEnabled            = 0,
     gestaltCloseViewDisplayMgrFriendly = 1}; /* Closeview compatible
                                                  with Display Manager
                                                  (System 7.5.2?) &AS05 */

bxid (System? [???])
     Returns information about the box model?

     #define gestaltBoxID? 'bxid'
     #define gestaltBox20thAnnivMacBoxID? 0x0000302B
     #define gestaltBoxPM6500? 0x0000303C

     The following method is used in the Apple System Profiler application
     (the constant names are NOT official; Mark Dawson, Apple Computer):

     long temp;
     long gestMachineNameID;
     #define gestalt20thMacSecondaryID 'bxid'
     #define gestalt20thMacIDValue 0x302B

     err = Gestalt(gestaltMachineType, &gestMachineNameID);

     if ( (gestMachineNameID == gestaltPowerMac5500) &&
             && (temp == gestalt20thMacIDValue)))
       {  // we have a 20th Anniversary Mac