From: Stefan Csomor Date: Tue, 1 Jan 2002 14:35:27 +0000 (+0000) Subject: detection of aqua layout scheme added X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0888ccc71f062fcf31845a04cce3cf1dfe799e05 detection of aqua layout scheme added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 91203d7176..f76e815114 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -15,8 +15,10 @@ #define wxUSE_MLTE 0 + static bool sUMAHasAppearance = false ; static long sUMAAppearanceVersion = 0 ; +static bool sUMAHasAquaLayout = false ; extern int gAGABackgroundColor ; bool UMAHasAppearance() { return sUMAHasAppearance ; } long UMAGetAppearanceVersion() { return sUMAAppearanceVersion ; } @@ -26,6 +28,8 @@ static long sUMAWindowManagerAttr = 0 ; bool UMAHasWindowManager() { return sUMAHasWindowManager ; } long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; } +bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; } + void UMACleanupToolbox() { @@ -104,6 +108,11 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) defaults.encoding = kTXNSystemDefaultEncoding; TXNInitTextension(&defaults, 1, (kTXNAlwaysUseQuickDrawTextMask | kTXNWantMoviesMask | kTXNWantSoundMask | kTXNWantGraphicsMask)); #endif + long menuMgrAttr ; + Gestalt( gestaltMenuMgrAttr , &menuMgrAttr ) ; + if ( menuMgrAttr & gestaltMenuMgrAquaLayoutMask ) + sUMAHasAquaLayout = true ; + } // process manager diff --git a/src/mac/uma.cpp b/src/mac/uma.cpp index 91203d7176..f76e815114 100644 --- a/src/mac/uma.cpp +++ b/src/mac/uma.cpp @@ -15,8 +15,10 @@ #define wxUSE_MLTE 0 + static bool sUMAHasAppearance = false ; static long sUMAAppearanceVersion = 0 ; +static bool sUMAHasAquaLayout = false ; extern int gAGABackgroundColor ; bool UMAHasAppearance() { return sUMAHasAppearance ; } long UMAGetAppearanceVersion() { return sUMAAppearanceVersion ; } @@ -26,6 +28,8 @@ static long sUMAWindowManagerAttr = 0 ; bool UMAHasWindowManager() { return sUMAHasWindowManager ; } long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; } +bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; } + void UMACleanupToolbox() { @@ -104,6 +108,11 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) defaults.encoding = kTXNSystemDefaultEncoding; TXNInitTextension(&defaults, 1, (kTXNAlwaysUseQuickDrawTextMask | kTXNWantMoviesMask | kTXNWantSoundMask | kTXNWantGraphicsMask)); #endif + long menuMgrAttr ; + Gestalt( gestaltMenuMgrAttr , &menuMgrAttr ) ; + if ( menuMgrAttr & gestaltMenuMgrAquaLayoutMask ) + sUMAHasAquaLayout = true ; + } // process manager