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

Next Page > Hide TOC

Gestalt Manager Reference

Framework
CoreServices/CoreServices.h
Declared in
Gestalt.h

Overview

You can use the Gestalt Manager and other system software facilities to investigate the operating environment. You need to know about the operating environment if your application takes advantage of hardware or software that is not available on all Macintosh computers. You can also use the Gestalt Manager to inform the operating system that your software is present and to find out about other software registered with the Gestalt Manager.

Carbon supports the Gestalt Manager. However, the results returned by Gestalt functions in Mac OS X are relevant only to your application's context. In general, the Gestalt function returns a different result when called from a Carbon application running in Mac OS X than it returns when called from a Classic application in Mac OS X, because these are different environments. For example, Carbon does not use a ROM, so calling Gestalt from a Carbon application on a beige G3 Macintosh computer and passing the ROMVersion selector returns a different result than Gestalt returns for a Classic application on the same computer. In fact, Gestalt could conceivably return different results for the same call by two Carbon applications.

Because Gestalt operates on a per-context basis in Mac OS X, you can't use it to share information (through pointers or any other means) among applications.

The ROMVersion and machineType selectors are not supported in Carbon.

In versions of the Mac OS prior to Mac OS X, the NewGestalt and ReplaceGestalt functions make use of the system heap, so that new or replaced selectors are available to any process. In Mac OS X, however, there is no system heap, and the selectors are available only on a per-context basis.

Functions by Task

Getting and Setting Gestalt Selector Codes and Values

Working With Universal Procedure Pointers for Gestalt Selector Functions

Functions

DeleteGestaltValue

Deletes a Gestalt selector code so that it is no longer recognized by Gestalt.

OSErr DeleteGestaltValue (
   OSType selector
);

Parameters
selector

The selector code you want to delete. This should be a four-character sequence similar to those defined in “Gestalt Manager Constants.”

Return Value

A result code. See “Gestalt Manager Result Codes.”

Discussion

After calling this function, subsequent query or replacement calls for the selector code will fail as if the selector had never been installed.

In Mac OS X, the selector is on a per-context basis. You cannot use this function to affect another process.

Availability
Declared In
Gestalt.h

DisposeSelectorFunctionUPP

Disposes of a universal procedure pointer to a selector callback function.

void DisposeSelectorFunctionUPP (
   SelectorFunctionUPP userUPP
);

Parameters
userUPP

The universal procedure pointer you want to dispose of.

Availability
Declared In
Gestalt.h

Gestalt

Obtains information about the operating environment.

OSErr Gestalt (
   OSType selector,
   SInt32 *response
);

Parameters
selector

The selector code for the information you need. You can provide any of the four-character sequences defined in “Gestalt Manager Constants.”

response

On input, Gestalt interprets this parameter as an address at which it is to place the result returned by the selector function. Gestalt ignores any information already at this address.

On return, a pointer to the requested information whose format depends on the selector code specified in the selector parameter. Note that the Gestalt function returns the response from all selectors in a long word, which occupies 4 bytes. When not all 4 bytes are needed, the significant information appears in the low-order byte or bytes.

Return Value

A result code. See “Gestalt Manager Result Codes.”

Discussion

The Apple-defined selector codes fall into two categories: environmental selectors, which supply specific environmental information you can use to control the behavior of your application, and informational selectors, which can’t supply information you can use to determine what hardware or software features are available. You can use one of the selector codes defined by Apple or a selector code defined by a third-party product.

Selectors with the suffix Attr return a 32-bit response value in which the individual bits represent specific attributes. The constants listed for these response values represent bit numbers.

Special Considerations

When passed one of the Apple-defined selector codes, the Gestalt function does not move or purge memory and therefore may be called even at interrupt time. However, selector functions associated with non-Apple selector codes might move or purge memory, and third-party software can alter the Apple-defined selector functions. Therefore, it is safest always to assume that Gestalt could move or purge memory.

Version Notes

The ROMVersion and machineType selectors are not supported in Carbon.

In general, the Gestalt function returns a different result when called from a Carbon application running in Mac OS X than it returns when called from a Classic application in Mac OS X, because these are different environments. For example, Carbon does not use a ROM, so calling Gestalt from a Carbon application on a beige G3 Macintosh computer and passing the ROMVersion selector returns a different result than Gestalt returns for a Classic application on the same computer.

Availability
Declared In
Gestalt.h

InvokeSelectorFunctionUPP

Invokes a selector callback function.

OSErr InvokeSelectorFunctionUPP (
   OSType selector,
   long *response,
   SelectorFunctionUPP userUPP
);

Parameters
selector

The selector code for the function you want to invoke. You can provide any of the four-character sequences defined in “Gestalt Manager Constants.”

response

On ouput, the value associated with the selector code.

userUPP

A universal procedure pointer to the selector callback function you want to invoke.

Return Value

A result code. See “Gestalt Manager Result Codes.”

Discussion

You should not need to call this function, as the operating system invokes your selecor callback for you.

Availability
Declared In
Gestalt.h

NewGestaltValue

Installs a new Gestalt selector code and a value that Gestalt returns for that selector.

OSErr NewGestaltValue (
   OSType selector,
   SInt32 newValue
);

Parameters
selector

The selector code you want to add. This should be a four-character sequence similar to those defined in “Gestalt Manager Constants.”

newValue

The value to return for the new selector code.

Return Value

A result code. See “Gestalt Manager Result Codes.”

Discussion

You call the function NewGestaltValue when the specified selector is not already installed and you don't want to override an existing value.

In Mac OS X, the new selector and value are on a per-context basis. That means they are available only to the application or other code that installs them. You cannot use this function to make information available to another process.

Availability
Declared In
Gestalt.h

