Gestalt Selectors List

Apple System Software (P-R)

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

pccd (System? [7.5.3?])
     gestaltCardServicesAttr &AD24 &AS26
     Returns information about the PC Card Manager (for managing i.e.
     PCMCIA cards).

     enum {
     #define gestaltCardServicesAttr 'pccd', /* Card Services attributes */
     gestaltCardServicesPresent   = 0,  /* PC Card 2.0 (68K) API present */
     gestaltPCCardFamilyPresent   = 1,  /* PC Card 3.x (PowerPC) API
                                           present*/
     gestaltPCCardHasPowerControl = 2,  /* PCCardSetPowerLevel is
                                           supported */
     gestaltPCCardSupportsCardBus = 3,  /* CardBus is supported */

     /* constant names also listed, but believed to be obsolete */
     gestaltPCCardDispatchExists = 0,  /* if set, 68K support is present*/
     gestaltCardServicesSupportsRequestIO = 1};
                                       /* if set, CSRequest/ReleaseIO are
                                          supported*/

     NOTE:
     This selector is not implemented with any current system software
     (7.5.1) on the PowerBook 500 Series computers.

     On a PowerBook 3400c/180 (with Mac OS 7.6) this selectors returns
     0x02, so bit 1 isn't set!? (Rene Ros)

     The two sources: PCMCIA API Manual (AD24) and the later PCCard.h header
     file on Dev.CD Apr 97 SDK1; PC Card 3.0 SDK (AS26) each list different
     constant names.

pclk (System [7.5.2]) INF?
     gestaltProcClkSpeed &AS22
     Returns the processor clock speed in Hz.

     #define gestaltProcClkSpeed 'pclk'

     NOTES:
     Only on Power Macintosh, not on 68K computers?

     On a PowerBook 5300c with System 7.5.2 this selector returns 99.9999 Mhz,
     not 100. Small 'off-by-one' bug? (Rene Ros)

     Some 604-based Power Computing models return the wrong value. This may
     be because the ROM doesn't properly handle speeds above 200 MHz.
     (Jean-Pierre Curcio and others)

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

     A Centris 610 (System 7.1) returns 12672. (Daniel C. Kueng)

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

     Mac OS in the Blue Box under Rhapsody returns a value for 80 MHz.
     (Anonymous)

     See also 'bclk' in this chapter.

pcxg (PC Exchange cp? [???])
     (File Exchange cp? [???] part of Mac OS 8.5?)
     gestaltPCXAttr &AS04/AS05
     Returns information about PC Exchange.

     enum {
     #define gestaltPCXAttr 'pcxg'   /* PC Exchange attributes */
     gestaltPCXHas8and16BitFAT = 0,  /* PC Exchange supports both 8 and
                                         16 bit FATs */
     gestaltPCXHasProDOS       = 1,  /* PC Exchange supports ProDOS */
     gestalt???                = 2,  /* with Mac OS 8.5 */
     gestalt???                = 3}; /* with Mac OS 8.5 */

     NOTE:
     [This selector] isn't supported by all versions of PCExchange.
     [...] to find out if MS-DOS (or ProDOS) disks can be mounted you can
     use the File System Manager' GetFSInfo routine to determine what
     FSM-based file systems are installed. (Jim Luther)

pgsz (System [6.0.4])
     gestaltLogicalPageSize
     Returns the logical page size in bytes.

     #define gestaltLogicalPageSize 'pgsz' /* logical page size */

     NOTE:
     The value is unknown on 68000 machines, Gestalt will return an error.

pop! (System [7.0])
     gestaltPopupAttr
     Returns information about the pop-up control definition.

     enum {
     #define gestaltPopupAttr 'pop!' /* pop-up CDEF attributes */
     gestaltPopupPresent = 0}; /* pop-up CDEF available */

powr (System [6.0.4])
     gestaltPowerMgrAttr
     Returns information about the Power Manager, if present.

     enum {
     #define gestaltPowerMgrAttr 'powr' /* Power Mgr attributes */
     gestaltPMgrExists         = 0,  /* Power Mgr is present */
     gestaltPMgrCPUIdle        = 1,  /* CPU can idle */
     gestaltPMgrSCC            = 2,  /* can stop SCC clock */
     gestaltPMgrSound          = 3,  /* can shut off sound circuits */
     gestaltPMgrDispatchExists = 4,  /* dispatch routines are present */
     gestaltPMgrSupportsAVPowerStateAtSleepWake = 5}; /* &AS28 */

     NOTE:
     Bit 4 seen set on Power Macs (starting with System 7.5.2?)
     This is because some desktop machines support the Power Manager for
     things like Energy Star compliance. (Two anonymous contributors)

     See also the 'pwrv' selector.

