From 0e5a4d2032018ad20f8edefcb88db88c71d50ea1 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 5 Jan 2002 16:36:46 +0000 Subject: [PATCH] added method for finding out, whether the macos system is fully initialized for this app (e.g. it is not during static initialization) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/uma.h | 1 + src/mac/carbon/uma.cpp | 6 ++++-- src/mac/uma.cpp | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/wx/mac/uma.h b/include/wx/mac/uma.h index 6a7de05e46..b242acb961 100644 --- a/include/wx/mac/uma.h +++ b/include/wx/mac/uma.h @@ -21,6 +21,7 @@ long UMAGetAppearanceVersion() ; bool UMAHasWindowManager() ; long UMAGetWindowManagerAttr() ; bool UMAHasAquaLayout() ; +bool UMASystemIsInitialized() ; // process manager diff --git a/src/mac/carbon/uma.cpp b/src/mac/carbon/uma.cpp index 1c31f87d4c..2e50863903 100644 --- a/src/mac/carbon/uma.cpp +++ b/src/mac/carbon/uma.cpp @@ -19,6 +19,8 @@ static bool sUMAHasAppearance = false ; static long sUMAAppearanceVersion = 0 ; static bool sUMAHasAquaLayout = false ; +static bool sUMASystemInitialized = false ; + extern int gAGABackgroundColor ; bool UMAHasAppearance() { return sUMAHasAppearance ; } long UMAGetAppearanceVersion() { return sUMAAppearanceVersion ; } @@ -29,7 +31,7 @@ static long sUMAWindowManagerAttr = 0 ; bool UMAHasWindowManager() { return sUMAHasWindowManager ; } long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; } bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; } - +bool UMASystemIsInitialized() { return sUMASystemInitialized ; } void UMACleanupToolbox() { @@ -112,7 +114,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) Gestalt( gestaltMenuMgrAttr , &menuMgrAttr ) ; if ( menuMgrAttr & gestaltMenuMgrAquaLayoutMask ) sUMAHasAquaLayout = true ; - + sUMASystemInitialized = true ; } // process manager diff --git a/src/mac/uma.cpp b/src/mac/uma.cpp index 1c31f87d4c..2e50863903 100644 --- a/src/mac/uma.cpp +++ b/src/mac/uma.cpp @@ -19,6 +19,8 @@ static bool sUMAHasAppearance = false ; static long sUMAAppearanceVersion = 0 ; static bool sUMAHasAquaLayout = false ; +static bool sUMASystemInitialized = false ; + extern int gAGABackgroundColor ; bool UMAHasAppearance() { return sUMAHasAppearance ; } long UMAGetAppearanceVersion() { return sUMAAppearanceVersion ; } @@ -29,7 +31,7 @@ static long sUMAWindowManagerAttr = 0 ; bool UMAHasWindowManager() { return sUMAHasWindowManager ; } long UMAGetWindowManagerAttr() { return sUMAWindowManagerAttr ; } bool UMAHasAquaLayout() { return sUMAHasAquaLayout ; } - +bool UMASystemIsInitialized() { return sUMASystemInitialized ; } void UMACleanupToolbox() { @@ -112,7 +114,7 @@ void UMAInitToolbox( UInt16 inMoreMastersCalls ) Gestalt( gestaltMenuMgrAttr , &menuMgrAttr ) ; if ( menuMgrAttr & gestaltMenuMgrAquaLayoutMask ) sUMAHasAquaLayout = true ; - + sUMASystemInitialized = true ; } // process manager -- 2.45.2