NewSelectorFunctionUPP

Creates a universal procedure pointer (UPP) to a selector callback function.

SelectorFunctionUPP NewSelectorFunctionUPP (
   SelectorFunctionProcPtr userRoutine
);

Parameters
userRoutine

The address of the selector callback function.

Return Value

On return, a universal procedure pointer to the selector callback function. See the description of the SelectorFunctionUPP data type.

Discussion

You use the NewSelectorFunctionUPP function to create a UPP to pass to the NewGestalt or ReplaceGestalt functions.

Availability
Declared In
Gestalt.h

ReplaceGestaltValue

Replaces the value that the function Gestalt returns for a specified selector code with the value provided to the function.

OSErr ReplaceGestaltValue (
   OSType selector,
   SInt32 replacementValue
);

Parameters
selector

The selector code you want to add. This should be a four-character sequence similar to those defined in “Gestalt Manager Constants.”

replacementValue

The replacement Gestalt value for the selector code.

Return Value

A result code. See “Gestalt Manager Result Codes.”

Discussion

You use the function ReplaceGestaltValue to replace an existing value. You should not call this function to introduce a value that doesn't already exist; instead call the function NewGestaltValue.

In Mac OS X, the selector and replacement value are on a per-context basis. That means they are available only to the application or other code that installs them. You cannot use this function to make information available to another process.

Availability
Declared In
Gestalt.h

SetGestaltValue

Sets the value the function Gestalt will return for a specified selector code, installing the selector if it was not already installed.

OSErr SetGestaltValue (
   OSType selector,
   SInt32 newValue
);

Parameters
selector

The selector code you want to set. This should be a four-character sequence similar to those defined in “Gestalt Manager Constants.”

newValue

The new Gestalt value for the selector code.

Return Value

A result code. See “Gestalt Manager Result Codes.”

Discussion

You use SetGestaltValue to establish a value for a selector, without regard to whether the selector was already installed.

In Mac OS X, the selector and new value are on a per-context basis. That means they are available only to the application or other code that installs them. You cannot use this function to make information available to another process.

Availability
Declared In
Gestalt.h

Callbacks

SelectorFunctionProcPtr

Defines a pointer to a selector callback function that returns information associated with your own selector code.

typedef OSErr (*SelectorFunctionProcPtr)
(
   OSType selector,
   long * response
);

If you name your function MySelectorFunctionProc, you would declare it like this:

OSErr SelectorFunctionProcPtr (
   OSType selector,
   long * response
);

Parameters
selector

The selector code that triggers the function. This should be a four-character sequence similar to those defined in “Gestalt Manager Constants.”

response

On output, the information associated with the selector code.

Return Value

A result code. See “Gestalt Manager Result Codes.”

Discussion

Your selector function places the requested information in the response parameter and returns a result code. If the information is not available, the selector function returns the appropriate error code, which the Gestalt function returns as its function result.

A selector function can call Gestalt or even other selector functions.

Availability
Declared In
Gestalt.h

Data Types

SelectorFunctionUPP

Defines a universal procedure pointer to a selector function callback.

typedef SelectorFunctionProcPtr SelectorFunctionUPP;

Discussion

You can obtain a SelectorFunctionUPP by calling the function NewSelectorFunctionUPP. For more information, see SelectorFunctionProcPtr.

Availability
Declared In
Gestalt.h

Constants

Addressing Mode Attribute Selectors

Specify feature availability information for the addressing mode of the operating system.

enum {
   gestaltAddressingModeAttr = 'addr',
   gestalt32BitAddressing = 0,
   gestalt32BitSysZone = 1,
   gestalt32BitCapable = 2
};

Constants
gestaltAddressingModeAttr

The Gestalt selector you pass to determine the addressing mode attributes that are present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestalt32BitAddressing

If true, the operating system is using 32-bit addressing mode.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestalt32BitSysZone

If true, there is a 32-bit compatible system zone.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestalt32BitCapable

If true, Machine is 32-bit capable.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Discussion

Before calling any function dependent on memory, your application should pass the selector gestaltAddressingModeAttr to the Gestalt function to determine the addressing mode attributes that are present.

Admin Attribute Selectors

Specify feature availability for Macintosh Manager adminstration software.

enum {
   gestaltAdminFeaturesFlagsAttr = 'fred',
   gestaltFinderUsesSpecialOpenFoldersFile = 0
};

Constants
gestaltAdminFeaturesFlagsAttr

The Gestalt selector you pass to determine the admin features that are present. This selector is typically used by the system.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltFinderUsesSpecialOpenFoldersFile

Specifies that the Finder uses a special file to store the list of open folders.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

AFP Client Selectors

Specify version and feature availability information for the AFP client.

enum {
   gestaltAFPClient = 'afps',
   gestaltAFPClientVersionMask = 0x0000FFFF,
   gestaltAFPClient3_5 = 0x0001,
   gestaltAFPClient3_6 = 0x0002,
   gestaltAFPClient3_6_1 = 0x0003,
   gestaltAFPClient3_6_2 = 0x0004,
   gestaltAFPClient3_6_3 = 0x0005,
   gestaltAFPClient3_7 = 0x0006,
   gestaltAFPClient3_7_2 = 0x0007,
   gestaltAFPClient3_8 = 0x0008,
   gestaltAFPClient3_8_1 = 0x0009,
   gestaltAFPClient3_8_3 = 0x000A,
   gestaltAFPClient3_8_4 = 0x000B,
   gestaltAFPClientAttributeMask = 0xFFFF0000,
   gestaltAFPClientCfgRsrc = 16,
   gestaltAFPClientSupportsIP = 29,
   gestaltAFPClientVMUI = 30,
   gestaltAFPClientMultiReq = 31
};

