Manager: Gestalt Manager



Carbon supports the Gestalt Manager. However, the results returned by Gestalt functions on 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 on Mac OS X than it returns when called from a Classic application on 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.

Supported  DeleteGestaltValue

Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in Mac OS X 10.0 and later.

Supported  DisposeSelectorFunctionUPP

Available in CarbonLib 1.0 and later. Available in Mac OS X 10.0 and later.

Supported  Gestalt

Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in Mac OS X 10.0 and later.

Supported  InvokeSelectorFunctionUPP

Available in CarbonLib 1.0 and later. Available in Mac OS X 10.0 and later.

Not Recommended  NewGestalt

For compatibility with Mac OS X, you should avoid using the NewGestalt function to add a selector code, which requires moving your selector function into the system heap.

Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in Mac OS X 10.0 and later.

Supported  NewGestaltValue

Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in Mac OS X 10.0 and later.

Supported  NewSelectorFunctionUPP

Available in CarbonLib 1.0 and later. Available in Mac OS X 10.0 and later.

Not Recommended  ReplaceGestalt

You should avoid using the ReplaceGestalt function to replace an existing selector function, which also requires your replacement function to reside in the system heap. Applications do not have access to the system heap in Mac OS X.

Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in Mac OS X 10.0 and later.

Supported  ReplaceGestaltValue

Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in Mac OS X 10.0 and later.

Supported  SetGestaltValue

Available in CarbonLib 1.0 and later when running Mac OS 8.1 or later. Available in Mac OS X 10.0 and later.

[Table of Contents] [Manager Index] [Function Index]

Generated on: 12/12/2001. Copyright © 1999-2001 Apple Computer, Inc. All rights reserved.