ppc  (System [7.0])
     gestaltPPCToolboxAttr
     Returns information about the capabilities of the PPC Toolbox as
     bit masks.

     enum {
     #define gestaltPPCToolboxAttr 'ppc '  /* PPC Toolbox attributes */
     gestaltPPCToolboxPresent            = 0x0000,  /* Requires PPCInit to
                                                      be called */
     gestaltPPCSupportsIncoming          = 0x0001,  /* Allow incoming net
                                                      requests */
     gestaltPPCSupportsOutGoing          = 0x0002,  /* Allow outgoing net
                                                      requests */
     gestaltPPCSupportsTCP_IP            = 0x0004,  /* supports TCP/IP */
     gestaltPPCSupportsIncomingAppleTalk = 0x0010,
     gestaltPPCSupportsIncomingTCP_IP    = 0x0020,
     gestaltPPCSupportsOutgoingAppleTalk = 0x0100,
     gestaltPPCSupportsOutgoingTCP_IP    = 0x0200
     gestaltPPCSupportsRealTime          = 0x1000}; /* Supports real-time
                                                      delivery */

     NOTE:
     The first thing that is confusing is that, unlike other selectors
     returning attributes, the responses are not bit values, but bit masks.
     This means you simply AND the value with the response to test the bit.
     The second thing that is confusing is how to interpret
          gestaltPPCToolboxPresent = 0x0000.
     What this means is that if the PPC toolbox is present, but has not
     been initialised (by calling PPCInit), then gestaltPPCToolboxAttr
     returns 0x0000. In reality, PPCInit gets called by the Process
     Manager before any applications get launched, so no applications will
     actually see this response. (Dave Radcliffe)

proc (System [6.0.4])
     gestaltProcessorType
     Returns a value that indicates the type of processor that is
     currently running (or emulated on Power Macs or under MAE).

     enum {
     #define gestaltProcessorType 'proc' /* processor type */
     gestalt68000 = 1,  /* MC68000 */
     gestalt68010 = 2,  /* MC68010 */
     gestalt68020 = 3,  /* MC68020 */
     gestalt68030 = 4,  /* MC68030 */
     gestalt68040 = 5}; /* MC68040 &S01 */

     NOTES:
     The 68LC040 responds as type gestalt68040 but doesn't have a FPU. The
     user can swap out the 68LC040 and put in a real 68040 with FPU, so
     just checking the machineType or the processorType isn't enough.
     (Dave Radcliffe)

     Has there been a 68EC030 processor??? I assume it returns
     gestalt68030 but doesn't have an MMU. (Rene Ros)

     On a Power Macintosh the Gestalt function returns, although a 68LC040
     is emulated, the value gestalt68020. This return value is intended to
     highlight the two ways in which the 68LC040 Emulator more closely
     resembles a 68020 processor than a 68040 processor. &AD11

prpv (PowerTalk ext [1.0?], part of PowerTalk)
     gestaltSDPPromptVersion
     Returns the SDP Prompt version as INTEGER. Returns zero if not
     present and available.

     #define gestaltSDPPromptVersion 'prpv' /* SDP Prompt version */

prty (System [6.0.4])
     gestaltParityAttr
     Returns information about the parity-checking abilities of the
     machine.

     enum {
     #define gestaltParityAttr 'prty' /* parity attributes */
     gestaltHasParityCapability = 0,
     gestaltParityEnabled       = 1};

pwky (System Update enbl [7.5 upd 2.0])
     gestaltPowerKeyAddr?
     Returns a pointer to a routine of type

     typedef pascal OSErr (*PwrKeyProc)(short item, short action);

     to enable/disable the PowerKey and/or Shutdown Alert.

     #define gestaltPowerKeyAddr? 'pwky'

     NOTE:
     See TechNote 1017 (System 7.5 Update 2.0 / System 7.5.3) for more
     detailed information.

pwrv (System? [???])
     gestaltPowerMgrVers
     Returns the Power Manager version as ???

     #define gestaltPowerMgrVers 'pwrv'

     NOTE:
     See also the 'powr' selector.