Alias Manager Attribute Selectors

Specify feature availability information for the Alias Manager.

enum {
   gestaltAliasMgrAttr = 'alis',
   gestaltAliasMgrPresent = 0,
   gestaltAliasMgrSupportsRemoteAppletalk = 1,
   gestaltAliasMgrSupportsAOCEKeychain = 2,
   gestaltAliasMgrResolveAliasFileWithMountOptions = 3,
   gestaltAliasMgrFollowsAliasesWhenResolving = 4,
   gestaltAliasMgrSupportsExtendedCalls = 5,
   gestaltAliasMgrSupportsFSCalls = 6,
   gestaltAliasMgrPrefersPath = 7
};

Constants
gestaltAliasMgrAttr

The selector you pass to the Gestalt function to determine the Alias Manager attributes.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Appearance Manager Attribute Selectors

Specify feature availability information for the Appearance Manager.

enum {
   gestaltAppearanceAttr = 'appr',
   gestaltAppearanceExists = 0,
   gestaltAppearanceCompatMode = 1
};

Constants
gestaltAppearanceAttr

The Gestalt selector passed to determine whether the Appearance Manager is present. Produces a 32-bit value whose bits you should test to determine which Appearance Manager features are available.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltAppearanceExists

If this bit is set, Appearance Manager functions are available. To determine which version of the Appearance Manager is installed, check for the presence of the Gestalt selector gestaltAppearanceVersion. If this bit is not set, Appearance Manager functions are not available.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltAppearanceCompatMode

If this bit is set, systemwide platinum appearance is off. When systemwide platinum appearance is off, the Appearance Manager does not auto-map standard System 7 definition functions to their Mac OS 8 equivalents (for those applications that have not called RegisterAppearanceClient). If this bit is not set, systemwide platinum appearance is on, and the Appearance Manager auto-maps standard System 7 definition functions to their Mac OS 8 equivalents for all applications.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Discussion

Before calling any functions dependent upon the Appearance Manager’s presence, your application should pass the selector gestaltAppearanceAttr to the Gestalt function to determine whether the Appearance Manager is present. To determine which version of the Appearance Manager is installed, your application should check for the presence of the Gestalt selector gestaltAppearanceVersion.

Appearance Manager Version Selector

Specifies version information for the Appearance Manager.

enum {
   gestaltAppearanceVersion = 'apvr'
};

Constants
gestaltAppearanceVersion

The Gestalt selector passed to determine which version of the Appearance Manager is installed. If this selector exists, Appearance Manager 1.0.1 (or later) is installed. The version number of the currently installed Appearance Manager is returned in the low-order word of the result in binary code decimal format (for example, version 1.0.1 would be 0x0101). If this selector does not exist but gestaltAppearanceAttr does, Appearance Manager 1.0 is installed.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Apple Event Manager Attribute Selectors

Specify feature availability information for the Apple Event Manager.

enum {
   gestaltAppleEventsAttr = 'evnt',
   gestaltAppleEventsPresent = 0,
   gestaltScriptingSupport = 1,
   gestaltOSLInSystem = 2,
   gestaltSupportsApplicationURL = 4
};

Constants
gestaltAppleEventsAttr

A selector you pass to the Gestalt function. If the Apple Event Manager is not present, the Gestalt function returns an error value; otherwise, it returns noErr and supplies, in the response parameter, a 32-bit value whose bits specify which features of the Apple Event Manager are available.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltAppleEventsPresent

A Gestalt attribute constant. If the bit specified by this constant is set in the response parameter value supplied by Gestalt for the gestaltAppleEventsAttr selector, the Apple Event Manager is present and installed in the system.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltScriptingSupport

A Gestalt attribute constant. If the bit specified by this constant is set in the response parameter value supplied by Gestalt for the gestaltAppleEventsAttr selector, the Open Scripting Architecture (OSA) is available to provide scripting support. The OSA is described in “Scripting Components”.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltOSLInSystem

A Gestalt attribute constant. If the bit specified by this constant is set in the response parameter value supplied by Gestalt for the gestaltAppleEventsAttr selector, the Object Support Library (OSL) is part of the system.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltSupportsApplicationURL

Available in Mac OS X v10.1 and later.

Declared in Gestalt.h

AppleScript Attribute Selectors

Specify feature availability information for AppleScript.

enum {
   gestaltAppleScriptAttr = 'ascr',
   gestaltAppleScriptPresent = 0,
   gestaltAppleScriptPowerPCSupport = 1
};

Constants
gestaltAppleScriptAttr

A selector you pass to the Gestalt function. If AppleScript is not present, the Gestalt function returns an error value; otherwise, it returns noErr and supplies, in the response parameter, a 32-bit value whose bits specify which AppleScript features are available.

The only bit currently in use specifies whether AppleScript is present. You can test this bit with the constant gestaltAppleScriptPresent.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltAppleScriptPresent

A Gestalt attribute constant. If the bit specified by this constant is set in the response parameter value supplied by Gestalt for the gestaltAppleScriptAttr selector, AppleScript is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltAppleScriptPowerPCSupport

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

AppleScript Version Selector

Specifies version information for AppleScript.

enum {
   gestaltAppleScriptVersion = 'ascv'
};

Constants
gestaltAppleScriptVersion

A selector you pass to the Gestalt function. If AppleScript is not present, the Gestalt function returns an error value; otherwise, it returns noErr and supplies, in the response parameter, a 32-bit AppleScript version number.

The low word of the 32-bit AppleScript version number specifies the current AppleScript version, while the high word specifies a compatibility version. For example, for AppleScript 1.3.7, which shipped with Mac OS 8.6, the value returned in the response parameter, viewed as a hex number, is 0x01100137. The low word, 0x0137, refers to the current AppleScript version. The high word, 0x0110, refers to the compatibility version number—scripts written for AppleScript versions 1.1.0 and later will run with AppleScript version 1.3.7.

