#include "wx/fontmap.h"
#endif // wxUSE_FONTMAP
-#if defined(__DARWIN__) && defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS
- // For MacTypes.h for Debugger function
- #include <CoreFoundation/CFBase.h>
-#endif
-
-#if defined(__WXMAC__)
- #ifdef __DARWIN__
- #include <CoreServices/CoreServices.h>
- #else
- #include "wx/mac/private.h" // includes mac headers
- #endif
-#endif // __WXMAC__
-
#ifdef __WXDEBUG__
#if wxUSE_STACKWALKER
#include "wx/stackwalk.h"
wxAppInitializerFunction wxAppConsoleBase::ms_appInitFn = NULL;
+wxSocketManager *wxAppTraitsBase::ms_manager = NULL;
+
// ----------------------------------------------------------------------------
// wxEventLoopPtr
// ----------------------------------------------------------------------------
m_traits = NULL;
m_mainLoop = NULL;
- ms_appInstance = wx_static_cast(wxAppConsole *, this);
+ ms_appInstance = static_cast<wxAppConsole *>(this);
#ifdef __WXDEBUG__
SetTraceMasks();
return m_traits;
}
+/* static */
+wxAppTraits *wxAppConsoleBase::GetTraitsIfExists()
+{
+ wxAppConsole * const app = GetInstance();
+ return app ? app->GetTraits() : NULL;
+}
+
// ----------------------------------------------------------------------------
// event processing
// ----------------------------------------------------------------------------
void WXDLLIMPEXP_BASE wxMutexGuiEnter()
{
- wxAppConsoleBase::GetInstance()->GetTraits()->MutexGuiEnter();
+ wxAppTraits * const traits = wxAppConsoleBase::GetTraitsIfExists();
+ if ( traits )
+ traits->MutexGuiEnter();
}
void WXDLLIMPEXP_BASE wxMutexGuiLeave()
{
- wxAppConsoleBase::GetInstance()->GetTraits()->MutexGuiLeave();
+ wxAppTraits * const traits = wxAppConsoleBase::GetTraitsIfExists();
+ if ( traits )
+ traits->MutexGuiLeave();
}
#endif // wxUSE_THREADS