diff options
Diffstat (limited to 'mac/tkMacWm.c')
-rw-r--r-- | mac/tkMacWm.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mac/tkMacWm.c b/mac/tkMacWm.c index 2833553..ba32f5e 100644 --- a/mac/tkMacWm.c +++ b/mac/tkMacWm.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacWm.c,v 1.4 1998/09/14 18:23:40 stanton Exp $ + * RCS: @(#) $Id: tkMacWm.c,v 1.5 1998/11/11 17:31:51 jingham Exp $ */ #include <Gestalt.h> @@ -4196,10 +4196,13 @@ TkpWmSetState(winPtr, state) * TkMacHaveAppearance -- * * Determine if the appearance manager is available on this Mac. - * We cache the result so future calls are fast. + * We cache the result so future calls are fast. Return a different + * value if 1.0.1 is present, since many interfaces were added in + * 1.0.1 * * Results: - * True if the appearance manager is present, false otherwise. + * 1 if the appearance manager is present, 2 if the appearance + * manager version is 1.0.1 or greater, 0 if it is not present. * * Side effects: * Calls Gestalt to query system values. @@ -4211,14 +4214,18 @@ int TkMacHaveAppearance() { static initialized = false; - static int TkMacHaveAppearance = false; + static int TkMacHaveAppearance = 0; long response = 0; OSErr err = noErr; if (!initialized) { err = Gestalt(gestaltAppearanceAttr, &response); if (err == noErr) { - TkMacHaveAppearance = true; + TkMacHaveAppearance = 1; + } + err = Gestalt(gestaltAppearanceVersion, &response); + if (err == noErr) { + TkMacHaveAppearance = 2; } } |