The Version Notes section provides additional information about AppleScript versions and features.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Version Notes

For System 7.0 and 7.1, AppleScript and the Apple Event Manager were optional installs. Starting with System 7.5, they are part of a standard install, so if you’ve already checked for the presence of System 7.5 or later, you’ll know that the Apple Event Manager is available, though AppleScript could be disabled using the Extensions Manager.

If you need features that are only available starting with a specific version of AppleScript, call Gestalt with the gestaltAppleScriptVersion selector to obtain the version number, then determine whether it is greater than or equal to the version your application requires.

AppleTalk Driver Version Selector

Specifies version information for the AppleTalk driver.

enum {
   gestaltATalkVersion = 'atkv'
};

Constants
gestaltATalkVersion

The version number of the AppleTalk driver, in the format introduced with AppleTalk version 56. 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.

For example, if you call the Gestalt function with the 'atkv' selector when AppleTalk version 57 is loaded, you receive the long integer response value $39008000.

Byte 0 always contains 0.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

AppleTalk Version Selector

Specifies version information for AppleTalk.

enum {
   gestaltAppleTalkVersion = 'atlk'
};

Constants
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.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

ATSUI Attribute Selectors

Specify feature availability for Apple Type Services for Unicode Imaging.

enum {
   gestaltATSUFeatures = 'uisf',
   gestaltATSUTrackingFeature = 0x00000001,
   gestaltATSUMemoryFeature = 0x00000001,
   gestaltATSUFallbacksFeature = 0x00000001,
   gestaltATSUGlyphBoundsFeature = 0x00000001,
   gestaltATSULineControlFeature = 0x00000001,
   gestaltATSULayoutCreateAndCopyFeature = 0x00000001,
   gestaltATSULayoutCacheClearFeature = 0x00000001,
   gestaltATSUTextLocatorUsageFeature = 0x00000002,
   gestaltATSULowLevelOrigFeatures = 0x00000004,
   gestaltATSUFallbacksObjFeatures = 0x00000008,
   gestaltATSUIgnoreLeadingFeature = 0x00000008,
   gestaltATSUByCharacterClusterFeature = 0x00000010,
   gestaltATSUAscentDescentControlsFeature = 0x00000010,
   gestaltATSUHighlightInactiveTextFeature = 0x00000010,
   gestaltATSUPositionToCursorFeature = 0x00000010,
   gestaltATSUBatchBreakLinesFeature = 0x00000010,
   gestaltATSUTabSupportFeature = 0x00000010,
   gestaltATSUDirectAccess = 0x00000010,
   gestaltATSUDecimalTabFeature  = 0x00000020,
   gestaltATSUBiDiCursorPositionFeature = 0x00000020,
   gestaltATSUNearestCharLineBreakFeature = 0x00000020,
   gestaltATSUHighlightColorControlFeature = 0x00000020,
   gestaltATSUUnderlineOptionsStyleFeature = 0x00000020,
   gestaltATSUStrikeThroughStyleFeature = 0x00000020,
   gestaltATSUDropShadowStyleFeature = 0x00000020
};

Constants
gestaltATSUFeatures

Specifies the ATSUI features available on the user’s system. You pass this selector to the Gestalt function. On return, the Gestalt function passes back a value that represents the features available in the version of ATSUI installed on the user’s system.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltATSUTrackingFeature

If the bit specified by this mask constant is set, the functions ATSUCountFontTracking and ATSUGetIndFontTracking are available.

Available beginning with ATSUI 1.1.

Declared in Gestalt.h

gestaltATSUMemoryFeature

If the bit specified by this mask is set, the functions ATSUCreateMemorySetting, ATSUSetCurrentMemorySetting, ATSUGetCurrentMemorySetting, and ATSUDisposeMemorySetting are available.

Available beginning with ATSUI 1.1.

Declared in Gestalt.h

gestaltATSUFallbacksFeature

If the bit specified by this mask is set, the functions ATSUSetFontFallbacks and ATSUGetFontFallbacks are available.

Available beginning with ATSUI 1.1.

Declared in Gestalt.h

gestaltATSUGlyphBoundsFeature

If the bit specified by this mask is set, the function ATSUGetGlyphBounds is available.

Available beginning with ATSU 1.1.

Declared in Gestalt.h

gestaltATSULineControlFeature

If the bit specified by this mask is set, the functions ATSUCopyLineControls, ATSUSetLineControls, ATSUGetLineControl, ATSUGetAllLineControls, and ATSUClearLineControls are available.

Available beginning with ATSUI 1.1.

Declared in Gestalt.h

gestaltATSULayoutCreateAndCopyFeature

If the bit specified by this mask is set, the function ATSUCreateAndCopyTextLayout is available.

Available beginning with ATSUI 1.1.

Declared in Gestalt.h

gestaltATSULayoutCacheClearFeature

If the bit specified by this mask is set, the function ATSUClearLayoutCache is available.

Available beginning with ATSUI 1.1.

Declared in Gestalt.h

gestaltATSUTextLocatorUsageFeature

If the bit specified by this mask is set, the text-break locator attribute is available for both style and text layout objects.

Available beginning with ATSUI 1.2.

Declared in Gestalt.h

gestaltATSULowLevelOrigFeatures

If the bit specified by this mask is set, the low-level features introduced in ATSUI version 2.0 are available.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltATSUFallbacksObjFeatures

If the bit specified by this mask is set, ATSUFontFallbacks objects are available.

Available beginning with ATSUI version 2.3.

Declared in Gestalt.h

