Gestalt Selectors List

Apple System Software (I-L)

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

icmp (QuickTime ext [1.0])
     gestaltCompressionMgr
     Returns Compression Manager version as Integer.

     #define gestaltCompressionMgr 'icmp' /* determines if Image
                                              Compression manager is
                                              available &AS01 */

icon (System 7.5 Update ext [1.0])
     (System [7.6?])
     gestaltIconUtilities
     Returns information about the Icon Utilities routines.

     enum {
     #define gestaltIconUtilities 'icon' /* Icon Utils attributes */
     gestaltIconUtilitiesPresent          = 0,
     gestaltIconUtilitiesHas48PixelIcons  = 1,  /* with Mac OS 8.5 */
     gestaltIconUtilitiesHas32BitIcons    = 2,  /* with Mac OS 8.5 */
     gestaltIconUtilitiesHas8BitDeepMasks = 3,  /* with Mac OS 8.5 */
     gestaltIconUtilitiesHasIconServices  = 4}; /* with Mac OS 8.5 */

     NOTE:
     This selector is supposed to be implemented since System 7.1.2. You
     need to determine if the _IconDispatch A-trap (0xAB49) is available
     instead since the Icon Utilities are actually available since
     System 7.0. &AD13/AT01
     System 7.5.1 finally implements this selector. (Anonymous)

idsp (System [7.1?])
     gestaltInternalDisplay &AS28
     Returns the slot number of internal display location.

     #define gestaltInternalDisplay 'idsp'

iic  (System? [7.5?])
     gestaltIICAttr &AS19
     Returns information about the Inter-Integrated Circuit Bus (IIC).

     enum {
     #define gestaltIICAttr 'iic ' /* Inter-Integrated Circuit Bus */
     gestaltStdIIC         = 0,    /* standard IIC */
     gestaltCombinedIIC    = 1,    /* combined format IIC */
     gestaltExtendedIIC    = 2,    /* extended IIC */
     gestaltMultiIIC       = 3,    /* multiple bus master IIC */
     gestaltGeneralCallIIC = 4,    /* general call IIC */
     gestaltFastIIC        = 5,    /* fast IIC */
     gestaltMBUS_IIC       = 6};   /* Motorola MBUS hardware IIC bus
                                       master */

     NOTE:
     Multiple bits can be set? On a PowerMac 8600/200 both bit 0 and 1 are
     set. (Rene Ros)

     Bit 6 of the 'iic ' gestalt has been defined to indicate MBUS support.
     MBUS is a hardware module within some versions of a Motorola 6805
     microcontroller which is used to implement the Inter-Integrated
     Circuit Bus and allows for higher throughput than the Inter-Integrated
     Circuit Bus master that is implemented in firmware when no MBUS module
     is available. (Ray Montagne)

intd (Powerbook Duo Enabler [1.0])
     (System [7.5])
     (System 7.5 Update [1.0?])
     (System Enabler 111 [1.0])
     (System Enabler 121 [1.0])
     (System Enabler 131 [1.0])
     (System Enabler 201 [1.0])
     gestaltInternalDiskAttr?
     Returns information about the internal harddisk of portable
     computers?

     enum {
     #define gestaltInternalDiskAttr? 'intd' /* PB Internal HD attr. */
     gestaltHasInternalDisk? =  0,  /* TRUE if machine has internal HD */
     gestaltDiskSleeping?    =  1,  /* TRUE if internal HD is spon down */
     gestalt???              = 24}; /* unknown, set on PB180, PB210,
                                        PB540 and others? */

     WARNING:
     This information is from a reliable source. However, is it not
     officially confirmed by Apple and there are no constants defined.

     NOTE:
     On a PB Duo 210 (PowerBook Duo Enabler) I haven't seen bit 1 set with
     System 7.1, even when the disk is spinning. It is also reported the
     bit is clear when the disk is spinning and set when down (seen on
     PB Duo 230). (David Lewis, Rene Ros)
     This problem seems to be fixed with System 7.5.1 and later but with
     bit 1 having the reversed meaning than originally thought: disk spon
     down. (Rene Ros)

iscd (ISO 9660 File Access ext [5.0], part of Apple CD-ROM Software)
     gestaltISO9660Version?
     Returns ISO 9660 File Access version in BCD?

     #define gestaltISO9660Version? 'iscd'

     NOTE:
     Versions before 5.0 installed the 'hscd' selector.