qd   (System [6.0.4])
     gestaltQuickdrawVersion
     Returns the version of QuickDraw currently present as 2-byte value.

     enum {
     #define gestaltQuickdrawVersion 'qd  ' /* QuickDraw version */
     gestaltOriginalQD  = 0x0000,
     gestaltOriginalQD1 = 0x0001,
     gestalt8BitQD      = 0x0100,
     gestalt32BitQD     = 0x0200,
     gestalt32BitQD11   = 0x0210,
     gestalt32BitQD12   = 0x0220,
     gestalt32BitQD13   = 0x0230,
     gestalt32BitQD135? = 0x0235,  /* with System 7.1.2, ROM = 3072K? */
     gestalt32BitQD139? = 0x0239,  /* with System 7.5.1 on Power Macs
                                      &AT12 */
     gestalt32BitQD141? = 0x0241,  /* with System 7.5.2 */
     gestaltAllegroQD   = 0x0250,  /* Allegro QD OS 8.5, test versions? */
     gestalt32BitQD251? = 0x0251}; /* with Mac OS 8.5 final */

     ======================================================================
     Possible Combinations of ROM Versions and System Software Versions
     ======================================================================
     ROM Class             System Version         Gestalt Value
     ----------------------------------------------------------------------
     Black-and-white class <  7.0                 gestaltOriginalQD
     (ROM < 256K)          >= 7.0                 gestaltOriginalQD and
                                             gestaltSystemVersion >= 0x0700

     Color QD class        <  7.0, no INITs       gestalt8BitQD
     (ROM = 256K)          6.0.3/6.0.4 and        gestalt32BitQD
                           32-Bit QD INIT 1.0
                           6.0.5-6.0.8 and        gestalt32BitQD12
                           32-Bit QD INIT 1.2
                           >= 7.0                 gestalt32BitQD13

     ci class              6.0.4                  gestalt32BitQD + 1
     (256K < ROM >= 3072K) 6.0.5-6.0.8            gestalt32BitQD12
                           >= 7.0                 gestalt32BitQD13
     SuperROM?             7.1.2-7.5?             gestalt32BitQD135?
     (ROM = 3072K)         7.5.1?                 gestalt32BitQD139?
                           7.5.2-8.0?             gestalt32BitQD141?
                           8.5-9.0                gestalt32BitQD251?
     ----------------------------------------------------------------------
     (Original source: D e v e l o p 14, June 1993, p. 56;
      Info on System 7.1.2 and later based on observations and technical
      notes.)

     NOTE:
     gestalt32BitQD11 is never returned and gestalt32BitQD + 1 means
     0x0201 as response value and doesn't has a constant defined.
     Another QuickDraw version is System 7 with a black-and-white class
     machine.

     Color QuickDraw is only available on 68020 and greater CPUs, and
     this selector always returns gestaltOriginalQD on 68000 machines,
     even when running System 7. &AT11

qdrw (System [7.0])
     gestaltQuickDrawFeatures &S01
     Returns information about QuickDraw.

     enum {
     #define gestaltQuickDrawFeatures 'qdrw'     /* QuickDraw attributes */
     #define gestaltQuickDrawFeaturesAttr 'qdrw' /* used in some headers */
     gestaltHasColor          = 0,
     gestaltHasDeepGWorlds    = 1,
     gestaltHasDirectPixMaps  = 2,
     gestaltHasGrayishTextOr  = 3,
     gestaltSupportsMirroring = 4,  /* &AD12 */
     gestaltQDHasLongRowBytes = 5}; /* Long rowBytes supported in GWorlds*/

     NOTES:
     There is a bug in the 'qdrw' selector that causes it to report that
     Color QuickDraw is always present, even on machines that don't support
     it. Apple has acknowledged this bug on AppleLink. (Chris Wysocki)
     Use SysEnvirons instead or test for the QD version ('qd  ') being
     8-bit QD or later.

qtim (QuickTime ext [1.0])
     gestaltQuickTime
     gestaltQuickTimeVersion
     Returns QuickTime version as NumVersion.

     #define gestaltQuickTime 'qtim' /* Movie Toolbox Availability */
     #define gestaltQuickTimeVersion 'qtim' /* Movie Toolbox version */

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

     Initially the name 'gestaltQuickTime' was used to test for the
     availability of QuickTime. The fact that is always returned a
     version number was not documented until later. Then the name
     'gestaltQuickTimeVersion' was defined. (Rene Ros)

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

qtrs (QuickTime PowerPlug ext [1.0?])
     gestaltQuickTimeFeatures &AS06
     Returns information about QuickTime.

     enum {
     #define gestaltQuickTimeFeatures 'qtrs' /* QT Features attributes */
     gestaltPPCQuickTimeLibPresent = 0}; /* PowerPC QT glue library is
                                             present */

     NOTE:
     The gestaltPPCQuickTimeLibPresent bit indicates that the native
     QuickTime interface library is available and can be called by native
     PowerPC applications. (Dave Radcliffe)
     See for more info Technical Note
     'QT 01 - Inside Macintosh: QuickTime Addendum'.