gestaltATSUIgnoreLeadingFeature

If the bit specified by this mask is set, the line layout option (kATSIgnoreFontLeadingTag) to ignore the font leading value is available.

Available beginning with ATSUI version 2.3.

Declared in Gestalt.h

gestaltATSUByCharacterClusterFeature

If the bit specified by this mask is set, ATSUI cursor movement types are available.

Available beginning with ATSUI version 2.4.

Declared in Gestalt.h

gestaltATSUAscentDescentControlsFeature

If the bit specified by this mask is set, ascent and descent controls (kATSUDescentTag and kATSUAscentTag) are available.

Available beginning with ATSUI version 2.4.

Declared in Gestalt.h

gestaltATSUHighlightInactiveTextFeature

If the bit specified by this mask is set, the highlight inactive text feature is available.

Available beginning with ATSUI version 2.4.

Declared in Gestalt.h

gestaltATSUPositionToCursorFeature

If the bit specified by this mask is set, the position-to-cursor feature is available.

Available beginning with ATSUI version 2.4.

Declared in Gestalt.h

gestaltATSUBatchBreakLinesFeature

If the bit specified by this mask is set, the ATSUBatchBreakLines function is available.

Available beginning with ATSUI version 2.4.

Declared in Gestalt.h

gestaltATSUTabSupportFeature

If the bit specified by this mask is set, support for tabs is available.

Available beginning with ATSUI version 2.4.

Declared in Gestalt.h

gestaltATSUDirectAccess

If the bit specified by this mask is set, ATSU direct-access functions are available. These functions let you access glyph information directly.

Available beginning with ATSUI version 2.4.

Declared in Gestalt.h

gestaltATSUDecimalTabFeature

If the bit specified by this mask is set, your application can set a decimal tab character.

Available beginning with ATSUI version 2.5.

Declared in Gestalt.h

gestaltATSUBiDiCursorPositionFeature

If the bit specified by this mask is set, support for bidirectional cursor positioning is available.

Available beginning with ATSUI version 2.5.

Declared in Gestalt.h

gestaltATSUNearestCharLineBreakFeature

If the bit specified by this mask is set, the nearest character line break feature is available.

Available beginning with ATSUI version 2.5.

Declared in Gestalt.h

gestaltATSUHighlightColorControlFeature

If the bit specified by this mask is set, your application can control highlight color.

Available beginning with ATSUI version 2.5.

Declared in Gestalt.h

gestaltATSUUnderlineOptionsStyleFeature

If the bit specified by this mask is set, underline options are available.

Available beginning with ATSUI version 2.5.

Declared in Gestalt.h

gestaltATSUStrikeThroughStyleFeature

If the bit specified by this mask is set, strike through styles are available.

Available beginning with ATSUI version 2.5.

Declared in Gestalt.h

gestaltATSUDropShadowStyleFeature

If the bit specified by this mask is set, drop shadow features are available.

Available beginning with ATSUI version 2.5.

Declared in Gestalt.h

Discussion

You can pass the gestaltATSUFeature selector to the Gestalt function to obtain a value that specifies which ATSUI features are available on the user’s system.

You can pass the gestaltATSUVersion selector to the Gestalt function to determine which version of ATSUI is installed on the user’s system. See “ATSUI Version Selectors” for more information

ATSUI Version Selectors

Specify version information for Apple Type Service for Unicode Imaging.

enum {
   gestaltATSUVersion = 'uisv',
   gestaltOriginalATSUVersion = (1 << 16),
   gestaltATSUUpdate1 = (2 << 16),
   gestaltATSUUpdate2 = (3 << 16),
   gestaltATSUUpdate3 = (4 << 16),
   gestaltATSUUpdate4 = (5 << 16),
   gestaltATSUUpdate5 = (6 << 16),
   gestaltATSUUpdate6 = (7 << 16),
   gestaltATSUUpdate7 = (8 << 16)
};

Constants
gestaltATSUVersion

Specifies the version of ATSUI installed on the user’s system. You pass this selector to the Gestalt function. On return, the Gestalt function passes back a value that represents the version of ATSUI installed on the user’s system.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltOriginalATSUVersion

Indicates that version 1.0 of ATSUI is installed on the user’s system.

Available beginning with ATSUI 1.0.

Declared in Gestalt.h

gestaltATSUUpdate1

Indicates that version 1.1 of ATSUI is installed on the user’s system.

Available beginning with ATSUI 1.1.

Declared in Gestalt.h

gestaltATSUUpdate2

Indicates that version 1.2 of ATSUI is installed on the user’s system.

Available beginning with ATSUI 1.2.

Declared in Gestalt.h

gestaltATSUUpdate3

Indicates that version 2.0 of ATSUI is installed on the user’s system.

Available beginning with ATSUI 2.0.

Declared in Gestalt.h

gestaltATSUUpdate4

Indicates that ATSUI for a version of Mac OS X from 10.0.1 through 10.0.4 is installed on the user’s system.

Available beginning with Mac OS X version 10.0.1.

Declared in Gestalt.h

gestaltATSUUpdate5

Indicates that version 2.3 of ATSUI is installed on the user’s system. Available beginning with ATSUI 2.3, in Mac OS X version 10.1.

Available in Mac OS X v10.1 and later.

Declared in Gestalt.h

gestaltATSUUpdate6

Indicates that version 2.4 of ATSUI is installed on the user’s system. Available beginning with ATSUI 2.4, in Mac OS X version 10.2.

Available in Mac OS X v10.2 and later.

Declared in Gestalt.h

gestaltATSUUpdate7

Indicates that version 2.5 of ATSUI is installed on the user’s system. Available beginning with ATSUI 2.5, in Mac OS X version 10.3.

Available in Mac OS X v10.3 and later.