isrv (Appearance Extension [1.0?], IconServices INIT resource)
     (System? [8.5a)
     gestaltIconServicesAttr
     Returned information about the IconServices Manager.

     enum {
     #define gestaltIconServicesAttr 'isrv'
     gestaltIconServicesPresent	             = 0,
     gestaltIconServicesHasIconFamilySupport = 1};

     WARNING:
     This selector was only present with early alpha versions of
     Mac OS 8.5. It is replaced by the gestaltIconUtilitiesHasIconServices
     bit of the gestaltIconUtilities ('icon') selector.

kbd  (System [6.0.4])
     gestaltKeyboardType
     Returns a value that indicates the type of keyboard on which the last
     keystroke was seen.

     enum {
     #define gestaltKeyboardType 'kbd ' /* keyboard type */
     gestaltMacKbd            =   1,  /* Macintosh Keyboard */
     gestaltMacAndPad         =   2,  /* Macintosh Keyboard with Pad */
     gestaltMacPlusKbd        =   3,  /* Macintosh Plus Keyboard */
     gestaltExtADBKbd         =   4,  /* Extended ADB Keyboard */
     gestaltStdADBKbd         =   5,  /* Standard ADB Keyboard */
     gestaltPrtblADBKbd       =   6,  /* Portable ADB Keyboard */
     gestaltPrtblISOKbd       =   7,  /* Portable ISO ADB Keyboard */
     gestaltStdISOADBKbd      =   8,  /* Standard ISO ADB Keyboard */
     gestaltExtISOADBKbd      =   9,  /* Extended ISO ADB Keyboard */
     gestaltADBKbdII          =  10,  /* ADB Keyboard II */
     gestaltElmerKbd          =  10,  /* = gestaltADBKbdII, used in some
                                         sample code */
     gestaltADBISOKbdII       =  11,  /* ISO ADB Keyboard II */
     gestaltElmerISOKbd       =  11,  /* = gestaltADBISOKbdII, used in
                                         some sample code */
     gestaltPwrBookADBKbd     =  12,  /* PowerBook Keyboard &AT01 */
     gestaltPwrBookISOADBKbd  =  13,  /* PowerBook Keyboard (ISO) &AT01 */
     gestaltAppleAdjustKeypad =  14,  /* Apple Adjustable Keypad &AT01 */
     gestaltAppleAdjustADBKbd =  15,  /* US Adjustable Keyboard &AS21 */
     gestaltAppleAdjustISOKbd =  16,  /* ISO Adjustable Keyboard &AS21 */
     gestaltJapanAdjustADBKbd =  17,  /* Japan Adjustable Keyboard &AS21 */

     /* PowerBook Extended Keyboards &AS15 */
     gestaltPwrBkExtISOKbd    =  20,  /* PowerBook Extended Intl. */
     gestaltPwrBkExtJISKbd    =  21,  /* PowerBook Extended Japanese */
     gestaltPwrBkExtADBKbd    =  24,  /* PowerBook Extended Domestic */

     /* PowerBook Keyboards in Universail Headers &AS29 */
     gestaltPS2Keyboard       =  27,  /* PS2 keyboard */
     gestaltPwrBkSubDomKbd    =  28,  /* PowerBook Subnote Domestic
                                         Keyboard with function keys w/
                                         inverted T */
     gestaltPwrBkSubISOKbd    =  29,  /* PowerBook Subnote International
                                         Keyboard with function keys w/
                                         inverted T */
     gestaltPwrBkSubJISKbd    =  30,  /* PowerBook Subnote Japanese
                                         Keyboard with function keys w/
                                         inverted T */
     gestaltPwrBkEKDomKbd     = 195,  /* PowerBook Domestic Keyboard with
                                         Embedded Keypad, function keys &
                                         inverted T */
     gestaltPwrBkEKISOKbd     = 196,  /* PowerBook International Keyboard
                                         with Embedded Keypad, function
                                         keys & inverted T */
     gestaltPwrBkEKJISKbd     = 197,  /* PowerBook Japanese Keyboard with
                                         Embedded Keypad, function keys &
                                         inverted T */

     /* USB Keyboards */
     gestaltUSBCosmoANSIKbd   = 198,  /* Cosmo USB Domestic (ANSI) */
     gestaltUSBCosmoISOKbd    = 199,  /* Cosmo USB International (ISO) */
     gestaltUSBCosmoJISKbd    = 200,  /* Cosmo USB Japanese (JIS) */
     gestaltPwrBk99JISKbd     = 201};

     ======================================================================
     Combinations of System Global KbdType/ADB Mgr devType and
     gestaltKeyboardType values                                       &AT01
     ======================================================================
     KbdType    gestaltKeyboardType     Gestalt Name
     (hex.)     (decimal)
     ----------------------------------------------------------------------
      0x03          1                   gestaltMacKbd
      0x13          2                   gestaltMacAndPad
      0x0B          3                   gestaltMacPlusKbd
      0x02          4                   gestaltExtADBKbd
      0x01          5                   gestaltStdADBKbd
      0x06          6                   gestaltPrtblADBKbd
      0x07          7                   gestaltPrtblISOKbd
      0x04          8                   gestaltStdISOADBKbd
      0x05          9                   gestaltExtISOADBKbd
      0x08         10                   gestaltADBKbdII
      0x09         11                   gestaltADBISOKbdII
      0x0C         12                   gestaltPwrBookADBKbd
      0x0D         13                   gestaltPwrBookISOADBKbd
      0x0E         14                   gestaltAppleAdjustKeypad
      0x10         15                   gestaltAppleAdjustADBKbd, US
      0x11         16                   gestaltAppleAdjustADBKbd, ISO
      0x12         17                   gestaltAppleAdjustADBKbd, Japanese
      0x13         20                   gestaltPwrBkExtISOKbd ?
      0x14         21                   gestaltPwrBkExtJISKbd ?
      0x17         24                   gestaltPwrBkExtADBKbd ?
     ----------------------------------------------------------------------

     NOTES:
     The Apple Adjustable Keyboard doesn't have its own Gestalt keyboard
     type defined with some versions of System Software (7.1?). It changes
     a low memory global but this doesn't change the Gestalt response. This
     problem is corrected by the Hardware System Update 2.0 and later.
     An Adjustable Keyboard attached to a Performa 6300 (System 7.5.1)
     causes value 16, an unknown keyboard, to be returned.

     If the keyboard isn't recognized by the Gestalt Mgr, an error is
     returned. &AD19

     The PowerMac 7100/66 (System 7.1.2) doesn't install this selector for
     some reason. Other Macs with Gestalt version 4 do, so it isn't
     intentional.

     You may find a Gestalt header file which lists the Extended ADB
     keyboard as three different types (Domestic, International and
     Japanese) instead of one as later was corrected by Apple in a
     Technical Note. Even the Gestalt header file for ETO #18 lists the
     old (?) info, but should I start doubting about the correctness of the
     Technical Note?
     The KbdType numbers for the PowerBook Extended Keyboards were found
     with the PTCH 5 resource of the Hardware System Update 2.0.
     (Rene Ros)

     Since this selector returns the type of the keyboard last touched
     and because there can be more than one keyboard, MacDTS considers this
     selector to be obsolete. You should use GetADBInfo instead and check
     the orgADBAddr field for a keyboard (0x02) and the devType field
     contains the keyboard device type. It uses the same values as the
     KbdType low memory variable, see the table above. &AD07/AT01

     The 20th Anniversary Macintosh (Spartacus) may return a value for a
     keyboard which normally 'belongs' to a PowerBook. Observed is value
     20 (gestaltPwrBkExtISOKbd: PowerBook Extended Intl.)

kpcd (Apple Photo Access ext [1.0], part of Apple CD-ROM Software) &AT03
     gestaltApplePhotoAccessVersion?
     Returns Apple Phote Access version in BCD.

     #define gestaltApplePhotoAccessVersion? 'kpcd'

     NOTE:
     The above is what the documentation says. However it seems to return
     always 0xFFFFFF7 as response.

lmem (System [6.0.4])
     gestaltLowMemorySize
     Returns the amount of the low-memory area in bytes.

     #define gestaltLowMemorySize 'lmem' /* low-memory area size */

lram (System [6.0.4])
     gestaltLogicalRAMSize
     Returns the amount of logical memory available in bytes.

     #define gestaltLogicalRAMSize 'lram' /* logical RAM size */

     NOTE:
     The returned value may not be accurate because an adjustment to the
     number is performed to yield the best possible estimate of the
     remaining RAM. The discrepancy is usually because of different color
     depth settings for on-board video and because of the NanoKernel
     (68K emulator on Power Macintosh computers). The latter takes about
     870K. &AD18

     With the Mac OS in the Rhapsody Blue Box, this selector returns a
     value for a 1 Gb memory size (1048576K). Rhapsody uses VM and
     'allocates' this amount of memory for the Blue Box without indicating
     VM is on with the 'vm  ' selector. (Anonymous)

     See also 'ram ' and 'uram'.