qtsf (QuickTime ext [4.0])
     gestaltQuickTimeStreamingFeatures
     Returns information about QuickTime Streaming.

     #define gestaltQuickTimeStreamingFeatures 'qtsf'

qtst (QuickTime? ext [4.0?])
     gestaltQuickTimeStreamingVersion
     Returns the version of QuickTime Streaming as BCD?

     #define gestaltQuickTimeStreamingVersion 'qtst'

qtvr (QuickTime VR ext [2.0])
     gestaltQTVRMgrAttr
     Returns information about QuickTime VR.

     enum {
     #define gestaltQTVRMgrAttr 'qtvr' /* QuickTime VR attributes */
     gestaltQTVRMgrPresent            = 0,  /* QTVR API is present */
     gestaltQTVRObjMoviesPresent      = 1,  /* QTVR runtime knows about
                                                object movies */
     gestaltQTVRCylinderPanosPresent  = 2}; /* QTVR runtime knows about
                                                cylindrical panoramic
                                                movies */

qtvv (QuickTime VR ext [2.0])
     gestaltQTVRMgrVers
     Returns the version of QuickTime VR as NumVersion.

     #define gestaltQTVRMgrVers 'qtvv'

     NOTE:
     Versions before QuickTime VR 2.0 returned the version as BCD?

ram  (System [6.0.4])
     gestaltPhysicalRAMSize
     Returns the number of bytes of the physical RAM currently installed.

     #define gestaltPhysicalRAMSize 'ram ' /* physical RAM */

     NOTE:
     See also 'lram' and 'uram'.

rbv  (System [6.0.4, discontinued?]) &AS04
     gestaltRBVAddr
     Returns the address of the RBV.

     #define gestaltRBVAddr 'rbv ' /* RBV address */

reno (Apple Guide ext [1.2?], part of System 7.5 and later)
     gestaltRenoAddr?
     Returns a pointer to the Apple Guide globals. (Anonymous)

     #define gestaltRenoAddr? 'reno'

     NOTE:
     Indicates presence "of the Reno system extension." (Reno is the
     mechanism behind Apple Guide for managing the help data-bases?)

rmbg (System [7.5.2])
     gestaltResourceMgrBugFixAttrs
     Returns information to determine both the presence of the native
     Resource Manager and the ordering of resources returned by the
     GetIndType and Get1IndType. &AT13

     enum {
     #define gestaltResourceMgrBugFixAttrs 'rmbg'
     #define kResourceBugFixesAttrs gestaltResourceMgrBugFixAttrs
     gestaltRMForceSysHeapRolledIn        = 0,
     gestaltRMFakeAppleMenuItemsRolledIn  = 1,
     gestaltSanityCheckResourceFiles      = 2,  /* does sanity checking */
     kGestaltRMTypeIndexOrderingUndefined = 3,  /* ordering information
                                                   unavailable */
     gestaltRMTypeIndexOrderingReverse    = 8}; /* opposite order */

     See also the gestaltResourceMgrAttr ('rsrc') selector.

rom  (System [6.0.4]) INF
     gestaltROMSize
     Returns the size of the installed ROM in bytes.

     #define gestaltROMSize 'rom ' /* ROM size */

     NOTE:
     On Power Macintosh computers this selector returns the ROM size minus
     the 68K emulator portion, which uses about 1 MB. &AD18

romv (System [6.0.4]) INF
     gestaltROMVersion
     Returns the version number of the installed ROM.

     #define gestaltROMVersion 'romv' /* ROM version */

rsrc (System [should work since 7.0?])
     gestaltResourceMgrAttr
     Returns information about the Resource Manager.

     enum {
     #define gestaltResourceMgrAttr 'rsrc' /* Resource Mgr attributes */
     gestaltPartialRsrcs       = 0,
     gestaltResourceOverrides? = 1}; /* resource map overrides? */

     NOTE:
     Under System 7, bit 0 that tells if you have partial resource support
     doesn't work right. The selector is undefined under System 7.0 and
     7.0.1 even though the partial resource calls are available. This has
     been acknowledged by Apple. (Michael Hecht, Quinn)

     See also the gestaltResourceMgrBugFixAttrs ('rmbg') selector.

rtmr (System? [7.1.1?])
     gestaltRealtimeMgrAttr
     Returns information about the Realtime Manager.

     enum {
     #define gestaltRealtimeMgrAttr 'rtmr' /* Realtime Mgr attributes */
     gestaltRealtimeMgrPresent = 0}; /* Realtime Mgr is present */

     NOTE:
     If the RealTime Mgr is present this means the ARTA routines are
     available to determine if and how many DSPs are installed.
     (Zalman Stern)