Declared in Gestalt.h

Discussion

Before calling any functions dependent upon ATSUI, you should pass the gestaltATSUVersion selector to the Gestalt function to determine which version of ATSUI is available.

You can pass the gestaltATSUFeatures selector to the Gestalt function to determine which features of ATSUI are available. See “ATSUI Attribute Selectors” for more information.

ATA Manager Attribute Selectors

Specify feature availability information for the ATA Manager.

enum {
   gestaltATAAttr = 'ata ',
   gestaltATAPresent = 0
};

AUX Version Selector

Specifies version information for A/UX.

enum {
   gestaltAUXVersion = 'a/ux'
};

Constants
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, the Gestalt function returns gestaltUnknownErr.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

AVL Tree Attribute Selectors

Specify feature availability information for AVL tree routines.

enum {
   gestaltAVLTreeAttr = 'tree',
   gestaltAVLTreePresentBit = 0,
   gestaltAVLTreeSupportsHandleBasedTreeBit = 1,
   gestaltAVLTreeSupportsTreeLockingBit = 2
};

Bus Clock Version Selector

Specifies version information for the bus clock speed.

enum {
   gestaltBusClkSpeed = 'bclk'
};

Carbon Version Selector

Specifies version information for Carbon.

enum {
   gestaltCarbonVersion = 'cbon'
};

Classic Compatibility Attribute Selectors

Specify feature availability for the Classic environment.

enum {
   gestaltMacOSCompatibilityBoxAttr = 'bbox',
   gestaltMacOSCompatibilityBoxPresent = 0,
   gestaltMacOSCompatibilityBoxHasSerial = 1,
   gestaltMacOSCompatibilityBoxless = 2
};

CloseView Attribute Selectors

Specify feature availability information for CloseView.

enum {
   gestaltCloseViewAttr = 'BSDa',
   gestaltCloseViewEnabled = 0,
   gestaltCloseViewDisplayMgrFriendly = 1
};

Code Fragment Manager Attribute Selectors

Specify feature availability information for the Code Fragment Manager.

enum {
   gestaltCFMAttr = 'cfrg',
   gestaltCFMPresent = 0,
   gestaltCFMPresentMask = 0x0001,
   gestaltCFM99Present = 2,
   gestaltCFM99PresentMask = 0x0004
};

Collection Manager Version Selector

Specify version information for the Collection manager.

enum {
   gestaltCollectionMgrVersion = 'cltn'
};

Constants
gestaltCollectionMgrVersion

Collection Manager version.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Color Picker Version Selectors

Specify version information for the Color Picker.

enum {
   gestaltColorPickerVersion = 'cpkr',
   gestaltColorPicker = 'cpkr'
};

Discussion

To test for the availability and version of the Color Picker Manager, use the Gestalt function with the selector defined by this enumerator.

If the Gestalt function returns a value of 00000200, version 2.0 of the Color Picker Manager is available. If the Gestalt function returns a value of 00000100, version 1.0 (that is, the original Color Picker Package) is available.

ColorSync Manager Attribute Selectors

Specify feature availability information for the ColorSync Manager.

enum {
   gestaltColorMatchingAttr = 'cmta',
   gestaltHighLevelMatching = 0,
   gestaltColorMatchingLibLoaded = 1
};

Constants
gestaltColorMatchingAttr

The selector for obtaining version information. Use when calling the Gestalt function to check for particular ColorSync Manager features.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltHighLevelMatching

This constant is provided for backward compatibility only. Bit 0 of the Gestalt response value is always set if ColorSync is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorMatchingLibLoaded

This constant is provided for backward compatibility only. Bit 1 of the Gestalt response value is always set on a Power Macintosh machine if ColorSync is present. It is always cleared on a 68K machine if ColorSync is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Discussion

These constants were added to ColorSync version 2.0 to aid in the transition from 68K to PowerPC systems. They are not recommended for new applications and are not guaranteed to be carried forward in future versions of ColorSync. However, they are still supported as of version 2.5 for backward compatibility. If you call the Gestalt function passing the selector gestaltColorMatchingAttr, you can test the bit fields of the returned value with the gestaltColorMatchingLibLoaded constant to determine if the ColorSync Manager shared libraries are loaded, or with the gestaltHighLevelMatching constant to determine if the ColorSync QuickDraw-specific functions are present.

ColorSync Manager Version Selectors

Specify version information for the ColorSync Manager.

enum {
   gestaltColorMatchingVersion = 'cmtc',
   gestaltColorSync10 = 0x0100,
   gestaltColorSync11 = 0x0110,
   gestaltColorSync104 = 0x0104,
   gestaltColorSync105 = 0x0105,
   gestaltColorSync20 = 0x0200,
   gestaltColorSync21 = 0x0210,
   gestaltColorSync211 = 0x0211,
   gestaltColorSync212 = 0x0212,
   gestaltColorSync213 = 0x0213,
   gestaltColorSync25 = 0x0250,
   gestaltColorSync26 = 0x0260,
   gestaltColorSync261 = 0x0261,
   gestaltColorSync30 = 0x0300
};

Constants
gestaltColorMatchingVersion

The selector for obtaining version information. Use when calling the Gestalt function to determine whether the ColorSync Manager is available.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync10

A Gestalt response value of gestaltColorSync10 indicates version 1.0 of the ColorSync Manager is present. This version supports general purpose color matching only and does not provide QuickDraw-specific matching functions.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync11

A Gestalt response value of gestaltColorSync11 indicates version 1.0.3 of the ColorSync Manager is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync104

A Gestalt response value of gestaltColorSync104 indicates version 1.4 of the ColorSync Manager is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync105

A Gestalt response value of gestaltColorSync105 indicates version 1.5 of the ColorSync Manager is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync20

A Gestalt response value of gestaltColorSync20 indicates version 2.0 of the ColorSync Manager is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync21

A Gestalt response value of gestaltColorSync21 indicates version 2.1 of the ColorSync Manager is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync211

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync212

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync213

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync25

A Gestalt response value of gestaltColorSync25 indicates version 2.5 of the ColorSync Manager is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync26

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync261

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltColorSync30

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Discussion

These constants were added to ColorSync version 2.0 to aid in the transition from 68K to PowerPC systems. They are not recommended for new applications and are not guaranteed to be carried forward in future versions of ColorSync. However, they are still supported as of version 2.5 for backward compatibility. If you call the Gestalt function passing the selector gestaltColorMatchingAttr, you can test the bit fields of the returned value with the gestaltColorMatchingLibLoaded constant to determine if the ColorSync Manager shared libraries are loaded, or with the gestaltHighLevelMatching constant to determine if the ColorSync QuickDraw-specific functions are present.

Communications Toolbox Version Selector

Specifies version information for the Communications Toolbox.

enum {
   gestaltCTBVersion = 'ctbv'
};

Constants
gestaltCTBVersion

The version number of the Communications Toolbox (in the low-order word of the return value).

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Communication Resource Manager Attribute Selectors

Specify version and feature availability information for the Communications Resource Manager.

enum {
   gestaltCRMAttr = 'crm ',
   gestaltCRMPresent = 0,
   gestaltCRMPersistentFix = 1,
   gestaltCRMToolRsrcCalls = 2
};

Component Manager Version Selectors

Specify version information for the Coomponent Manager.

enum {
   gestaltComponentMgr = 'cpnt',
   gestaltComponentPlatform = 'copl'
};

Constants
gestaltComponentMgr

The Gestalt selector you pass to determine what version of the Component Manager is present.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Discussion

To determine the version of the current Component Manager, your application should pass the selector gestaltComponentMgr to the Gestalt function.

Computer Model Selectors

Specify computer models.

enum {
   gestaltMachineType = 'mach',
   gestaltClassic = 1,
   gestaltMacXL = 2,
   gestaltMac512KE = 3,
   gestaltMacPlus = 4,
   gestaltMacSE = 5,
   gestaltMacII = 6,
   gestaltMacIIx = 7,
   gestaltMacIIcx = 8,
   gestaltMacSE030 = 9,
   gestaltPortable = 10,
   gestaltMacIIci = 11,
   gestaltPowerMac8100_120 = 12,
   gestaltMacIIfx = 13,
   gestaltMacClassic = 17,
   gestaltMacIIsi = 18,
   gestaltMacLC = 19,
   gestaltMacQuadra900 = 20,
   gestaltPowerBook170 = 21,
   gestaltMacQuadra700 = 22,
   gestaltClassicII = 23,
   gestaltPowerBook100 = 24,
   gestaltPowerBook140 = 25,
   gestaltMacQuadra950 = 26,
   gestaltMacLCIII = 27,
   gestaltPerforma450 = gestaltMacLCIII,
   gestaltPowerBookDuo210 = 29,
   gestaltMacCentris650 = 30,
   gestaltPowerBookDuo230 = 32,
   gestaltPowerBook180 = 33,
   gestaltPowerBook160 = 34,
   gestaltMacQuadra800 = 35,
   gestaltMacQuadra650 = 36,
   gestaltMacLCII = 37,
   gestaltPowerBookDuo250 = 38,
   gestaltAWS9150_80 = 39,
   gestaltPowerMac8100_110 = 40,
   gestaltAWS8150_110 = gestaltPowerMac8100_110,
   gestaltPowerMac5200 = 41,
   gestaltPowerMac5260 = gestaltPowerMac5200,
   gestaltPerforma5300 = gestaltPowerMac5200,
   gestaltPowerMac6200 = 42,
   gestaltPerforma6300 = gestaltPowerMac6200,
   gestaltMacIIvi = 44,
   gestaltMacIIvm = 45,
   gestaltPerforma600 = gestaltMacIIvm,
   gestaltPowerMac7100_80 = 47,
   gestaltMacIIvx = 48,
   gestaltMacColorClassic = 49,
   gestaltPerforma250 = gestaltMacColorClassic,
   gestaltPowerBook165c = 50,
   gestaltMacCentris610 = 52,
   gestaltMacQuadra610 = 53,
   gestaltPowerBook145 = 54,
   gestaltPowerMac8100_100 = 55,
   gestaltMacLC520 = 56,
   gestaltAWS9150_120 = 57,
   gestaltPowerMac6400 = 58,
   gestaltPerforma6400 = gestaltPowerMac6400,
   gestaltPerforma6360 = gestaltPerforma6400,
   gestaltMacCentris660AV = 60,
   gestaltMacQuadra660AV = gestaltMacCentris660AV,
   gestaltPerforma46x = 62,
   gestaltPowerMac8100_80 = 65,
   gestaltAWS8150_80 = gestaltPowerMac8100_80,
   gestaltPowerMac9500 = 67,
   gestaltPowerMac9600 = gestaltPowerMac9500,
   gestaltPowerMac7500 = 68,
   gestaltPowerMac7600 = gestaltPowerMac7500,
   gestaltPowerMac8500 = 69,
   gestaltPowerMac8600 = gestaltPowerMac8500,
   gestaltAWS8550 = gestaltPowerMac7500,
   gestaltPowerBook180c = 71,
   gestaltPowerBook520 = 72,
   gestaltPowerBook520c = gestaltPowerBook520,
   gestaltPowerBook540 = gestaltPowerBook520,
   gestaltPowerBook540c = gestaltPowerBook520,
   gestaltPowerMac5400 = 74,
   gestaltPowerMac6100_60 = 75,
   gestaltAWS6150_60 = gestaltPowerMac6100_60,
   gestaltPowerBookDuo270c = 77,
   gestaltMacQuadra840AV = 78,
   gestaltPerforma550 = 80,
   gestaltPowerBook165 = 84,
   gestaltPowerBook190 = 85,
   gestaltMacTV = 88,
   gestaltMacLC475 = 89,
   gestaltPerforma47x = gestaltMacLC475,
   gestaltMacLC575 = 92,
   gestaltMacQuadra605 = 94,
   gestaltMacQuadra630 = 98,
   gestaltMacLC580 = 99,
   gestaltPerforma580 = gestaltMacLC580,
   gestaltPowerMac6100_66 = 100,
   gestaltAWS6150_66 = gestaltPowerMac6100_66,
   gestaltPowerBookDuo280 = 102,
   gestaltPowerBookDuo280c = 103,
   gestaltPowerMacLC475 = 104,
   gestaltPowerMacPerforma47x = gestaltPowerMacLC475,
   gestaltPowerMacLC575 = 105,
   gestaltPowerMacPerforma57x = gestaltPowerMacLC575,
   gestaltPowerMacQuadra630 = 106,
   gestaltPowerMacLC630 = gestaltPowerMacQuadra630,
   gestaltPowerMacPerforma63x = gestaltPowerMacQuadra630,
   gestaltPowerMac7200 = 108,
   gestaltPowerMac7300 = 109,
   gestaltPowerMac7100_66 = 112,
   gestaltPowerBook150 = 115,
   gestaltPowerMacQuadra700 = 116,
   gestaltPowerMacQuadra900 = 117,
   gestaltPowerMacQuadra950 = 118,
   gestaltPowerMacCentris610 = 119,
   gestaltPowerMacCentris650 = 120,
   gestaltPowerMacQuadra610 = 121,
   gestaltPowerMacQuadra650 = 122,
   gestaltPowerMacQuadra800 = 123,
   gestaltPowerBookDuo2300 = 124,
   gestaltPowerBook500PPCUpgrade = 126,
   gestaltPowerBook5300 = 128,
   gestaltPowerBook1400 = 310,
   gestaltPowerBook3400 = 306,
   gestaltPowerBook2400 = 307,
   gestaltPowerBookG3Series = 312,
   gestaltPowerBookG3 = 313,
   gestaltPowerBookG3Series2 = 314,
   gestaltPowerMacNewWorld = 406,
   gestaltPowerMacG3 = 510,
   gestaltPowerMac5500 = 512,
   gestalt20thAnniversary = gestaltPowerMac5500,
   gestaltPowerMac6500 = 513,
   gestaltPowerMac4400_160 = 514,
   gestaltPowerMac4400 = 515,
   gestaltMacOSCompatibility = 1206
};

Discussion

To obtain a string containing the machine’s name, you can pass the returned value to the GetIndString procedure as an index into the resource of type 'STR#' in the System file having the resource ID defined by the constant kMachineNameStrID.

Computer Name Selector

Specifes user-visiblity information for the computer name.

enum {
   gestaltUserVisibleMachineName = 'mnam'
};

Connection Manager Attribute Selectors

Specify feature availability information for the Connection Manager.

enum {
   gestaltConnMgrAttr = 'conn',
   gestaltConnMgrPresent = 0,
   gestaltConnMgrCMSearchFix = 1,
   gestaltConnMgrErrorString = 2,
   gestaltConnMgrMultiAsyncIO = 3
};

Constants
gestaltConnMgrAttr

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltConnMgrPresent

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltConnMgrCMSearchFix

The gestaltConnMgrCMSearchFix bit flag indicates that the fix is present that allows the CMAddSearch function to work over the mAttn channel.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltConnMgrErrorString

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltConnMgrMultiAsyncIO

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Control Manager Attribute Selectors

Specify feature availability information for the Control Manager.

enum {
   gestaltControlMgrAttr = 'cntl',
   gestaltControlMgrPresent = (1L << 0),
   gestaltControlMgrPresentBit = 0,
   gestaltControlMsgPresentMask = (1L << gestaltControlMgrPresentBit)
};

Constants
gestaltControlMgrAttr

The Gestalt selector passed to determine what features of the Control Manager are present. This selector is available with Mac OS 8.5 and later. The Gestalt function produces a 32-bit value whose bits you should test to determine what Control Manager functionality is available.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltControlMgrPresent

If the bit specified by this mask is set, the Control Manager functionality for Appearance Manager 1.1 is available. This bit is set for Mac OS 8.5 and later.

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltControlMgrPresentBit

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

gestaltControlMsgPresentMask

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h

Discussion

Before calling any functions dependent upon the Control Manager, your application should pass the selector gestaltControlMgrAttr to the Gestalt function to determine which Control Manager functions are available.

Control Manager Version Selector

Specifies version information for the Control Manager.

enum {
   gestaltControlMgrVersion = 'cmvr'
};

Constants
gestaltControlMgrVersion

Available in Mac OS X v10.1 and later.

Declared in Gestalt.h

Control Strip Attribute Selectors

Specify feature availability for the Control Strip.

enum {
   gestaltControlStripAttr = 'sdev',
   gestaltControlStripExists = 0,
   gestaltControlStripVersionFixed = 1,
   gestaltControlStripUserFont = 2,
   gestaltControlStripUserHotKey = 3
};

Control Strip Version Selector

Specifies version information for the Control Strip.

enum {
   gestaltControlStripVersion = 'csvr'
};

Constants
gestaltControlStripVersion

Available in Mac OS X v10.0 and later.

Declared in Gestalt.h